From c2e9232a905c0732031cceece55d0f4889d72668 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 6 Apr 2018 23:09:08 +0200 Subject: [PATCH] custom module: expose messages converted from midi input to custom module (#266) --- CHANGELOG.md | 2 ++ app/main/osc.js | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61e6fa65..bc9d4833 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ - zeroconf: unpublish when shutting down - widgets - modal: added `popupLeft` and `popupTop` properties +- custom module + - messages converted from midi inputs can be filtered ## 0.28.3 diff --git a/app/main/osc.js b/app/main/osc.js index 630db73d..90945b8f 100644 --- a/app/main/osc.js +++ b/app/main/osc.js @@ -197,7 +197,11 @@ if (customModule.init) { customModule.init() } -if (midi) midi.init(receiveOsc) +if (midi) midi.init((data)=>{ + var data = oscInFilter({address: data.address, args: data.args, host: data.host, port: data.port}) + if (!data) return + receiveOsc(data) +}) module.exports = {