Old 12-28-2017, 09:37 AM   #1
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default Is this a possible thing to do?

I am wondering if anyone like me2beats who has some lua's that deal with track names might be able to create a script that would do this:

read the track names of 16 selected tracks
copy those names
paste them into 16 other tracks that already exist


Let me explain why and how it would be used:

We are using Kontakt and some Spitfire string lib's...
they have many articulations for each instrument
the articulations are mostly named the same
we load 16 of those into kontakt and create
16 midi sends to that... but those midi tracks get named
MIDI 1, MIDI 2, etc.
We want the articualtion name on each of those instead...
and it gets tedious to rename them...

We currently are doing this faster via a track template but it
would be nice if we could it by the requested way via a lua...

Since I am the poster child for being a scripting dummy, I have no
idea if it would even be possible...

Please tell me it is or tell me I"m stupid and crazy...

either way... thanks much %^)
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 12-28-2017, 10:29 AM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Something like these with Lua ReaScript, but these haven't been extensively tested and debugged (so test only with your own risk) :

Copy selected track names (to extensions/scripts ini file, not the system clipboard as that's not directly available for ReaScript) :

Code:
local numselected = reaper.CountSelectedTracks(0)
if numselected>0 then
  reaper.SetExtState("copytracknames","numtracks",numselected,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,trackname,true)
    end
  end
end
Paste names to selected tracks :
Code:
local numstoredtracks = tonumber(reaper.GetExtState("copytracknames","numtracks"))
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
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 12-28-2017, 11:52 AM   #3
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,109
Default

Quote:
Originally Posted by Xenakios View Post
not the system clipboard as that's not directly available for ReaScript
There's now
CF_GetClipboard()
CF_GetClipboardBig()
CF_SetClipboard()

via SWS.
nofish is offline   Reply With Quote
Old 12-28-2017, 03:00 PM   #4
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

thanks so much Xen... will be testing in just bit

OK freakin' PERFECT.... you are yet again a super hero!
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva

Last edited by hopi; 12-28-2017 at 04:16 PM.
hopi is offline   Reply With Quote
Old 12-29-2017, 12:19 PM   #5
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

I made a couple toolbar icons to use with these
https://stash.reaper.fm/theme/2095/t...%20Scripts.rar
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi 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 07:31 PM.


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