Accessing buffer data from inside a Pbind

hello everyone!

I would like to access certain buffer data from inside a Pbind: there are some buffers filled with audio data, a simple SynthDef to play them, and a Pbind to control the succession of buffers and duration. everything works fine so far - buffer indexes are controlled by random from inside the Pbind, this argument is set right after the instrument argument. now I would like to control \dur in such a way, that the following buffer starts right after the last sample of the previous, controlled via a Pkey argument. (there are already \start and \end set in the SynthDef for the corresponding buffer) no matter what I did, I did not get it to work: „…needs a non empty collection…“. I also made an array containing number of samples and one with lengths and referring to it from inside the Pbind, but it always failed.

please could someone tell me a method, to

a. get number of frames of the currently played buffer from inside a Pbind

b. with this how must an argument look like, that will be able to control i.e. \dur from this knowledge or \start and \end time/sample for the current buffer to be played.

thank you in advance for your assistance! best regards Rainer