|
|
|
12-01-2019, 06:42 PM
|
#1
|
Human being with feelings
Join Date: May 2012
Location: Berlin, Germany
Posts: 171
|
Will there be a tutorial for HiDPI Themes?
With REAPER 6 just around the corner, will there be a documentation/tutorial for *existing* themes on how to uplift them to HiDPI mode? I figure there are new folders "150" and "200" - but I would like to get some advice how things fit together.
I do understand we need to redraw our PNGs, though.
|
|
|
12-05-2019, 01:46 PM
|
#2
|
Human being with feelings
Join Date: May 2012
Location: Berlin, Germany
Posts: 171
|
I'm confused.
Am I the only person interested in this question? Retina/HiDPI may be considered the "killer feature" of REAPER V6, and literally nobody cares how we use this in our themes?
Or do I miss something, it's all well documented and I just can't find it?
@white_tie: even a harsh "get lost, Retina is reserved for the official theme" would be helpful - so we would start to reverse-engineer it. But this is not the REAPER-spirit I'm used to.
|
|
|
12-05-2019, 02:15 PM
|
#3
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
One thing completely undocumented is, how layout_dpi_translate works.
I assume, one can influence that way the theme and dpi-management.
|
|
|
12-10-2019, 05:18 AM
|
#4
|
Human being with feelings
Join Date: May 2012
Location: Berlin, Germany
Posts: 171
|
I'm still confused, but maybe my question was too "high level".
So let's break it down:
I have a wonderful V5 Theme.
I don't want to change a thing, I need no fancy new V6 features, no Theme-Adjuster etc.
BUT I want to replace all of my images wit Retina/HiDPI ones.
What are the steps to achieve this?
Help is very much appreciated.
|
|
|
12-10-2019, 05:32 AM
|
#5
|
Human being with feelings
Join Date: May 2015
Location: Warrington, UK
Posts: 1,444
|
I ain't no "themer" but my best guess is that you will have to update all the old V5 theme images to suit a HiDPI setup.
As an example, if you look at the first PNG file in the root of the theme folder, envcp_arm_off.png it is 60 x 20 px.
In the 200 folder the same PNG file is, as expected, 120 x 40 px. Twice as big.
I would imagine that if you simply scale up your existing V5 PNG files they wouldn't look that great.
Worth a try though, I suppose.
Last edited by synkrotron; 12-30-2019 at 02:33 AM.
Reason: typo
|
|
|
12-10-2019, 04:46 PM
|
#6
|
Human being with feelings
Join Date: May 2012
Location: Berlin, Germany
Posts: 171
|
Quote:
Originally Posted by synkrotron
I ain't no "themer" but my best guess is that you will have to update all the old VF theme images to suit a HiDPI setup.
As an example, if you look at the first PNG file in the root of the theme folder, envcp_arm_off.png it is 60 x 20 px.
In the 200 folder the same PNG file is, as expected, 120 x 40 px. Twice as big.
I would imagine that if you simply scale up your existing V5 PNG files they wouldn't look that great.
Worth a try though, I suppose.
|
That's exactly what I did - it had no effect. Thus something is missing in the rtconfig to "arm" the 150 and 200 folders.
|
|
|
12-11-2019, 04:29 AM
|
#7
|
Pixel Pusher
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
|
For WALTERable areas (MCP/TCP/EnvCP/Transport)
...its all just layouts, same as they ever were from V5 and earlier. Make a layout with images in a folder that are the correct size for your chosen dpi scale, and make the WALTER sized appropriately.
In def6 I made base layout macros at 100%, with a scale mutiplier that could be applied when I ran the macro for each layout, but this was just my choice. You could hard-code your WALTER for each size if you like doing lots of typing
All that remains is to tell Reaper to automatically use your resized layouts when its drawing at what you have decided is the appropriate dpi scale, which you do using layout_dpi_translate.
Code:
; requested scale > use
layout_dpi_translate '50%_A' 1.0 'A'
each line of this maps one layout (that the user has chosen) to another layout, and then uses that layout instead (without bothering the user) should the dpi scale be higher than the defined scale value.
-------------------------------------------------
For non-WALTERable areas
...misc_dpi_translate is used, which takes the form:
Code:
misc_dpi_translate dpi_scale folder
If Reaper finds itself drawing a misc element at a dpi_scale higher than the dpi_scale value, it uses the images in the folder of that name and (though I have yet to test whether it always does this correctly) draws at that scale. So. in the Def6:
Code:
misc_dpi_translate 134 150
misc_dpi_translate 174 200
It starts out drawing using the root images. If it is drawing at a dpi scale higher than 134, it jumps to 150% scale and uses the 150 folder for its images. If the dpi scale is higher than 174, it jumps to 200% scale and uses the 200 folder for its images.
Last edited by White Tie; 06-07-2023 at 04:36 AM.
|
|
|
12-11-2019, 09:16 AM
|
#8
|
Human being with feelings
Join Date: Jan 2019
Location: UK
Posts: 938
|
Considering no V5 theme will have the (rather nice) base macro setup, what steps does one need to take to add that to a non HiDPI theme?
Say all that was necessary was the pan knob being updated, does the whole layout need to be recreated, or just the pan knob section?
|
|
|
12-11-2019, 09:47 AM
|
#9
|
Pixel Pusher
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
|
You'd make a whole new layout, as a sub layout of whatever layout you were starting with, but the only thing you'd change would be the pan knob. Reaper will always (for better or for worse) look further up the hierarchy for missing images or WALTER, even if you don't ask it to
|
|
|
12-11-2019, 02:48 PM
|
#10
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Thank you, WhiteTie. This will help us digging into v6 themeing
|
|
|
12-12-2019, 01:20 AM
|
#11
|
Human being with feelings
Join Date: Jan 2019
Location: UK
Posts: 938
|
Quote:
Originally Posted by White Tie
You'd make a whole new layout, as a sub layout of whatever layout you were starting with, but the only thing you'd change would be the pan knob. Reaper will always (for better or for worse) look further up the hierarchy for missing images or WALTER, even if you don't ask it to
|
Thanks WT - very helpful.
|
|
|
12-29-2019, 03:40 PM
|
#12
|
Human being with feelings
Join Date: May 2012
Location: Berlin, Germany
Posts: 171
|
@white tie:
how can I use a HiDPI-Version of the Logo - transport_bg.png ?
It's part of a "skinnable" section - transport - but there is no "handle" to address it directly given the documentation:
https://www.reaper.fm/sdk/walter/walter.php#layouts
?
|
|
|
12-30-2019, 02:54 AM
|
#13
|
Human being with feelings
Join Date: May 2015
Location: Warrington, UK
Posts: 1,444
|
Quote:
Originally Posted by rstockm
|
The image, transport_bg.png, like many other background images, are not positioned and sized via WALTER code other than the section's size element.
So, in the case of the Transport UI, the line,
set trans.size [1000 100]
is all that is required.
Whereas the image for the Play button, transport_play.png, has to be positioned and sized,
set trans.play [102 3 30 30 0 0 0 0]
|
|
|
12-30-2019, 05:25 AM
|
#14
|
Human being with feelings
Join Date: May 2012
Location: Berlin, Germany
Posts: 171
|
Quote:
Originally Posted by synkrotron
The image, transport_bg.png, like many other background images, are not positioned and sized via WALTER code other than the section's size element.
|
I get it - thank you!
|
|
|
12-31-2019, 01:58 AM
|
#15
|
Human being with feelings
Join Date: May 2015
Location: Warrington, UK
Posts: 1,444
|
Quote:
Originally Posted by rstockm
I get it - thank you!
|
Excellent, thanks for letting me know
|
|
|
09-07-2021, 03:40 PM
|
#16
|
Human being with feelings
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
|
Quote:
Originally Posted by White Tie
All that remains is to tell Reaper to automatically use your resized layouts when its drawing at what you have decided is the appropriate dpi scale, which you do using layout_dpi_translate.
Code:
; requested scale > use
layout_dpi_translate '50%_A' 1.0 'A'
each line of this maps one layout (that the user has chosen) to another layout, and then uses that layout instead (without bothering the user) should the dpi scale be higher than the defined scale value.
-------------------------------------------------
For non-WALTERable areas
...misc_dpi_translate is used, which takes the form:
Code:
misc_dpi_translate dpi_scale folder
If Reaper finds itself drawing a misc element at a dpi_scale higher than the dpi_scale value, it uses the images in the folder of that name and (though I have yet to test whether it always does this correctly) draws at that scale. So. in the Def6:
Code:
misc_dpi_translate 134 150
misc_dpi_translate 174 200
It starts out drawing using the root images. If it is drawing at a dpi scale higher than 134, it jumps to 150% scale and uses the 150 folder for its images. If the dpi scale is higher than 174, it jumps to 200% scale and uses the 200 folder for its images.
|
Thank You, WT! but i can't force it to work in theme that completely different to default 6 theme. is it possible?
|
|
|
09-07-2021, 04:02 PM
|
#17
|
Pixel Pusher
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
|
Yes, there's absolutely nothing technically special about the Def6 theme. All themes are equal.
|
|
|
09-08-2021, 02:00 AM
|
#18
|
Human being with feelings
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
|
Quote:
Originally Posted by White Tie
Yes, there's absolutely nothing technically special about the Def6 theme. All themes are equal.
|
Thank you! I will try! And maybe I’ll finally can unit hidpi and fullhd versions into one.
As I understand, layout dpi translation is working for layouts, but is there any way to translate default layouts?
|
|
|
09-08-2021, 02:12 AM
|
#19
|
Pixel Pusher
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
|
The default layouts are 'nothing' ('') in the requested field of layout_dpi_translate. So for example from the Def6:
Code:
; -- no layout chosen, dpi_translate as A
; requested scale > use
layout_dpi_translate '' 1.34 '150%_A'
layout_dpi_translate '' 1.74 '200%_A'
What that says is : if the user's scale is below 1.34, they'll get the default. If its above that and they will get a different sized layout.
|
|
|
09-08-2021, 03:17 AM
|
#20
|
Human being with feelings
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
|
Quote:
Originally Posted by White Tie
The default layouts are 'nothing' ('') in the requested field of layout_dpi_translate. So for example from the Def6:
Code:
; -- no layout chosen, dpi_translate as A
; requested scale > use
layout_dpi_translate '' 1.34 '150%_A'
layout_dpi_translate '' 1.74 '200%_A'
What that says is : if the user's scale is below 1.34, they'll get the default. If its above that and they will get a different sized layout.
|
thank you! as i understand, i will create sub-layout for default (and other) layout, where all coordinates will be 2x sized? i mean:
Code:
original 2.0 sized
[50 20 18 18 1 0 1 0] [100 40 36 36 1 0 1 0]
and the last question - does it mean that 2x sized images will works right with pink/yellow markers?
[EDITED]
i've just tried right now and all works excellent! you made my day and few nights that is exactly what i've looking for!
Last edited by gapalil001; 09-08-2021 at 03:43 AM.
|
|
|
09-08-2021, 03:44 AM
|
#21
|
Pixel Pusher
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
|
Sort of. Think of it this way: the smallest amount of stuff has changed. You create a normal layout, then you create another layout, which is different. But they're just layouts, same as they always were.
You then use the new functionality (the layout_dpi_translate WALTER) to tell Reaper to switch the layouts depending on the user's display scale.
Now, obviously you're going to make your two layouts different sizes so that all makes sense, but the way Reaper works doesn't demand that. You could make a silly theme where Reaper stayed the same size but changed colour depending on the user's display scale, if you wanted
So try not to think of it as having 2x images. They're just images, same as they always were, yellow/pink same as it always was. What's new is the ability to tell Reaper when to automatically switch layouts.
|
|
|
09-08-2021, 04:20 AM
|
#22
|
Human being with feelings
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
|
Quote:
Originally Posted by White Tie
Sort of. Think of it this way: the smallest amount of stuff has changed. You create a normal layout, then you create another layout, which is different. But they're just layouts, same as they always were.
You then use the new functionality (the layout_dpi_translate WALTER) to tell Reaper to switch the layouts depending on the user's display scale.
Now, obviously you're going to make your two layouts different sizes so that all makes sense, but the way Reaper works doesn't demand that. You could make a silly theme where Reaper stayed the same size but changed colour depending on the user's display scale, if you wanted
So try not to think of it as having 2x images. They're just images, same as they always were, yellow/pink same as it always was. What's new is the ability to tell Reaper when to automatically switch layouts.
|
i've just tried right now and scucsessfully build hidpi translation for transport by your instructions and i'm extremely happy that i see it's working brilliance! there is a whole new page in my theme editing experience! thank you a lot!
|
|
|
09-17-2021, 11:34 AM
|
#23
|
Human being with feelings
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
|
Quote:
Originally Posted by White Tie
So try not to think of it as having 2x images. They're just images, same as they always were, yellow/pink same as it always was. What's new is the ability to tell Reaper when to automatically switch layouts.
|
A lot of my DPI layout are ready and works really good. it's a pure magic for me now. also i have script that can process WALTER to replace coordinates with 2x sized (but still need some manual changes) I would share later.
but at the beginning i meet very strange undesired behavior - i have hidpi versions of meter_mcp_ol.png and meter_tcp_ol.png (and i guess it touches all meter overlays), they draws fine by yellow markers, but scaled 2x in pink markers area, like how it works for themes that non-ready for hidpi.
it's very important for me because my overlays make meters rounded
i know the right way are exist, i'll just need fo find it
|
|
|
09-19-2021, 07:12 PM
|
#24
|
Human being with feelings
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
|
Quote:
Originally Posted by White Tie
In def6 I made base layout macros at 100%, with a scale mutiplier that could be applied when I ran the macro for each layout, but this was just my choice. You could hard-code your WALTER for each size if you like doing lots of typing
|
I’ve tried to do the same to my theme, using macro like this:
Code:
set tcp.size * tcp.size [2 2 2 2]
set tcp.mute * tcp.mute [2 2 2 2 1 1 1 1]
set tcp.solo * tcp.solo [2 2 2 2 1 1 1 1]
etc..
All was fine before I’ve compress track panel height. I notice that elements hides 2 times late than i need, so I was forced back to normal hidpi layout. Is there any idea how to force multiplier macro works right?
|
|
|
09-20-2021, 01:34 AM
|
#25
|
Pixel Pusher
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
|
You also need to scale the breakpoints in your comparisons. So, for example
Code:
set testThing h<10 [coordinates 1] [coordinates 2]
can be rewritten as:
Code:
set myBreakpoint 10
set testThing h<myBreakpoint{0} [coordinates 1] [coordinates 2]
...and then you can scale the value of 'myBreakpoint' with your HiDPI scaling macro, just like everything else.
|
|
|
09-20-2021, 11:42 AM
|
#26
|
Human being with feelings
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
|
Quote:
Originally Posted by White Tie
You also need to scale the breakpoints in your comparisons. So, for example
Code:
set testThing h<10 [coordinates 1] [coordinates 2]
can be rewritten as:
Code:
set myBreakpoint 10
set testThing h<myBreakpoint{0} [coordinates 1] [coordinates 2]
...and then you can scale the value of 'myBreakpoint' with your HiDPI scaling macro, just like everything else.
|
thank You! will it work between strings? sounds disappointing, but i'll try to explain:
Code:
layout ""
set myBreakpoint 10
set testThing h<myBreakpoint{0} [coordinates 1] [coordinates 2]
endlayout
macro MultiplyHidpi
set myBreakpoint 20
set testThing * testThing [2 2 2 2]
endmacro
so, the question is: will "testThing" use "myBreakpoint" changed in macro, or it will use brealpoints from default layout?
|
|
|
09-20-2021, 02:42 PM
|
#27
|
Pixel Pusher
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
|
No, in that example it would not re-evaluate testThing within the macro. Do it the other way round:
Code:
macro drawTestThing HiDPIscale
set myBreakpoint * 10 HiDPIscale
set testThing * h<myBreakpoint{0} [coordinates 1] [coordinates 2] HiDPIscale
endmacro
layout ""
drawTestThing 1
endlayout
|
|
|
09-20-2021, 02:59 PM
|
#28
|
Human being with feelings
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
|
Quote:
Originally Posted by White Tie
No, in that example it would not re-evaluate testThing within the macro. Do it the other way round:
Code:
macro drawTestThing HiDPIscale
set myBreakpoint * 10 HiDPIscale
set testThing * h<myBreakpoint{0} [coordinates 1] [coordinates 2] HiDPIscale
endmacro
layout ""
drawTestThing 1
endlayout
|
that's cool! thank You a lot!
|
|
|
09-25-2021, 07:02 AM
|
#29
|
Human being with feelings
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
|
Quote:
Originally Posted by White Tie
No, in that example it would not re-evaluate testThing within the macro. Do it the other way round:
Code:
macro drawTestThing HiDPIscale
set myBreakpoint * 10 HiDPIscale
set testThing * h<myBreakpoint{0} [coordinates 1] [coordinates 2] HiDPIscale
endmacro
layout ""
drawTestThing 1
endlayout
|
i can't understand what "HiDPIscale" actually does in "macro" string.I know that the first word after "macro" means macro name. but how to use the next one? and what it does?
|
|
|
09-25-2021, 07:35 AM
|
#30
|
Pixel Pusher
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
|
It goes macro name parameter1 paramater2 etc... as many parameters as you need. You make a parameter by using its name (HiDPIscale in this case, could be anything). Then, when you use the macro you also provide a value for any parameters, and those values get used in the macro.
Code:
macro myMacro myParam1 myParam2
set testValue + myParam1 myParam2
endmacro
is a macro that would create 'testValue' and set it to the sum of two parameters. So then
would create 'testValue', a variable with a value of 21.
From the WALTER sdk:
Code:
macro (REAPER 5.0+)
Defines a macro with any number of parameters which can be used later. Example:
macro setall dest src
set dest [src src src src src src src src]
set master.##dest dest
endmacro
setall tcp.mute 1 ; set tcp.mute [1 1 1 1 1 1 1], set master.tcp.mute tcp.mute
Note that using ## in a macro allows the parameter to be concatenated with another named string.
|
|
|
09-25-2021, 10:50 AM
|
#31
|
Human being with feelings
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
|
Quote:
Originally Posted by White Tie
It goes macro name parameter1 paramater2 etc... as many parameters as you need. You make a parameter by using its name (HiDPIscale in this case, could be anything). Then, when you use the macro you also provide a value for any parameters, and those values get used in the macro.
Code:
macro myMacro myParam1 myParam2
set testValue + myParam1 myParam2
endmacro
|
Thank You! i've read WALTER SDK a lot of times, but some things was mystical for me, i hope macro was the last one.
as i understand, will it works this way?
Code:
macro RecarmButton dest1 dest2
set recarm_button [20 15 20 20 0 0 0 0] [35 15 20 20 0 0 0 0]
endmacro
Layout ""
RecarmButton
set tcp.recarm + recarm_button h<50 dest1 dest2
endlayout
Last edited by gapalil001; 09-25-2021 at 11:36 AM.
|
|
|
09-25-2021, 12:45 PM
|
#32
|
Pixel Pusher
Join Date: Mar 2007
Location: Blighty
Posts: 4,950
|
No, that's not it at all. Macros don't do anything, they are just a way of tidying up code of things you might otherwise have to type over and over. They are a general programming thing, and not Reaper or WALTER specific.
You could write, longhand, all of your layouts for all of your HiDPI scales. This would work fine. Or you could write one layout, with a variable in it called HiDPIscale.
Code:
macro aWholeLayout HiDPIscale
set thing1 * HiDPIscale [coordinates]
set thing2 * HiDPIscale [coordinates]
set thing3 * HiDPIscale [coordinates]
(etc etc)
endmacro
this wouldn't actually do anything in Reaper, until you called the macro:
would tell Reaper to draw your entire layout, with all the coordinates multiplied by 1.
would tell Reaper to draw your entire layout, with all the coordinates multiplied by 2.
So, wherever you put 'HiDPIscale' in your macro would be replaced by the value you give for HiDPIscale when running the macro.
|
|
|
09-25-2021, 02:29 PM
|
#33
|
Human being with feelings
Join Date: May 2016
Location: Kyiv, Ukraine
Posts: 544
|
Quote:
Originally Posted by White Tie
No, that's not it at all. Macros don't do anything, they are just a way of tidying up code of things you might otherwise have to type over and over. They are a general programming thing, and not Reaper or WALTER specific.
You could write, longhand, all of your layouts for all of your HiDPI scales. This would work fine. Or you could write one layout, with a variable in it called HiDPIscale.
Code:
macro aWholeLayout HiDPIscale
set thing1 * HiDPIscale [coordinates]
set thing2 * HiDPIscale [coordinates]
set thing3 * HiDPIscale [coordinates]
(etc etc)
endmacro
this wouldn't actually do anything in Reaper, until you called the macro:
would tell Reaper to draw your entire layout, with all the coordinates multiplied by 1.
would tell Reaper to draw your entire layout, with all the coordinates multiplied by 2.
So, wherever you put 'HiDPIscale' in your macro would be replaced by the value you give for HiDPIscale when running the macro.
|
seems like i start to understand. but everything rests on my dementia. i think it's time to run it by trial and error method. thanks for huge help! i respects this a lot!
|
|
|
10-26-2022, 04:39 AM
|
#34
|
Human being with feelings
Join Date: Aug 2022
Posts: 717
|
Quote:
Originally Posted by White Tie
What that says is : if the user's scale is below 1.34, they'll get the default. If its above that and they will get a different sized layout.
|
Unfortunately, this makes Reaper look rather crappy when using a 1.33 scaling. On my screen 1.5 is too big, 1.0 is too small, so I aimed for 1.33, but it sucks. It should really use downscaling for 150% up until 1.20 or so, until a proper vector-based UI is developed (hopefully soon).
|
|
|
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 06:13 PM.
|