MIDI Controller Leonardo Pro Micro with MUX 4067
WORRYL3SS opened this issue · 0 comments
I'm trying to build and Arduino based MIDI controller , using the code provided below that i found on another thread here on GitHub ! After flashing , device is being recognized as MIDI , but i can't see any control value changes on my MIDI Monitor . Is there any possible way of doing this , and if so could you help me ?
CODE :
#include <MIDI_Controller.h>
// Create an instance of 'AnalogMultiplex' with the output pin of the multiplexer connected to
// analog input pin A1 and the address pins connected to pins 4, 5 ,6 and 7 (because my mux is 16 channel).
AnalogMultiplex multiplexer(A1, { 4, 5, 6, 7 } );
// Create 12 new instances of the class 'Analog', on the 12 pins of the multiplexer,
// that send MIDI messages with controller 7 (channel volume) on channels 1 - 12
Analog potentiometers[] = {
{multiplexer.pin(0), MIDI_CC::Channel_Volume, 1},
{multiplexer.pin(1), MIDI_CC::Channel_Volume, 2},
{multiplexer.pin(2), MIDI_CC::Channel_Volume, 3},
{multiplexer.pin(3), MIDI_CC::Channel_Volume, 4},
{multiplexer.pin(4), MIDI_CC::Channel_Volume, 5},
{multiplexer.pin(5), MIDI_CC::Channel_Volume, 6},
{multiplexer.pin(6), MIDI_CC::Channel_Volume, 7},
{multiplexer.pin(7), MIDI_CC::Channel_Volume, 8},
{multiplexer.pin(8), MIDI_CC::Channel_Volume, 9},
{multiplexer.pin(9), MIDI_CC::Channel_Volume, 10},
{multiplexer.pin(10), MIDI_CC::Channel_Volume, 11},
{multiplexer.pin(11), MIDI_CC::Channel_Volume, 12}
};
void setup() {}
void loop() {
// Refresh the MIDI controller (check whether the potentiometer's input has changed since last time, if so, send the new value over MIDI)
MIDI_Controller.refresh();
}
Thanks a lot !