ArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2013-04-18T21:44:46+02:00 https://www.brainmodular.com/forums/app.php/feed/topic/2492 2013-04-18T21:44:46+02:00 2013-04-18T21:44:46+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=25965#p25965 <![CDATA[Unpack Array script]]> well done

Statistics: Posted by 23fx23 — 18 Apr 2013, 21:44


]]>
2013-04-18T12:21:58+02:00 2013-04-18T12:21:58+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=25962#p25962 <![CDATA[Unpack Array script]]> replaced:
//setvalue(value,getDataArrayValue(Arrayin,memIDs[m]));
setvalue(value,memVals[m]);
by
setvalue(value,getDataArrayValue(Arrayin,memIDs[m]));
//setvalue(value,memVals[m]);

now working on my patch.

Statistics: Posted by Fléau — 18 Apr 2013, 12:21


]]>
2013-04-15T23:48:50+02:00 2013-04-15T23:48:50+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=25938#p25938 <![CDATA[Unpack Array script]]>

Statistics: Posted by 23fx23 — 15 Apr 2013, 23:48


]]>
2013-04-14T11:52:23+02:00 2013-04-14T11:52:23+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=25923#p25923 <![CDATA[Unpack Array script]]> 23fx23, did you found the solution?

Statistics: Posted by Fléau — 14 Apr 2013, 11:52


]]>
2012-01-31T02:55:55+02:00 2012-01-31T02:55:55+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=22493#p22493 <![CDATA[Unpack Array script]]>

Statistics: Posted by 23fx23 — 31 Jan 2012, 01:55


]]>
2012-01-31T00:16:40+02:00 2012-01-31T00:16:40+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=22492#p22492 <![CDATA[Unpack Array script]]> Statistics: Posted by r.erorr — 30 Jan 2012, 23:16


]]>
2010-12-10T22:30:50+02:00 2010-12-10T22:30:50+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17340#p17340 <![CDATA[Unpack Array script]]> nb: i noticed the delay works only on polyphonic, if only one data changed each bloc, it will still be sent each bloc..
i couldn't figure out yet a way to quantize first data but i will investigate, but maybe not a pb..

Statistics: Posted by 23fx23 — 10 Dec 2010, 21:30


]]>
2010-12-10T00:03:20+02:00 2010-12-10T00:03:20+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17331#p17331 <![CDATA[Unpack Array script]]>
I Will test it more heavily but anyway you saved my actual patches!

:D & :cool:

Statistics: Posted by ethnix73 — 09 Dec 2010, 23:03


]]>
2010-12-09T23:34:08+02:00 2010-12-09T23:34:08+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17330#p17330 <![CDATA[Unpack Array script]]> here is one you could test with some bloc_nb input:

CODE:

////////////////////////////////////////////////////////////////////////////var ArrayIn, index, value, send, NB_BLOCS&#58; Tparameter;var i,j,l,k,m,BLOCS&#58; integer;var ArrayLast, memVals&#58; array of single;var memIDs &#58; array of integer;//////////////////////////////////PROCEDURE INIT;BEGIN  ArrayIn &#58;=CreateParam&#40;'ArrayIn',PtArray&#41;; SetIsOutput&#40;ArrayIn,False&#41;;setmin  &#40;arrayin,-MAXINT&#41;; setMAX&#40;arrayin,MAXINT&#41;;NB_BLOCS&#58;=CreateParam&#40;'NB_BLOCS',Ptdatafield&#41;;SetIsOUTput&#40;NB_BLOCS,False&#41;;SetValue&#40;NB_BLOCS,1&#41;;//send    &#58;=CreateParam&#40;'send', PtLed&#41;   ;SetIsINput&#40;send,False&#41;;index   &#58;=CreateParam&#40;'index',Ptdatafield&#41;;SetIsINput&#40;index,False&#41;;value   &#58;=CreateParam&#40;'value',Ptdatafield&#41;;SetIsINput&#40;value,False&#41;;k&#58;=-2;      //reset unpack counterj&#58;=0;BLOCS&#58;=1;setArrayLength&#40;arrayLast,1&#41;;setArrayLength&#40;memIds,1&#41;;setArrayLength&#40;memVals,1&#41;;end;//////////////////////////////////////PROCEDURE CALLBACK&#40;N&#58;integer&#41;; begin  if &#40;n=NB_BLOCS&#41; then Begin     BLOCS&#58;= MaxI&#40;1,round&#40;getvalue&#40;NB_BLOCS&#41;&#41;&#41;;     end;    if &#40;n = ArrayIn&#41; AND &#40;k=-2&#41;then begin        L&#58;= getlength&#40;ArrayIn&#41;;                    setArraylength&#40;arrayLast,L&#41;;        j&#58;=0;          k&#58;=-1;          for i&#58;=0 to L-1 do begin                     if getdataArrayValue&#40;ArrayIn,i&#41; - arrayLast&#91;i&#93; <> 0 then begin                 setvalue&#40;send,1&#41;;                                                                         j&#58;= j+1;                   setArrayLength&#40;memVals,j&#41;;                                 setArrayLength&#40;memIDs,j&#41;;                memIDs&#91;j-1&#93;&#58;= i;                  memVals&#91;j-1&#93;&#58;= getDataArrayValue&#40;ArrayIn,i&#41;;                       end;           end;                                                     end;END;//Callback//////////////////////////////PROCEDURE PROCESS;BEGIN  if k >=-1 then begin                            k &#58;= k+1;     m &#58;= k div BLOCS;                                setValue&#40;index,memIDs&#91;m&#93;&#41;;                    //setvalue&#40;value,getDataArrayValue&#40;Arrayin,memIDs&#91;m&#93;&#41;&#41;;      setvalue&#40;value,memVals&#91;m&#93;&#41;;      setvalue&#40;send,1&#41;;   end   else begin     setvalue&#40;send,0&#41;;   end;  if m = 1 then begin                              for i&#58;= 0 to L-1 do begin         arrayLast&#91;i&#93;&#58;= getDataArrayValue&#40;ArrayIn,i&#41;;       end;    end;     if m > &#40;j-2&#41; then begin                 k&#58;=-2;    end;END;//Process/////////////////////////////

Statistics: Posted by 23fx23 — 09 Dec 2010, 22:34


]]>
2010-12-08T14:19:55+02:00 2010-12-08T14:19:55+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17311#p17311 <![CDATA[Unpack Array script]]>
Cool to try to help me...

Statistics: Posted by ethnix73 — 08 Dec 2010, 13:19


]]>
2010-12-08T13:45:37+02:00 2010-12-08T13:45:37+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17309#p17309 <![CDATA[Unpack Array script]]>

Statistics: Posted by 23fx23 — 08 Dec 2010, 12:45


]]>
2010-12-08T03:09:57+02:00 2010-12-08T03:09:57+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17303#p17303 <![CDATA[Unpack Array script]]>

And it creates audio glitches...

Statistics: Posted by ethnix73 — 08 Dec 2010, 02:09


]]>
2010-12-08T02:51:51+02:00 2010-12-08T02:51:51+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17302#p17302 <![CDATA[Unpack Array script]]> even me i don't understand this script, i could get it work but i don't really know how lol.

in fact i did it from scratch, and i should have checked unpack midi first maye i think there is a simpler way.

i will try to find a way for that. just curious, why do you need slower, got some overloads?

Statistics: Posted by 23fx23 — 08 Dec 2010, 01:51


]]>
2010-12-07T23:55:17+02:00 2010-12-07T23:55:17+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17299#p17299 <![CDATA[Unpack Array script]]>
I've tried to implement a function to unpack more slowly the array, as you can find in the unpack midi script with wait cycles

But i've got big, enormous difficulties to understand your script 23fx23...

Should i put it in the procedure callback?
I've tried but with no success...

Statistics: Posted by ethnix73 — 07 Dec 2010, 22:55


]]>
2010-11-19T19:11:54+02:00 2010-11-19T19:11:54+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17055#p17055 <![CDATA[Unpack Array script]]> need to type slower.hehe

Statistics: Posted by 23fx23 — 19 Nov 2010, 18:11


]]>
2010-11-19T19:08:08+02:00 2010-11-19T19:08:08+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17054#p17054 <![CDATA[Unpack Array script]]>
:D

Statistics: Posted by ethnix73 — 19 Nov 2010, 18:08


]]>
2010-11-19T18:46:12+02:00 2010-11-19T18:46:12+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17052#p17052 <![CDATA[Unpack Array script]]> Statistics: Posted by 23fx23 — 19 Nov 2010, 17:46


]]>
2010-11-19T13:51:44+02:00 2010-11-19T13:51:44+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17048#p17048 <![CDATA[Unpack Array script]]>
No more error on init...

Statistics: Posted by ethnix73 — 19 Nov 2010, 12:51


]]>
2010-11-19T03:34:41+02:00 2010-11-19T03:34:41+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17040#p17040 <![CDATA[Unpack Array script]]> there is maybe a simpler way to proceed but that seems to work.

this version may get rid of the error,
could you try it ethnix and see if it's forking for you? if so ill update the addon...

CODE:

/////////////////////////////////////////////////////////////// Unpack array 23fx_14/10/2K10//////////////////////////////////////////////////////////////// Unpack simultaneous array changes bloc after bloc.// useful to convert polyphonic messages to slightly delayed// monophonic flows for ie midi mess or osc,dispatchers/setarrayelmt..////////////////////////////////////////////////////////////////////////////var ArrayIn, index, value, send&#58; Tparameter;var i,j,l,k,m&#58; integer;var ArrayLast&#58; array of single;var memIDs &#58; array of integer;//////////////////////////////////PROCEDURE INIT;BEGIN  ArrayIn &#58;=CreateParam&#40;'ArrayIn',PtArray&#41;; SetIsOutput&#40;ArrayIn,False&#41;;setmin  &#40;arrayin,-MAXINT&#41;; setMAX&#40;arrayin,MAXINT&#41;;//send    &#58;=CreateParam&#40;'send', PtLed&#41;   ;SetIsINput&#40;send,False&#41;;index   &#58;=CreateParam&#40;'index',Ptdatafield&#41;;SetIsINput&#40;index,False&#41;;value   &#58;=CreateParam&#40;'value',Ptdatafield&#41;;SetIsINput&#40;value,False&#41;;k&#58;=-2;      //reset unpack counterj&#58;=0;setArrayLength&#40;arrayLast,1&#41;;setArrayLength&#40;memIds,1&#41;;end;//////////////////////////////////////PROCEDURE CALLBACK&#40;N&#58;integer&#41;; begin      if &#40;n = 0&#41; then begin        L&#58;= getlength&#40;ArrayIn&#41;;                    setArraylength&#40;arrayLast,L&#41;;        j&#58;=0;          k&#58;=-1;          for i&#58;=0 to L-1 do begin                     if getdataArrayValue&#40;ArrayIn,i&#41; - arrayLast&#91;i&#93; <> 0 then begin                 setvalue&#40;send,1&#41;;                                                                         j&#58;= j+1;                                     setArrayLength&#40;memIDs,j&#41;;                memIDs&#91;j-1&#93;&#58;= i;                        end;           end;                                                     end;END;//Callback//////////////////////////////PROCEDURE PROCESS;BEGIN  if k >=-1 then begin                            k &#58;= k+1;                                setValue&#40;index,memIDs&#91;k&#93;&#41;;                    setvalue&#40;value,getDataArrayValue&#40;Arrayin,memIDs&#91;k&#93;&#41;&#41;;      setvalue&#40;send,1&#41;;   end   else begin     setvalue&#40;send,0&#41;;   end;  if k = 1 then begin                              for i&#58;= 0 to L-1 do begin         arrayLast&#91;i&#93;&#58;= getDataArrayValue&#40;ArrayIn,i&#41;;       end;    end;     if k > &#40;j-2&#41; then begin                 k&#58;=-2;    end;END;//Process////////////////////////////

Statistics: Posted by 23fx23 — 19 Nov 2010, 02:34


]]>
2010-11-18T20:35:53+02:00 2010-11-18T20:35:53+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17030#p17030 <![CDATA[Unpack Array script]]>
i probably need to fill the internal array used to compare or i don't know, will let tou know..

Statistics: Posted by 23fx23 — 18 Nov 2010, 19:35


]]>
2010-11-18T14:38:17+02:00 2010-11-18T14:38:17+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17018#p17018 <![CDATA[Unpack Array script]]>
I've just noticed that there is an error with unpack array when it is connected to an empty matrix module, on initialisation of the patch...

Don't know if it's matrix or script related....

Statistics: Posted by ethnix73 — 18 Nov 2010, 13:38


]]>
2010-10-16T19:45:07+02:00 2010-10-16T19:45:07+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=16357#p16357 <![CDATA[Unpack Array script]]> . yeah we ll speak about in another thread. I got lot of scripts sorting incoming Osc datas to an array.
the set Array is cool but scripts allow more things. i ll make a very simple one that do this as exemple.

Statistics: Posted by 23fx23 — 16 Oct 2010, 19:45


]]>
2010-10-16T05:38:16+02:00 2010-10-16T05:38:16+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=16355#p16355 <![CDATA[Unpack Array script]]> Statistics: Posted by gurulogic — 16 Oct 2010, 05:38


]]>
2010-10-15T19:06:22+02:00 2010-10-15T19:06:22+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=16354#p16354 <![CDATA[Unpack Array script]]> I think you are after the other side : several mono received unpacked and go in an array?
multiples datas on same adress are automaticaly 'unpacked' by OSC receive modules normally,
need to use setArray elemnt to store received datas in array. (the pic i shown ya in monome thread).

if you make an array display or editor out of the setarray element of the pic, you should have your multiples datas.'repacked'.
.

Statistics: Posted by 23fx23 — 15 Oct 2010, 19:06


]]>
2010-10-15T17:36:16+02:00 2010-10-15T17:36:16+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=16353#p16353 <![CDATA[Unpack Array script]]> Statistics: Posted by gurulogic — 15 Oct 2010, 17:36


]]>
BrainModular BrainModular Users Forum 2013-04-18T21:44:46+02:00 https://www.brainmodular.com/forums/app.php/feed/topic/2492 2013-04-18T21:44:46+02:00 2013-04-18T21:44:46+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=25965#p25965 <![CDATA[Unpack Array script]]> well done

Statistics: Posted by 23fx23 — 18 Apr 2013, 21:44


]]>
2013-04-18T12:21:58+02:00 2013-04-18T12:21:58+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=25962#p25962 <![CDATA[Unpack Array script]]> replaced:
//setvalue(value,getDataArrayValue(Arrayin,memIDs[m]));
setvalue(value,memVals[m]);
by
setvalue(value,getDataArrayValue(Arrayin,memIDs[m]));
//setvalue(value,memVals[m]);

now working on my patch.

Statistics: Posted by Fléau — 18 Apr 2013, 12:21


]]>
2013-04-15T23:48:50+02:00 2013-04-15T23:48:50+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=25938#p25938 <![CDATA[Unpack Array script]]>

Statistics: Posted by 23fx23 — 15 Apr 2013, 23:48


]]>
2013-04-14T11:52:23+02:00 2013-04-14T11:52:23+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=25923#p25923 <![CDATA[Unpack Array script]]> 23fx23, did you found the solution?

Statistics: Posted by Fléau — 14 Apr 2013, 11:52


]]>
2012-01-31T02:55:55+02:00 2012-01-31T02:55:55+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=22493#p22493 <![CDATA[Unpack Array script]]>

Statistics: Posted by 23fx23 — 31 Jan 2012, 01:55


]]>
2012-01-31T00:16:40+02:00 2012-01-31T00:16:40+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=22492#p22492 <![CDATA[Unpack Array script]]> Statistics: Posted by r.erorr — 30 Jan 2012, 23:16


]]>
2010-12-10T22:30:50+02:00 2010-12-10T22:30:50+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17340#p17340 <![CDATA[Unpack Array script]]> nb: i noticed the delay works only on polyphonic, if only one data changed each bloc, it will still be sent each bloc..
i couldn't figure out yet a way to quantize first data but i will investigate, but maybe not a pb..

Statistics: Posted by 23fx23 — 10 Dec 2010, 21:30


]]>
2010-12-10T00:03:20+02:00 2010-12-10T00:03:20+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17331#p17331 <![CDATA[Unpack Array script]]>
I Will test it more heavily but anyway you saved my actual patches!

:D & :cool:

Statistics: Posted by ethnix73 — 09 Dec 2010, 23:03


]]>
2010-12-09T23:34:08+02:00 2010-12-09T23:34:08+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17330#p17330 <![CDATA[Unpack Array script]]> here is one you could test with some bloc_nb input:

CODE:

////////////////////////////////////////////////////////////////////////////var ArrayIn, index, value, send, NB_BLOCS&#58; Tparameter;var i,j,l,k,m,BLOCS&#58; integer;var ArrayLast, memVals&#58; array of single;var memIDs &#58; array of integer;//////////////////////////////////PROCEDURE INIT;BEGIN  ArrayIn &#58;=CreateParam&#40;'ArrayIn',PtArray&#41;; SetIsOutput&#40;ArrayIn,False&#41;;setmin  &#40;arrayin,-MAXINT&#41;; setMAX&#40;arrayin,MAXINT&#41;;NB_BLOCS&#58;=CreateParam&#40;'NB_BLOCS',Ptdatafield&#41;;SetIsOUTput&#40;NB_BLOCS,False&#41;;SetValue&#40;NB_BLOCS,1&#41;;//send    &#58;=CreateParam&#40;'send', PtLed&#41;   ;SetIsINput&#40;send,False&#41;;index   &#58;=CreateParam&#40;'index',Ptdatafield&#41;;SetIsINput&#40;index,False&#41;;value   &#58;=CreateParam&#40;'value',Ptdatafield&#41;;SetIsINput&#40;value,False&#41;;k&#58;=-2;      //reset unpack counterj&#58;=0;BLOCS&#58;=1;setArrayLength&#40;arrayLast,1&#41;;setArrayLength&#40;memIds,1&#41;;setArrayLength&#40;memVals,1&#41;;end;//////////////////////////////////////PROCEDURE CALLBACK&#40;N&#58;integer&#41;; begin  if &#40;n=NB_BLOCS&#41; then Begin     BLOCS&#58;= MaxI&#40;1,round&#40;getvalue&#40;NB_BLOCS&#41;&#41;&#41;;     end;    if &#40;n = ArrayIn&#41; AND &#40;k=-2&#41;then begin        L&#58;= getlength&#40;ArrayIn&#41;;                    setArraylength&#40;arrayLast,L&#41;;        j&#58;=0;          k&#58;=-1;          for i&#58;=0 to L-1 do begin                     if getdataArrayValue&#40;ArrayIn,i&#41; - arrayLast&#91;i&#93; <> 0 then begin                 setvalue&#40;send,1&#41;;                                                                         j&#58;= j+1;                   setArrayLength&#40;memVals,j&#41;;                                 setArrayLength&#40;memIDs,j&#41;;                memIDs&#91;j-1&#93;&#58;= i;                  memVals&#91;j-1&#93;&#58;= getDataArrayValue&#40;ArrayIn,i&#41;;                       end;           end;                                                     end;END;//Callback//////////////////////////////PROCEDURE PROCESS;BEGIN  if k >=-1 then begin                            k &#58;= k+1;     m &#58;= k div BLOCS;                                setValue&#40;index,memIDs&#91;m&#93;&#41;;                    //setvalue&#40;value,getDataArrayValue&#40;Arrayin,memIDs&#91;m&#93;&#41;&#41;;      setvalue&#40;value,memVals&#91;m&#93;&#41;;      setvalue&#40;send,1&#41;;   end   else begin     setvalue&#40;send,0&#41;;   end;  if m = 1 then begin                              for i&#58;= 0 to L-1 do begin         arrayLast&#91;i&#93;&#58;= getDataArrayValue&#40;ArrayIn,i&#41;;       end;    end;     if m > &#40;j-2&#41; then begin                 k&#58;=-2;    end;END;//Process/////////////////////////////

Statistics: Posted by 23fx23 — 09 Dec 2010, 22:34


]]>
2010-12-08T14:19:55+02:00 2010-12-08T14:19:55+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17311#p17311 <![CDATA[Unpack Array script]]>
Cool to try to help me...

Statistics: Posted by ethnix73 — 08 Dec 2010, 13:19


]]>
2010-12-08T13:45:37+02:00 2010-12-08T13:45:37+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17309#p17309 <![CDATA[Unpack Array script]]>

Statistics: Posted by 23fx23 — 08 Dec 2010, 12:45


]]>
2010-12-08T03:09:57+02:00 2010-12-08T03:09:57+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17303#p17303 <![CDATA[Unpack Array script]]>

And it creates audio glitches...

Statistics: Posted by ethnix73 — 08 Dec 2010, 02:09


]]>
2010-12-08T02:51:51+02:00 2010-12-08T02:51:51+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17302#p17302 <![CDATA[Unpack Array script]]> even me i don't understand this script, i could get it work but i don't really know how lol.

in fact i did it from scratch, and i should have checked unpack midi first maye i think there is a simpler way.

i will try to find a way for that. just curious, why do you need slower, got some overloads?

Statistics: Posted by 23fx23 — 08 Dec 2010, 01:51


]]>
2010-12-07T23:55:17+02:00 2010-12-07T23:55:17+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17299#p17299 <![CDATA[Unpack Array script]]>
I've tried to implement a function to unpack more slowly the array, as you can find in the unpack midi script with wait cycles

But i've got big, enormous difficulties to understand your script 23fx23...

Should i put it in the procedure callback?
I've tried but with no success...

Statistics: Posted by ethnix73 — 07 Dec 2010, 22:55


]]>
2010-11-19T19:11:54+02:00 2010-11-19T19:11:54+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17055#p17055 <![CDATA[Unpack Array script]]> need to type slower.hehe

Statistics: Posted by 23fx23 — 19 Nov 2010, 18:11


]]>
2010-11-19T19:08:08+02:00 2010-11-19T19:08:08+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17054#p17054 <![CDATA[Unpack Array script]]>
:D

Statistics: Posted by ethnix73 — 19 Nov 2010, 18:08


]]>
2010-11-19T18:46:12+02:00 2010-11-19T18:46:12+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17052#p17052 <![CDATA[Unpack Array script]]> Statistics: Posted by 23fx23 — 19 Nov 2010, 17:46


]]>
2010-11-19T13:51:44+02:00 2010-11-19T13:51:44+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17048#p17048 <![CDATA[Unpack Array script]]>
No more error on init...

Statistics: Posted by ethnix73 — 19 Nov 2010, 12:51


]]>
2010-11-19T03:34:41+02:00 2010-11-19T03:34:41+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17040#p17040 <![CDATA[Unpack Array script]]> there is maybe a simpler way to proceed but that seems to work.

this version may get rid of the error,
could you try it ethnix and see if it's forking for you? if so ill update the addon...

CODE:

/////////////////////////////////////////////////////////////// Unpack array 23fx_14/10/2K10//////////////////////////////////////////////////////////////// Unpack simultaneous array changes bloc after bloc.// useful to convert polyphonic messages to slightly delayed// monophonic flows for ie midi mess or osc,dispatchers/setarrayelmt..////////////////////////////////////////////////////////////////////////////var ArrayIn, index, value, send&#58; Tparameter;var i,j,l,k,m&#58; integer;var ArrayLast&#58; array of single;var memIDs &#58; array of integer;//////////////////////////////////PROCEDURE INIT;BEGIN  ArrayIn &#58;=CreateParam&#40;'ArrayIn',PtArray&#41;; SetIsOutput&#40;ArrayIn,False&#41;;setmin  &#40;arrayin,-MAXINT&#41;; setMAX&#40;arrayin,MAXINT&#41;;//send    &#58;=CreateParam&#40;'send', PtLed&#41;   ;SetIsINput&#40;send,False&#41;;index   &#58;=CreateParam&#40;'index',Ptdatafield&#41;;SetIsINput&#40;index,False&#41;;value   &#58;=CreateParam&#40;'value',Ptdatafield&#41;;SetIsINput&#40;value,False&#41;;k&#58;=-2;      //reset unpack counterj&#58;=0;setArrayLength&#40;arrayLast,1&#41;;setArrayLength&#40;memIds,1&#41;;end;//////////////////////////////////////PROCEDURE CALLBACK&#40;N&#58;integer&#41;; begin      if &#40;n = 0&#41; then begin        L&#58;= getlength&#40;ArrayIn&#41;;                    setArraylength&#40;arrayLast,L&#41;;        j&#58;=0;          k&#58;=-1;          for i&#58;=0 to L-1 do begin                     if getdataArrayValue&#40;ArrayIn,i&#41; - arrayLast&#91;i&#93; <> 0 then begin                 setvalue&#40;send,1&#41;;                                                                         j&#58;= j+1;                                     setArrayLength&#40;memIDs,j&#41;;                memIDs&#91;j-1&#93;&#58;= i;                        end;           end;                                                     end;END;//Callback//////////////////////////////PROCEDURE PROCESS;BEGIN  if k >=-1 then begin                            k &#58;= k+1;                                setValue&#40;index,memIDs&#91;k&#93;&#41;;                    setvalue&#40;value,getDataArrayValue&#40;Arrayin,memIDs&#91;k&#93;&#41;&#41;;      setvalue&#40;send,1&#41;;   end   else begin     setvalue&#40;send,0&#41;;   end;  if k = 1 then begin                              for i&#58;= 0 to L-1 do begin         arrayLast&#91;i&#93;&#58;= getDataArrayValue&#40;ArrayIn,i&#41;;       end;    end;     if k > &#40;j-2&#41; then begin                 k&#58;=-2;    end;END;//Process////////////////////////////

Statistics: Posted by 23fx23 — 19 Nov 2010, 02:34


]]>
2010-11-18T20:35:53+02:00 2010-11-18T20:35:53+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17030#p17030 <![CDATA[Unpack Array script]]>
i probably need to fill the internal array used to compare or i don't know, will let tou know..

Statistics: Posted by 23fx23 — 18 Nov 2010, 19:35


]]>
2010-11-18T14:38:17+02:00 2010-11-18T14:38:17+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=17018#p17018 <![CDATA[Unpack Array script]]>
I've just noticed that there is an error with unpack array when it is connected to an empty matrix module, on initialisation of the patch...

Don't know if it's matrix or script related....

Statistics: Posted by ethnix73 — 18 Nov 2010, 13:38


]]>
2010-10-16T19:45:07+02:00 2010-10-16T19:45:07+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=16357#p16357 <![CDATA[Unpack Array script]]> . yeah we ll speak about in another thread. I got lot of scripts sorting incoming Osc datas to an array.
the set Array is cool but scripts allow more things. i ll make a very simple one that do this as exemple.

Statistics: Posted by 23fx23 — 16 Oct 2010, 19:45


]]>
2010-10-16T05:38:16+02:00 2010-10-16T05:38:16+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=16355#p16355 <![CDATA[Unpack Array script]]> Statistics: Posted by gurulogic — 16 Oct 2010, 05:38


]]>
2010-10-15T19:06:22+02:00 2010-10-15T19:06:22+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=16354#p16354 <![CDATA[Unpack Array script]]> I think you are after the other side : several mono received unpacked and go in an array?
multiples datas on same adress are automaticaly 'unpacked' by OSC receive modules normally,
need to use setArray elemnt to store received datas in array. (the pic i shown ya in monome thread).

if you make an array display or editor out of the setarray element of the pic, you should have your multiples datas.'repacked'.
.

Statistics: Posted by 23fx23 — 15 Oct 2010, 19:06


]]>
2010-10-15T17:36:16+02:00 2010-10-15T17:36:16+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=2492&p=16353#p16353 <![CDATA[Unpack Array script]]> Statistics: Posted by gurulogic — 15 Oct 2010, 17:36


]]>