Replies: 3 comments 7 replies
-
Could you link to an example of this? When you call (*) You can find the implementation of Control-Surface/src/Control_Surface/Control_Surface_Class.cpp Lines 22 to 45 in 39182bb As you can see, it initializes all Extended IO elements (like multiplexers and shift registers), all MIDI interfaces, all MIDI outputs, all displays, all MIDI Input Elements, and all generic Updatables (which includes all MIDI Output Elements, including There are cases in which you don't need all of that, for example, when you just use a single MIDI interface and no MIDI Output Elements, you can just initialize and update the MIDI interface directly, without going through In conclusion, if you create all your NoteButtons, MIDI interfaces, and other objects up front, you can rely on the |
Beta Was this translation helpful? Give feedback.
-
Hi! Thanks for the comprehensive answer. My confusion it seems has been with exactly what you describe as being done globally (so to speak) from Control_Surface.begin() and Control_Surface.update() as against specific directly from beginning and enabling objects. I'm still fairly new to all this so just working with note buttons right now. #include <Control_Surface.h>
USBMIDI_Interface midi;
void setup() {
Control_Surface.begin();
}
// Instantiate a Transposer that can transpose from one octave down to one
// octave up
Transposer<-12, +12> transposer;
// Instantiate a Selector to change the transposition
IncrementDecrementSelector<transposer.getNumberOfBanks()> selector {
transposer,
{12, 13},
Wrap::Clamp,
};
//velocity
const uint8_t velocity = 0x7F;
// Instantiate an array of NoteButton objects
Bankable::NoteButton buttons[] {
{transposer, 0, MIDI_Notes::C(4)},
{transposer, 1, MIDI_Notes::Db(4)},
{transposer, 2, MIDI_Notes::D(4)},
{transposer, 3, MIDI_Notes::Eb(4)},
{transposer, 4, MIDI_Notes::E(4)},
{transposer, 5, MIDI_Notes::F_(4)},
{transposer, 6, MIDI_Notes::Gb(4)},
{transposer, 7, MIDI_Notes::G(4)},
{transposer, 8, MIDI_Notes::Ab(4)},
{transposer, 9, MIDI_Notes::A(4)},
{transposer, 10, MIDI_Notes::B(4)},
{transposer, 11, MIDI_Notes::C(5)}
};
/**
CCButton But1 = { 8, 62};
CCButton But2 = { 4, 63};
CCButton But3 = { 5, 64};
CCButton But5 = { 6, 65};
CCButton But6 = { 2, 66};
CCButton But8 = { 3, 67};
CCButton But9 = { 10, 68};
CCButton But10 = { 11, 69};
**/
void loop() {
Control_Surface.update();
} Thanks a ton for the help so far. |
Beta Was this translation helpful? Give feedback.
-
OK Thanks, I'll try a 4067 multiplexer to get all my needed buttons! |
Beta Was this translation helpful? Give feedback.
-
Im new to using this library and I'm attempting building a DIY clone of the Behringer FCB1010 foot controller to control a software looper called Sooperlooper, but only sending note messages from the buttons.
My question is this: Sometimes I see people using the begin() method on NoteButtons to check the state as the NoteButton object uses the built in pull-up resistor, but then I see other code just seems to rely on the USBMidi_Interface update() method.
Can I just declare my objects and their settings and rely on the update() method to check it all? Is it that simple?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions