ArrayArrayArrayArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2011-12-17T21:34:30+02:00 https://brainmodular.org/forums/app.php/feed/topic/3253 2011-12-17T21:34:30+02:00 2011-12-17T21:34:30+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=22114#p22114 <![CDATA[A 512 slot "matrix combobox"]]>

Statistics: Posted by 23fx23 — 17 Dec 2011, 20:34


]]>
2011-12-17T12:44:05+02:00 2011-12-17T12:44:05+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=22109#p22109 <![CDATA[A 512 slot "matrix combobox"]]> the script is ok, was the "PR_OUT" fader with a max value of 255.

Statistics: Posted by Fléau — 17 Dec 2011, 11:44


]]>
2011-12-16T21:38:33+02:00 2011-12-16T21:38:33+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=22106#p22106 <![CDATA[A 512 slot "matrix combobox"]]> we need to do the same (512) for '256PRESETS_MX'
it would be great if you give us the entire code again,
but i prefer you give me (fleau) the lines to be replaced (i'd like to understand :cool: )

thanks.

edit: working on preset rating with something like 'concat string' and symbols,
will post it there if it works.

Statistics: Posted by Fléau — 16 Dec 2011, 20:38


]]>
2011-11-23T22:00:41+02:00 2011-11-23T22:00:41+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=21927#p21927 <![CDATA[A 512 slot "matrix combobox"]]>

yes the array used to store the colors got it's max size initialized on init procedure, so must re- init the script if changed to update.
Reload works well for everything exept stuff that chged in init, ie keeping same in outs and sizes, but changing a part of processing code.

well it's actually possible to to the reverse way: feed matrix bmp out to 'draw objects' bmp in, then use the draw object module to overlay 'stars' (wich would more be circles or squares) in each cells, but then it needs a bit more complex script as it has to virtually reproduce the matrix splitted cells on draw module that will receive the mouse infos, plus the scrolling system...

I think martin is overbusy but he once said he was thinking about a way to implement gfx arrays directly on matrix.
(if so an idea is using a bmp in able to read as a frame sequence (like faders) so we can do whatever shape and animation we want,
matrix could then spread the animation for each cell, and display correct frame per cell remaping according to value array.
and if done in black and white, then the independant cell color would have their luma multiplied (classic multiply mode in gfx softs) so ie a fader with black bg and white fader on yellow cell would display a yellow fader on black bg, and with a single animation sequence we could get multiples colors, and faders,knobs, whatever kind of animation could be done easily..

i may have a look if i find time (hard actually) to do the other technique draw stuff, cause it can be also used to display faders in each cells, wich would be quite cool. i already made such patch, but only for 1D non scrollable matrix, will try to extend..

Statistics: Posted by 23fx23 — 23 Nov 2011, 21:00


]]>
2011-11-23T21:14:36+02:00 2011-11-23T21:14:36+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=21925#p21925 <![CDATA[A 512 slot "matrix combobox"]]>
If the matrix had some more inputs than colors: like bitmaps, this patch would be wonderfull
(you could put some "stars" to give a 'rank') but color is enough.

(Merci 23fx23, tu m'enlèves une énorme épine du pied,
merci aussi pour ce très bon patch et la rapidité de ta réponse ( nay7 too).

Statistics: Posted by Fléau — 23 Nov 2011, 20:14


]]>
2011-11-23T13:11:00+02:00 2011-11-23T13:11:00+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=21920#p21920 <![CDATA[A 512 slot "matrix combobox"]]> so the comma (out of preset in your case) should also have 512 elmts)

CODE:

// MX_ComboBox______________________23fx 13/05/2k10//     /////////////////////////////////////////////////////////////// Matrix based combo box with inertia   ///////////////////////////////////////////////////////////////const COLBAZE=4473924;////////////////////////////////////////////////////////var num,toAll,clear,Msdwn,ScrollIn,Mxsize,nbcols,cellscap,arrayout,colorsout,colorsmem,colorin,bordersout,colorout,maxscroll,ID_CLIC,presetout &#58; Tparameter;var pmnum,page,raj,idclic,scrolin,mscroll&#58; integer;var MSD&#58; boolean;var commain, txtin, go&#58; tparameter;var SL1,SLout&#58; tstringlist;var WAITING_NM,OK &#58; boolean;var L,scroll,NB_COLS,NB_ROWS,NBPRESETS&#58; integer;///////////////////////////////////////////////////////////////////////Procedure Init;var i&#58; integer;var s&#58; string;BEGINNBPRESETS&#58;= 512;     num  &#58;= CreateParam&#40;'num',PtDataField&#41;  ;setIsOutput&#40;num,false&#41;;     setdontsave&#40;num,false&#41;;     Msdwn&#58;= CreateParam&#40;'msdwn',PtDataField&#41;;setIsOutput&#40;msdwn,false&#41;;     toAll&#58;= CreateParam&#40;'toAll',PtDataField&#41;;setIsOutput&#40;toAll,false&#41;;     clear&#58;= CreateParam&#40;'clear',PtDataField&#41;;setIsOutput&#40;clear,false&#41;;     commain&#58;= createparam&#40;'commain',pttextfield&#41;; setisoutput&#40;commain,false&#41;; setdontsave&#40;commain,false&#41;;     txtin&#58;= createparam&#40;'txtin',pttextfield&#41;;setisoutput&#40;txtin,false&#41;;      go&#58;= createparam&#40;'dbclick',ptdatafield&#41;;setisoutput&#40;go,false&#41;;      ScrollIn&#58;= createparam&#40;'ScrollIn',ptdatafield&#41;;setisoutput&#40;ScrollIn,false&#41;;      MXsize&#58;= createparam&#40;'Mxsize',ptdatafield&#41;;setisoutput&#40;Mxsize,false&#41;;      NBCOLS&#58;= createparam&#40;'NBCOLS',ptdatafield&#41;;setisoutput&#40;NBCOLS,false&#41;;      colorin&#58;= createparam&#40;'COLORIN',ptdatafield&#41;;setisoutput&#40;COLORIN,false&#41;;      ID_CLIC  &#58;= CreateParam&#40;'ID_CLIC',PtDataField&#41;  ;setIsOutput&#40;ID_CLIC,false&#41;;     cellscap&#58;= createparam&#40;'cellscap',pttextfield&#41;;setisinput&#40;cellscap,false&#41;;      Arrayout&#58;= createparam&#40;'arrayout',ptArray&#41;;setisinput&#40;arrayout,false&#41;; setlength&#40;arrayout,16&#41;;     colorsOut&#58;= createparam&#40;'colorsout',ptArray&#41;;setisinput&#40;colorsout,false&#41;; setlength&#40;colorsout,16&#41;;     setMax&#40;colorsOut,MAXINT&#41;;     colorsMEM&#58;= createparam&#40;'colorsMEM',ptArray&#41;;setisinput&#40;colorsMEM,false&#41;; setlength&#40;colorsMEM,nbpresets&#41;;     setdontsave&#40;colorsout,false&#41;;     setMax&#40;colorsMEM,MAXINT&#41;; setdontsave&#40;colorsMEM,false&#41;;     bordersOut&#58;= createparam&#40;'bordersout',ptArray&#41;;setisinput&#40;bordersout,false&#41;; setlength&#40;bordersout,16&#41;;     setMax&#40;bordersOut,MAXINT&#41;;colorout&#58;= createparam&#40;'COLOROUT',ptdatafield&#41;;setisinput&#40;COLOROUT,false&#41;; maxscroll&#58;= createparam&#40;'maxscroll',ptdatafield&#41;;setisinput&#40;maxscroll,false&#41;; presetout&#58;= createparam&#40;'presetout',ptdatafield&#41;;setisinput&#40;presetout,false&#41;; SL1&#58;=Tstringlist.create;SLOUT&#58;=Tstringlist.create;   &#40;WAITING_NM&#41;&#58;= FALSE; MSD&#58;=false;OK&#58;=true;page&#58;=0;scroll&#58;=0;L&#58;=16;raj&#58;=0;s&#58;='0';          for i&#58;=0 to nbpresets-1 do begin            setdataArrayvalue&#40;colorsmem,i,COLBAZE&#41;;            s&#58;= S+','+intToStr&#40;i+1&#41;;           end;setstringvalue&#40;cellscap,S&#41;;sendinternalMsg&#40;'SET_STRING_VALUE','LIST','comma text',S&#41;;END;/////////////////////////////////////////Procedure destroy;begin SL1.free; slout.free end;//////////////////////////////////////////////////////////////////Procedure callBack&#40;n &#58; integer&#41;;var i&#58; integer;var nblines&#58; single;BEGINif &#40;n=toall&#41; and &#40;getvalue&#40;toall&#41;=1&#41; then begin          for i&#58;=0 to maxi&#40;nbpresets,L&#41;-1 do begin            setdataArrayvalue&#40;colorsmem,i,getvalue&#40;colorin&#41;&#41;;           U_CELLS&#40;pmnum&#41;;          end;end;if &#40;n=id_clic&#41; then begin     if getvalue&#40;id_clic&#41;>-1 then begin        IDCLIC&#58;= trunc&#40;getvalue&#40;id_clic&#41;&#41;;     end;end;if &#40;n=ScrollIn&#41; or &#40;n=mxsize&#41; or &#40;n=NBCOLS&#41; or &#40;n=commain&#41; then begin   OK&#58;=FALSE;   SL1.commatext&#58;= getstringvalue&#40;commain&#41;;   nbpresets&#58;=SL1.count;   NB_COLS&#58;= trunc&#40;getvalue&#40;NBCOLS&#41;&#41;;   L&#58;= trunc&#40;getvalue&#40;Mxsize&#41;&#41;;   NB_ROWS&#58;= L div NB_COLS;   setLength&#40;arrayout,L&#41;;   setLength&#40;colorsout,L&#41;;   setLength&#40;bordersout,L&#41;;   scrolin&#58;= maxi&#40;0,trunc&#40;mscroll-&#40;getvalue&#40;scrollin&#41;&#41;&#41;&#41;;   scroll&#58;= scrolin*NB_COLS;   U_CAPS; U_CELLS&#40;pmnum&#41;;   nblines&#58;=nbpresets/nb_cols;    if  nblines<>trunc&#40;nblines&#41; then begin    raj&#58;= 1; end else begin raj&#58;=0;end;    Mscroll&#58;=&#40;NBpresets div NB_COLS&#41;-NB_ROWS+&#40;raj&#41;;    setvalue&#40;maxscroll,mscroll&#41;;   end;if &#40;n=colorin&#41; then begin   setdataarrayvalue&#40;colorsMEM,pmnum,getvalue&#40;colorin&#41;&#41;;U_CELLS&#40;pmnum&#41;;   end;if &#40;n=go&#41;and &#40;getvalue&#40;go&#41;=1&#41; then begin    WAITING_NM&#58;=TRUE;    end;if &#40;n=commain&#41; then begin   SL1.commatext&#58;= getstringvalue&#40;commain&#41;;   nbpresets&#58;=SL1.count;U_comma; U_CAPS; U_CELLS&#40;pmnum&#41;;  U_SEL&#40;pmnum&#41;;   end;if &#40;n=txtin&#41; AND &#40;WAITING_NM&#41; then begin    SL1.strings&#91;scroll+idclic&#93;&#58;= getstringvalue&#40;txtin&#41;;U_comma;   &#40;WAITING_NM&#41;&#58;= FALSE;    U_CAPS;    end;               if &#40;n=msdwn&#41; then begin                  MSD&#58;=getvalue&#40;msdwn&#41;=1;                     if &#40;MSD&#41; then begin                         OK&#58;=TRUE;                     end;                     if &#40;not MSD&#41; AND &#40;OK&#41; then begin                     U_SEL&#40;scroll+idclic&#41;;                     U_SEL_COLOR&#40;scroll+idclic&#41;;                     end;                 end;           if &#40;n=num&#41; and &#40;getvalue&#40;num&#41;>-1&#41;then begin             SL1.commatext&#58;= getstringvalue&#40;commain&#41;;             pmnum&#58;= trunc&#40;getvalue&#40;num&#41;&#41;;             U_CELLS&#40;pmnum&#41;;U_SEL&#40;pmnum&#41;;U_SEL_COLOR&#40;pmnum&#41;;             end;END;//////////////////////////////////////////Procedure U_SEL&#40;ID&#58;integer&#41;;begin  if &#40;scroll+idclic&#41;<SL1.count then beginSendInternalMsg&#40;'SET_TARGET_PATCH','SENDER_PATCH'&#41;;SendInternalMsg&#40;'SET_VALUE','LIST','1',FloatToStr&#40;ID&#41;&#41;;SendInternalMsg&#40;'SET_STRING_VALUE','TXT','NAME',SL1.strings&#91;ID&#93;&#41;;SendInternalMsg&#40;'SET_STRING_VALUE','SELECTED','CAPTION',FloatToStr&#40;ID&#41;&#41;;end;end;//////////////////////////////////////////////////////////Procedure U_comma;beginSendInternalMsg&#40;'SET_TARGET_PATCH','SENDER_PATCH'&#41;;sendinternalMsg&#40;'SET_STRING_VALUE','LIST','comma text',SL1.commatext&#41;;end;//////////////////////////////////////////////////////////Procedure U_CAPS;var i&#58;integer;beginSLOUT.clear;for i&#58;= 0 to L-1 do begin     if &#40;i+scroll&#41; < Sl1.count then begin    SLout.add&#40;sl1.strings&#91;i+scroll&#93;&#41;;     end else begin     SLout.add&#40;'-'&#41;;end;   end;setstringvalue&#40;cellscap,Slout.commatext&#41;;end;//ucaps//////////////Procedure U_SEL_COLOR&#40;ID&#58;integer&#41;;beginSendInternalMsg&#40;'SET_TARGET_PATCH','SENDER_PATCH'&#41;;SendInternalMsg&#40;'SET_VALUE','COLOR','color',floatToStr&#40;getdataarrayvalue&#40;colorsmem,ID&#41;&#41;&#41;; end;//////////////////////////////////////////////////////////Procedure U_CELLS&#40;ID&#58;integer&#41;;var i,j, val&#58;integer;beginif &#40;ID>=&#40;scroll&#41;&#41; and &#40;ID<&#40;scroll+L&#41;&#41; then begin    val&#58;=16777215 end else begin val&#58;=colbaze;end;for i&#58;= 0 to L-1 do begin     if i<>&#40;&#40;id-scroll&#41; &#41; then begin     setdataarrayvalue&#40;arrayout,i,0&#41;;     setdataArrayvalue&#40;bordersout,i,getdataarrayvalue&#40;colorsmem,i+scroll&#41;&#41;;     end else begin     setdataarrayvalue&#40;arrayout,i,1&#41;;     setdataarrayvalue&#40;bordersout,i,val&#41;;   end;end;for j&#58;=0 to L-1 do begin  if &#40;j+scroll&#41;< nbpresets then begin  setdataArrayvalue&#40;colorsout,j,getdataarrayvalue&#40;colorsmem,j+scroll&#41;&#41;;  end  else begin  setdataArrayvalue&#40;colorsout,j,colbaze&#41;;end;end;end;//ucaps//////////////

Statistics: Posted by 23fx23 — 23 Nov 2011, 12:11


]]>
2011-11-23T12:13:20+02:00 2011-11-23T12:13:20+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=21917#p21917 <![CDATA[A 512 slot "matrix combobox"]]> Statistics: Posted by 23fx23 — 23 Nov 2011, 11:13


]]>
2011-11-23T10:13:55+02:00 2011-11-23T10:13:55+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=21916#p21916 <![CDATA[A 512 slot "matrix combobox"]]> waiting for this, you can delete the wire colorsout to cell color and now you can change the color cells of the matrix module
you lose the possibilities to change individually the color of each cells but you can use the patch

Statistics: Posted by nay-seven — 23 Nov 2011, 09:13


]]>
2011-11-22T22:49:01+02:00 2011-11-22T22:49:01+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=21915#p21915 <![CDATA[A 512 slot "matrix combobox"]]> i'm using the "256 preset manager" that i pulled to 512 on my slave computer (and it work perfectly for a vst with no program change).
To drive it via OSC on my master computer i use that wonderfull "MX combobox" ,
but i do not manage to make it works with 512 slots:
in the script, i changed NBPRESETS:= 256; by NBPRESETS:= 512; , recompiled it,
but it make black squares and i can't change their color:
Image
I noticed that the [colorsMEM] arrayout of the script is staying at 256 (sometime at 258).
I could put two of them to drive the 512 preset manager, but it's shame...
So, if anybody had an idea about that it would be great ( i'm at 240 presets and i had some 25 per day...).
Thanks,
Bérénice.

edit: noticed some problem with the scroll inertia module and touch screen.

Statistics: Posted by Fléau — 22 Nov 2011, 21:49


]]>
BrainModular BrainModular Users Forum 2011-12-17T21:34:30+02:00 https://brainmodular.org/forums/app.php/feed/topic/3253 2011-12-17T21:34:30+02:00 2011-12-17T21:34:30+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=22114#p22114 <![CDATA[A 512 slot "matrix combobox"]]>

Statistics: Posted by 23fx23 — 17 Dec 2011, 20:34


]]>
2011-12-17T12:44:05+02:00 2011-12-17T12:44:05+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=22109#p22109 <![CDATA[A 512 slot "matrix combobox"]]> the script is ok, was the "PR_OUT" fader with a max value of 255.

Statistics: Posted by Fléau — 17 Dec 2011, 11:44


]]>
2011-12-16T21:38:33+02:00 2011-12-16T21:38:33+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=22106#p22106 <![CDATA[A 512 slot "matrix combobox"]]> we need to do the same (512) for '256PRESETS_MX'
it would be great if you give us the entire code again,
but i prefer you give me (fleau) the lines to be replaced (i'd like to understand :cool: )

thanks.

edit: working on preset rating with something like 'concat string' and symbols,
will post it there if it works.

Statistics: Posted by Fléau — 16 Dec 2011, 20:38


]]>
2011-11-23T22:00:41+02:00 2011-11-23T22:00:41+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=21927#p21927 <![CDATA[A 512 slot "matrix combobox"]]>

yes the array used to store the colors got it's max size initialized on init procedure, so must re- init the script if changed to update.
Reload works well for everything exept stuff that chged in init, ie keeping same in outs and sizes, but changing a part of processing code.

well it's actually possible to to the reverse way: feed matrix bmp out to 'draw objects' bmp in, then use the draw object module to overlay 'stars' (wich would more be circles or squares) in each cells, but then it needs a bit more complex script as it has to virtually reproduce the matrix splitted cells on draw module that will receive the mouse infos, plus the scrolling system...

I think martin is overbusy but he once said he was thinking about a way to implement gfx arrays directly on matrix.
(if so an idea is using a bmp in able to read as a frame sequence (like faders) so we can do whatever shape and animation we want,
matrix could then spread the animation for each cell, and display correct frame per cell remaping according to value array.
and if done in black and white, then the independant cell color would have their luma multiplied (classic multiply mode in gfx softs) so ie a fader with black bg and white fader on yellow cell would display a yellow fader on black bg, and with a single animation sequence we could get multiples colors, and faders,knobs, whatever kind of animation could be done easily..

i may have a look if i find time (hard actually) to do the other technique draw stuff, cause it can be also used to display faders in each cells, wich would be quite cool. i already made such patch, but only for 1D non scrollable matrix, will try to extend..

Statistics: Posted by 23fx23 — 23 Nov 2011, 21:00


]]>
2011-11-23T21:14:36+02:00 2011-11-23T21:14:36+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=21925#p21925 <![CDATA[A 512 slot "matrix combobox"]]>
If the matrix had some more inputs than colors: like bitmaps, this patch would be wonderfull
(you could put some "stars" to give a 'rank') but color is enough.

(Merci 23fx23, tu m'enlèves une énorme épine du pied,
merci aussi pour ce très bon patch et la rapidité de ta réponse ( nay7 too).

Statistics: Posted by Fléau — 23 Nov 2011, 20:14


]]>
2011-11-23T13:11:00+02:00 2011-11-23T13:11:00+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=21920#p21920 <![CDATA[A 512 slot "matrix combobox"]]> so the comma (out of preset in your case) should also have 512 elmts)

CODE:

// MX_ComboBox______________________23fx 13/05/2k10//     /////////////////////////////////////////////////////////////// Matrix based combo box with inertia   ///////////////////////////////////////////////////////////////const COLBAZE=4473924;////////////////////////////////////////////////////////var num,toAll,clear,Msdwn,ScrollIn,Mxsize,nbcols,cellscap,arrayout,colorsout,colorsmem,colorin,bordersout,colorout,maxscroll,ID_CLIC,presetout &#58; Tparameter;var pmnum,page,raj,idclic,scrolin,mscroll&#58; integer;var MSD&#58; boolean;var commain, txtin, go&#58; tparameter;var SL1,SLout&#58; tstringlist;var WAITING_NM,OK &#58; boolean;var L,scroll,NB_COLS,NB_ROWS,NBPRESETS&#58; integer;///////////////////////////////////////////////////////////////////////Procedure Init;var i&#58; integer;var s&#58; string;BEGINNBPRESETS&#58;= 512;     num  &#58;= CreateParam&#40;'num',PtDataField&#41;  ;setIsOutput&#40;num,false&#41;;     setdontsave&#40;num,false&#41;;     Msdwn&#58;= CreateParam&#40;'msdwn',PtDataField&#41;;setIsOutput&#40;msdwn,false&#41;;     toAll&#58;= CreateParam&#40;'toAll',PtDataField&#41;;setIsOutput&#40;toAll,false&#41;;     clear&#58;= CreateParam&#40;'clear',PtDataField&#41;;setIsOutput&#40;clear,false&#41;;     commain&#58;= createparam&#40;'commain',pttextfield&#41;; setisoutput&#40;commain,false&#41;; setdontsave&#40;commain,false&#41;;     txtin&#58;= createparam&#40;'txtin',pttextfield&#41;;setisoutput&#40;txtin,false&#41;;      go&#58;= createparam&#40;'dbclick',ptdatafield&#41;;setisoutput&#40;go,false&#41;;      ScrollIn&#58;= createparam&#40;'ScrollIn',ptdatafield&#41;;setisoutput&#40;ScrollIn,false&#41;;      MXsize&#58;= createparam&#40;'Mxsize',ptdatafield&#41;;setisoutput&#40;Mxsize,false&#41;;      NBCOLS&#58;= createparam&#40;'NBCOLS',ptdatafield&#41;;setisoutput&#40;NBCOLS,false&#41;;      colorin&#58;= createparam&#40;'COLORIN',ptdatafield&#41;;setisoutput&#40;COLORIN,false&#41;;      ID_CLIC  &#58;= CreateParam&#40;'ID_CLIC',PtDataField&#41;  ;setIsOutput&#40;ID_CLIC,false&#41;;     cellscap&#58;= createparam&#40;'cellscap',pttextfield&#41;;setisinput&#40;cellscap,false&#41;;      Arrayout&#58;= createparam&#40;'arrayout',ptArray&#41;;setisinput&#40;arrayout,false&#41;; setlength&#40;arrayout,16&#41;;     colorsOut&#58;= createparam&#40;'colorsout',ptArray&#41;;setisinput&#40;colorsout,false&#41;; setlength&#40;colorsout,16&#41;;     setMax&#40;colorsOut,MAXINT&#41;;     colorsMEM&#58;= createparam&#40;'colorsMEM',ptArray&#41;;setisinput&#40;colorsMEM,false&#41;; setlength&#40;colorsMEM,nbpresets&#41;;     setdontsave&#40;colorsout,false&#41;;     setMax&#40;colorsMEM,MAXINT&#41;; setdontsave&#40;colorsMEM,false&#41;;     bordersOut&#58;= createparam&#40;'bordersout',ptArray&#41;;setisinput&#40;bordersout,false&#41;; setlength&#40;bordersout,16&#41;;     setMax&#40;bordersOut,MAXINT&#41;;colorout&#58;= createparam&#40;'COLOROUT',ptdatafield&#41;;setisinput&#40;COLOROUT,false&#41;; maxscroll&#58;= createparam&#40;'maxscroll',ptdatafield&#41;;setisinput&#40;maxscroll,false&#41;; presetout&#58;= createparam&#40;'presetout',ptdatafield&#41;;setisinput&#40;presetout,false&#41;; SL1&#58;=Tstringlist.create;SLOUT&#58;=Tstringlist.create;   &#40;WAITING_NM&#41;&#58;= FALSE; MSD&#58;=false;OK&#58;=true;page&#58;=0;scroll&#58;=0;L&#58;=16;raj&#58;=0;s&#58;='0';          for i&#58;=0 to nbpresets-1 do begin            setdataArrayvalue&#40;colorsmem,i,COLBAZE&#41;;            s&#58;= S+','+intToStr&#40;i+1&#41;;           end;setstringvalue&#40;cellscap,S&#41;;sendinternalMsg&#40;'SET_STRING_VALUE','LIST','comma text',S&#41;;END;/////////////////////////////////////////Procedure destroy;begin SL1.free; slout.free end;//////////////////////////////////////////////////////////////////Procedure callBack&#40;n &#58; integer&#41;;var i&#58; integer;var nblines&#58; single;BEGINif &#40;n=toall&#41; and &#40;getvalue&#40;toall&#41;=1&#41; then begin          for i&#58;=0 to maxi&#40;nbpresets,L&#41;-1 do begin            setdataArrayvalue&#40;colorsmem,i,getvalue&#40;colorin&#41;&#41;;           U_CELLS&#40;pmnum&#41;;          end;end;if &#40;n=id_clic&#41; then begin     if getvalue&#40;id_clic&#41;>-1 then begin        IDCLIC&#58;= trunc&#40;getvalue&#40;id_clic&#41;&#41;;     end;end;if &#40;n=ScrollIn&#41; or &#40;n=mxsize&#41; or &#40;n=NBCOLS&#41; or &#40;n=commain&#41; then begin   OK&#58;=FALSE;   SL1.commatext&#58;= getstringvalue&#40;commain&#41;;   nbpresets&#58;=SL1.count;   NB_COLS&#58;= trunc&#40;getvalue&#40;NBCOLS&#41;&#41;;   L&#58;= trunc&#40;getvalue&#40;Mxsize&#41;&#41;;   NB_ROWS&#58;= L div NB_COLS;   setLength&#40;arrayout,L&#41;;   setLength&#40;colorsout,L&#41;;   setLength&#40;bordersout,L&#41;;   scrolin&#58;= maxi&#40;0,trunc&#40;mscroll-&#40;getvalue&#40;scrollin&#41;&#41;&#41;&#41;;   scroll&#58;= scrolin*NB_COLS;   U_CAPS; U_CELLS&#40;pmnum&#41;;   nblines&#58;=nbpresets/nb_cols;    if  nblines<>trunc&#40;nblines&#41; then begin    raj&#58;= 1; end else begin raj&#58;=0;end;    Mscroll&#58;=&#40;NBpresets div NB_COLS&#41;-NB_ROWS+&#40;raj&#41;;    setvalue&#40;maxscroll,mscroll&#41;;   end;if &#40;n=colorin&#41; then begin   setdataarrayvalue&#40;colorsMEM,pmnum,getvalue&#40;colorin&#41;&#41;;U_CELLS&#40;pmnum&#41;;   end;if &#40;n=go&#41;and &#40;getvalue&#40;go&#41;=1&#41; then begin    WAITING_NM&#58;=TRUE;    end;if &#40;n=commain&#41; then begin   SL1.commatext&#58;= getstringvalue&#40;commain&#41;;   nbpresets&#58;=SL1.count;U_comma; U_CAPS; U_CELLS&#40;pmnum&#41;;  U_SEL&#40;pmnum&#41;;   end;if &#40;n=txtin&#41; AND &#40;WAITING_NM&#41; then begin    SL1.strings&#91;scroll+idclic&#93;&#58;= getstringvalue&#40;txtin&#41;;U_comma;   &#40;WAITING_NM&#41;&#58;= FALSE;    U_CAPS;    end;               if &#40;n=msdwn&#41; then begin                  MSD&#58;=getvalue&#40;msdwn&#41;=1;                     if &#40;MSD&#41; then begin                         OK&#58;=TRUE;                     end;                     if &#40;not MSD&#41; AND &#40;OK&#41; then begin                     U_SEL&#40;scroll+idclic&#41;;                     U_SEL_COLOR&#40;scroll+idclic&#41;;                     end;                 end;           if &#40;n=num&#41; and &#40;getvalue&#40;num&#41;>-1&#41;then begin             SL1.commatext&#58;= getstringvalue&#40;commain&#41;;             pmnum&#58;= trunc&#40;getvalue&#40;num&#41;&#41;;             U_CELLS&#40;pmnum&#41;;U_SEL&#40;pmnum&#41;;U_SEL_COLOR&#40;pmnum&#41;;             end;END;//////////////////////////////////////////Procedure U_SEL&#40;ID&#58;integer&#41;;begin  if &#40;scroll+idclic&#41;<SL1.count then beginSendInternalMsg&#40;'SET_TARGET_PATCH','SENDER_PATCH'&#41;;SendInternalMsg&#40;'SET_VALUE','LIST','1',FloatToStr&#40;ID&#41;&#41;;SendInternalMsg&#40;'SET_STRING_VALUE','TXT','NAME',SL1.strings&#91;ID&#93;&#41;;SendInternalMsg&#40;'SET_STRING_VALUE','SELECTED','CAPTION',FloatToStr&#40;ID&#41;&#41;;end;end;//////////////////////////////////////////////////////////Procedure U_comma;beginSendInternalMsg&#40;'SET_TARGET_PATCH','SENDER_PATCH'&#41;;sendinternalMsg&#40;'SET_STRING_VALUE','LIST','comma text',SL1.commatext&#41;;end;//////////////////////////////////////////////////////////Procedure U_CAPS;var i&#58;integer;beginSLOUT.clear;for i&#58;= 0 to L-1 do begin     if &#40;i+scroll&#41; < Sl1.count then begin    SLout.add&#40;sl1.strings&#91;i+scroll&#93;&#41;;     end else begin     SLout.add&#40;'-'&#41;;end;   end;setstringvalue&#40;cellscap,Slout.commatext&#41;;end;//ucaps//////////////Procedure U_SEL_COLOR&#40;ID&#58;integer&#41;;beginSendInternalMsg&#40;'SET_TARGET_PATCH','SENDER_PATCH'&#41;;SendInternalMsg&#40;'SET_VALUE','COLOR','color',floatToStr&#40;getdataarrayvalue&#40;colorsmem,ID&#41;&#41;&#41;; end;//////////////////////////////////////////////////////////Procedure U_CELLS&#40;ID&#58;integer&#41;;var i,j, val&#58;integer;beginif &#40;ID>=&#40;scroll&#41;&#41; and &#40;ID<&#40;scroll+L&#41;&#41; then begin    val&#58;=16777215 end else begin val&#58;=colbaze;end;for i&#58;= 0 to L-1 do begin     if i<>&#40;&#40;id-scroll&#41; &#41; then begin     setdataarrayvalue&#40;arrayout,i,0&#41;;     setdataArrayvalue&#40;bordersout,i,getdataarrayvalue&#40;colorsmem,i+scroll&#41;&#41;;     end else begin     setdataarrayvalue&#40;arrayout,i,1&#41;;     setdataarrayvalue&#40;bordersout,i,val&#41;;   end;end;for j&#58;=0 to L-1 do begin  if &#40;j+scroll&#41;< nbpresets then begin  setdataArrayvalue&#40;colorsout,j,getdataarrayvalue&#40;colorsmem,j+scroll&#41;&#41;;  end  else begin  setdataArrayvalue&#40;colorsout,j,colbaze&#41;;end;end;end;//ucaps//////////////

Statistics: Posted by 23fx23 — 23 Nov 2011, 12:11


]]>
2011-11-23T12:13:20+02:00 2011-11-23T12:13:20+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=21917#p21917 <![CDATA[A 512 slot "matrix combobox"]]> Statistics: Posted by 23fx23 — 23 Nov 2011, 11:13


]]>
2011-11-23T10:13:55+02:00 2011-11-23T10:13:55+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=21916#p21916 <![CDATA[A 512 slot "matrix combobox"]]> waiting for this, you can delete the wire colorsout to cell color and now you can change the color cells of the matrix module
you lose the possibilities to change individually the color of each cells but you can use the patch

Statistics: Posted by nay-seven — 23 Nov 2011, 09:13


]]>
2011-11-22T22:49:01+02:00 2011-11-22T22:49:01+02:00 https://brainmodular.org/forums/viewtopic.php?t=3253&p=21915#p21915 <![CDATA[A 512 slot "matrix combobox"]]> i'm using the "256 preset manager" that i pulled to 512 on my slave computer (and it work perfectly for a vst with no program change).
To drive it via OSC on my master computer i use that wonderfull "MX combobox" ,
but i do not manage to make it works with 512 slots:
in the script, i changed NBPRESETS:= 256; by NBPRESETS:= 512; , recompiled it,
but it make black squares and i can't change their color:
Image
I noticed that the [colorsMEM] arrayout of the script is staying at 256 (sometime at 258).
I could put two of them to drive the 512 preset manager, but it's shame...
So, if anybody had an idea about that it would be great ( i'm at 240 presets and i had some 25 per day...).
Thanks,
Bérénice.

edit: noticed some problem with the scroll inertia module and touch screen.

Statistics: Posted by Fléau — 22 Nov 2011, 21:49


]]>