Skip to content

1681-engine / index / SynthLayer

Interface: SynthLayer ​

Defined in: src/audio/synth.ts:8

Properties ​

at? ​

ts
optional at?: number;

Defined in: src/audio/synth.ts:18

Attack (s).


c? ​

ts
optional c?: number;

Defined in: src/audio/synth.ts:21

Decay curve exponent: 1 is linear, higher falls away faster.


d? ​

ts
optional d?: number;

Defined in: src/audio/synth.ts:16

Delay before the layer starts (s).


duty? ​

ts
optional duty?: number;

Defined in: src/audio/synth.ts:22


f? ​

ts
optional f?: [number, number];

Defined in: src/audio/synth.ts:12

Pitch at the start and at the end of the layer (Hz), swept exponentially.


g ​

ts
g: number;

Defined in: src/audio/synth.ts:19


hp? ​

ts
optional hp?: [number, number];

Defined in: src/audio/synth.ts:25


lp? ​

ts
optional lp?: [number, number];

Defined in: src/audio/synth.ts:24

Low- and high-pass cutoff at the start and the end (Hz).


t ​

ts
t: number;

Defined in: src/audio/synth.ts:14

Length (s).


w ​

ts
w: "square" | "sine" | "tri" | "saw" | "noise";

Defined in: src/audio/synth.ts:10

Waveform; noise is white noise, or sample-and-hold noise at f Hz when f is given (crunchier).

Released under the MIT License.