Class: Spotted::Models::AudioAnalysisRetrieveResponse

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

Overview

Defined Under Namespace

Classes: Meta, Section, Segment, Track

Instance Attribute Summary collapse

Class Method 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, loudness_end: nil, loudness_max: nil, loudness_max_time: nil, loudness_start: nil, pitches: nil, start: nil, timbre: nil) ⇒ Object

Some parameter documentations has been truncated, see Segment for more details.

Parameters:

  • confidence (Float) (defaults to: nil)

    The confidence, from 0.0 to 1.0, of the reliability of the segmentation. Segment

  • duration (Float) (defaults to: nil)

    The duration (in seconds) of the segment.

  • loudness_end (Float) (defaults to: nil)

    The offset loudness of the segment in decibels (dB). This value should be equiva

  • loudness_max (Float) (defaults to: nil)

    The peak loudness of the segment in decibels (dB). Combined with ‘loudness_start

  • loudness_max_time (Float) (defaults to: nil)

    The segment-relative offset of the segment peak loudness in seconds. Combined wi

  • loudness_start (Float) (defaults to: nil)

    The onset loudness of the segment in decibels (dB). Combined with ‘loudness_max`

  • pitches (Array<Float>) (defaults to: nil)

    Pitch content is given by a “chroma” vector, corresponding to the 12 pitch class

  • start (Float) (defaults to: nil)

    The starting point (in seconds) of the segment.

  • timbre (Array<Float>) (defaults to: nil)

    Timbre is the quality of a musical note or sound that distinguishes different ty



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

Instance Attribute Details

#barsArray<Spotted::Models::TimeIntervalObject>?

The time intervals of the bars throughout the track. A bar (or measure) is a segment of time defined as a given number of beats.

Returns:



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

optional :bars, -> { Spotted::Internal::Type::ArrayOf[Spotted::TimeIntervalObject] }

#beatsArray<Spotted::Models::TimeIntervalObject>?

The time intervals of beats throughout the track. A beat is the basic time unit of a piece of music; for example, each tick of a metronome. Beats are typically multiples of tatums.

Returns:



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

optional :beats, -> { Spotted::Internal::Type::ArrayOf[Spotted::TimeIntervalObject] }

#metaSpotted::Models::AudioAnalysisRetrieveResponse::Meta?



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

optional :meta, -> { Spotted::Models::AudioAnalysisRetrieveResponse::Meta }

#sectionsArray<Spotted::Models::AudioAnalysisRetrieveResponse::Section>?

Sections are defined by large variations in rhythm or timbre, e.g. chorus, verse, bridge, guitar solo, etc. Each section contains its own descriptions of tempo, key, mode, time_signature, and loudness.



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

optional :sections,
-> { Spotted::Internal::Type::ArrayOf[Spotted::Models::AudioAnalysisRetrieveResponse::Section] }

#segmentsArray<Spotted::Models::AudioAnalysisRetrieveResponse::Segment>?

Each segment contains a roughly conisistent sound throughout its duration.



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

optional :segments,
-> { Spotted::Internal::Type::ArrayOf[Spotted::Models::AudioAnalysisRetrieveResponse::Segment] }

#tatumsArray<Spotted::Models::TimeIntervalObject>?

A tatum represents the lowest regular pulse train that a listener intuitively infers from the timing of perceived musical events (segments).

Returns:



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

optional :tatums, -> { Spotted::Internal::Type::ArrayOf[Spotted::TimeIntervalObject] }

#trackSpotted::Models::AudioAnalysisRetrieveResponse::Track?



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

optional :track, -> { Spotted::Models::AudioAnalysisRetrieveResponse::Track }

Class Method Details

.valuesArray<Float>

Returns:

  • (Array<Float>)


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