Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zoom error in Cakewalk by Bandlab (also Sonar Platinum) #816

Closed
Saffran2 opened this issue Apr 5, 2019 · 18 comments · Fixed by #884
Closed

Zoom error in Cakewalk by Bandlab (also Sonar Platinum) #816

Saffran2 opened this issue Apr 5, 2019 · 18 comments · Fixed by #884
Labels
Host Specific Issues related to specific host(s) or host features

Comments

@Saffran2
Copy link

Saffran2 commented Apr 5, 2019

I'm using Cakewalk by Bandlab on a win 8.1 64-bit machine.
First install of Surge 1.6.0-beta-8 i selected vst3 only. Install went fine. CbB picked it up and away we go. Sounds ok. Ui responds to mouse and i can move sliders and select stuff.
I had to make the ui bigger. It took me rather a long time to discover the text "menu". It was so little and sort of melted in with the background like a cameleon.
Didn't know what size i needed so i tried 200%. Surge gave a message about it being too big and suggested to make it as big as it could be. I clicked ok.
WHAT happened was that the vst gui went bigger like 150% but Surges ui was cropped and only showed 100% of the 150% it ought to show. See below. The menu was in the bit that been cropped so i deleted the track and inserted Surge as a new track. That gave me back the full "mini" Surge. Tried different zoom options but nothing worked.
Installed it once again on top of earlier install but this time i also checked to install the vst2. Install went fine but it didn't change anything.
Fired up Reaper and Surge zoomed to 150% without any problem.
Also tested on a win 7 64-bit machine. CbB couldn't handle zoom on that either.
Skärmklipp Surge

@baconpaul
Copy link
Collaborator

Oh that screenshot is super useful. A very different type error in that it is just the clip rect which is wrong. It is still a problem but a different one than I thought you had meant.

@baconpaul baconpaul added Host Specific Issues related to specific host(s) or host features path to zoom labels Apr 5, 2019
@Saffran2
Copy link
Author

Saffran2 commented Apr 7, 2019

It's probably a CbB error.
When i opened CbB the day after it didn't allow me to get a full "mini" Surge.
Did a Surge uninstall and registry delete of anything "Surge". Rebooted and installed Surge again with all options. Surge remained cropped all the time.
When i closed CbB the day before it must have saved something in regards to Surge ui size.

@baconpaul
Copy link
Collaborator

There’s an xml in your documents surge called surgedefsults.xml or something. Try deleting that?

@Saffran2
Copy link
Author

Saffran2 commented Apr 9, 2019

Before anything else. I can use it fine on my Win7 CbB. It has lower resolution and is ok to work in without zoom.
On win8.1 CbB i started with installing Surge because i had uninstalled it last time.
Deleting surgedefaults.xml led to vst3 didn't need to delete from track when failing to resize. It was enough to close the plugin window and open it again to get back to a full "mini" Surge.
Vst2 failed the resize and stayed that way regardless of what i did next.
Surgedefaults.xml have not come back in the Surge folder in documents. I even opened Surge in Reaper as last time but no xml appearing. I did that because i had a look inside the xml and it said default size as 150% which was what i used successfully in Reaper.
I also had a lookaround in Cakewalk folders but didn't find anything useful.

@Saffran2
Copy link
Author

Saffran2 commented May 3, 2019

Question - Is the default window size of Surge 240X400? I found those decimal values associated with something called cxEditor and cyEditor in windows registry about Surge vst3. It was zero as vst2.

@baconpaul
Copy link
Collaborator

Surge doesn't use the registry for anything. That must be something else writing that!

The sizes at 100% are

paul:~/dev/music/surge-rack$ grep -r WINDOW_SIZE surge/src/ | grep const
surge/src//common/globals.h:const int WINDOW_SIZE_X = 904;
surge/src//common/globals.h:const int WINDOW_SIZE_Y = 542;

@baconpaul baconpaul changed the title Zoom error in Cakewalk by Bandlab Zoom error in Cakewalk by Bandlab (also Sonar Platinum) May 3, 2019
@baconpaul
Copy link
Collaborator

CakeWalk by BandLab is available free on windows

https://www.bandlab.com/products/cakewalk

So you can download it into a VM and test this behavior there one day!

@Saffran2
Copy link
Author

Saffran2 commented May 5, 2019

I'm not a programmer so i can't say if this is useful to you or not, but here we go.
I opened a config file for another software to search for paths. There i found this "WindowsArguments = dpiawareness=1" and by googling i could see that is has to do with scaling.

@dork1
Copy link

dork1 commented May 23, 2019

I can confirm this behaviour on win 10 64 bit using Cakewalk by Bandlab, doing a right-click to zoom in on surge results in the top screenshot with no recourse except to close and reopen the project only it seems, not even the entire program.

CakeWalk by BandLab is available free on windows

https://www.bandlab.com/products/cakewalk

So you can download it into a VM and test this behavior there one day!

@dork1
Copy link

dork1 commented May 23, 2019

I can confirm this behaviour on win 10 64 bit using Cakewalk by Bandlab, doing a right-click to zoom in on surge results in the top screenshot with no recourse except to close and reopen the project only it seems, not even the entire program.

CakeWalk by BandLab is available free on windows
https://www.bandlab.com/products/cakewalk
So you can download it into a VM and test this behavior there one day!

And after further inspection it seems none of the zoom options work, they all result on the overlapped larger zoomed but cropped image like OP.

@baconpaul
Copy link
Collaborator

Yes zoom is clearly broken in this host. We really could use a windows dev to help us debug it. Do you have any windows dev experience with vsts or know colleagues who do?

@dork1
Copy link

dork1 commented May 24, 2019

I would love to assist and I do love this synth, thank you! However I fear my skills might miss the mark, I am familiar with node/js mostly, I would be willing to have a crack at it/at least take a look, if I was pointed in the right direction roughly, and I do have a colleague I could ask too depending on the language utilized. I have some win experience so happy to at least check it out. And I would like to get more experience with VSTs so :)

@baconpaul
Copy link
Collaborator

Great; it’s all c++ and vstgui. Lemme see if I can get some time this weekend to write imup my thoughts on what’s probably happening

@baconpaul
Copy link
Collaborator

baconpaul commented May 24, 2019

So what I think is happening is this:

  1. CakeWalk for BandLab is increasing the size of its window properly
  2. But CWFBL is either not increasing the size of the VSGTUI CFrame or (more likely) the parent of the VSTGUI CFrame

So you end up with, like, a 1400x900 window with a 1400x900 VSTGUI CFrame but inbetween is some bandlab widget which is size 900x700 and that causes the clip.

So I think the solution is something like this

  1. In VST2Processor you get information on your host name, We ignore that but first thing first is to capture it and have a test in there called “isCakewalkBandlab” which compares the manufacturer string with a known string

  2. In the VST resize if you are cakewalk for bandlab walk up the GUI hierarchy tree in HWND space and find the intervening HWND. Send them a win32 message to resize if they are too small

And perhaps voila you are good. I’m not sure but if I was setting out to solve this that’s how I would start.

If you’ve done any win32 C++ programming I don’t think it is that hard. Last time I did win32 C++ programming was around 2008 though, and not exactly looking to re-live the experience!

Appreciate your enthusiasm! If you and your friend want to look we would love the pull request. Shouldn’t be anywhere outside of src/vst2 and should all be in a #if WINDOWS block. So fairly low risk especially if we get the identifier right.

Oh and if we do get the identifier that means we can shut off zoom in VST2 for FL (where it doesn’t work at all) which would be nice!

Thanks; hope this helps!

@baconpaul
Copy link
Collaborator

OK I spent a bit of time debugging this. It isn't what I thought. Cakewalk for Bandlab uses the VST3 and it seems to me has mis-implemented the VST3 resize api.

I return "true" from canResize; I call resizeView with the right size; and then Cakewalk calls back my onZoom with the original size. This is incorrect behavior according to the VST3 docs.

I'll figure out host detection and just disable surge zoom for this host.

baconpaul added a commit to baconpaul/surge that referenced this issue May 27, 2019
Cakewalk by Bandlab interacts with the VST3 zoom API in a way
which doesn't match the documentation in the VST3SDK; after calling
resizeFrame it calls back onSize() with a smaller frame even though
canResize is true; and even though it has grown its window.
So to avoid broken UIs disable Zoom in this host in Windows.

Closes surge-synthesizer#816
@baconpaul
Copy link
Collaborator

Alright I'm going to do the unsatisfying push now of disabling zoom for this host on Windows. I have that working.

As far as I can tell, the host is buggy in its interaction with the VST3 zoom API. If someone who maintains the host would like details beyond this ticket I'd be happy to share what I saw. And if someone has loads of experience with VST3 resizing in Cakewalk and wants to take another shot happy for them to do that.

At least now users won't be able to get in a broken state with the synth. Will close this issue when I sweep to the nightlies.

baconpaul added a commit that referenced this issue May 27, 2019
Cakewalk by Bandlab interacts with the VST3 zoom API in a way
which doesn't match the documentation in the VST3SDK; after calling
resizeFrame it calls back onSize() with a smaller frame even though
canResize is true; and even though it has grown its window.
So to avoid broken UIs disable Zoom in this host in Windows.

Closes #816
@dork1
Copy link

dork1 commented May 27, 2019

Thank you for the attention Paul, and detailed info above, pity it wasn't as easy as initially thought. That being said, unfortunately, my colleague is somewhat touch and go at the moment regarding his availability but I will however keep an eye on the tracker and jump in when I see something I can assist with. And in the meantime get more familiar with VST design.

@baconpaul
Copy link
Collaborator

Yeah this one would have been impossible to fix I think; it is a bug in cakewalk as far as I can tell. I appreciate the look though, and at least now users of this DAW can't break their session, even though they don't get the zoom feature. Appreciate your help!

baconpaul added a commit to baconpaul/surge that referenced this issue Jul 10, 2019
Cakewalk by Bandlab interacts with the VST3 zoom API in a way
which doesn't match the documentation in the VST3SDK; after calling
resizeFrame it calls back onSize() with a smaller frame even though
canResize is true; and even though it has grown its window.
So to avoid broken UIs disable Zoom in this host in Windows.

Closes surge-synthesizer#816

Former-commit-id: f2e754e05179bce9810019ab5468771a45252a7d [formerly a52b7d9]
Former-commit-id: 27dd82a384899acd7935a5a3f7d2e6a092ae9c6f
Former-commit-id: 15863b7c53b4831a8a4ee558b3a28a78362543cb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Host Specific Issues related to specific host(s) or host features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants