I exported my synth as AU and nearly everything worked !!! This is really good news. Here are some hints and one question regarding this:
1) XCode misses lookuptable.h, which is not in the project and not necessary
2) XCode wants max and min to be replaced by fmax and fmin
3) If someone uses the doWhiteNoise() function there is one problem. XCode generates rand() in the limit of RAND_MAX, which is definitely not 32767. The line :
fNoise = 2.0*(fNoise/32767.0) - 1.0; has to be replaced by
fNoise = 2.0*(fNoise/(float)RAND_MAX) - 1.0;
Then this function works for OSX and for Windows.
Now my problem. Something has changed in the MIDI processing from 6.27 to 6.5. I am using Aftertouch/ChanelPressure a lot. This works well in RackAFX 6.5 and in my old VST2 Version. But in the AU and exported VST3 there seems to be something mixed up. For example my LED Bar, which shows the AT Amount shows no lights. AT does not work as expected on my Modulation Generator and so on.
What is the difference in MIDI processing for Modwheel and Aftertouch/ChannelPressure bewtween the versions?
I just did a quick Make AU test of both an effect and synth plugin. Both compiled straight away without issues. lookuptable.h was not missed - it was found/used in the synth plugin since synthconstants.h #includes it. Also, I did take care to convert all min/max to fmin/fmax in the porting module so you should not see an error unless it is your code. If there are any remaining min/max function calls, please let me know so I can convert them to fmin/fmax - even though this is simple enough to do, I want the AU ports to compile perfectly the first time.
Thanks for the note about RAND_MAX and the difference between Windows/MacOS there. I will need to change this in the synth code as well.
And glad you solved the MIDI issue - nothing changed internal to RackAFX regarding MIDI except that I altered the MIDI channel to be zero-indexed as it is in the MIDI spec. On old RackAFX versions (pre v6.2 I think) MIDI channels were indexed 1-16. When I wrote the Synth Book code, I wanted to make RackAFX just like the VST/AU plugins, so I properly indexed MIDI channels as 0-15 to make the code as similar as possible.
my project started with 6.07 and was converted to 6.5. I do not know what the conversion process is doing, it looks like a lot of work. So this may be the reason for remaining max and min functions and the lookuptable.h is anywhere in the old days of 6.07.
By the way, I compiled with Xcode 6.01 and Yosemite for target 10.8 (because I run my Logic on a 10.8.5 System.) This works without any problems. I did not install XCode 6.11 because there will be a upcoming new version 6.3 (because of the massive problems Apple has with Swift).
One thing I noticed in AU is, if the screensaver starts, sometimes Logic freezes with my plugin. I did not check this with your synths, but I will next week.
Thanks for the info, Peter
yeah, there was a big min/max --> fmin/fmax redo in v6.2.7 then again in v6.5. Originally I had used #defines for this, but at some point between XCode 4.x and XCode 5.x they (Apple) changed something and broke the old code, so I had to just remove all min/max stuff... And, synthfunctions.h is now added for all projects in case you want to use some of the functions inside of it, even for non-synths. There are a bunch of functions and constants for MIDI especially. I could not roll them into a new pluginconstants.h file without breaking old plugin code so opted for a separate file. The reason lookup table comes along for the ride is that it contains extremely long file lines that slow Visual Studio down to a crawl when viewing it (but not XCode).
I have not had an issue with screensaver locking plugins in Logic 9 or Logic Pro X, but I am on Mavericks still. If this happens with the GUI showing (and only in RAFX plugins) let me know - it could be a bug with VSTGUI4 in Yosemite.
Also, thanks for the info on Swift - it is in my near future and will be converting all my iOS projects for class during the spring/summer. At least Swift won't affect all the iOS AU stuff I did (since it is still C++).
one last remark regarding Swift. Swift is a clear and good looking language concept, at my opinion much better than the cryptic Objective C. But compared to C++ it is really slow. I tested a swift multiplication routine with c++ code doing the same(using the 6.00 Xcode) - and the factor was about 50. But maybe Apple improved that.
The problem with Swift and C++ is, as far as I remember, that you need a special double wrapper, to wrap C++ in Objective-C and Objective C in Swift. If you find a simpler or just a good looking solution for this wrapper, please let me know!
Most Users Ever Online: 152
Currently Browsing this Page:
Guest Posters: 2
Moderators: W Pirkle: 693