home/ atoms/ sc-pbind-synthdef

Pbind plays named SynthDefs via \instrument; SynthDef args become Pbind keys; freq and gate must be spelled exactly

Once a SynthDef is registered, Pbind can sequence it using \instrument, ‘synthName’. All arguments of that SynthDef automatically become available as Pbind keys. Pbind handles pitch conversion (\degree → \freq) automatically when the SynthDef has a freq argument spelled exactly as ‘freq’. For sustained envelopes, the SynthDef must have a gate argument (gate=1 default); Pbind uses it internally to stop notes at the right moment. Custom argument names work as Pbind keys too.

Examples

SynthDef(‘pluck’,{arg freq=440,amp=0.1,gate=1; …}).add; Pbind(\instrument,‘pluck’,\degree,Pwhite(0,7),\dur,0.25,\amp,0.3).play;

Assessment

Explain what breaks if a SynthDef’s pitch argument is named ‘frequency’ instead of ‘freq’ when used inside a Pbind with \degree.

“the name of yourSynthDef. •All the arguments of your SynthDef are accessible and controllable from insidePbind: simply use them asPbindkeys.”
corpus · a-gentle-introduction-to-supercollider-ruviaro-archive-org-c · chunk 16