-
Hello, I'm building a Midi Controller and want to have the function to change the Midi Channel by a buttonpress for all Potentiometers. I'm quite new to everything Arduino related but I got it to work with my own code. Now I want to use the code by Notes and Volts because it is quite easy to setup a lot of potentiometer without any problems. But now I'm not sure how to implement the fuction for changing the Midi Channel. Can somebody please help me? Thank you in advance! Thats the code I want to build my controller on: `#include <MIDI.h> /************************************************************* by Notes and Volts Version 1.2 Arduino UNO ONLY! MIDI_CREATE_DEFAULT_INSTANCE(); //************************************************************ //ANY MULTIPLEXERS? (74HC4067)********************************* //Mux M1(10, 16, false); //Digital multiplexer on Arduino pin 10 //DEFINE DIRECTLY CONNECTED POTENTIOMETERS********************* //Pot PO1(A0, 0, 1, 1); //DEFINE DIRECTLY CONNECTED BUTTONS**************************** //Button BU1(2, 0, 60, 1, 5 ); //DEFINE BUTTONS CONNECTED TO MULTIPLEXER********************** //Button MBU1(M1, 0, 0, 70, 1, 5); //******************************************************************* //DEFINE POTENTIOMETERS CONNECTED TO MULTIPLEXER**************** //Pot MPO1(M2, 0, 0, 1, 1); void setup() { void loop() { //***************************************************************** // Cycle through Button array
} // Cycle through Mux Button array
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
While there is a built-in concept of an input channel (to simplify filtering out what your device is listening to), there is no equivalent for sent messages. You can keep a global variable that represents the output channel, and use two buttons to increment/decrement its value. This value would then be used when calling For persistance, you could store this value in the Arduino's EEPROM memory, and load it at setup time. |
Beta Was this translation helpful? Give feedback.
While there is a built-in concept of an input channel (to simplify filtering out what your device is listening to), there is no equivalent for sent messages.
You can keep a global variable that represents the output channel, and use two buttons to increment/decrement its value. This value would then be used when calling
MIDI.sendXYZ
functions.For persistance, you could store this value in the Arduino's EEPROM memory, and load it at setup time.