add global try-catch
This commit is contained in:
parent
27e755cbc2
commit
824fd815af
1 changed files with 354 additions and 349 deletions
255
src/index.ts
255
src/index.ts
|
|
@ -2,11 +2,12 @@ import * as midi from 'easymidi';
|
||||||
import osc from 'osc';
|
import osc from 'osc';
|
||||||
|
|
||||||
|
|
||||||
console.log('inputs', midi.getInputs())
|
try {
|
||||||
console.log('outputs', midi.getOutputs())
|
console.log('inputs', midi.getInputs())
|
||||||
|
console.log('outputs', midi.getOutputs())
|
||||||
|
|
||||||
|
|
||||||
function mapNumber(value: number, fromMin: number, fromMax: number, toMin: number, toMax: number): number {
|
function mapNumber(value: number, fromMin: number, fromMax: number, toMin: number, toMax: number): number {
|
||||||
if (value <= fromMin) return toMin;
|
if (value <= fromMin) return toMin;
|
||||||
if (value >= fromMax) return toMax;
|
if (value >= fromMax) return toMax;
|
||||||
|
|
||||||
|
|
@ -15,34 +16,34 @@ function mapNumber(value: number, fromMin: number, fromMax: number, toMin: numbe
|
||||||
|
|
||||||
const mapped = (value / absFromMax) * absToMax;
|
const mapped = (value / absFromMax) * absToMax;
|
||||||
return mapped + toMin;
|
return mapped + toMin;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum MessageType {
|
enum MessageType {
|
||||||
NoteOn = 'noteon',
|
NoteOn = 'noteon',
|
||||||
NoteOff = 'noteoff',
|
NoteOff = 'noteoff',
|
||||||
Pitch = 'pitch'
|
Pitch = 'pitch'
|
||||||
}
|
}
|
||||||
|
|
||||||
type DataLookup = {
|
type DataLookup = {
|
||||||
[MessageType.NoteOn]: midi.Note,
|
[MessageType.NoteOn]: midi.Note,
|
||||||
[MessageType.NoteOff]: midi.Note,
|
[MessageType.NoteOff]: midi.Note,
|
||||||
[MessageType.Pitch]: midi.Pitch
|
[MessageType.Pitch]: midi.Pitch
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultData = {
|
const defaultData = {
|
||||||
[MessageType.NoteOn]: { channel: 0, note: 0, velocity: 0 },
|
[MessageType.NoteOn]: { channel: 0, note: 0, velocity: 0 },
|
||||||
[MessageType.NoteOff]: { channel: 0, note: 0, velocity: 0 },
|
[MessageType.NoteOff]: { channel: 0, note: 0, velocity: 0 },
|
||||||
[MessageType.Pitch]: { channel: 0, value: 0 }
|
[MessageType.Pitch]: { channel: 0, value: 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IMidiControlOptions {
|
interface IMidiControlOptions {
|
||||||
feedbackInput: boolean,
|
feedbackInput: boolean,
|
||||||
noPageFeedback: boolean,
|
noPageFeedback: boolean,
|
||||||
noStoreInput: boolean
|
noStoreInput: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class MidiControl<T extends MessageType> {
|
class MidiControl<T extends MessageType> {
|
||||||
public values: { [page: number]: DataLookup[T] } = [];
|
public values: { [page: number]: DataLookup[T] } = [];
|
||||||
private outputs: { [page: number]: (data: any) => void } = [];
|
private outputs: { [page: number]: (data: any) => void } = [];
|
||||||
private page: number = 0;
|
private page: number = 0;
|
||||||
|
|
@ -120,9 +121,9 @@ class MidiControl<T extends MessageType> {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MidiDevice {
|
class MidiDevice {
|
||||||
public input: midi.Input;
|
public input: midi.Input;
|
||||||
public output: midi.Output;
|
public output: midi.Output;
|
||||||
private _page: number = 0;
|
private _page: number = 0;
|
||||||
|
|
@ -150,14 +151,14 @@ class MidiDevice {
|
||||||
public get page(): number {
|
public get page(): number {
|
||||||
return this._page;
|
return this._page;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IOSCEvent {
|
interface IOSCEvent {
|
||||||
address: string;
|
address: string;
|
||||||
handler: (message: osc.ResponseMessage<osc.MessageArg>) => void;
|
handler: (message: osc.ResponseMessage<osc.MessageArg>) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
class OSCDevice {
|
class OSCDevice {
|
||||||
private port: osc.UDPPort;
|
private port: osc.UDPPort;
|
||||||
private listeners: Array<IOSCEvent> = [];
|
private listeners: Array<IOSCEvent> = [];
|
||||||
|
|
||||||
|
|
@ -221,132 +222,132 @@ class OSCDevice {
|
||||||
});
|
});
|
||||||
return newLength - 1;
|
return newLength - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const deviceName = midi.getInputs().find(i => i.includes('Platform X'));
|
const deviceName = midi.getInputs().find(i => i.includes('Platform X'));
|
||||||
if (!deviceName) {
|
if (!deviceName) {
|
||||||
console.log('midi device not found')
|
console.log('midi device not found')
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const mdev = new MidiDevice(deviceName);
|
const mdev = new MidiDevice(deviceName);
|
||||||
const odev = new OSCDevice('0.0.0.0', '192.168.0.47', 10024);
|
const odev = new OSCDevice('0.0.0.0', '192.168.0.47', 10024);
|
||||||
|
|
||||||
// const client = new osc.OSCClient('192.168.0.26', 9889);
|
// const client = new osc.OSCClient('192.168.0.26', 9889);
|
||||||
|
|
||||||
// DEBUG OUT
|
// DEBUG OUT
|
||||||
//['noteon', 'pitch'].map((v) => mdev.input.addListener(v, (data) => { console.log('data', data) }))
|
//['noteon', 'pitch'].map((v) => mdev.input.addListener(v, (data) => { console.log('data', data) }))
|
||||||
|
|
||||||
|
|
||||||
// MM MM MMMM MMMMMM MMMMMM MMMMMM MM MM MMMM MMMM
|
// MM MM MMMM MMMMMM MMMMMM MMMMMM MM MM MMMM MMMM
|
||||||
// MMMM MMMM MM MM MM MM MM MM MM MMMM MM MM MM MM MM
|
// MMMM MMMM MM MM MM MM MM MM MM MMMM MM MM MM MM MM
|
||||||
// MM MM MM MMMMMMMM MM MM MM MM MM MM MMMM MM MM
|
// MM MM MM MMMMMMMM MM MM MM MM MM MM MMMM MM MM
|
||||||
// MM MM MM MM MMMMMM MMMMMM MM MM MM MM MMMM MM
|
// MM MM MM MM MMMMMM MMMMMM MM MM MM MM MMMM MM
|
||||||
// MM MM MM MM MM MM MM MM MM MM MM MM MM
|
// MM MM MM MM MM MM MM MM MM MM MM MM MM
|
||||||
// MM MM MM MM MM MM MMMMMM MM MM MMMM MMMM
|
// MM MM MM MM MM MM MMMMMM MM MM MMMM MMMM
|
||||||
|
|
||||||
const PAGE_MAIN = 0;
|
const PAGE_MAIN = 0;
|
||||||
const PAGE_HP = 1;
|
const PAGE_HP = 1;
|
||||||
const PAGE_PC = 2;
|
const PAGE_PC = 2;
|
||||||
|
|
||||||
const ALL_PAGES = [PAGE_MAIN, PAGE_HP, PAGE_PC];
|
const ALL_PAGES = [PAGE_MAIN, PAGE_HP, PAGE_PC];
|
||||||
|
|
||||||
const OSC_LEVEL_0 = 0.75;
|
const OSC_LEVEL_0 = 0.75;
|
||||||
|
|
||||||
|
|
||||||
// TURN OFF ALL LEDS
|
// TURN OFF ALL LEDS
|
||||||
const feedbackOff = () => {
|
const feedbackOff = () => {
|
||||||
for (const control of mdev.controls) {
|
for (const control of mdev.controls) {
|
||||||
if (control.type === MessageType.NoteOn) {
|
if (control.type === MessageType.NoteOn) {
|
||||||
control.handleFeedback(ALL_PAGES, { velocity: 0 }, true);
|
control.handleFeedback(ALL_PAGES, { velocity: 0 }, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const offButton = mdev.addControl(MessageType.NoteOn, { channel: 0, note: 39 }, { noPageFeedback: true })
|
const offButton = mdev.addControl(MessageType.NoteOn, { channel: 0, note: 39 }, { noPageFeedback: true })
|
||||||
offButton.addOutput(ALL_PAGES, (d) => feedbackOff());
|
offButton.addOutput(ALL_PAGES, (d) => feedbackOff());
|
||||||
odev.addListener('/offleds', () => feedbackOff());
|
odev.addListener('/offleds', () => feedbackOff());
|
||||||
|
|
||||||
// PAGE SWITCHING
|
// PAGE SWITCHING
|
||||||
const pageFeedback = () => {
|
const pageFeedback = () => {
|
||||||
const page = mdev.page;
|
const page = mdev.page;
|
||||||
buttonSel1.handleFeedback(ALL_PAGES, { velocity: page === PAGE_MAIN ? 127 : 0 })
|
buttonSel1.handleFeedback(ALL_PAGES, { velocity: page === PAGE_MAIN ? 127 : 0 })
|
||||||
buttonSel2.handleFeedback(ALL_PAGES, { velocity: page === PAGE_HP ? 127 : 0 })
|
buttonSel2.handleFeedback(ALL_PAGES, { velocity: page === PAGE_HP ? 127 : 0 })
|
||||||
buttonSel3.handleFeedback(ALL_PAGES, { velocity: page === PAGE_PC ? 127 : 0 })
|
buttonSel3.handleFeedback(ALL_PAGES, { velocity: page === PAGE_PC ? 127 : 0 })
|
||||||
}
|
}
|
||||||
|
|
||||||
const buttonSel1 = mdev.addControl(MessageType.NoteOn, { channel: 0, note: 8 }, { noPageFeedback: true })
|
const buttonSel1 = mdev.addControl(MessageType.NoteOn, { channel: 0, note: 8 }, { noPageFeedback: true })
|
||||||
buttonSel1.addOutput(ALL_PAGES, (d) => {
|
buttonSel1.addOutput(ALL_PAGES, (d) => {
|
||||||
if (d.velocity === 127) mdev.setPage(PAGE_MAIN)
|
if (d.velocity === 127) mdev.setPage(PAGE_MAIN)
|
||||||
pageFeedback();
|
pageFeedback();
|
||||||
});
|
});
|
||||||
|
|
||||||
const buttonSel2 = mdev.addControl(MessageType.NoteOn, { channel: 0, note: 9 }, { noPageFeedback: true })
|
const buttonSel2 = mdev.addControl(MessageType.NoteOn, { channel: 0, note: 9 }, { noPageFeedback: true })
|
||||||
buttonSel2.addOutput(ALL_PAGES, (d) => {
|
buttonSel2.addOutput(ALL_PAGES, (d) => {
|
||||||
if (d.velocity === 127) mdev.setPage(PAGE_HP)
|
if (d.velocity === 127) mdev.setPage(PAGE_HP)
|
||||||
pageFeedback();
|
pageFeedback();
|
||||||
});
|
});
|
||||||
|
|
||||||
const buttonSel3 = mdev.addControl(MessageType.NoteOn, { channel: 0, note: 10 }, { noPageFeedback: true })
|
const buttonSel3 = mdev.addControl(MessageType.NoteOn, { channel: 0, note: 10 }, { noPageFeedback: true })
|
||||||
buttonSel3.addOutput(ALL_PAGES, (d) => {
|
buttonSel3.addOutput(ALL_PAGES, (d) => {
|
||||||
if (d.velocity === 127) mdev.setPage(PAGE_PC)
|
if (d.velocity === 127) mdev.setPage(PAGE_PC)
|
||||||
pageFeedback();
|
pageFeedback();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// FADERS
|
// FADERS
|
||||||
const faders = [0, 1, 2, 3, 4, 5, 6, 7].map((f) => mdev.addControl(MessageType.Pitch, { channel: f as midi.Channel }, { feedbackInput: true }));
|
const faders = [0, 1, 2, 3, 4, 5, 6, 7].map((f) => mdev.addControl(MessageType.Pitch, { channel: f as midi.Channel }, { feedbackInput: true }));
|
||||||
|
|
||||||
const setLevel = (addr: string, value: number, max: number = 1) => odev.sendFloat(addr, mapNumber(value, 0, 16383, 0, max));
|
const setLevel = (addr: string, value: number, max: number = 1) => odev.sendFloat(addr, mapNumber(value, 0, 16383, 0, max));
|
||||||
const levelFeedback = (fader: number, page: number, value: number, max: number = 1) => {
|
const levelFeedback = (fader: number, page: number, value: number, max: number = 1) => {
|
||||||
faders[fader]?.handleFeedback(page, { value: mapNumber(value, 0, max, 0, 16383) });
|
faders[fader]?.handleFeedback(page, { value: mapNumber(value, 0, max, 0, 16383) });
|
||||||
}
|
}
|
||||||
|
|
||||||
const fader2way = (fader: number, page: number, addr: string, max: number = 1) => {
|
const fader2way = (fader: number, page: number, addr: string, max: number = 1) => {
|
||||||
faders[fader]?.addOutput(page, d => setLevel(addr, d.value, max));
|
faders[fader]?.addOutput(page, d => setLevel(addr, d.value, max));
|
||||||
odev.addListener(addr, d => { levelFeedback(fader, page, (d.args as any)[0], max) });
|
odev.addListener(addr, d => { levelFeedback(fader, page, (d.args as any)[0], max) });
|
||||||
|
|
||||||
odev.sendNull(addr);
|
odev.sendNull(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PAGE 1: Main
|
// PAGE 1: Main
|
||||||
fader2way(0, PAGE_MAIN, '/dca/1/fader', OSC_LEVEL_0)
|
fader2way(0, PAGE_MAIN, '/dca/1/fader', OSC_LEVEL_0)
|
||||||
fader2way(1, PAGE_MAIN, '/rtn/1/mix/fader', OSC_LEVEL_0)
|
fader2way(1, PAGE_MAIN, '/rtn/1/mix/fader', OSC_LEVEL_0)
|
||||||
fader2way(2, PAGE_MAIN, '/bus/1/mix/fader', OSC_LEVEL_0)
|
fader2way(2, PAGE_MAIN, '/bus/1/mix/fader', OSC_LEVEL_0)
|
||||||
fader2way(3, PAGE_MAIN, '/ch/01/mix/fader')
|
fader2way(3, PAGE_MAIN, '/ch/01/mix/fader')
|
||||||
fader2way(4, PAGE_MAIN, '/ch/03/mix/fader')
|
fader2way(4, PAGE_MAIN, '/ch/03/mix/fader')
|
||||||
fader2way(5, PAGE_MAIN, '/ch/05/mix/fader')
|
fader2way(5, PAGE_MAIN, '/ch/05/mix/fader')
|
||||||
fader2way(6, PAGE_MAIN, '/ch/07/mix/fader')
|
fader2way(6, PAGE_MAIN, '/ch/07/mix/fader')
|
||||||
fader2way(7, PAGE_MAIN, '/ch/09/mix/fader')
|
fader2way(7, PAGE_MAIN, '/ch/09/mix/fader')
|
||||||
|
|
||||||
|
|
||||||
// PAGE 2: Headphones
|
// PAGE 2: Headphones
|
||||||
fader2way(0, PAGE_HP, '/bus/1/mix/fader', OSC_LEVEL_0)
|
fader2way(0, PAGE_HP, '/bus/1/mix/fader', OSC_LEVEL_0)
|
||||||
fader2way(1, PAGE_HP, '/ch/15/mix/01/level')
|
fader2way(1, PAGE_HP, '/ch/15/mix/01/level')
|
||||||
fader2way(2, PAGE_HP, '/ch/16/mix/01/level')
|
fader2way(2, PAGE_HP, '/ch/16/mix/01/level')
|
||||||
fader2way(3, PAGE_HP, '/ch/01/mix/01/level')
|
fader2way(3, PAGE_HP, '/ch/01/mix/01/level')
|
||||||
fader2way(4, PAGE_HP, '/ch/03/mix/01/level')
|
fader2way(4, PAGE_HP, '/ch/03/mix/01/level')
|
||||||
fader2way(5, PAGE_HP, '/ch/05/mix/01/level')
|
fader2way(5, PAGE_HP, '/ch/05/mix/01/level')
|
||||||
fader2way(6, PAGE_HP, '/ch/07/mix/01/level')
|
fader2way(6, PAGE_HP, '/ch/07/mix/01/level')
|
||||||
fader2way(7, PAGE_HP, '/ch/09/mix/01/level')
|
fader2way(7, PAGE_HP, '/ch/09/mix/01/level')
|
||||||
|
|
||||||
|
|
||||||
// PAGE 3: PC
|
// PAGE 3: PC
|
||||||
fader2way(0, PAGE_PC, '/bus/1/mix/fader', OSC_LEVEL_0)
|
fader2way(0, PAGE_PC, '/bus/1/mix/fader', OSC_LEVEL_0)
|
||||||
fader2way(1, PAGE_PC, '/ch/15/mix/03/level')
|
fader2way(1, PAGE_PC, '/ch/15/mix/03/level')
|
||||||
fader2way(2, PAGE_PC, '/ch/16/mix/03/level')
|
fader2way(2, PAGE_PC, '/ch/16/mix/03/level')
|
||||||
fader2way(3, PAGE_PC, '/ch/01/mix/03/level')
|
fader2way(3, PAGE_PC, '/ch/01/mix/03/level')
|
||||||
fader2way(4, PAGE_PC, '/ch/03/mix/03/level')
|
fader2way(4, PAGE_PC, '/ch/03/mix/03/level')
|
||||||
fader2way(5, PAGE_PC, '/ch/05/mix/03/level')
|
fader2way(5, PAGE_PC, '/ch/05/mix/03/level')
|
||||||
fader2way(6, PAGE_PC, '/ch/07/mix/03/level')
|
fader2way(6, PAGE_PC, '/ch/07/mix/03/level')
|
||||||
fader2way(7, PAGE_PC, '/ch/09/mix/03/level')
|
fader2way(7, PAGE_PC, '/ch/09/mix/03/level')
|
||||||
|
|
||||||
|
|
||||||
const button = (note: number) => mdev.addControl(MessageType.NoteOn, { channel: 0, note }, { feedbackInput: false, noStoreInput: true });
|
const button = (note: number) => mdev.addControl(MessageType.NoteOn, { channel: 0, note }, { feedbackInput: false, noStoreInput: true });
|
||||||
const mutes = [16, 17, 18, 19, 20, 21, 22, 23].map(n => button(n));
|
const mutes = [16, 17, 18, 19, 20, 21, 22, 23].map(n => button(n));
|
||||||
|
|
||||||
// MUTE BUTTONS
|
// MUTE BUTTONS
|
||||||
const buttonToggle = (control: MidiControl<MessageType.NoteOn> | undefined, page: number, addr: string) => {
|
const buttonToggle = (control: MidiControl<MessageType.NoteOn> | undefined, page: number, addr: string) => {
|
||||||
if (!control) return;
|
if (!control) return;
|
||||||
|
|
||||||
control.addOutput(page, (d) => {
|
control.addOutput(page, (d) => {
|
||||||
|
|
@ -366,34 +367,38 @@ const buttonToggle = (control: MidiControl<MessageType.NoteOn> | undefined, page
|
||||||
})
|
})
|
||||||
|
|
||||||
odev.sendNull(addr);
|
odev.sendNull(addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
// PAGE 1: Main
|
||||||
|
buttonToggle(mutes[0], PAGE_MAIN, '/dca/1/on')
|
||||||
|
buttonToggle(mutes[1], PAGE_MAIN, '/rtn/1/mix/on')
|
||||||
|
buttonToggle(mutes[2], PAGE_MAIN, '/bus/1/mix/on')
|
||||||
|
buttonToggle(mutes[3], PAGE_MAIN, '/ch/01/mix/on')
|
||||||
|
buttonToggle(mutes[4], PAGE_MAIN, '/ch/03/mix/on')
|
||||||
|
buttonToggle(mutes[5], PAGE_MAIN, '/ch/05/mix/on')
|
||||||
|
buttonToggle(mutes[6], PAGE_MAIN, '/ch/07/mix/on')
|
||||||
|
buttonToggle(mutes[7], PAGE_MAIN, '/ch/09/mix/on')
|
||||||
|
|
||||||
|
// PAGE 2: Headphones
|
||||||
|
buttonToggle(mutes[0], PAGE_HP, '/bus/1/mix/on')
|
||||||
|
buttonToggle(mutes[1], PAGE_HP, '/ch/15/mix/on')
|
||||||
|
buttonToggle(mutes[2], PAGE_HP, '/ch/16/mix/on')
|
||||||
|
buttonToggle(mutes[3], PAGE_HP, '/ch/01/mix/on')
|
||||||
|
buttonToggle(mutes[4], PAGE_HP, '/ch/03/mix/on')
|
||||||
|
buttonToggle(mutes[5], PAGE_HP, '/ch/05/mix/on')
|
||||||
|
buttonToggle(mutes[6], PAGE_HP, '/ch/07/mix/on')
|
||||||
|
buttonToggle(mutes[7], PAGE_HP, '/ch/09/mix/on')
|
||||||
|
|
||||||
|
// PAGE 3: PC
|
||||||
|
buttonToggle(mutes[0], PAGE_PC, '/bus/1/mix/on')
|
||||||
|
buttonToggle(mutes[1], PAGE_PC, '/ch/15/mix/on')
|
||||||
|
buttonToggle(mutes[2], PAGE_PC, '/ch/16/mix/on')
|
||||||
|
buttonToggle(mutes[3], PAGE_PC, '/ch/01/mix/on')
|
||||||
|
buttonToggle(mutes[4], PAGE_PC, '/ch/03/mix/on')
|
||||||
|
buttonToggle(mutes[5], PAGE_PC, '/ch/05/mix/on')
|
||||||
|
buttonToggle(mutes[6], PAGE_PC, '/ch/07/mix/on')
|
||||||
|
buttonToggle(mutes[7], PAGE_PC, '/ch/09/mix/on')
|
||||||
|
|
||||||
|
} catch (e) {
|
||||||
|
console.error('Uncaught error', e)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PAGE 1: Main
|
|
||||||
buttonToggle(mutes[0], PAGE_MAIN, '/dca/1/on')
|
|
||||||
buttonToggle(mutes[1], PAGE_MAIN, '/rtn/1/mix/on')
|
|
||||||
buttonToggle(mutes[2], PAGE_MAIN, '/bus/1/mix/on')
|
|
||||||
buttonToggle(mutes[3], PAGE_MAIN, '/ch/01/mix/on')
|
|
||||||
buttonToggle(mutes[4], PAGE_MAIN, '/ch/03/mix/on')
|
|
||||||
buttonToggle(mutes[5], PAGE_MAIN, '/ch/05/mix/on')
|
|
||||||
buttonToggle(mutes[6], PAGE_MAIN, '/ch/07/mix/on')
|
|
||||||
buttonToggle(mutes[7], PAGE_MAIN, '/ch/09/mix/on')
|
|
||||||
|
|
||||||
// PAGE 2: Headphones
|
|
||||||
buttonToggle(mutes[0], PAGE_HP, '/bus/1/mix/on')
|
|
||||||
buttonToggle(mutes[1], PAGE_HP, '/ch/15/mix/on')
|
|
||||||
buttonToggle(mutes[2], PAGE_HP, '/ch/16/mix/on')
|
|
||||||
buttonToggle(mutes[3], PAGE_HP, '/ch/01/mix/on')
|
|
||||||
buttonToggle(mutes[4], PAGE_HP, '/ch/03/mix/on')
|
|
||||||
buttonToggle(mutes[5], PAGE_HP, '/ch/05/mix/on')
|
|
||||||
buttonToggle(mutes[6], PAGE_HP, '/ch/07/mix/on')
|
|
||||||
buttonToggle(mutes[7], PAGE_HP, '/ch/09/mix/on')
|
|
||||||
|
|
||||||
// PAGE 3: PC
|
|
||||||
buttonToggle(mutes[0], PAGE_PC, '/bus/1/mix/on')
|
|
||||||
buttonToggle(mutes[1], PAGE_PC, '/ch/15/mix/on')
|
|
||||||
buttonToggle(mutes[2], PAGE_PC, '/ch/16/mix/on')
|
|
||||||
buttonToggle(mutes[3], PAGE_PC, '/ch/01/mix/on')
|
|
||||||
buttonToggle(mutes[4], PAGE_PC, '/ch/03/mix/on')
|
|
||||||
buttonToggle(mutes[5], PAGE_PC, '/ch/05/mix/on')
|
|
||||||
buttonToggle(mutes[6], PAGE_PC, '/ch/07/mix/on')
|
|
||||||
buttonToggle(mutes[7], PAGE_PC, '/ch/09/mix/on')
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue