It finally all works again! Now I can finally talk about it again. Here's what the UI looks like right now:
The note mapping system has received a complete overhaul. Previously, instruments were hardcoded, no channel could be mapped to multiple instruments, and there was no way to make use of that fancy frequency-volume graph I generated.
All that is no longer an issue with the new system!
Yes, instruments, their COM ports and their channels are no longer hardcoded and can be edited. There's also support for multiple of the same controller, so if you happen to own 5 3D printers, you can use all of them. Would you need to worry about assigning notes between all those different devices?
Nope, because the new system no longer worries about the physical device when mapping notes, only "channels". Channel groups can be defined (no limit on how many you make) which automatically assigns notes to the first available channel in that group. For the frequency graph example, you could create a map group called "low note drives" that has a list of all floppy drive channels in order of which they best play low notes, and assign all channels that play mostly low notes to those drives.
But what if channels don't seperate low notes and high notes?
No worries, the new MIDI Manipulation system fix that! You can now delete, move or copy notes to a different channel that meet certain criteria, for example, note values under 51 (the ones that play well on the "low note drives") can automatically be moved over to an unused channel, and that channel can then be mapped to the low note drives. No having to manually move them over with a MIDI editor! The manipulation system is simple yet powerful, and allows for multiple operations across different channels which can be stacked on top of each other and re-ordered. None of these changes are permanent, and are re-applied every time the "Reload" button is pressed to refresh the mappings.
Percussion mapping is finally done properly too. Previously, percussion mappings were hardcoded, but for some songs I would want to map different MIDI drums to different physical drums (in my case, HDDs). Now you can actually choose the mappings in the program on a per-songconfig basis (as with every setting on screen).
With everything being newly implemented, there's probably some hidden bugs, but it all seems to be mostly working so far. The only major thing broken right now is part of the visualisation I use in my videos, specifically the drive status LEDs on the bottom. This is because those LEDs are still hard coded and therefore don't work with the runtime generated instrument channel mappings. I'm still trying to think of a good way to dymamically make those work. Perhaps a csv spreadsheet where you put the channel codes in for each LED...