That should be doable if there's nothing already to do it.
It would select the first if it's yellow
Time selection: Crop project to time selection
save project as region name
undo
select next region if yellow
Time selection: Crop project to time selection
save project as region name
undo
select next region if yellow
Thank you MusoBob!
i think this already wasn't so difficult with a few more mouse click
(i have to confess .. i didn't realize after pasting to new project
we still have the undo the crop in the original project )
Is it possible to script enabling/disabling the "ignore effects chain keyboard shortcuts (send to main window)" option when an FX chain window is frontmost?
Usefulness: the ability to temporarily enable/disable this option via script would allow some shortcuts to target the main window, while others would remain functional for the FX chain/plugin window/instance.
Example: any action/script bound to a shortcut using the shift key modifier (by itself, without any other modifiers) will not work without this option being enabled.
Problem: I have a lot of shortcuts bound to shift+some key that I'd really like to still be able to use while an FX window is floating/frontmost, but don't want to need to constantly mouse over and toggle the "ignore..." menu option.
Please help, I need custom "Select Item Under Mouse Cursor" script.
This script should be like "Select Item Under Mouse Cursor" (NOT "Select Item Under Mouse Cursor (leaving other items selected)"), but when mouse cursor isn't over any (selected/unselected) item WITHOUT UNSELECTING (selected) items.
So, in other words, script should act in such way:
1. If no other items selected, select just one item under cursor.
2. If other items selected, unselect them and select just one item under mouse cursor.
-- this part of functionality we have by "Select Item Under Mouse Cursor" default action.
But when we use "Select Item Under Mouse Cursor" default action, if mouse cursor isn't over any (selected/unselected) item, it UNSELECTS selected items, so I need one "simple" change into it:
3. If mouse cursor isn't over any (selected/unselected) item, don't unselect (selected) items.
-- this will let us use this script in combo with other actions and won't affect selection (of selected items) when mouse cursor isn't over any item.
Maybe it's verbally hard described, but I need this script very much (I do a lot of actions in such way [under mouse cursor]: Cut, Copy, Paste, Duplicate, Delete, Color Items, Open Key Editor etc.), so I'll provide you any additional info if you'll take this "task" and I'll be very appreciate.
I do have a wish for a script,...
So reaper has ways to automatically build audio routing outs for a multi IO VSTi... right
and then once it is in the TCP we can also use the FX window to build
track to record the MIDI output of that same VSTi...
But reaper builds those MIDI outs in a really stupid way:
It sets them to MIDI All to 1, MIDI All to 2, etc. for 16 tracks
This would almost never be desired and if is was it should only take one track for MIDI All to "X"...
What IS desired is 16 MIDI tracks, set to record MIDI output with the send receives set like this:
Audio=None, MIDI 1 to 1, then MIDI 2 to 2, etc. So that each MIDI track keep the separated MIDI outs from the VSTi correctly.
So I'd love to have a script that would do the following:
We start with some VSTi on one track, and then script builds X number of audio out tracks, named Audio 1, 2, etc. AND it lets the user enter the number of audio out tracks to build AND ALSO lets user decide if they should be stero outs or mono outs... so by user input they could go like
1/2 to 1/2, 3/4 to 1/2, 5/6 to 1/2, etc. [MIDI = None]
OR the user could choose the outs to be mono, like
1-1, 2-2. 3-3, 4-4,etc....
With the help of a few good people on here I have created a LUA script to set tempo, create a 1 bar click (as a count in) then add two empty tracks. Can I add something to auto name the three tracks:- Click, Guitar & Vocals. Any help or advice appreciated.
Can scripts add burried menu items to action list?
hi
Noob question here: I keep finding that I want to add simple actions that are currently not available: For example I wanted to create a button to toggle "Preferences\recording\Always show full track control on armed tracks".
I was considering learning some scripting in order to be able to do this...but then I realised that I don't even know if that kind of thing is possible by scripting!
So it occurred to me to ask here too, if that could be done as a scripting and if anyone might be up to the task. (I suspect something that elaborate would be need someone a bit experienced).
I suspect it might be more of a core UIX thing - but I also suspect that would take longer; and even an approximation of the above would be a game changer.
My frustration is that at the moment only some things are exposed to the actions list - and it is a several step process to make even those actions usable.
My idea would obviously be much faster and more intuitive - If it were possible!
Sorry if I am throwing too much out there at once!
I forgot that I had been wondering if it were possible to make a script to select all record armed tracks and a variant to show only record armed tracks (ability to toggle that too).
I suspect there is an action to disarm all record armed tracks - but if there isn't there should be!
OK going to leave it there - thanks for starting this thread and to all those who are giving of their expertise to the commuity - I'm finally starting to make Reaper my own and loving it!
Please help, I need custom "Select Item Under Mouse Cursor" script.
This script should be like "Select Item Under Mouse Cursor" (NOT "Select Item Under Mouse Cursor (leaving other items selected)"), but when mouse cursor isn't over any (selected/unselected) item WITHOUT UNSELECTING (selected) items.
So, in other words, script should act in such way:
1. If no other items selected, select just one item under cursor.
2. If other items selected, unselect them and select just one item under mouse cursor.
-- this part of functionality we have by "Select Item Under Mouse Cursor" default action.
But when we use "Select Item Under Mouse Cursor" default action, if mouse cursor isn't over any (selected/unselected) item, it UNSELECTS selected items, so I need one "simple" change into it:
3. If mouse cursor isn't over any (selected/unselected) item, don't unselect (selected) items.
-- this will let us use this script in combo with other actions and won't affect selection (of selected items) when mouse cursor isn't over any item.
Maybe it's verbally hard described, but I need this script very much (I do a lot of actions in such way [under mouse cursor]: Cut, Copy, Paste, Duplicate, Delete, Color Items, Open Key Editor etc.), so I'll provide you any additional info if you'll take this "task" and I'll be very appreciate.
Just currious as to if this would replace mouse behaviour for example if you were to click drag in some space between items/tracks to create a region?
If I remember correctly the default behaviour is that it deselects current selection: it would be great if there was the option to change that behaviour.
hi
Noob question here: I keep finding that I want to add simple actions that are currently not available: For example I wanted to create a button to toggle "Preferences\recording\Always show full track control on armed tracks".
I was considering learning some scripting in order to be able to do this...but then I realised that I don't even know if that kind of thing is possible by scripting!
Yes, it's possible.
Very briefly, you need to alter a 'config variable', zoomshowarm in this case.
Maybe open a dedicated thread here in the scripting forum (to not clutter this request thread) asking for help if you're up for learning scripting.
Maybe open a dedicated thread here in the scripting forum (to not clutter this request thread) asking for help if you're up for learning scripting. [/QUOTE]
Have asked if anyone might be able to do an example script that I could then adapt as I add different items buried in menu's etc.
Meanwhile I will check the link you posted and see if I can get my head around that!
Many thanks again
hi
Noob question here: I keep finding that I want to add simple actions that are currently not available: For example I wanted to create a button to toggle "Preferences\recording\Always show full track control on armed tracks".
AFAIK you'd have to use SWS extension, it has a way to set some of those settings, see zoomshowarm
this is just a test,..
Code:
-- Toggle always show full track control panel on armed tracks.lua
function ToolbarButton(enable) -- 0=off, 1=on
local _, _, section_id, command_id = reaper.get_action_context()
reaper.SetToggleCommandState(section_id, command_id, enable)
reaper.RefreshToolbar2(section_id, command_id)
end
function Main()
local val = reaper.SNM_GetIntConfigVar("zoomshowarm", 0)
if not ((val & 1) == 1) then -- enable
reaper.SNM_SetIntConfigVar("zoomshowarm", 1)
ToolbarButton(1)
else -- disable
reaper.SNM_SetIntConfigVar("zoomshowarm", 0)
ToolbarButton(0)
end
end
Main()
reaper.defer(function () end)
Last edited by Edgemeal; 06-25-2020 at 07:45 PM.
Reason: add url to Ultraschall
AFAIK you'd have to use SWS extension, it has a way to set some of those settings, see zoomshowarm
this is just a test,..
Code:
-- Toggle always show full track control panel on armed tracks.lua
function ToolbarButton(enable) -- 0=off, 1=on
local _, _, section_id, command_id = reaper.get_action_context()
reaper.SetToggleCommandState(section_id, command_id, enable)
reaper.RefreshToolbar2(section_id, command_id)
end
function Main()
local val = reaper.SNM_GetIntConfigVar("zoomshowarm", 0)
if not ((val & 1) == 1) then -- enable
reaper.SNM_SetIntConfigVar("zoomshowarm", 1)
ToolbarButton(1)
else -- disable
reaper.SNM_SetIntConfigVar("zoomshowarm", 0)
ToolbarButton(0)
end
end
Main()
reaper.defer(function () end)
First of all - Wow thank you !
I have just tested this and it get's me 100% of my request....and 75% to the behaviour I was aiming at:
It successfully changes the status of zoomshowarm - although it doesn't refresh the status in preferences until you close and then reopen preferences.
I also realise that in this case I was hoping to see the track height respond to the status of this script...(See 2 comments below...found a solution )
Anyway - I really appreciate the input! And I will have a look for any beginner resources in lua that might be relevant for Reaper
Last edited by justcosmic1; 06-26-2020 at 05:20 PM.
I think having just found sws actions to select or only select record armed tracks, plus a whole host of sws zoom options; that I can probably effectively put together a cycle action from those various components - and it looks like there may already be a "shown only record armed" tracks...so that's one less for me to do...
But still going to watch some Lua tutorials which I have funny enough found in French...so I'll have to practive my language skills too!
Hopefully this attachment will be visible which shows the cycle action I created with the provided ZoomShowArm script plus a couple of other actions. https://forum.cockos.com/attachment....5&d=1593216362
It is most useful when you are zoomed all the way out vertically, to quickly toggle between the armed tracks showing/hiding their track controls, with the expected toggle between track heights.
I use a tool bar button hence the need for the toggles.
Very happy with the outcome of this - huge thanks again Edgemeal for providing the script with the core functionality I needed.
Hopefully someone else will find this useful too.
(I have attached the cycle action (.ini)file so it can be imported)
Last edited by justcosmic1; 06-26-2020 at 05:24 PM.
@justcosmic1
Your original request seems solved, nice.
Just some additional remarks:
Quote:
Originally Posted by justcosmic1
although it doesn't refresh the status in preferences until you close and then reopen preferences.
Yes, that's 'normal'.
Quote:
I also realise that in this case I was hoping to see the track height respond to the status of this script...(See 2 comments below...found a solution )
Would just need to add a TrackList_AdjustWindows call in the script to trigger a TCP redraw (isMinor = true means redraw TCP only, otherwise redraw TCP+MCP).
So are you saying I could get the additional behaviour with just that simple addition (Would just need to add a TrackList_AdjustWindows call in the script to trigger a TCP redraw (isMinor = true means redraw TCP only, otherwise redraw TCP+MCP).) and ditch all the bloated cycle action stuff?
If so that appeals to me as it seems a more streamlined and code efficient way to do things (says a guy with 0 coding experience )
I have just edited (and renamed) the script so that it now looks like this:
-- Toggle always show full track control panel on armed tracks.lua
function ToolbarButton(enable) -- 0=off, 1=on
local _, _, section_id, command_id = reaper.get_action_context()
reaper.SetToggleCommandState(section_id, command_id, enable)
reaper.RefreshToolbar2(section_id, command_id)
end
function Main()
local val = reaper.SNM_GetIntConfigVar("zoomshowarm", 0)
if not ((val & 1) == 1) then -- enable
reaper.SNM_SetIntConfigVar("zoomshowarm", 1)
ToolbarButton(1)
else -- disable
reaper.SNM_SetIntConfigVar("zoomshowarm", 0)
ToolbarButton(0)
end
end
function()
reaper.TrackList_AdjustWindows( isMinor=true )
end
Main()
reaper.defer(function () end)
-- Toggle always show full track control panel on armed tracks.lua
function ToolbarButton(enable) -- 0=off, 1=on
local _, _, section_id, command_id = reaper.get_action_context()
reaper.SetToggleCommandState(section_id, command_id, enable)
reaper.RefreshToolbar2(section_id, command_id)
end
function Main()
local val = reaper.SNM_GetIntConfigVar("zoomshowarm", 0)
if not ((val & 1) == 1) then -- enable
reaper.SNM_SetIntConfigVar("zoomshowarm", 1)
ToolbarButton(1)
else -- disable
reaper.SNM_SetIntConfigVar("zoomshowarm", 0)
ToolbarButton(0)
end
reaper.TrackList_AdjustWindows(true) -- true: redraw TCP only, false: redraw TCP+MCP
end
Main()
reaper.defer(function () end)
-- Toggle always show full track control panel on armed tracks.lua
function ToolbarButton(enable) -- 0=off, 1=on
local _, _, section_id, command_id = reaper.get_action_context()
reaper.SetToggleCommandState(section_id, command_id, enable)
reaper.RefreshToolbar2(section_id, command_id)
end
function Main()
local val = reaper.SNM_GetIntConfigVar("zoomshowarm", 0)
if not ((val & 1) == 1) then -- enable
reaper.SNM_SetIntConfigVar("zoomshowarm", 1)
ToolbarButton(1)
else -- disable
reaper.SNM_SetIntConfigVar("zoomshowarm", 0)
ToolbarButton(0)
end
reaper.TrackList_AdjustWindows(true) -- true: redraw TCP only, false: redraw TCP+MCP
end
Main()
reaper.defer(function () end)
Just tested - works almost perfectly! Actually not only is it obviously a much neater way of doing it than my clunky cycle action; it also maintains perfectly the previous level of zoom and that of tracks. My cycle action gradually zoomed out which although may have a future use, was not what I intended.
The only slight anomaly is that I get a message every now and then saying that it's running in the background and asking "Would you like to terminate all instances of this script or launch a new instance".
But I don't see any major problem with that, but thought I'd make mention.
Don't know if this means it needs a tweak or if I just choose either "terminate all instances" or "launch new instance" and click "remember my answer for this script"
Anyway - apart from that it's fantastic - and I find very useful indeed.
Last edited by justcosmic1; 06-27-2020 at 03:16 PM.
I don't know if this is possible:
When you drag the right edge of an item and loop it - to then be able to select, (mute or cut) just one looped section:
Ideally by clicking with a mouse modifier.
If possible independent of the grid.
So far I can't even see any action to place the edit cursor at the start or end of a looped section...
If that's not possible, a script to simply split all the looped repetitions out to separate items could also be useful.
Hope you don't mind me putting in another request so soon - just fine tuning my Reaper installation at the mo and so all this stuff is coming up
Thanks for pointing this out - I did a search but didn't see this.
I suspect that this will be a good enough work around to get the job done and I see there are 2 scripts one keeping the items pooled, the other separating them.
My "dream concept" where you just shift click once on a looped section and it responds like a separate item; well that's maybe more something for the Reaper devs thana a realistic possibility by script - that said, maybe I will mention it to X-Raym incase it can be done from an adaptation of his script.
But for now this should get me close enough.
It will be interesting to see if it is grid line dependent or not...
The only slight anomaly is that I get a message every now and then saying that it's running in the background and asking "Would you like to terminate all instances of this script or launch a new instance".
That can happen if you try to run a script again before the previous run has ended. Next time you see the message, you can enable "remember my answer" and click "Terminate instances" button.
That can happen if you try to run a script again before the previous run has ended. Next time you see the message, you can enable "remember my answer" and click "Terminate instances" button.
Thanks for confirming that! I thought probably that was the option to go for, but good to have it confirmed.
Is it possible to impersonate a keyboard press of a mouse modifier in a script so it can be assigned to a button?
E.g. if you want to be away from the keyboard and you press on screen "ctrl" button, you can then select/unselect with with a click of the mouse whilst the button is toggled on. Or drag item to duplicate etcetera.
(PS I know that a complete onscreen keyboard could achieve this - but I am really looking for toolbar buttons.)
I'm using the Insert Empty item to be able to insert scripts into Reaper, so someone can record and add Audio Description to videos.
I have following combination of actions
Insert empty Item
move cursor to nearest left edge
insert marker
With the S&M Notes window already open, is there a way to have the text cursor be active to start writing text without having to click on the S&M notes window 1st. This would really useful for when adding or selecting of an empty item.
I'm not very good at posting these type of queries, I hope it makes some sense.
Please do ask away if you need clarification on anything.
Select a track : Switch main toolbar to toolbar 1(dedicated for TCP actions)
Select an audio item : Switch main toolbar to toolbar 2(dedicated for audio editing)
Select a midi item : Switch main toolbar to toolbar 3(dedicated for midi editing)
Unselect tracks/items : go back to main toolbar
If it can be done with cycle actions, please do tell me how it is done.
The action "Envelope: Delete all points in time selection" only deletes points in the currently selected envelope and it is not possible to select multiple envelopes. Anyone feels like making a script that deletes all envelope points within a time selection on all envelopes?
The action "Envelope: Delete all points in time selection" only deletes points in the currently selected envelope and it is not possible to select multiple envelopes. Anyone feels like making a script that deletes all envelope points within a time selection on all envelopes?
One custom action I use,..
Code:
Custom: Delete visible envelope points in time selection for selected tracks
SWS/BR: Apply next action to all visible envelopes in selected tracks
Envelope: Delete all points in time selection
Select a track : Switch main toolbar to toolbar 1(dedicated for TCP actions)
Select an audio item : Switch main toolbar to toolbar 2(dedicated for audio editing)
Select a midi item : Switch main toolbar to toolbar 3(dedicated for midi editing)
Unselect tracks/items : go back to main toolbar
I attached a script that should do what you need it to, but their are a few caveats - the biggest one being it doesn't necessarily work. The reason for this is because it seems like there is an underlying issue where Reaper's native action for switching toolbars isn't working, so the only way to change the toolbar is if you right click on it (that I know of).
That being said, I did write some extra code so it will use the "open/close toolbar" actions rather than the "switch" ones, resulting in the toolbar of your choice being a popup rather than just switching the main one at the top of the window. If you do want this feature, all you need to do to get that to work is uncomment the lines (remove the "--") directly underneath where it says "uncomment if you want the toolbar window to be a pop up", and you should probably comment out (add the "--" in front of the line) where it says "switches toolbar" on the line.
I'm going to right a bug up for the broken Reaper actions (I found a post on it dated in 2016 that said they weren't working, so maybe they have been broken since then?) but if someone else can find a way around changing the toolbars without the native actions then that would also be great!
Also, if you want to have the script automatically start running when Reaper starts up you will have to add it by using "SWS/S&M: Set global startup action" if you have SWS or follow these instructions: https://forum.cockos.com/showpost.ph...2&postcount=20