... write a plugin?

Hello forum,

I am brand new to Ardour due to a class in uni, where we shall portrait different Open Source projects. To get the points we are obliged to participate in those projects. On a first thought I decided to try programming a plugin for an open source DAW. Since reaper isn’t open source, I am lucky to have stumbled across Ardour, which seems to fit perfectly for this kind of project.

The problem is though: I don’t have a clue, where to start. I have your basic knowledge in C and SDL, but that’s pretty much it. On the other side I am highly motivated to do this, since I always wanted to do some sort of plugin for a DAW. The kind of plugin has yet to be decided, but there’s a whole semester coming, so I guess, I have one or two moments to spare.

My question is now: Who can give me starting points, hints and tips on this topic? Who might have done one by himself and can help me to get the whole process rolling? I am especially interested in the way I will have to implement it in Ardour and all this structural aspect. But the most important question maybe: Where do I start?

If this doesn’t seem too douchy to you, I am grateful for any advice and help you can offer me.

best, Malte

I am not a developer so can’t give you any specific information about writing a plugin, but hopefully this helps as a starting point.

Plugins in Ardour are usually in the LV2 format (it also supports the older LADSPA format. Plus when running on OSX it can use AudioUnit plugins.) More info at http://ardour.org/plugins

(Note that because Ardour uses JACK you can also run Linux VSTs or even some Windows VSTs in an external host and route to and from them from Ardour.)

With that in mind a good place to start would be at the LV2 site - http://lv2plug.in - this site contains info and documentation about the LV2 format as well as some example plugins that would probably be useful to you.

Also there are quite a few LV2 plugins that are open source, they might be useful as reference too.

Good luck!

One type of plugin that is severely lacking in our community is a spectrum analyser plugin, in that we don’t actually have any. So if you want an idea for a plugin, that would be great.

Definitely use LV2 as your platform, it is much better than LADSPA from a user standpoint.

While the above may be true, from a developer’s point of view (and particularly if you’re inexperienced) LADSPA plugins are much easier to write, since you don’t have to worry about all the UI stuff - the host application takes care of presentation for you.

To be honest, as a user, I prefer the complete consistency between plugin UIs that LADSPA gives you as well, but that’s not the point here.

There is an enormous number of open-source LADSPA plugins, and I feel that studying the source code for some of them would be your best starting point. Try following the links from the plugins page on the Ardour site. Some of the SWH LADSPA plugins are incredibly simple - try looking at his “Matrix” plugins

the host can do the GUI for LV2 plugins as well (and Ardour does). the difference is that LADSPA doesn’t make it possible for the plugin to provide its own GUI, whereas LV2 makes it an option.


The problem is though: I don't have a clue, where to start. I have your basic knowledge in C and SDL, but that's pretty much it

I admire your enthusiasm, but, If I had a pound / euro / dollar for every time I’ve seen similar posts on forums, by people who think that that somehow qualifies them to write plugins, I’d make considerably more money than the little I do from actually writing plugins…

To someone who has spent a long time learning how to (I hope) get this right, this trivialises what is a very complex discipline.

I don’t want to be negative, or discouraging - but if you want to write anything useful (other than a simple ‘gain’ plugin, and its possible to get that wrong in more ways than you might imagine possible, then you will need to spend a lot of time learning about the DSP that makes real plugins work before attempting anything or it will be a complete waste of time.

The GUI is optional but…


I prefer the complete consistency between plugin UIs that LADSPA gives you as well

That’ll be the same consistency that makes LADSPA UIs look completely different on different hosts (and sometimes on different versions of the same host) or at best renders all the controls in such a ‘generic’ way that it’s impossible to quickly identify one grey / blue slider from another - especially when some controls just have arbitary parameters (e.g. EQ frequency 0… to 1.0)

For a simple EQ or Gain it might just be ok, but I wonder how easy it would be to use something like my graphical EQ without the custom UI (ten bands, three parameters per band, and on / off / filter type for each band - so, well in excess of thirty sliders, which all look the same and are probably rendered in some completely arbitary order)

Some of the SWH LADSPA plugins are incredibly simple

Which is why almost all of the ones I’ve tried have some ‘warning’ about not doing something or other with them which might cause them to blow up or go unstable - in fairness, as I understand it, the SWH plugins were mostly designed as some very basic building blocks, but with all due respect, I would hesitate to recommend them as a template for a (professional) plugin design.


One type of plugin that is severely lacking in our community is a spectrum analyser plugin

True - and it would be a great addition to the stock of LV2 plugins (when I last looked at adding some similar functionality to my graphical EQ, I found that there was a significant problem with transfering the FFT data between the plugin UI and the DSP code using the LV2 mechanisms available. (I hope) that may have changed now, in which case it wouldn’t be too difficult for someone with DSP experience to do (but it’s also not too difficult for someone without DSP experience to get it badly wrong)

Just for the record there is a LV2 sprectral analyser, the Invada Meter plugin. Could be a good jumping-off point to learn more about plugins.

Yeah, as a guy who grew up on hardware devices (like a compressor for example) the LADSPA interface is torture. Being able to look at a GUI that resembles a real compressor makes using it a million times easier for me.

Hi Malte,

I want to welcome you here and thank you for your interest! Initially, I only wanted to respond to this general discussion about plugins (so this is what first came to my mind):

Rather a sidenote, but this comment got my attention:

Which is why almost all of the ones I've tried have some 'warning' about not doing something or other with them which might cause them to blow up or go unstable - in fairness, as I understand it, the SWH plugins were mostly designed as some very basic building blocks, but with all due respect, I would hesitate to recommend them as a template for a (professional) plugin design.

This is the main reason I actually don’t care about how much plugins for Linux cost. I never had any major issues with LinuxDSP’s plugins. I use them because they are very good sounding, but I oftentimes don’t even look at the pricing because I am so happy something like this works smoothly. I had so many issues with plugins going rogue, giving me +300dbfs spikes etc.
Some of the best free plugins I know are the Calf plugins, but the current release is very outdated, and the brand new stuff from git is rather unstable, so…
I could even compile a long list of LADSPA plugins I have tried and wasn’t able to even proximately find out what purpose they have.

So while I appreciate it a lot that free plugins are made, I think that new plugin developers should stick to rather simple tasks. I can’t say what that is, but don’t expect to do something groundbreaking.

I am a user and tester, not a developer. I really think it’s great that people get to hear about Ardour and want to participate, so thanks. Just don’t raise the bar too high for yourself and really check out what is possible and what not. The people on the IRC channel are very friendly and helpful, even to bugging people as myself, so I think with a little patience, you can get some more advices there.


edit: That said, we are in need of more plugins :slight_smile: So maybe it’s a good idea to list some more plugins that are needed. Just an example: Exciters/enhancers are very rare. I know how to create one via a high/lowpass filter an the harmonics generator, but it’s rather time consuming in my opinion. It would even help me if one could simply combine theses two and make some tweaks.

I was wondering whether a good starting point will be to take an open source Windows VST plugin, study it and port it to Linux VST plugin.
To get some merit for originality you could add something the other plugin did not have.

@linuxdsp: I didn’t know that limitation of LV2, that is quite frustrating as it is the only plugin I sorely need. At the moment I route the output of the channel in to Renoise and use that progam’s built in one as it is very good and allows you to show two channels at a time.

@christophski: That limitation may no longer be an issue. It’s been a while since I last looked at whether it would be possible, so there may have been additions / changes to LV2 which now make it easier. With linuxVST it’s not a problem, so that would be another option now that ardour (A3) has linuxVST support. The fact that the invada plugins can do it suggests it can be made to work, but they use a different (GTK only) UI extension.

Join the lv2 mailing list here: http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in
Check out the lv2 main site here: http://lv2plug.in/trac/
LV2 live documentation can be found here: http://lv2plug.in/ns/

LV2 strongly relies on ttl files, so at least a little basic knowledge about the turtle language would be an advantage.
The w3c docs are here: http://www.w3.org/TeamSubmission/turtle/

The plugins themselves are written in c.

Some example plugins can be found here: http://lv2plug.in/repo/trunk/plugins/

Hope this helps…

Indeed a professional spectral analyser is missing, that’s a pity. I think a of people would like to have one, in my opinion a professional plugin has it’s price and guys who want it seriously are willing to pay for that (me included). The Invada thing is … nice, but far from a professional usage, sorry for that.

I kindly asked the Mixbus people for a spectrum analyser plugin, so maybe Mixbus owners join me in that request.

Yours Prof Knaakenbroed

Surprised Fons doesn’t have one. That’s right up his alley.

thanks for all the replies so far. due to a week in the hospital i have not been able to answer earlier, but we’ve all got a life ourselves after all, haven’t we.

first things first: thanks for all the advice on ladspa and lv2. at this point i think i’m going with ladspa, just because it looks a bit more like a moderate entry level. i mean, it depends of course, but you might catch my drift.

secondly: i do not want to deliver quality work on the spot. as i said this whole thing is explicitly new to me. it is more like a starting point, from which on better things can grow. or something like that. you must not forget, it’s just a project for school. however, this doesn’t mean that once it’s done i am through with it and all i have left is some crappy plugin no one needs. i have been interested in this whole recording thing for quite some time now and long before i started studying computer sience. so you might expect something more out of it than just a simple gain, haha. but as said before: give it some time.

that leads me to point three: i was thinking about doing a sidechain plugin, because thats just state of the art producing stuff, and not just for electronica. but since this will surely take some time, i am going to try some simpler ideas first.

since my lecturer said that it would even be okay if it took me a year or more to get it done, i am just going to see what i can accomplish. thanks again for the advice and i hope, that sometime around winter there may be some results.

sidechain plugin like Xfer’s LFOTool?