|
|
|
10-02-2019, 12:56 AM
|
#1
|
Human being with feelings
Join Date: May 2015
Location: Los Angeles, CA
Posts: 326
|
"Unselect tracks-with the name of ___"
I'm looking for a script to make or someone make me one that I can interchange what I want the name in the track to be unselected.
For example: "unselect tracks with the name bass" OR "unselect tracks with the name guitar"
etc.
|
|
|
10-02-2019, 01:32 AM
|
#2
|
Human being with feelings
Join Date: Feb 2015
Posts: 1,096
|
If you have the SWS extension installed, you can do this with CYCLE ACTIONS...
Create a new cycle action named, for example, "Unselect Bass" with an action as follows:
CONSOLE -sBass*
This will unselect all tracks whose name begins with 'Bass' (or 'bass')
Once you created and applied this cycle action it will appear as an action in your Action List named "Unselect Bass" :-)
|
|
|
10-07-2019, 02:33 PM
|
#3
|
Human being with feelings
Join Date: May 2015
Location: Los Angeles, CA
Posts: 326
|
hey that helps, but not for the children tracks specifically under the parent folders name. I need to unselect all the tracks underneath that track name as well. Not just the parent folder/track. ALL of them.
More of a "select all tracks, but "fx buses" tracks (and their children folders/tracks)
Last edited by semikid; 10-07-2019 at 02:43 PM.
|
|
|
10-07-2019, 02:55 PM
|
#4
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
How about something like this?, If it does what you want you could change the find name and save as another script,.
Code:
-- Unselect tracks with specific name
local find = 'Guitar' -- non-case sensitive
reaper.PreventUIRefresh(1)
for i = reaper.CountSelectedTracks(0)-1,0,-1 do
local track = reaper.GetSelectedTrack(0, i)
local _,name = reaper.GetTrackName(track, '')
if string.lower(name) == string.lower(find) then
reaper.SetTrackSelected(track, false)
end
end
reaper.PreventUIRefresh(-1)
Removed Undo code, REAPER doesn't seem to support undo for selected track?
Last edited by Edgemeal; 10-07-2019 at 03:07 PM.
|
|
|
10-08-2019, 11:22 AM
|
#5
|
Human being with feelings
Join Date: May 2015
Location: Los Angeles, CA
Posts: 326
|
Thanks for the help Edgemeal. Right now it only seems to be unselecting the parent fx bus track and not the children.
|
|
|
10-08-2019, 03:10 PM
|
#6
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by semikid
Thanks for the help Edgemeal. Right now it only seems to be unselecting the parent fx bus track and not the children.
|
Well the script just unselects any selected track that has a matching name, but I'm guessing what you really want is, all child tracks of the matching parent name get also get unselected?
Also, what is supposed to happen if a child track is selected and has the matching name but the parent doesn't?
You might want to update your original post so its more clear to others.
Last edited by Edgemeal; 10-08-2019 at 03:37 PM.
|
|
|
10-08-2019, 04:21 PM
|
#7
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
I have a script on ReaPack called Select tracks by name... if I get a chance, I'll try to add an "inverse" mode that should do what you need.
|
|
|
11-08-2019, 09:02 PM
|
#8
|
Human being with feelings
Join Date: May 2015
Location: Los Angeles, CA
Posts: 326
|
Quote:
Originally Posted by Lokasenna
I have a script on ReaPack called Select tracks by name... if I get a chance, I'll try to add an "inverse" mode that should do what you need.
|
Ha! yes i love that script! I was thinking exactly that! "what if this script could inverse?"
That would be sweet if possible! LMK!
|
|
|
11-08-2019, 09:09 PM
|
#9
|
Human being with feelings
Join Date: Dec 2009
Location: Oblivion
Posts: 10,272
|
Or just use the console command -s trackname
You don't need to use Cycle Actions to run console commands, unless you want to combine them with other commands. You could e.g. select your tracks with the above command and add the sws action "unselect children of selected folder."
|
|
|
10-23-2023, 06:55 AM
|
#10
|
Human being with feelings
Join Date: May 2020
Posts: 337
|
I'd really like to be able to do this as well (unselect tracks by name, including all children).
The only way I've found so far to choose specific tracks to unselect in an action is using the Reapack script 'Script: X-Raym_Unselect tracks with certain words in their SWS notes.lua'.
EDIT: I don't think the '-s trackname' solution would work for me as I want to unselect from a set of tracks that have been selected mid-way through a custom action.
|
|
|
10-25-2023, 06:58 AM
|
#11
|
Human being with feelings
Join Date: Oct 2023
Posts: 3
|
Hello. With the help of ChatGPT I get this script. I tested it with parent and children tracks successfully. Give it a try. Just change the name between "xxx" for the track name you want.
Code:
-- Function to unselect all tracks with the word "stem" in their name, case-insensitive
function unselectTracksWithStem()
-- Get the number of tracks
local num_tracks = reaper.CountTracks(0)
-- Loop through all tracks
for i = 0, num_tracks - 1 do
-- Get the current track
local track = reaper.GetTrack(0, i)
-- Get the track name
local retval, track_name = reaper.GetTrackName(track)
-- Just change the name between "xxx" and save the script
if string.find(string.lower(track_name), "stem") then
-- Unselect the track
reaper.SetTrackSelected(track, false)
end
end
end
-- Call the function to unselect all tracks with the word "stem" in their name, case-insensitive
unselectTracksWithStem()
|
|
|
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 04:17 PM.
|