ArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2013-10-08T22:27:30+02:00 https://brainmodular.org/forums/app.php/feed/topic/4081 2013-10-08T22:27:30+02:00 2013-10-08T22:27:30+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=28035#p28035 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>
Once again Usine shows me that it already knows the answer, I just hadn't figured out the right way to ask the question
good philosophical response that also works for the general life ..:)
Words to live by :)

Also I wanted to show senso that I recognize I may have been somewhat annoying with 'not a bug' reports and feature requests like this. So far its all been a function of not fully 'getting it', whatever 'it' was at the time. Thanks for the help man!

I think I have the logic finally baked to perfection.

And regarding this feature request, I only today found the synchro setting that detaches it from the sound engine 'on/off'. and it is 'on/off' that triggers the 'init', so you can easily have a longer period of "loading" with scripts and modules triggered by 'init' and only turn the synchro on when you want to.

So, feature request: already there! :D

Statistics: Posted by ceasless — 08 Oct 2013, 22:27


]]>
2013-10-07T22:58:06+02:00 2013-10-07T22:58:06+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=28019#p28019 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>
Once again Usine shows me that it already knows the answer, I just hadn't figured out the right way to ask the question
good philosophical response that also works for the general life ..:)

Statistics: Posted by nay-seven — 07 Oct 2013, 22:58


]]>
2013-10-07T22:46:26+02:00 2013-10-07T22:46:26+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=28018#p28018 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>
Either way it's working!

Once again Usine shows me that it already knows the answer, I just hadn't figured out the right way to ask the question :)

Statistics: Posted by ceasless — 07 Oct 2013, 22:46


]]>
2013-10-07T11:29:10+02:00 2013-10-07T11:29:10+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=28011#p28011 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>
I attempted your solution with using an 'init' input and writing a callback. (I also had already moved it down to the 'process' procedure before posting originally, I believe I mentioned it). It still does not solve the issue.

It seems to me that having a difference between the 'init' procedure (which cannot access the data in the flux that are already attached) and something like 'post-init' (which can access and change the flux before the user starts the sound engine) would be useful in more cases than just this example. If it's not too complicated to add, would you consider it?

Statistics: Posted by ceasless — 07 Oct 2013, 11:29


]]>
2013-09-30T22:42:27+02:00 2013-09-30T22:42:27+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27938#p27938 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]> Statistics: Posted by ceasless — 30 Sep 2013, 22:42


]]>
2013-09-30T10:42:59+02:00 2013-09-30T10:42:59+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27932#p27932 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>
What I need is to get the parameter value (and set the array outs to the right values) before the play button is pressed.

Statistics: Posted by ceasless — 30 Sep 2013, 10:42


]]>
2013-09-29T19:26:27+02:00 2013-09-29T19:26:27+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27925#p27925 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]> try to change your code location, like in the callback, in the process.

also you can add an inlet "start init" which can be connected to an "on activation" module?

Statistics: Posted by senso — 29 Sep 2013, 19:26


]]>
2013-09-29T16:34:55+02:00 2013-09-29T16:34:55+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27920#p27920 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]> Statistics: Posted by ceasless — 29 Sep 2013, 16:34


]]>
2013-09-24T18:28:33+02:00 2013-09-24T18:28:33+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27870#p27870 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>

CODE:

if firstTime &#58;= 0
is an assignment (":=") not a comparison ("=").

Statistics: Posted by ynohtna — 24 Sep 2013, 18:28


]]>
2013-09-23T11:02:18+02:00 2013-09-23T11:02:18+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27850#p27850 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>

CODE:

      if firstTime &#58;= 0      then begin        writeln&#40;'interesting'&#41;;        for i&#58;=0 to IOs-1        do begin          p &#58;= &#40;&#40;prev-1&#41; * IOs&#41; + i;           setLength&#40;stepOut&#91;i&#93;,STEPs&#41;;          for s&#58;=0 to STEPs-1          do begin            temp&#91;s&#93; &#58;= getDataArrayValue&#40;memory&#91;p&#93;,s&#41;;            setDataArrayValue&#40;stepOut&#91;i&#93;,s,temp&#91;s&#93;&#41;;          end;        end;        firstTime &#58;= 1;      end;

Statistics: Posted by ceasless — 23 Sep 2013, 11:02


]]>
2013-09-23T10:46:16+02:00 2013-09-23T10:46:16+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27849#p27849 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>
However, in this init procedure you do not have access to things that are already set in the patch. This means that you cannot get the current value of a parameter, even if that parameter has a value that has been saved in the patch/workspace.

My use case is making sure that an array outlet is actually sending the values that have been stored, rather than all '0's which is what happens now. When re-loading the workspace, Tthe array outlets on the 'Pattern Store' script are all set to 32 0s, rather than the value they held when the workspace was saved. In my Init code I removed the bits that I put it in to properly initialize them to 0 when the script is first added to the patch.

So, I propose a new built in procedure that would be called when the workspace is re-loaded.

BTW, I've worked around this by using the Process procedure and having a one-time run of the code that sets the array out using the saved value in the parameter. This is a problem though because the first note in the sequence is never played.

Statistics: Posted by ceasless — 23 Sep 2013, 10:46


]]>
BrainModular BrainModular Users Forum 2013-10-08T22:27:30+02:00 https://brainmodular.org/forums/app.php/feed/topic/4081 2013-10-08T22:27:30+02:00 2013-10-08T22:27:30+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=28035#p28035 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>
Once again Usine shows me that it already knows the answer, I just hadn't figured out the right way to ask the question
good philosophical response that also works for the general life ..:)
Words to live by :)

Also I wanted to show senso that I recognize I may have been somewhat annoying with 'not a bug' reports and feature requests like this. So far its all been a function of not fully 'getting it', whatever 'it' was at the time. Thanks for the help man!

I think I have the logic finally baked to perfection.

And regarding this feature request, I only today found the synchro setting that detaches it from the sound engine 'on/off'. and it is 'on/off' that triggers the 'init', so you can easily have a longer period of "loading" with scripts and modules triggered by 'init' and only turn the synchro on when you want to.

So, feature request: already there! :D

Statistics: Posted by ceasless — 08 Oct 2013, 22:27


]]>
2013-10-07T22:58:06+02:00 2013-10-07T22:58:06+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=28019#p28019 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>
Once again Usine shows me that it already knows the answer, I just hadn't figured out the right way to ask the question
good philosophical response that also works for the general life ..:)

Statistics: Posted by nay-seven — 07 Oct 2013, 22:58


]]>
2013-10-07T22:46:26+02:00 2013-10-07T22:46:26+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=28018#p28018 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>
Either way it's working!

Once again Usine shows me that it already knows the answer, I just hadn't figured out the right way to ask the question :)

Statistics: Posted by ceasless — 07 Oct 2013, 22:46


]]>
2013-10-07T11:29:10+02:00 2013-10-07T11:29:10+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=28011#p28011 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>
I attempted your solution with using an 'init' input and writing a callback. (I also had already moved it down to the 'process' procedure before posting originally, I believe I mentioned it). It still does not solve the issue.

It seems to me that having a difference between the 'init' procedure (which cannot access the data in the flux that are already attached) and something like 'post-init' (which can access and change the flux before the user starts the sound engine) would be useful in more cases than just this example. If it's not too complicated to add, would you consider it?

Statistics: Posted by ceasless — 07 Oct 2013, 11:29


]]>
2013-09-30T22:42:27+02:00 2013-09-30T22:42:27+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27938#p27938 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]> Statistics: Posted by ceasless — 30 Sep 2013, 22:42


]]>
2013-09-30T10:42:59+02:00 2013-09-30T10:42:59+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27932#p27932 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>
What I need is to get the parameter value (and set the array outs to the right values) before the play button is pressed.

Statistics: Posted by ceasless — 30 Sep 2013, 10:42


]]>
2013-09-29T19:26:27+02:00 2013-09-29T19:26:27+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27925#p27925 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]> try to change your code location, like in the callback, in the process.

also you can add an inlet "start init" which can be connected to an "on activation" module?

Statistics: Posted by senso — 29 Sep 2013, 19:26


]]>
2013-09-29T16:34:55+02:00 2013-09-29T16:34:55+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27920#p27920 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]> Statistics: Posted by ceasless — 29 Sep 2013, 16:34


]]>
2013-09-24T18:28:33+02:00 2013-09-24T18:28:33+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27870#p27870 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>

CODE:

if firstTime &#58;= 0
is an assignment (":=") not a comparison ("=").

Statistics: Posted by ynohtna — 24 Sep 2013, 18:28


]]>
2013-09-23T11:02:18+02:00 2013-09-23T11:02:18+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27850#p27850 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>

CODE:

      if firstTime &#58;= 0      then begin        writeln&#40;'interesting'&#41;;        for i&#58;=0 to IOs-1        do begin          p &#58;= &#40;&#40;prev-1&#41; * IOs&#41; + i;           setLength&#40;stepOut&#91;i&#93;,STEPs&#41;;          for s&#58;=0 to STEPs-1          do begin            temp&#91;s&#93; &#58;= getDataArrayValue&#40;memory&#91;p&#93;,s&#41;;            setDataArrayValue&#40;stepOut&#91;i&#93;,s,temp&#91;s&#93;&#41;;          end;        end;        firstTime &#58;= 1;      end;

Statistics: Posted by ceasless — 23 Sep 2013, 11:02


]]>
2013-09-23T10:46:16+02:00 2013-09-23T10:46:16+02:00 https://brainmodular.org/forums/viewtopic.php?t=4081&p=27849#p27849 <![CDATA[new built in procedure for 'load' (in addition to 'init')]]>
However, in this init procedure you do not have access to things that are already set in the patch. This means that you cannot get the current value of a parameter, even if that parameter has a value that has been saved in the patch/workspace.

My use case is making sure that an array outlet is actually sending the values that have been stored, rather than all '0's which is what happens now. When re-loading the workspace, Tthe array outlets on the 'Pattern Store' script are all set to 32 0s, rather than the value they held when the workspace was saved. In my Init code I removed the bits that I put it in to properly initialize them to 0 when the script is first added to the patch.

So, I propose a new built in procedure that would be called when the workspace is re-loaded.

BTW, I've worked around this by using the Process procedure and having a one-time run of the code that sets the array out using the saved value in the parameter. This is a problem though because the first note in the sequence is never played.

Statistics: Posted by ceasless — 23 Sep 2013, 10:46


]]>