Hey! sorry for the late reply, I was just trying to narrow things down in a meaningful way but tbh the narrowed down versions are more or less what I have previously posted but with some variations for clarity. For some reasons although all the insights in Pbind and PmonoArtic were very helpfull to understand things, I still do not know how to resolve the issues I am having. I am posting a bit more refined examples now that illustrate the 3 issues I am having.
Basically the whole discussion started because of Pbind events overlaping and then went to PmonoArtic, which was usefull because of the legato.
here is a wavetable and a synthdef to play it
(
var samplesize=2.pow(11);
v=Env.new(levels: [1,0], times: [0.25], curve:[10]).asSignal(samplesize);
n=Buffer.alloc(s,samplesize,1,bufnum:4);
n.loadCollection(v );
)
(
SynthDef(\test1,{

dur

var trig= Impulse.ar(1/dur);
var playbuf= PlayBuf.ar(1,4, ((1/dur).poll * (2048/Server.default.sampleRate)),trig,0,1).clip(1,1);
var output=OffsetOut.ar(0,playbuf!2);
}).add;
)
 If you see the .poll numbers they should be in a sequence of 50,100,200.
With legato 1 something strange happens which I believe messes up with the stuff I do later.
It behaves similar as if there is a Prand instead of Pseq
//see poll numbers should be 50,100,200,50,100,200,50,100,200 but they are not
(
Pdef(\t,
PmonoArtic(
\test1,
\freq,Pseq([5,10,20],inf)*10,
\dur, 1/Pkey(\freq),
\legato,1,
)
).play.reset;
)
//poll numbers are in right sequence but gaps between events are big
(
Pdef(\t,
PmonoArtic(
\test1,
\freq,Pseq([5,10,20],inf)*10,
\dur, 1/Pkey(\freq),
\legato,0.8,
)
).play.reset;
)
//poll numbers are in right sequence but events overlap
(
Pdef(\t,
PmonoArtic(
\test1,
\freq,Pseq([5,10,20],inf)*10,
\dur, 1/Pkey(\freq),
\legato,0.99999,
)
).play.reset;
)
 If I use Pbind, it works well but there is the event overlap (something similar with the PmonoArtic with legato 0.9)
//works ok but events overlap
(
SynthDef(\test2,{

dur

var trig= Impulse.ar(1/dur);
var playbuf= PlayBuf.ar(1,4, ((1/dur).poll * (2048/Server.default.sampleRate)),trig,0,1,0).clip(1,1);
var release= Line.kr(0,1,dur,doneAction: 2);
var output=OffsetOut.ar(0, playbuf!2);
}).add;
)
(
Pdef(\t,
Pbind(
\instrument,\test2,
\freq,Pseq([5,10,20],inf)*10,
\dur, 1/Pkey(\freq),
)
).play.reset;
)
 The 3rd problem I have is that of routing. Ineed to control parameters with patterns on the bussynth
Here are the synthdefs
(
SynthDef(\test2,{

out=0,dur

var trig= Impulse.ar(1/dur);
var playbuf= PlayBuf.ar(1,4, ((1/dur).poll * (2048/Server.default.sampleRate)),trig,0,1,0).clip(1,1);
var output=OffsetOut.ar(out,playbuf);
}).add;
SynthDef(\busout,{

in,out

var output,inSig = In.ar(in,2);
output= OffsetOut.ar(out,inSig);
}).add;
)
(
~a = Bus.audio(s, 2);
)
here are the problems:
(// with legato 1 there is no sound
Pdef(\ttt,Ppar([
PmonoArtic(
\test2,
\freq,Pseq([5,10,20],inf)*10,
\out,Pseq([~a],inf),
\dur, 1/Pkey(\freq),
\legato,1,
),
PmonoArtic(
\busout,
\in,Pseq([~a],inf),
\out, Pseq([0],inf),
\dur,1,
\legato, 1
)]
)
).play.reset;
)
(// if i change the ruting directly to 0 and not use the bus there is normal sound
Pdef(\ttt,Ppar([
PmonoArtic(
\test2,
\freq,Pseq([5,10,20],inf)*10,
\out,Pseq([0],inf),
\dur, 1/Pkey(\freq),
\legato,1,
),
PmonoArtic(
\busout,
\in,Pseq([~a],inf),
\out, Pseq([0],inf),
\dur,1,
\legato, 1
)]
)
).play.reset;
)
(// with legato less than 1 there is sound through the bus
Pdef(\ttt,Ppar([
PmonoArtic(
\test2,
\freq,Pseq([5,10,20],inf)*10,
\out,Pseq([~a],inf),
\dur, 1/Pkey(\freq),
\legato,0.8,
//\legato, 1,
),
PmonoArtic(
\busout,
\in,Pseq([~a],inf),
\out, Pseq([0],inf),
\dur,1,
\legato, 1
)]
)
).play.reset;
)
(// with legato 9 events overlap
Pdef(\ttt,Ppar([
PmonoArtic(
\test2,
\freq,Pseq([5,10,20],inf)*10,
\out,Pseq([~a],inf),
\dur, 1/Pkey(\freq),
\legato,0.9,
//\legato, 1,
),
PmonoArtic(
\busout,
\in,Pseq([~a],inf),
\out, Pseq([0],inf),
\dur,1,
\legato, 1
)]
)
).play.reset;
)
3b) here is the routing problem when using Pbind. You can listen to sound being not continuous
(
SynthDef(\test3,{

out=0,dur

var trig= Impulse.ar(1/dur);
var playbuf= PlayBuf.ar(1,4, ((1/dur).poll * (2048/Server.default.sampleRate)),trig,0,1,0).clip(1,1);
var release= Line.kr(0,1,dur,doneAction: 2);
var output=OffsetOut.ar(out,playbuf);
}).add;
SynthDef(\busout2,{

in,out,dur

var output,inSig = In.ar(in,2);
var release= Line.kr(0,1,dur,doneAction: 2);
output= OffsetOut.ar(out,inSig);
}).add;
)
(
Pdef(\ttt,Ppar([
Pbind(
\instrument,\test3,
\freq,Pseq([5,10,20],inf)*10,
\out,Pseq([~a],inf),
\dur, 1/Pkey(\freq)
),
Pbind(
\instrument,\busout2,
\in,Pseq([~a],inf),
\out, Pseq([0],inf),
\dur,1
)]
)
).play.reset;
)
I hope these examples will illustrate the issues I am having. Any help would be extremely important.
Thank you again and sorry for the late reply, I just had to put things down.