T("SynthDef")
ARSTEREO Synth Definition
Description
T("SynthDef")
manages a SynthDef with noteOn
, noteOff
.
Properties
def
(Function)- A SynthDef function that should return T-Object.
poly
(Number)- The maximum number of polyphony. Its default value is 4, with a range between 1 to 64.
SynthDefFunction
opts.noteNum
- The MIDI number of
noteOn()
ornoteOff()
with a range between 0 to 127.
- The MIDI number of
opts.freq
- The frequency of
noteOn()
ornoteOff()
.
- The frequency of
opts.velocity
- The velocity of
noteOn()
with a range between 0 to 127.
- The velocity of
opts.doneAction
- The function that free the enclosing synth.
ohters
- The 3rd argument of
noteOn()
ornoteOff()
.
- The 3rd argument of
Methods
noteOn(noteNum, velocity, opts)
noteOnWithFreq(freq, velocity, opts)
- Call a SynthDef function and start management a returned T-Object with a MIDI note number.
noteOff(noteNum)
noteOffWithFreq(freq)
- Send
release()
to T-Object that managed with a MIDI note number.
- Send
allNoteOff()
- Send
noteOff()
to all T-Object that manged bynoteOn()
ornoteOnWithFreq()
.
- Send
allSoundOff()
- Dispose all T-Object managed.
See Also
Source
https://github.com/mohayonao/timbre.js/blob/master/src/objects/synthdef.js