Apple just announced Logic 9.1, which supports 64 bit plugins natively, and in 64-bit mode runs 32 bit plugins via a bridge. Other hosts are working on 64 bit versions of their hosts.
So…how do we write 64-bit plugins in Juce? The 64-bit processing doesn’t seem that confusing (I can figure out where to replace float with double, or come up with a MY_FLOAT definition), but how do we specify which render function to call? Obviously, we need to support both 32 bit and 64 bit plugins for the time being. And do the various setParameter() and getParameter() functions need to be 64 bit?
Feel free to point me to other threads that discuss this, if need be. The whole 64 bit thing seems like a pain to deal with, as very few DSP operations need precision beyond 32 bit floats (low frequency resonant/notch filters and some level detectors being the main exceptions I can think up). But it looks unavoidable at this point.
Yes, I just downloaded the new Logic and I must say that 32-bit bridge app is awkward. So I need to build a 64-bit version. So far I’m stumbling. I was successfully building a 32-bit Cocoa version. It appears that I need to strip out the Carbon support in order to go 64. If any of us make discoveries (or have prior knowledge) about doing that, let’s share it here.
For you maybe. It took a while to get a successful link. The key seems to be the 'Build Active Architecture Only" checkbox. It must be checked.
But even after that, there’s a problem. If I launch Logic 9.1 in 32 bit mode, a 32/64 plug is verified by AUval and loads and runs properly. But if I launch Logic in 64-bit mode, Auval gives me the following errors:
[color=#0080FF]ERROR: Cannot get Component’s Name strings
ERROR: Error from retrieving Component Version: 4294967246[/color]
My problem is that I’m pretty much a straight DSP type and I have only the vaguest clue what Rez does and how it works. I’m trying to get schooled, but my earliest tweaks to these flags did nothing.
Surely checking that box would override the build setting and just do a normal 32-bit one…?[/quote]
That would have been my initial thought, but I can’t build Juce 1.50 if I don’t set that flag. Here are my settings:
Architectures: 32/64-bit Universal
Base SDK: Mac OSX 10.5
Valid Architectures: i386 ppc ppc64 ppc7400 ppc970 x86-64
If Build Active Architecture Only is checked, it builds
If it’s unchecked, I get five errors, beginning with these two:
[color=#0080FF]juce_mac_NSViewComponentPeer.mm:1502: error: ‘kUIModeAllSuppressed’ was not declared in this scope
juce_mac_NSViewComponentPeer.mm:1502: error: ‘kUIOptionAutoShowMenuBar’ was not declared in this scope[/color]
The value (0 or 1) of JUCE_SUPPORT_CARBON has no effect here.
Jules,
I’m now using the 10.6 SDK under XCode 3.2.1. No matter what I do, I can’t build the Juce library with 64-bit Intel code. I’ve gone so far as to re-download the juce package, just to make sure I hadn’t messed anything up. I even booted my system (8-core Nehalem) up with a 64-bit kernel. Nothing. Nada.
I always have five symbols undefined. One of those is [color=#0080FF]kUIModeAllSuppressed[/color]. I have found that this and the other symbols are defined in MacApplication.h, which is buried deep in the Carbon framework. But this file isn’t included anywhere in the juce library build.
Does your success in building 64-bit extend to the library, or are you simply including the amalgamated file?
FWIW, I have other libraries that I use in these plugs. No problem building them in 32/64.
Are you using the release version of juce or the one from his tip?[/quote]
I’m using the release version (for now). It’s getting to be rather late now, so I’ll have to put this off until the morning. Thanks for digging this up.
Using latest juce tip, I have just run my plugin as a 64-bit powerpc audiounit on a leopard mac (in AU Lab) - the gui is fine (as long as you don’t try to build the carbon one). I can not yet test on a x86_64 box, but I’m pretty confident it will work. In the rez flag I have added -d ppc64_YES -d x86_64_YES , but I’m not sure if it helped or not (I had some problems to get the 64-bit audiounit recognized at first, not sure why…)
What about VST by the way, does a 64-bit mac VST host exist ?
[quote=“jpo”]Using latest juce tip, I have just run my plugin as a 64-bit powerpc audiounit on a leopard mac (in AU Lab) - the gui is fine (as long as you don’t try to build the carbon one). I can not yet test on a x86_64 box, but I’m pretty confident it will work. In the rez flag I have added -d ppc64_YES -d x86_64_YES , but I’m not sure if it helped or not (I had some problems to get the 64-bit audiounit recognized at first, not sure why…)
What about VST by the way, does a 64-bit mac VST host exist ?[/quote]
I’m able to build a 64-bit juce library with the latest tip–something I couldn’t do before. I can’t build my plug yet, because my plug uses the [color=#0080FF]GradientBrush[/color] class. A little digging in the tip code indicates that class hasn’t yet been implemented. Jules, is that on the horizon? If not, can I safely bring that code over from 1.50?
Hi,
Made some test and It looks like JuceDemoPlugin won’t build in 32/64 bits universal binary out of the box
To build the AU plugin, I need to put some #ifndefLP64 around BUILD_AU_CARBON_UI
Instead of including AUCarbonView.h in juce_AU_wrapper.mm and compiling the AUCarbonViewBase directory cpp files, I include
directly AUCarbonViewBase.cpp AUCarbonViewDispatch.cpp AUCarbonViewControl.cpp CarbonEventHandler.cpp
Unfortunately this is way more complicated for VST as it looks like to use still a lot of Carbon code outside the ADD_CARBON_BODGE
The builded version still do not work though. Failing with a -50 error. The copy script fails.(but changing plist and PkgInfo manually don’t change the result)