Closed sylv256 closed 4 years ago
Hi @TehcJS ,
If the MIDI file specifies a Program Change meta event on a track it will be emitted during playback. The value 0 to 127 represents the instrument.
{
track: 1,
delta: 0,
tick: 0,
byteIndex: 7,
name: 'Program Change',
channel: 1,
value: 1
}
MIDI instrument codes: http://www.ccarh.org/courses/253/handout/gminstruments/
Thank you! I didn't see this in the documentation. I'll probably make a pull request adding that to the docs if it's not already there.
There's no way to know exactly what instrument is playing when the Note on event fires. Because of this, if there are drums or some form of instrument in the song, you cannot specify which instrument to play.