WebSockets: add transport methods to client JS

This commit is contained in:
Luciano Iam 2020-04-18 15:19:14 +02:00 committed by Robin Gareus
parent dc97bf3ff0
commit 1d84cc0046
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 22 additions and 0 deletions

View file

@ -25,6 +25,14 @@ export class ControlMixin {
async getTempo () {
return await this._sendRecvSingle(ANode.TEMPO);
}
async getTransportRoll () {
return await this._sendRecvSingle(ANode.TRANSPORT_ROLL);
}
async getRecordState () {
return await this._sendRecvSingle(ANode.RECORD_STATE);
}
async getStripGain (stripId) {
return await this._sendRecvSingle(ANode.STRIP_GAIN, [stripId]);
@ -50,6 +58,14 @@ export class ControlMixin {
this._send(ANode.TEMPO, [], [bpm]);
}
setTransportRoll (value) {
this._send(ANode.TRANSPORT_ROLL, [], [value]);
}
setRecordState (value) {
this._send(ANode.RECORD_STATE, [], [value]);
}
setStripGain (stripId, db) {
this._send(ANode.STRIP_GAIN, [stripId], [db]);
}