Divooka Reference

Analysis

11 nodes

On this page 11

Channel Count

Function

How many channels a clip has: 1 for mono, 2 for stereo.

Signature
ChannelCount(audio: AudioBuffer) -> Integer
int ChannelCount(AudioBuffer audio)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to read.

Returns

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

Describe

Function

A one-line description of a clip: its length, sample rate, channels and peak level.

Signature
Describe(audio: AudioBuffer) -> Text
string Describe(AudioBuffer audio)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to describe.

Returns

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

Dominant Frequency

Function

The frequency a clip holds most of - for a single note, its pitch.

Signature
DominantFrequency(audio: AudioBuffer) -> Number
double DominantFrequency(AudioBuffer audio)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to analyse.

Returns

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

Duration

Function

A clip's length.

Signature
Duration(audio: AudioBuffer) -> Number
double Duration(AudioBuffer audio)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to measure.

Returns

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

Peak

Function

The loudest sample in a clip, from 0 (silent) to 1 (full scale).

Signature
Peak(audio: AudioBuffer) -> Number
double Peak(AudioBuffer audio)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to measure.

Returns

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

Peak Decibels

Function

The loudest sample in a clip, in decibels below full scale.

Signature
PeakDecibels(audio: AudioBuffer) -> Number
double PeakDecibels(AudioBuffer audio)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to measure.

Returns

DecibelsNumber

Remarks

A silent clip reads -120 dB rather than minus infinity.

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

RMS

Function

A clip's average level - the root of the mean of the squared samples - which follows how loud a clip sounds far better than its peak does.

Signature
Rms(audio: AudioBuffer) -> Number
double Rms(AudioBuffer audio)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to measure.

Returns

RMSNumber

Remarks

A full-scale sine reads about 0.707; a full-scale square wave reads 1.

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

RMS Decibels

Function

A clip's average level in decibels below full scale.

Signature
RmsDecibels(audio: AudioBuffer) -> Number
double RmsDecibels(AudioBuffer audio)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to measure.

Returns

DecibelsNumber

Remarks

A full-scale sine reads about -3 dB. A silent clip reads -120 dB.

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

Sample Rate

Function

How many samples a clip has per second, per channel.

Signature
SampleRate(audio: AudioBuffer) -> Integer
int SampleRate(AudioBuffer audio)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to read.

Returns

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

Spectral Centroid

Function

The centre of gravity of a clip's spectrum - a single number for how bright it sounds.

Signature
SpectralCentroid(audio: AudioBuffer) -> Number
double SpectralCentroid(AudioBuffer audio)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to analyse.

Returns

FrequencyNumber

Remarks

A dull, bassy clip has a low centroid and a bright, hissy one a high centroid; a filter that darkens a sound moves it down.

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

Spectrum

Function

How much of each frequency a clip holds, averaged over its whole length.

Signature
Spectrum -> Audio Spectrum
    audio: AudioBuffer
    transformSize: Integer
AudioSpectrum Spectrum(
    AudioBuffer audio,
    int transformSize = 8192)

Parameters

nametypedefaultdescription
audioAudioBuffer—The clip to analyse.
transformSizeInteger8192Samples per transform: a power of two from 256 to 65536. Bigger resolves closer frequencies.

Returns

SpectrumAudio Spectrum

Remarks

The clip is cut into overlapping stretches of Transform Size samples, each is windowed and transformed, and their power is averaged - so a steady tone reads at its true level however long the clip is, and noise settles into a smooth floor instead of a jagged one.

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