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 570

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)


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

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)


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

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)


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

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)


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

optional :codestring, String

#durationFloat?

Length of the track in seconds.

Returns:

  • (Float, nil)


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

optional :duration, Float

#echoprint_versionFloat?

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

Returns:

  • (Float, nil)


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

optional :echoprint_version, Float

#echoprintstringString?

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

Returns:

  • (String, nil)


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

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)


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

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)


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

optional :key, Integer

#key_confidenceFloat?

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

Returns:

  • (Float, nil)


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

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)


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

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)


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

optional :mode, Integer

#mode_confidenceFloat?

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

Returns:

  • (Float, nil)


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

optional :mode_confidence, Float

#num_samplesInteger?

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

Returns:

  • (Integer, nil)


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

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)


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

optional :offset_seconds, Integer

#rhythm_versionFloat?

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

Returns:

  • (Float, nil)


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

optional :rhythm_version, Float

#rhythmstringString?

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

Returns:

  • (String, nil)


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

optional :rhythmstring, String

#sample_md5String?

This field will always contain the empty string.

Returns:

  • (String, nil)


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

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)


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

optional :start_of_fade_out, Float

#synch_versionFloat?

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

Returns:

  • (Float, nil)


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

optional :synch_version, Float

#synchstringString?

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

Returns:

  • (String, nil)


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

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)


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

optional :tempo, Float

#tempo_confidenceFloat?

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

Returns:

  • (Float, nil)


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

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)


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

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)


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

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)


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

optional :window_seconds, Integer