Skip to content

Conversation

@dessertplanet
Copy link

I've implemented per-bank settings! The hack/trade-off is that when you switch banks, I reboot to reload audioEngine etc gracefully but this happens VERY fast.

This does preclude you from holding reset to switch banks multiple times, one long-press buys one bank switch and new local.txt settings are loaded if and only if settings.txt at the root has local=1.

To sum up:

  • New settings called "local" default is off (existing behaviour).
  • Turn it on and new settings objects (and files) are instantiated for each bank (they are called LOCAL.TXT)
  • with settings.txt -> local=1, switching banks reboots radiomusic to honour the settings for the new bank
  • with local=0, any LOCAL.TXT settings are ignored and SETTINGS.TXT applies everywhere
  • The "local" setting itself is ignored in all LOCAL.TXT settings (it is programmatically hard coded to 1)

THANK YOU for this wonderful instrument and all of your other work!

@TomWhitwell
Copy link
Owner

Hi, thank you for this - it's a really interesting idea - unfortunately I'm not going to merge it because I think that the "holding reset to switch banks multiple times" function is too important.

@dessertplanet
Copy link
Author

Makes perfect sense! Also upon further testing I have noticed it breaks the binary bank display. One possible solution would be to load settings (and reboot) only upon button release? So toggle through a bunch of banks, load the settings of the last one? Let me know if that might work. Otherwise totally get that this is an old project and I have already learned a lot from hacking together some basic changes.

@dessertplanet
Copy link
Author

dessertplanet commented Jul 15, 2024

@TomWhitwell managed to tweak it so that switching banks multiple times works. Only potential issue now is the pop on reset. I seem to get a pop sound whenever the reBoot method is called. Not sure this is avoidable on the hardware, since the same pop happens with no SD when the reset timer runs out. Might be worth testing on your hardware before merging to see if it is worth it. All of this still optional behind the new "local" setting in SETTINGS.TXT of course.

I also have a cleaner branch with consolidated commits if that is preferred!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants