Creating sound with SuperCollider can be very rewarding using its ready made unit generators to build novel instruments and sound generators, but what happens when one wants to improvise the structure of these instruments and change them on the fly.
Dynamic or interactive programming, commonly known as live coding (in electronic music, and digital arts) is a performance paradigm that allows the performer(s) to create an instrument instead of interacting with it by altering its control inputs or parameters. For this we will use JITLib shipped in SuperCollider optimised for just in time programming techniques, which allows the user to interact and interfere without having to stop and update the synthesis processes while at run. This allows the performer to improvise and change the state of the sound manipulation dynamically, expanding the interaction affordances of the software in real time. Examples made in SuperCollider, can be found at this repository. For more information about live coding as performance paradigm see this page.
Define an Ndef, a synthesis proxy!
Ndef(\x).fadeTime = 2;
Ndef(\x).play;
Ndef(\x, {SinOsc.ar(\freq.kr(120.0, 0.3)) * 0.1 });
Ndef(\x, {SinOsc.ar([\freq.kr(120.0), \freq.kr + 2.01]) / 2 * 0.1});
Ndef(\x, {LFSaw.ar([\freq.kr(120.0), \freq.kr + 2.01]) / 2 * 0.1});
Ndef(\x, {LFSaw.ar([\freq.kr(120.0), \freq.kr + 2.01]) / 2 * Linen.kr(Impulse.kr(\speed.kr(1)))});
// Make an Ndef mixer to control the node definitions via a GUI
NdefMixer(s);
The most interesting thing in JITlib is that things do not have to exist as long as you create them later!