Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Small problems with AU Export
No permission to create posts
February 22, 2015
4:52 pm
Avatar
Peter
Member
Members
Forum Posts: 41
Member Since:
September 12, 2013
sp_UserOfflineSmall Offline

Hi Will,

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?

regards

Peter

February 22, 2015
9:37 pm
Avatar
Peter
Member
Members
Forum Posts: 41
Member Since:
September 12, 2013
sp_UserOfflineSmall Offline

Hi Will,

forget about the Aftertouch/Modwhell problem, this was a hidden misconfiguration in my Logic MIDI Setting, sorry for this!

kind regards

Peter

February 23, 2015
8:59 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

Hi Peter

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.

- Will

February 24, 2015
5:42 pm
Avatar
Peter
Member
Members
Forum Posts: 41
Member Since:
September 12, 2013
sp_UserOfflineSmall Offline

Hi Will,

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.

kind regards

Peter

February 24, 2015
8:24 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

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++).

Thanks,

Will

February 27, 2015
9:32 pm
Avatar
Peter
Member
Members
Forum Posts: 41
Member Since:
September 12, 2013
sp_UserOfflineSmall Offline

Hi Will,

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!

regards

Peter

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online:
2 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 476

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 482

Posts: 1876

Newest Members:

sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 143