Hello,
I use an Arduino micro to run a self made MIDI bass pedal board with individual transposable keys. It has 5 on/off pedals without any velocity functionality and for every pedal there are 2 buttons to decrement/increment the note number.
Additionally there are 2 buttons and 3 potentiometers to give cc changes into my DAW.
The code at the end does it's job very well. Thanks to the members of this forum that helped me last year ![]()
Now i wanna change a specific detail...
Every time while playing one pedal of the board with one foot, when a second pedal is pressed with the other foot and the first pedal is not released yet, the note event of the first pedal is holded as long as the second pedal is released. Independendly of releasing the first pedal.
So in this "overlapping" playing situation it seems that there is no "note off" event created for the first pedal.
The result is that two notes sound together while only holding the second pedal.
I wanna change this!
I hope I could explain this detail in an understandable way...
One circumstance that I could life with could be to turn the code into a monophonic operating module. I don't need polyphonic ability in my bass pedal.
But what do i have to change in my code for that solution?
I'm a really beginner in arduino programming, so please when you have an idea talk to me how you would talk to a 10 year old child ![]()
Sascha
// Pedalboard
// 5 Pedale, die vordefinierte Midi-Noten abspielen, gedrückt: NoteOn, losgelassen: NoteOff
// Jedes der 5 Pedale hat zwei Tranpose-Buttons, wodurch in Halbtonschritten jedes Pedal eingestellt werden kann
// Zusätzlich 3 Potis und 2 Buttons
#include <Control_Surface.h> // Include the Control Surface library
// Instantiate a MIDI over USB interface.
USBMIDI_Interface midi;
// Abfrage der 3 Potis
CCPotentiometer pot1 { A1, {7, CHANNEL_1} }; // Poti 1 am Eingang A1 fungiert als MIDI-Controller 7
CCPotentiometer pot2 { A2, {8, CHANNEL_1} }; // Poti 2 am Eingang A2 fungiert als MIDI-Controller 8
CCPotentiometer pot3 { A3, {9, CHANNEL_1} }; // Poti 3 am Eingang A3 fungiert als MIDI-Controller 9
using namespace MIDI_Notes;
// Array of transposers
Transposer<-12, +12> transposers[7]; // Definition von 7 Buttons
// Array of buttons using these transposers
Bankable::NoteButton buttons[] {
{
transposers[6], // use the 1. transposer for this button
23, // pin 23 mit Button 2 verbunden
note(C, 7), // MIDI address to send to when pressed/released
}, {
transposers[5], // use the 1. transposer for this button
22, // pin 22 mit Button 1 verbunden
note(D, 7), // MIDI address to send to when pressed/released
}, {
transposers[4], // use the 1. transposer for this button
4, // pin connected to the pedal Nr 1
note(C, 3), // MIDI address to send to when pressed/released
}, {
transposers[3], // use the 2. transposer for this button
1, // pin connected to the pedal Nr 2
note(C, 3), // MIDI address to send to when pressed/released
}, {
transposers[2], // Use the 3. transposer for this button
3, // pin connected to the pedal Nr 3
note(C, 3), // MIDI address to send to when pressed/released
}, {
transposers[1], // Use the 4. transposer for this button
14, // pin connected to the pedal Nr 4
note(C, 3), // MIDI address to send to when pressed/released
}, {
transposers[0], // Use the 5. transposer for this button
15, // pin connected to the pedal Nr 5
note(C, 3), // MIDI address to send to when pressed/released
},
};
IncrementDecrementSelector<transposers[0].getNumberOfBanks()> selectors[] {
{
transposers[0], // control the 1. transposer
{5, 6}, // using the switches connected to these pins (pin +, pin -)
Wrap::Clamp,
}, {
transposers[1], // control the 2. transposer
{7, 8}, // using the switches connected to these pins (pin +, pin -)
Wrap::Clamp,
}, {
transposers[2], // control the 3. transposer
{9, 10}, // using the switches connected to these pins (pin +, pin -)
Wrap::Clamp,
}, {
transposers[3], // control the 4. transposer
{11, 12}, // using the switches connected to these pins (pin +, pin -)
Wrap::Clamp,
}, {
transposers[4], // control the 5. transposer
{13, 18}, // using the switches connected to these pins (pin +, pin -)
Wrap::Clamp,
}
};
void setup() {
Control_Surface.begin(); // Initialize Control Surface
}
void loop() {
Control_Surface.loop(); // Update the Control Surface
}