Forums > MaxMSP

simple questions about coll

December 6, 2007 | 2:34 pm

Hi all

I’ve been trying to figure out how to use coll to store my data. Since pattrstorage has been crashing max! I will mostly store multislider values. The way I figured out how to do this is;

multislider/value N/coll/back directly in multislider. This seems to work but I have a problem with the coll address. I read in the manual that coll recognizes the first int as the adress (this has been true). So of course when I want to store different slider presets having the 1st slider being of the same value , it replaces the last preset having the same adress.

Another thing, which is weird is that it crunches the multislider values. Say I have 256 sliders doing a visual wave, when fetching back my preset in coll I
will oddly get smaller picture version (but the number of sliders stays the same).

Also, when refetching my presets, the adress being odd random values, I tried using the messages next and previous in association with [counter] which is hooked up to the bang of my [value] object. The point is to make it my adress, in order to fetch back in chronological order.

Anyways, any advice on how to use this coll object to store presets would be greats.
One last thing, when I use (command I) on coll , I have the option to save coll with patcher. Does this mean I do not have to use the flag 0 1 message??

thanks alot

phil


December 6, 2007 | 3:05 pm

If pattrstorage is crashing Max, it would be great if you could isolate
the behavior and provide an example so that it can be fixed.

jb

phil wrote:
> Hi all
>
> I’ve been trying to figure out how to use coll to store my data. Since pattrstorage has been crashing max! I will mostly store multislider values. The way I figured out how to do this is;
>
> multislider/value N/coll/back directly in multislider. This seems to work but I have a problem with the coll address. I read in the manual that coll recognizes the first int as the adress (this has been true). So of course when I want to store different slider presets having the 1st slider being of the same value , it replaces the last preset having the same adress.
>
> Another thing, which is weird is that it crunches the multislider values. Say I have 256 sliders doing a visual wave, when fetching back my preset in coll I
> will oddly get smaller picture version (but the number of sliders stays the same).
>
> Also, when refetching my presets, the adress being odd random values, I tried using the messages next and previous in association with [counter] which is hooked up to the bang of my [value] object. The point is to make it my adress, in order to fetch back in chronological order.
>
> Anyways, any advice on how to use this coll object to store presets would be greats.
> One last thing, when I use (command I) on coll , I have the option to save coll with patcher. Does this mean I do not have to use the flag 0 1 message??
>
> thanks alot
>
>
> phil
>


December 6, 2007 | 3:12 pm

Good decision imo. I use colls nearly exclusively for data storage.

A coll object with two primary keys would come in handy at times, but i’m afraid this is undoable technically, the linked list really doesn’t provide for something like that.

Built you a small example of the basic structure. I understand you want to make presets for the multisliders. The way i did this in my patch is to use the index of the coll to store the multislider number as well as the preset number. (preset# * 100 + multislider#). Change the 100 around as you see fit, but do remember that a coll entry can only hold 255 elements)

A lot more functionality (such as fading between presets and such) can be added too, but i won’t tire you with any of that :)
Good luck!

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 13 232 34 196617 s coll;
#P newex 244 232 34 196617 s coll;
#P newex 425 25 60 196617 loadmess 0;
#P newex 473 236 40 196617 % 100;
#P message 596 176 33 196617 clear;
#P newex 425 86 27 196617 t b i;
#P newex 459 152 27 196617 +;
#P newex 476 130 81 196617 r currentpreset;
#P newex 425 130 44 196617 uzi 100;
#P newex 43 163 27 196617 + 1;
#P newex 13 142 27 196617 t b l;
#P newex 13 211 38 196617 zl join;
#P newex 13 191 27 196617 i 1;
#P newex 43 142 81 196617 r currentpreset;
#P newex 157 163 27 196617 + 2;
#P newex 127 142 27 196617 t b l;
#P newex 127 211 38 196617 zl join;
#P newex 127 191 27 196617 i 2;
#P newex 157 142 81 196617 r currentpreset;
#P newex 274 163 27 196617 + 3;
#P newex 244 142 27 196617 t b l;
#P newex 244 211 38 196617 zl join;
#P newex 425 66 38 196617 * 100;
#P newex 244 191 27 196617 i 3;
#P newex 274 142 81 196617 r currentpreset;
#P number 425 46 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 442 108 81 196617 s currentpreset;
#P message 565 176 30 196617 read;
#P message 529 176 35 196617 write;
#P newex 244 37 73 196617 r multislider3;
#P user multiSlider 244 64 87 69 -1. 1. 8 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P newex 127 232 34 196617 s coll;
#P newex 423 216 34 196617 r coll;
#P newex 473 256 128 196617 sprintf send multislider%i;
#P newex 459 282 47 196617 forward;
#P newex 127 37 73 196617 r multislider2;
#P newex 13 37 73 196617 r multislider1;
#P message 471 176 57 196617 sort -1 -1;
#P user multiSlider 127 64 41 69 -1. 1. 4 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 13 64 41 69 -1. 1. 4 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#N coll ;
#P newobj 459 216 53 196617 coll;
#P connect 4 0 1 0;
#P connect 1 0 30 0;
#P connect 30 0 28 0;
#P connect 28 0 29 0;
#P connect 29 0 40 0;
#P connect 31 0 28 1;
#P connect 30 1 29 1;
#P connect 27 0 31 0;
#P connect 5 0 2 0;
#P connect 2 0 25 0;
#P connect 25 0 23 0;
#P connect 23 0 24 0;
#P connect 24 0 9 0;
#P connect 26 0 23 1;
#P connect 25 1 24 1;
#P connect 22 0 26 0;
#P connect 11 0 10 0;
#P connect 10 0 20 0;
#P connect 20 0 17 0;
#P connect 17 0 19 0;
#P connect 19 0 39 0;
#P connect 21 0 17 1;
#P connect 20 1 19 1;
#P connect 16 0 21 0;
#P connect 38 0 15 0;
#P connect 15 0 18 0;
#P connect 18 0 35 0;
#P connect 35 0 32 0;
#P connect 35 1 14 0;
#P connect 32 2 34 0;
#P connect 36 0 0 0;
#P connect 34 0 0 0;
#P connect 13 0 0 0;
#P connect 12 0 0 0;
#P connect 8 0 0 0;
#P connect 3 0 0 0;
#P connect 0 0 6 0;
#P connect 7 0 6 0;
#P connect 0 1 37 0;
#P connect 37 0 7 0;
#P connect 33 0 34 1;
#P window clipboard copycount 41;


December 6, 2007 | 3:18 pm

Oh, and i’d definitely be interested in the pattrstorage bug as well. I read in some other thread that a memory leaking issue has been fixed a while ago, and i haven’t been able to crash it since (although i haven’t spent a great deal of time trying).

But it’s probably too much work to change everything back to pattrstorage now anyway, coll really isn’t that bad of a replacement. It requires you to make some of the functionality of pattrstrorage yourself but it also provides more control and flexibility (and you don’t have to use object names), so it’s not all bad.


December 6, 2007 | 3:19 pm

Sure, I understand that. My point is more that offhandedly mentioning
that ‘xxxx crashes Max’ doesn’t help anyone, whereas taking a little
time to prepare and submit support requests is useful all around. We
don’t ever ship software with known bugs, so if you’re having a problem,
we probably don’t know about it! Let us know…

jb

Bas van der Graaff wrote:
> Oh, and i’d definitely be interested in the pattrstorage bug as well. I read in some other thread that a memory leaking issue has been fixed a while ago, and i haven’t been able to crash it since (although i haven’t spent a great deal of time trying).
>
> But it’s probably too much work to change everything back to pattrstorage now anyway, coll really isn’t that bad of a replacement. It requires you to make some of the functionality of pattrstrorage yourself but it also provides more control and flexibility (and you don’t have to use object names), so it’s not all bad.
> –
> SmadSteck – http://www.smadsteck.nl
> Hard- and software for interactive audiovisual sampling


December 7, 2007 | 6:24 am

Hi Bas,
Now I think I’m even more confused. I spent some time trying to understand you patch (by the way thanks for the generosity). But it has got me more confused ! And also what does imo stand for ?? I am not a literal type of person , but when learning max on my own I have to take everything into account!! Below is your patch with all of my questions. And has my version of your patch indicates, I don’t know C language.

thanks a lot for your efforts
Hope to hear from you soon

phil

#P window setfont "Sans Serif" 9.;
#P window linecount 3;
#P comment 967 365 100 196617 blue objects , but I don’t understand the blue object’s * 100;
#P window linecount 0;
#P newex 944 372 19 196617;
#B color 1;
#P window linecount 2;
#P comment 840 368 101 196617 red objects are receiving from the;
#P window linecount 4;
#P comment 604 113 92 196617 why not patch this one directly? I suspect a timming issue?;
#P window linecount 0;
#P newex 816 367 22 196617;
#B color 4;
#P window linecount 2;
#P comment 650 258 244 196617 I read in manual that sprintf is like printf in Clanguage;
#P comment 560 231 244 196617 why modulo 100? does have something to do with C language or is it a modulo?;
#P number 391 469 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 319 502 72 196617 prepend store;
#P objectname gil[2];
#P message 434 479 69 196617 clientwindow;
#P newex 322 478 27 196617 i;
#P message 429 500 78 196617 storagewindow;
#P number 349 447 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 325 453 15 0;
#P newex 366 527 81 196617 pattrstorage gil;
#X client_rect 34 89 674 329;
#X storage_rect 44 104 684 344;
#P objectname gil[1];
#P newex 97 411 66 196617 autopattr gil;
#X prestore multiSlider 256 0 -0.093023 -0.860465 -0.813953 -0.813953 -0.802326 -0.790698 -0.790698 -0.767442 -0.75969 -0.751938 -0.744186 -0.734219 -0.724252 -0.714286 -0.704319 -0.694352 -0.684385 -0.674419 -0.665116 -0.655814 -0.646512 -0.325581 -0.325581 -0.325581 -0.325581 -0.325581 -0.325581 -0.319767 -0.313953 -0.30814 -0.302326 -0.296512 -0.290698 -0.284884 -0.27907 -0.276956 -0.274841 -0.272727 -0.270613 -0.268499;
#X prestore multiSlider 256 40 -0.266385 -0.264271 -0.262156 -0.260042 -0.257928 -0.255814 -0.255814 -0.255814 -0.255814 -0.255814 -0.255814 -0.255814 -0.255814 -0.255814 -0.255814 -0.255814 -0.251938 -0.248062 -0.244186 -0.24031 -0.236434 -0.232558 -0.230769 -0.22898 -0.227191 -0.225403 -0.223614 -0.221825 -0.220036 -0.218247 -0.216458 -0.214669 -0.21288 -0.211091 -0.209302 -0.209302 -0.209302 -0.209302 -0.209302 -0.209302;
#X prestore multiSlider 256 80 -0.209302 -0.209302 -0.209302 -0.209302 -0.2 -0.190698 -0.181395 -0.172093 -0.162791 -0.160677 -0.158562 -0.156448 -0.154334 -0.15222 -0.150106 -0.147992 -0.145877 -0.143763 -0.141649 -0.139535 -0.130233 -0.12093 -0.111628 -0.102326 -0.093023 -0.083721 -0.074419 -0.065116 -0.055814 -0.046512 -0.037209 -0.027907 -0.018605 -0.009302 0. 0.009302 0.018605 0.027907 0.037209 0.046512;
#X prestore multiSlider 256 120 0.055233 0.063953 0.072674 0.081395 0.090116 0.098837 0.107558 0.116279 0.139535 0.162791 0.174419 0.186047 0.209302 0.209302 0.209302 0.209302 0.209302 0.209302 0.209302 0.209302 0.209302 0.203488 0.197674 0.19186 0.186047 0.172757 0.159468 0.146179 0.13289 0.119601 0.106312 0.093023 0.083056 0.07309 0.063123 0.053156 0.043189 0.033223 0.023256 0.014535;
#X prestore multiSlider 256 160 0.005814 -0.002907 -0.011628 -0.020349 -0.02907 -0.037791 -0.046512 -0.057082 -0.067653 -0.078224 -0.088795 -0.099366 -0.109937 -0.120507 -0.131078 -0.141649 -0.15222 -0.162791 -0.17608 -0.189369 -0.202658 -0.215947 -0.229236 -0.242525 -0.255814 -0.27907 -0.302326 -0.372093 -0.395349 -0.418605 -0.418605 -0.418605 -0.418605 -0.418605 -0.418605 -0.418605 -0.418605 -0.418605 -0.418605 -0.418605;
#X prestore multiSlider 256 200 -0.418605 -0.415814 -0.413023 -0.410233 -0.407442 -0.404651 -0.40186 -0.39907 -0.396279 -0.393488 -0.390698 -0.387907 -0.385116 -0.382326 -0.379535 -0.376744 -0.373953 -0.371163 -0.368372 -0.365581 -0.362791 -0.36 -0.357209 -0.354419 -0.351628 -0.348837 -0.346346 -0.343854 -0.341362 -0.33887 -0.336379 -0.333887 -0.331395 -0.328904 -0.326412 -0.32392 -0.321429 -0.318937 -0.316445 -0.313953;
#X prestore multiSlider 256 240 -0.311462 -0.30897 -0.306478 -0.303987 -0.301495 -0.299003 -0.296512 -0.29402 -0.291528 -0.289037 -0.286545 -0.284053 -0.281561 -0.27907 -0.255814 -0.186047;
#P objectname gil;
#P message 27 417 49 196617 size 256;
#P user multiSlider 48 448 266 88 -1. 1. 256 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P objectname multiSlider;
#P newex 60 233 34 196617 s coll;
#P newex 291 233 34 196617 s coll;
#P newex 472 26 60 196617 loadmess 0;
#P newex 520 237 40 196617 % 100;
#P message 643 177 33 196617 clear;
#P newex 472 87 27 196617 t b i;
#P newex 506 153 27 196617 +;
#P newex 523 131 81 196617 r currentpreset;
#B color 4;
#P newex 472 131 44 196617 uzi 100;
#P newex 90 164 27 196617 + 1;
#P newex 60 143 27 196617 t b l;
#P newex 60 212 38 196617 zl join;
#P newex 60 192 27 196617 i 1;
#P newex 90 143 81 196617 r currentpreset;
#B color 4;
#P newex 204 164 27 196617 + 2;
#P newex 174 143 27 196617 t b l;
#P newex 174 212 38 196617 zl join;
#P newex 174 192 27 196617 i 2;
#P newex 204 143 81 196617 r currentpreset;
#B color 4;
#P newex 321 164 27 196617 + 3;
#P newex 291 143 27 196617 t b l;
#P newex 291 212 38 196617 zl join;
#P newex 472 67 38 196617 * 100;
#P newex 291 192 27 196617 i 3;
#P newex 321 143 81 196617 r currentpreset;
#B color 4;
#P number 472 47 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 489 109 81 196617 s currentpreset;
#B color 1;
#P message 612 177 30 196617 read;
#P message 576 177 35 196617 write;
#P newex 291 38 73 196617 r multislider3;
#P user multiSlider 291 65 87 69 -1. 1. 8 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P newex 174 233 34 196617 s coll;
#P newex 445 202 34 196617 r coll;
#B color 4;
#P newex 520 257 128 196617 sprintf send multislider%i;
#P newex 506 283 47 196617 forward;
#P newex 174 38 73 196617 r multislider2;
#P newex 60 38 73 196617 r multislider1;
#P message 518 177 57 196617 sort -1 -1;
#P user multiSlider 174 65 41 69 -1. 1. 4 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 61 68 41 69 -1. 1. 4 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#N coll ;
#P newobj 506 217 53 196617 coll;
#P window setfont "Sans Serif" 12.;
#P window linecount 4;
#P comment 511 479 100 196620 how much more simple can you get for a beginner?;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 513 70 68 196617 why * 100?;
#P window setfont "Sans Serif" 18.;
#P window linecount 5;
#P comment 769 42 353 196626 I don’t want seem helpless and more so that I not trying to figure things out by myself , but for a beginner coll is just not as simple as pattrstorage. And plus I don’t know Clanguage.;
#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P comment 442 129 28 196617 why uzi?;
#P window linecount 3;
#P comment 779 364 34 196617 So I see the;
#P user panel 766 342 342 113;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 14 403 626 147;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 50 0 48 0;
#P connect 49 0 48 0;
#P connect 8 0 37 0;
#P connect 37 0 35 0;
#P connect 35 0 36 0;
#P connect 36 0 47 0;
#P connect 11 0 8 0;
#P connect 38 0 35 1;
#P connect 37 1 36 1;
#P connect 34 0 38 0;
#P connect 12 0 9 0;
#P connect 9 0 32 0;
#P connect 32 0 30 0;
#P connect 30 0 31 0;
#P connect 31 0 16 0;
#P connect 33 0 30 1;
#P connect 32 1 31 1;
#P connect 29 0 33 0;
#P connect 18 0 17 0;
#P connect 17 0 27 0;
#P connect 27 0 24 0;
#P connect 24 0 26 0;
#P connect 26 0 46 0;
#P connect 28 0 24 1;
#P connect 27 1 26 1;
#P connect 55 0 57 0;
#P connect 23 0 28 0;
#P connect 52 0 55 0;
#P connect 53 0 55 1;
#P connect 58 0 51 0;
#P connect 57 0 51 0;
#P connect 54 0 51 0;
#P connect 56 0 51 0;
#P connect 45 0 22 0;
#P connect 22 0 25 0;
#P connect 25 0 42 0;
#P connect 42 0 39 0;
#P connect 42 1 21 0;
#P connect 39 2 41 0;
#P connect 10 0 7 0;
#P connect 15 0 7 0;
#P connect 19 0 7 0;
#P connect 20 0 7 0;
#P connect 41 0 7 0;
#P connect 43 0 7 0;
#P connect 14 0 13 0;
#P connect 7 0 13 0;
#P connect 7 1 44 0;
#P connect 44 0 14 0;
#P connect 40 0 41 1;
#P window clipboard copycount 66;

Date: Thu, 6 Dec 2007 16:12:58 +0100
To: philippehughes@hotmail.com
Subject: New reply to Re: simple questions about coll by Bas van der Graaff
From: loadbang@cycling74.com

Subject: Re: simple questions about coll Author: Bas van der Graaff Date: Thu, 06 December 2007 16:12
Good decision imo. I use colls nearly exclusively for data storage.

A coll object with two primary keys would come in handy at times, but i’m afraid this is undoable technically, the linked list really doesn’t provide for something like that.

Built you a small example of the basic structure. I understand you want to make presets for the multisliders. The way i did this in my patch is to use the index of the coll to store the multislider number as well as the preset number. (preset# * 100 + multislider#). Change the 100 around as you see fit, but do remember that a coll entry can only hold 255 elements)

A lot more functionality (such as fading between presets and such) can be added too, but i won’t tire you with any of that :)
Good luck!

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 13 232 34 196617 s coll;
#P newex 244 232 34 196617 s coll;
#P newex 425 25 60 196617 loadmess 0;
#P newex 473 236 40 196617 % 100;
#P message 596 176 33 196617 clear;
#P newex 425 86 27 196617 t b i;
#P newex 459 152 27 196617 +;
#P newex 476 130 81 196617 r currentpreset;
#P newex 425 130 44 196617 uzi 100;
#P newex 43 163 27 196617 + 1;
#P newex 13 142 27 196617 t b l;
#P newex 13 211 38 196617 zl join;
#P newex 13 191 27 196617 i 1;
#P newex 43 142 81 196617 r currentpreset;
#P newex 157 163 27 196617 + 2;
#P newex 127 142 27 196617 t b l;
#P newex 127 211 38 196617 zl join;
#P newex 127 191 27 196617 i 2;
#P newex 157 142 81 196617 r currentpreset;
#P newex 274 163 27 196617 + 3;
#P newex 244 142 27 196617 t b l;
#P newex 244 211 38 196617 zl join;
#P newex 425 66 38 196617 * 100;
#P newex 244 191 27 196617 i 3;
#P newex 274 142 81 196617 r currentpreset;
#P number 425 46 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 442 108 81 196617 s currentpreset;
#P message 565 176 30 196617 read;
#P message 529 176 35 196617 write;
#P newex 244 37 73 196617 r multislider3;
#P user multiSlider 244 64 87 69 -1. 1. 8 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P newex 127 232 34 196617 s coll;
#P newex 423 216 34 196617 r coll;
#P newex 473 256 128 196617 sprintf send multislider%i;
#P newex 459 282 47 196617 forward;
#P newex 127 37 73 196617 r multislider2;
#P newex 13 37 73 196617 r multislider1;
#P message 471 176 57 196617 sort -1 -1;
#P user multiSlider 127 64 41 69 -1. 1. 4 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 13 64 41 69 -1. 1. 4 2681 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#N coll ;
#P newobj 459 216 53 196617 coll;
#P connect 4 0 1 0;
#P connect 1 0 30 0;
#P connect 30 0 28 0;
#P connect 28 0 29 0;
#P connect 29 0 40 0;
#P connect 31 0 28 1;
#P connect 30 1 29 1;
#P connect 27 0 31 0;
#P connect 5 0 2 0;
#P connect 2 0 25 0;
#P connect 25 0 23 0;
#P connect 23 0 24 0;
#P connect 24 0 9 0;
#P connect 26 0 23 1;
#P connect 25 1 24 1;
#P connect 22 0 26 0;
#P connect 11 0 10 0;
#P connect 10 0 20 0;
#P connect 20 0 17 0;
#P connect 17 0 19 0;
#P connect 19 0 39 0;
#P connect 21 0 17 1;
#P connect 20 1 19 1;
#P connect 16 0 21 0;
#P connect 38 0 15 0;
#P connect 15 0 18 0;
#P connect 18 0 35 0;
#P connect 35 0 32 0;
#P connect 35 1 14 0;
#P connect 32 2 34 0;
#P connect 36 0 0 0;
#P connect 34 0 0 0;
#P connect 13 0 0 0;
#P connect 12 0 0 0;
#P connect 8 0 0 0;
#P connect 3 0 0 0;
#P connect 0 0 6 0;
#P connect 7 0 6 0;
#P connect 0 1 37 0;
#P connect 37 0 7 0;
#P connect 33 0 34 1;
#P window clipboard copycount 41;



jln
December 7, 2007 | 11:10 am


December 7, 2007 | 6:13 pm

You can simply "prepend #" before saving the multislider into the coll, so it will have whatever index you want. Try this:

———————
#P window setfont "Sans Serif" 14.;
#P window linecount 3;
#P comment 410 551 401 9109518 though if it’s crashing that needs to be addressed… I’ve never had problems with it. try to isolate the problem and post it on the thread.;
#P window linecount 1;
#P comment 57 651 520 9109518 not sure of coll’s list size limit — it’s more than 256 , right?;
#P comment 410 493 154 9109518 auto-interpolation!;
#P comment 409 440 609 9109518 pattr is much more flexible imo (which stands for "in my opinion" , by the way) :);
#P comment 190 475 154 9109518 retrieve index #;
#P message 79 446 111 9109518 clear;
#P window setfont "Sans Serif" 18.;
#P number 123 472 60 18 1 999 7 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#N coll ;
#P newobj 59 475 53 9109518 coll;
#P message 104 390 58 9109518 set $1;
#P window setfont "Sans Serif" 18.;
#P number 104 359 60 18 1 999 7 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 59 419 92 9109518 prepend 1;
#P user multiSlider 59 76 766 258 0. 127. 100 2921 15 0 1 2 0 0 0;
#M frgb 255 42 42;
#M brgb 0 0 0;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P window linecount 2;
#P comment 172 363 418 9109518 set current index # and change multislider — it even keeps key focus here so just use arrow keys;
#P connect 7 0 5 0;
#P fasten 5 0 1 0 37 498 37 48;
#P connect 6 0 5 0;
#P connect 2 0 5 0;
#P connect 4 0 2 0;
#P connect 3 0 4 0;
#P connect 1 0 2 0;
#P window clipboard copycount 13;


December 7, 2007 | 9:19 pm

Hi Cj

Thanks a lot for the patch. This is exactly it! Although, this is exactly what I thought I did before first posting on the forum. I am suprise to se that coll does not react like a message box! (Or am I mixing things up?). What I had done was have multislider into [value N].[prepend $1,]– [set ]and was testing it with a message box. But then I couldn’t get the N,< -- comma and the list or anything in the message box for that matter.
Anyways, I’ve adjusted your patch with a sort of gate for the multi and N box with an [int] and [value N] hooked to bang , so that I can decide on when multi values are entered.

One last question. Does having a message [set $1] replace the argument 1 in [prepend 1]. Why not have [prepend set $1]. And does [coll] automatically add a comma when a [prepend N] is hooked up to it?

Many many thanks for helping me learn this wonderful software.

phil


December 7, 2007 | 9:22 pm


December 7, 2007 | 9:28 pm

Hi Jeremy

I did send you an isolated part of my patch, that making my max. Did you get it?

Now I’m realiszing that maybe I’ve been sending everything to the wrong place GOD!!
Sending all to loadbang@cycling74.com
sheesh!

thanks
phil


December 8, 2007 | 12:37 am

Glad things are working for you. Yep, the coll will add the comma by itself, it’s to isolate the index number from the data. Likewise it takes it away (and the index number) when you access the data.

The question about the "prepend" is *sort of* straightforward, but I’d take another look at the message and prepend help files… I often make mistakes with the differences. You can prepend and append using a message box, but also with the prepend object… and there’s *some* overlap as to what they can do. Really though you’re generally going to be OK with the object rather than the message box, but the message version works for certain stuff. It also takes the $1 argument, whereas the object doesn’t. That’s why you want the "set $1" going into the prepend — it holds the value and waits for data in (multislider list in this case) and sticks the number in front as an index.

Try this new patch — it has a pattr version, see if it still crashes your machine?? Also it has *mtr* which is a great object to know about. In this case it records how you access your pattr presets… so one changing number recalls whole lists of interpolated data, and the changes you make can be played back. Very powerful possibilities when used like this, as you might imagine (think multi as lists of velocities, pitches, brightness levels, speed of playback over time, access to other multis, etc. etc… all of which can be accessed whenever you want, either the whole list at once out the left outlet, or use the fetch $1 message for single sliders out the right.)

This is a totally simple mtr, there are other options for variable-rate playback, etc. (like seq, seq~, or there’s a trick to doing it with a single-element mtr, by using "next" and delays instead of "play".)

Warning: Max is very addictive.

——————————————

#P window setfont "Sans Serif" 14.;
#P window linecount 1;
#P message 549 720 111 9109518 clear;
#P window setfont "Sans Serif" 10.;
#P comment 52 754 211 9109514 (hidden to not store constantly);
#P window setfont "Sans Serif" 14.;
#P message 406 720 128 9109518 storagewindow;
#P message 280 720 109 9109518 clientwindow;
#P comment 750 759 207 9109518 record your accessing !;
#P window setfont "Sans Serif" 18.;
#P user umenu 577 757 106 9109579 1 64 783 0;
#X add stop;
#X add record;
#X add play;
#X add read;
#X add write;
#X add clear;
#P window setfont "Sans Serif" 14.;
#P newex 692 758 49 9109518 mtr 1;
#P comment 754 728 187 9109518 or float — interpolates;
#P comment 754 695 154 9109518 access by integer;
#P window setfont "Sans Serif" 18.;
#P flonum 687 723 60 18 1. 999. 7 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P number 687 692 60 18 1 999 7 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P comment 312 382 335 9109518 try pattr version — still crashing?;
#P newex 286 749 206 9109518 pattrstorage multi_patch;
#X client_rect 15 55 655 295;
#X storage_rect 15 55 655 295;
#P objectname multi_patch;
#P newex 43 390 132 9109518 pattr multislider;
#X prestore 100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#X prestore 100 41 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#X prestore 100 82 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#P objectname multislider;
#P button 118 691 33 0;
#P hidden message 172 729 75 9109518 store $1;
#P hidden number 118 728 48 14 1 999 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 47 727 58 9109518 set $1;
#P window setfont "Sans Serif" 18.;
#P number 47 696 60 18 1 999 7 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P user multiSlider 38 420 766 258 0. 127. 100 2921 15 0 1 2 0 0 0;
#M frgb 1 241 247;
#M brgb 0 0 0;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P objectname multiSlider;
#P window setfont "Sans Serif" 14.;
#P comment 177 691 456 9109518 set current preset # , change multislider , then bang to store;
#P comment 164 308 154 9109518 retrieve index #;
#P message 53 279 111 9109518 clear;
#P window setfont "Sans Serif" 18.;
#P number 97 305 60 18 1 999 7 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#N coll ;
#P newobj 33 308 53 9109518 coll;
#P message 78 223 58 9109518 set $1;
#P window setfont "Sans Serif" 18.;
#P number 78 192 60 18 1 999 7 139 255 255 255 0 0 0 222 222 222 0 0 0;
#P window setfont "Sans Serif" 14.;
#P newex 33 252 92 9109518 prepend 1;
#P user multiSlider 34 21 760 158 0. 127. 100 2921 15 0 1 2 0 0 0;
#M frgb 255 42 42;
#M brgb 0 0 0;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P window linecount 2;
#P comment 146 196 418 9109518 set current index # and change multislider — it even keeps key focus here so just use arrow keys;
#P user panel 34 355 778 5;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P hidden connect 2 0 3 0;
#P hidden connect 5 0 3 0;
#P hidden connect 3 0 6 0;
#P hidden connect 7 0 6 0;
#P hidden connect 8 0 6 0;
#P fasten 6 0 2 0 16 331;
#P hidden connect 17 1 11 0;
#P hidden connect 12 0 13 0;
#P hidden connect 4 0 5 0;
#P hidden connect 16 0 14 0;
#P hidden connect 13 0 14 0;
#P hidden connect 14 0 15 0;
#P hidden connect 21 0 18 0;
#P connect 30 0 18 0;
#P connect 28 0 18 0;
#P connect 27 0 18 0;
#P hidden connect 15 0 18 0;
#P hidden connect 24 1 21 0;
#P hidden connect 20 0 21 0;
#P hidden connect 25 1 24 0;
#P hidden connect 21 0 24 1;
#P window clipboard copycount 31;


December 8, 2007 | 8:36 pm

WOW! CJ ! that’s amazing stuff ! The possibilities.

>Warning: Max is very addictive.
I totally agree, I’ve been doing nothing but in the past few months.

Your second patch set up involving pattr and mtr has not been making my max crash although I have not intergrated it to my master patch that was making max crash.

I will definately further explore this mtr object. Where and how are your actions recorded??

Again, thanks a lot every time you’ve replied, I move from a max plateau. Unclogging the clusters of questions

Cheers

phil


December 8, 2007 | 9:07 pm

The mtr records only one sequence at a time, but up to 32 tracks (see help file). It’s just a text list of "track #" and "duration" and "value" for each track. You can write and read these files back into your mtr for use whenever. It *won’t* do lists (except some particular ones like the RGB of Swatch)… you have to unpack them and record individual tracks. Look into seq~ too: only a few tracks, but variable-rate playback and multiple sequences at once, yum.

Hope the pattr continues to work, it’s really amazing what it can do… there’s also other kinds of interpolation available besides linear (default). It’s fun just to watch the multisliders, without them even doing anything, heh. When you start thinking of your values and lists as abstract, where they can control anything you want, the possibilities really start to multiply (this can be a blessing and a curse). Experiment a lot but try to eventually limit yourself to a direction, and you’ll have better chances of getting a patch done that you use a lot rather than having it collect dust… most of mine do this, argh. ;)

–CJ


December 8, 2007 | 10:20 pm

i am obsessed with utilizing my mouse to control a majority
of things in my patch. i would like to use the lcd to
control rapid fire samples, which i would further
manipulate in real time

Here is a midi example of the gist i would like to do, but
i want the lcd to trigger samples via buffer~ (which i also
use alot).

max v2;
#N vpatcher 100 100 464 463;
#P user lcd 18 34 128 128 1 1 0 0 0;
#P window setfont "Sans Serif" 9.;
#P number 17 169 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222
0 0 0;
#P window linecount 1;
#P newex 16 220 67 196617 noteout 10;
#P newex 16 192 88 196617 makenote 80 100;
#P window setfont Arial 10.;
#P window linecount 7;
#P comment 163 43 100 131137546 i would like to do a
similar concept but trigger samples instead of midi notes.
Any help is appreciated. thanks!;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P connect 4 0 3 0;
#P connect 1 1 2 1;
#P pop;

Any help would be appreciated. Thanks!
-chuck

Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping


December 8, 2007 | 10:32 pm

some ideas… you’ll have to get into the MSP objects to manage samples. I listed some of them in the patch. The LCD control idea is pretty cool; you could also use a pictctrl and customize the appearance if you want.

——————————–

#P window setfont "Sans Serif" 10.;
#P window linecount 1;
#P comment 112 182 160 9109514 pitch and velocity;
#P window linecount 2;
#P comment 353 261 160 9109514 groove~ , waveform~ , gizmo~ for pitch , sig~ for speed , etc.;
#P window linecount 4;
#P comment 352 159 160 9109514 I’d probably use X for pan and Y for volume , at least for the main control. Other controls could be for FX , speed , pitch , etc.;
#P window linecount 6;
#P comment 117 268 93 9109514 to trigger you’ll have to decide how this happens , maybe through ranges of X , or some other means.;
#P comment 354 57 93 9109514 you have the two values — X and Y — so whatever pairs parameters of the sample you want can be controlled.;
#P window setfont "Sans Serif" 9.;
#P number 66 210 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 27 181 67 9109513 unpack 0 0;
#P user lcd 25 41 128 128 1 1 0 0 0;
#P number 23 210 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 22 261 58 9109513 noteout 1;
#P newex 22 233 88 9109513 makenote 80 100;
#P window setfont "Sans Serif" 10.;
#P window linecount 7;
#P comment 170 50 93 9109514 i would like to do a similar concept but trigger samples instead of midi notes. Any help is appreciated. thanks!;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P connect 5 0 3 0;
#P connect 4 0 5 0;
#P connect 1 1 2 1;
#P connect 6 0 1 1;
#P connect 5 1 6 0;
#P window clipboard copycount 12;


December 9, 2007 | 6:28 am

hi cj
thanks for more insights.
I completely agree with you on avoiding the dust collection. That’s why I must absolutely have a weekly music project going on with other people. It forces me to make decisions on what to keep and not , and when testing an idea with a band, you see right away what needs to be change for effeciency in live situations. Otherwise I’m screwed.

Thanks a lot for your time. I really recognize your effort.

phil


December 10, 2007 | 9:37 am

Sorry for not replying earlier, i was away. I think jln did a pretty good job there, thanks.

I mistakenly thought you were also planning to use multiple multisliders (or even different gui elements), which would be possible with my example.

But Seejay’s example does fine as well…


December 10, 2007 | 2:48 pm

Thanks for the response Bas.

No I know, your patch is great and I will study it further to attain more possibilities.

Again thanks

phil


December 10, 2007 | 10:56 pm

Bas van der Graaff schrieb:
> (and you don’t have to use object names), so it’s not all bad.

But the automatic object naming and navigation through the patcher
hierarchies is the best about the pattr system. Can’t live without it,
use it all over the place…
Must have been a pain to get this functionality put into colls…

I guess its even less pain to learn the pattr system than just
maintaining a selfmade one…

To add a parameter I want to store in a preset, I don’t need to patch
anything, just give it a name – how do you do that with colls?

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


December 11, 2007 | 10:18 am

>
> To add a parameter I want to store in a preset, I don’t need to patch
> anything, just give it a name – how do you do that with colls?
>
> Stefan
>

Ehm, you don’t :)

But I have something against object names – it’s probably because you cannot see them at a glance. Wouldn’t it be useful to hold some keyboard key and see all object names?

The only other thing i have against pattrs are their speed (you probably read the oo thread). For example, when interpolating between 2 stores in my coll i can generate a list of the ones that actually change value and only update those. Especially when using lot of ui objects (some of which jsui) , this makes for a big speed increase. Also, just getting values to process them but not updating my gui at all is a lot easier.

Pattrstorage nearly has everything i want it to, but not quite. But maybe i should re-evaluate at some point…


Viewing 21 posts - 1 through 21 (of 21 total)