diff --git a/nodes/global-launch-control/object.js b/nodes/global-launch-control/object.js index 3ef64c8f..f5093823 100644 --- a/nodes/global-launch-control/object.js +++ b/nodes/global-launch-control/object.js @@ -18,10 +18,9 @@ module.exports = LaunchControl function LaunchControl (context) { var midiPort = MidiPort(context) - midiPort.set('Launch Control') var obs = ObservStruct({ - //port: midiPort + port: midiPort }) var releases = [] diff --git a/nodes/project/object.js b/nodes/project/object.js index d12ce254..f151a071 100644 --- a/nodes/project/object.js +++ b/nodes/project/object.js @@ -91,10 +91,12 @@ function Project (parentContext) { var controllers = context.nodeInfo.groupLookup['global-controllers'] if (controllers) { controllers.forEach(function (info) { - if (!info.portMatch || matchAny(portNames, info.portMatch)) { + var port = findMatch(portNames, info.portMatch) + if (!info.portMatch || port) { result.push({ name: info.name, - node: info.node + node: info.node, + port: port }) } }) @@ -382,8 +384,8 @@ function copyExternalFilesTo (fs, path, target) { }) } -function matchAny (array, match) { - return Array.isArray(array) && match && array.some(function (value) { +function findMatch (array, match) { + return Array.isArray(array) && match && array.filter(function (value) { return match.exec(value) - }) + })[0] }