I am trying to make an Arduino UNO based MIDI controller. I am using loopMIDI and HairlessMIDI to convert the USB serial signals to MIDI signals which are being sent into FL studio. I am trying to set up 5 potentiometers to send MIDI control signals. I am also trying to have an I2C LCD display the values of each pot. There aren't enough analog ports on an Arduino UNO for this so I am using a multiplexer for 4/5 of the pots. I have gotten all of the pots to send the proper output to the serial monitor, but they will not send MIDI signals properly (there is a constant stream of MIDI signals with seemingly random values) and the LCD is having trouble (Freezing until randomly flashing a ton and updating or freezing until the pot that isn't attached to the multiplexer is moved in which case it will update).
My Code is mostly taken from online but I have edited it. If there is any other necessary information I would be happy to provide it.
I am new at this.
Thank You!!
MIDI_Controller_with_multiplexer.ino (21.1 KB)