Forums > MaxMSP

list as waveform

February 8, 2006 | 3:58 pm

i’ve made a semi-random list generator (easy part)
and i want to use it as a waveform.
(i’m using a multislider as a viewingscreen)

my problem is how to get it (that list) in the buffer~ object.
i am currently trying coll 2 peek~ but it’s not working out..
anyway, it is too much work to use a coll when using 512 floats.
before that i tried a table .. got stuck there too.

so can anyone steer me in the right direction?

/attachment not working
why?

ps: using max 4.05 on a G3


February 8, 2006 | 4:11 pm

max v2;
#N vpatcher 114 139 418 624;
#P newex 46 401 65 196617 cycle~ wave;
#P newex 46 347 90 196617 buffer~ wave 100;
#P newex 46 316 61 196617 peek~ wave;
#P comment 132 79 100 196617 random factor;
#P number 72 55 29 9 10 256 35 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 100 78 29 9 1 256 35 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 31 388 296 699;
#P newex 134 88 27 196617 + 1;
#N comlet list range (def/max=256) [0-256];
#P inlet 106 42 15 0;
#N comlet new list [bang];
#P inlet 76 42 15 0;
#N comlet step size [1-127];
#P inlet 134 42 15 0;
#P outlet 76 234 15 0;
#P newex 76 181 38 196617 / 100.;
#P newex 76 157 108 196617 zmap 0 200 -100 100;
#P newex 76 208 59 196617 zl group 10;
#P newex 76 101 40 196617 uzi 10;
#P newex 76 130 69 196617 drunk 200 12;
#P connect 7 0 1 0;
#P connect 1 0 0 0;
#P connect 0 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 2 0;
#P connect 2 0 5 0;
#P connect 8 0 1 1;
#P fasten 8 0 2 1 111 71 194 71 194 179 130 179;
#P connect 6 0 9 0;
#P connect 9 0 0 2;
#P pop;
#P newobj 44 103 67 196617 p BLG;
#P button 44 28 15 0;
#P user multiSlider 44 213 142 57 -1. 1. 31 2681 15;
#M frgb 0 0 0;
#M brgb 255 255 255;
#P comment 116 105 132 196617 < --the random generator;
#P comment 103 55 100 196617 # sliders;
#P comment 62 28 100 196617 generate;
#P comment 45 276 130 196617 to get this list to the buffer;
#P connect 5 0 6 0;
#P connect 6 0 4 0;
#P connect 8 0 6 1;
#P connect 7 0 6 2;
#P pop;


February 8, 2006 | 4:36 pm


February 8, 2006 | 4:41 pm


February 8, 2006 | 4:50 pm

> my problem is how to get it (that list) in the buffer~ object.
> i am currently trying coll 2 peek~ but it’s not working out..
> anyway, it is too much work to use a coll when using 512 floats.
> before that i tried a table .. got stuck there too.

hi
don’t use a list in the first place (limited to 256 elements)
just poke your data into buffer value by value.
v

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 76 153 92 196617 zmap 0 200 -1. 1.;
#P newex 233 177 27 196617 – 1;
#P newex 207 208 63 196617 poke~ wave;
#P newex 134 88 27 196617 + 1;
#N comlet list range (def/max=256) [0-256];
#P inlet 106 42 15 0;
#N comlet new list [bang];
#P inlet 76 42 15 0;
#N comlet step size [1-127];
#P inlet 134 42 15 0;
#P outlet 76 234 15 0;
#P newex 76 208 59 196617 zl group 10;
#P newex 76 101 40 196617 uzi 10;
#P newex 76 130 69 196617 drunk 200 12;
#P connect 10 0 2 0;
#P connect 10 0 8 0;
#P connect 0 0 10 0;
#P connect 9 0 8 1;
#P fasten 1 2 9 0 111 122 238 122;
#P connect 7 0 0 2;
#P connect 4 0 7 0;
#P fasten 6 0 2 1 111 71 194 71 194 179 130 179;
#P connect 6 0 1 1;
#P connect 2 0 3 0;
#P connect 1 0 0 0;
#P connect 5 0 1 0;
#P window clipboard copycount 11;


February 8, 2006 | 5:17 pm

construct5 wrote:
> see attachment…
>
> so can anyone steer me in the right direction?

Now that I’ve found the attachment :)

I would skip the big list -> peek stage and write directly to peek; you
have the index numbers courtesy of your uzi, so you can feed the uzi
index and the random number into [pack. 0 0] which makes a two member
list that can be fed straight into peek’s left inlet via a [deferlow]
(otherwise nothing seems to happen on my box :).

You’ll probably want to make sure you size the buffer correctly before
populating it.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 136 144 100 9109513 generate;
#P window setfont "Sans Serif" 14.;
#P newex 105 399 54 9109518 r buffer;
#P window setfont "Sans Serif" 9.;
#P comment 194 195 100 9109513 random factor;
#P number 134 171 38 9 10 1024 35 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 162 194 29 9 1 256 35 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 168 171 100 9109513 # sliders;
#P button 106 144 15 0;
#N vpatcher 476 226 1060 602;
#P window setfont "Sans Serif" 14.;
#P newex 147 285 61 9109518 deferlow;
#P button 85 38 15 0;
#P newex 155 245 66 9109518 pack 0 0.;
#P newex 16 265 56 9109518 s buffer;
#P newex 58 159 87 9109518 sampstoms~;
#P newex 124 59 36 9109518 t b b;
#P message 75 226 52 9109518 size $1;
#P newex 109 110 27 9109518 i;
#P newex 129 324 83 9109518 peek~ wave;
#P window setfont "Sans Serif" 9.;
#P newex 231 99 27 9109513 + 1;
#N comlet list range (def/max=256) [0-256];
#P inlet 203 53 15 0;
#N comlet new list [bang];
#P inlet 124 39 15 0;
#N comlet step size [1-127];
#P inlet 231 53 15 0;
#P newex 188 167 81 9109513 zmap 0 200 -1. 1.;
#P newex 176 92 40 9109513 uzi 10;
#P newex 173 141 69 9109513 drunk 200 12;
#P connect 9 0 12 0;
#P connect 8 0 11 0;
#P connect 11 1 9 0;
#P connect 10 0 8 0;
#P connect 14 0 10 0;
#P connect 4 0 10 0;
#P connect 5 0 8 1;
#P connect 15 0 7 0;
#P connect 13 0 15 0;
#P connect 1 2 13 0;
#P connect 1 0 0 0;
#P connect 10 1 1 0;
#P connect 0 0 2 0;
#P connect 5 0 1 1;
#P connect 2 0 13 1;
#P connect 3 0 6 0;
#P connect 6 0 0 2;
#P pop;
#P newobj 106 230 67 9109513 p BLG;
#P window setfont "Sans Serif" 9.;
#P newex 106 432 90 196617 buffer~ wave 100;
#P connect 7 0 0 0;
#P connect 4 0 1 2;
#P connect 5 0 1 1;
#P connect 2 0 1 0;
#P window clipboard copycount 9;


February 8, 2006 | 6:41 pm

On around Feb 8, 2006, at 16:58, construct5 said something like:
> see attachment…

Now that I’ve seen it…

You may find the Brownian noise generator from Litter Power, lp.pfff~,
a good deal more efficient. Record it into a buffer~ if you want to
loop it or something.

pfff~ is in the free Litter Starter Pack (URI down below). There is a
more flexible lp.pvvv~ object in Litter Pro that allows you to adjust
the "color" of the noise continuously. You can get similar effects with
lp.lll~. And more…

Here’s an example doing what you wanted with lp.pfff~.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 33 183 100 196617 storage here;
#P toggle 517 42 15 0;
#P message 517 61 68 196617 loopinterp $1;
#P newex 425 62 81 196617 loadmess loop 1;
#P message 343 210 27 196617 stop;
#P message 305 192 65 196617 startwindow;
#P user panel 298 183 87 49;
#X brgb 255 255 255;
#X frgb 100 202 30;
#X border 2;
#X rounded 0;
#X shadow 0;
#X done;
#P newex 390 62 27 196617 sig~;
#P toggle 390 42 15 0;
#P user gain~ 390 110 24 100 158 0 1.071519 7.94321 10.;
#P newex 390 244 67 196617 dac~;
#P newex 390 86 121 196617 groove~ loopBrownNoise;
#P comment 411 43 100 196617 playback here;
#P toggle 15 55 15 0;
#P newex 25 199 139 196617 buffer~ loopBrownNoise 100;
#P newex 61 80 120 196617 record~ loopBrownNoise;
#P newex 61 53 44 196617 lp.pfff~;
#P comment 15 38 100 196617 record here;
#P connect 8 0 7 0;
#P fasten 8 0 7 1 395 237 452 237;
#P fasten 15 0 6 0 522 84 395 84;
#P connect 16 0 15 0;
#P fasten 14 0 6 0 430 84 395 84;
#P fasten 4 0 2 0 20 74 66 74;
#P fasten 12 0 7 0 310 236 395 236;
#P fasten 13 0 7 0 348 236 395 236;
#P connect 6 0 8 0;
#P connect 9 0 10 0;
#P connect 10 0 6 0;
#P connect 1 0 2 0;
#P window clipboard copycount 18;

————– http://www.bek.no/~pcastine/Litter/ ————–
Peter Castine | ^
| Litter Power & Litter Bundle for Jitter
pcastine@gmx.net |
pcastine@bek.no | iCE: Sequencing, Recording, and Interface Building
4-15@kagi.com | for Max/MSP
| Extremely cool
| http://www.dspaudio.com
| http://www.dspaudio.com/software/software.html


February 9, 2006 | 1:42 am

thanks for the replies..
gonna try some, but i don’t have the object "deferlow"
see if i can find it somewhere..

(ps i’m working on a os9 system)

(about the attachment.. i tried to include a file but nothing
appeared in the thread.. so i put a txt in a reply.. not a big deal..)


February 9, 2006 | 2:02 am

it workes..!!
thanks

i’m sort of new, using buffer / sampling objects. but i’m learning.


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