Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 04-12-2018, 12:03 AM   #1
semikid
Human being with feelings
 
Join Date: May 2015
Location: Los Angeles, CA
Posts: 326
Default Solo or split (depending on focus) custom action request.

I really enjoy how "m" is set to mute item or track (depending on focus).
Is there a way to do this for soloing and splitting audio/items as well? And or Solo or split (depending on focus)?



Does this belong in the script requests?
semikid is offline   Reply With Quote
Old 04-12-2018, 05:10 PM   #2
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Quote:
Originally Posted by semikid View Post
Does this belong in the script requests?
Probably. There's 3 contexts. Envelope is the other one. What action should it do when Envelope has focus?

Here's an example.

Code:
-- Do action based on context example.lua

gcc = reaper.GetCursorContext2(true)

if gcc == 0 then
  reaper.Main_OnCommand(40281,0)-- Track: Solo/unsolo tracks
elseif gcc == 1 then
  reaper.Main_OnCommand(40759,0)-- Item: Split items at edit cursor (select right)
elseif gcc == 2 then
  reaper.Main_OnCommand(42087,0)-- Envelope: Split automation items
end

function NoUndo() end
reaper.defer(NoUndo)
You can change the number after Main_OnCommand. Right click the action in the Action List. To use an SWS action or script, NamedCommandLookup is needed, to get that number which varies between different Reapers. A string of characters appears in the Action List instead of the number. Example:

Code:
reaper.Main_OnCommand(reaper.NamedCommandLookup("_XENAKIOS_SELNEXTTRACK"),0)-- Xenakios/SWS: Select next tracks
stuff which follows -- is non functional as code, on that line. A "comment".

Last edited by FnA; 04-12-2018 at 06:43 PM.
FnA is offline   Reply With Quote
Old 04-16-2018, 10:43 PM   #3
semikid
Human being with feelings
 
Join Date: May 2015
Location: Los Angeles, CA
Posts: 326
Default

Worked like a charm. Thank you so much for your help!
semikid is offline   Reply With Quote
Old 04-17-2018, 07:12 PM   #4
D Rocks
Human being with feelings
 
Join Date: Dec 2017
Location: Quebec, Canada
Posts: 550
Default

Wow... im really impressed how helpful people are in here.. after 3 weeks still am very glad I joined... fna thanks for being so helpful like that!
__________________
Alex | www.drocksrecords.com | Thanks for REAPER
D Rocks is offline   Reply With Quote
Old 04-17-2018, 08:42 PM   #5
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,570
Default

excellent post FNA, that's something I've been thinking of but didn't know it was so simple.
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 04-18-2018, 02:22 AM   #6
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Thanks guys. Warm fuzzy feeling. I notice a bit of FR activity that it might provide partial relief for, but sometimes people don't like it when you respond with less than literal satisfaction.

Along those lines, (still there, D Rocks?) for:
https://forum.cockos.com/showthread.php?t=205622
There is a trick. You can assign actions to a shortcut which contains either Control or Alt or both. These will then pass through some various windows unless the window already uses that shortcut, like Control+S in the fx window or various midi editor assignments. Not sure what that translates to on mac.
FnA is offline   Reply With Quote
Old 04-18-2018, 03:49 AM   #7
D Rocks
Human being with feelings
 
Join Date: Dec 2017
Location: Quebec, Canada
Posts: 550
Default

Oh!! Interesting man so this means that Reaper understands Control and Alt as something destined to the Main window focus?

Ill try it to see if for the time being there are some ahortcuts that could be using Control and or Alt

Thanks again this is good
__________________
Alex | www.drocksrecords.com | Thanks for REAPER
D Rocks is offline   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 05:33 PM.


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