[CM] portamento
James Hearon
j_hearon at hotmail.com
Tue Apr 19 11:02:57 PDT 2022
Hi,
I'm trying to come up with an approach to portamento note phrasing. Best I've been able to do is work with gliss. I'm wondering if this is on the right track for how this is usually handled?
Regards,
Jim
(definstrument (myport start-time duration frequency start-freq end-freq (amp-env '(0 0 1 1 2 1 3 0)) sampling-rate)
(let* ((beg (floor (* start-time sampling-rate)))
(end (+ beg (floor (* duration sampling-rate))))
(sine-wave (make-oscil :frequency frequency))
(ampf (make-env amp-env :duration duration :scaler 1.0))
(frqf (make-env '(0 0 1 1) :scaler (hz->radians (- end-freq start-freq)) :duration duration :base 0.67))
)
(do ((i beg (+ i 1)))
((= i end))
(outa i (* (env ampf) (oscil sine-wave (env frqf) )))
(outb i (* (env ampf) (oscil sine-wave (env frqf) )))
)))
(with-sound (:srate 48000 :channels 2 :header-type mus-riff :play #t)
(myport 0 1 300 300 400 '(0 1 1 .3) 48000)
(myport 2 1.5 400 400 300 '(0 .3 1 .3) 48000)
)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20220419/d9797a0a/attachment.html>
More information about the Cmdist
mailing list