50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
|
const WebMidi: {
|
||
|
enable(callback: (err: Error|null)=>void): void
|
||
|
inputs: MidiIn[]
|
||
|
outputs: any[]
|
||
|
};
|
||
|
type MidiIn = {
|
||
|
name: string
|
||
|
addListener(type: 'noteon', channel: string, listener: (e: {
|
||
|
note: {number: number}
|
||
|
velocity: number
|
||
|
})=>void): void
|
||
|
addListener(type: 'noteoff', channel: string, listener: (e: {
|
||
|
note: {number: number}
|
||
|
velocity: number
|
||
|
})=>void): void
|
||
|
addListener(type: 'controlchange', channel: string, listener: (e: {
|
||
|
controller: {number: number}
|
||
|
value: number
|
||
|
})=>void): void
|
||
|
};
|
||
|
|
||
|
const Tonal: any;
|
||
|
|
||
|
function select(selector: string): any;
|
||
|
|
||
|
function color(color: string): Color;
|
||
|
type Color = {
|
||
|
levels: number[],
|
||
|
};
|
||
|
|
||
|
const createCanvas: Function;
|
||
|
const colorMode: Function;
|
||
|
const smooth: Function;
|
||
|
const frameRate: Function;
|
||
|
const {HSB, BOLD, LEFT, TOP}: any;
|
||
|
const background: Function;
|
||
|
const fill: Function;
|
||
|
const stroke: Function;
|
||
|
const strokeWeight: Function;
|
||
|
const rect: Function;
|
||
|
const textFont: Function;
|
||
|
const textStyle: Function;
|
||
|
const textSize: Function;
|
||
|
const textAlign: Function;
|
||
|
const text: Function;
|
||
|
const saveCanvas: Function;
|
||
|
const {mouseX, mouseY}: number;
|
||
|
|
||
|
function map(...argv: any[]): number;
|