When writing code for a MIDI Control Surface, you'll likely come across the Control_Surface singleton. The program structure usually looks something like this:
The Control_Surface singleton is responsible for the following important tasks:
Control Surface keeps track of elements that inherit from the UpdatableCRTP base class. Specifically, it keeps a list of all ExtendedIOElements, MIDI_Interfaces, MIDI Output Elements, MIDI Input Elements and Display Elements. If you have certain elements that should not be initialized or updated by Control Surface, you can call disable() before calling Control_Surface.begin(). It is then your responsibility to call the begin() and update() functions whenever appropriate. You can also enable these disabled elements again using enable().