Pspawner:
Filter:
Classes | Streams-Patterns-Events > Patterns > Parallel

Pspawner : Prout : Pattern : AbstractFunction : Object

dynamic control of multiple event streams from a Routine
Source: Pspawner.sc

Description

Pspawner allows a routine to dynamically start and stop subpatterns.

Class Methods

Pspawner.new(routineFunc)

From superclass: Prout

Arguments:

routineFunc

The function defines a Routine that receives a Spawner as its sole argument. All control of subpatterns is through the spawner.

Spawner responds to the messages:

par
Begin an event stream in parallel to the routine. If delta is non-zero, the pattern will begin that many beats after 'now', provided that now + delta is later than the next event that the Spawner will generate. The method returns the stream. This may be called from any object.
seq
Run the entire pattern and then return control to the routine.
wait
Wait dur seconds and then return control to the routine.
suspend
Find the stream in the Spawner and stop it, returns nil if the stream is not found, the stream otherwise.
suspendAll
Stop all substreams of the Spawner.
NOTE: We should move the documentation of above methods to the Spawner helpfile...

Inherited class methods

Instance Methods

Inherited instance methods

Undocumented instance methods

.asStream

.embedInStream(inevent)

Examples