So I’ve been using Bonne Midi Translator to get an Icon Platform Nano to transmit button behaviour the way I want it to perform. All is working well so far.
I’ve assigned two buttons to step through tracks and I’m getting the motorised faders to snap to correct levels. I’ve also set up the four floating rotary knobs to control the EQ (Vpot 1 = gain, push is on/off,. Vpot 2 = Freq, push = Q) and works a charm. Great!
What I’d like to do now is read the track’s pan and level, then send that back to the Nano. To avoid getting caught in the Mackie 8 channel grouping, I’d like to send the current track pan and level on Midi channel 1 and always keep the Mackie controller looking at channel 1 (by not using the buttons on the Nano ).
Not knowing Javascript, what would be the code I could insert into the saved Cubase Midi Remote script to pass that through?
I’ve been looking at the script the GUI in Cubase produces in an editor and am wondering if I can add some lines of code to get the extra transmit data.
Sorry, I’m not sure I understand. The Fader is already set to Jump to get the motorised part to work. I’d like to get the VU lights on the Nano to work with the level Aftertouch data Mackie uses to pass through volume levels. But only on Midi channel 1 for the current Cubase track, thus avoiding the Bank of 8 problem.
You can combine the JavaScript and the MIDI Remote Assistant in case you start from the script side.
Right here is where I would like to ask you to please provide a detailed set of instructions that explain to me how to go from…
A. Not having a MIDI Remote at all
to…
B. Having a MIDI Remote .js file (and any necessary, accompanying .JSON file (auto-generated or otherwise)) which can output console.log() to the Cubase script Logging window
I know JavaScript but I cannot workout the magic file creation or copy combo that will make this work, nor have I been able to uncover any instructions on the interwebs.
Of no importance for you getting started. It’s probably a file required by this particular script.
Here’s a snippet to get you going:
//Create a folder named intro inside the [Path of your Documents folder]/Steinberg/Cubase/MIDI Remote/Driver Scripts/Local
//Then create a folder named script inside the intro folder
//Create a file named intro_script.js and paste this code inside. Place this file inside the intro/script subfolder
// Requiring the API
var midiremote_api = require('midiremote_api_v1')
// Getting the instance of the device driver
var deviceDriver = midiremote_api.makeDeviceDriver('Intro', 'Script', 'Someone')
// Adding MIDI In & Out ports
var midiInput = deviceDriver.mPorts.makeMidiInput("midiInput")
var midiOutput = deviceDriver.mPorts.makeMidiOutput("midiOutput")
// Detecting ports
var detectWin = deviceDriver.makeDetectionUnit()
detectWin
.detectPortPair(midiInput, midiOutput)
.expectInputNameContains('your midi input name or part of it')
.expectOutputNameContains('your midi output name or part of it')
// Getting the instance of our controller's surface (i.e. buttons/knobs/faders e.t.c.)
var surface=deviceDriver.mSurface
// Defining/designing our surface's controls
var aButton=surface.makeButton(0,0,1,1)
var aKnob=surface.makeKnob(1,0,1,1)
// Binding our surface controls to their MIDI Ports and Messages
aButton.mSurfaceValue.mMidiBinding
.setInputPort(midiInput)
.bindToControlChange(0,24)
aKnob.mSurfaceValue.mMidiBinding
.setInputPort(midiInput)
.bindToControlChange(0,25)
// Creating a mapping page
var aPage=deviceDriver.mMapping.makePage("aPage")
// Adding bindings to our page (i.e. assigning commands and host values to our controls)
aPage.makeCommandBinding(aButton.mSurfaceValue,"Edit","Undo")
aPage.makeValueBinding(aKnob.mSurfaceValue,aPage.mHostAccess.mTrackSelection.mMixerChannel.mValue.mPan)
//Listening to an event
aKnob.mSurfaceValue.mOnProcessValueChange=function(activeDevice,value,diff){
console.log("our knob changed its value to "+value+" diff from its previous value="+diff)
// Values are always normalized to the range [0,1]
// If we want them to the [0,127] range we can write:
// var value127=Math.round(127*value)
// console.log("value127="+value127)
}
//Listening to display value changes
aKnob.mSurfaceValue.mOnDisplayValueChange=function(activeDevice,displayValue){
console.log("The display value of our knob changed to "+displayValue)
}
//Listening to title changes
aKnob.mSurfaceValue.mOnTitleChange=function(activeDevice,title1,title2){
console.log("We've just got title1 changed to "+title1+" and title2="+title2)
// title2 is not always available
}
// Listening to color changes
aKnob.mSurfaceValue.mOnColorChange=function(activeDevice,r,g,b,a,active){
console.log("our color changed to (r,g,b,a)="+r+","+g+","+b+","+a)
console.log("active changed to "+active) //Boolean
}
Thanks again for the script and the help. I got it working. =)
I think one oddity is that the logging panel won’t show any console.log output if the Mapping Assistant is open. There are also some actions that can be mapped and will work with the Assistant open but others need it closed.