skip to content

Bar

Defines a single bar’s pattern, as handled by a containing <track-blam> 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).

span number

Just how many of the beats/triggers defined by s to actually use. If the s value is 1 0 2 0 but span is 3, the pattern will repeat as 1 0 2. If span is 7, the repeated pattern will become 1 0 2 0 1 0 2 (partially looped back). Useful for quickly introducing different polymeters.

chance number 1

The probability that any one sound in the s pattern will be played. Overrides a parent <track-blam>’s chance`.

fill boolean false

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

Events

type description
blam

Fired whenever the bar begins. Useful for compositional changes, made on the fly. Instigated by an ancestor <track-blam> element.

Examples

Examples that use the Bar element: