-
Notifications
You must be signed in to change notification settings - Fork 304
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
NTS-1 mkII: unit_set_param_value() calls after unit_init() and before the first call of unit_render() destroy the parameter values #106
Comments
After factory reset and install I see all Once a param has been set by the user and the unit is reloaded then I get the values the user set, this also works after a power cycle. So we are in a bit of a bind, how do we know we have just been installed and we are getting incorrect 0 values rather than the actual values set by the user and saved away somewhere? So the bug is really that instead of copying the default values of the params to the storage on install, it is instead just zeroing them. |
So it seems that (1) When the power goes down, NTS-1 mkII keeps only the last state of the user's settings for all the parameters, including the oscillator selection. Since we can set the parameters to their default values in Note: |
I have done some more testing, with two user OSCs: First param A and Param B always get sent the same value as the encoders are set to. The other 8 values do seem to be saved independently for each osc: So for the following examples I have set up both Sup1 and Sup2 with some values, when I switch between them: For Sup1 I get:
For Sup2 I get:
So good stuff there at least. Now when I turn it off with Sup2 selected, and turn back on I get:
So that's good again, if I now select Sup1 though it is all 0:
So I'm guessing that it can store multiple oscs params somewhere in ram, you can change between oscs and you get the right params. When you power cycle it though, only the last selected OSC gets it saved params, the others get zeros! |
So all in all, is it working as intended:
|
Nope, I think it is buggy as hell!
So when the unit is turned on, they either need to load its params properly, or use the default values set in the params. Not just set everything to 0! |
Actually, looking at my old drumlogue code it looks like they don't set the params from the defaults as I found code doing it in my Init()! So I guess the only way around the zeros at the moment is as @boochow says, just ignore the initial set of params being sent. |
So, this hack code seems to work. If "valid" parameters are found (at least one not 0) then it updates the real params, otherwise it thows them away so the ones set in init() don't get overridden.
Less readable but maybe better:
If the number of params !=10 probably needs adjusting. |
Drumlogue has an option to recall the program - on that action the parameter values are restored.Prette the same mk2 should restore the values for the last oscillator on power on as it is expected to produce the same sound it was last used. |
There is another issue. If your unit is the last in the list and the user turns the TYPE encoder to select the next one that doesn't exist unit_set_param_value() is called for every param with a value of 0! Init() is not called so we can't even attempt to catch and mend this one. |
OK, another hack that "fixes" both issues with the zeros:
|
And another issue: The Korg librarian when receiving "programs" from the NTS1 doesn't call So if the NTS1 called |
I tested firmware v1.2 and can confirm that this issue has been fixed. |
A series of
unit_set_param_value()
calls occur just afterunit_init()
and before the first call ofunit_render()
have wrong parameter values(zero in most cases.) and they eventually destroy parameter values initialized inunit_init()
.The parameter values of these
unit_set_param_value()
calls don't fit the value ranges defined inheader.c
and should be removed.As a workaround, I use a flag variable to indicate whether the first call of
unit_render()
has occurred and ignore allunit_set_param_value()
calls before the first call ofunit_render()
.The text was updated successfully, but these errors were encountered: