qiemem / eurorack

Firmware customization for Mutable Instruments' Eurorack Modules.
101 stars 18 forks source link

Upside down Stages #46

Closed james-everitt closed 8 months ago

james-everitt commented 2 years ago

Reversed pin definitions to run Stages upside down

qiemem commented 2 years ago

Awesome, thank you so much for your contribution!

I'll play around with figuring out how to make this configurable so we don't need to do multiple builds. My plan is to make it like colorblind mode; hold button on startup to activate, and then that setting will be saved. I have a feeling that I'll have to move the functionality out of the driver for that to work safely (maybe something like this). Your approach here definitely has some advantages though: actually flips everything at a basic level no matter what other hacky stuff is going on the in the firmware and 0 performance impact.

Let me know if you'd like to take a shot at any of this. If not, no worries, I can do it when I wrap up what I'm working on.

The UI changes would look pretty much exactly like the colorblind changes here: https://github.com/qiemem/eurorack/blob/bipolar/stages/ui.cc#L76. The setting would have to go here so has not to mess up people's saved settings on update: https://github.com/qiemem/eurorack/blob/bipolar/stages/settings.h#L80.

Moving functionality to out of the driver would involve reading from settings_ and flipping things as described by Émilie, though it doesn't look like she posted the code for flipping the slider values (which would have to happen in cv_reader). Alternatively, template parameters could be added to the various drivers' Inits to pick which configuration to use, though I'm a little nervous about messing with driver initialization.

Anyway, feel free to mess around with any of it if you're feeling up to it, but no worries otherwise.

qiemem commented 8 months ago

This is now merged via 0cfa06ee1937cccbd507726b06365f3e701f2cd1. Sorry that took so long! TBH I had been feeling somewhat ambivalent about doing this via driver changes, but after trying several different implementations myself, this was far and away the best. I added a preprocessor to enable, so you build in normal mode as usual and build in flipped mode with make -f stages/makefile FLIPPED=true wav. The resulting wav file will end up in build/stages-flipped/stages-flipped.wav.

Thank you again! This turned out way better than my attempts...