pierreguillot / Camomile

An audio plugin with Pure Data embedded that allows to load and to control patches
GNU General Public License v3.0
896 stars 62 forks source link

Can't load Fx AU in Logic Pro 10.4.4, message: "Failed to load Audio Unit ..." (instruments do work!) #166

Open gijs-c opened 4 years ago

gijs-c commented 4 years ago

Hardware: MacBook Pro (Retina, 15-inch, Mid 2015) (MacBookPro11,4) OS: macOS Sierra version 10.12.6 DAW: Logic Pro X version 10.4.4 Pd version 0.49.1 Format: AudioUnit

First off: thank you for this wonderful and amazing project! I'm having an issue however trying to get effects to work in Logic Pro X. I keep getting the following error message:

"Failed to load Audio Unit “CamomileFx”, please contact the manufacturer for an updated version or further assistance. "

All instruments I made work perfectly (all of the example instruments and one of my own) but I can't get any effect plugin to work. I've tried all of the examples and my own patch in versions 1.0.6 and 1.0.5, using the terminal method (1.0.6) and the manual method (1.0.6 and 1.0.5) and all result in the same message.

I loaded the VST's in Izotope RX7 and they work fine.

pierreguillot commented 3 years ago

I updated Juce so the new version seems to work on Logic 10 now. I will publish a pre-release soon!

Capture d’écran 2020-08-07 à 09 57 15
fbarton112 commented 3 years ago

I'm working on a Macbook Pro (Retina, 15-inch, Mid 2015) running MacOS High Sierra 10.13.6 and Logic Pro X 10.4.1, and i'm having the same issue as above.

I tried downloading the newest release (v1.0.7-beta15) and recompiling the AudioUnits, but i keep running into the same problem. I can use the plugins as "Midi-controlled Effects", but when i try to use them as a regular AudioUnit i get the error "Failed to load Audio Unit "PluginName", please contact the manufacturer for an updated version or further assistance. "

And this is purely a Logic issue, they all load fine in any other software.

pierreguillot commented 3 years ago

Can you give further information? Which plugin did you try? Why did you recompile the Audio Units? What do you mean? Did you clean the cash of the Audio Units?

fbarton112 commented 3 years ago

The error occurs with any plugin (my own or the examples) generated by Camomile. And by recompile, i just meant generate new versions of the Audio Units with the updated Camomile. The generated plugins run great in Ableton and other DAWs.

I could try on a slightly newer version of Logic X (10.4.4), but i can't update to the newest version, because i need to keep my current version of MacOS.

Also, issues aside, i wanted to say thank you this project! I had been dreaming about making pd patches into plug-ins for some time, and finding Camomile has made it so intuitive and easy. Thank you.

pierreguillot commented 3 years ago

My demo license will expire soon so if there is still a bug I should fix it quick... I'm on Logic 10.5.0, if you have the opportunity to test with it, I'll be pleased to know if it works. Also if you could try to remove the AuioUnits cache (in ~/Library/Caches, remove the "com.apple.audiounits.cache" file), that will rescan the Audio Units and perhaps it will solve your problem? Thank you!

fbarton112 commented 3 years ago

I will test later today in 10.5.0 and report back.

fbarton112 commented 3 years ago

I ran into the same issue with Logic 10.5.1 on a different computer running on MacOS 10.15.5

Was still only able to open as Midi-controlled effect.

pierreguillot commented 3 years ago

So this is the inverted problem, the effects work but not the instruments? Did you use the pre-built examples? And did you clean the AudioUnits cache? If you can describe step by step how to reproduce the bug with a specific plugin, it would help me to find the problem. I'm a total newbie on Logic ;) Something like:

fbarton112 commented 3 years ago

The instruments work normally, and the audio effects have strange behavior.

It's not exactly clear as to what the issue is. From the screenshots you sent with Logic, they seemed to be behaving normally on your computer. For me, the plugins are validated fine by Logic, but when I try to put them in plugin slot on a track, they can't be used. This is only an issue with the audio FX plugins.

Software instruments work perfectly, and the audio effects only work in their 'midi instrument' mode (I've attached some pictures explaining this). So for whatever reason, Logic only lets me use the plugins (effect or instrument) as midi instruments, and will not let me use the audio effects in the way that audio effects are typically used.

And i already tried clearing the Audio Unit cache, and it didn't seem to change the behavior of the Camomile-generated plugins.

1 2 3 4
pierreguillot commented 3 years ago

Hi, I'm sorry for this late answer. The investigation is difficult because I still don't have access to Logic (as the trial period is out) and I don't really know the how to load a plugin as a MIDI-controlled effect or simply as an Effect. But I can have a solution and if someone that uses Logic could test it, it would be really helpful!

There are different types of AudioUnit (MusicDecice, MusicEffect, Effect, Generator, etc.). CamomileFx is a MusicEffect (kAudioUnitType_MusicEffect with the code "aumf" - so it accepts Audio and MIDI) but perhaps the plugin should simply an Effect (kAudioUnitType_Effect with the code "aufx" - so it accepts Audio but not MIDI). Perhaps this doesn't require any internal change 🤞, and in this case, only the code corresponding to the type in the file Info.plist should change.

Here is how to test it:

pierreguillot commented 3 years ago

If it works, I can modify the script that generates the plugin to uses aufx instead of aumf if the plugin doesn't process any MIDI event.

gijs-c commented 3 years ago

Hi, I tested your idea in Logic 10.14 and unfortunately this does not seem to solve the issue. I can also replicate that it does load fine when you load the plugin as midi controlled effect.

pierreguillot commented 3 years ago

@gijs-c Thank you for your feedback

I found another macOS machine to test with the Logic X Trial but the machine is on macOS 10.14 and now Logic 10 requires macOS 10.15, so I'll have to find another solution.

Josef-N commented 3 years ago

Hi, I wanted to post this since long, then I forgot, now I do it. Changing the type of AudioUnit does not help, "aumf" is fine, as I noticed at the end. I tried some examples from this thread: Multichannel and side-chain #110 There is one format of iolayout that works for me in Logic. I am also on MacOS 10.14 and do not have the latest version of Logic. Hopefully it still works. Here are some examples from CamomileFx plugins that I use and are working in Logic:

iolayout 1 1 | 1 0; type effect; midiin true; works as effect and as Midi-controlled effect. I need only one Input, but the iolayout has to be in this format, otherwise it will not be recognized.

iolayout 2 2 | 2 0; type effect; midiin true; same in stereo, there I use input and output

and here an example, where I wanted to be able to select individual outputs: iolayout 1 1 | 1 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1; type effect; midiin true;

or as instrument: iolayout 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1 | 0 1; type instrument; midiin true;

Logic offers for Camomile instruments and Midi-controlled effects Mono, Stereo, Multi-Output(16xMono or Stereo) and Multi-Output(25xMono or Stereo); for effects Mono or Stereo. And of course the setting file in Camomile has to match the number of channels.

I hope, this helps a little bit. These are only a few examples, that made sense for me. Tested in Camomile 1.0.6, and still working in 1.0.7.

Best, Josef

pierreguillot commented 3 years ago

Thank you Josef for this highlighting. So it seems that "regular" AudioUnit effects require to add a side-chain (even if the side-chain is not necessarily used). This could be a workaround, in the meantime, I'll investigate the channel management of the AudioUnit plugins, there might be something that I missed.

@gijs-c and @fbarton112, can you retry a plugin with this approach, changing the channel layout of the Bulgroz to iolayout 2 2 | 2 0; for instance?

Josef-N commented 3 years ago

Yes, it seems so, that the plugin needs a side-chain. And thank you Pierre for your work! PdParty (on iOS) and Camomile encouraged me to learn pure data.

gijs-c commented 3 years ago

Yes, this fixes the problem consistently! Just tried it with both Castafiore and Bulgroz. I haven't tried all possible combinations yet, but so far the only iolayout configuration that works is 2 2 | 2 0;. Both 2 2 | 1 0; and 2 2 | 0 0; (was worth a shot!) do not work. Still have to try with a mono plugin.

pierreguillot commented 3 years ago

@gijs-c Thank you. So it could be used as a temporary workaround. I think I found the problem in the code with the channel layout, I'll try for the next release!

pierreguillot commented 3 years ago

I think I fixed the problem but as I can't test on Logic I'm not really sure. Can you try with these binaries?

CamomileMacOS.zip Bulgroz.component.zip

Josef-N commented 3 years ago

I tried Bulgroz now. Unfortunately it does not work, same error message as before. But very interesting, when inserted as Midi-controlled effect, it works in stereo and also as surround plugin! This is new. Tried also with iolayout 2 2 | 2 0; and iolayout 2 2 | 2 2; result: effect plugin ok Midi-controlled effect ok in stereo, but not in surround (same error message)

pierreguillot commented 3 years ago

... Midi-controlled effect, it works in stereo and also as surround plugin!

Hum, this was not intended :(

Perhaps the effects plugins simply require an extra input bus on Logic? In this case, I just have to change the configuration of the examples and to add this information on the wiki pages. Can you try this juce demo plugin and tell me if it works as an effect on Logic?

Josef-N commented 3 years ago

yes, this juce demo plugin works in Logic as an effect. I rescanned 3 plugins in Plug-In Manager and attach the scan result here to compare. Maybe you can find something that helps you. Bulgroz 1.0.8 – the version you sent me custom 1.0.7 – with my version of iolayout 2 2 | 2 0 JuceGainPlugin – working

Bulgroz1.0.8.txt custom1.0.7.txt JuceGainPlugin.txt

pierreguillot commented 3 years ago

Thank you! So this means that there is something wrong with the way Camomile manages the audio buses... Here is another try: https://github.com/pierreguillot/Camomile/suites/2053081127/artifacts/41379394. I changed the way the audio buses are validated by the plugin. Let me know if it changes something.

Josef-N commented 3 years ago

this version crashes the host, tried with Logic an also with Blue Cat’s Patchwork. I used the script to build the plugin in terminal. Info.plist inside the plugin package content says: LSMinimumSystemVersion 10.15 I am on 10.14 – maybe this is a reason? p.s. tried with Bulgroz

pierreguillot commented 3 years ago

Oops sorry, I updated the minimum target to 10.9 on this one

Josef-N commented 3 years ago

this version is ok for 10.14, but sorry ... same thing again with the error message.

pierreguillot commented 3 years ago

Okay, I really need to find a way to test and debug directly in Logic... :(

Josef-N commented 3 years ago

yes, I understand. But as there is a workaround, it is not dramatically urgent, I think.

piedagile commented 3 years ago

Many thanks, and bravo for this project that maybe will help me to re-write a deprecated component named CEPbinaural (look at the bottom of this page: https://www.imagimuse.net/technique-audio/spatialisation-binaurale )

I downloaded Camomile 1.0.7 and tried to insert Bulgroz. It was also rejected with"please contact the manufacturer for an updated version or further assistance". And I found this thread, I changed Bulgroz.txt iolayout 2 2 | 2 0; And it works now. Maybe this info could be useful for you: I use the last 11.2.2 version of Macos Big sur and the last 10.6.1 version of Logic Pro. OK also with Garage Band Then I also tried with Castafiore. Firstly, it was not seen, and I tried with sucess with Camomile 1.0.9 . But I had to set iolayout 2 2 | 2 0;

Now I think I am able to code my first component, in fact to re-write it in Pd because my primary version was built with the now deprecated SonicBirth.

But where I could find a minimum component body that is not an example?

Best, Charles

pierreguillot commented 3 years ago

You should have a look at the wiki pages for documentation on how to create a plugin. There are also videos that could be useful. And if you have any questions, feel free to create a discussion.