Open boochow opened 4 years ago
@boochow -- I think it's reasonable that OSC_PARAM is being called upon initialization of the oscillator program. If your oscillator program is used as part of a preset on the prologue or minilogue xd, OSC_PARAM is likely the way that the correct parameter values get set when that preset is recalled.
There are bugs related to this behavior though, particularly with bipolar parameters. Please see my bug #36 .
@h2g2guy thank you for your comment! I agree with you that OSC_PARAM should set the parameters to the appropriate value when a preset program is loaded. It is a completely reasonable behavior.
My point is that I want to define initial values of parameters for NTS1, which is not able to have any preset programs. Currently, the SDK always sets all parameters for their minimum values. I also think that maybe the initial-value feature would be useful for Prologue/Minilouge xd because it could give default parameter values for a new patch.
Describe the bug (It may not be a bug but an issue of API specification. Anyway, I report this because someone might come into the same issue or have some solution for this issue.
I set a global variable to a non-zero value in
OSC_INIT()
. The variable also can be modified fromOSC_PARAM()
. At the firstOSC_CYCLE()
call, the variable is always zero. If I remove the lines modifying the variable fromOSC_PARAM()
, the issue would disappear. I think this is becauseOSC_PARAM()
is invoked with all parameters are zero' ed, afterOSC_INIT()
and before the firstOSC_CYCLE()
call,So, how can I initialize parameters in
OSC_INIT()
with keeping it modifiable fromOSC_PARAM()
?To Reproduce
Expected behavior
OSC_PARAM()
initializes all parameters to "initial values," which should be specified in the manifest file.Desktop (please complete the following information):