AudioSegment

data class AudioSegment(start: Float?, duration: Float, confidence: Float?, loudnessStart: Float, loudnessMaxTime: Float?, loudnessMax: Float, loudnessEnd: Float?, pitches: List<Float>, timbre: List<Float>)

Audio segments attempts to subdivide a song into many segments, with each segment containing a roughly consistent sound throughout its duration.

Parameters

start

The starting point (in seconds) of the segment.

duration

The duration (in seconds) of the segment.

confidence

The confidence, from 0.0 to 1.0, of the reliability of the segmentation. Segments of the song which are difficult to logically segment (e.g: noise) may correspond to low values in this field.

loudnessStart

The onset loudness of the segment in decibels (dB). Combined with loudness_max and loudness_max_time, these components can be used to desctibe the “attack” of the segment.

loudnessMaxTime

The segment-relative offset of the segment peak loudness in seconds. Combined with loudness_start and loudness_max, these components can be used to desctibe the “attack” of the segment.

loudnessMax

The peak loudness of the segment in decibels (dB). Combined with loudness_start and loudness_max_time, these components can be used to desctibe the “attack” of the segment.

loudnessEnd

The offset loudness of the segment in decibels (dB). This value should be equivalent to the loudness_start of the following segment.

pitches

A “chroma” vector representing the pitch content of the segment, corresponding to the 12 pitch classes C, C#, D to B, with values ranging from 0 to 1 that describe the relative dominance of every pitch in the chromatic scale

timbre

Timbre is the quality of a musical note or sound that distinguishes different types of musical instruments, or voices. Timbre vectors are best used in comparison with each other.

Constructors

AudioSegment
Link copied to clipboard
common
fun AudioSegment(start: Float? = null, duration: Float, confidence: Float? = null, loudnessStart: Float, loudnessMaxTime: Float? = null, loudnessMax: Float, loudnessEnd: Float? = null, pitches: List<Float>, timbre: List<Float>)
The starting point (in seconds) of the segment.

Properties

confidence
Link copied to clipboard
common
val confidence: Float? = null
The confidence, from 0.0 to 1.0, of the reliability of the segmentation.
duration
Link copied to clipboard
common
val duration: Float
The duration (in seconds) of the segment.
loudnessEnd
Link copied to clipboard
common
val loudnessEnd: Float? = null
The offset loudness of the segment in decibels (dB).
loudnessMax
Link copied to clipboard
common
val loudnessMax: Float
The peak loudness of the segment in decibels (dB).
loudnessMaxTime
Link copied to clipboard
common
val loudnessMaxTime: Float? = null
The segment-relative offset of the segment peak loudness in seconds.
loudnessStart
Link copied to clipboard
common
val loudnessStart: Float
The onset loudness of the segment in decibels (dB).
pitches
Link copied to clipboard
common
val pitches: List<Float>
A “chroma” vector representing the pitch content of the segment, corresponding to the 12 pitch classes C, C#, D to B, with values ranging from 0 to 1 that describe the relative dominance of every pitch in the chromatic scale
start
Link copied to clipboard
common
val start: Float? = null
The starting point (in seconds) of the segment.
timbre
Link copied to clipboard
common
val timbre: List<Float>
Timbre is the quality of a musical note or sound that distinguishes different types of musical instruments, or voices.

Sources

common source
Link copied to clipboard