prepare for osc input

This commit is contained in:
2023-12-04 16:28:07 +01:00
parent 04a4f28f68
commit cc963ac54f
9 changed files with 99 additions and 19 deletions

View File

@ -1,4 +1,5 @@
import { EditorView } from "@codemirror/view";
import { sendToServer, type OSCMessage } from "./IO/OSC";
import { getAllScaleNotes, nearScales, seededRandom } from "zifferjs";
import {
MidiCCEvent,
@ -2095,6 +2096,20 @@ export class UserAPI {
}, real_duration * 1000);
};
// =============================================================
// OSC Functions
// =============================================================
public osc = (address: string, port: number, ...args: any[]): void => {
sendToServer({
address: address,
port: port,
args: args,
timetag: Math.round(Date.now() + this.app.clock.deadline),
} as OSCMessage);
}
// =============================================================
// Transport functions
// =============================================================