skip to content

Envelope

An auxiliary envelope. Control any audioParam of any element by describing a curve for its value. Uses the closest <sampler-blam>-based element’s blam event.

class
Envelope
extends
Handle
tag
<envelope-blam>
see

Props

name type default description
curve string

Comma separated pairs of numbers representing the envelope. Each pair defines the value and the time. By default, the time is a proportion of the sample’s duration. For example, 0.5 means half the sample’s duration.

beats boolean false

Time (the second value of each curve pair) is set in beats (relative to the inherited bpm) instead of as a proportion of the sample’s duration. In other words, use absolute values. Either way, all values are capped to the sample’s duration.

prop string null

The audioParam to affect. Generic props are not applicable.

ramp string

Not applicable. The curve is defined using curve.

from string

A CSS selector representing all elements from which events will be listened to. If not set, the node array defaults to the element’s defaultFrom function’s return value.

to string

A CSS selector representing all elements to affect in response to the event. If not set, the node array defaults to the element’s defaultTo function’s return value.

for string blam

A space separated list of events the element should be “listening for”. Most HYPERBLAM elements emit a generic blam event.

bypass boolean false

Whether to stop responding to events as they happen.

chance boolean 1

The probability that the event will be responded to. From 0 to 1.

Examples

Examples that use the Envelope element: