09-10-2019, 01:29 PM | #1 |
Human being with feelings
Join Date: Sep 2019
Posts: 28
|
Reaper Linux VST3 is stealing 8 pixels from me (FIXED)
Hi!
I'm one of the devs on surge (https://surge-synthesizer.github.io/) and we actually have the VST3 version of our plugin working on Linux. Reaper works almost perfectly with Linux VST3 and the nightly of Surge But it seems when we display the VST3 in Linux, our plugin gets clipped by about 8 pixels. Almost like the whole thing is being drawn in a rect which is .offset(4,4) or something. https://github.com/surge-synthesizer/surge/issues/1144 there's an issue with screenshots and so on. Is there something about the Reaper VST3 implementation which changes the sizing? Is there something I should do in my code to compensate for this? Is this a reaper bug? (Is it a surge bug?) These are all questions I'm not sure of the answer to, but the Reaper surge users tell me that this forum is super friendly and the devs are responsive, so I figured i would ask it over here and see if you have any ideas. Thanks for your consideration! Paul |
09-15-2019, 01:25 PM | #2 |
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 24,859
|
@Justin, would be really nice to give some input here. Thanks!
__________________
Edit poly aftertouch in MIDI editor! Entirely (un)dockable UI! | Improve Render Queue! |
09-15-2019, 06:13 PM | #3 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 16,117
|
Hi thanks for bringing this to our attention!
I'm looking at the code now -- it appears your IPlugView::canResize() returns kResultTrue, meaning that the plug-in supports variable sizing. In this case, implementing IPlugView::checkSizeConstraint() would probably help? |
09-15-2019, 11:46 PM | #4 | |
Human being with feelings
Join Date: May 2014
Location: France
Posts: 261
|
Quote:
|
|
09-16-2019, 03:48 AM | #5 |
Human being with feelings
Join Date: Sep 2019
Posts: 28
|
Yeah the 8 pixel clip which only happens on linux is what’s confusing me. I send a resize message to go to a certain size, and I get sent to that certain size, then I get drawn about 8 pixels shy of that on linux only.
I’ll check that constraint API this week though and see if that helps; andupdate this thread if so. Thanks! |
09-16-2019, 05:17 AM | #6 |
Human being with feelings
Join Date: Sep 2019
Posts: 28
|
Alright here's what's happening
I put print statements in the place where I call IPlugFrame::resizeView and also where I get called back in IPlugFrame:nSize and IPlugFrame::checkSizeConstraint (which I have now implemented). On macOS I get the following when I resize (which I do by doing "menu/zoom/zoom to 125%" in this case: ``` Asking to resize to 1130 677 checkSizeConstraint 0 1130 1130x677 onSize 0 1130 1130x677 ``` whereas on Linux I get this ``` Asking to resize to 1130 677 checkSizeConstraint 0 1122 1122x669 onSize 0 1122 1122x669 ``` so yeah, for some reason you are just taking 8 pixels away from my desired size. But only in Reaper. And only on Linux. So I guess I could code defensively around this. looks like in checksizeconstraint I can overrule you to tell you the size I want, after I told you the size I want Is that the right solution? Why does only linux and only reaper do this in the VST3? Before I write that bit of code (which is a bit painful of course because the size I requested is not handed to me just the size you want to give me), I want to make sure this is what you intended Reaper/Linux to do. Thanks |
09-16-2019, 06:08 AM | #7 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 16,117
|
Fixing on the REAPER side for the next builds
|
09-16-2019, 06:30 AM | #8 |
Human being with feelings
Join Date: Nov 2013
Posts: 2,881
|
|
09-16-2019, 07:08 AM | #9 |
Human being with feelings
Join Date: Sep 2019
Posts: 28
|
Awesome! Thank you!
|
09-16-2019, 02:04 PM | #10 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 16,117
|
Latest +dev build should fix this!
|
09-16-2019, 02:13 PM | #11 |
Human being with feelings
Join Date: May 2014
Location: France
Posts: 261
|
|
02-16-2020, 09:08 AM | #12 |
Human being with feelings
Join Date: Oct 2017
Location: Copenhagen, Denmark
Posts: 229
|
What a happy ending!
|
Thread Tools | |
Display Modes | |
|
|