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.

cycleLoopMode ()

Defined in Transport.js:241

Cycles between the various loop modes

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

Pauses the master transport

play ()

Defined in Transport.js:163

Starts transport playback

stop ()

Defined in Transport.js:231

Stops the master transport

togglePause ()

Defined in Transport.js:185

Toggles pause and play states (unless stopped)

togglePlay ()

Defined in Transport.js:197

Toggles play and stopped states

togglePlayPause ()

Defined in Transport.js:173

Toggles between play and pause states

togglePlayStop ()

Defined in Transport.js:209

Toggles between play and stop states

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

loopCount

Number

Defined in Transport.js:99

Gets the current loopCount

loopIteration

Number

Defined in Transport.js:106

Gets the current loopIteration

loopMode

String

Defined in Transport.js:83

Gets or sets the current loopMode ("auto", "break", "loopOnce" or "loop"). Changes fire the loopStateChanged event.

state

String

Defined in Transport.js:34

Gets or sets the current transport state. Supported values include "playing", "paused" or "stopped". Setting this property calls play, pause, or stop accordingly.

tempo

Number

Defined in Transport.js:76

Gets the current tempo

timeSignature

String

Defined in Transport.js:69

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

timeSignatureDen

Number

Defined in Transport.js:62

Gets the current time signature denominator

timeSignatureNum

Number

Defined in Transport.js:55

Gets the current time signature numerator

Events

loopStateChanged

Defined in Transport.js:152

Fired when the current loop mode, loop iteration or loop count has changed

stateChanged

Defined in Transport.js:115

Fired when the current transport state has changed

tempoChanged

Defined in Transport.js:140

Fired when the current tempo has changed

timeSignatureChanged

Defined in Transport.js:127

Fired when the current time signature has changed