Show:
Extends EndPoint

Interface to the master transport

Access this object via the transport 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.

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.

pause ()

Defined in Transport.js:175

Pauses the master transport

play ()

Defined in Transport.js:117

Starts transport playback

stop ()

Defined in Transport.js:185

Stops the master transport

togglePlay ()

Defined in Transport.js:151

Toggles play and stopped states

togglePlayPause ()

Defined in Transport.js:127

Toggles between play and pause states

togglePlayPause ()

Defined in Transport.js:139

Toggles pause and play states (unless stopped)

togglePlayStop ()

Defined in Transport.js:163

Toggles between play and stop states

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

state

String

Defined in Transport.js:34

Gets or sets the current transport state. Supported values include "playing", "paused" or "stopped"

tempo

Number

Defined in Transport.js:73

Gets the current tempo

timeSignature

String

Defined in Transport.js:66

Gets the current time signture as a string (eg: "3/4")

timeSignatureDen

Number

Defined in Transport.js:59

Gets the current time signture denominator

timeSignatureNum

Number

Defined in Transport.js:52

Gets the current time signture numerator

Events

stateChanged

Defined in Transport.js:82

Fired when the current transport state has changed

tempoChanged

Defined in Transport.js:107

Fired when the current tempo has changed

timeSignatureChanged

Defined in Transport.js:94

Fired when the current time signature has changed