Dynamics
6 nodes
On this page 6
Compress
FunctionEvens out a clip's level: whatever rises above the threshold is turned down by the ratio, through a soft knee, with the attack and release a studio compressor has.
Compress -> AudioBuffer
audio: AudioBuffer
threshold: Number
ratio: Number
knee: Number
attack: Number
release: Number
makeup: NumberAudioBuffer Compress(
AudioBuffer audio,
double threshold = -18,
double ratio = 4,
double knee = 6,
double attack = 10,
double release = 150,
double makeup = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to compress. |
| threshold | Number | -18 | Level in dB above which compression starts. |
| ratio | Number | 4 | How hard: 4 turns every 4 dB over the threshold into 1. |
| knee | Number | 6 | Width in dB of the soft knee around the threshold. |
| attack | Number | 10 | Milliseconds to clamp down on a rise. |
| release | Number | 150 | Milliseconds to let go. |
| makeup | Number | 0 | Gain in dB added afterwards to win back level. |
Returns
| Audio | AudioBuffer |
Remarks
The channels are linked - one gain for all - so a stereo image does not wander. The look-ahead is compensated, so the result lines up with the input.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Dynamics
- Package
- Audio Processing
Duck
FunctionTurns one clip down while another plays - music under a voice-over, the classic radio duck.
Duck -> AudioBuffer
audio: AudioBuffer
control: AudioBuffer
threshold: Number
reduction: Number
attack: Number
release: NumberAudioBuffer Duck(
AudioBuffer audio,
AudioBuffer control,
double threshold = -30,
double reduction = 12,
double attack = 50,
double release = 200)Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to turn down. |
| control | AudioBuffer | — | The clip whose sound triggers it, such as the voice; heard over the first clip's length. |
| threshold | Number | -30 | How loud in dB the control must be to duck. |
| reduction | Number | 12 | How far in dB to turn the clip down. |
| attack | Number | 50 | Milliseconds to fall. |
| release | Number | 200 | Milliseconds to come back. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Dynamics
- Package
- Audio Processing
Limit
FunctionKeeps a clip under a ceiling without audible clipping: a look-ahead limiter that turns the level down just before a peak would cross it.
Limit -> AudioBuffer
audio: AudioBuffer
ceiling: Number
lookahead: Number
release: NumberAudioBuffer Limit(
AudioBuffer audio,
double ceiling = -1,
double lookahead = 5,
double release = 50)Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to limit. |
| ceiling | Number | -1 | The highest level in dB the clip may reach; -1 leaves room for a codec's overshoot. |
| lookahead | Number | 5 | Milliseconds the limiter sees ahead. |
| release | Number | 50 | Milliseconds to let go after a peak. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Dynamics
- Package
- Audio Processing
Loudness
FunctionA clip's integrated loudness in LUFS, measured as ITU-R BS.1770 does: K-weighted, gated, over the whole clip.
Loudness(audio: AudioBuffer) -> Number
double Loudness(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to measure. |
Returns
| Loudness | Number |
Remarks
Streaming services aim at about -14 LUFS, broadcast at -23 (EBU R128) or -24 (ATSC A/85). A clip too short or too quiet to measure gives negative infinity.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Dynamics
- Package
- Audio Processing
Normalize Loudness
FunctionBrings a clip to a target integrated loudness, as a streaming service or broadcaster would.
NormalizeLoudness -> AudioBuffer
audio: AudioBuffer
target: Number
maximumGain: NumberAudioBuffer NormalizeLoudness(
AudioBuffer audio,
double target = -14,
double maximumGain = 30)Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to adjust. |
| target | Number | -14 | The loudness to reach, in LUFS. |
| maximumGain | Number | 30 | The most gain in dB it may add, so silence is not turned into noise. |
Returns
| Audio | AudioBuffer |
Remarks
This only changes gain; follow it with Limit if the gain pushes peaks past full scale.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Dynamics
- Package
- Audio Processing
True Peak
FunctionA clip's true peak in dBTP: the highest the waveform reaches between samples as well as on them, by 4× band-limited reconstruction, which is what a converter will actually play.
TruePeak(audio: AudioBuffer) -> Number
double TruePeak(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to measure. |
Returns
| TruePeak | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Dynamics
- Package
- Audio Processing