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

Audio Unit Format (AU,.component)for macOS please #126

Open
Darling-Lee opened this issue Mar 28, 2022 · 12 comments
Open

Audio Unit Format (AU,.component)for macOS please #126

Darling-Lee opened this issue Mar 28, 2022 · 12 comments

Comments

@Darling-Lee
Copy link

Audio Unit Format (AU,.component)for macOS please

@michaelwillis
Copy link
Owner

That will depend upon Distrho Plugin Framework supporting AU components on MacOS. See DISTRHO/DPF#16

@falkTX
Copy link
Contributor

falkTX commented Mar 31, 2022

While DPF does not support AU yet, one possible alternative is leveraging juce+dpf together just to do AU builds.
I have this setup for Cardinal at https://github.com/DISTRHO/Cardinal/tree/main/jucewrapper

Before this though, the plugin needs to handle high-dpi. Right now it simply ignored the scale factor and draws at 1x.
Some rework of the code is needed in order to make it look nice and crisp on high-dpi.

@michaelwillis
Copy link
Owner

Thanks @falkTX. When you say the plugin needs to handle high DPI, do you mean that the Juce wrapper in Cardinal needs to be updated to handle high DPI? Or that Dragonfly Reverb needs to handle high DPI? Or are there changes to be made in DPF?

@falkTX
Copy link
Contributor

falkTX commented Mar 31, 2022

I mean in order to supper high-dpi, each individual plugin needs specific code to support it.
DPF has the means to support this internally with an automatic upscaling, it will look blurry but have the correct size.

That auto-scaling is done through setGeometryConstraints by setting automaticallyScale to true.
Then you can test with export DPF_SCALE_FACTOR=2 to force scaling to 2x.

Alternatively, use getScaleFactor() to know the factor by which to scale up the UI. And do it all manually yourself.

@michaelwillis
Copy link
Owner

@falkTX I tried following the example of your jucewrapper from Cardinal. I think I almost got it working, but the linker fails:

Undefined symbols for architecture arm64:
  "DISTRHO::d_nextBufferSize", referenced from:
      JuceAU::JuceAU(ComponentInstanceRecord*) in lto.o
  "DISTRHO::g_nextBundlePath", referenced from:
      DISTRHO::DragonflyWrapperEditor::paint(juce::Graphics&) in lto.o
  "DISTRHO::UI::PrivateData::s_nextPrivateData", referenced from:
      DISTRHO::DragonflyWrapperEditor::paint(juce::Graphics&) in lto.o
  "DISTRHO::createUI()", referenced from:
      DISTRHO::DragonflyWrapperEditor::paint(juce::Graphics&) in lto.o
  "DISTRHO::PluginExporter::sFallbackString", referenced from:
      DISTRHO::DragonflyWrapperProcessor::getStateInformation(juce::MemoryBlock&) in lto.o
      DISTRHO::DragonflyWrapperProcessor::setStateInformation(void const*, int) in lto.o
      DISTRHO::ParameterFromDPF::getName(int) const in lto.o
      DISTRHO::ParameterFromDPF::getLabel() const in lto.o
  "DISTRHO::d_nextSampleRate", referenced from:
      JuceAU::JuceAU(ComponentInstanceRecord*) in lto.o
  "DISTRHO::createStaticPlugin()", referenced from:
      JuceAU::JuceAU(ComponentInstanceRecord*) in lto.o
  "DISTRHO::PluginExporter::sFallbackEnumValues", referenced from:
      JuceAU::JuceAU(ComponentInstanceRecord*) in lto.o
  "DISTRHO::PluginExporter::sFallbackRanges", referenced from:
      JuceAU::JuceAU(ComponentInstanceRecord*) in lto.o
      DISTRHO::DragonflyWrapperProcessor::setStateInformation(void const*, int) in lto.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm not sure what to do to get the arm64 part to work here. It's on a branch called au-build if you want to take a look.

@falkTX
Copy link
Contributor

falkTX commented Aug 5, 2022

could be you only built for x64 while the juce cmake stuff is universal, or only linking to ui and not dsp.
that cmake juce thing is 100% plugin dependent and not generic

tbh you should be able to fix these issues otherwise it wont be a good idea to enable AU.
otherwise next time something changes and another build error happens you will be stuck again.

@falkTX
Copy link
Contributor

falkTX commented Feb 24, 2024

this is coming soon :)

image

@michaelwillis
Copy link
Owner

@falkTX I tried building the AU plugins: master...au-build

It mostly worked, I can hear the reverb working, but it doesn't render the background image and some of the widgets are the wrong scale. I got the same results in Ardour, Carla, and GarageBand. Do you have any suggestions?

Screenshot 2024-04-27 at 11 47 00 AM

@falkTX
Copy link
Contributor

falkTX commented Apr 27, 2024

is that on macOS? with a high-dpi screen?

note the use of DISTRHO_PLUGIN_BRAND_ID breaks vst3 if using it for old/existing plugins as-is. see https://distrho.github.io/DPF/group__PluginMacros.html#ga9c9caf7e3376c9235c3529dbc612a964

@falkTX
Copy link
Contributor

falkTX commented Apr 27, 2024

is this maybe a case of mixing a high-dpi screen (like laptop) with a regular external 100% scale one?

@michaelwillis
Copy link
Owner

michaelwillis commented Apr 27, 2024 via email

@michaelwillis
Copy link
Owner

@falkTX I tried it again, I get the same graphics bugs on two different Macbooks without any external display connected.

  • 2021 MacBook Pro M1, macOS Sonoma 14.4.1, 3456x2234 retina display
  • 2019 MacBook Pro, AMD Radeon Pro 5500M + Intel UHD 630, 3072x1920 retina display

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

No branches or pull requests

3 participants