[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] Re: calling the stream upon EventStreamPlayer-stop

On Dec 31, 2005, at 3:30 PM, James Harkins wrote:

On Dec 31, 2005, at 1:35 PM, ronald kuivila wrote:

Patterns (like Pseq) that do not call 'yield' directly require no modification. (The work is
effectively handed off to child streams via embedInStream.)

OK, so the rule is then that you shouldn't write events directly into list patterns. Pseq([(freq: \rest, delta: 1), ...]) would have a risk of skipping an event if you stop its ESP.

It won't matter in that case.

The nil is generated by an enclosing pattern that is forcing termination. That enclosing pattern prevents the event (returned in response to the nil event) from being performed.

The only concerns are patterns that generate output separate from normal event performance (where the event has
to bubble back to the clock before it is actually performed).

For example, Pmono frees or releases the synth it created when it ends.

I think the new method could be called

	yieldEvent (terminationFunction)

That's good. The default function could be _.isNil which would cover most cases

I am not sure what you mean, what I had in mind was:

	yieldEvent { | termminationFunction |
		var ev;
		ev = this.yield;
		if (ev.isNil) { terminationFunction.value; nil.yield }