Replies: 2 comments 3 replies
-
Please post your code and a picture of the wiring. |
Beta Was this translation helpful? Give feedback.
-
The wires you have are quite long, so their capacitance is much higher than usual, and they might be picking up a lot of noise. You should definitely use stronger pull-up resistors than the built-in ones. You could also try increasing the line select delay: Control-Surface/src/AH/Settings/Settings.hpp Lines 78 to 81 in d16582d Then also enable this delay for AVR here: Control-Surface/src/AH/Hardware/ButtonMatrix.ipp Lines 25 to 27 in d16582d (i.e. remove the |
Beta Was this translation helpful? Give feedback.
-
Using the NoteButtonMatrix.ino example file on Arduino Uno and Mega, I am getting many random notes playing for a fraction of a second constantly. I had modified the code for the numbers of rows and columns and the notes i needed and get the same result. It only plays the notes that are written in the code. Here are screenshots of the midi data being sent. Can someone help me fix this issue? Keep in mind I am a beginner when it comes to coding and Arduino.


Update 1: Here is the slightly modifed example code to meet my needs. I have tried different pins on the arduino mega with no change. My project is to MIDIfy a 32 note organ pedalboard. Pictured is the orginal reed switches with diodes in a 6 x 7 matrix array, fully working. With this current setup, I can play each note by holding a magnet to each sensor and the correct note plays when the magnet is near and turns off as the magnet is removed. I am not using MIDI over the usb cable. I have never gotten that to work with other Control Surface code. Instead I built my own MIDI I/O interface for the arduino based on the schematics from notesandvolts.com, pictured below. I have gotten my MIDI interface to work with other Control Surface code with no extraneous notes. The switches for the pedalboard function perfectly with this code. The only problem is the constant, very short, multiple midi notes per second. I have to have a MIDI port for the pedalboard to plug into my organ.
`#include <Control_Surface.h>
USBMIDI_Interface midi;
// The note numbers corresponding to the buttons in the matrix
const AddressMatrix<7, 6> addresses {{
{0, 0, 0, 0, 0, 24},
{39, 40, 37, 38, 41, 42},
{45, 46, 43, 44, 47, 48},
{51, 52, 49, 50, 53, 54},
{0, 0, 55, 0, 0, 0},
{27, 28, 25, 26, 29, 30},
{33, 34, 31, 32, 35, 36},
}};
NoteButtonMatrix<7, 6> buttonmatrix {
{29, 37, 41, 43, 45, 47, 49}, // row pins
{53, 51, 39, 35, 33, 31}, // column pins
addresses, // address matrix
Channel_1, // channel and cable number
};
void setup() {
Control_Surface.begin();
}
void loop() {
Control_Surface.loop();
}`
Beta Was this translation helpful? Give feedback.
All reactions