Hi, I'm having some problems with Pdefn.I was assuming that by setting a clock and a quant (just 1) the source pattern would get exchanged on the clock's next beat.Misunderstanding, user error or bug?
It should work as you expect.
the example below works for me.
the new stream is inserted by the message "sched":
sched { arg func;
if(quant.isNil)
{ func.value }
{
this.clock.schedAbs(quant.nextTimeOnGrid(this.clock), { func.value;
nil }) }
}maybe the gap is one too long, because the change is picked up one event later? In what way it is wrong for you?
Thanks, Stephan s.boot; t = TempoClock(1.7).permanent_(true); ( Pdefn(\midi, Pseq([56, 58, 60, 62], inf)) .clock_(t) .quant_(1); p = Pbind( // one accented \amp, Pseq([0.12, 0.01, 0.02, 0.04], inf), \dur, 0.25, \midinote, Pdefn(\midi), \legato, 0.4 ).play(t, quant: 1); ) // not synced Pdefn(\midi).source = Pseq([54, 58, 60, 62], inf); Pdefn(\midi).source = Pseq([52, 58, 60, 62], inf); p.stop; p.play(t, true, 1); // now in sync ( // clean up p.stop; Pdefn(\midi).remove; // ERROR if clock stopped before t.stop; t.permanent = false; ) _______________________________________________ sc-users mailing listinfo (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtmlarchive: https://listarc.bham.ac.uk/marchives/sc-users/ search: https://listarc.bham.ac.uk/lists/sc-users/search/
-- . _______________________________________________ sc-users mailing list info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml archive: https://listarc.bham.ac.uk/marchives/sc-users/ search: https://listarc.bham.ac.uk/lists/sc-users/search/