Commit Graph

17 Commits

Author SHA1 Message Date
Dale Whinham
71fa6533af Implement volume button hold/repeat with delay
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.
2023-02-06 20:36:10 +00:00
Dale Whinham
f1eaf2f43c Update copyright notices 2023-02-02 13:32:48 +00:00
Dale Whinham
07004eac54 Update copyright notices 2022-01-06 17:35:40 +00:00
Dale Whinham
2601c58590 Remove array size from QSort template 2021-12-05 22:58:43 +00:00
Dale Whinham
0c433f3d42 Minor cleanups in utility 2021-06-26 17:03:01 +01:00
Dale Whinham
484dacd42f Major refactor of all LCD-related code
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).
2021-06-25 23:57:13 +01:00
Dale Whinham
45cfd37745 Minor cleanups in utility 2021-06-25 23:57:13 +01:00
Dale Whinham
9c2e168379 Add support for HDMI audio 2021-06-25 23:57:13 +01:00
Dale Whinham
59cf085d1c Update copyright notices 2021-02-03 05:06:40 +00:00
Dale Whinham
ea8f2b7164 Add support for SC-55 "graphics" SysEx messages 2020-12-19 16:46:57 +00:00
Dale Whinham
d11fd8bbe7 Refactor USB MIDI Rx code, add ring buffer class 2020-12-05 16:22:59 +00:00
Dale Whinham
0068cf648d Add templated Quicksort algorithm 2020-11-22 23:16:44 +00:00
Dale Whinham
f5cc7a1b24 Minor cleanups in utility.h 2020-11-22 23:16:44 +00:00
Dale Whinham
e7a8a70fe1 Add support for 64 pixel high SSD1306 displays
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.
2020-11-08 18:24:32 +00:00
Dale Whinham
8ba9c8a06a General code cleanup
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.
2020-10-04 23:28:40 +01:00
Dale Whinham
3ddd9ac7ca Refactor config file parser
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.
2020-10-04 23:28:40 +01:00
Dale Whinham
03bbdf57bb Fix inverted channels on PWM output
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.
2020-09-23 21:42:01 +01:00