|
|
|
03-19-2024, 01:04 PM
|
#1
|
Human being with feelings
Join Date: Jun 2006
Location: UK
Posts: 3,210
|
A script to toggle 'Anticipative FX Processing' ?
Hi All,
anybody know of a script or action to toggle "Anticipative FX Processing"
Subz
|
|
|
03-19-2024, 03:45 PM
|
#2
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
"Allow anticipative FX processing when rendering (better multiprocessing)"
Code:
-- Meo-Ada Mespotine 2024 - licensed under MIT-license
-- toggles "Allow anticipative FX processing when rendering (better multiprocessing)"-setting
value = reaper.SNM_GetIntConfigVar("workrender", -9)
if value&1024==0 then
value=value+1024
elseif value&1024==1024 then
value=value-1024
end
value = reaper.SNM_SetIntConfigVar("workrender", value)
or "Anticipative FX processing - superior multiprocessing and lower interface latencies"?
Code:
-- Meo-Ada Mespotine 2024 - licensed under MIT-license
-- toggles "Anticipative FX processing - superior multiprocessing and lower interface latencies"-setting
value = reaper.SNM_GetIntConfigVar("workrender", -9)
if value&1==0 then
value=value+1
elseif value&1==1 then
value=value-1
end
value = reaper.SNM_SetIntConfigVar("workrender", value)
Last edited by Meo-Ada Mespotine; 03-19-2024 at 03:57 PM.
|
|
|
03-19-2024, 08:53 PM
|
#3
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
|
Can be greatly simplified:
Code:
local workrender = reaper.SNM_GetIntConfigVar('workrender', 0)
reaper.SNM_SetIntConfigVar("workrender", workrender ~ 1024)
|
|
|
03-20-2024, 11:41 AM
|
#4
|
Human being with feelings
Join Date: Jun 2006
Location: UK
Posts: 3,210
|
Hi and Thank You!!
What format do I save these as? And where do I put them?
Scripts? Then load as new script?
I did try them as a new script, but they did not seem to work,
Subz
|
|
|
03-20-2024, 11:45 AM
|
#5
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
|
Action List > ReaScript: New > Something.lua. Also you'll only see it change in Preferences the next time the window is open.
|
|
|
03-20-2024, 12:19 PM
|
#6
|
Human being with feelings
Join Date: Jun 2006
Location: UK
Posts: 3,210
|
Quote:
"Anticipative FX processing - superior multiprocessing and lower interface latencies"?
Code:
-- Meo-Ada Mespotine 2024 - licensed under MIT-license
-- toggles "Anticipative FX processing - superior multiprocessing and lower interface latencies"-setting
value = reaper.SNM_GetIntConfigVar("workrender", -9)
if value&1==0 then
value=value+1
elseif value&1==1 then
value=value-1
end
value = reaper.SNM_SetIntConfigVar("workrender", value)
|
This works perfect!
Thank You!
Is there a way I can get the toolbar icon to 'animate' when it's disabled?
Subz
|
|
|
03-20-2024, 12:21 PM
|
#7
|
Human being with feelings
Join Date: Jun 2006
Location: UK
Posts: 3,210
|
Quote:
Originally Posted by cfillion
Can be greatly simplified:
Code:
local workrender = reaper.SNM_GetIntConfigVar('workrender', 0)
reaper.SNM_SetIntConfigVar("workrender", workrender ~ 1024)
|
Thanks for the advice!
This script doesn't seem to work?!
The one posted above is doing the job though!
Thank You!
Subz
|
|
|
03-20-2024, 01:38 PM
|
#8
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
|
It's for "Allow anticipative FX processing when rendering (better multiprocessing)". Replace 1024 by 1 to be like the other one.
|
|
|
03-20-2024, 03:22 PM
|
#9
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Quote:
Originally Posted by Subz
This works perfect!
Thank You!
Is there a way I can get the toolbar icon to 'animate' when it's disabled?
Subz
|
This needs to be set in the menu-editor for the toolbar-icon. You need to choose a toolbar-icon, that includes an animation.
But can't help you much with that, since I haven't had the time to really look into toolbar-animations yet.
|
|
|
03-20-2024, 03:23 PM
|
#10
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Quote:
Originally Posted by cfillion
Can be greatly simplified:
Code:
local workrender = reaper.SNM_GetIntConfigVar('workrender', 0)
reaper.SNM_SetIntConfigVar("workrender", workrender ~ 1024)
|
What's the descriptive term for ~ you used in the code?
|
|
|
03-20-2024, 09:47 PM
|
#11
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
|
XOR
|
|
|
03-21-2024, 03:55 AM
|
#12
|
Human being with feelings
Join Date: Jun 2006
Location: UK
Posts: 3,210
|
Quote:
Originally Posted by Meo-Ada Mespotine
This needs to be set in the menu-editor for the toolbar-icon. You need to choose a toolbar-icon, that includes an animation.
But can't help you much with that, since I haven't had the time to really look into toolbar-animations yet.
|
I have set it up the same way my other animated buttons are set up,
I notice some actions just don't report the toggle state,
Subz
|
|
|
03-21-2024, 02:30 PM
|
#13
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Ah, got it.
This should work:
Code:
-- Meo-Ada Mespotine 2024 - licensed under MIT-license
-- toggles "Anticipative FX processing - superior multiprocessing and lower interface latencies"-setting
local a,b,c,d = reaper.get_action_context()
value = reaper.SNM_GetIntConfigVar("workrender", -9)
if value&1==0 then
value=value+1
reaper.SetToggleCommandState(d, 1)
elseif value&1==1 then
value=value-1
reaper.SetToggleCommandState(d, 1)
end
value = reaper.SNM_SetIntConfigVar("workrender", value)
You might need to toggle it once after Reaper start for the toggle state to be correct.
It's possible to correctly set the toggle state at Reaper startup automatically, but for this, I need the action-command-id of your action. You can get it by right-clicking the action in the actionlist and selecting "Copy selected action command id".
Paste this in here as reply and I give you instructions on how to set it up.
@cfillion
Thnx. I wonder, if this could be used for setting toggle-state as well. But probably only by doing something like:
Code:
reaper.SetToggleCommandID(cmdid, reaper.SNM_GetIntConfigVar("workrender", -9)&1)
or something in this case.
|
|
|
03-21-2024, 03:12 PM
|
#14
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
|
Quote:
Originally Posted by Meo-Ada Mespotine
Thnx. I wonder, if this could be used for setting toggle-state as well. But probably only by doing something like:
Code:
reaper.SetToggleCommandID(cmdid, reaper.SNM_GetIntConfigVar("workrender", -9)&1)
or something in this case.
|
Yeah.
Code:
local command_id = select(5, reaper.get_action_context())
local workrender = reaper.SNM_GetIntConfigVar('workrender', 0) ~ 1
reaper.SNM_SetIntConfigVar('workrender', workrender)
reaper.SetToggleCommandState(0, command_id, workrender & 1)
Last edited by cfillion; 03-23-2024 at 12:59 AM.
|
|
|
03-22-2024, 10:48 PM
|
#15
|
Human being with feelings
Join Date: Jun 2006
Location: UK
Posts: 3,210
|
Quote:
Originally Posted by Meo-Ada Mespotine
Ah, got it.
This should work:
Code:
-- Meo-Ada Mespotine 2024 - licensed under MIT-license
-- toggles "Anticipative FX processing - superior multiprocessing and lower interface latencies"-setting
local a,b,c,d = reaper.get_action_context()
value = reaper.SNM_GetIntConfigVar("workrender", -9)
if value&1==0 then
value=value+1
reaper.SetToggleCommandState(d, 1)
elseif value&1==1 then
value=value-1
reaper.SetToggleCommandState(d, 1)
end
value = reaper.SNM_SetIntConfigVar("workrender", value)
|
Hi & thanks for the help!
This gives me
Toggle Anticipative FX Processing.lua:12: bad argument #3 to 'SetToggleCommandState' (number expected, got no value)
Subz
EDIT: the ID of the script that I currently use and edit for this action is: _RS56f757e5f60c78f4fb698bd048d9390c6664ec18
Last edited by Subz; 03-23-2024 at 07:04 AM.
|
|
|
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:02 AM.
|