The play
message is of common use in sc. Different objects respond to it in various ways, but the simple meaning is: start a process. It is usually implemented by objects in contributed libraries as well.
play usually returns the playing object which might not be the same as the one the message was sent to.
opposite: stop
For a full list of which classes that implements play
, see Methods: play
returns: the clock
See Clock: *play
returns: the routine
See Routine: -play
returns: the stream
the stream will loop until it returns nil
returns: the stream
See Stream: -play and Task: -play
returns: an EventStreamPlayer
See Pattern: -play
The following play messages both cause a SynthDef to be written, send it to the server and start a synth with it there.
gate
control for releasing and crossfading. If the function provides its own releasable envelope, this is omitted.Also note that they should not be used in quickly running automated processes, as there are more efficient alternatives ( see SynthDefs versus Synths )
returns: a Synth
outbus | on what bus to play (default: 0) |
fadeTime | in what time to fade out when released (default: 0.02) |
addAction | where to add the node (\addToHead by default) |
args | controls to set when starting the synth |
See Function: -play
returns: a Synth
Note that you need an out ugen to hear the result. Examples of how to write to the busses in the helpfiles: Out / ReplaceOut / XOut / OffsetOut
Nevertheless, synths can also run without any writing activity: (see e.g. SendTrig)
Some operations provide an out ugen internally: see for example function.play
, which plays out to a bus number provided in the argument passed to .play
See SynthDef: -play
Synth.play(function)
is synonymous, for backwards compatibility with sc2