Divooka Reference

Effects

9 nodes

On this page 9

Band Pass

Function

Keeps a band of frequencies around a centre and turns down the rest - a telephone, a megaphone.

Signature
BandPass -> AudioBuffer
    audio: AudioBuffer
    center: Number
    resonance: Number
AudioBuffer BandPass(
    AudioBuffer audio,
    double center = 1000,
    double resonance = 2)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to filter.
centerNumber1000The middle of the band that is kept, in hertz.
resonanceNumber2How narrow the band is, from 0.5 (wide) to 20 (very narrow).

Returns

AudioAudioBuffer

Remarks

The centre frequency passes at its own level whatever the resonance; resonance only decides how narrow the band is.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Effects
Package
Audio Processing

Bit Crush

Function

Reduces a clip's resolution and sample rate on purpose, for the gritty sound of an early games console.

Signature
BitCrush -> AudioBuffer
    audio: AudioBuffer
    bits: Integer
    sampleRate: Integer
AudioBuffer BitCrush(
    AudioBuffer audio,
    int bits = 6,
    int sampleRate = 8000)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to crush.
bitsInteger6How many bits each sample keeps, from 2 (very harsh) to 16 (untouched).
sampleRateInteger8000The rate the clip is held to, in samples per second; it cannot be above the clip's own.

Returns

AudioAudioBuffer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Effects
Package
Audio Processing

Distort

Function

Overdrives a clip so its peaks round off - from warm saturation to a fuzzy distortion.

Signature
Distort(audio: AudioBuffer, drive: Number) -> AudioBuffer
AudioBuffer Distort(AudioBuffer audio, double drive = 4)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to distort.
driveNumber4How hard the clip is pushed, from about 1 (gentle) to 50 (fuzz).

Returns

AudioAudioBuffer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Effects
Package
Audio Processing

Echo

Function

Repeats a clip back to itself after a delay, each repeat quieter than the last.

Signature
Echo -> AudioBuffer
    audio: AudioBuffer
    delay: Number
    feedback: Number
    mix: Number
AudioBuffer Echo(
    AudioBuffer audio,
    double delay = 0.25,
    double feedback = 0.4,
    double mix = 0.4)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to echo.
delayNumber0.25Time between repeats, in seconds.
feedbackNumber0.4How much of each repeat comes back again, from 0 (one repeat) to 0.95 (a long trail).
mixNumber0.4How loud the repeats are against the original, from 0 (none) to 1 (repeats only).

Returns

AudioAudioBuffer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Effects
Package
Audio Processing

High Pass

Function

Keeps the frequencies above a cutoff and turns down everything below it - a thinner, brighter sound, like a small radio.

Signature
HighPass -> AudioBuffer
    audio: AudioBuffer
    cutoff: Number
    resonance: Number
AudioBuffer HighPass(
    AudioBuffer audio,
    double cutoff = 1000,
    double resonance = 0.707)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to filter.
cutoffNumber1000The frequency where the filter starts to bite, in hertz.
resonanceNumber0.707How sharply the filter peaks at the cutoff, from 0.5 to 20; 0.707 is flat, higher values ring.

Returns

AudioAudioBuffer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Effects
Package
Audio Processing

Low Pass

Function

Keeps the frequencies below a cutoff and turns down everything above it - a duller, warmer, more distant sound.

Signature
LowPass -> AudioBuffer
    audio: AudioBuffer
    cutoff: Number
    resonance: Number
AudioBuffer LowPass(
    AudioBuffer audio,
    double cutoff = 1000,
    double resonance = 0.707)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to filter.
cutoffNumber1000The frequency where the filter starts to bite, in hertz.
resonanceNumber0.707How sharply the filter peaks at the cutoff, from 0.5 to 20; 0.707 is flat, higher values ring.

Returns

AudioAudioBuffer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Effects
Package
Audio Processing

Notch

Function

Cuts out a narrow band of frequencies around a centre and leaves the rest - for removing a hum or a whistle.

Signature
Notch -> AudioBuffer
    audio: AudioBuffer
    center: Number
    resonance: Number
AudioBuffer Notch(
    AudioBuffer audio,
    double center = 1000,
    double resonance = 2)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to filter.
centerNumber1000The frequency to remove, in hertz.
resonanceNumber2How narrow the cut is, from 0.5 (wide) to 20 (very narrow).

Returns

AudioAudioBuffer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Effects
Package
Audio Processing

Reverb

Function

Puts a clip in a room: a wash of reflections that makes it sound further away and less dry.

Signature
Reverb -> AudioBuffer
    audio: AudioBuffer
    roomSize: Number
    damping: Number
    mix: Number
AudioBuffer Reverb(
    AudioBuffer audio,
    double roomSize = 0.8,
    double damping = 0.35,
    double mix = 0.3)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to place.
roomSizeNumber0.8How long the room rings, from 0 (a cupboard) to 0.98 (a cathedral).
dampingNumber0.35How quickly the high frequencies die in the room, from 0 (hard walls) to 0.99 (soft furnishings).
mixNumber0.3How much of the room is heard against the original, from 0 to 1.

Returns

AudioAudioBuffer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Effects
Package
Audio Processing

Ring Modulate

Function

Multiplies a clip by a tone, turning it metallic - at low frequencies a voice becomes a robot's.

Signature
RingModulate -> AudioBuffer
    audio: AudioBuffer
    frequency: Number
AudioBuffer RingModulate(
    AudioBuffer audio,
    double frequency = 50)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to modulate.
frequencyNumber50The modulating tone, in hertz; 30 to 80 for a robot voice, a few hundred for a bell-like clang.

Returns

AudioAudioBuffer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Effects
Package
Audio Processing