Skip to content

Components

Components are audio-processing nodes for dynamics, filtering, and routing.

Compressor

1let comp = Compressor.make()
2let comp2 = Compressor.makeWithThreshold(-24.0)
3let comp3 = Compressor.makeWithOptions({
4 threshold: -24.0,
5 ratio: 4.0,
6 attack: 0.003,
7 release: 0.25,
8 knee: 30.0,
9})
10
11comp->Compressor.threshold // Param.t
12comp->Compressor.ratio // Param.t
13comp->Compressor.attack // Param.t
14comp->Compressor.release // Param.t
15comp->Compressor.knee // Param.t
16comp->Compressor.reduction // decibels

Limiter

1let limiter = Limiter.make()
2let limiter2 = Limiter.makeWithThreshold(-6.0)
3
4limiter->Limiter.threshold // Param.t
5limiter->Limiter.reduction // decibels

Gate

1let gate = Gate.make()
2let gate2 = Gate.makeWithOptions({
3 threshold: -40.0,
4 smoothing: 0.1,
5})
6
7gate->Gate.threshold // decibels
8gate->Gate.smoothing // float

Filter

1let filter = Filter.make()
2let filter2 = Filter.makeWithOptions({
3 frequency: 1000.0,
4 "type": "lowpass",
5 rolloff: -12,
6 q: 1.0,
7})
8
9filter->Filter.frequency // Param.t
10filter->Filter.detune // Param.t
11filter->Filter.gain // Param.t
12filter->Filter.q // Param.t
13filter->Filter.getType() // filterType
14filter->Filter.setType("highpass")
15filter->Filter.rolloff // int

EQ3

1let eq = EQ3.make()
2let eq2 = EQ3.makeWithOptions({
3 low: -6.0,
4 mid: 0.0,
5 high: 3.0,
6 lowFrequency: 400.0,
7 highFrequency: 2500.0,
8})
9
10eq->EQ3.low // Param.t
11eq->EQ3.mid // Param.t
12eq->EQ3.high // Param.t

Panner

1let panner = Panner.make()
2let panner2 = Panner.makeWithPan(0.5)
3
4panner->Panner.pan // Param.t
Was this page helpful?