3 ^Pfin(n.asStream, this.asStream)
10 fastForward { arg by, tolerance=0, inevent;
11 var t = 0, delta = 0, event;
13 inevent = inevent ?? { Event.default };
14 while { t.roundUp(tolerance) < by }
16 event = this.next(inevent.copy);
17 if(event.isNil) { ("end of stream. Time left:" + (by - t)).inform; ^t - by };
19 event = event.copy.put(\freq, \rest);
22 if(delta.isNil) { ("end of stream. Time left:" + (by - t)).inform; ^t - by };
27 ^t - by // time left to next event
35 xplay { arg fadeTime, argClock, doReset = false, quant=1.0;
36 if (doReset, { this.reset });
37 clock = argClock ? clock ? TempoClock.default;
38 stream = PfadeIn(originalStream, fadeTime).asStream;
39 clock.play(this, quant);
42 stream = PfadeOut(stream, fadeTime).asStream;
49 xplay { arg fadeTime, argClock, doReset = false, quant=1.0;
50 this.play(argClock, doReset, quant);
52 xstop { // stop after fade?