Defines a Replayer track

interface ITrack {
    Album: string;
    Artist: string;
    Cues: ICue[];
    Duration: null | number;
    Id: string;
    Meter: null | IMeter;
    Name: string;
    PitchShift: number;
    PlaybackRate: number;
    PlayheadPosition: null | number;
    PreRoll: null | number;
    Tags: Set<string>;
    Url: string;
    UseMeasureNumbers: null | boolean;
    Volume: number;
}

Implemented by

Properties

Album: string

The album name where this track was taken from.

Remarks

This is a more descriptive information and not intended to uniquely identify an album.

Artist: string

The artist

Cues: ICue[]

The cues

Duration: null | number

The extracted duration of the loaded media file for this track.

Remarks

This is only defined if there is a loaded media file for this track.

Devdoc

This must get calculated/reset if the track is loaded/unloaded. It must never get persisted.

Id: string

A unique identifier for this track.

Remarks

To work correctly, this identifier must be unique among all currenlty loaded compilations. Best, to make it universally unique by using a UUID.

Devdoc

This identifier allows to recognise this item over multiple edits

Meter: null | IMeter

The musical meter for this track

Remark

This is only relevant for music tracks.

Name: string

The name of the track

PitchShift: number

The amount of pitch shift in [cents] (aka detune) at which the track's media is being played back. A value of 0, the default, indicates no shift.

Remarks

Not all types of track support a pitch shift.

PlaybackRate: number

The rate at which the track's media is being played back. A value of 1.0, the default, indicates normal speed.

Remarks

Not all types of track support a custom playback tempo.

PlayheadPosition: null | number

The track's (coarse, perodically persisted) playhead position, in [seconds].

Remarks

This is not necessarily exactly the current position in the playing media. This value is intended to be periodically updated only to remember the playback position a track (re-)load. When loading a track, the value will be applied once after a media resource with a player has been mounted. If not set, zero may be used

PreRoll: null | number

The track's custom pre-roll duration, in [seconds]

Remarks

If not set, the default pre-roll duration, if any, should be used at playback

Tags: Set<string>

The tags

Remarks

The set of tags can be arbitrarily long. Tags classify a track.

Url: string

The URL or the local file name (possibly including a path) for the media file.

Devdoc

If it is relative, it may get made absolute using the compilation's media path.

UseMeasureNumbers: null | boolean

Whether to use the measure number to set and display the cue positions

Volume: number

The playback volume for this track in the range of [0..1].

Remarks

This can be set by the user, and is persisted.