max v2; #N vpatcher 53 58 1181 799; #P origin 0 -116; #P slider 389 66 15 60 1 100; #P button 334 190 15 0; #P newex 372 232 27 196617 +; #P comment 355 142 74 196617 loop length; #P flonum 389 159 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 259 324 14 196617 1; #P message 189 324 30 196617 0.01; #P user number~ 113 291 152 306 9 3 3 2 0. 0. 0 0. 50 0.; #P slider 488 319 15 60 1 100; #P user meter~ 32 249 112 262 100 0 168 0 103 103 103 255 153 0 255 0 0 217 217 0 153 186 0 12 3 3 3 3; #P flonum 896 189 58 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P slider 1059 12 15 600 0 10; #P message 509 139 20 196617 10; #P message 858 138 33 196617 3000; #P message 816 139 33 196617 2100; #P message 775 139 33 196617 1800; #P message 733 139 33 196617 1500; #P message 688 139 33 196617 1200; #P message 652 139 26 196617 900; #P message 618 139 26 196617 500; #P message 581 139 26 196617 300; #P message 545 139 26 196617 100; #P number 596 166 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P user GSwitch 484 395 41 32 1 0; #P number 565 231 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P message 519 167 49 196617 seed 777; #P newex 538 192 69 196617 random 1000; #B color 5; #P newex 611 396 38 196617 - 10.; #P newex 618 358 34 196617 * 0.5; #P newex 529 245 35 196617 metro; #P message 820 246 49 196617 seed 777; #P comment 630 230 62 196617 Click to get a random number; #P comment 721 235 83 196617 Set range via right inlet; #P comment 716 297 220 196617 Optional arguments initializes range (default 1) and seed (default 0 \, which means time value is used to initialize the seed); #P slider 695 227 15 40 0 1; #P number 729 267 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P button 483 203 15 0; #P number 621 322 82 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 621 294 91 196617 random 40; #B color 5; #P comment 687 362 227 196617 When it receives a bang \, random will generate a number between 0 and one less than its range; #P comment 617 210 134 196617 Generate a random number; #P comment 617 191 62 196622 random; #P comment 872 230 100 196617 set random number generator seed--a value of 0 uses an unpredictable time value to set the seed; #P toggle 209 486 15 0; #P newex 261 368 27 196617 sig~; #P flonum 407 337 63 9 0.01 6000. 3 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 330 336 56 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 260 342 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 189 344 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P toggle 134 327 15 0; #P message 134 369 42 196617 loop \$1; #P newex 256 513 153 196617 dac~; #P newex 266 431 100 196617 groove~ soundbite 2; #P newex 6 38 124 196617 buffer~ soundbite 6000 2; #P newex 114 263 113 196617 record~ soundbite 2; #P toggle 38 199 15 0; #P toggle 110 103 15 0; #P newex 112 189 41 196617 adc~; #P comment 823 638 274 196617 The groove ~ object is the most versatile object for playing sound from a buffer ~. You can specify the buffer ~ to read \, the starting point \, the playback speed (either forward or backward) \, and starting and ending points for a repeating loop within the sample. As with other objects that read from a buffer ~ \, groove ~ accesses the buffer ~ remotely \, without patch cords \, by sharing its name.; #P comment 44 569 468 196617 In the example above \, the message loop 1 turns looping on \, the start time of 0 ms indicates the beginning of the buffer ~ \, the playback speed of 1 means to play forward at normal speed \, and the loop start and end times mean that (because looping is turned on) when groove ~ reaches a point 860 milliseconds into the buffer~ it will return to a point 572 ms into the buffer ~ and continue playing from there. Notice that the start time must be received as a float (or int) \, and the playback speed must be received as a signal. This means the speed can be varied continuously by sending a time-varying signal in the left inlet. Whenever a new start time is received \, groove ~ goes immediately to that time in the buffer ~ and continues playing from there at the current speed. When groove ~ receives the message loop 1 or startloop it goes to the beginning of the loop and begins playing at the current speed. (Note that loop points are ignored when groove ~ is playing in reverse \, so this does not work when the playback speed is negative.) groove ~ stops when it reaches the end of the buffer ~ (or the beginning if it?s playing backward) \, or when it receives a speed of 0.; #P comment 119 311 41 196617 looping; #P comment 185 301 52 196617 start time; #P comment 254 302 73 196617 playback speed; #P comment 332 309 74 196617 loop start time; #P comment 407 308 67 196617 loop end time; #P connect 7 0 55 0; #P connect 8 0 7 0; #P connect 10 0 57 0; #P connect 7 0 10 0; #P fasten 9 0 10 0 43 227 119 227; #P connect 15 0 14 0; #P connect 7 1 10 1; #P fasten 15 0 58 0 139 349 171 349 171 317 194 317; #P connect 58 0 16 0; #P fasten 21 0 13 0 214 508 261 508; #P connect 12 0 13 0; #P fasten 15 0 59 0 139 351 174 351 174 320 264 320; #P connect 59 0 17 0; #P fasten 41 0 17 0 489 435 476 435 476 325 265 325; #P connect 17 0 20 0; #P connect 20 0 12 0; #P fasten 16 0 12 0 194 411 271 411; #P fasten 14 0 12 0 139 409 271 409; #P fasten 18 0 12 1 335 396 316 396; #P connect 63 0 18 0; #P fasten 60 0 63 0 394 187 339 187; #P fasten 19 0 12 2 412 400 361 400; #P fasten 18 0 62 0 335 361 319 361 319 212 377 212; #P connect 64 0 60 0; #P connect 60 0 62 1; #P connect 12 1 13 1; #P fasten 56 0 19 0 493 391 480 391 480 329 412 329; #P fasten 62 0 19 0 377 286 412 286; #P fasten 35 0 28 0 534 291 513 291 513 182 488 182; #P connect 37 0 41 2; #P connect 28 0 35 0; #P connect 28 0 38 0; #P connect 39 0 38 0; #P connect 40 0 35 1; #P connect 38 0 40 0; #P fasten 54 0 42 0 901 213 828 213 828 161 601 161; #P fasten 52 0 42 0 514 162 601 162; #P fasten 46 0 42 0 657 160 601 160; #P fasten 47 0 42 0 693 162 601 162; #P fasten 48 0 42 0 738 161 601 161; #P fasten 49 0 42 0 780 162 601 162; #P fasten 50 0 42 0 821 161 601 161; #P fasten 51 0 42 0 863 161 601 161; #P fasten 45 0 42 0 623 159 601 159; #P fasten 44 0 42 0 586 163 601 163; #P fasten 43 0 42 0 550 161 601 161; #P connect 42 0 38 1; #P connect 36 0 37 0; #P connect 27 0 36 0; #P connect 35 0 26 0; #P fasten 34 0 26 0 825 290 626 290; #P connect 26 0 27 0; #P connect 29 0 26 1; #P connect 30 0 29 0; #P fasten 53 0 54 0 1064 623 1024 623 1024 137 901 137; #P pop;