skip to content

Mod

Extracts discrete values from LFOs to be used as multipliers. Great for automating regular prop values over time.

DRAFT! This element is in early development and is liable to change or possibly be replaced.

class
Mod
extends
Handle
tag
<mod-blam>
see

Props

name type default description
wave string triangle

The waveform for the built-in LFO. Can be ‘sine’, ‘square’, ‘sawtooth’, or ‘triangle’.

gain number 1

Represents how much the multiplier value changes in either direction.

beats number 16

The frequency of the built-in LFO in beats, mapped to the bpm of an ancestor Audio or Sequencer element.

invert boolean false

Reverses the LFO polarity. 1 values become -1 and vice versa.

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.

value string null

Handle-derived elements support special value syntax. Separate with | and one value is chosen at random. Separate with ~ and a value is chosen within the range [x]~[n]. Separate with (a single space) if you are supplying multiple args to an element’s method.

event string blam

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

prop string null

The property (which may be a method or map to an audioParam) to affect at the 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

OH FUN! There are currently no examples using Mod.