OptionalattackAttack time in seconds — linear ramp from 0 up to gain. Clamped
to [0.001, duration / 2]. For very short durations (< 2 ms) the
upper bound wins so the envelope still fits inside the playback
window. Defaults to 0.005.
Total sound length in seconds (envelope decays over this window).
Carrier frequency in Hz. Pass an array to layer multiple partials (chord, bell ring, fundamental + harmonic) — they share the gain envelope, pan, and pitch slide.
OptionalgainPeak gain at attack end, 0..1. Defaults to 0.1.
OptionalpanStereo pan, -1 (full left) to 1 (full right). Defaults to 0.
OptionalpitchFrequency multiplier applied over duration as an exponential
ramp. 1 = no slide (default); 0.5 = slide an octave down;
2 = slide an octave up. Useful for percussive impacts (small
value < 1) or rising stings (value > 1).
OptionalwaveOscillator waveform. Defaults to "sine".
Options for
tone.