Music Analysis
8 nodes
On this page 8
Chroma
FunctionHow much of each of the twelve pitch classes a clip holds, C to B, folded across every octave and averaged over the clip - its harmony at a glance.
Signature
Chroma(audio: AudioBuffer) -> Number Array
double[] Chroma(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip. |
Returns
| Chroma | Number Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Music Analysis
- Package
- Audio Processing
Detect Key
FunctionThe key a clip is most likely in, by correlating its chroma with the Krumhansl-Kessler major and minor key profiles.
Signature
DetectKey(audio: AudioBuffer) -> (Key: Text, confidence: Number)
string DetectKey(AudioBuffer audio, out double confidence)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip; a few seconds of the music at least. |
Returns
| Key | Text |
| confidence | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Music Analysis
- Package
- Audio Processing
Detect Onsets
FunctionWhen each new note or hit begins, in seconds.
Signature
DetectOnsets -> Number Array
audio: AudioBuffer
sensitivity: Number
separation: Numberdouble[] DetectOnsets(
AudioBuffer audio,
double sensitivity = 2,
double separation = 100)Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip; several channels are averaged. |
| sensitivity | Number | 2 | How far above the recent average a rise in spectral flux must be to count; lower finds more. |
| separation | Number | 100 | The least time in milliseconds between two onsets. |
Returns
| Onsets | Number Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Music Analysis
- Package
- Audio Processing
Detect Pitch
FunctionThe one pitch a clip mostly holds: the median of its pitch track.
Signature
DetectPitch(audio: AudioBuffer) -> (Frequency: Number, note: Text)
double DetectPitch(AudioBuffer audio, out string note)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip. |
Returns
| Frequency | Number |
| note | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Music Analysis
- Package
- Audio Processing
Estimate Tempo
FunctionA clip's tempo in beats per minute.
Signature
EstimateTempo(audio: AudioBuffer) -> Number
double EstimateTempo(AudioBuffer audio)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip. |
Returns
| Tempo | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Music Analysis
- Package
- Audio Processing
Note Name
FunctionThe name of the equal-tempered note nearest a frequency, at A4 = 440 Hz.
Signature
NoteName(frequency: Number) -> (Note: Text, cents: Number)
string NoteName(double frequency, out double cents)
Parameters
| name | type | default | description |
|---|---|---|---|
| frequency | Number | — | The frequency in Hz. |
Returns
| Note | Text |
| cents | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Music Analysis
- Package
- Audio Processing
Track Beats
FunctionThe beats of a clip, in seconds, from a bank of comb filters that lock on to the tempo and its phase.
Signature
TrackBeats(audio: AudioBuffer) -> (Beats: Number Array, tempo: Number)
double[] TrackBeats(AudioBuffer audio, out double tempo)
Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip; several channels are averaged. |
Returns
| Beats | Number Array |
| tempo | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Music Analysis
- Package
- Audio Processing
Track Pitch
FunctionFollows the pitch of a clip that plays one note at a time - a voice, a flute, a bass line - window by window.
Signature
TrackPitch -> Pitch Point Array
audio: AudioBuffer
minimum: Number
maximum: NumberPitchPoint[] TrackPitch(
AudioBuffer audio,
double minimum = 50,
double maximum = 1000)Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip; several channels are averaged. |
| minimum | Number | 50 | The lowest pitch to look for, in Hz. |
| maximum | Number | 1000 | The highest, in Hz. |
Returns
| Pitches | Pitch Point Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Music Analysis
- Package
- Audio Processing