Forums > MaxMSP

generating list for multislider

August 5, 2008 | 10:25 am

hi,
i don’t get it:
I’ve got a 512-Multislider for wavetable-drawing. Drawing and synthesis works fine. Now, I want a random-control to set the 512 sliders. That means, multislider neads a list of 512 Elements. I’ve already tried to collect the (with uzi 512 generated -) Random-values indexed in "coll". But Mutlislider can not handle "dump-outs".
I just don’t get it to generate a "simple" list of 512 Elements for my multislider. any idea? big thx.


August 5, 2008 | 1:38 pm

You might want to look at [thresh] which will pack your 512 random values into a list for [multislider]. This will give you a truly random wave. If you want something a little more musical try using [drunk] instead of [random].

There are ways of stretching this wave to fit the boundaries of 1>x>-1 for your wavetable to get the maximum playback level. There are also ways of smoothing the wave to make it more curvy.

This should help you get started.

lh

max v2;
#N vpatcher 10 59 613 535;
#P window setfont "Sans Serif" 9.;
#P flonum 380 356 67 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 381 80 35 9 1 512 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 381 100 48 196617 fetch $1;
#P newex 90 106 122 196617 expr ($i1-1000.)/1000.;
#P newex 90 125 39 196617 thresh;
#P newex 90 87 70 196617 random 2000;
#P button 90 51 15 0;
#P newex 90 68 44 196617 uzi 512;
#P newex 219 125 39 196617 thresh;
#P newex 219 106 122 196617 expr ($i1-1000.)/1000.;
#P newex 219 87 83 196617 drunk 2000 100;
#P button 219 51 15 0;
#P newex 219 68 44 196617 uzi 512;
#P user multiSlider 90 147 300 207 -1. 1. 255 2681 15 0 0 2 0 0 1;
#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 connect 7 0 6 0;
#P connect 6 0 8 0;
#P connect 8 0 10 0;
#P connect 10 0 9 0;
#P fasten 11 0 0 0 386 144 95 144;
#P connect 9 0 0 0;
#P fasten 5 0 0 0 224 144 95 144;
#P connect 2 0 1 0;
#P connect 1 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P connect 0 1 13 0;
#P connect 12 0 11 0;
#P pop;


August 5, 2008 | 1:56 pm

Oops my bad. The patch above will still work but Max only works with lists up to 256 elements long. The [multislider] should cap itself at this limit anyway so you won’t notice any difference.

lh


August 5, 2008 | 10:03 pm

Quote: johannotto wrote on Tue, 05 August 2008 03:25
—————————————————-
> hi,
> i don’t get it:
> I’ve got a 512-Multislider for wavetable-drawing. Drawing and synthesis works fine. Now, I want a random-control to set the 512 sliders. That means, multislider neads a list of 512 Elements. I’ve already tried to collect the (with uzi 512 generated -) Random-values indexed in "coll". But Mutlislider can not handle "dump-outs".
> I just don’t get it to generate a "simple" list of 512 Elements for my multislider. any idea? big thx.
—————————————————-

No problem with Max 5 (no, I don’t work for Cycling ’74).

– Pasted Max Patch, click to expand. –

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