Banks not working?
dchstudios opened this issue · comments
For some reason, I can't get any functionality out of trying to implement Banks. I have a bunch of different boards I have tried, mostly ESP32 variants, since my goal is to create a Bluetooth/Wireless DAW controller for Record/Rewind/Play type of Mackie Control ability.
I get the Control Surface to work on other aspects, like general buttons and potentiometers no problem. But any attempt at trying say the IncrementDecrementSelector function, I do not get any change in the button/hardware MIDI signals.
For example, this simple code:
// board being used in this example: Adafruit Feather Huzzah32 ESP32
#include <Control_Surface.h> // Include the Control Surface library
// Instantiate a MIDI over USB interface
// USBMIDI_Interface midi;
// BluetoothMIDI_Interface midi; // will be my in final code to use Bluetooth for an ESP32 board
HairlessMIDI_Interface midi;
// ------------------------------- Bank setup ------------------------------- //
// ========================================================================== //
/*
Create a bank and a bank selector to change its setting.
*/
Bank<4> bank(1); // create a new bank with two tracks per bank
// │ └───── number of tracks per bank
// └───────────── number of banks
// Instantiate a Bank selector to control which one of the four Banks is active.
IncrementDecrementSelector<4> bankselector = {
bank, // Bank to manage
{14, 32}, // push button pins (increment, decrement)
Wrap::Wrap, // Wrap around
};
// -------------------------- MIDI Input Elements --------------------------- //
// ========================================================================== //
/*
Define all elements that listen for MIDI messages.
*/
// Rec Ready 1
Bankable::NoteButton rec1 = {
{bank, BankType::CHANGE_ADDRESS},
15,
{MCU::REC_RDY_1},
};
void setup() {
RelativeCCSender::setMode(MACKIE_CONTROL_RELATIVE);
Control_Surface.begin(); // Initialize Control Surface
}
void loop() {
Control_Surface.loop(); // Update the Control Surface
}
and I will be able to see the button on pin 15 I'm using give serial MIDI signals like
Serial In: Ch1 Note 0 off velocity 127
Serial In: Ch1 Note 0 on velocity 127
but when pressing the buttons for increment and decrement, I will get no change in the above midi data. There is no MIDI signal that is sent through when I press the Increment and Decrement buttons either, though I don't know if there is supposed to be?
I'm using Arduino 2.0.4 on a Windows 11, latest Control Surface Main.
(and to note: the button/pins I'm using 14/32 for the increment/decrement, work as any other kind of Control Surface Button like NoteButton, so it's not wiring.)
boards I've tried:
- Adafruit Feather Huzzah32 ESP32
- Esp32 Node2S DevV1
- Adafruit QtPy RP2040
- Adafruit Feather RP2040
- Adafruit QtPy C3
- Adafruit Feather S3
- Raspberry Pi Pico
- Unexpected Maker Feather S3
- Unexpected Maker Tiny S3
- Unexpected Maker TinyPico
- Teensy 4.1
OK thanks for ANY help!!! (I've been on off tackling this issue for months)
- Dave
I think I solved it... Wiring issue on my buttons I was using for the Increment/Decrement Selector (newb error)... And now the code works with Banks as intended on my Adafruit Qt Py S3