Class: Spotted::Models::AudioAnalysisRetrieveResponse::Track

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

Overview

See Also:

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(analysis_channels: nil, analysis_sample_rate: nil, code_version: nil, codestring: nil, duration: nil, echoprint_version: nil, echoprintstring: nil, end_of_fade_in: nil, key: nil, key_confidence: nil, loudness: nil, mode: nil, mode_confidence: nil, num_samples: nil, offset_seconds: nil, rhythm_version: nil, rhythmstring: nil, sample_md5: nil, start_of_fade_out: nil, synch_version: nil, synchstring: nil, tempo: nil, tempo_confidence: nil, time_signature: nil, time_signature_confidence: nil, window_seconds: nil) ⇒ Object

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

Parameters:

  • analysis_channels (Integer) (defaults to: nil)

    The number of channels used for analysis. If 1, all channels are summed together

  • analysis_sample_rate (Integer) (defaults to: nil)

    The sample rate used to decode and analyze this track. May differ from the actua

  • code_version (Float) (defaults to: nil)

    A version number for the Echo Nest Musical Fingerprint format used in the codest

  • codestring (String) (defaults to: nil)

    An [Echo Nest Musical Fingerprint (ENMFP)](academiccommons.columbia.edu/

  • duration (Float) (defaults to: nil)

    Length of the track in seconds.

  • echoprint_version (Float) (defaults to: nil)

    A version number for the EchoPrint format used in the echoprintstring field.

  • echoprintstring (String) (defaults to: nil)

    An [EchoPrint](github.com/spotify/echoprint-codegen) codestring for this

  • end_of_fade_in (Float) (defaults to: nil)

    The time, in seconds, at which the track’s fade-in period ends. If the track has

  • key (Integer) (defaults to: nil)

    The key the track is in. Integers map to pitches using standard [Pitch Class not

  • key_confidence (Float) (defaults to: nil)

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

  • loudness (Float) (defaults to: nil)

    The overall loudness of a track in decibels (dB). Loudness values are averaged a

  • mode (Integer) (defaults to: nil)

    Mode indicates the modality (major or minor) of a track, the type of scale from

  • mode_confidence (Float) (defaults to: nil)

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

  • num_samples (Integer) (defaults to: nil)

    The exact number of audio samples analyzed from this track. See also ‘analysis_s

  • offset_seconds (Integer) (defaults to: nil)

    An offset to the start of the region of the track that was analyzed. (As the ent

  • rhythm_version (Float) (defaults to: nil)

    A version number for the Rhythmstring used in the rhythmstring field.

  • rhythmstring (String) (defaults to: nil)

    A Rhythmstring for this track. The format of this string is similar to the Synch

  • sample_md5 (String) (defaults to: nil)

    This field will always contain the empty string.

  • start_of_fade_out (Float) (defaults to: nil)

    The time, in seconds, at which the track’s fade-out period starts. If the track

  • synch_version (Float) (defaults to: nil)

    A version number for the Synchstring used in the synchstring field.

  • synchstring (String) (defaults to: nil)

    A [Synchstring](github.com/echonest/synchdata) for this track.

  • tempo (Float) (defaults to: nil)

    The overall estimated tempo of a track in beats per minute (BPM). In musical ter

  • tempo_confidence (Float) (defaults to: nil)

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

  • 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`.

  • window_seconds (Integer) (defaults to: nil)

    The length of the region of the track was analyzed, if a subset of the track was



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

Instance Attribute Details

#analysis_channelsInteger?

The number of channels used for analysis. If 1, all channels are summed together to mono before analysis.

Returns:

  • (Integer, nil)


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

optional :analysis_channels, Integer

#analysis_sample_rateInteger?

The sample rate used to decode and analyze this track. May differ from the actual sample rate of this track available on Spotify.

Returns:

  • (Integer, nil)


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

optional :analysis_sample_rate, Integer

#code_versionFloat?

A version number for the Echo Nest Musical Fingerprint format used in the codestring field.

Returns:

  • (Float, nil)


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

optional :code_version, Float

#codestringString?

An [Echo Nest Musical Fingerprint (ENMFP)](academiccommons.columbia.edu/doi/10.7916/D8Q248M4) codestring for this track.

Returns:

  • (String, nil)


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

optional :codestring, String

#durationFloat?

Length of the track in seconds.

Returns:

  • (Float, nil)


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

optional :duration, Float

#echoprint_versionFloat?

A version number for the EchoPrint format used in the echoprintstring field.

Returns:

  • (Float, nil)


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

optional :echoprint_version, Float

#echoprintstringString?

An [EchoPrint](github.com/spotify/echoprint-codegen) codestring for this track.

Returns:

  • (String, nil)


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

optional :echoprintstring, String

#end_of_fade_inFloat?

The time, in seconds, at which the track’s fade-in period ends. If the track has no fade-in, this will be 0.0.

Returns:

  • (Float, nil)


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

optional :end_of_fade_in, Float

#keyInteger?

The key the track is in. Integers map to pitches using standard [Pitch Class notation](en.wikipedia.org/wiki/Pitch_class). E.g. 0 = C, 1

C♯/D♭, 2 = D, and so on. If no key was detected, the value is -1.

Returns:

  • (Integer, nil)


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

optional :key, Integer

#key_confidenceFloat?

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

Returns:

  • (Float, nil)


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

optional :key_confidence, Float

#loudnessFloat?

The overall loudness of a track in decibels (dB). Loudness values are averaged across the entire track and are useful for comparing relative loudness of tracks. Loudness is the quality of a sound that is the primary psychological correlate of physical strength (amplitude). Values typically range between -60 and 0 db.

Returns:

  • (Float, nil)


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

optional :loudness, Float

#modeInteger?

Mode indicates the modality (major or minor) of a track, the type of scale from which its melodic content is derived. Major is represented by 1 and minor is 0.

Returns:

  • (Integer, nil)


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

optional :mode, Integer

#mode_confidenceFloat?

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

Returns:

  • (Float, nil)


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

optional :mode_confidence, Float

#num_samplesInteger?

The exact number of audio samples analyzed from this track. See also ‘analysis_sample_rate`.

Returns:

  • (Integer, nil)


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

optional :num_samples, Integer

#offset_secondsInteger?

An offset to the start of the region of the track that was analyzed. (As the entire track is analyzed, this should always be 0.)

Returns:

  • (Integer, nil)


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

optional :offset_seconds, Integer

#rhythm_versionFloat?

A version number for the Rhythmstring used in the rhythmstring field.

Returns:

  • (Float, nil)


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

optional :rhythm_version, Float

#rhythmstringString?

A Rhythmstring for this track. The format of this string is similar to the Synchstring.

Returns:

  • (String, nil)


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

optional :rhythmstring, String

#sample_md5String?

This field will always contain the empty string.

Returns:

  • (String, nil)


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

optional :sample_md5, String

#start_of_fade_outFloat?

The time, in seconds, at which the track’s fade-out period starts. If the track has no fade-out, this should match the track’s length.

Returns:

  • (Float, nil)


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

optional :start_of_fade_out, Float

#synch_versionFloat?

A version number for the Synchstring used in the synchstring field.

Returns:

  • (Float, nil)


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

optional :synch_version, Float

#synchstringString?

A [Synchstring](github.com/echonest/synchdata) for this track.

Returns:

  • (String, nil)


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

optional :synchstring, String

#tempoFloat?

The overall estimated tempo of a track 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)


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

optional :tempo, Float

#tempo_confidenceFloat?

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

Returns:

  • (Float, nil)


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

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)


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

optional :time_signature, Integer

#time_signature_confidenceFloat?

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

Returns:

  • (Float, nil)


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

optional :time_signature_confidence, Float

#window_secondsInteger?

The length of the region of the track was analyzed, if a subset of the track was analyzed. (As the entire track is analyzed, this should always be 0.)

Returns:

  • (Integer, nil)


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

optional :window_seconds, Integer