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

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

Pauses the master transport

play ()

Defined in Transport.js:161

Starts transport playback

stop ()

Defined in Transport.js:229

Stops the master transport

togglePlay ()

Defined in Transport.js:195

Toggles play and stopped states

togglePlayPause ()

Defined in Transport.js:171

Toggles between play and pause states

togglePlayPause ()

Defined in Transport.js:183

Toggles pause and play states (unless stopped)

togglePlayStop ()

Defined in Transport.js:207

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

loopCount

Number

Defined in Transport.js:97

Gets the current loopCount

loopIteration

Number

Defined in Transport.js:104

Gets the current loopIteration

loopMode

String

Defined in Transport.js:82

Gets or sets the current loopMode ("auto", "break", "loopOnce" or "loop")

state

String

Defined in Transport.js:36

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

tempo

Number

Defined in Transport.js:75

Gets the current tempo

timeSignature

String

Defined in Transport.js:68

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

timeSignatureDen

Number

Defined in Transport.js:61

Gets the current time signture denominator

timeSignatureNum

Number

Defined in Transport.js:54

Gets the current time signture numerator

Events

loopStateChanged

Defined in Transport.js:150

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

stateChanged

Defined in Transport.js:113

Fired when the current transport state has changed

tempoChanged

Defined in Transport.js:138

Fired when the current tempo has changed

timeSignatureChanged

Defined in Transport.js:125

Fired when the current time signature has changed