Commit Graph

128 Commits

Author SHA1 Message Date
Dale Whinham
bb8f14f762 Use zone allocator system-wide
Apply a patch to Circle to replace the default heap allocator with the
zone allocator.

Now system allocations, memory obtained through malloc()/new and
FluidSynth all share the same allocator and we no longer have to reserve
an arbitrary fixed-size block for malloc()/new.
2021-10-28 17:11:42 +01:00
Dale Whinham
4d5bda5dfd Fix disconnection message for Ethernet 2021-10-28 17:11:14 +01:00
Dale Whinham
fc98e0a198 Minor cleanups in control classes 2021-08-14 16:30:25 +01:00
Dale Whinham
4e0d7d06e5 Add ability to reverse MT-32 stereo channels 2021-08-11 18:18:31 +01:00
Dale Whinham
f958bb8d80 Rework GM/GS/XG SysEx parsing, fix SC-55 text 2021-08-01 21:59:54 +01:00
Dale Whinham
a0ad972cdd Rework MIDI monitor to handle timer wrap
When the 1MHz timer wraps, the MIDI level meters would appear to be
stuck after a while.

Implement some additional state tracking to guard against timer wrap.

Fixes #148.
2021-07-27 00:16:07 +01:00
Dale Whinham
9a81bea4a5 Change default usb_serial_baud_rate value to 38400 2021-07-26 15:22:01 +01:00
Dale Whinham
0c433f3d42 Minor cleanups in utility 2021-06-26 17:03:01 +01:00
Dale Whinham
1b3b59a7e0 Add support for MIDI input via USB serial device 2021-06-26 00:00:46 +01:00
Dale Whinham
d30203ab54 Enable boot splash logo for graphical displays 2021-06-26 00:00:46 +01:00
Dale Whinham
11034a013a Add immediate image drawing 2021-06-26 00:00:46 +01:00
Dale Whinham
34fb0d5555 Add mt32-pi pixel-art logo conversion by Sparkman 2021-06-26 00:00:46 +01:00
Dale Whinham
cb259ef3d2 Re-indent config.def 2021-06-26 00:00:46 +01:00
Dale Whinham
545569f34b Center short messages on LCD 2021-06-25 23:57:13 +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
3d3f2cc6c3 Add basic panic handler 2021-06-25 23:57:13 +01:00
Dale Whinham
01b1e76e41 Add temperature monitoring debug code 2021-06-25 23:57:13 +01:00
Dale Whinham
0394999e84 Replace C++ "new" include with Circle equivalent 2021-06-25 23:57:13 +01:00
Dale Whinham
c7d65a0764 Don't fail when USB controller is not present 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
e9f71d7d76 Add ability to configure FluidSynth effects
This commit introduces the notion of "effects profiles", with
reverb/chorus settings that can be set on a per-SoundFont basis.

The configuration file has been updated with an example of applying a
profile to the GeneralUser GS SoundFont.
2021-06-25 23:57:13 +01:00
Dale Whinham
04e7bc8793 Add convenience logger/config member variables 2021-06-25 23:57:13 +01:00
Dale Whinham
f3c5f51c07 Add basic networking and AppleMIDI support 2021-06-25 23:57:13 +01:00
Dale Whinham
afeacbf1cb Set FluidSynth device ID to Sound Canvas default
This ensures FluidSynth interprets Roland "Use For Rhythm Part" messages
that were previously handled in mt32-pi manually before 7405ae5.
2021-06-25 23:57:13 +01:00
Dale Whinham
e7b5d3d96e Minor cleanups in pisound 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
2415b7b2a1 Add configuration option to reverse rotary encoder
Closes #104.
2021-06-25 23:57:13 +01:00
Dale Whinham
c64c3ba914 Move "usb" config option to the system section
We now support more than just USB MIDI devices, so it no longer makes
sense to keep this in the MIDI section.
2021-03-19 23:53:26 +00:00
Dale Whinham
3024c23953 Add ability to set mt32emu gain values 2021-03-19 23:53:26 +00:00
Dale Whinham
aa30752d74 Add support for loading MT-32 ROMs from USB disks 2021-03-19 23:53:26 +00:00
Dale Whinham
28390abbea Add support for loading SoundFonts from USB disks 2021-03-19 23:53:26 +00:00
Dale Whinham
8594ea5dc9 Add switch timeout config option 2021-03-19 23:53:26 +00:00
Dale Whinham
c49b22f613 Replace part level code with rect drawing function 2021-03-19 23:53:26 +00:00
Dale Whinham
96dc570fd5 Update ARM toolchains to 10.2-2020.11 2021-03-19 23:53:26 +00:00
Dale Whinham
a93300f3c1 Show SoundFont name when switching with button 2021-02-06 15:34:41 +00:00
Dale Whinham
47a5630254 Add rotary encoder acceleration curve 2021-02-03 05:06:40 +00:00
Dale Whinham
22dc67e540 Add support for SH1106 OLED displays 2021-02-03 05:06:40 +00:00
Dale Whinham
126d04f2dc Minor cleanups in ssd1306 2021-02-03 05:06:40 +00:00
Dale Whinham
7cab781fa6 Move HD44780 pin definitions to .cpp file 2021-02-03 05:06:40 +00:00
Dale Whinham
2280a5a581 Enable USB plug and play support
Closes #36.
2021-02-03 05:06:40 +00:00
Dale Whinham
59cf085d1c Update copyright notices 2021-02-03 05:06:40 +00:00
Dale Whinham
a6c7d4bd10 Fix MT-32 ROM switching by button when set missing 2021-01-16 20:40:36 +00:00
Dale Whinham
d4e4ffcbb8 Implement GS "Use For Rhythm Part" SysEx 2021-01-16 20:40:36 +00:00
Dale Whinham
27042a1261 Reset FluidSynth on GM/GS reset SysEx
Closes #54.
2021-01-16 20:40:01 +00:00
Dale Whinham
2f19528de9 Refactor Roland SysEx headers 2021-01-16 20:31:31 +00:00
Dale Whinham
248d4e95e1 Fix backlight switching for I2C HD44780 LCDs 2021-01-04 00:28:48 +00:00
Dale Whinham
46a59f8de6 Fix part level rendering issues with HD44780
This fixes missing bar segments, missing bar bases, and "glitchy"
rendering of the part level meters when using a character LCD.
2021-01-04 00:28:48 +00:00
Dale Whinham
5d39db9682 Switch FluidSynth to use a custom memory allocator
Add a Doom-style "zone" memory allocator that can be used instead of
malloc()/realloc()/free() for FluidSynth.

This removes the need to reconfigure the Circle heap and could reduce
fragmentation caused by repeated loading/unloading of SoundFonts.
2021-01-02 22:42:17 +00:00
Dale Whinham
bc13fadcd7 Switch SoundFonts by destroying/recreating synth
Work around the lack of a lazy unload timer by avoiding use of
fluid_synth_sfunload() and instead simply recreating the synth instance
when switching to a new SoundFont.
2021-01-02 22:41:23 +00:00
Dale Whinham
8fd2fdf270 Display MiSTer logo when MiSTer is detected 2020-12-20 20:42:19 +00:00