class RemiAudio::Cue::Track

Overview

A virtual representation of the data for a TRACK command within a CUE sheet. This is a single track for a CD.

Defined in:

remiaudio/cue.cr

Constant Summary

ISRC_LEN = 12

The expected length of the ISRC field, in bytes.

MAX_PERFORMER_LEN = 80

The maximum length of the PERFORMER field, in bytes.

MAX_SONGWRITER_LEN = 80

The maximum length of the SONGWRITER field, in bytes.

MAX_TITLE_LEN = 80

The maximum length of the TITLE field, in bytes.

MIN_PERFORMER_LEN = 1

The minimum length of the PERFORMER field, in bytes.

MIN_SONGWRITER_LEN = 1

The minimum length of the SONGWRITER field, in bytes.

MIN_TITLE_LEN = 1

The minimum length of the TITLE field, in bytes.

Constructors

Instance Method Summary

Constructor Detail

def self.new #

Creates a new Track instance.


[View source]

Instance Method Detail

def flags : Flags #

The Flags for this track.


[View source]
def flags=(flags : Flags) #

The Flags for this track.


[View source]
def index(num : Int) : Timestamp #

Gets the Timestamp for the INDEX num.

If num is not within 0 and 99 (inclusive), this will raise an ::ArgumentError. If the index has not been set yet, this will raise a KeyError.


[View source]
def index?(num : Int) : Timestamp | Nil #

Gets the Timestamp for the INDEX num.

If num is not within 0 and 99 (inclusive), this will raise an ::ArgumentError. If the index has not been set yet, this returns nil.


[View source]
def isrc : String | Nil #

The ISRC for this track.

For format information, see here.


[View source]
def isrc=(value : String | Nil) : Nil #

Sets the ISRC value. The value must be exactly ISRC_LEN bytes long.


[View source]
def performer : String | Nil #

The name of the performer of this track.


[View source]
def performer=(value : String | Nil) : Nil #

Sets the name of the performer for this track. The value must be between MIN_PERFORMER_LEN and MAX_PERFORMER_LEN bytes long.


[View source]
def postgap : Timestamp | Nil #

The length of the gap after this track, if any.


[View source]
def postgap=(postgap : Timestamp | Nil) #

The length of the gap after this track, if any.


[View source]
def pregap : Timestamp | Nil #

The length of the gap before this track, if any.


[View source]
def pregap=(pregap : Timestamp | Nil) #

The length of the gap before this track, if any.


[View source]
def setIndex(num : Int, ts : Timestamp) : self #

Sets the Timestamp for the INDEX num. Any existing Timestamp for that index will be overwritten.

If num is not within 0 and 99 (inclusive), this will raise an ::ArgumentError.


[View source]
def songwriter : String | Nil #

The name of the songwriter of this track.


[View source]
def songwriter=(value : String | Nil) : Nil #

Sets the name of the songwriter for this track. The value must be between MIN_SONGWRITER_LEN and MAX_SONGWRITER_LEN bytes long.


[View source]
def title : String | Nil #

The title of this track.


[View source]
def title=(value : String | Nil) : Nil #

Sets the name of the title for this track. The value must be between MIN_TITLE_LEN and MAX_TITLE_LEN bytes long.


[View source]
def to_s(io : IO) : Nil #
Description copied from class Reference

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>

[View source]
def trackNumber : UInt32 #

The track number for this track.


[View source]
def trackNumber=(value : Int) : Nil #

[View source]
def type : Type #

The Type of this track.


[View source]
def type=(type : Type) #

The Type of this track.


[View source]
def write(io : IO) : Nil #

Similar to #to_s, except this is properly indented for a CUE sheet and includes all relevant lines.


[View source]