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

Cocoa UI on MacOS in Audio Unit with Zoom, LFO display, and several other fixes. #69

Closed
wants to merge 24 commits into from

Conversation

baconpaul
Copy link
Collaborator

Hi

This diff is the PR we need to build and correctly run the gui on MacOS. Nowhere near as big as the one to get the synth running, but quite a lot harder, mostly because I'm not really a cocoa expert and the documentation on the internet just sorta stinks. But I figured it out eventually and here we go.

The discussion of this is in #61

Thanks to @esaruoho for feedback and stuff.

Once this is done, I think the only step left to actually being able to do a 64 bit audio unit mac release of surge is making a packager rather than the hack job scripts I have together to build this now.

Appreciate any feedback, corrections, changes, concerns, or critiques.

@esaruoho
Copy link
Collaborator

You guys might appreciate this screenshot that @baconpaul attached into #61
49939329-84296180-feaa-11e8-999a-c5dfc0b4960c-2

@kzantow
Copy link
Collaborator

kzantow commented Dec 14, 2018

<3 @baconpaul

@esaruoho
Copy link
Collaborator

This really works and is a serious serious improvement, finally being able to see Surge on Logic Pro X and actually program it a little bit. @kurasu and @abique might have some insider knowledge as to what is missing or what doesn't work, but I'm able to load presets, program my own and whatever.

There's probably tons yet to be fixed but this is a major step forward. I hope we'll get this merged in asap.

@esaruoho
Copy link
Collaborator

esaruoho commented Dec 14, 2018

Confirmed (by a friend): Ableton Live 10 will run this AudioUnit without issues (well, obviously there might be some issues with Logic Pro X + Ableton Live 10 running this, further down the line, but the synth UI booted up and stuff.)

i'll see if I can get Renoise to show this somehow.
EDIT: I just can't get Renoise to show this.

@esaruoho
Copy link
Collaborator

can confirm, Surge works with Ableton Live 10. Hot stuff!

surge_51-surge

@baconpaul
Copy link
Collaborator Author

Wahey! That’s super!

@esaruoho
Copy link
Collaborator

esaruoho commented Dec 14, 2018

@baconpaul not as fully as in logic, though, for some reason, i can't click on the dropdown menu that would let me choose an effect to add to the chain. it works in logic but not on ableton live. how odd..

EDIT: this issue I had was directly related to me not running

echo "INSTALLING PRESETS"
(cd resources/data && tar cf - . ) | ( cd ~/Library/Application\ Support/Surge && tar xf - )

from the installer_local_au.sh - instead just copying over the .component without also creating the preset/configuration folder in ~/Library/Application Support/Surge.

Once I did copy resources/data to ~/Library/Application Support/Surge, I was able to get full working state with a new computer running the Surge AudioUnit component.

@baconpaul
Copy link
Collaborator Author

Wonder if live is handling GUI events differently somehow? As i mentioned I’m logic on Mac only so don’t have a good way to debug differences in different hosts alas

@baconpaul baconpaul mentioned this pull request Dec 14, 2018
@esaruoho
Copy link
Collaborator

@kurasu hi, would you have time to take a look and merge this in? It works beautifully - any other additions would be iterative updates (fixing the LFO Wave at the bottom, etc)..

@kzantow
Copy link
Collaborator

kzantow commented Dec 16, 2018

@baconpaul I've got the same issue with VST2 and AU that clicking the effect drop-down doesn't work, nor does the oscillator type selector (I'm guessing the "CLASSIC ▼" bit is this). I don't have logic, but based on latest master + this branch, it's reproducible in REAPER and AU Lab. I'm happy to debug this, but not quite sure where to start.

UPDATE: I figured this out to be the inability to find the configuration.xml and made a bit of a PR with a fix: #87

@esaruoho
Copy link
Collaborator

@kzantow @baconpaul hi, i narrowed down the "clicking on dropdown menus or changing presets or creating effect chains doesn't work in Live/Logic on another computer" issue to the old resources/data copying to ~/Library/Application Support/Surge <- once that's done,both the VST2 and AudioUnit will work on Ableton Live 10 and Logic Pro X.

I still can't get the AudioUnit to show on Renoise, though. This might be an issue with Renoise.

what not. Basically backwards from windows. And since the CLFOGui
does color manipulation in integer space directly onto a CDIBitmap
you need to account for this shift ordering. I did it with two #if MAC
directives but if this shows up on other places (which I don't think it
does) I guess we could add a function in the right spot, like the unued
one in CDIBitmap.
@baconpaul
Copy link
Collaborator Author

OK @esaruoho and @kzantow I just merged both zoomable-ui and the fix for the right mouse button into au-cocoaui-build so this pull request now gets me to fixing

#89 (broken install popup)
#83 (no LFO waveform)
#81 (fix zoom in surge)
#61 (create the cocoa ui)

I think it would be great if we could also include @kzantow std::filesystem fix and the documentation at least. Do you guys have permission to add those to this PR? And if not, how do I grant it to you?

@baconpaul baconpaul changed the title Build and correctly run the GUI on MacOS in AU Cocoa UI on MacOS in Audio Unit with Zoom, LFO display, and several other fixes. Dec 16, 2018
@esaruoho
Copy link
Collaborator

@baconpaul i don't have a way to write to your PR, and i'm not sure how to contribute to it.. except to maybe post a PR to your fork and you merge it into this.. but for now i'll probably try and see if @kurasu will merge #68 in and then i'll delete my fork, re-create it and hope it works better.

@baconpaul
Copy link
Collaborator Author

OK but doesn't #68 contain that weird memory diff we were talking about?

Anyway lets see what gets merged!

@esaruoho
Copy link
Collaborator

@baconpaul yeah it has the "merge from kurasu:master to esaruoho:master" diff.. i'm yet to figure out how to revert it out of it.

@baconpaul
Copy link
Collaborator Author

OK thanks to @kzantow who is marshaling together all the changes that he did, that I did and that @esaruoho did into one pull request #92. I have confirmed that PR #92 subsumes this code, and also adds a fix, and so is the better PR than this one to review. As such I'm closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants