Note that if you try to use that code in a Pdef
and/or Pbind
while changing parameters (\dur
, etc…), you will end up with audio overlaps. The use case I’m talking about here is live coding. Audio playback and possible overlaps will also be highly dependant on tempo (and other factors most likely).
I have opened a topic with a similar question a few weeks ago and was unable to find a robust and versatile solution to looping audio samples easily. I suppose that @twistin is searching for something similar to Octatrack capabilities when it comes to mangling audio samples (stretching, slicing, etc).