find device
This commit is contained in:
parent
fb9a371e7e
commit
b84b2e0a9b
1 changed files with 6 additions and 3 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import * as midi from 'easymidi';
|
||||
import type { EventEmitter } from 'node:stream';
|
||||
import osc from 'osc';
|
||||
|
||||
|
||||
console.log(midi.getInputs())
|
||||
console.log('inputs', midi.getInputs())
|
||||
console.log('outputs', midi.getOutputs())
|
||||
|
||||
|
||||
function mapNumber(value: number, fromMin: number, fromMax: number, toMin: number, toMax: number): number {
|
||||
|
|
@ -217,7 +217,10 @@ class OSCDevice {
|
|||
}
|
||||
}
|
||||
|
||||
const mdev = new MidiDevice('Platform X+1 V2.10');
|
||||
const deviceName = midi.getInputs().find(i => i.includes('Platform X'));
|
||||
if (!deviceName) return 0;
|
||||
|
||||
const mdev = new MidiDevice(deviceName);
|
||||
const odev = new OSCDevice('0.0.0.0', '192.168.0.47', 10024);
|
||||
|
||||
// const client = new osc.OSCClient('192.168.0.26', 9889);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue