Song Class
Interface to the current song
Access this object via the Cantabile#song property.
class Song extends EndPoint {
get name(): string;
get pr(): number;
get currentState(): string;
available(): string[];
loadSong(name: string, state: string): void;
}
#Properties
#currentState
The name of the current song state
get currentState(): string;
#name
The name of the current song
get name(): string;
#pr
The set list program number of the song (or -1 if not in set list, or not set)
get pr(): number;
#Methods
#available()
Gets a list of available songs in the user's songs folder
available(): string[];
#loadSong()
Loads the specified song from the user's song folder
loadSong(name: string, state: string): void;
-
nameName of the song to load (relative to user's song folder, without extension) -
stateOptional name of state to load, or null.
#Events
#'changed' Event
Fired when anything about the current song changes
song.on('changed', () => { });
#'currentStateChanged' Event
Fired when the current song state changes
song.on('currentStateChanged', () => { });
#'nameChanged' Event
Fired when the name of the current song changes
song.on('nameChanged', () => { });