Show:
Extends EndPoint

Used to access and control Cantabile's set list functionality.

Access this object via the setList property.

Methods

available () String[]

Defined in SetList.js:150

Gets a list of available set lists in the user's set list folder

Returns:

String[]:

An array of set list names (relative to user's set list folder, extension removed)

close ()

Inherited from EndPoint: EndPoint.js:55

Closes the end point and stops listening for events.

This method no longer needs to be explicitly called as end points are now automatically closed when the last event listener is removed.

loadFirstSong
(
  • delayed=false
)

Defined in SetList.js:110

Load the first song in the set list

Parameters:

  • [delayed=false] Boolean optional

    Whether to perform a delayed or immediate load

loadLastSong
(
  • delayed=false
)

Defined in SetList.js:122

Load the last song in the set list

Parameters:

  • [delayed=false] Boolean optional

    Whether to perform a delayed or immediate load

loadNextSong
(
  • direction
  • delayed=false
  • wrap=false
)

Defined in SetList.js:134

Load the next or previous song in the set list

Parameters:

  • direction Number

    Direction to move (1 = next, -1 = previous)

  • [delayed=false] Boolean optional

    Whether to perform a delayed or immediate load

  • [wrap=false] Boolean optional

    Whether to wrap around at the start/end of the list

loadSetList
(
  • name
  • loadFirst
)

Defined in SetList.js:160

Loads the specified set list from the user's set list folder

Parameters:

  • name String

    Name of the set to load (relative to user's set list folder, without extension)

  • loadFirst Boolean

    True to load the first song in the set list (default = true)

loadSongByIndex
(
  • index
  • delayed=false
)

Defined in SetList.js:82

Load the song at a given index position

Parameters:

  • index Number

    The zero based index of the song to load

  • [delayed=false] Boolean optional

    Whether to perform a delayed or immediate load

loadSongByProgram
(
  • index
  • delayed=false
)

Defined in SetList.js:96

Load the song with a given program number

Parameters:

  • index Number

    The zero based program number of the song to load

  • [delayed=false] Boolean optional

    Whether to perform a delayed or immediate load

open ()

Inherited from EndPoint: EndPoint.js:35

Opens this end point and starts listening for events.

This method no longer needs to be explicitly called as end points are now automatically opened when the first event listener is attached.

Use this method to keep the end point open even when no event listeners are attached.

untilOpen () Promise

Inherited from EndPoint: EndPoint.js:142

Returns a promise that will be resolved when this end point is opened

Returns:

Promise

Example:

let C = new CantabileApi();
   C.application.open();
await C.application.untilOpen();

Properties

currentSong

SetListItem

Defined in SetList.js:74

The currently loaded SetListItem (or null if the current song isn't in the set list). See also currentSongIndex.

currentSongIndex

Number

Defined in SetList.js:59

The index of the currently loaded song (or -1 if the current song isn't in the set list). See also currentSong.

items

SetListItem[]

Defined in SetList.js:38

An array of SetListItem items in the set list

name

String

Defined in SetList.js:45

The display name of the current set list (ie: its file name with path and extension removed)

preLoaded

Boolean

Defined in SetList.js:52

Indicates if the set list is currently pre-loaded

Events

changed

Defined in SetList.js:210

Fired when anything about the contents of the set list changes

currentSongChanged

Defined in SetList.js:299

Fired when the currently loaded song changes

currentSongPartChanged

Defined in SetList.js:310

Fired when the part of the currently loaded song changes

Event Payload:

  • part Number

    The zero-based current song part index (can be -1)

  • partCount Number

    The number of parts in the current song

itemAdded

Defined in SetList.js:203

Fired after a new item has been added to the set list

Event Payload:

  • index Number

    The zero based index of the newly added item

itemChanged

Defined in SetList.js:258

Fired when something about an item has changed

Event Payload:

  • index Number

    The zero based index of the item that changed

itemMoved

Defined in SetList.js:239

Fired when an item in the set list has been moved

Event Payload:

  • from Number

    The zero based index of the item before being moved

  • to Number

    The zero based index of the item's new position

itemRemoved

Defined in SetList.js:223

Fired after an item has been removed from the set list

Event Payload:

  • index Number

    The zero based index of the removed item

nameChanged

Defined in SetList.js:326

Fired when the name of the currently loaded set list changes

preLoadedChanged

Defined in SetList.js:286

Fired when the pre-loaded state of the list has changed

reload

Defined in SetList.js:274

Fired when the entire set list has changed (eg: after a sort operation, or loading a new set list)