Hi Bill, Yes, that's very helpful. I believe I was confused about trying to add a list to the make-pulsed-env dur or frequency component, which only takes a real num: (e (make-pulsed-env '(0 0 1 1 2 0) 1.0 '(0 0 .5 .15 1 0) ))
versus applying an env. to the polyshape index or fm parameter: (polyshape gen (* (pulsed-env e (env frq))) 0.1) But I see how it should work now. So this was the effect I was after. Morse Code? (with-sound (:srate 48000 :channels 1 :play #t) (let ((gen (make-polyshape 400.0 :partials (list 1 .5 2 .25 3 .125 4 .125))) (e (make-pulsed-env '(0 0 1 1 2 0) 1.0 1)) ;w/ dur freq (frq (make-env '(0 0 .5 .15 1 0) :duration 1.0 :scaler (hz->radians 50))) ) (do ((i 0 (+ i 1))) ((= i 192000)) (outa i (* 5.95 (polyshape gen (* (pulsed-env e (env frq))) 0.1) )) ;w/ index, fm ))) ________________________________ From: cmdist-boun...@ccrma.stanford.edu <cmdist-boun...@ccrma.stanford.edu> on behalf of cmdist-requ...@ccrma.stanford.edu <cmdist-requ...@ccrma.stanford.edu> Sent: Wednesday, June 23, 2021 9:00 AM To: cmdist@ccrma.Stanford.EDU <cmdist@ccrma.Stanford.EDU> Subject: Cmdist Digest, Vol 157, Issue 4 Send Cmdist mailing list submissions to cmdist@ccrma.stanford.edu To subscribe or unsubscribe via the World Wide Web, visit https://cm-mail.stanford.edu/mailman/listinfo/cmdist or, via email, send a message with subject or body 'help' to cmdist-requ...@ccrma.stanford.edu You can reach the person managing the list at cmdist-ow...@ccrma.stanford.edu When replying, please edit your Subject line so it is more specific than "Re: Contents of Cmdist digest..." Today's Topics: 1. make-pulsed-env (James Hearon) 2. Re: make-pulsed-env (b...@ccrma.stanford.edu) ---------------------------------------------------------------------- Message: 1 Date: Wed, 23 Jun 2021 17:56:03 +0000 From: James Hearon <j_hea...@hotmail.com> To: "cmdist@ccrma.Stanford.EDU" <cmdist@ccrma.Stanford.EDU> Subject: [CM] make-pulsed-env Message-ID: <byapr10mb2536a2781aab5012906bc7dee5...@byapr10mb2536.namprd10.prod.outlook.com> Content-Type: text/plain; charset="iso-8859-1" Hi, I was trying to figure out how to use an env on the freq parameter of make-pulsed-env (make-pulsed-env envelope duration frequency) but it wants a real, not a pair. I thought I'd look-see the code for make-pulsed-env, but I can't seem to locate it. Wondering if there's a way to go about achieving the effect? make-freqpulsed-env? I tried adding an amp to the pulsed-env but that's not the effect I was after. (outa i (* 5.95 (polyshape gen (* (env ampenv) (pulsed-env jsenvel)) 0.01) )) Also tried a vibrato type effect using an LFO, but still no joy. Just trying to get make-pulsed-env to change frequency within the duration of the note. Something like: <>, < >, < >, <>, <>,<>,<> (with-sound (:srate 48000 :channels 1 :play #t) (let ((gen (make-polyshape 400.0 :partials (list 1 .5 2 .25 3 .125 4 .125))) (jsenvel (make-pulsed-env '(0 0 .25 0.01 .5 0.2 1 0.0) 1.0 1.0)) ;XXX ) (do ((i 0 (+ i 1))) ((= i 96000)) (outa i (* 5.95 (polyshape gen (pulsed-env jsenvel) 0.01) )) ))) Regards, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20210623/5f62e957/attachment-0001.html> ------------------------------ Message: 2 Date: Wed, 23 Jun 2021 11:26:53 -0700 From: b...@ccrma.stanford.edu To: James Hearon <j_hea...@hotmail.com> Cc: "cmdist@ccrma.Stanford.EDU" <cmdist@ccrma.Stanford.EDU> Subject: Re: [CM] make-pulsed-env Message-ID: <f8637c31b04a201ec47b62861f5a9...@ccrma.stanford.edu> Content-Type: text/plain; charset=US-ASCII; format=flowed The make-pulsed-env frequency parameter sets the base frequency (it can be 0); you change the pulse rate while running via the fm argument to the pulsed-env generator. For example: (with-sound () (let ((e (make-pulsed-env '(0 0 1 1 2 0) .01 1)) (frq (make-env '(0 0 1 1) :duration 1.0 :scaler (hz->radians 50)))) (do ((i 0 (+ i 1))) ((= i 44100)) (outa i (* .5 (pulsed-env e (env frq))))))) ------------------------------ _______________________________________________ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist End of Cmdist Digest, Vol 157, Issue 4 **************************************
_______________________________________________ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist