ArrayArrayArrayArrayArrayArrayArray
BrainModularBrainModular Users Forum2017-11-02T14:00:32+02:00https://brainmodular.org/forums/app.php/feed/topic/59402017-11-02T14:00:32+02:002017-11-02T14:00:32+02:00https://brainmodular.org/forums/viewtopic.php?t=5940&p=38391#p38391 So initialization must be done in the Init procedure, not in callbacks.
I might be way off, but just was interested in reading this. So essentially instead of initializing all to the specified values, it's just ignored and accepted because it "hasn't changed" by Usine's interpretation?
It just reminded me of a project I did with Auto-Stretch samplers, where I would dynamically update, or add more devices to busses, but the value hadn't changed...so even though I re-initialized a brand-new device on the same bus.... it still wouldn't resend or update my new device....until I forced it to.
If so I would say, there are several places in Usine I've seen those types of behaviors that confused me too.
-s
You are on the right track. On module startup any parameter value should be seen as changed "from undefined" to some other value, and thus sent to onCallback(). This is vital as its the only way to get parameters initialised when a module starts up. I suppose you could poll all parameters after the module is initialised, but it's hard to know when the module as finished initialising.There is "onInitModule()", but not "afterInitModule()" for example.
Statistics: Posted by sm_jamieson — 02 Nov 2017, 12:43
]]>2017-11-02T13:36:17+02:002017-11-02T13:36:17+02:00https://brainmodular.org/forums/viewtopic.php?t=5940&p=38389#p38389Some modules do not use the Callback, but poll the parameter values - these would not be affected.
Perhaps senso can check Usine to make sure that it calls the onCallback() routine for parameters of value zero when the module is initialised.
Statistics: Posted by sm_jamieson — 02 Nov 2017, 12:36
]]>2017-11-02T03:08:12+02:002017-11-02T03:08:12+02:00https://brainmodular.org/forums/viewtopic.php?t=5940&p=38384#p38384Statistics: Posted by 23fx23 — 02 Nov 2017, 02:08
]]>
2017-11-02T02:40:01+02:002017-11-02T02:40:01+02:00https://brainmodular.org/forums/viewtopic.php?t=5940&p=38381#p38381So essentially instead of initializing all to the specified values, it's just ignored and accepted because it "hasn't changed" by Usine's interpretation?
It just reminded me of a project I did with Auto-Stretch samplers, where I would dynamically update, or add more devices to busses, but the value hadn't changed...so even though I re-initialized a brand-new device on the same bus.... it still wouldn't resend or update my new device....until I forced it to.
If so I would say, there are several places in Usine I've seen those types of behaviors that confused me too.
-s
Statistics: Posted by sephult — 02 Nov 2017, 01:40
]]>2017-11-02T00:11:28+02:002017-11-02T00:11:28+02:00https://brainmodular.org/forums/viewtopic.php?t=5940&p=38374#p38374Statistics: Posted by oli_lab — 01 Nov 2017, 23:11
]]>2017-11-01T23:20:27+02:002017-11-01T23:20:27+02:00https://brainmodular.org/forums/viewtopic.php?t=5940&p=38371#p38371 When a workspace is loaded, the stored parameters are sent to the module and picked up using:
// filter only message specific to this user module and type MS_CHANGE if (Message->message == NOTIFY_MSG_USINE_CALLBACK && Message->lParam == MSG_CHANGE) { // WParam contains the Param Number switch (Message->wParam)
etc.
But it the parameter has value zero, no message is sent !
This is not usually noticed as the default value in the C++ class for many parameters is zero. So not getting a callback makes no difference. But I have a user module where the class constructor sets the parameter value to "true", but a switch is connected to the parameter is "off". The module does not get sent any message, which is not correct.
If I set the value to something like 0.00001 then the value is sent.
After loading, all parameters should be sent to the module in the callback, even if their value is zero.
Does this seem like a bug ?
Statistics: Posted by sm_jamieson — 01 Nov 2017, 22:20
]]>BrainModularBrainModular Users Forum2017-11-02T14:00:32+02:00https://brainmodular.org/forums/app.php/feed/topic/59402017-11-02T14:00:32+02:002017-11-02T14:00:32+02:00https://brainmodular.org/forums/viewtopic.php?t=5940&p=38391#p38391 So initialization must be done in the Init procedure, not in callbacks.
I might be way off, but just was interested in reading this. So essentially instead of initializing all to the specified values, it's just ignored and accepted because it "hasn't changed" by Usine's interpretation?
It just reminded me of a project I did with Auto-Stretch samplers, where I would dynamically update, or add more devices to busses, but the value hadn't changed...so even though I re-initialized a brand-new device on the same bus.... it still wouldn't resend or update my new device....until I forced it to.
If so I would say, there are several places in Usine I've seen those types of behaviors that confused me too.
-s
You are on the right track. On module startup any parameter value should be seen as changed "from undefined" to some other value, and thus sent to onCallback(). This is vital as its the only way to get parameters initialised when a module starts up. I suppose you could poll all parameters after the module is initialised, but it's hard to know when the module as finished initialising.There is "onInitModule()", but not "afterInitModule()" for example.
Statistics: Posted by sm_jamieson — 02 Nov 2017, 12:43
]]>2017-11-02T13:36:17+02:002017-11-02T13:36:17+02:00https://brainmodular.org/forums/viewtopic.php?t=5940&p=38389#p38389Some modules do not use the Callback, but poll the parameter values - these would not be affected.
Perhaps senso can check Usine to make sure that it calls the onCallback() routine for parameters of value zero when the module is initialised.
Statistics: Posted by sm_jamieson — 02 Nov 2017, 12:36
]]>2017-11-02T03:08:12+02:002017-11-02T03:08:12+02:00https://brainmodular.org/forums/viewtopic.php?t=5940&p=38384#p38384Statistics: Posted by 23fx23 — 02 Nov 2017, 02:08
]]>2017-11-02T02:40:01+02:002017-11-02T02:40:01+02:00https://brainmodular.org/forums/viewtopic.php?t=5940&p=38381#p38381So essentially instead of initializing all to the specified values, it's just ignored and accepted because it "hasn't changed" by Usine's interpretation?
It just reminded me of a project I did with Auto-Stretch samplers, where I would dynamically update, or add more devices to busses, but the value hadn't changed...so even though I re-initialized a brand-new device on the same bus.... it still wouldn't resend or update my new device....until I forced it to.
If so I would say, there are several places in Usine I've seen those types of behaviors that confused me too.
-s
Statistics: Posted by sephult — 02 Nov 2017, 01:40
]]>2017-11-02T00:11:28+02:002017-11-02T00:11:28+02:00https://brainmodular.org/forums/viewtopic.php?t=5940&p=38374#p38374Statistics: Posted by oli_lab — 01 Nov 2017, 23:11
]]>2017-11-01T23:20:27+02:002017-11-01T23:20:27+02:00https://brainmodular.org/forums/viewtopic.php?t=5940&p=38371#p38371 When a workspace is loaded, the stored parameters are sent to the module and picked up using:
// filter only message specific to this user module and type MS_CHANGE if (Message->message == NOTIFY_MSG_USINE_CALLBACK && Message->lParam == MSG_CHANGE) { // WParam contains the Param Number switch (Message->wParam)
etc.
But it the parameter has value zero, no message is sent !
This is not usually noticed as the default value in the C++ class for many parameters is zero. So not getting a callback makes no difference. But I have a user module where the class constructor sets the parameter value to "true", but a switch is connected to the parameter is "off". The module does not get sent any message, which is not correct.
If I set the value to something like 0.00001 then the value is sent.
After loading, all parameters should be sent to the module in the callback, even if their value is zero.
Does this seem like a bug ?
Statistics: Posted by sm_jamieson — 01 Nov 2017, 22:20