Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Color Themes and Icon Sets

Reply
 
Thread Tools Display Modes
Old 11-25-2020, 04:23 AM   #1
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
Default Theme Adjuster Functionality for ANY theme; no scripting required.

(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.

__________________
The House of White Tie

Last edited by White Tie; 11-25-2020 at 07:05 AM.
White Tie is offline   Reply With Quote
Old 11-25-2020, 06:54 AM   #2
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Location: Berlin
Posts: 2,164
Default

Wow, this is really cool. I'm definitely trying this... Thx!
__________________
Featured scripts: REAPER Update UtilityLil ChordboxGridbox/Adaptive gridMX TunerRS5K LinkMIDI Editor Magic Donate💝: PayPal|ko-fi
FeedTheCat is offline   Reply With Quote
Old 11-25-2020, 08:23 AM   #3
+NRG
Human being with feelings
 
+NRG's Avatar
 
Join Date: Aug 2014
Location: NY
Posts: 791
Default

Awesome!
__________________
“Where words fail, music speaks”
+NRG is offline   Reply With Quote
Old 11-25-2020, 03:25 PM   #4
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Nice one
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 11-26-2020, 02:59 AM   #5
rstockm
Human being with feelings
 
rstockm's Avatar
 
Join Date: May 2012
Location: Berlin, Germany
Posts: 171
Default

This is an excellent approach, much appreciated to hand the power over to custom themes. Good job!
rstockm is offline   Reply With Quote
Old 11-29-2020, 10:41 AM   #6
lucas_LCS
Human being with feelings
 
Join Date: Dec 2015
Posts: 2,100
Default

This is a very cool development, Thanks!
will play with it later when I have some time.

::
__________________
LCS Themes
lucas_LCS is offline   Reply With Quote
Old 12-04-2020, 02:49 PM   #7
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Do I understand right, that I can now customize the v6-theme into my own one and it's still supported by the theme-adjuster as well?

So if I keep i. E. the theme parameters and management for tcp-labellength functionally intact, I can modify it like default v6 in theme-adjuster?
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 12-05-2020, 01:26 AM   #8
+NRG
Human being with feelings
 
+NRG's Avatar
 
Join Date: Aug 2014
Location: NY
Posts: 791
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
Do I understand right, that I can now customize the v6-theme into my own one and it's still supported by the theme-adjuster as well?

So if I keep i. E. the theme parameters and management for tcp-labellength functionally intact, I can modify it like default v6 in theme-adjuster?
Yes, indeed! B)
https://stash.reaper.fm/40714/Screenshot%20TA.png
__________________
“Where words fail, music speaks”
+NRG is offline   Reply With Quote
Old 12-05-2020, 02:05 AM   #9
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
Do I understand right, that I can now customize the v6-theme into my own one ...
No. This has nothing to do with the default V6 theme, to which you could already do what you're asking.

This is a script change that allows a themer with no scripting knowledge to add theme adjuster functionality to their theme, or indeed any theme.
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old 12-05-2020, 06:44 PM   #10
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

@whitetie
I think I was confusing in my question. What I meant was, if I could create a copy of the default-v6-theme, rename it, exchange all images and it would still be compatible with the theme-adjuster.

In my earlier tests, this wasn't possible as the theme-adjuster was complaining that the theme isn't the default v6-one(though I just tested it briefly, I might be wrong about that).


Edit:
I did a quick test now and it seems to work, so modifiying a default-v6 theme allows me now to control i.e. A_tcp_Monitor-theme-parameter, as long as I don't break its mechanics in the rtconfig-file.
At least, as long as the following line is also present in the rtconfig-file:

define_parameter 'defaultV6' 'defaultV6_version' 1

Otherwise the theme-parameters are shown in the new page in the theme-adjuster.

This is nice. This allows modifying a default-theme to look like our Ultraschall-Theme and being editable via Theme-Adjuster as well.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 12-06-2020, 07:37 AM   #11
mikostep
Human being with feelings
 
mikostep's Avatar
 
Join Date: Nov 2019
Posts: 92
Default

@White TIe
Is it possible to make TCP Sendlist to appear in more columns (just like TCP inserts do)?
Here is how would I like to use it - disable ``Show sends in TCP`` and use Sendlist to show sends. Now, what I would like is to have possibility to view Sendlist in more columns. FX inserts can can be viewed this way already.
mikostep is offline   Reply With Quote
Old 12-06-2020, 10:34 AM   #12
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
Default

This is a script change that allows a themer with no scripting knowledge to add theme adjuster functionality to their theme, or indeed any theme.
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old 12-01-2021, 02:41 PM   #13
gapalil001
Human being with feelings
 
gapalil001's Avatar
 
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
Default

is there any way to make non-default based themes make works with this page? it would be great to make some things apply to selected (for example) tracks only, and also place some things
gapalil001 is offline   Reply With Quote
Old 12-01-2021, 04:11 PM   #14
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
Default

Yes, in theory. Its just a script that sends parameters, you can do whatever you like with those parameters in your theme if you really want to. In practice that sounds more trouble than its worth, to me, but sure.
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old 12-02-2021, 10:59 AM   #15
gapalil001
Human being with feelings
 
gapalil001's Avatar
 
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
Default

Quote:
Originally Posted by White Tie View Post
Yes, in theory. Its just a script that sends parameters, you can do whatever you like with those parameters in your theme if you really want to. In practice that sounds more trouble than its worth, to me, but sure.
Interesting. seems i will have a fun to play with it
gapalil001 is offline   Reply With Quote
Old 12-02-2021, 11:07 AM   #16
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
Default

I would think you'd have much more fun if you were to partner with a script maker, if you want to take your theme adjuster to the next level, rather than trying to reuse the default6 specific pages.
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old 12-02-2021, 01:18 PM   #17
gapalil001
Human being with feelings
 
gapalil001's Avatar
 
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
Default

Quote:
Originally Posted by White Tie View Post
I would think you'd have much more fun if you were to partner with a script maker, if you want to take your theme adjuster to the next level, rather than trying to reuse the default6 specific pages.
Yes you are right. but I might be uncomfortable asking strangers to do things that might not be interesting to them. I might be better off learning Lua on my own. i have request for advanced 3rd party theme adjuster, but there is no replies. maybe i'm the only one now who interested in it.

Thank you for answer and hidpi instructions here. works like a miracle in my theme now!
gapalil001 is offline   Reply With Quote
Old 11-17-2023, 03:19 PM   #18
thevisi0nary
Human being with feelings
 
thevisi0nary's Avatar
 
Join Date: Nov 2011
Posts: 531
Default

Hello professor, sorry to resurrect this thread. Is it possible to implement this with with the 3 layouts?
thevisi0nary 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 02:05 AM.


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