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 durationPfindur(16, Pbind(....)) behaviorPsync(Pbind(....), 4, 16) behavior
6 beatsPfindur plays only 6 beatsPsync rounds up to 8 beats (adds a two-beat rest)
18 beatsPfindur cuts off after 16 beatsPsync 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, mindur: 0)

Arguments:

pattern

a pattern that returns events.

quant

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

maxdur

maximum duration

tolerance

threshhold that the stream must exceed maxdur to be ended.

mindur

guarantees that the total duration is no less than a given limit, independent of the quant value.

Inherited class methods

Instance Methods

Inherited instance methods

Undocumented instance methods

.embedInStream(event)

.maxdur

.maxdur = value

.mindur

.mindur = value

.quant

.quant = value

.tolerance

.tolerance = value

Examples