<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. That's very helpful information. I see I can use mus-xcoeffs with make-bandpass. I think I wasn't indexing it properly too.
<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 (b (* amp (oscil os)))), what do the output numbers of the generator represent before the filter is applied to a source?
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->radians 500.0) (hz->radians 2000.0) 3))
<div> (v (make-float-vector 3))</div>
<div> )</div>
<div> (do ((l 0 (+ l 1))) </div>
<div> ((= 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 "~%l: ~F v: ~0,6F" l (v l))</div>
<div> )</div>
<div> (do ((l 0 (+ l 1))) </div>
<div> ((= l 3))</div>
<div>(format #t "~%j: ~F v: ~0,6F" 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. <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. 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 <cmdist-bounces@ccrma.Stanford.EDU> on behalf of cmdist-request@ccrma.Stanford.EDU <cmdist-request@ccrma.Stanford.EDU><br>
<b>Sent:</b> Thursday, June 30, 2022 9:00 AM<br>
<b>To:</b> cmdist@ccrma.Stanford.EDU <cmdist@ccrma.Stanford.EDU><br>
<b>Subject:</b> Cmdist Digest, Vol 169, Issue 9</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Send Cmdist mailing list submissions to<br>
cmdist@ccrma.stanford.edu<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<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>
cmdist-request@ccrma.stanford.edu<br>
<br>
You can reach the person managing the list at<br>
cmdist-owner@ccrma.stanford.edu<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Cmdist digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
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 <j_hearon@hotmail.com><br>
Cc: "cmdist@ccrma.Stanford.EDU" <cmdist@ccrma.Stanford.EDU><br>
Subject: Re: [CM] make-bandpass xcoeffs<br>
Message-ID: <4bc1a174e5c876e81b11ac36a08865dd@ccrma.stanford.edu><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. 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>