michaelwillis / dragonfly-reverb

A set of free reverb effects
https://michaelwillis.github.io/dragonfly-reverb
GNU General Public License v3.0
871 stars 65 forks source link

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

Open Darling-Lee opened 2 years ago

Darling-Lee commented 2 years ago

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

michaelwillis commented 2 years ago

That will depend upon Distrho Plugin Framework supporting AU components on MacOS. See https://github.com/DISTRHO/DPF/issues/16

falkTX commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

@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 commented 1 year ago

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 commented 4 months ago

this is coming soon :)

image

michaelwillis commented 2 months ago

@falkTX I tried building the AU plugins: https://github.com/michaelwillis/dragonfly-reverb/compare/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 commented 2 months ago

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 commented 2 months ago

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

michaelwillis commented 2 months ago

Yes, I had a low-dpi monitor plugged into my MacBook. I'll try it again without the monitor plugged in when I get back to that laptop.

On Sat, Apr 27, 2024, 12:34 PM Filipe Coelho @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/michaelwillis/dragonfly-reverb/issues/126#issuecomment-2081124033, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFUW5PNESL7ZHKN7ZESYKTY7PVTJAVCNFSM5R2B7FRKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBYGEYTENBQGMZQ . You are receiving this because you commented.Message ID: @.***>

michaelwillis commented 2 months ago

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