From f61954805e9c545c5f51b8176b9dce063775f8c9 Mon Sep 17 00:00:00 2001 From: RikSolo Date: Tue, 27 Jan 2026 02:38:10 +0100 Subject: [PATCH] exit if device not found --- src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 4c9fefe..e338274 100644 --- a/src/index.ts +++ b/src/index.ts @@ -218,7 +218,10 @@ class OSCDevice { } const deviceName = midi.getInputs().find(i => i.includes('Platform X')); -if (!deviceName) return 0; +if (!deviceName) { + console.log('midi device not found') + process.exit(1); +} const mdev = new MidiDevice(deviceName); const odev = new OSCDevice('0.0.0.0', '192.168.0.47', 10024);