Hello Guys,
I'm an equipment designer and I created this MIDI Keyboard
I made it depending on Arduino UNO chip and 2 CD74HC4067 multiplexers for a total of 32 buttons and I added 3 analog inputs for the two wheels and the foot pedal
I'm facing a problem with the code as many things aren't functioning as expected ..
I want to program the left potentiometer to be a pitch wheel and work just fine as the Modulation Wheel and the octave buttons and the ( Record - Play - Stop ) Buttons on the device and I want the left two buttons to switch between instruments and the UNO to be recognized as a midi controller
Here's the device
and here's the code
#include <Control_Surface.h>
USBMIDI_Interface midi;
CD74HC4067 M1 = { 6, {5, 4, 3, 2} };
CD74HC4067 M2 = { 7, {5, 4, 3, 2} };
NoteButton buttons[] = {
{ M1.pin(0), {48, CHANNEL_1} },
{ M1.pin(1), {49, CHANNEL_1} },
{ M1.pin(2), {50, CHANNEL_1} },
{ M1.pin(3), {51, CHANNEL_1} },
{ M1.pin(4), {52, CHANNEL_1} },
{ M1.pin(5), {53, CHANNEL_1} },
{ M1.pin(6), {54, CHANNEL_1} },
{ M1.pin(7), {55, CHANNEL_1} },
{ M1.pin(8), {56, CHANNEL_1} },
{ M1.pin(9), {57, CHANNEL_1} },
{ M1.pin(10), {58, CHANNEL_1} },
{ M1.pin(11), {59, CHANNEL_1} },
{ M1.pin(12), {60, CHANNEL_1} },
{ M1.pin(13), {61, CHANNEL_1} },
{ M1.pin(14), {62, CHANNEL_1} },
{ M1.pin(15), {63, CHANNEL_1} },
{ M2.pin(0), {64, CHANNEL_1} },
{ M2.pin(1), {65, CHANNEL_1} },
{ M2.pin(2), {66, CHANNEL_1} },
{ M2.pin(3), {67, CHANNEL_1} },
{ M2.pin(4), {68, CHANNEL_1} },
{ M2.pin(5), {69, CHANNEL_1} },
{ M2.pin(6), {70, CHANNEL_1} },
{ M2.pin(7), {71, CHANNEL_1} },
{ M2.pin(8), {72, CHANNEL_1} },
};
CCPotentiometer Potentiometers[] = {
{ A0, {MIDI_CC::Modulation_Wheel , CHANNEL_1} }, //Wheel 1
{ A1, {MIDI_CC::Breath_Controller , CHANNEL_1} }, //Wheel 2
{ A2, {MIDI_CC::Foot_Controller , CHANNEL_1} }, //PEDAL
};
CCButton Buttons[] = {
{ M2.pin(9), {MIDI_CC::General_Purpose_Controller_2, CHANNEL_1} },
{ M2.pin(10), {MIDI_CC::General_Purpose_Controller_3, CHANNEL_1} },
{ M2.pin(11), {MIDI_CC::General_Purpose_Controller_4, CHANNEL_1} },
{ M2.pin(12), {MIDI_CC::General_Purpose_Controller_5, CHANNEL_1} },
{ M2.pin(13), {MIDI_CC::General_Purpose_Controller_6, CHANNEL_1} },
{ M2.pin(14), {MIDI_CC::General_Purpose_Controller_7, CHANNEL_1} },
{ M2.pin(15), {MIDI_CC::General_Purpose_Controller_8, CHANNEL_1} },
};
void setup() {
Control_Surface.begin();
}
void loop() {
Control_Surface.loop();
}
This is one of the most important pieces in my studio and I need to get it done right
thanks In Advance.