prepare for osc input
This commit is contained in:
15
src/API.ts
15
src/API.ts
@ -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
|
||||
// =============================================================
|
||||
|
||||
Reference in New Issue
Block a user