skip to content

Bar

Defines a single bar’s pattern, as handled by a parent Track element.

class
Bar
extends
Base
tag
<bar-blam>
see

Props

name type default description
s string

The space-separated pattern representing the distribution of notes or sounds. 0 represents a pause (skipped sound/beat).

chance number 1

The probability that any one sound in the s pattern will be played. Overrides a parent Track’s chance.

fill boolean false

Whether to play a fill (a randomized rearrangement of the bar’s pattern).

Events

type description
blam

Fired whenever one bar (defined by a child Bar element) ends and another begins. Useful for compositional changes, made on the fly. Instigated by an ancestor Track element.

Examples

Examples that use the Bar element: