Skip to content

EZ Web Audio / PolySynthOptions

Interface: PolySynthOptions ​

Defined in: packages/core/src/poly-synth.ts:25

Configuration options for creating a PolySynth.

Properties ​

allpass? ​

optional allpass: OscillatorFilterOptions

Defined in: packages/core/src/poly-synth.ts:53

Allpass filter for default voice factory.


bandpass? ​

optional bandpass: OscillatorFilterOptions

Defined in: packages/core/src/poly-synth.ts:41

Bandpass filter for default voice factory.


createVoice()? ​

optional createVoice: (ctx) => Oscillator

Defined in: packages/core/src/poly-synth.ts:55

Custom voice factory. Overrides type/envelope/filter options.

Parameters ​

ctx ​

AudioContext

Returns ​

Oscillator


envelope? ​

optional envelope: EnvelopeOptions

Defined in: packages/core/src/poly-synth.ts:37

ADSR envelope for default voice factory.


frequency? ​

optional frequency: number

Defined in: packages/core/src/poly-synth.ts:33

Default frequency for voices — overridden by play() options (default: 440).


gain? ​

optional gain: number

Defined in: packages/core/src/poly-synth.ts:35

Default gain for voices (default: 1).


highpass? ​

optional highpass: OscillatorFilterOptions

Defined in: packages/core/src/poly-synth.ts:39

Highpass filter for default voice factory.


highshelf? ​

optional highshelf: OscillatorFilterOptions

Defined in: packages/core/src/poly-synth.ts:47

Highshelf filter for default voice factory.


lowpass? ​

optional lowpass: OscillatorFilterOptions

Defined in: packages/core/src/poly-synth.ts:43

Lowpass filter for default voice factory.


lowshelf? ​

optional lowshelf: OscillatorFilterOptions

Defined in: packages/core/src/poly-synth.ts:45

Lowshelf filter for default voice factory.


maxVoices? ​

optional maxVoices: number

Defined in: packages/core/src/poly-synth.ts:27

Maximum number of simultaneous voices (default: 8). Immutable after creation.


notch? ​

optional notch: OscillatorFilterOptions

Defined in: packages/core/src/poly-synth.ts:51

Notch filter for default voice factory.


peaking? ​

optional peaking: OscillatorFilterOptions

Defined in: packages/core/src/poly-synth.ts:49

Peaking filter for default voice factory.


stealStrategy? ​

optional stealStrategy: StealStrategy

Defined in: packages/core/src/poly-synth.ts:29

Voice stealing strategy when pool is full (default: 'lru').


type? ​

optional type: OscillatorType

Defined in: packages/core/src/poly-synth.ts:31

Oscillator waveform type for default voice factory (default: 'sine').