Hi there,
i´m an absolutely beginner regarding (Arduino) programming and just created my first sketch as you see below.
The fortyseveneffects midi library is used.
I have an Arduino Uno with a Chinese MidiShield. I try to split incoming midi notes to the two midi outputs of the shield, where a Volca Sample and a Volca Beats is connected to. The goal is to send midi notes on one channel to the Midi shield and send them to one of the two devices on different channels (3-10 Volca Sample, 14 Volca Beats) depending on the incoming midi note. While it works fine for the Volca Sample, i can´t get the Volca Beats to work.
(The Arduino seem to not alter any notes e.g. filtering, midi out/thru problems or something.
Testing midi shield Input on ch. 14 is sending correctly to the Volca Beats)
For the moment the workaround is to send midi signals to the arduino also on channel 14 (instead of desired channel 16).
So the correct keypresses are sent to the Volca Beats while the other keypresses are sent to the Volca Sample (via the Arduino). This works fine and both devices could be reached via one midi channel.
Anyhow that was not the goal of my first sketch / Arduino self programmed thing...
So the question is:
Why i can´t reach the Vocla Beats via channel 16, while it works fine for the Volca Sample ?!
Here is my code:
#include <MIDI.h>
MIDI_CREATE_DEFAULT_INSTANCE();
void setup()
{
MIDI.setHandleNoteOn(myHandleNoteOn);
MIDI.begin(16); // Listen to Channel 16 only (desired), for the workaround 14 is set here.
}
void loop()
{
MIDI.read(); // Read incoming Midi
}
void myHandleNoteOn(byte channel, byte note, byte velocity)
{
switch (note) // Input Note -> Output Note \/
{
case 37:
MIDI.sendNoteOn(note, velocity, 3); // Note 37 pressed. note 37 sent on channel 3 to volca sample, (note irrelevant for Volca Sample)
MIDI.sendNoteOn(note, 0, 3); // "NoteOff" channel 3, same note // Volca Sample receives on Channels 3-10
break;
case 40:
MIDI.sendNoteOn(note, velocity, 4);
MIDI.sendNoteOn(note, 0, 4);
break;
case 41:
MIDI.sendNoteOn(note, velocity, 5);
MIDI.sendNoteOn(note, 0, 5);
break;
case 44:
MIDI.sendNoteOn(note, velocity, 6);
MIDI.sendNoteOn(note, 0, 6);
break;
case 45:
MIDI.sendNoteOn(note, velocity, 7);
MIDI.sendNoteOn(note, 0, 7);
break;
case 47:
MIDI.sendNoteOn(note, velocity, 8);
MIDI.sendNoteOn(note, 0, 8);
break;
case 48:
MIDI.sendNoteOn(note, velocity, 9);
MIDI.sendNoteOn(note, 0, 9);
break;
case 49:
MIDI.sendNoteOn(note, velocity, 10);
MIDI.sendNoteOn(note, 0, 10);
break;
case 36:
MIDI.sendNoteOn(note, velocity, 14); // Volca Drum receives on channel 14, NoteOn channel 14, (note relevant for Volca Drums)
MIDI.sendNoteOn(note, 0, 14); // one case for the moment, will be eight when the Beats is reachable...
break; // THIS case is not working !
default: // do nothing;
break;
}
}
I hope i haven´t forget anything and this post is forum conform.
Any advice is appreciated ! Thanks in advance !
Tobi