skip to content

Sequencer

Schedules future beats in a sequence and alerts subscribing elements.

class
Sequencer
extends
Base
tag
<sequencer-blam>
see

Props

name type default description
scale number 1

The size of the interval in quarter-beats. 2 would mean each interval is, in effect, a half-beat.

swing boolean|number null

Applied as a Boolean attribute, it applies a swing of 0.333, making adjacent beats the first and last beats of a triplet. Supply a number to adjust this value.

Events

type description
blam

Critically contains the time for the scheduled beat (relative to currentTime), but also supplies <sequencer-blam> and <track-blam> information.

Methods

name args description
play

Starts the sequencer, which begins emitting blam events at intervals according to the current scale.

stop

Ceases emitting blam events and resets all descendant <track-blam> elements, essentially rewinding each to the beginning of their first <bar-blam>’s s pattern.

pause

Ceases emitting blam events. Does not reset any constituent <track-blam>s.

playStop

Toggles between play and stop.

playPause

Toggles between play and pause.

Examples

Examples that use the Sequencer element: