Class: Spotted::Models::AudioAnalysisRetrieveResponse::Section

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/spotted/models/audio_analysis_retrieve_response.rb

Defined Under Namespace

Modules: Mode

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(confidence: nil, duration: nil, key: nil, key_confidence: nil, loudness: nil, mode: nil, mode_confidence: nil, start: nil, tempo: nil, tempo_confidence: nil, time_signature: nil, time_signature_confidence: nil) ⇒ Object

Some parameter documentations has been truncated, see Spotted::Models::AudioAnalysisRetrieveResponse::Section for more details.

Parameters:

  • confidence (Float) (defaults to: nil)

    The confidence, from 0.0 to 1.0, of the reliability of the section’s “designatio

  • duration (Float) (defaults to: nil)

    The duration (in seconds) of the section.

  • key (Integer) (defaults to: nil)

    The estimated overall key of the section. The values in this field ranging from

  • key_confidence (Float) (defaults to: nil)

    The confidence, from 0.0 to 1.0, of the reliability of the key. Songs with many

  • loudness (Float) (defaults to: nil)

    The overall loudness of the section in decibels (dB). Loudness values are useful

  • mode (Float, Spotted::Models::AudioAnalysisRetrieveResponse::Section::Mode) (defaults to: nil)

    Indicates the modality (major or minor) of a section, the type of scale from whi

  • mode_confidence (Float) (defaults to: nil)

    The confidence, from 0.0 to 1.0, of the reliability of the ‘mode`.

  • start (Float) (defaults to: nil)

    The starting point (in seconds) of the section.

  • tempo (Float) (defaults to: nil)

    The overall estimated tempo of the section in beats per minute (BPM). In musical

  • tempo_confidence (Float) (defaults to: nil)

    The confidence, from 0.0 to 1.0, of the reliability of the tempo. Some tracks co

  • time_signature (Integer) (defaults to: nil)

    An estimated time signature. The time signature (meter) is a notational conventi

  • time_signature_confidence (Float) (defaults to: nil)

    The confidence, from 0.0 to 1.0, of the reliability of the ‘time_signature`. Sec



# File 'lib/spotted/models/audio_analysis_retrieve_response.rb', line 227

Instance Attribute Details

#confidenceFloat?

The confidence, from 0.0 to 1.0, of the reliability of the section’s “designation”.

Returns:

  • (Float, nil)


144
# File 'lib/spotted/models/audio_analysis_retrieve_response.rb', line 144

optional :confidence, Float

#durationFloat?

The duration (in seconds) of the section.

Returns:

  • (Float, nil)


150
# File 'lib/spotted/models/audio_analysis_retrieve_response.rb', line 150

optional :duration, Float

#keyInteger?

The estimated overall key of the section. The values in this field ranging from 0 to 11 mapping to pitches using standard Pitch Class notation (E.g. 0 = C, 1 = C♯/D♭, 2 = D, and so on). If no key was detected, the value is -1.

Returns:

  • (Integer, nil)


158
# File 'lib/spotted/models/audio_analysis_retrieve_response.rb', line 158

optional :key, Integer

#key_confidenceFloat?

The confidence, from 0.0 to 1.0, of the reliability of the key. Songs with many key changes may correspond to low values in this field.

Returns:

  • (Float, nil)


165
# File 'lib/spotted/models/audio_analysis_retrieve_response.rb', line 165

optional :key_confidence, Float

#loudnessFloat?

The overall loudness of the section in decibels (dB). Loudness values are useful for comparing relative loudness of sections within tracks.

Returns:

  • (Float, nil)


172
# File 'lib/spotted/models/audio_analysis_retrieve_response.rb', line 172

optional :loudness, Float

#modeFloat, ...

Indicates the modality (major or minor) of a section, the type of scale from which its melodic content is derived. This field will contain a 0 for “minor”, a 1 for “major”, or a -1 for no result. Note that the major key (e.g. C major) could more likely be confused with the minor key at 3 semitones lower (e.g. A minor) as both keys carry the same pitches.



182
# File 'lib/spotted/models/audio_analysis_retrieve_response.rb', line 182

optional :mode, enum: -> { Spotted::Models::AudioAnalysisRetrieveResponse::Section::Mode }

#mode_confidenceFloat?

The confidence, from 0.0 to 1.0, of the reliability of the ‘mode`.

Returns:

  • (Float, nil)


188
# File 'lib/spotted/models/audio_analysis_retrieve_response.rb', line 188

optional :mode_confidence, Float

#startFloat?

The starting point (in seconds) of the section.

Returns:

  • (Float, nil)


194
# File 'lib/spotted/models/audio_analysis_retrieve_response.rb', line 194

optional :start, Float

#tempoFloat?

The overall estimated tempo of the section in beats per minute (BPM). In musical terminology, tempo is the speed or pace of a given piece and derives directly from the average beat duration.

Returns:

  • (Float, nil)


202
# File 'lib/spotted/models/audio_analysis_retrieve_response.rb', line 202

optional :tempo, Float

#tempo_confidenceFloat?

The confidence, from 0.0 to 1.0, of the reliability of the tempo. Some tracks contain tempo changes or sounds which don’t contain tempo (like pure speech) which would correspond to a low value in this field.

Returns:

  • (Float, nil)


210
# File 'lib/spotted/models/audio_analysis_retrieve_response.rb', line 210

optional :tempo_confidence, Float

#time_signatureInteger?

An estimated time signature. The time signature (meter) is a notational convention to specify how many beats are in each bar (or measure). The time signature ranges from 3 to 7 indicating time signatures of “3/4”, to “7/4”.

Returns:

  • (Integer, nil)


218
# File 'lib/spotted/models/audio_analysis_retrieve_response.rb', line 218

optional :time_signature, Integer

#time_signature_confidenceFloat?

The confidence, from 0.0 to 1.0, of the reliability of the ‘time_signature`. Sections with time signature changes may correspond to low values in this field.

Returns:

  • (Float, nil)


225
# File 'lib/spotted/models/audio_analysis_retrieve_response.rb', line 225

optional :time_signature_confidence, Float