synth synth_name (symbol)
Trigger specified synth with given opts. Bypasses current_synth
value, yet still honours current_synth_defaults
. When using synth
, the note is no longer an explicit argument but an opt with the key note:
.
If note: opt is nil
, :r
or :rest
, play is ignored and treated as a rest. Also, if the on:
opt is specified and returns false
, or nil
then play is similarly ignored and treated as a rest.
If the synth name is nil
behaviour is identical to that of play
in that the current_synth
will determine the actual synth triggered.
If a block is given, it is assumed to take one arg which will be the controllable synth node and the body of the block is run in an implicit in_thread
. This allows for asynchronous control of the synth without interfering with time. For synchronous control capture the result of synth
as a variable and use that.
Note that the default opts listed are only a guide to the most common opts across all the synths. Not all synths support all the default opts and each synth typically supports many more opts specific to that synth. For example, the :tb303
synth supports 45 unique opts. For a full list of a synth’s opts see its documentation in the Help system. This can be accessed directly by clicking on the name of the synth and using the shortcut C-i
Introduced in v2.0
# Example 1 | |
|
|
# Example 2 | |
|
|
# Example 3 | |
|
|
# Example 4 | |
|
|
# Example 5 | |
|
|
# Example 6 | |
|
|
# Example 7 | |
|
|