Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 07-19-2018, 08:01 AM   #1
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 517
Default Multitimbral VSTi: copy midi track names to their audio return tracks

I thought this situation could be quite common and somebody had already figured this out.


So lets say i have Omnisphere with 8 different instruments routed to each one of the individual outputs.

I have the tracks containing the midi sequences visible in the TCP and the audio tracks receiving individual outputs from Omnisphere visible in the Mixer only.

Is there a way to automatically name the tracks in the mixer, getting the names from the ones in the TCP?

Maybe a script that copies the name to the next hidden track, and does this sequentially until it reaches the end of the folder? No idea if thats doable though.
reapero is offline   Reply With Quote
Old 07-19-2018, 09:41 AM   #2
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

there are two lua scripts:

Xen Copy Selected Track Names.lua

and

Xen Paste to Selected Track Names.lua

so you likely have to make them all visible in the TCP to use it and then you can hide them from the TCP again
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 07-19-2018, 10:44 AM   #3
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 517
Default

Yes, thanks. I was thinking something a bit more straightforward though, like selecting the 8 tracks with midi and running a script.

I am new to scripting but willing to learn. Is a table something that could be handy in this situation, to store the 8 names of the tracks?
reapero is offline   Reply With Quote
Old 07-19-2018, 11:44 AM   #4
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

those are two scripts... you don't have to write anything

either they are in your actions list or they are added is you install SWS extensions...
or if not, save each of these as a .lua file and put them into your scripts folder:

this is the copy: Xen Copy Selected Track Names.lua

Quote:
local numselected = reaper.CountSelectedTracks(0)
if numselected>0 then
reaper.SetExtState("copytracknames","numtracks",nu mselected,true)
for i=0,numselected-1 do
local track = reaper.GetSelectedTrack(0,i)
local rv, trackname = reaper.GetTrackName(track,"")
if rv~=0 then
--reaper.ShowConsoleMsg(trackname.."\n")
reaper.SetExtState("copytracknames","name"..i,trac kname,true)
end
end
end
this is the paste: Xen Paste to Selected Track Names.lua

Quote:
local numstoredtracks = tonumber(reaper.GetExtState("copytracknames","numt racks"))
if numstoredtracks>0 then
for i=0,numstoredtracks-1 do
local trackname = reaper.GetExtState("copytracknames","name"..i)
if i<reaper.CountSelectedTracks(0) then
local dest_track = reaper.GetSelectedTrack(0,i)
reaper.GetSetMediaTrackInfo_String(dest_track, "P_NAME", trackname, true)
end
end
reaper.UpdateArrange()
end
*****************

they are just text files but the file name extension must be .lua instead of .txt

If they don't just show up in the actions list, then use the reascript add and go find them and add them...

It really can't be much easier... you select a given number of tracks that are in the order you want... then run the copy script action

then select a corresponding set of other tracks, again in the order you wish [should be same as the order you copied from]... and run the paste action...

very useful stuff
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 07-19-2018, 02:06 PM   #5
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 517
Default

Many thx hopi!

For some reasons those didnt show up in my action list, even if i have installed sws.

Those and "Select next/previous tracks" combined into a single custom action provide exactly the one button operation i was looking for. Happy times!

Thanks again.

EDIT: Btw in case somebody wants to import those scripts there are some accidental backspaces that give some errors. Easy fix though, just delete those in the lines mentioned on the error popup boxes

Last edited by reapero; 07-19-2018 at 02:15 PM.
reapero is offline   Reply With Quote
Old 07-19-2018, 03:35 PM   #6
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

I will send them up to the stash just as I have them... I'll put them both into a zip file

I don't recall how we got these but I think it was a special request because we also need exactly this ability... and it IS a great help when building large orchestral templates [for us]

brb with a link:

here we go:

https://stash.reaper.fm/33974/Xen%20...%20scripts.zip
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 07-20-2018, 01:43 AM   #7
DynamicK
Human being with feelings
 
Join Date: Nov 2017
Location: Gloucestershire, UK
Posts: 223
Default

Thanks hopi
DynamicK is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:15 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.