Psync:
Filter:

Psync : FilterPattern : Pattern : AbstractFunction : Object

synchronise and limit pattern duration

Description

Psync behaves somewhat like Pfindur -- it has a maxdur argument that limits the total duration of the event stream.

The difference is in what happens if the event pattern stops on its own before maxdur is reached. If the total duration of the event pattern is shorter than the given maximum duration:

Pbind's natural duration Pfindur(16, Pbind(....)) behavior Psync(Pbind(....), 4, 16) behavior
6 beats Pfindur plays only 6 beats Psync rounds up to 8 beats (adds a two-beat rest)
18 beats Pfindur cuts off after 16 beats Psync cuts off after 16 beats

maxdur may be omitted. If the Pbind stops by itself, the rest will be inserted according to quant, but the total duration will be unlimited.

Class Methods

Psync.new(pattern, quant, maxdur, tolerance: 0.001)

Arguments:

pattern

a pattern that returns events.

quant

rounding factor for total duration (effectively a "bar length")

maxdur

maximum duration

tolerance

difference threshhold that a pattern must exceed max to be ended.

Inherited class methods

Instance Methods

Inherited instance methods

Undocumented instance methods

.embedInStream(event)

.maxdur

.maxdur = value

.quant

.quant = value

.tolerance

.tolerance = value

Examples