Backwards Compatibility

There are a number of classes and methods that have been added to allow for backwards compatibility with SC2 code. The most notable of these is, which is basically a wrapper for

{, 0, 0.5) }.play; // creates an arbitrarily named SynthDef and a Synth to play it{, 0, 0.5) }); // in SC3 just a wrapper for with fewer args

Both of these will create synth nodes on the default server. Note that neither requires the use of an ugen; they simply output to the first audio bus. One can however add an Out to in order to specify.{,, 0, 0.5)) });

In general, one should be aware of this distinction when using this code. When copying such code for reuse with other SC3 classes (for example in a reusable SynthDef), it will usually be necessary to add an Although useful for quick testing these methods are generally inferior to, as the latter is more direct, requires no modifications for general reuse, has greater general flexibility and has slightly less overhead. (Although this is insignificant in most cases, it could be relevant when large numbers of defs or nodes are being created.) 

Like, returns a Synth object which can then be messaged, etc. However, since creates an arbitrarily named SynthDef, one cannot reuse the resulting def, at least not without reading its name from the post window, or getting it from the Synth object.

//The following examples are functionally equivalent

x = { arg freq = 440;,, 0, 0.5)) }.play(fadeTime: 0); 

x.set(\freq, 880); // you can set arguments

y =; // get the arbitrary defname from x;;

x = SynthDef("backcompat-sine", { arg freq = 440;,, 0, 0.5)) }).play; 

x.set(\freq, 880);

y ="backcompat-sine");;; is in general superior to both its SC2 equivalent and It has a number of significant features such as the ability to specify the output bus and fade times as arguments. See the Function helpfile for a more in-depth discussion.

A number of other classes and methods have also been added to improve compatibility. These are listed below. In general there are equivalent or better ways of doing the same things in SC3.

Synth *play use or

GetFileDialog  use CocoaDialog


Synth *stop use Server.freeAll

Synth *isPlaying Server.numSynths (this will include non-running nodes)

Mix *ar *arFill use Mix *new and *fill