Old 04-18-2016, 05:23 AM   #1
16bit
Human being with feelings
 
Join Date: Apr 2016
Location: England-land
Posts: 18
Default Force mcp background non-scaling?

Hi all,
This is my first post, so apologies in case I make any faux pas.

I have conducted a few general 'net searches looking for this information but haven't come up with anything. I only found a solution after reverse engineering an existing theme.

What I am trying to achieve is a non-scaling master mcp panel, with full graduations for the meter scale.
Using the mcp_mainbg.png graphic and sticking pink lines all around the outside doesn't work, as once the Reaper program window is reduced below a certain vertical height, the pink lines are ignored and the meter scale gets squished.

The solution I have found, from Albert-C's theme ProTools-x1 is to use the mcp_main_namebg.png file. This is normally used as the background for the track name, in this case 'MASTER'. It doesn't scale, but crops off the bottom if the program window is reduced below specified limits.

I guess my question is, is this the only way round of trying to achieve what I want? It seems a bit of a 'hack' for want of a better term.


Reaper v4.76/x64
Windows 7 Pro x64

Last edited by 16bit; 04-18-2016 at 01:45 PM.
16bit is offline   Reply With Quote
Old 04-18-2016, 07:17 PM   #2
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 5,941
Default

The way Reaper handles minimum heights in the MCP is a bit weird, and/or buggy. See here: http://forum.cockos.com/showthread.php?p=1660816
Lokasenna is offline   Reply With Quote
Old 04-19-2016, 01:33 AM   #3
16bit
Human being with feelings
 
Join Date: Apr 2016
Location: England-land
Posts: 18
Default

Thanks for the link.

Indeed, sorry, I forget to mention that I did use the 'set master.mcp.size' feature found on that very same url you posted!

It still didn't stop the panel background image from being resized/scaled, even though I'd encased the thing in pink lines.

The only way I have been able to force a non-scaling panel for the mcp is to use the mcp_namebg.png file, which is an element and so wont be scaled, but instead just cropped.

I also anchored pretty much everything as [0 1 0 1] so both y-edges of objects are stuck to the bottom of the panel.

I also had to use 'front master.mcp.label master.mcp.volume.label master.mcp.volume' as these two elements want to sit behind the mcp_namebg.png file.

The end result is that this is all working as expected, it's just that I wasn't sure if I had missed something with the background image, and it's behaviour. Knowing there is potential for issue there, makes me feel better about the way I am doing things. I am no stranger to 'hacking' stuff to make it work for me - c'mon I use Windows!

Cheers!
16bit is offline   Reply With Quote
Old 04-19-2016, 02:37 AM   #4
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 2,492
Default

Quote:
Originally Posted by 16bit View Post
What I am trying to achieve is a non-scaling master mcp panel, with full graduations for the meter scale. program window is reduced below a certain vertical height, the pink lines are ignored and the meter scale gets squished.
What you can't do is use WALTER to 100% force the window not to resize. (And if you could, users would hate it). Every WALTER-able element can resize, or be told not to resize. If you want to do fader graduations, mcp_volbg would be prime candidate.

Pink lines are how you tell Reaper which bit of an image is okay to squash, that being the area not covered by pink lines. If you cover the whole thing with pink and then set your WALTER to resize the element, then you're not providing any 'safe squash' area. So it'll squash the lot.

Wherever possible, keep details off the panel backgrounds (mcp_bg in this case) so that you can use each element's WALTER to control its resizing behaviour. For the panel background itself, use a combination of providing a generous non-pink area for squashing, and then the 4th value of your mcp.size in WALTER to change to panel cropping when the height is below the lowest you can get your design to work.

REAPER is inherently resize-ey. Making static, non squashy designs makes for pleasing screenshots, but is short-changing your users. I acknowledge that I take the blame for this; I should have put more effort into Imperial's WALTER.

Quote:
Originally Posted by Lokasenna View Post
The way Reaper handles minimum heights in the MCP is a bit weird, and/or buggy.
I don't think you've understood it, have a read of my reply in that thread.
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old 04-19-2016, 03:11 AM   #5
16bit
Human being with feelings
 
Join Date: Apr 2016
Location: England-land
Posts: 18
Default

Spot on White Tie!

"If you cover the whole thing with pink...it'll squash the lot."

Exactly the behaviour I am experiencing, and it makes perfect sense with what you have said before in other threads, now that I think about it a bit more. Reaper and WALTER will not allow an enforceable minimum program window size, and there's plenty of darn good reasons for that. That being the case, it goes that panels inside the program window will also not force a particular size, it's all gotta shrink somehow.

I would have been happy if the panel background would have been cropped off at the bottom, but it doesn't do that. I appreciate what you are saying with regards to making things better scalable in the theme design so that it applies to any screen size user. However, the way I am making the theme means that cropping off the bottom does still work just fine, and hampers nothing right down to 600 pixels vertical resolution (netbook style). It works just fine without any cropping down to 784 pixels anyway, so it's not as much of a problem as some of the glorious themes, such as your own Imperial theme, which is meant for bigger screen resolutions.

It's only the master mcp that I am really placing any restrictions on. The track mcp can be made pretty darn small without issue. After all, I don't feel the need to much for nice meter graduations on individual tracks, so much as requiring it by necessity on the master.

I wasn't so fussed about fader graduations, although, yes mcp_volbg.png would be the image to edit for this. Setting prefs for faders to work at 1dB, allows me to use the meter graduations on the theme I am making.

In a nutshell I am sort of reformatting TT DR meter as a master mcp. I can't add the 'Dynamic Range' metering graphic nor can I swap peak/RMS meters around, but the graduation scale is rather nice, marking every 3dB with 1dB graduations between.
I've drawn a few extra markers down to -62 dBFS (Reaper's default), and have customised and calibrated the 'meter_strip_v.png' and 'meter_strip_v_rms.png' graphics for my own taste, with markers around the -18 dBFS RMS area for my Mastering preference (along with -14 and -20 dBFS as per K-14/K-20).
It's all just an attempt to make my life easier rather than making a very elaborately crafted and beautified theme.


I'll take another look at 'mcp_mainbg.png' and see if I cannot add non-pink-bordered area above the 784 pixel graphic. This area can them be scaled as Reaper sees fit, and cropped off when the program window reduces to 784 pixels. When reduced further, it should then crop from the bottom. I guess if the background had WALTER it would be [0 0 1 1], whereas the 'mcp_main_namebg.png' is customisable and can be set to [0 1 0 1] forcing a lock to the bottom in all cases behaviour.

EDIT:
Darn. I just created a 1202 px high 'mcp_mainbg.png' with 18% grey above the 785 px graphic. The grey area had no pink lines at all, except for half of the x-axis along the top (matching the other half along the bottom). I set the 'master.mcp.size' to [130 1200 130 784], so I should get cropping below 784, but everything should remain 1:1 between that 1200 px. What happened was partly as predicted. The grey area (no pink) got cropped until I hit 784 px. Instead of the bottom cropping at this point, it just crushed the remaining pink-framed graphic. The conclusion I get from this is that the 'mcp_mainbg.png' is hard-WALTERED with [0 0 1 1] which means that all edges are pinned to the appropriate outside frame, and the image will be scaled no matter what. It doesn't crop off the bottom.
For my use, where I need to maintain 1:1 for the sake of the the graphics integrity, I need to force cropping below a certain program size. I can only seem to do this with actual elements that have WALTER 'mcp_main_namebg.png' and 'mcp_main_idxbg.png', and make sure to set their anchoring as [0 1 0 1].

Last edited by 16bit; 04-19-2016 at 03:51 AM.
16bit is offline   Reply With Quote
Old 04-19-2016, 03:56 AM   #6
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 2,492
Default

Quote:
Originally Posted by 16bit View Post
I would have been happy if the panel background would have been cropped off at the bottom, but it doesn't do that.
Use the 4th value of your master.mcp.size in WALTER for that. Why didn't I do this when I made Imperial? Because it didn't exist then
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old 04-19-2016, 04:05 AM   #7
White Tie
Pixel Pusher
 
White Tie's Avatar
 
Join Date: Mar 2007
Location: Blighty
Posts: 2,492
Default

Quote:
Originally Posted by 16bit View Post
I set the 'master.mcp.size' to [130 1200 130 784], so I should get cropping below 784, but everything should remain 1:1 between that 1200 px. What happened was partly as predicted. The grey area (no pink) got cropped until I hit 784 px. Instead of the bottom cropping at this point, it just crushed the remaining pink-framed graphic. The conclusion I get from this is that the 'mcp_mainbg.png' is hard-WALTERED with [0 0 1 1] which means that all edges are pinned to the appropriate outside frame, and the image will be scaled no matter what. It doesn't crop off the bottom.
No, that's not the expected behaviour and your conclusion isn't correct, though it is true that a panel bg covers the entirety of its panel ([0 0 1 1] as you put it) ...that's its job!

It should squash above 784, then crop below that (slide off the bottom of the screen). You've got a cockup somewhere, perhaps you should post a licecap of what you're seeing and your full rtconfig.
__________________
The House of White Tie
White Tie is offline   Reply With Quote
Old 04-19-2016, 04:40 AM   #8
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 5,941
Default

Quote:
Originally Posted by White Tie View Post
I don't think you've understood it, have a read of my reply in that thread.
I'll go with "weird", then. A while back I was trying to make the MCP's minimum size smaller and simply could not get as far as I wanted; after a certain size, it would just insist on cropping the panel and pushing it off the bottom of the screen, regardless of my mcp_min_height setting.

If I get chance later I'll try to recreate the issue.
Lokasenna is offline   Reply With Quote
Old 04-19-2016, 04:49 AM   #9
+NRG
Human being with feelings
 
+NRG's Avatar
 
Join Date: Aug 2014
Posts: 546
Default

White Tie,

OT... I know you are very busy, but...

Any chance of you ever designing a new modern theme for REAPER (non-default) that shows REAPER in its full glory (like Imperial) with no limitations based on the theme being the default, using your creative talents and artistic license to design a theme that expresses your vision for the future of REAPER?
__________________
“Where words fail, music speaks”
+NRG is offline   Reply With Quote
Old 04-19-2016, 09:18 AM   #10
16bit
Human being with feelings
 
Join Date: Apr 2016
Location: England-land
Posts: 18
Default

Quote:
Originally Posted by White Tie View Post
No, that's not the expected behaviour and your conclusion isn't correct, though it is true that a panel bg covers the entirety of its panel ([0 0 1 1] as you put it) ...that's its job!

It should squash above 784, then crop below that (slide off the bottom of the screen). You've got a cockup somewhere, perhaps you should post a licecap of what you're seeing and your full rtconfig.
Quote:
Originally Posted by 16bit

I set the 'master.mcp.size' to [130 1200 130 784], so I should get cropping below 784, but everything should remain 1:1 between that 1200 px.
My apologies White Tie, I didn't fully explain myself. What I meant to say:
If I set 'master.mcp.size' [130 764 130 764] the 764px area of the 1200px 'mcp_mainbg.png' image (pink bordered) would remain 1:1 whilst the remaining non-pink-bordered area above would scale/stretch to fit from 764-1200 and beyond.
But, it just won't slide off of the bottom of the screen when I make the program window smaller than 764. Instead it just squishes the background image. Sure, it crops off/squishes down to 0 px the area above 764, but the pink-bordered area just compresses, just as I'd expect any [0 0 1 1] element to do so.

I guess the battle I am causing is between the pink-bordered area of the background image and Reaper's choice to either 'slide off the bottom' or to 'squish'. It is choosing the latter.
If I use another element like 'mcp_main_namebg.png' then I can specify [0 1 0 1] anchoring about the bottom for both top and bottom edges, use a 764 px pink-bordered graphic and it slides off of the screen just as I'd like. It will not squish or stretch no matter what I do to it - which is great!

Code:
;                                           stuff at the top
use_pngs 1
tcp_showborders 0
mcp_showborders 0
tcp_vupeakwidth 2
mcp_vupeakheight 4
mcp_mastervupeakheight 4
mcp_altmeterpos 0
use_overlays 0
transport_showborders 0
tcp_vol_zeroline 85000000
tcp_pan_zeroline 85000000 
mcp_vol_zeroline FF000000
mcp_pan_zeroline 85000000 
trans_speed_zeroline 85000000
gen_vol_zeroline FF000000
gen_pan_zeroline FF000000
item_volknobfg 85000000 FF778485 00474F4F
mcp_min_height 150
mcp_voltext_flags 5 5
tcp_voltext_flags 5 5

; ~~~~~~~~~~~~~~~~~~~~~

Layout "Graduated" "graduated"
clear master.mcp.*
set master.mcp.size [130 784 130 784]
front master.mcp.pan.label master.mcp.width.label

; ----------- MASTER TITLE
;                                           non-scalable background image definer!
set master.mcp.label [0 0 130 784 0 1 0 1]

; set master.mcp.label.margin [0 150 65 20]
; set master.mcp.label.color mcp.label.color

; ---------- LABEL / IDX
; set master.mcp.trackidx [0 0 130 784 0 1 0 1]
; set master.mcp.trackidx.color
; set master.mcp.track.margin

; ----------------------------------------- CONTROLS
set panwidth_anchor [6 93]

; ----------- BUTTONS
set master.mcp_fx_anchor [8 21]
set master.mcp.fxbyp + master.mcp_fx_anchor [0 0 23 14 0 1 0 1]
set master.mcp.fx + master.mcp_fx_anchor [0 14 23 16 0 1 0 1]

set master.mcp.io [82 21 39 16 0 1 0 1]
set master.mcp.mono [83 42 41 16 0 1 0 1]
set master.mcp.mute [48 26 17 18 0 1 0 1]

; set master.mcp.env [x y 17 26 0 1 0 1]

; ----------- VOLUME/GAIN FADER
set master.mcp.volume [106 80 17 454 0 1 0 1]

; ----------- PAN KNOB
set master.mcp.pan + panwidth_anchor [0 0 96 17 0 1 0 1]

; ----------- WIDTH KNOB 
set master.mcp.width + panwidth_anchor [0 13 95 14 0 1 0 1]

; ----------------------------------------- METER READOUTS
set readout_box [0 62]

; ----------- PAN READOUT
set master.mcp.pan.label + readout_box [7 0 38 19 0 1 0 1]
set master.mcp.pan.label.color [200 230 255]
set master.mcp.pan.label.margin [-1 0 0 0 0.5 0.5]

; ----------- WIDTH READOUT
set master.mcp.width.label + readout_box [46 0 38 19 0 1 0 1]
set master.mcp.width.label.color [255 200 0]
set master.mcp.width.label.margin [-1 0 0 0 0.5 0.5]

; ----------- VOLUME/GAIN READOUT
set master.mcp.volume.label + readout_box [85 0 42 19 0 1 0 1]
set master.mcp.volume.label.color [255 80 50]
set master.mcp.volume.label.margin [-3 0 0 0 0.5 0.5]

; ----------- METER SIZE/POSITON, 
set master.mcp.meter [29 126 48 651 0 1 0 1]

; ----------- METER DIVIDER WIDTH
set master.mcp.meter.vu.div [2]
set master.mcp.meter.vu.rmsdiv [2]
set master.mcp.meter.readout.color [255 255 255 255 255 150 150 255]
set master.mcp.meter.rmsreadout.color [255 220 0 255]
set master.mcp.meter.scale.color.unlit.top [0 0 0 0]
set master.mcp.meter.scale.color.unlit.bottom [0 0 0 0]
set master.mcp.meter.scale.color.lit.top [0 0 0 0]
set master.mcp.meter.scale.color.lit.bottom [0 0 0 0] 

; ----------- MASTER MENU BUTTON
; set master.mcp.menubutton [x y 24 40 0 1 0 1]

set master.mcp.extmixer.mode [1]
set master.mcp.extmixer.position [0 10 130 50 0 0 0 1]

EndLayout ; end of "Graduated"
Still work in progress of course, but I see no problems here.

As I said earlier, this looks to be how Albert-C got his ProTools-X theme to work. I couldn't find a solution myself, so reverse engineered the 'technique' from that theme.

Also, a big thank you for the effort you put into the theme/WALTER guide docs, White Tie. Very, very useful material indeed.
16bit 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:09 AM.


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