AudioSegment

@Serializable
data class AudioSegment(val start: Float? = null, val duration: Float, val confidence: Float? = null, val loudnessStart: Float, val loudnessMaxTime: Float? = null, val loudnessMax: Float, val loudnessEnd: Float? = null, val pitches: List<Float>, val timbre: List<Float>)(source)

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

Link copied to clipboard
constructor(start: Float? = null, duration: Float, confidence: Float? = null, loudnessStart: Float, loudnessMaxTime: Float? = null, loudnessMax: Float, loudnessEnd: Float? = null, pitches: List<Float>, timbre: List<Float>)

Properties

Link copied to clipboard
val confidence: Float? = null
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "loudness_end")
val loudnessEnd: Float? = null
Link copied to clipboard
@SerialName(value = "loudness_max")
val loudnessMax: Float
Link copied to clipboard
@SerialName(value = "loudness_max_time")
val loudnessMaxTime: Float? = null
Link copied to clipboard
@SerialName(value = "loudness_start")
val loudnessStart: Float
Link copied to clipboard
Link copied to clipboard
val start: Float? = null
Link copied to clipboard