From 177784df8742aa52aea124021d581ab35a675867 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Wed, 27 Sep 2023 23:28:50 +0200 Subject: [PATCH] update API functions too --- src/API.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/API.ts b/src/API.ts index 2ff7651..d3d3f2a 100644 --- a/src/API.ts +++ b/src/API.ts @@ -60,7 +60,7 @@ export class UserAPI { MidiConnection: MidiConnection = new MidiConnection(); load: samples; - constructor(public app: Editor) { } + constructor(public app: Editor) {} _loadUniverseFromInterface = (universe: string) => { this.app.loadUniverse(universe as string); @@ -168,16 +168,19 @@ export class UserAPI { public play = (): void => { this.app.setButtonHighlighting("play", true); + this.MidiConnection.sendStartMessage(); this.app.clock.start(); }; public pause = (): void => { this.app.setButtonHighlighting("pause", true); + this.MidiConnection.sendStopMessage(); this.app.clock.pause(); }; public stop = (): void => { this.app.setButtonHighlighting("stop", true); + this.MidiConnection.sendStopMessage(); this.app.clock.stop(); }; silence = this.stop;