soir

OVERVIEW

The fx module contains DSP effects that can be attached to tracks.

The fx module provides a set of audio effects that can be applied to tracks in the soir engine. Each track can have a set of effects with corresponding parameters, which are typically defined using the tracks.setup() function.

tracks.setup({
    'bass': tracks.mk_sampler(fxs={
        'rev': fx.mk_chorus(),
    }),
})

CLASS

Fx

Fx(name: str = 'unnamed', type: str = 'unknown', mix: float | soir.rt.ctrls.Control | None = None, extra: str | None = None) -> None

Representation of a Soir FX.

Arguments

Name Type Description
name The name of the effect.
type The effect type.
mix The mix parameter of the effect. Defaults to None.
extra Extra parameters for the effect, JSON encoded. Defaults to None.

FUNCTION

mk

mk(type: str, mix: float | soir.rt.ctrls.Control | None = None, extra: dict[str, Any] | None = None) -> soir.rt.fx.Fx

Creates a new Fx.

Arguments

Name Type Description
type str The effect type.
mix float The mix parameter of the effect. Defaults to None.
extra dict The extra parameters of the effect. Default to None.

mk_chorus

mk_chorus(time: float | soir.rt.ctrls.Control = 0.5, depth: float | soir.rt.ctrls.Control = 0.5, rate: float | soir.rt.ctrls.Control = 0.5) -> soir.rt.fx.Fx

Creates a new Chorus FX.

Arguments

Name Type Description
time The time parameter of the chorus effect. Defaults to 0.5.
depth The depth parameter of the chorus effect. Defaults to 0.5.
rate The rate parameter of the chorus effect. Defaults to 0.5.

mk_compressor

mk_compressor(source: str | None = None, threshold: float | soir.rt.ctrls.Control = 0.25, ratio: float | soir.rt.ctrls.Control = 4.0, attack: float | soir.rt.ctrls.Control = 0.005, release: float | soir.rt.ctrls.Control = 0.15, knee: float | soir.rt.ctrls.Control = 6.0, makeup: float | soir.rt.ctrls.Control = 1.0, wet: float | soir.rt.ctrls.Control = 1.0) -> soir.rt.fx.Fx

Creates a new Compressor FX.

The compressor can be keyed on its own input (plain in-line compression), on the master mix, or on the output of another track (sidechain compression, e.g. the kick track ducking the pads).

External sources are tapped after the source track's own FX, before its fader and mute: a muted (or zero-volume) track keeps driving the sidechain while never being heard, which makes it a useful inaudible "ghost" trigger. Muting the source therefore does not stop the ducking; to turn the effect off live, automate wet to 0.

External sources are read with a deterministic one block delay (~10.7 ms), which is inaudible for sidechain use.

Arguments

Name Type Description
source The signal used to compute the gain reduction. A track name for sidechain compression, "master" for the master mix, or None for the compressor's own input (plain in-line compression). Defaults to None.
threshold The threshold in the [0.0, 1.0] range.
ratio The compression ratio (1.0 = no compression).
attack The attack time in seconds.
release The release time in seconds.
knee The width of the soft knee around the threshold in dB (0.0 = hard knee). Defaults to 6.0.
makeup The makeup gain.
wet The dry/wet blend in the [0.0, 1.0] range.

mk_hpf

mk_hpf(mix: float | soir.rt.ctrls.Control | None = None, cutoff: float | soir.rt.ctrls.Control = 0.5, resonance: float | soir.rt.ctrls.Control = 0.5) -> soir.rt.fx.Fx

Creates a new High Pass Filter FX.

Arguments

Name Type Description
mix The mix parameter of the high pass filter effect. Defaults to None.
cutoff The cutoff frequency of the high pass filter in the [0.0, 1.0] range. Defaults to 0.5.
resonance The resonance of the high pass filter in the [0.0, 1.0] range. Defaults to 0.5.

mk_lpf

mk_lpf(mix: float | soir.rt.ctrls.Control | None = None, cutoff: float | soir.rt.ctrls.Control = 0.5, resonance: float | soir.rt.ctrls.Control = 0.5) -> soir.rt.fx.Fx

Creates a new Low Pass Filter FX.

Arguments

Name Type Description
mix The mix parameter of the low pass filter effect. Defaults to None.
cutoff The cutoff frequency of the low pass filter in the [0.0, 1.0] range. Defaults to 0.5.
resonance The resonance of the low pass filter in the [0.0, 1.0] range. Defaults to 0.5.

mk_reverb

mk_reverb(mix: float | soir.rt.ctrls.Control | None = None, time: float | soir.rt.ctrls.Control = 0.01, wet: float | soir.rt.ctrls.Control = 0.75, dry: float | soir.rt.ctrls.Control = 0.25) -> soir.rt.fx.Fx

Creates a new Reverb FX.

Arguments

Name Type Description
mix The mix parameter of the chorus effect. Defaults to None.
time The time parameter of the reverb effect in the [0.0, 1.0] range. Defaults to 0.01.
dry The dry parameter of the reverb effect in the [0.0, 1.0] range. Defaults to 0.25.
wet The wet parameter of the reverb effect in the [0.0, 1.0] range. Defaults to 0.75.

mk_vst

mk_vst(plugin: str, mix: float | soir.rt.ctrls.Control = 1.0, params: dict[str, float | soir.rt.ctrls.Control] | None = None) -> soir.rt.fx.Fx

Creates a new VST3 effect.

Use vst.plugins() to get a list of available plugins.

Arguments

Name Type Description
plugin The plugin UID or name.
mix The dry/wet mix of the effect in the [0.0, 1.0] range: 0.0 is fully dry (bypasses the plugin), 1.0 is fully wet. Can be a Control for live automation. Defaults to 1.0.
params Parameter values to set. Keys are parameter names, values are floats in [0.0, 1.0] range or Control references.