[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Pbind question
On Fri, Jun 11, 2021 at 9:33 AM James Harkins <jamshark70@xxxxxxxxx> wrote:
> After that, you can have an Event that embeds another event, and the
> sub-event will automatically allocate a bus, play its synth on that
> bus, map the parent event control to that bus, and release the bus
> when finished -- arbitrary modulation signals applied to any
> parameter.
To pique interest, a quick example.
After installing the test-tempbus.sc extension from
https://gist.github.com/jamshark70/7571ef65cb3aef58ff14b014b672c91b
then the following works:
(
p = Pbind(
\type, \notemap,
\dur, Pexprand(0.1, 0.8, inf),
\legato, Pexprand(0.5, 3.0, inf),
\freqEndpoints, Pexprand(200, 1200, inf).clump(2),
\pan, Pwhite(-1.0, 1.0, inf),
\detunedFreq, Pfunc { |ev|
var sustain = ev.use { ~sustain.value } / thisThread.clock.tempo;
(
instrument: \ctlEnv,
env: Env(ev[\freqEndpoints], [1], \exp),
time: sustain,
addAction: \addBefore
)
}
).play;
)
p.stop;
So we get sliding notes, but the important thing is what is not necessary to do:
- This example does not have to produce control-change events quickly
-- the time granularity of the Pbind is still per note.
- This example does not have to make any changes to the default
SynthDef -- you write the note and control SynthDefs in a normal,
simple way, and the event connects them automatically.
\detunedFreq is a bother -- I'm not sure when I would have time to
improve that. This isn't high on my priority list -- I would welcome
suggestions on this issue.
hjh
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/