Analysis
11 nodes
On this page 11
Channel Count
FunctionHow many channels a clip has: 1 for mono, 2 for stereo.
ChannelCount(audio: AudioBuffer) -> Integer
int ChannelCount(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to read. |
Returns
| Channels | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Analysis
- Package
- Audio Processing
Describe
FunctionA one-line description of a clip: its length, sample rate, channels and peak level.
Describe(audio: AudioBuffer) -> Text
string Describe(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to describe. |
Returns
| Description | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Analysis
- Package
- Audio Processing
Dominant Frequency
FunctionThe frequency a clip holds most of - for a single note, its pitch.
DominantFrequency(audio: AudioBuffer) -> Number
double DominantFrequency(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to analyse. |
Returns
| Frequency | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Analysis
- Package
- Audio Processing
Duration
FunctionA clip's length.
Duration(audio: AudioBuffer) -> Number
double Duration(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to measure. |
Returns
| Seconds | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Analysis
- Package
- Audio Processing
Peak
FunctionThe loudest sample in a clip, from 0 (silent) to 1 (full scale).
Peak(audio: AudioBuffer) -> Number
double Peak(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to measure. |
Returns
| Peak | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Analysis
- Package
- Audio Processing
Peak Decibels
FunctionThe loudest sample in a clip, in decibels below full scale.
PeakDecibels(audio: AudioBuffer) -> Number
double PeakDecibels(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to measure. |
Returns
| Decibels | Number |
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
FunctionA 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.
Rms(audio: AudioBuffer) -> Number
double Rms(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to measure. |
Returns
| RMS | Number |
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
FunctionA clip's average level in decibels below full scale.
RmsDecibels(audio: AudioBuffer) -> Number
double RmsDecibels(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to measure. |
Returns
| Decibels | Number |
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
FunctionHow many samples a clip has per second, per channel.
SampleRate(audio: AudioBuffer) -> Integer
int SampleRate(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to read. |
Returns
| Sample Rate | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Analysis
- Package
- Audio Processing
Spectral Centroid
FunctionThe centre of gravity of a clip's spectrum - a single number for how bright it sounds.
SpectralCentroid(audio: AudioBuffer) -> Number
double SpectralCentroid(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to analyse. |
Returns
| Frequency | Number |
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
FunctionHow much of each frequency a clip holds, averaged over its whole length.
Spectrum -> Audio Spectrum
audio: AudioBuffer
transformSize: IntegerAudioSpectrum Spectrum(
AudioBuffer audio,
int transformSize = 8192)Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to analyse. |
| transformSize | Integer | 8192 | Samples per transform: a power of two from 256 to 65536. Bigger resolves closer frequencies. |
Returns
| Spectrum | Audio 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