Closed skizzzzz closed 6 years ago
Yes, it should be possible.
What exactly did you try? Please post your complete code and schematic.
Great ! I will take the time this week to explain it to you clearly! ( i'm discovering fritzing..).
Here it is
So I use an arduino 'pro micro' which emulate a leonardo. (on my schema it's a micro..)
I tried differents pins of the arduino to connect my multiplexer like A3, '5' etc...
and tried several things like this code
#include <MIDI_Controller.h> // Include the library
const uint8_t velocity = 0b1111111; // Maximum velocity (0b1111111 = 0x7F = 127)
const uint8_t C4 = 60; // Note number 60 is defined as middle C in the MIDI specification
// Create an instance of 'AnalogMultiplex' with the output pin of the multiplexer connected to
// analog input pin A0 and the address pins connected to pins 2, 3 and 4.
AnalogMultiplex multiplexer(5, { 2, 3, 4 } );
// Create 8 new instances of the class 'Analog', on the 8 pins of the multiplexer,
// that send MIDI messages with controller 7 (channel volume) on channels 1 - 8
Digital button(multiplexer.pin(0), C4, 1, velocity);
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();
}
Woow. It works really well now. What a quick update. THANK YOU !
Hello,
first off all thanks for this wonderful libary! I'im a noob in programming and this helps a lot!!!
I was wondering if we can simply use multiplexer with buttons..?
I'm trying to modify the exemple: Ex.12.AnalogMultiplex
to make it work with buttons...without success.
Is it possible?
Thanks