|
|
|
07-10-2020, 06:27 AM
|
#1
|
Human being with feelings
Join Date: Jul 2020
Posts: 21
|
Reascript for showing tracks with similar names
Hi there,
In my projects, I often use a MIDI track and a track to which the MIDI-track is rendered (with FX). For example a track "Strings MIDI". Then I render that track to "Strings" en disable and hide the MIDI track.
Is there a script to find that corresponding MIDI track by its name, based on the current selected (rendered) track?
Thanks in advance,
Gijsbrecht
|
|
|
07-10-2020, 06:50 AM
|
#2
|
Human being with feelings
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
|
You could try the Track Manager under the View menu. There is a filter in Track Manager, so you can type the track name in there. Even first few letters might be enough, so that depending on the name, you can get more results.
|
|
|
07-10-2020, 07:01 AM
|
#3
|
Human being with feelings
Join Date: Jul 2020
Posts: 21
|
Yes, I know, but because it's a repetetive action, I'm looking for a way to automate it, based on the selected track.
|
|
|
07-10-2020, 09:24 AM
|
#4
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by gijsbrechtvanaemstel
Yes, I know, but because it's a repetetive action, I'm looking for a way to automate it, based on the selected track.
|
So if the selected track is named "Strings" you want to find the track named "Strings MIDI"? But what is supposed to happen if the track is found?
Heres a quick example, Lua script, it should show a message in the console if match is found.
Code:
function Main()
local track = reaper.GetSelectedTrack(0,0)
if not track then return end
local retval, track_name = reaper.GetSetMediaTrackInfo_String(track, "P_NAME", "", false)
local find_track_name = track_name .. ' MIDI'
local trackcount = reaper.CountTracks()
for i = 0, trackcount-1 do
local tr = reaper.GetTrack(0, i)
local retval, tr_name = reaper.GetSetMediaTrackInfo_String(tr, "P_NAME", "", false)
if tr_name == find_track_name then
reaper.ShowConsoleMsg("Found '" .. tr_name .. "' at track #" .. i+1 .. '\n')
break
end
end
end
Main()
reaper.defer(function () end)
|
|
|
07-10-2020, 09:26 AM
|
#5
|
Human being with feelings
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
|
Should be possible to select a track, grab the track name and search same/similar tracks with a script. Maybe somebody knows if there is already something like that?
If you have changed the render track names from the original, I would imagine that would have to be accounted for somehow, maybe with some manual input from you anyway. Also, what do you want to happen with the tracks found such way? Made visible and selected, presented on list, something else?
---
edit: Edgemeal already there, nice...
|
|
|
07-11-2020, 05:42 AM
|
#6
|
Human being with feelings
Join Date: Jul 2020
Posts: 21
|
Thanks alot! That did the job. When the MIDI track is found I simply make it visible (if it needs to be edited and then rerendered).
Thanks again!
|
|
|
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:43 PM.
|