Creating your own Plug-in

From Audacity Wiki
Revision as of 02:48, 28 January 2008 by Edgar-rft (talk | contribs) (Nyquist: , added links to the german Nyquist documentation)
Jump to: navigation, search

Audacity is designed to support plug-in modules that extend its functionality.

Type of Plug-in Language Audacity
Version
To Set This Up for Writing Your Own
Nyquist Based on XLisp Version 0.9+ Built in to Audacity. A Separate debugger is also available.
Batch Chain None Version 1.3.0+ Built in to Audacity. The built in GUI allows you to select a sequence of existing commands, set their parameters and select a set of files to apply them to. Simple, but goes a long way.
External Script Perl See Roadmap This is based on batch chains. Currently it's a proof of concept only, for windows only. You will need a windows distribution of perl, such as ActivePerl. To work with it you'll need to be prepared to get into the C/C++ to add hooks from existing commands that aren't yet available.
LADSPA C/C++ development Version 0.9+ Needs LADSPA SDK (Open Source) to develop.
VST C/C++ development Version 0.9+ Compile Audacity with VST enabled. Needs VST SDK (Proprietary) to develop, for which you need a license agreement.
Vamp C/C++ development Version 1.3.4+ Vamp SDK is provided as part of Audacity source code.
Hi-Jacker C/C++ development See Roadmap Same as for Audacity development under windows, i.e. MSVC 2005 C/C++, wxWidgets, Audacity source code retrieved via CVS from sourceforge.
wxWidgets Plug-in C/C++ development See Roadmap Same as for Audacity development under windows, i.e. MSVC 2005 C/C++, wxWidgets, Audacity source code retrieved via CVS from sourceforge.


How to choose which kind? It depends so much on what you want to do and what your programming background is. The big choice is between C/C++ or a scripting language. You can get started much much faster with any of the scripting, i.e. Nyquist, Batch Chains or Perl script, however you lose some flexibility in what you can do. Ladspa, VST and Vamp plug-ins are all usable in other programs besides Audacity, which is a big plus. However you can only use them as effects to alter sound or analyse it, not to add new toolbars to Audacity.

There isn't yet a lot of documentation on developing for Audacity. We're hoping to gradually improve that with a developer guide. See that page for details.


Script

Nyquist

There is a built in XLisp interpreter that is used mainly for creating new sound effects. It can also be used to create labels. It's mature, stable, and has been in Audacity from the start. See Nyquist . Updated Nyquist documentation is available in the german forum  (documents are in english language).

Batch Chains

Limited ability to do 'the same thing' to a large number of files. Originally written for cleaning up lots of audio tapes, applying noise removal, removing long silences too and converting to mp3. Stable, but quite limited in what it can do.

Perl

Still very very experimental. It's windows only. Under windows you can use ActivePerl to drive Audacity. To use this (August 2007) you should be an experienced C++ developer too, as you will almost certainly need to add code into Audacity to process commands which are not yet handled. You will need to compile the Debug-wx284 version of the project from CVS in visual studio. We'd welcome help in getting this feature from proof of concept stage to being ready for general users.

Other Plug-Ins

LADSPA

Sound effects. C or C++, Ladspa Plug-in. GUI is built from simple instructions.

VST

VST Plug-in. GUI is built by the plug in directly.

Vamp

C or C++. GUI is built from simple instructions. Similar in concept to LADSPA except this it is designed particularly for analysis of sound, so for example finding particular words in a spoken text. Vamp is a recent addition to Audacity. CVS head now has Vamp support compiled in by default. Vamp is written by Chris Cannam who developed it for his Sonic Visualiser program. The plug-ins work both in his visualiser and in Audacity. If you're interested in developing a new vamp plug in for Audacity you should join the audacity developer list.

Hi-Jacker

Plug-In that takes over the entire GUI of Audacity and uses the underlying services for its own ends. (not to be confused with 'Jack'). This has been used successfully in the audacity-extra project on sourceforge. The code to support hijacking plug ins is in CVS head but is not compiled in by default.

wxWidgets Plug-In

Work in progress. It's windows only at the moment. A still experimental method for adding any feature to Audacity as a plug in. The plug in can use any feature of wxWidgets, and it will have a more complete API for interaction with the Audacity program as it develops.

The code was originally developed at audacity-extra and moved to Audacity. For windows developers it can be used by compiling the Debug-wx284 version of the project in Visual Studio. The support for scripting in Perl is written as a wxWidgets plug in and can serve as a basis for other plug-ins.