Old 12-13-2019, 10:49 AM   #1
estux
Human being with feelings
 
Join Date: Sep 2018
Posts: 51
Default The adjuster -> theme comunication question

I am trying to add more step sizes and/or customize the sizes of some of the elements customizing the theme adjuster.

I have seen, that the sizes used in the theme, are hardcoded as labels in the theme adjuster, e.g.


paramPair tcp_VolSize 3 20 40 70 100 130 160 190

tcpVolVals = {'KNOB',40,70,100,130,160,190}


I have tried changing both lists + the paramPair macro, but it didn't work. Who controls the param index used by the theme?

How does this work?

EDIT: wrong title, it should say Theme adjuster -> theme..... :/
estux is offline   Reply With Quote
Old 12-13-2019, 11:21 AM   #2
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 2,755
Default

The '...vals' in the script are just text, something to get written in the text readouts of the script UI. The paramPair is indeed the values you want to change, so if it wasn't working that'll probably just be one of those simple 'forgot to reload the theme' or 'was doing the wrong layout' errors. Been there

----------------------

A bit of background for anyone who's interested:

The theme communicates with the script using 'define_parameter', which was described in the changelog as follows:
Code:
# WALTER: support define_parameter scalar_name 'description' default_value min_value max_value
I chose to give all my parameters indexes, then match an incoming parameter value for each index to a walter-useful scalar value using the macro 'paramPair' as estux rightly noticed.
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old Yesterday, 01:48 AM   #3
estux
Human being with feelings
 
Join Date: Sep 2018
Posts: 51
Default

Thanks for the reply.

How the is the length of those lists controlled? can I add more elements to them?

I tried modifying both the script and the theme to add more values with no luck, I modified the lists and the paramPair macro.
estux is offline   Reply With Quote
Old Yesterday, 05:58 AM   #4
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 2,755
Default

You can, as far as I'm aware, make define_parameter parameters as long as you like.

I chunked my parameters into discrete values using my paramPair macro, because I didn't want to make users on low powered systems have to deal with a rapid sequence of redraw commands when taking a setting from reasonable value A to reasonable value B (when the script tells Reaper to redraw the theme, it redraws everything. Every time.) ...so be aware this is a me/v6 thing we are discussing, not a Reaper thing.

My paramPair macro only does 10 pairings, because that's ...er... what I decided seemed about right. If you wanted to add one new value, as long as that wouldn't make it more than 10 total, you would need to:
  1. Increase by 1 the max setting in the indexParams listing for that param.
  2. Add a new value to the paramPair instruction
  3. Add a new value to the Vals listing in the script, so the user had something to choose.
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old Yesterday, 09:22 AM   #5
estux
Human being with feelings
 
Join Date: Sep 2018
Posts: 51
Default

Got it, thanks!
estux 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 11:20 PM.


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