I really need a script or macro to copy part name (first part on track) to track name.
Is this possible?
Ideally after finishing dragging my parts into tracks for a mix session, would like to just hit one button to update all the audio track names…
Anyone succeeded in this?
I worked on this some time ago, after seeing a similar request, cause I found it interesting, not just the concept but the way to implement it. I used MIDI Remote combined with Bome MIDI Translator Pro.
Will update you with the script and the BMT Template used once I’m back home next Monday, if of course no other solutions (and perhaps more straight forward) are provided by other users here ![]()
For now I can share the logic behind this script:
- Find all tracks with events and select them (PLE)
- Grab their IDs (using the Direct Access concept)
- Begin selecting them one by one
- Set Cursor to Zero
- Select Next event (This will go to the very first event, which is the one we want for getting the name)
- Focus the Info Line
- Send a CC to BMT in order for it to send a CTRL+C (Copy)
- Execute the rename (first) selected track
- Send another CC for executing CTRL+V (Paste)
- Move to the next track in our array
Yes - I do not see how to grab the track name/ID…
Was looking at AutoIT to try a few things…
Hi, back home a bit earlier.
Here’a MIDI Remote performing the actions specified in my post:
Test_Track name by part.midiremote (3.7 KB)
The PLE needed:
20251101_select_non_empty_tracks.xml (4.7 KB)
And the BOME MIDI Translator Pro project (zipped):
copy_paste_ccs.zip (1014 Bytes)
The source code of the remote which shows a way to grab the IDs:
var midiremote_api = require('midiremote_api_v1')
var deviceDriver = midiremote_api.makeDeviceDriver("Test","Track name by part","m.c")
var midiInput = deviceDriver.mPorts.makeMidiInput("anInput")
var midiOutput = deviceDriver.mPorts.makeMidiOutput("anOutput")
var detectionUnit=deviceDriver.makeDetectionUnit()
detectionUnit.detectPortPair(midiInput,midiOutput)
.expectInputNameEquals("Bome MIDI Translator 1")
.expectOutputNameEquals("Bome MIDI Translator 1")
var surface=deviceDriver.mSurface
var mapping=deviceDriver.mMapping
var button=surface.makeLamp(0,0,1,1)
button.mSurfaceValue.mMidiBinding
.setInputPort(midiInput)
.bindToControlChange(0,0)
var page=mapping.makePage("Default")
var mixer=page.mHostAccess.mMixConsole
var daMixer=page.mHostAccess.makeDirectAccess(mixer)
var selectedTracksIDs=[]
var selectedTag=4000
var customVarsDescs=["GetAllIDs","Select","Start","Next","Info","Copy","Rename","Paste","None"]
var customVars={}
var customDelayDurations={}
customVarsDescs.forEach(function(desc){
customVars[desc]=surface.makeCustomValueVariable(desc)
customDelayDurations[desc]=5
})
var nextAction=""
var currentSelectedTrackIndex=-1
var customDelay=surface.makeCustomValueVariable("customDelay")
function setCustomDelay(activeDevice,action){
nextAction=action
customDelay.setProcessValue(activeDevice,customDelayDurations[nextAction])
}
page.makeCommandBinding(button.mSurfaceValue,"Process Project Logical Editor","20251101_select_non_empty_tracks").mOnValueChange=function(activeDevice,activeMapping,value,diff){
if(value==1){
setCustomDelay(activeDevice,"GetAllIDs")
}
}
customDelay.mOnProcessValueChange=function(activeDevice,value,diff){
value--
if(value==0){
customVars[nextAction].setProcessValue(activeDevice,1)
} else {
customDelay.setProcessValue(activeDevice,value)
}
}
var customHostGetAllIDs=page.mCustom.makeHostValueVariable("customHostGetAllIDs")
page.makeValueBinding(customVars["GetAllIDs"],customHostGetAllIDs).mOnValueChange=function(activeDevice,activeMapping,value,diff){
if(value==1){
customVars["GetAllIDs"].setProcessValue(activeDevice,0)
var mixerID=daMixer.getBaseObjectID(activeMapping)
selectedTracksIDs=[]
currentSelectedTrackIndex=-1
var numOfChannels=daMixer.getNumberOfChildObjects(activeMapping,mixerID)
if(numOfChannels>1){
for(var i=0;i<numOfChannels-1;i++){
var channelID=daMixer.getChildObjectID(activeMapping,mixerID,i)
var isChannelSelected=daMixer.getParameterProcessValue(activeMapping,channelID,selectedTag)
if(isChannelSelected==1){
selectedTracksIDs.push(channelID)
}
}
if(selectedTracksIDs.length>0){
customVars["Select"].setProcessValue(activeDevice,1)
}
}
}
}
var customHostSelectTrack=page.mCustom.makeHostValueVariable("customHostSelectTrack")
page.makeValueBinding(customVars["Select"],customHostSelectTrack).mOnValueChange=function(activeDevice,activeMapping,value,diff){
if(value==1){
customVars["Select"].setProcessValue(activeDevice,0)
currentSelectedTrackIndex++
if(currentSelectedTrackIndex<selectedTracksIDs.length){
daMixer.setParameterProcessValue(activeMapping,selectedTracksIDs[currentSelectedTrackIndex],selectedTag,1)
page.mHostAccess.mTransport.mTimeDisplay.mPrimary.mTransportLocator.setTime(activeMapping,"0")
setCustomDelay(activeDevice,"Next")
} else {
//acting as "Enter" here
customVars["None"].setProcessValue(activeDevice,1)
}
}
}
page.makeCommandBinding(customVars["Next"],"Transport", "Locate Next Event").mOnValueChange=function(activeDevice,activeMapping,value,diff){
if(value==1){
customVars["Next"].setProcessValue(activeDevice,0)
setCustomDelay(activeDevice,"Info")
}
}
page.makeCommandBinding(customVars["Info"],"Edit", "Edit Info Line").mOnValueChange=function(activeDevice,activeMapping,value,diff){
if(value==1){
customVars["Info"].setProcessValue(activeDevice,0)
setCustomDelay(activeDevice,"Copy")
}
}
var customHostCopy=page.mCustom.makeHostValueVariable("customHostCopy")
page.makeValueBinding(customVars["Copy"],customHostCopy).mOnValueChange=function(activeDevice,activeMapping,value,diff){
if(value==1){
customVars["Copy"].setProcessValue(activeDevice,0)
//Send Copy CC to BMT
midiOutput.sendMidi(activeDevice,[0xB0,0x01,0x7F])
setCustomDelay(activeDevice,"Rename")
}
}
page.makeCommandBinding(customVars["Rename"],"Edit", "Rename First Selected Track").mOnValueChange=function(activeDevice,activeMapping,value,diff){
if(value==1){
customVars["Rename"].setProcessValue(activeDevice,0)
setCustomDelay(activeDevice,"Paste")
}
}
var customHostPaste=page.mCustom.makeHostValueVariable("customHostPaste")
page.makeValueBinding(customVars["Paste"],customHostPaste).mOnValueChange=function(activeDevice,activeMapping,value,diff){
if(value==1){
customVars["Paste"].setProcessValue(activeDevice,0)
//Send Paste CC to BMT
midiOutput.sendMidi(activeDevice,[0xB0,0x02,0x7F])
setCustomDelay(activeDevice,"Select")
}
}
page.makeCommandBinding(customVars["None"],"Edit", "Select None").mOnValueChange=function(activeDevice,activeMapping,value,diff){
if(value==1){
customVars["None"].setProcessValue(activeDevice,0)
}
}
The PLE screenshot:
The BMT Project txt`Project: copy_paste_ccs
Preset 0: New (2) Preset
Translator 0.0: cc1 - Copy
Options: swallow
Incoming: Control Change on ch. 1 with CC#:1 (0x01) and value:127 (0x7F), on port Bome MIDI Translator 1 Virtual In
Outgoing: Text: Ctrl(C)
Translator 0.1: cc2 - Paste
Options: swallow
Incoming: Control Change on ch. 1 with CC#:2 (0x02) and value:127 (0x7F), on port Bome MIDI Translator 1 Virtual In
Outgoing: Text: Ctrl(V)
Translator 0.2: Start Process
Incoming: Keystrokes: Ctrl(Alt(Shift(K)))
Outgoing: Control Change on ch. 1 with CC#:0 (0x00) and value:127 (0x7F), to port Bome Virtual Port 1, delay:1 seconds
Translator 0.3: Start Process
Incoming: Keystrokes: Ctrl(Alt(Shift(K)))
Outgoing: Control Change on ch. 1 with CC#:0 (0x00) and value:0 (0x00), to port Bome Virtual Port 1, delay:1020 millisec
`
I wanted to thank you for this - I am a noob with the new midi remote, so apologies for stupidity!
I got everything working up to selecting the channels with PLE - after that nothing seems to happen. I want to debug the script, but cannot get that working yet…
Maybe timing issue with sending instructions after the PLE step?
Any pointers on how to debug this?
It’s possible. Here’s what you can start with:
Open the script, and locate this line:
customDelayDurations[desc]=5
Change 5 to something bigger (slower) for example, try 20 for a start and see if this helps.
Even went to 50 for the delay but no change.
Not sure how to step into debug to see where it is failing.
It’s not a debug issue, unless of course you’ve changed something internally in the script.
You can PM me with a project where it fails so that I can check the sequences execution.
A Cubase project?
Yes. Doesn’t have to be a real one. Just a tiny one which fails at your system.
