(max) buffer shuffler

example patcher

manipulating playback location

Up until now, all of our [groove~] playback has been linear, progressing through the buffer, or a looped portion, in one direction. We can use location, however, to cause [groove~] to jump to different locations within the buffer or a looped portion.

Look inside of [p loopShuffle], in the orange border. Inside of it, open up [p loopSegment]. [p loopSegment] takes the selection start and end points (being used as the loop points), calculates the loop length, and divides the loop length by 8 (or some number sent to the patcher) to get a segment length.

The segment length is used in [p loopShuffle]. The [random] object outputs a number that gets multiplied by the segment length and offset by the loop start time. Each time a random number is output it jumps to a new start time in the loop. The loop segment length is also the speed of the metro.

You have to turn on shuffling in the parent patcher, and you can also turn on pitch shifting in half steps and set the half step transposition range so that each segment is transposed by a new amount.