Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIDI channel number mismatch #26

Open
baloe opened this issue Dec 29, 2022 · 1 comment
Open

MIDI channel number mismatch #26

baloe opened this issue Dec 29, 2022 · 1 comment

Comments

@baloe
Copy link

baloe commented Dec 29, 2022

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:
Screenshot_20221229_151926

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);
    }
}
@KieranReck
Copy link

Hi Baloe, which firmware version do you have on the Wav Trigger? The track number equation changed between V1.20 and V1.30 (see attached screenshot).

V1.30 doesn't require you to state a midi channel because of the introduction of MIDI omni channel mode, you now set the channel using the configuration tool instead (or leave it on omni by default).

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants