AlgaPatternPlayer:
Filter:
AlgaLib/Classes (extension) | Alga

AlgaPatternPlayer
ExtensionExtension

Player and dispatcher of AlgaPatterns

Description

An AlgaPatternPlayer is an AlgaPattern player and dispatcher. It stores key / value pairs that can be retrieved and consumed by AlgaPatterns in their execution. Furthermore, an AlgaPatternPlayer can take care of the triggering itself of its children AlgaPatterns.

Class Methods

.new

Arguments:

def

An Event describing the key / value pairs to be executed.

player

Set an instance of a AlgaPatternPlayer that will be used to trigger the pattern.

server

Specify a Server to instantiated the AlgaPattern on. This Server must have had Alga booted on it. It defaults to Server.default.

Instance Methods

.play

Start the execution of the AlgaPatternPlayer.

Arguments:

sched

Just like any other AlgaNode method, the current function can be scheduled at specific times in the future, according to the clock that the Alga instance booted on the server is using.

.stop

Stop the AlgaPatternPlayer

.reset

Reset the AlgaPatternPlayer

.restart

Restart the AlgaPatternPlayer

.advance

Manually advance the AlgaPatternPlayer.

.step

Alias for advance.

.from

Arguments:

sender

A new value for the parameter.

param

The parameter to modify.

time

The time it will take to perform the changes. Note that this will be transferred to every AlgaPatterns that are using the AlgaPatternPlayer.

shape

An Env that optionally allows you to define a specific shape for the interpolation.

sched

Just like any other AlgaNode method, the current function can be scheduled at specific times in the future, according to the clock that the Alga instance booted on the server is using.

<<

Alias for from.

.at

Arguments:

param

The parameter to retrieve from the AlgaPatternPlayer.

repeats

Similarly to Pfuncn, this represents the number of times to repeat the reading of the parameter.

.read

Arguments:

func

A Function representing the action to perform when reading a group of parameters from the AlgaPatternPlayer. The arguments to the function must match the names of parameters in the AlgaPatternPlayer.

repeats

Similarly to Pfuncn, this represents the number of times to perform the function.

.value

Alias for read.

.addAction

Execute a Function on the scheduler of this node.

Arguments:

condition

A Function that must return true or false. If not specified, the condition is always considered true.

func

The Function to execute.

sched

When should the function be executed. This can also be an AlgaStep.

topPriority

Specify if the function should be put at the top of the prioroty queue.

preCheck

Specify if the function should be executed right away in the case of a true condition.

.sched

Manually set a sched value to use when not specified explicitly.

.time

Manually set a time value to use when not specified explicitly.

.shape

Manually set a shape value to use when not specified explicitly.

.tempoScaling

Specify if all timed actions should be scaled by the clock's tempo. Default is false.

.interpolateDur

Check AlgaPattern.

.interpDur

Check AlgaPattern.

.interpDelta

Check AlgaPattern.

.interpolateDelta

Check AlgaPattern.

.interpStretch

Check AlgaPattern.

.interpolateStretch

Check AlgaPattern.

.resync

Check AlgaPattern.

.schedResync

Check AlgaPattern.

.durInterpReset

Check AlgaPattern.

.durInterpResync

Check AlgaPattern.

Examples