package ocue

  1. Overview
  2. Docs

Module Ocue.TrackSource

Operations on TRACK within a cue sheet.

Sourcemodule Flags : sig ... end

Operations on set of Flag

Sourcemodule Indexes : sig ... end
Sourcetype t

The type representing a TRACK within a cue sheet.

Sourceval init : ?pregap:Time.t -> ?postgap:Time.t -> ?title:string -> ?performer:string -> ?songwriter:string -> ?isrc:string -> ?rems:string list -> track:(int * TrackMode.t) -> Flag.t list -> (int * Time.t) list -> t

init ?pregap ?postgap ?title ?performer ?songwriter ?isrc ?(rems = []) ~track flags indexes creates a new track

Sourceval empty : track:(int * TrackMode.t) -> t

empty ~track is init ~track [] []

Sourceval track : t -> int * TrackMode.t

track track returns the position and the trackmode of track.

Sourceval flags : t -> Flags.t

flags track returns the set of flags for track.

Sourceval pregap : t -> Time.t option

pregrap track returns the pregrap time for track.

Sourceval postgap : t -> Time.t option

postgap track returns the postgap time for track.

Sourceval title : t -> string option

title track returns the title of track.

Sourceval performer : t -> string option

performer track returns the performer of track.

Sourceval songwriter : t -> string option

songwriter track returns the songwriter of track.

Sourceval isrc : t -> string option

iscr track returns the iscr of track.

Sourceval rems : t -> string list

rems track returns the rems in track.

Sourceval indexes : t -> Time.t Indexes.t

indexes track returns the time indexes of track.

Sourceval has_indexes : t -> bool

has_indexes track returns whether track as time indexes.

Sourceval add_rem : string -> t -> t

add_rem comment track adds a new unformatted rem line before others rems in track

Sourceval add_rem' : string -> string -> t -> t

add_rem' key value track adds a new rem line formatted as key <space> value line before others rems in track. The key is always uppercased.

Sourceval add_index : int -> Time.t -> t -> t

add_index index time track adds a new index time in track. If a time was already associated with index, the value is replaced by time.

Sourceval add_flag : Flag.t -> t -> t

add_flag flag track adds flag to the set of flags in track.

Sourceval add_flags : Flags.t -> t -> t

add_flags flags track adds flags to the set of flags in track.

Sourceval add_pregap : Time.t -> t -> t

add_pregap time t add a pregrap for track.

Sourceval add_postgap : Time.t -> t -> t

add_postgap time t add a postgap for track.

Sourceval add_arranger : string -> t -> t

add_arranger arranger track is add_rem' "ARRANGER" arranger track

Sourceval add_composer : string -> t -> t

add_composer composer track is add_rem' "COMPOSER" composer track

Sourceval add_genre : string -> t -> t

add_genre genre track is add_rem' "GENRE" genre track

Sourceval add_date : string -> t -> t

add_date date track is add_rem' "DATE" genre track

Sourceval add_isrc : string -> t -> t

add_isrc isrc track adds isrc to track.

Sourceval add_performer : string -> t -> t

add_performer performer track adds a performer as performer in track.

Sourceval add_songwriter : string -> t -> t

add_performer songwriter track adds a songwriter as songwriter in track.

Sourceval add_title : string -> t -> t

add_title title track adds title as title of track.

Sourceval rem_key : string -> t -> string option

rem_key key track treats rems as key value pairs and tries to find the value associed with key in track.

Sourceval rem_key_ci : string -> t -> string option

rem_key_ci key track is rem_key key track but keys are compared with case-insensitivity.

Sourceval pp : Format.formatter -> t -> unit

Pretty printer

Sourceval compare : t -> t -> int

compare t1 t2 compares only the position of tracks and ignores anything else. compare t1 t2 is Stdlib.compare (fst (track t1) (fst (track t2))).

OCaml

Innovation. Community. Security.