Improve the button handling code so that a pressed and held button will
now generate additional press events after a short delay.
An acceleration curve is also applied so that events are generated with
increasing frequency the longer the button is held down.
Closes#323.
Previously, the LCD code needed to be aware of each synthesizer to know
how to draw their respective displays, which wasn't very maintainable.
Introduce a UI class where generic drawing utility functions and
"system" drawing code can be implemented, and move synth-specific
drawing to the synth classes themselves. This simplifies the LCD/OLED
drivers to just being interfaces to the hardware.
Also introduce a "MIDI monitor" class which tracks the state of all MIDI
activity per-synth for level meter drawing purposes. This ensures we
never miss a note; previously we were simply polling each synth engine
for its note velocities per LCD update, which was prone to missing fast
notes and also didn't account for channel volume or expression pedal.
Finally, enable support for 16-character wide displays (closes#58).
Changes to the velocity scaling logic were also made; mt32lcd now
normalizes the MT-32 part velocity to a floating point number between 0
and 1. The LCD driver can then translate this into a bar pixel height as
required.
Rename enums, functions parameters and class member variables so that
they match the Circle coding style more closely.
Replace /* ... */ comments with // comments.
Fixup some indentation issues/trailing whitespace.
Remove undefined functions and unused #defines.
Reduce code duplication significantly by employing macros and templates
for parsing strings into enums.
Increase efficiency by adding {BEGIN|END}_SECTION markers in config.def
so that we can avoid unnecessary calls to strcmp() with the section name.
The PWM audio device on most Raspberry Pis expects to receive samples in
R-L order rather than L-R.
We use the AreChannelsSwapped() function of Circle to determine the
correct sample order, although this is not really necessary; currently
all of the models of Pi we support will require R-L sample order.