-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save SRAM on exit #46
base: master
Are you sure you want to change the base?
Conversation
Hi, |
#6 specifically references the pitch bug which is resolved by this PR:
Auto-reset was proposed as a workaround. As such, I reasoned that the issue is not relevant in that particular scope anymore. |
This way if the last used Midi used custom tuning you can get the same "out of tune" effect at startup. |
That wouldn't be a bug anymore, no? That's how the module is intended to work, whatever settings you make persist until a reset command is issued. |
The current behavior is not a "bug" either in this sense. It perfectly emulates a unit without battery. |
Right, I suppose auto-reset is a useful option to have. |
I will add configurable behavior once config file support is added, default will be saving and loading data from/to SRAM as real unit with battery will do. Also keep in mind that only SC-55mk1/mk2 have battery, CM-300 and 55st don't have one |
Ah, I need to add a check for that then. |
0201146
to
f4ea1cb
Compare
f4ea1cb
to
d473c20
Compare
This saves the contents of SRAM into a file on exit and loads them on startup to emulate the real module's behavior where SRAM is preserved during power down using a battery.
...granted, I don't know much about how the real SC-55 module works, I just made an educated guess and this code does seem to result in correct behavior. This also avoids the annoying bug carried over from real hardware where the module becomes out of tune if powered up with no battery until you reset it.
Fixes #23, fixes #45.