Randomize Groove

May 13, 2007 at 1:51am

Randomize Groove

I am making a somewhat unsophisticated sequencer in conjuction with the groove~ and buffer~ objects. I have attempted to implement a random~ object in order to make the output of the select~ object random, but have not had luck yet. Any suggestions for how to use the random function in this instance, or a better way to get each of the 16 sound files to play at random intervals?

max v2;
#N vpatcher 1 88 1198 950;
#P toggle 308 310 15 0;
#P user dial 341 280 23 23 1000 1 0 0 159 270 1 1. 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0;
#P window setfont “Sans Serif” 9.;
#P number 340 311 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 314 335 37 196617 metro;
#N counter 16;
#X flags 0 0;
#P newobj 319 384 66 196617 counter 16;
#P newex 316 487 222 196617 select 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15;
#P button 250 622 15 0;
#P button 234 580 15 0;
#P button 214 541 15 0;
#P button 200 499 15 0;
#P button 178 461 15 0;
#P button 163 421 15 0;
#P button 145 381 15 0;
#P button 121 342 15 0;
#P button 103 303 15 0;
#P button 92 265 15 0;
#P button 80 225 15 0;
#P button 66 186 15 0;
#P button 49 148 15 0;
#P button 34 107 15 0;
#P button 21 65 15 0;
#P button 10 27 15 0;
#P message 737 721 30 196617 read;
#P newex 737 744 154 196617 buffer~ redhead4 redhead4.wav;
#P message 737 678 30 196617 read;
#P newex 737 699 154 196617 buffer~ redhead3 redhead3.wav;
#P message 736 634 30 196617 read;
#P newex 736 657 154 196617 buffer~ redhead2 redhead2.wav;
#P message 736 546 30 196617 read;
#P newex 736 569 192 196617 buffer~ marriedman4 marriedman4.wav;
#P message 736 591 30 196617 read;
#P newex 736 612 154 196617 buffer~ redhead1 redhead1.wav;
#P message 736 501 30 196617 read;
#P newex 736 524 192 196617 buffer~ marriedman3 marriedman3.wav;
#P message 736 413 30 196617 read;
#P newex 736 436 192 196617 buffer~ marriedman1 marriedman1.wav;
#P message 736 458 30 196617 read;
#P newex 736 479 192 196617 buffer~ marriedman2 marriedman2.wav;
#P message 736 368 30 196617 read;
#P newex 736 391 172 196617 buffer~ bartender4 bartender4.wav;
#P message 735 321 30 196617 read;
#P newex 735 344 172 196617 buffer~ bartender3 bartender3.wav;
#P message 735 233 30 196617 read;
#P newex 735 256 172 196617 buffer~ bartender1 bartender1.wav;
#P message 735 278 30 196617 read;
#P newex 735 299 172 196617 buffer~ bartender2 bartender2.wav;
#P message 735 188 30 196617 read;
#P newex 735 211 134 196617 buffer~ drunk4 drunk4.wav;
#P message 735 100 30 196617 read;
#P newex 735 123 134 196617 buffer~ drunk2 drunk2.wav;
#P message 735 145 30 196617 read;
#P newex 735 166 134 196617 buffer~ drunk3 drunk3.wav;
#P message 735 55 30 196617 read;
#P newex 735 78 134 196617 buffer~ drunk1 drunk1.wav;
#P message 592 150 29 196617 stop;
#P message 590 129 51 196617 startloop;
#P button 546 145 15 0;
#P newex 509 120 45 196617 onebang;
#P button 589 108 15 0;
#P newex 420 99 29 196617 gate;
#P user dial 374 142 23 23 128 1 0 0 159 270 1 1. 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0;
#P newex 277 116 87 196617 scale 0 127 0. 3.;
#P number 276 96 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user kslider 274 33 54 0 36 48 31 12 0 128 128 128 128 128 128 255 255 255 0 0 0 0 0 0;
#P toggle 343 153 15 0;
#P flonum 371 170 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 491 169 15 0;
#P message 492 197 43 196617 loop $1;
#P newex 368 190 29 196617 sig~;
#P message 250 641 51 196617 redhead4;
#P message 233 601 51 196617 redhead3;
#P message 214 561 51 196617 redhead2;
#P message 200 521 51 196617 redhead1;
#P message 179 480 70 196617 marriedman4;
#P message 163 442 70 196617 marriedman3;
#P message 144 401 70 196617 marriedman2;
#P message 120 361 70 196617 marriedman1;
#P message 103 323 60 196617 bartender4;
#P message 92 284 60 196617 bartender3;
#P message 80 246 60 196617 bartender2;
#P message 65 206 60 196617 bartender1;
#P message 49 167 41 196617 drunk4;
#P message 35 128 41 196617 drunk3;
#P message 23 88 41 196617 drunk2;
#P message 9 46 41 196617 drunk1;
#P message 50 482 50 196617 drunk1;
#P newex 50 449 62 196617 prepend set;
#P user dial 616 191 23 23 128 1 0 0 159 270 1 1. 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0;
#P user dial 567 192 23 23 128 1 0 0 159 270 1 1. 170 170 170 221 221 221 120 120 120 225 225 225 0 0 0 0 0 0;
#P flonum 617 224 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 572 224 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 526 249 103 196617 groove~ whitespider;
#P user gain~ 569 302 24 100 158 0 1.071519 7.94321 10.;
#P user ezdac~ 561 444 605 477 0;
#P window linecount 2;
#P comment 408 174 48 196617 playback speed;
#P connect 73 0 10 0;
#P connect 89 0 73 0;
#P connect 89 1 74 0;
#P connect 74 0 11 0;
#P connect 89 2 75 0;
#P connect 75 0 12 0;
#P connect 89 3 76 0;
#P connect 76 0 13 0;
#P connect 25 0 8 0;
#P connect 24 0 8 0;
#P connect 23 0 8 0;
#P connect 22 0 8 0;
#P connect 21 0 8 0;
#P connect 20 0 8 0;
#P connect 19 0 8 0;
#P connect 18 0 8 0;
#P connect 17 0 8 0;
#P connect 16 0 8 0;
#P connect 15 0 8 0;
#P connect 14 0 8 0;
#P connect 13 0 8 0;
#P connect 12 0 8 0;
#P connect 11 0 8 0;
#P connect 10 0 8 0;
#P connect 8 0 9 0;
#P connect 77 0 14 0;
#P connect 89 4 77 0;
#P connect 89 5 78 0;
#P connect 78 0 15 0;
#P connect 89 6 79 0;
#P connect 79 0 16 0;
#P connect 89 7 80 0;
#P connect 80 0 17 0;
#P connect 81 0 18 0;
#P connect 89 8 81 0;
#P connect 82 0 19 0;
#P connect 89 9 82 0;
#P connect 89 10 83 0;
#P connect 83 0 20 0;
#P connect 89 11 84 0;
#P connect 84 0 21 0;
#P connect 89 12 85 0;
#P connect 85 0 22 0;
#P connect 89 13 86 0;
#P connect 86 0 23 0;
#P connect 87 0 24 0;
#P connect 89 14 87 0;
#P connect 89 15 88 0;
#P connect 88 0 25 0;
#P connect 31 0 32 0;
#P connect 32 0 33 0;
#P connect 94 0 91 0;
#P connect 90 0 89 0;
#P connect 91 0 90 0;
#P connect 93 0 92 0;
#P connect 92 0 91 1;
#P connect 30 0 26 0;
#P connect 29 0 26 0;
#P connect 34 0 29 0;
#P connect 33 0 29 0;
#P connect 31 1 35 0;
#P connect 31 0 35 1;
#P connect 28 0 27 0;
#P connect 36 0 37 0;
#P connect 39 0 3 0;
#P connect 40 0 3 0;
#P connect 8 0 3 0;
#P connect 27 0 3 0;
#P connect 26 0 3 0;
#P connect 37 0 38 0;
#P connect 2 0 1 0;
#P connect 3 0 2 0;
#P connect 6 0 4 0;
#P connect 4 0 3 1;
#P connect 35 0 36 0;
#P connect 36 0 39 0;
#P connect 38 0 40 0;
#P connect 2 0 1 1;
#P connect 7 0 5 0;
#P connect 5 0 3 2;
#P connect 42 0 41 0;
#P connect 46 0 45 0;
#P connect 44 0 43 0;
#P connect 48 0 52 0;
#P connect 52 0 51 0;
#P connect 50 0 49 0;
#P connect 54 0 53 0;
#P connect 56 0 55 0;
#P connect 60 0 59 0;
#P connect 58 0 57 0;
#P connect 62 0 61 0;
#P connect 66 0 65 0;
#P connect 64 0 63 0;
#P connect 68 0 67 0;
#P connect 70 0 69 0;
#P connect 72 0 71 0;
#P pop;

#31887
May 13, 2007 at 2:29am

Quote: emily.voegtlin@gmail.com wrote on Sat, 12 May 2007 18:51
—————————————————-
> I am making a somewhat unsophisticated sequencer in conjuction with the groove~ and buffer~ objects. I have attempted to implement a random~ object in order to make the output of the select~ object random, but have not had luck yet. Any suggestions for how to use the random function in this instance, or a better way to get each of the 16 sound files to play at random intervals?
—————————————————-

I don’t actually see any random~ object (or random) in your patch. Did you mean for the counter between the metro and the select objects to be a random object? That would randomly switch what buffer~ your groove~ is using every metro bang, but this would be at regular intervals, not at random intervals as you mention. For that, you’d have to devise a different way of generating bangs or randomly change the speed of the metro. I’d also suggest looking at sfplay~ and preloading all of those soundfiles as cues rather than filling up all of those buffers.

Lewis

#104066
May 13, 2007 at 8:47am

On 13 May 2007, at 3:29, Lewis Keller wrote:
> but this would be at regular intervals, not at random intervals as
> you mention. For that, you’d have to devise a different way of
> generating bangs or randomly change the speed of the metro.

If you haven’t already, get hold of the RTC-lib (from Karlheinz
Essl), and the basic Litter package (from Peter Castine). Lots of
different ways of generating random numbers.
Look on : http://www.maxobjects.com

David

#104067
May 13, 2007 at 4:21pm

And my random package at http://www.timara.oberlin.edu/GaryLeeNelson

On 5/13/07 4:47 AM, “David Stevens” wrote:

>
> On 13 May 2007, at 3:29, Lewis Keller wrote:
>> but this would be at regular intervals, not at random intervals as
>> you mention. For that, you’d have to devise a different way of
>> generating bangs or randomly change the speed of the metro.
>
> If you haven’t already, get hold of the RTC-lib (from Karlheinz
> Essl), and the basic Litter package (from Peter Castine). Lots of
> different ways of generating random numbers.
> Look on : http://www.maxobjects.com
>
>
> David

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

#104068
May 14, 2007 at 5:49pm

I’d imagine theres alot easier ways to do what you are trying to, if its a case of picking files- why not put the files all into one long file and create loop points within it- so just moving around one buffer – somewhat like Steims LISA – certianly be nicer to your processer and you wouldnt have to worry about selector~! – else I’d use gate~ + you need to use the max random into the selector- not the msp one.

Hope this helps

T

#104069

You must be logged in to reply to this topic.