PLbindefPar:
Filter:
Classes (extension) | Libraries > miSCellaneous > PLx suite | Streams-Patterns-Events > PLx suite

PLbindefPar : Pdef : EventPatternProxy : TaskProxy : PatternProxy : Pattern : AbstractFunction : Object
ExtensionExtension

container for parallel PLbindefs which allows replacement in object prototyping style

Description

PLbindefPar employs a number of parallel PLbindefs, replacement of key streams can be done in object prototyping style with a dedicated PLbindefParEnvironment, which also holds player methods. This hybrid Environment is itself assigned to the PLbindefPar's name in an Environment of choice, by default the current Environment. Setting can thus be done in very condensed syntax, also in combination with EventShortcuts. For more info on object prototyping see Environment: Using Environments as object prototypes.

NOTE: PLbindefs are registered globally in the same Dictionary as Pdefs, Pbindefs and PLbindefPars. In addition for size = n PLbindefs of the same name with indices i = 0, ... n-1 appended are stored globally. It's recommended to do cleanup with remove or Pdef.removeAll after using PLbindef / PLbindefPar as in examples below. Otherwise unwanted or strange behaviour might be caused by leftover sources when playing a new PLbindef / PLbindefPar example with the same key. With SC >= 3.7 occasional posts of the default parent event occur with Pbindef, so also with PLbindef, this doesn't cause problems though.
NOTE: For setting, getting, playing, stopping and resetting subsets of PLbindefs in prototyping syntax the class TempPLbindefParEnvironment is involved (see Ex.1). The user doesn't need to care about this class, instances are generated implicitely and might occur in the post window.

Class Methods

PLbindefPar.new( ... args)

Creates a new PLbindefPar object or sets sources of an existing one.

Arguments:

... args

First arg should be the name, followed by num, the number of parallel PLbindefs, and the key/value pairs. Values are assigned to single PLbindefs according to the convention of PLbindefParEnvironment: -put, see there and examples below. The last arg can be an optional environment which determines where the corresponding PLbindefParEnvironment should be stored, by default this is the current Environment at instantiation time.

Inherited class methods

Instance Methods

.sourceEnvir

Getter for PLbindefPar's PLbindefParEnvironment.

.refEnvir

Getter for the Environment where PLbindefPar's PLbindefParEnvironment is associated with PLbindefPar's key.

.num

Getter for PLbindefPar's number of parallel PLbindefs.

.play(clock, protoEvent, quant, doReset: false)

Plays all corresponding PLbindefs with passed arguments, which might be arrays. In this case wrapped indexing is applied.

.reset

Resets all corresponding PLbindefs.

.stop

Stops all corresponding PLbindefs.

.clear

Clears all corresponding PLbindefs.

.remove

Removes not only the PLbindefPar but also associated PLbindefs from global entry.

.subPLbindefs

Returns corresponding PLbindefs.

.subEnvirs

Returns corresponding PLbindefEnvironments.

 

Inherited instance methods

Examples

 

Ex.1) Setting key streams

 

Ex.2) More parallel streams, from granular to additive

Use SynthDefs from above.

 

Ex.3) PLbindefPar with VarGui

Use SynthDefs from above.

 

Ex.4) PLbindefPar with PbindFx

See also Ex.7c: Replacement with Pbindef

 

Ex.5) PLbindefPar with array args