Page 1 of 2

Rewriting plugins for Mac/AU

Posted: Tue Jun 17, 2014 11:43 am
by user_fm
Would be stupid to ask about AU-export again, even the hope is dead.

Just decided to rewrite my plugs made in FS with another software development tool to be able to export audio units for MAC. Unfortunatelly I'm not good in coding, graphical programming was brilliant, but I have to give it a try.

Could anyone who did this already share the experiance which way is better, what software to use, where to start from?

Thanx.

Re: Rewriting plugins for Mac/AU

Posted: Tue Jun 17, 2014 1:57 pm
by CoreStylerz
Take 1-2 years of time and go straight forward to Juce framework.
This means learn c++, learn juce objects and methods and so on..

Then use visual c++

Re: Rewriting plugins for Mac/AU

Posted: Tue Jun 17, 2014 2:53 pm
by Tzarls
For Mac you´ll have to use the XCode IDE. I remember reading that there are some sample projects included to show how to make a simple AU plugin. You can then continue from there.

Re: Rewriting plugins for Mac/AU

Posted: Tue Jun 17, 2014 9:58 pm
by Nubeat7
youalso can use code::blocks on mac but xcode has also the core audio sdk included which is the audio plugin sdk for mac - like vst sdk - (you also will need the core audio utility classes extension for the core audio sdk)

with juce you do all projects as 'introjucer' project and compile it on the plattform and plugin format you wish, it is pure programming and you will need pretty good c++ coding skills

Re: Rewriting plugins for Mac/AU

Posted: Wed Jun 18, 2014 6:02 am
by billv
CoreStylerz wrote:This means learn c++

That's what i always thought, but i just found this stuff online saying
you can do it in Visual basic... :o :shock: ....so now I'm a bit confused :?

Can anyone verify this or shed some light.???
http://www.daniweb.com/software-development/vbnet/threads/132719/vst-programming-in-visual-basic

Here's a snippet....

That seems to be for C++ and C only. Where is the Visual Basic part?

The VB.NET part is where you write your plugin in. VST.NET Interop is a C++ mixed (both native and managed code in there) assembly. But the Core and Framework assemblies are C#. Your managed plugin assembly would be in VB.NET (or C#, or whatever).

The only time when you get into contact with the Interop assembly is when you rename it to the file name of your plugin. Your managed assembly that contains your plugin will have a .net extension (just before the .dll). So if your plugin is called "MySynth". You rename the Interop dll to MySynth.dll and your own plugin dll to MySynth.net.dll. This naming scheme is used for the loader to find and load your managed plugin assembly.

It's fairly easy to setup a a skeleton plugin in VB.NET (or any other .NET language).
You need a public class that implements the IVstPluginCommandStub interface that will be created by the Interop assembly. Derive this public class from the StdPluginCommandStub class that can be found in the Framework (Plugin namespace).
The public PluginCommandStub class you implement overrides a method to create the plugin root class instance. This is the object that implements IVstPlugin. From that point on you have to decide what VST feature you need or want to support. For each feature, the VST.NET Framework declares an interface that you can implement.

Check out the codeplex site home page, there are links there with additional information. Especially check out the VST Resources page, it links to a couple of blog posts I wrote to explain certain aspects further.

Do not hestate to drop questions you might have on the Discussion List on the codeplex site.
There everyone can benifit from the answers.

So, to recap. Yes VST.NET uses C/C++ but you dont need to touch that or even know how it works (although the source code is available) and the Core and Framework are written in C# but that is exposed as managed class, so there should be no problem consuming those in VB.NET.

Re: Rewriting plugins for Mac/AU

Posted: Wed Jun 18, 2014 6:28 am
by billv
Yeh...it looks real.. :D
http://vstnet.codeplex.com/

Re: Rewriting plugins for Mac/AU

Posted: Wed Jun 18, 2014 6:58 am
by Tzarls
But OP asked for Mac/AU, and this is Windows/Vst?

Re: Rewriting plugins for Mac/AU

Posted: Wed Jun 18, 2014 7:47 am
by billv
Tzarls wrote:But OP asked for Mac/AU, and this is Windows/Vst?

yeh your right...maybe exo can delete my posts...
although there are some options to run VS on mac i saw online....

Re: Rewriting plugins for Mac/AU

Posted: Wed Jun 18, 2014 9:54 am
by CoreStylerz
I believe the most time saving thing is to use a framework that interface with AU/VST with same code.
I mean all things like PPQ, Sample Rate, GUI, Folders etc etc...
In that case, juce seems the way or iPlug (dunno if still supported in dev. by Cockos).

Plugins making seems to concern c++ programming, aswell as ASM optimizations and coding.
Probably this because plugins won't have super long code, and requires performances to be played realtime.

There's a wide number of alternatives but for what i've see all limitied.
Java (probably one of the best especially on compatibility)
http://jvstwrapper.sourceforge.net/

Ruby (most java)
https://github.com/thbar/opaz-plugdk

.NET (Win only)
http://vstnet.codeplex.com/

Frameworks
WDL (cockos)
http://cockos.com/wdl/
Juce
http://www.juce.com/about-juce

Other tools/languages
Faust
http://faust.grame.fr/
Max - Gen~
http://cycling74.com/products/gen/

Re: Rewriting plugins for Mac/AU

Posted: Wed Jun 18, 2014 11:09 am
by Exo
Check out these tutorials Making Audio plugins

Has everything you need to know to get started and using a cross platform library.