Show:
Extends EndPoint

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

Access this object via the setList property.

Methods

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:108

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:120

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:132

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

loadSongByIndex
(
  • index
  • delayed=false
)

Defined in SetList.js:80

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:94

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:137

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:73

The currently loaded item (or null if the current song isn't in the set list)

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)

items

SetListItem[]

Defined in SetList.js:38

An array of 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:184

Fired when anything about the contents of the set list changes

currentSongChanged

Defined in SetList.js:273

Fired when the currently loaded song changes

currentSongPartChanged

Defined in SetList.js:284

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:177

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:232

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:213

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:197

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:300

Fired when the name of the currently loaded set list changes

preLoadedChanged

Defined in SetList.js:260

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

reload

Defined in SetList.js:248

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