Open
Description
I am trying to figure out how to have certain sounds played via MIDI, and am encountering the following issue:
I have these wav files from one of your demos on the SD card:
And I am able to play them through the MIDI library for Arduino when sending notes 1 through 9, but oddly I have to use channel 2. Why is that?
Based on the MIDI section of the instructions the track number is computed as
Track Number = (MIDI Channel * 128) + (MIDI Bank Number * 128) + MIDI Note Number
#include <MIDI.h>
MIDI_CREATE_DEFAULT_INSTANCE();
void setup()
{
delay(2000);
MIDI.begin();
play();
}
void loop()
{
play();
}
void play()
{
int channel = 2;
for (int note = 1; note < 10; note++) {
MIDI.sendNoteOn(byte(note), 60, byte(channel));
delay(1000);
MIDI.sendNoteOff(byte(note), 0, byte(channel));
delay(100);
}
}
Metadata
Metadata
Assignees
Labels
No labels