(Requires Reaper v6.16 or newer.)
Previously, any theme can be controlled by a script, but to do so required you to understand both theming and how to write a simple script. If you tried to run the Default 6 Theme Adjuster while using the wrong theme, it would show you a message saying you were using the wrong theme.
The Default 6 Theme Adjuster now supports ANY theme.
Two of its windows control Reaper settings rather than theme elements, so you get those; Global Settings and Custom Colors.
...but it will also show this blank page titled with the name of the theme:
Into this page, the theme adjuster will
automatically add up to 10 slider controls for any parameters that are added to the rtconfig of the theme. These behave exactly like the preset scalar variables we've been using all these years, but now
you can make your own scalar variables, and the theme adjuster will automatically create up to 10 sliders to control them, zero scripting required and no new script for your users to install and configure. If you understand how to use things like:
Code:
w>10
?recarm
!track_selected
...then you know enough to start adding them adjuster functionality to your theme!
Its a two step process inside your rtconfig.txt file.
Step 1 - create a parameter
The syntax is define_parameter scalar_name 'description' default_value min_value max_value
First we need to do a little housekeeping. The theme adjuster always uses the very first parameter to do theme version checking, which doesn't matter for us and won't be used, but we need to stick something there, so I add this:
Code:
define_parameter WT_Imperial_adjustable 'WT_Imperial adjustable_version' 1
Okay, on with the good stuff: I'm going to create a parameter called myParam1, I'm going to give it a description 'doStuff', a default value of 0, a min value of 0 and a max value of 1. I put this near the top (I like my global bits and pieces there) of my rtconfig :
Code:
define_parameter WT_Imperial_adjustable 'WT_Imperial adjustable_version' 1
define_parameter myparam1 'doStuff' 0 0 1
Save the rtconfig, refresh the theme, flip pages on the theme adjuster to make the script check its settings, and there it is...
and that's all there is to it. Changing that slider will now send parameter values called myparam1 to the theme, and save the last set value to the user's reaper-themeconfig.ini file so it is remembered from session to session. Check that is indeed working, for me that is a new section in the ini file that looks like this:
Code:
[WT_Imperial]
myparam1=0
Step 2 - use your parameter in WALTER
Previously you would have been using scalar variable checks like w>10 to make layout changes; if the panel width is greater than 10 do
this otherwise do
that. You now have a new scalar variable that works the same way, that the user can adjust. Now you just need to decide what to use it for! This opens up all kinds of exciting possibilities for how you design and plan out the way your theme works, I'm just going to do something simple and use it to make the track name colour change.
Underneath my standard layout WALTER I add a second line for tcp.label.color, saying that if myparam1 is greater than zero to make it red.
Code:
set tcp.label.color myparam1>0 [255 0 0]
and there it is...
Step 3 - there is no step 3
That's all there is to it. Now its just WALTER, and so like everything else its some very simple things that you repeat a lot to potentially create very complex things
You can add another 9 parameters and make them do whatever you want.
If you want more than that or if you want controls that aren't just sliders, that would need a custom script. Perhaps ask nicely in the script sub-forum; to someone who understands scripting then that side of it is pretty simple stuff.
I'm going to illustrate one more point; that scalar values can be used directly. I'll make a second parameter:
Code:
define_parameter WT_Imperial_adjustable 'WT_Imperial adjustable_version' 1
define_parameter myparam1 'doStuff' 0 0 1
define_parameter myparam2 'redness' 0 0 255
and use that directly in my tcp.trackidx.color:
Code:
set tcp.trackidx.color [myparam2 0 0]
If you'd like to see a slightly more complicated example, making easy use of functionality that was already built into the theme, the default
5 theme now has some 'adjustable' layouts, which use the theme adjuster to directly change settings that the user previously would have needed to edit directly in the 'USER : mess with these' section of the rtconfig.txt.