Sending a SynthDef to a Server

SynthDefs are templates for Synths, which are sent to a server:

// define a SynthDef and send it to the server

   // define arguments of the SynthDef
   |f = 100, a = 1|

   // calculate a sine wave with frequency and amplitude
   var x = a *;

   // send the signal to the output bus '0', x);



Create a Synth from a SynthDef

Once a SynthDef has been sent to the server, instances can be created:

// create a synth from the SynthDef
~my_synth = Synth(\sine_example, [\f, 1000, \a, 1]);

// create another synth from the SynthDef
~another_synth = Synth(\sine_example, [\f, 1100, \a, 1]);

Changing Synth Parameters

All parameters defined in the SynthDef of running synths can be changed, using the associated variable on the client side:

// set a parameter

Removing Synths

Running synths with a client-side variable can be removed from the server:

// free the nodes;;

Contents © Henrik von Coler 2021 - Contact