[CM] Cmdist Digest, Vol 157, Issue 4

James Hearon j_hearon at hotmail.com
Thu Jun 24 11:21:52 PDT 2021


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-bounces at ccrma.Stanford.EDU <cmdist-bounces at ccrma.Stanford.EDU> on behalf of cmdist-request at ccrma.Stanford.EDU <cmdist-request at ccrma.Stanford.EDU>
Sent: Wednesday, June 23, 2021 9:00 AM
To: cmdist at ccrma.Stanford.EDU <cmdist at ccrma.Stanford.EDU>
Subject: Cmdist Digest, Vol 157, Issue 4

Send Cmdist mailing list submissions to
        cmdist at 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-request at ccrma.stanford.edu

You can reach the person managing the list at
        cmdist-owner at 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 (bil at ccrma.Stanford.EDU)


----------------------------------------------------------------------

Message: 1
Date: Wed, 23 Jun 2021 17:56:03 +0000
From: James Hearon <j_hearon at hotmail.com>
To: "cmdist at ccrma.Stanford.EDU" <cmdist at ccrma.Stanford.EDU>
Subject: [CM] make-pulsed-env
Message-ID:
        <BYAPR10MB2536A2781AAB5012906BC7DEE5089 at 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: bil at ccrma.Stanford.EDU
To: James Hearon <j_hearon at hotmail.com>
Cc: "cmdist at ccrma.Stanford.EDU" <cmdist at ccrma.Stanford.EDU>
Subject: Re: [CM] make-pulsed-env
Message-ID: <f8637c31b04a201ec47b62861f5a9d4c at 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 at ccrma.stanford.edu
https://cm-mail.stanford.edu/mailman/listinfo/cmdist


End of Cmdist Digest, Vol 157, Issue 4
**************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20210624/838b7ede/attachment.html>


More information about the Cmdist mailing list