|
|
|
10-10-2020, 12:23 AM
|
#2241
|
Human being with feelings
Join Date: Apr 2020
Posts: 1,524
|
Insert new track inside a folder (named x) and autoname the track
Hi! So I'm trying to use the parent and child tracks as a take system for a project.
I found that you can actually create new tracks inside a folder just by selecting the parent and then inserting a new track. But there isn't a dedicated action for it, is there?
Also the new track is always first in the folder. So would it be possible to have a script (or is there one already?) that inserts a new track inside a folder and inserts it last on the folder?
I also haven't found a way to autoname the newly created tracks (as take-1, take-2, take-3...). Is there one?
So asking if this is possible to script?
The extend the request even further, a script that inserts a track to a named folder, would be nice!
So again, asking for a lot...
Thanks in advance,
PW
|
|
|
10-10-2020, 02:28 AM
|
#2242
|
Human being with feelings
Join Date: Jan 2020
Posts: 60
|
MIDI CC to pitchwheel JSFX?
I'm trying to set up a gamepad for use as a separate MIDI controller and I'd like to map one of the joysticks to control the pitch bending. Problem is, the program I'm using doesn't let me set the controls to anything other than a standard CC, and I know pitchbending isn't a standard CC. So can anyone make a script to map a certain input CC to the pitchbending MIDI message? Probably would be easiest to combine MIDI CC mapper and MIDI pitch wheel LFO.
|
|
|
10-10-2020, 02:47 AM
|
#2243
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Quote:
Originally Posted by Pink Wool
Hi! So I'm trying to use the parent and child tracks as a take system for a project.....
|
I just used
X-Raym Insert one new child track for each selected tracks
and modified it to do what I need, set the name "Markers" :
Code:
preserve_track_name = false
suffix = "Markers" -- suffix or new name if preserve_track_name is false
|
|
|
10-10-2020, 03:24 AM
|
#2244
|
Human being with feelings
Join Date: Apr 2020
Posts: 1,524
|
Quote:
Originally Posted by MusoBob
I just used
X-Raym Insert one new child track for each selected tracks
and modified it to do what I need, set the name "Markers" :
Code:
preserve_track_name = false
suffix = "Markers" -- suffix or new name if preserve_track_name is false
|
Thanks! Didn't know about this script!
But this still doesn't do what I'm looking for here. Let me explain further:
I create a track named for example "VOCALS" and set it as a folder. So the first new track inside the folder should be automatically named Take 1. And when I want to do a new take, I want the new track inserted be BELOW the previous track (just like takes work, the later take is below the previous). So I want new tracks (inside the folder) to be inserted in reverse order to the default Reaper one.
And I want the tracks in the folder to be autonamed when I create them to TAKE-1, TAKE-2 etc.
And then...I want to use custom actions to make it so that I can insert a new take into a folder which is named differently (WHILST I'm in the "VOCALS" folder.)
So say the singer takes a 5 min break and the guitarist comes up with a cool idea on the fly. So now I already have a track template with a folder named "GUITARS" and I want to insert a new track (as a new take) to that folder. And do this sorta "on-the-fly". So I could have a toolbar icon that inserts a new track ("take") to the guitars folder. So with a click on the toolbar I'm ready to record the guitarist.
So is this possible to script? Or is there something that's flawed with this kind of a "take" system?
Also, I don't want to come of as demanding these things. Or not thankful for your help, MusoBob. Just wanted to make it clear as intentions don't always translate well to written stuff. <3
Thanks,
PW
Last edited by Pink Wool; 10-10-2020 at 03:30 AM.
|
|
|
10-10-2020, 04:00 AM
|
#2245
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
"Unselect items of tracks hidden in TCP & MCP"
Hey
If someone fancy doing a script for this action, that would come quite handy :
Unselect items of tracks hidden in TCP and MCP
Have a good weekend !
xxxxxxxxxxxxxxxxxx
|
|
|
10-10-2020, 04:35 AM
|
#2246
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Quote:
Originally Posted by Pink Wool
Thanks! Didn't know about this script!
But this still doesn't do what I'm looking for here. Let me explain further:...
|
That can be modified to do what you need, but I'm going to bed now, maybe someone else will help, if not I'll look tomorrow.
|
|
|
10-10-2020, 09:09 AM
|
#2247
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Loulou92
Unselect items of tracks hidden in TCP and MCP
|
You can check if track is visible for TCP and MCP with IsTrackVisible function, try,...
Code:
for i = 0, reaper.CountTracks(0)-1 do
local track = reaper.GetTrack(0, i)
if not reaper.IsTrackVisible(track, true) then
for j = 0, reaper.CountTrackMediaItems(track)-1 do
local item = reaper.GetTrackMediaItem(track, j)
reaper.SetMediaItemSelected(item, false)
end
end
end
reaper.UpdateArrange()
|
|
|
10-10-2020, 10:08 AM
|
#2248
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
I need to learn lua I know... But i'm gonna suck at it.
|
|
|
10-10-2020, 10:10 AM
|
#2249
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
Invaluable help, as always Edgemeal .
|
|
|
10-10-2020, 11:12 AM
|
#2250
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Loulou92
Invaluable help, as always Edgemeal .
|
No problem, the learning never stops, you just create more complicated apps/scripts.
|
|
|
10-10-2020, 02:50 PM
|
#2251
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,458
|
Quote:
Originally Posted by Pink Wool
Hi! So I'm trying to use the parent and child tracks as a take system for a project...
|
I was doing the same thing for a while, trying to mimic Pro Tools playlists. I had made for myself a pack of several actions to achieve it. The only thing that I didn't like was that I had to disable the "draw faint peaks in folder tracks". I had made a FR in order to be able to enable/disable this per track and not globally.
Anyway, I tried today to update these scripts, as I had them made in my early scripting years and I am more knowledgeable now than then.
Here is the first one (it took me lots of hours to make! :S) :
amagalma_Insert a new track as the last child for each selected track (optionally enumerate and name)
Inserts a new track as the last child for each selected track (parent folder)
- Optionally enumerate and name inserted children for each folder (settings inside the script - enabled by default)
- Default name: "{parent name} Take ##" (## : denotes two-digit enumeration)
- If the selected track is not already a parent, then it becomes a parent folder and a new child is inserted
|
|
|
10-10-2020, 03:26 PM
|
#2252
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Quote:
Originally Posted by amagalma
...Here is the first one (it took me lots of hours to make! :S) :
amagalma_Insert a new track as the last child for each selected track (optionally enumerate and name)....
|
Thanks, now I don't have to, as it getting too much for me !!!
|
|
|
10-10-2020, 11:01 PM
|
#2253
|
Human being with feelings
Join Date: Apr 2020
Posts: 1,524
|
Quote:
Originally Posted by amagalma
I was doing the same thing for a while, trying to mimic Pro Tools playlists. I had made for myself a pack of several actions to achieve it. The only thing that I didn't like was that I had to disable the "draw faint peaks in folder tracks". I had made a FR in order to be able to enable/disable this per track and not globally.
Anyway, I tried today to update these scripts, as I had them made in my early scripting years and I am more knowledgeable now than then.
Here is the first one (it took me lots of hours to make! :S) :
amagalma_Insert a new track as the last child for each selected track (optionally enumerate and name)
Inserts a new track as the last child for each selected track (parent folder)
- Optionally enumerate and name inserted children for each folder (settings inside the script - enabled by default)
- Default name: "{parent name} Take ##" (## : denotes two-digit enumeration)
- If the selected track is not already a parent, then it becomes a parent folder and a new child is inserted
|
Oh man! Thank you! Just what I wanted! It always amazes me how generous all you people are! Especially you amagalma!
|
|
|
10-12-2020, 01:26 AM
|
#2254
|
Human being with feelings
Join Date: Jan 2020
Posts: 60
|
CC to pitchbend plugin
Quote:
Originally Posted by rekkandevar
I'm trying to set up a gamepad for use as a separate MIDI controller and I'd like to map one of the joysticks to control the pitch bending. Problem is, the program I'm using doesn't let me set the controls to anything other than a standard CC, and I know pitchbending isn't a standard CC. So can anyone make a script to map a certain input CC to the pitchbending MIDI message? Probably would be easiest to combine MIDI CC mapper and MIDI pitch wheel LFO.
|
I ended up making it myself. It took way longer than it should have, but switching everything over to the new MIDI syntax basically solved the whole thing for me. I recommend combining this with Fergo Joystick MIDI and LoopBe1 internal MIDI router.
|
|
|
10-17-2020, 08:21 AM
|
#2255
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
move left edge of selected automation items to start of time selection
Hello
There is a script that exists already and it does something to the right edge of automation items. Here is the script in question :
"cfillion_Move right edge of selected automation items to end of time selection.lua"
Could someone come up with a mod of this script to do the same action but to the left edge of automation items ? It would become :
"Move left edge of selected automation items to start of time selection.lua"
I have a usecase where I need both of these (rather complementary) functions.
Have a good weekend everybody !
xxxxxxxxxx
|
|
|
10-17-2020, 12:33 PM
|
#2256
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
I've pushed an update to that script to add an action for moving the left edge to the start of the time selection (v1.1). It will be available in a few minutes.
|
|
|
10-17-2020, 01:31 PM
|
#2257
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
I tried to reach you at some point via PM for this request, but the mailbox was full iirc. Thank you Cfillion !
|
|
|
10-17-2020, 04:14 PM
|
#2258
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
Hum well actually I realize I can't succeed with what's available in the action list right now .
If someone is interested in developing more what's possible to do in the action list concerning automation items, here are a few ideas that could be good to have ; I'll consider donation if someone wants to help with this as it would very directly help me in a current work :
Two scripts, whichever will solve the same problem :
- "Invert automation item selection on selected tracks"
or
- "select all automation items under edit cursor in selected tracks" (regular tracks, not envelope track)
@cfillion
- I'd also need alternative versions of your two scripts :
"cfillion_Move left edge of selected automation items to start of time selection.lua"
"cfillion_Move right edge of selected automation items to end of time selection.lua"
Versions that would work on *all* selected automation items in one go, not only the automation items on the selected envelope track. Don't know if it's possible ?
Last edited by Loulou92; 10-17-2020 at 04:45 PM.
|
|
|
10-20-2020, 08:09 AM
|
#2259
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Loulou92
- "Invert automation item selection on selected tracks"
|
Try,..
Code:
-- Invert automation item selection on selected tracks
-- Edgemeal - Oct 20, 2020
-- Donate: https://www.paypal.me/Edgemeal
function ToggleAiSelection(env)
local ai_count = reaper.CountAutomationItems(env)
for i = 0, ai_count-1 do
local val = reaper.GetSetAutomationItemInfo(env, i, 'D_UISEL', 0, false)
reaper.GetSetAutomationItemInfo(env, i, 'D_UISEL', math.abs(val-1), true)
end
end
local sel_tracks = reaper.CountSelectedTracks(0)
if sel_tracks == 0 then return end
reaper.PreventUIRefresh(1)
reaper.Undo_BeginBlock()
for i = 0, sel_tracks-1 do
local track = reaper.GetSelectedTrack(0, i)
local env_count = reaper.CountTrackEnvelopes(track)
for j = 0, env_count-1 do
ToggleAiSelection(reaper.GetTrackEnvelope(track, j))
end
end
reaper.Undo_EndBlock('Invert automation item selection on selected tracks', -1)
reaper.UpdateArrange()
reaper.PreventUIRefresh(-1)
|
|
|
10-20-2020, 10:04 AM
|
#2260
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
Quote:
Originally Posted by Edgemeal
Try,..
Code:
-- Invert automation item selection on selected tracks
-- Edgemeal - Oct 20, 2020
-- Donate: https://www.paypal.me/Edgemeal
function ToggleAiSelection(env)
local ai_count = reaper.CountAutomationItems(env)
for i = 0, ai_count-1 do
local val = reaper.GetSetAutomationItemInfo(env, i, 'D_UISEL', 0, false)
reaper.GetSetAutomationItemInfo(env, i, 'D_UISEL', math.abs(val-1), true)
end
end
local sel_tracks = reaper.CountSelectedTracks(0)
if sel_tracks == 0 then return end
reaper.PreventUIRefresh(1)
reaper.Undo_BeginBlock()
for i = 0, sel_tracks-1 do
local track = reaper.GetSelectedTrack(0, i)
local env_count = reaper.CountTrackEnvelopes(track)
for j = 0, env_count-1 do
ToggleAiSelection(reaper.GetTrackEnvelope(track, j))
end
end
reaper.Undo_EndBlock('Invert automation item selection on selected tracks', -1)
reaper.UpdateArrange()
reaper.PreventUIRefresh(-1)
|
Thank you so much Edgemeal ! I'll test this later today and will report !
Edit : it works flawlessly !
Last edited by Loulou92; 10-20-2020 at 10:55 AM.
|
|
|
10-20-2020, 12:23 PM
|
#2261
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Loulou92
Thank you so much Edgemeal ! I'll test this later today and will report !
Edit : it works flawlessly !
|
Glad it helped, and thanks for the donation!
|
|
|
10-20-2020, 01:47 PM
|
#2262
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
Does someone knows if it's theorically possible to create a script that execute an action on all selected automation items, one at a time ?
I've been looking at the Reaper API, not understanding fully what I was looking at, but it seems that it's not really possible to retrive the information "which automation items are now selected in the project".
I'd like to code a script that does one action to all the currently selected automation item in the project (the cfillion script discussed above). A simple loop... You gotta start somewhere ^^.
EDIT : Oh maybe this ? (based on what I see in Edgemeal script)
local ai_count = reaper.CountAutomationItems(env)
for i = 0, ai_count-1 do
reaper.Main_OnCommand(cfillion_script, 0)
Last edited by Loulou92; 10-20-2020 at 01:57 PM.
|
|
|
10-20-2020, 02:24 PM
|
#2263
|
Human being with feelings
Join Date: May 2020
Posts: 190
|
Quote:
Originally Posted by Loulou92
Does someone knows if it's theorically possible to create a script that execute an action on all selected automation items, one at a time ?
I've been looking at the Reaper API, not understanding fully what I was looking at, but it seems that it's not really possible to retrive the information "which automation items are now selected in the project".
I'd like to code a script that does one action to all the currently selected automation item in the project (the cfillion script discussed above). A simple loop... You gotta start somewhere ^^.
EDIT : Oh maybe this ? (based on what I see in Edgemeal script)
local ai_count = reaper.CountAutomationItems(env)
for i = 0, ai_count-1 do
reaper.Main_OnCommand(cfillion_script, 0)
|
The line that will tell you which item is selected is this:
Code:
reaper.GetSetAutomationItemInfo(envelope, item_index, 'D_UISEL', 0, false)
You still need to manually loop through every automation item in order to figure out which ones are selected (there is no API function like GetSelectedMediaItems for automation items that only pulls from the selected automation items) but it shouldn't be too hard to filter stuff out depending on what value is returned from the line above - I believe any value greater than 0 means that the item is selected.
|
|
|
10-20-2020, 02:55 PM
|
#2264
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Loulou92
EDIT : Oh maybe this ? (based on what I see in Edgemeal script)
local ai_count = reaper.CountAutomationItems(env)
for i = 0, ai_count-1 do
reaper.Main_OnCommand(cfillion_script, 0)
|
Ya its not that simple because of the way its written, this is just a quick mod for you to test, I'd rather have cfillion update them for you.
Move right edge of all selected automation items to end of time selection.lua
Move left edge of all selected automation items to start of time selection.lua
EDIT: Anyone needing these should ask cfillion for updates to his scripts.
Last edited by Edgemeal; 10-20-2020 at 05:22 PM.
|
|
|
10-20-2020, 03:21 PM
|
#2265
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
I doubt I have the required logical intelligence but I'm watching the X_Raym lua videos to maybe stop annoy you at some point ; maybe I'll get somewhere. Thank you Jkook for your help and Edgemeal for the script that is of course working (and if I'm deciphering it correctly, can easily be changed to work with left edges) !
Edit : @Edgemeal : you have attached the two versions while I was typing .
|
|
|
10-21-2020, 03:04 PM
|
#2266
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Read Source WAV ACID Info
Reaper will read the bpm but I need to read the other info like root note
some acid info here
https://forum.cockos.com/showthread.php?p=2202647
EDIT: here's Acidizer.zip if you are using Win 10 run it in Vista compatibility mode.
Last edited by MusoBob; 10-22-2020 at 01:11 AM.
|
|
|
10-26-2020, 05:06 PM
|
#2267
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
Hello !
Could someone come up with a "save time selection, slot 6" and "restore time selection, slot 6" script to expand on the Reaper action + the 5 slot offered by SWS actions ? If possible it would be very appreciated !
|
|
|
10-26-2020, 09:02 PM
|
#2268
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Loulou92
Hello !
Could someone come up with a "save time selection, slot 6" and "restore time selection, slot 6" script to expand on the Reaper action + the 5 slot offered by SWS actions ? If possible it would be very appreciated !
|
Maybe ask SWS to add more, in the meantime see if these help,..
Save - Restore time selection slots 6 to 10.zip
https://stash.reaper.fm/40556/Save%2...%20to%2010.zip
Last edited by Edgemeal; 10-26-2020 at 09:14 PM.
Reason: Fix link
|
|
|
10-26-2020, 10:07 PM
|
#2269
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
Quote:
Originally Posted by Edgemeal
|
It's working, thank you very very much Edgemeal ! 10 slots is total luxury
I've asked in the Github SWS subforum a few weeks ago & so at some point they might implement more slots natively, who knows !
|
|
|
10-26-2020, 10:47 PM
|
#2270
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Loulou92
10 slots is total luxury
|
You can have as many as you want, just copy and rename the slot number in the filenames.
And Thank You for (another) donation! You are most generous!
Last edited by Edgemeal; 10-30-2020 at 06:33 PM.
|
|
|
10-29-2020, 02:30 PM
|
#2271
|
Human being with feelings
Join Date: Sep 2020
Posts: 149
|
I need a script that can make a new track from a selection of midi notes.
KAWA had scripts that did it, but they are now broken.
|
|
|
11-05-2020, 04:31 AM
|
#2272
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
Save and restore selected tracks grouping
Hey
I wonder if it's possible to save and restore the grouping of selected tracks ?
That would be very cool : grouping can be used creatively inside custom actions to save, restore and manipulate several track selections. At the end of such custom action, you usually want to delete these "temporary" groups : they are only useful inside the custom action.
To remove the grouping of the tracks, I use "SWS/S&M: Remove track grouping for selected tracks".
Doing so, the selected tracks lose all their grouping attribution : those created for the custom action requirement, but sadly, also real grouping from before the action (for example VCA follow attributes), that are in use in the mix.
I'd love to have a save and recall selected tracks grouping at disposal, to allow to save track grouping at the start of the action, mangle them inbetween and restore them at the end... That would be amazing ... Is it something possible via script ?
Have a nice day !!
xxxxxxxxxxxxxxx
|
|
|
11-06-2020, 08:49 PM
|
#2273
|
Human being with feelings
Join Date: Jan 2020
Posts: 60
|
better midi transpose
Nobody asked for it, I made a better version of the MIDI transpose effect so you can easily change it by octaves, since that's what I usually use it for.
|
|
|
11-07-2020, 11:12 AM
|
#2274
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
Unselect track with text" xyz" in its SWS track notes
Hello !
I'm looking for a way to unselect (or select, but mainly unselect for the time being) tracks with a specific text string in its notes, for example "Buss", "NY" "Madonna", "Bye Trump" etc. The text string would have to be specified in the script itself (no prompt).
If someone creates something like that I'd be super super grateful !
Have a good week end !
xxxxx
|
|
|
11-07-2020, 07:55 PM
|
#2275
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Loulou92
I'm looking for a way to unselect (or select, but mainly unselect for the time being) tracks with a specific text string in its notes, for example "Buss", "NY" "Madonna", "Bye Trump" etc. The text string would have to be specified in the script itself (no prompt).
|
May not be the most effecient way, but since no one else is jumping in, try this. And to make script to select tracks, just change (track, false) to (track, true)...
Code:
-- Unselect tracks that have specific words in their track notes
local search = {"Buss", "NY", "Madonna"}
function DoWork(track)
for word in string.gmatch(reaper.NF_GetSWSTrackNotes(track), "%a+") do
for j = 1, #search do
if word == search[j] then reaper.SetTrackSelected(track, false) return end
end
end
end
for i = 0, reaper.CountTracks(0)-1 do
DoWork(reaper.GetTrack(0, i))
end
reaper.TrackList_AdjustWindows(false)
|
|
|
11-07-2020, 10:36 PM
|
#2276
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
Hey Edgemeal !
I just discovered AOT... Pfff it's good !!!! It totally solves the pin problem, thank you and congrats for this. It says it works for Reaper 5, but it's working for Reaper 6 also !
I'll test the script above ASAP, I can't thank you enough for it ; Be sure I'll Paypal you again.
By any chance, do you know if something can be done about my previous request ? To save and recall grouping for selected tracks ?
|
|
|
11-07-2020, 11:59 PM
|
#2277
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
I'm trying the "unselect" version of your script.
I think the script has a little problem : it takes Reaper 4 minutes to execute the script lol. It's working, at the end, a track gets unselected, but yeah, Reaper hangs for a few minutes... I think the script retrives track Notes for all tracks in the project, not track notes of the currently selected tracks. Problem is that I have gigantic track counts (more than 1000).
For the "select" version of the script, I guess there is no way around it : it must scan the entire project. But for the "unselect" version of the script, maybe it would be possible to have the script only work on the current track selection ?
Thx anyway for the effort
|
|
|
11-08-2020, 12:17 AM
|
#2278
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
I tried to mod it, and this is working a bit better already, it's executed in a few seconds !!
---------------------------------------------------------------------------------
-- Unselect tracks that have specific words in their track notes
local search = {"Folder"}
function DoWork(track)
for word in string.gmatch(reaper.NF_GetSWSTrackNotes(track), "%a+") do
for j = 1, #search do
if word == search[j] then reaper.SetTrackSelected(track, false) return end
end
end
end
--for i = 0, reaper.CountTracks(0)-1 do
-- DoWork(reaper.GetTrack(0, i))
--end
--reaper.TrackList_AdjustWindows(false)
for i = 0, reaper.CountSelectedTracks(0)-1 do
DoWork(reaper.GetSelectedTrack(0, i))
end
reaper.TrackList_AdjustWindows(false)
--------------------------------------------------------------------------------
|
|
|
11-08-2020, 08:26 AM
|
#2279
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Loulou92
I tried to mod it, and this is working a bit better already, it's executed in a few seconds !!
|
Just a heads up, If you use the SelectedTracks array then you'd need to loop backwards, since the code is changing the selected state of a track it will effect the selected track count/array size, etc, and will get all messed up and possibly fail.
Also when you paste code put it between CODE tags (shown as # button), to preserve the format, it also prevents the forum from using anti-spam tactics like adding spaces, which may break code.
loop backwards
Code:
for i = reaper.CountSelectedTracks(0)-1, 0, -1 do
It sounds really slow though, Hopefully someone else can help!
Last edited by Edgemeal; 11-08-2020 at 08:36 AM.
|
|
|
11-08-2020, 09:24 AM
|
#2280
|
Human being with feelings
Join Date: Sep 2015
Location: Paris
Posts: 544
|
Ok I've changed the script, thx ! The result is pretty fast now.
|
|
|
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:32 AM.
|