Old 10-10-2020, 12:23 AM   #2241
Pink Wool
Human being with feelings
 
Pink Wool's Avatar
 
Join Date: Apr 2020
Posts: 1,501
Default 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
Pink Wool is offline   Reply With Quote
Old 10-10-2020, 02:28 AM   #2242
rekkandevar
Human being with feelings
 
Join Date: Jan 2020
Posts: 58
Default 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.
rekkandevar is offline   Reply With Quote
Old 10-10-2020, 02:47 AM   #2243
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Quote:
Originally Posted by Pink Wool View Post
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
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 10-10-2020, 03:24 AM   #2244
Pink Wool
Human being with feelings
 
Pink Wool's Avatar
 
Join Date: Apr 2020
Posts: 1,501
Default

Quote:
Originally Posted by MusoBob View Post
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.
Pink Wool is offline   Reply With Quote
Old 10-10-2020, 04:00 AM   #2245
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default "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
Loulou92 is online now   Reply With Quote
Old 10-10-2020, 04:35 AM   #2246
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Quote:
Originally Posted by Pink Wool View Post
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.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 10-10-2020, 09:09 AM   #2247
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by Loulou92 View Post
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()
Edgemeal is offline   Reply With Quote
Old 10-10-2020, 10:08 AM   #2248
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

I need to learn lua I know... But i'm gonna suck at it.
Loulou92 is online now   Reply With Quote
Old 10-10-2020, 10:10 AM   #2249
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

Invaluable help, as always Edgemeal .
Loulou92 is online now   Reply With Quote
Old 10-10-2020, 11:12 AM   #2250
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by Loulou92 View Post
Invaluable help, as always Edgemeal .
No problem, the learning never stops, you just create more complicated apps/scripts.
Edgemeal is offline   Reply With Quote
Old 10-10-2020, 02:50 PM   #2251
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by Pink Wool View Post
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



__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 10-10-2020, 03:26 PM   #2252
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Quote:
Originally Posted by amagalma View Post
...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 !!!
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 10-10-2020, 11:01 PM   #2253
Pink Wool
Human being with feelings
 
Pink Wool's Avatar
 
Join Date: Apr 2020
Posts: 1,501
Default

Quote:
Originally Posted by amagalma View Post
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!
Pink Wool is offline   Reply With Quote
Old 10-12-2020, 01:26 AM   #2254
rekkandevar
Human being with feelings
 
Join Date: Jan 2020
Posts: 58
Default CC to pitchbend plugin

Quote:
Originally Posted by rekkandevar View Post
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.
Attached Files
File Type: txt midi_pitchcc.txt (1.4 KB, 212 views)
rekkandevar is offline   Reply With Quote
Old 10-17-2020, 08:21 AM   #2255
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default 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
Loulou92 is online now   Reply With Quote
Old 10-17-2020, 12:33 PM   #2256
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

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.
cfillion is offline   Reply With Quote
Old 10-17-2020, 01:31 PM   #2257
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

I tried to reach you at some point via PM for this request, but the mailbox was full iirc. Thank you Cfillion !
Loulou92 is online now   Reply With Quote
Old 10-17-2020, 04:14 PM   #2258
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

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.
Loulou92 is online now   Reply With Quote
Old 10-20-2020, 08:09 AM   #2259
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by Loulou92 View Post
- "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)
Edgemeal is offline   Reply With Quote
Old 10-20-2020, 10:04 AM   #2260
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

Quote:
Originally Posted by Edgemeal View Post
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.
Loulou92 is online now   Reply With Quote
Old 10-20-2020, 12:23 PM   #2261
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by Loulou92 View Post
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!
Edgemeal is offline   Reply With Quote
Old 10-20-2020, 01:47 PM   #2262
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

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.
Loulou92 is online now   Reply With Quote
Old 10-20-2020, 02:24 PM   #2263
jkooks
Human being with feelings
 
Join Date: May 2020
Posts: 190
Default

Quote:
Originally Posted by Loulou92 View Post
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.
jkooks is online now   Reply With Quote
Old 10-20-2020, 02:55 PM   #2264
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by Loulou92 View Post
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.
Edgemeal is offline   Reply With Quote
Old 10-20-2020, 03:21 PM   #2265
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

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 .
Loulou92 is online now   Reply With Quote
Old 10-21-2020, 03:04 PM   #2266
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default 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.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak

Last edited by MusoBob; 10-22-2020 at 01:11 AM.
MusoBob is offline   Reply With Quote
Old 10-26-2020, 05:06 PM   #2267
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

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 !
Loulou92 is online now   Reply With Quote
Old 10-26-2020, 09:02 PM   #2268
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by Loulou92 View Post
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
Edgemeal is offline   Reply With Quote
Old 10-26-2020, 10:07 PM   #2269
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

Quote:
Originally Posted by Edgemeal View Post
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
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 !
Loulou92 is online now   Reply With Quote
Old 10-26-2020, 10:47 PM   #2270
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by Loulou92 View Post
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.
Edgemeal is offline   Reply With Quote
Old 10-29-2020, 02:30 PM   #2271
Malfunction
Human being with feelings
 
Malfunction's Avatar
 
Join Date: Sep 2020
Posts: 149
Default

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.
Malfunction is offline   Reply With Quote
Old 11-05-2020, 04:31 AM   #2272
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default 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
Loulou92 is online now   Reply With Quote
Old 11-06-2020, 08:49 PM   #2273
rekkandevar
Human being with feelings
 
Join Date: Jan 2020
Posts: 58
Default 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.
Attached Files
File Type: txt midi_transpose2.txt (2.8 KB, 177 views)
rekkandevar is offline   Reply With Quote
Old 11-07-2020, 11:12 AM   #2274
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default 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
Loulou92 is online now   Reply With Quote
Old 11-07-2020, 07:55 PM   #2275
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by Loulou92 View Post
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)
Edgemeal is offline   Reply With Quote
Old 11-07-2020, 10:36 PM   #2276
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

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 ?
Loulou92 is online now   Reply With Quote
Old 11-07-2020, 11:59 PM   #2277
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

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
Loulou92 is online now   Reply With Quote
Old 11-08-2020, 12:17 AM   #2278
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

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)

--------------------------------------------------------------------------------
Loulou92 is online now   Reply With Quote
Old 11-08-2020, 08:26 AM   #2279
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by Loulou92 View Post
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.
Edgemeal is offline   Reply With Quote
Old 11-08-2020, 09:24 AM   #2280
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

Ok I've changed the script, thx ! The result is pretty fast now.
Loulou92 is online now   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 10:59 AM.


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