skip to content

Envelope

An auxiliary envelope. Control any audioParam of any element by describing a curve for its value. Uses the closest Sampler-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.

value string null

Not applicable. Use curve in its place.

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.

event string blam

The event type to listen for. For many Event-based elements, this is the generic custom event blam.

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: