newbie question - Pbind and PlayBuf

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

newbie question - Pbind and PlayBuf


hello SC list,

i'm trying to make a dead simple (probably) way of playing all items in an array of buffers sequentially.
given a buffer ~b0 containing N items, SC should play ~b0[0], then ~b0[1], then ~b0[2] ... all the way to ~b0[N-1], without pauses or overlap.

the code i've written so far is as follows:

SynthDef(\simpleplay, {
        arg out=0, buf, da=2;
        var sig;
        sig =, buf, doneAction:da);, sig ! 2);    
p = Pbind(
        \instrument, \simpleplay,
        \buf, Pseq(~b0,1)

this does indeed run through the entire b0 array one element at a time, however instead of playing without pauses or overlap it seems to trigger the next element at a rate of precisely once per second. i suppose this is a default value in Pseq, but I can't find where it's specified in the documentation nor how to override it. what i'd really like to do is not override this default interval with another fixed interval but rather have the buffers play back in sequence according to the specific duration of each soundfile.  

thanks very much in advance!