Function to generate note events.
durationis -1 the generated note plays as long as the key that called playNote is held.
durationis greater 0 the note plays as long as the key is held, but maximum for the time specified in milliseconds.
durationis 0 playNote generates only the note-on event. The release can be managed manually with onRelease or with releaseVoice and the ID returned by playNote.
Available in: Processor.
|note||The note number of the note in the range of 0 to 127.||number|
|velocity||The velocity of the note in the range of 0 to 127.||number|
|duration||The length of the note in milliseconds. The default is -1.||number, optional|
|layerOrZone||The layer or zone which shall receive the note. Only elements after the script module are addressable. The default is ||Layer or Zone, optional|
The initial volume in the range of 0 to 1.0. The default is 1.0.
|pan||The initial pan position in the range of -1.0 to 1.0. The default is 0.||number, optional|
|tune||The initial tuning in the range of -120.0 to 120.0. The default is 0.||number, optional|
Returns the note ID of the generated note.