diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c1593d0..a63f643c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,8 @@ - main - **new** `-c / --custom-module` switch allowing user to define custom osc filtering fonctions - - `address` is now used everywhere instead of `path` to describe osc address to avoid confusion. Session files using the old `path` option for widgets are still supported. + - `address` is now used everywhere instead of `path` to describe osc address to avoid confusion. Session files using the old `path` option for widgets are still supported. + - **osc bundles** are properly received (subsequent messages are processed separately with a delay if the timetag is set) ## 0.9.2 diff --git a/app/main/osc.js b/app/main/osc.js index 1ced4919..bfa734fb 100644 --- a/app/main/osc.js +++ b/app/main/osc.js @@ -101,9 +101,13 @@ var oscOutFilter = function(data){ } -oscServer.on('message', function (msg, bundle, info) { - var data = oscInFilter({address: msg.address, args: msg.args, host: info.address, port: info.port}) - receiveOsc(data) +oscServer.on('message', function (msg, timetag, info) { + var delay = timetag? Math.max(0,timetag.native - Date.now()) : 0, + timer = delay ? setTimeout : setImmediate + setTimeout(()=>{ + var data = oscInFilter({address: msg.address, args: msg.args, host: info.address, port: info.port}) + receiveOsc(data) + }, delay) }) oscServer.on('error', function (error) {