|
|
|
12-17-2015, 01:27 PM
|
#1
|
Human being with feelings
Join Date: Dec 2009
Location: Oblivion
Posts: 10,271
|
Scripts to Copy & Paste Track Names?
Hello genius coders, is it script-able to copy the names of a set of selected tracks and then paste the names back to the same or another set of tracks (would be 2 separate scripts to use before and after a set of actions)?
I'm trying to use SWS resources to apply track templates (with track grouping parameters) to selected tracks, but can't prevent them all inheriting the name of the track template.
Thanks for any ideas.
|
|
|
12-17-2015, 03:04 PM
|
#2
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Hi,
Yes it is possible, and yes it surely simpler in two scripts (so that it can be set in custom actions as you desired).
Is that something you have to do a lot ?
You have to explain what is considered as source tracks and what is considered as destination tracks so that someone can script something, but in the concept yes, it sounds possible.
|
|
|
12-17-2015, 05:03 PM
|
#3
|
Human being with feelings
Join Date: Dec 2009
Location: Oblivion
Posts: 10,271
|
Thanks X-Raym, well right now yea I'm having to do it a lot. Going through and updating tons of old projects to finalize with new practices, VCA's and so forth. Easiest way I've found is to use Resources Track Templates to apply VCA grouping, set inputs and track panel appearance. I can use snapshots to preserve the fx chains, but lose the original track names in the process.
Source and destination tracks are simply the track selection. I would use the scripts in the same custom action most likely always, so both would be the same in any case I imagine.
I've also created a track context toolbar to quickly apply these changes to any selected track(s) for track type consistency and painless VCA assignment, so it's a drag when they all end up with the track template name. That's the only drawback left to this process right now:
If it's easy for you or someone to come up with that would be most helpful, but if you don't have time, it would still be great if you pointed me in the right API direction and I'll attempt something myself.
Last edited by foxAsteria; 12-17-2015 at 06:09 PM.
|
|
|
12-17-2015, 06:09 PM
|
#4
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Quote:
I'll attempt something myself.
|
Oh man, if you want to it yourself, I will not push you back
The more users will script, the more fun we will have
Ok so I point you some direction, try, and I help you if you are stuck. I don't know what is your level of programming, so I'll stay concise.
I have a script that take parent track name and set them to uppercase.
REAPER-ReaScripts/X-Raym_Set parents tracks names to uppercase and childs ones to camelcase.lua at master · X-Raym/REAPER-ReaScripts
You can use it as template for both actions. Just clean the parent checking conditions, and replace
GetTrack by GetSelectedTrack
CountTrack by CountSelectedTrack
Then start to code your desired scripts:
- Save selected tracks names as Proj Exstate
- Rename selected tracks names from Proj Exstate
So, as you can guess, to save info from a script to another, we will use Proj Exstate, a way to write infos right in the .rpp file. Then we recall them from the second script.
So there is two actions that interest us:
Code:
reaper.SetProjExtState(ReaProject proj, string extname, string key, string value)
To store the track names
Code:
retval, string valOutNeedBig reaper.GetProjExtState(ReaProject proj, string extname, string key)
to recall the values
(or you can use this one - you will have to test to see what is more easy):
Code:
boolean retval, optional string keyOutOptional, optional string valOutOptional reaper.EnumProjExtState(ReaProject proj, string extname, integer idx)
You could probablu use TRACK_NAMES as Extnames and the number in selection as key.
More infos in the doc : REAPER API functions - SetProjExtState
In both scripts, you just have to put one of this actions inside the loop.
Tell me if you succeed to do something (or not).
Cheers !
|
|
|
06-01-2016, 02:25 AM
|
#5
|
Human being with feelings
Join Date: Jun 2011
Posts: 610
|
Hi X-Raym
May I ask for an alternative version of this script ?
Set Parents and NON-FOLDER names to uppercase and child ones to camelcase.lua
|
|
|
05-17-2018, 10:14 AM
|
#6
|
Human being with feelings
Join Date: Nov 2015
Posts: 607
|
Just wondering if you were able to get the script done ... I have to rebuilt all my templates but I don't want copy the names again ...
|
|
|
05-17-2018, 10:38 AM
|
#7
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
Thanks to cfillion we know have a Clipboard function for reascript! No need to use
SetProjExtState in this case anymore.
So you can simply code the script to get selected track names in the clipboard (script 1) and the other to paste names list from the clipboard to selected track (script 2).
|
|
|
05-17-2018, 12:23 PM
|
#8
|
Human being with feelings
Join Date: Nov 2015
Posts: 607
|
Ty X-Raym, I will have a look ... hope I am able to do something, last time I coded anything was 20 years ago jeje
|
|
|
05-17-2018, 12:42 PM
|
#9
|
Human being with feelings
Join Date: Dec 2009
Location: Oblivion
Posts: 10,271
|
Quote:
Originally Posted by Vagalume
Just wondering if you were able to get the script done ... I have to rebuilt all my templates but I don't want copy the names again ...
|
I've given up on learning script for the moment, but for this project I just ended up using a custom action to apply color based on custom colors and vca group based on default group flags. So I didn't need to copy/paste track names anymore.
|
|
|
05-17-2018, 01:10 PM
|
#10
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,900
|
@Vagalume
Ok let us know how far you. You have access to my youtube reascript video tutorial and to my only reascript api doc if needed :P
|
|
|
05-17-2018, 02:03 PM
|
#11
|
Human being with feelings
Join Date: Nov 2015
Posts: 607
|
Ty both
|
|
|
07-07-2020, 09:13 PM
|
#12
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
I'd do it if only I could...
Hello
I'm a bit late to the party, sorry, but has someone made a script to get the name of a selected track, and later on copy this name to another newly selected track ?
I won't lie, I'm unable to do it myself (scripting). Usualy I get around these things by doing long and tedious custom actions, but here there is no shortcut & I need this piece of code very much in custom and cycle actions I use all the time. I could even pay a few bucks if this can motivate someone to do it..
Any help appreciated !
|
|
|
07-07-2020, 09:49 PM
|
#13
|
Human being with feelings
Join Date: Oct 2017
Location: Russia
Posts: 366
|
@Loulou92
Archie_Track; Copy selected track name.lua
Archie_Track; Paste selected track name .lua
|
|
|
07-08-2020, 10:13 AM
|
#14
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
Quote:
Originally Posted by Archie
@Loulou92
Archie_Track; Copy selected track name.lua
Archie_Track; Paste selected track name .lua
|
Thank you so much, my internet ally !!
|
|
|
04-20-2021, 03:22 AM
|
#15
|
Human being with feelings
Join Date: Feb 2019
Location: Poland
Posts: 137
|
Is there a way to take a list of track names from a text files (one title per line) and paste them to tracks in reaper?
|
|
|
04-20-2021, 10:18 AM
|
#16
|
Human being with feelings
Join Date: May 2018
Location: Los Angeles
Posts: 1,721
|
For those interested... the best basic renamer (for me) is: Script: amagalma_gianfini_Track-Item Name Manipulation - UNDO.lua
__________________
Cheers... Andrew K
Reaper v6.80+dev0621 - June 21 2023 • Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
|
|
|
04-21-2021, 08:38 AM
|
#17
|
Human being with feelings
Join Date: Apr 2020
Location: UK
Posts: 79
|
Looks like the 'Track-Item Name Manipulation' renaming script has been renamed! Search for 'ReaNamer'.
Quote:
Originally Posted by kris.audioplanet
Is there a way to take a list of track names from a text files (one title per line) and paste them to tracks in reaper?
|
Yes. Search for 'X-Raym_Import tracks from file.lua' in ReaPack.
|
|
|
11-25-2023, 02:05 AM
|
#18
|
Human being with feelings
Join Date: May 2020
Posts: 337
|
Quote:
Originally Posted by Archie
@Loulou92
Archie_Track; Copy selected track name.lua
Archie_Track; Paste selected track name .lua
|
The copy script isn't working for me - clipboard isn't updated, just contains whatever was in there previously.
Reaper 7.05 x64 windows 10.
|
|
|
12-30-2023, 02:17 PM
|
#19
|
Human being with feelings
Join Date: Sep 2017
Posts: 8
|
Came across this thread while searching for a solution to the above, the clipboard is not updating on OSX either (intel) reaper 7.07
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 07:11 AM.
|