-
Notifications
You must be signed in to change notification settings - Fork 93
2.5. queueStrumUp
Srgy Surkv edited this page Sep 13, 2019
·
2 revisions
Send audio from instrument to the output with small delays from highest to lowest pitch.
queueStrumUp(audioContext, target, preset, when, pitches, duration, volume, slides);
- audioContext - AudioContext
- target - a node to connect to, for example audioContext.destination
- preset - variable with the instrument preset
- when - when to play, audioContext.currentTime or 0 to play now, audioContext.currentTime + 3 to play after 3 seconds
- pitches - array of note pitches from 0 to 127, for example [2+12*4] to play D of fourth octave (use MIDI key for drums)
- duration - chord duration in seconds, for example 4 to play 4 seconds
- volume - 0.0 <=1.0 volume (0 is 'no value', 'no value' is 1)
- slides - array of pitch bends from startup value, every item consists of
- pitch - tone shift
- when - time shift