<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Yes. Understood.&nbsp; That's very helpful information.&nbsp; I see I can use mus-xcoeffs with make-bandpass.&nbsp; I think I wasn't indexing it properly too.&nbsp;
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
If I might continue to ask, what are the numbers ouput from the generator, ex. (bandpass b)?
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I know the xcoeffs are the filter magnitudes but when nothing is passing thru the filter yet, as it would be if one were to call (outa i &nbsp;(b (* amp (oscil os)))),&nbsp; what do the output numbers of the generator represent before the filter is applied to a source?&nbsp;
 Are they random sample amplitudes, for ex.?<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
(let* ((b (make-bandpass (hz-&gt;radians 500.0) (hz-&gt;radians 2000.0) 3))
<div>&nbsp; &nbsp; &nbsp; &nbsp;(v (make-float-vector 3))</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp;)</div>
<div>&nbsp; &nbsp;(do ((l 0 (+ l 1))) </div>
<div>&nbsp; &nbsp; &nbsp; &nbsp;((= l 3))</div>
<div>;(float-vector-set! v l (bandpass b l)) ;what is output here?<br>
</div>
<div>(float-vector-set! v l ((mus-xcoeffs b) l)) ;filter magnitudes<br>
</div>
<div>(format #t &quot;~%l: ~F v: ~0,6F&quot; l (v l))</div>
<div>&nbsp; &nbsp; )</div>
<div>&nbsp; &nbsp;(do ((l 0 (+ l 1))) </div>
<div>&nbsp; &nbsp; &nbsp; &nbsp;((= l 3))</div>
<div>(format #t &quot;~%j: ~F &nbsp;v: ~0,6F&quot; l (v l))</div>
<div>)</div>
)<br>
</div>
<div id="signature_bookmark"></div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
...also (sorry this long-winded) when I see a lambda func adding the two bandpass filters, ex.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
(flt3 (lambda (y) (+ (bandpass flt1 y) (bandpass flt2 y))))</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
I cannot get the mus-xcoeffs of flt3 then, because it's now a lambda function.&nbsp; <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
So my purpose was to prove to myself that the lambda func was indeed the same as adding two vectors of mus-xcoeffs.<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
(float-vector-add! v1 v2).</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
In other words trying to see the numbers to verify the lambda function is indeed adding the xcoeffs, not the generator outputs.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
I hope that makes sense.&nbsp; But I'm still failing in my proof.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
Regards,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)" class="elementToProof">
Jim<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> cmdist-bounces@ccrma.Stanford.EDU &lt;cmdist-bounces@ccrma.Stanford.EDU&gt; on behalf of cmdist-request@ccrma.Stanford.EDU &lt;cmdist-request@ccrma.Stanford.EDU&gt;<br>
<b>Sent:</b> Thursday, June 30, 2022 9:00 AM<br>
<b>To:</b> cmdist@ccrma.Stanford.EDU &lt;cmdist@ccrma.Stanford.EDU&gt;<br>
<b>Subject:</b> Cmdist Digest, Vol 169, Issue 9</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Send Cmdist mailing list submissions to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmdist@ccrma.stanford.edu<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist" data-auth="NotApplicable">
https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
or, via email, send a message with subject or body 'help' to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmdist-request@ccrma.stanford.edu<br>
<br>
You can reach the person managing the list at<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmdist-owner@ccrma.stanford.edu<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of Cmdist digest...&quot;<br>
<br>
<br>
Today's Topics:<br>
<br>
&nbsp;&nbsp; 1. Re: make-bandpass xcoeffs (bil@ccrma.Stanford.EDU)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 29 Jun 2022 12:04:42 -0700<br>
From: bil@ccrma.Stanford.EDU<br>
To: James Hearon &lt;j_hearon@hotmail.com&gt;<br>
Cc: &quot;cmdist@ccrma.Stanford.EDU&quot; &lt;cmdist@ccrma.Stanford.EDU&gt;<br>
Subject: Re: [CM] make-bandpass xcoeffs<br>
Message-ID: &lt;4bc1a174e5c876e81b11ac36a08865dd@ccrma.stanford.edu&gt;<br>
Content-Type: text/plain; charset=US-ASCII; format=flowed<br>
<br>
make-bandpass is a wrapper around make-fir-filter, returning<br>
an fir-filter generator, so mus-xcoeffs does work with it;<br>
there's an example in snd-test.scm around line 7706.<br>
make-bandpass is not itself a generator; it returns one.<br>
If you look at the code in dsp.scm you'll see<br>
(define bandpass fir-filter) -- this says the<br>
bandpass generator is an fir-filter.&nbsp; In the<br>
first case, I think you're setting a vector to the<br>
output of the bandpass generator, and in the second<br>
it looks like you've copied the make-bandpass code<br>
to set the vector, so you're setting the vector to<br>
two different things.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Cmdist mailing list<br>
Cmdist@ccrma.stanford.edu<br>
<a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist" data-auth="NotApplicable">https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
<br>
<br>
End of Cmdist Digest, Vol 169, Issue 9<br>
**************************************<br>
</div>
</span></font></div>
</body>
</html>