Class: Preset

Preset(name, envelope, oscillators, type)

Type for storing envelope and oscillator preset information for recalling user defined presets and UI persistence between sessions.

Constructor

new Preset(name, envelope, oscillators, type)

Parameters:
Name Type Default Description
name string
envelope object
Properties
Name Type Attributes Default Description
attack number <optional>
0.2
decay number <optional>
0.2
sustain number <optional>
0.4
release number <optional>
0.1
oscillators Array.<object>
Properties
Name Type Attributes Default Description
waveform string <optional>
'sine' Options are 'sine', 'square', 'triangle', 'sawtooth', 'custom'
gain number <optional>
0.5
detune number <optional>
0
note-offset number <optional>
0
octave number <optional>
0
invert-phase boolean <optional>
false
bytebeatCode string <optional>
''
type string 'additive-oscillators' Options are 'additive-oscillators', 'bytebeat', 'harmonic-series'
Source: