there is a thread over here that has some interesting ideas that might be relevant
Another approach is to use Pspawner
(
Pdef(\ptrn,
Pspawner({arg ps;
var degree = Prand([1, 2, 3], inf).asStream;
var dur = Pwhite(1/4, 1, inf).asStream;
inf.do({
var d = degree.next;
ps.par(Pn((instrument: \tone, degree:d), 1));
ps.par(Pn((type: \midi, midiout: m, \degree: d), 1));
ps.wait(dur.next);
})
})
).play;
)
Pdef(\ptrn).stop;