diff --git a/behringer/bcf2000/behringer_bcf2000.js b/behringer/bcf2000/behringer_bcf2000.js new file mode 100644 index 0000000..b77dc20 --- /dev/null +++ b/behringer/bcf2000/behringer_bcf2000.js @@ -0,0 +1,176 @@ +// Behringer BCF2000 v 1.0 by Giampaolo Gesuale + +//----------------------------------------------------------------------------- +// 1. DRIVER SETUP - create driver object, midi ports and detection information +//----------------------------------------------------------------------------- + +var midiremote_api = require('midiremote_api_v1') +var deviceDriver = midiremote_api.makeDeviceDriver('behringer', 'bcf2000', 'Giampaolo Gesuale') + +var midiInput = deviceDriver.mPorts.makeMidiInput() +var midiOutput = deviceDriver.mPorts.makeMidiOutput() + +deviceDriver.makeDetectionUnit().detectPortPair(midiInput, midiOutput) + .expectInputNameEquals('BCF2000') + .expectOutputNameEquals('BCF2000') + +deviceDriver.makeDetectionUnit().detectPortPair(midiInput, midiOutput) + .expectInputNameContains('BCF2000') + .expectOutputNameContains('BCF2000') + +//----------------------------------------------------------------------------- +// 2. SURFACE LAYOUT - create control elements and midi bindings +//----------------------------------------------------------------------------- + +var surface= deviceDriver.mSurface +var selTrackName = surface.makeLabelField(18,2,4,1) +var pagename = surface.makeLabelField(18,12,4,0.9) + +var trackNames = [] +for (var i = 0; i < 8; ++i){ + var trackName = surface.makeLabelField(i*2,15,2,0.6) + trackNames.push(trackName) +} + +//layer zone +var encoderGroups = surface.makeControlLayerZone('Encoder Groups') +var encoderGroup1 = encoderGroups.makeControlLayer('Group 1') +var encoderGroup2 = encoderGroups.makeControlLayer('Group 2') +var encoderGroup3 = encoderGroups.makeControlLayer('Group 3') +var encoderGroup4 = encoderGroups.makeControlLayer('Group 4') + +var knobs =[] +var buttons = [] +var faders = [] + +var inarow = 8 +var nEncoders = 32 +var gruppo = encoderGroup1 + +//encoders +for(var r = 0; r < nEncoders/inarow; ++r) { + switch (r){ + case 0: gruppo = encoderGroup1 + break + case 1: gruppo = encoderGroup2 + break + case 2: gruppo = encoderGroup3 + break + case 3: gruppo = encoderGroup4 + } + for (var c=0; c