Difference between revisions of "Creating your own Plug-in"
(Added table of what you need to develop Plug-ins) |
PeterSampson (talk | contribs) (→Audacity Modules: stale cruft removal) |
||
(43 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
− | Audacity is designed to support plug- | + | __NOTOC__ |
+ | {{IntroNoItal|Audacity is designed to support plug-ins that extend its functionality. Always checkout Audacity from the [https://web.audacityteam.org/community/developers#svn latest development code] when creating your own plug-ins.}} | ||
{| border="1" cellspacing="0" cellpadding="5" align="center" | {| border="1" cellspacing="0" cellpadding="5" align="center" | ||
! Type of Plug-in | ! Type of Plug-in | ||
! Language | ! Language | ||
− | ! To Set | + | ! To Set Up for Writing Your Own |
|- | |- | ||
| Nyquist | | Nyquist | ||
− | | | + | | Nyquist |
− | + | | Nyquist is based on XLisp, and Audacity has a built-in interpreter. Nyquist plug-ins are text files with file type ''.ny''. A separate debugger is also available. | |
|- | |- | ||
− | | Batch | + | | Batch Macro |
| None | | None | ||
− | | Built | + | | Built into Audacity. The 'Macros...' command in the Tools menu 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 | + | | External [https://manual.audacityteam.org/man/scripting.html Script] |
| Perl | | Perl | ||
− | | | + | | This was originally based on batch chains and has been much extended. You will need a distribution of Perl, such as on Windows ActivePerl. |
|- | |- | ||
| LADSPA | | LADSPA | ||
− | | C/C++ | + | | C/C++ |
| Needs LADSPA SDK (Open Source) to develop. | | Needs LADSPA SDK (Open Source) to develop. | ||
+ | |- | ||
+ | | LV2 | ||
+ | | C/C++ | ||
+ | | A more advanced evolution of the LADSPA plug-in architecture. | ||
|- | |- | ||
| VST | | VST | ||
− | | C/C++ | + | | C/C++ |
− | | Compile Audacity with VST enabled. Needs VST SDK ( | + | | Compile Audacity with VST enabled. Needs VST SDK (proprietary) to develop, for which you need a license agreement. |
|- | |- | ||
| Vamp | | Vamp | ||
− | | C/C++ | + | | C/C++ |
| Vamp SDK is provided as part of Audacity source code. | | Vamp SDK is provided as part of Audacity source code. | ||
|- | |- | ||
| Hi-Jacker | | Hi-Jacker | ||
− | | C/C++ | + | | C/C++ |
− | | Same as for Audacity development. | + | | Same as for Audacity (e.g., [[Developing On Windows|development under Windows]]), i.e. MSVC C/C++, wxWidgets, Audacity source code retrieved from code repository. |
|- | |- | ||
− | | | + | | Audacity Modules |
− | | C/C++ | + | | C/C++ |
− | | Same as for Audacity development. | + | | Same as for Audacity (e.g., [[Developing On Windows|development under Windows]]), i.e. MSVC C/C++, wxWidgets, Audacity source code retrieved from code repository. |
|- | |- | ||
|} | |} | ||
+ | <br> | ||
+ | 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. Generally, you can get started much much faster with any of the scripting languages, however you lose some flexibility in what you can do. LADSPA, VST and Vamp plug-ins are all usable in other applications 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 gradually improving our [[Developer Guide|developer guide]]. | ||
− | =Script= | + | ==Script== |
− | ==Nyquist== | + | ===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. | + | 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 [[:Category:Nyquist|Nyquist]]. The Nyquist manual is available on the [https://www.cs.cmu.edu/~rbd/doc/nyquist/ CMU website]. |
− | ==Batch | + | ===Batch Macros=== |
− | 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 | + | 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 limited to 'doing the same thing' over and over. |
− | ==Perl== | + | ===Perl=== |
− | Still | + | Still somewhat experimental. More information [https://manual.audacityteam.org/man/scripting.html here]. It's best to ask on the developer list before getting into this. |
− | =Other Plug- | + | ==Other Plug-ins== |
− | ==LADSPA== | + | ===LADSPA=== |
Sound effects. C or C++, [[Ladspa Plug-ins|Ladspa Plug-in]]. GUI is built from simple instructions. | Sound effects. C or C++, [[Ladspa Plug-ins|Ladspa Plug-in]]. GUI is built from simple instructions. | ||
− | ==VST== | + | ===VST=== |
− | [[VST Plug-ins|VST Plug-in]]. GUI is built by the plug in directly. | + | [[VST Plug-ins|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 application. 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 {{external|[http://lists.sourceforge.net/lists/listinfo/audacity-devel Audacity developer's list]}}. | ||
− | == | + | ===Hi-Jacker=== |
− | + | Plug-in that takes over the entire GUI of Audacity and can use the underlying services for its own ends (not to be confused with the POSIX sound server called {{external|[http://jackaudio.org/ Jack]}}). Hi-Jacker has been used successfully in the [[Audacity-Extra]] project on Sourceforge. Hi-Jacker has the ability to hide and show the default user interface for Audacity, making it particularly suited for experiments with new track panels. | |
− | == | + | ===Audacity Modules=== |
− | + | Work in progress, a proof-of-concept on Windows, Linux and Mac. It's a still experimental method for adding any feature to Audacity as a plug-in. The plug-in can use any exposed feature of Audacity, and of wxWidgets. The API for modules changes with updates to Audacity source code. We plan to move towards a defined and stable API for interaction with the Audacity application as we develop this further. | |
− | + | We highly recommend the main trunk of the current code repository as the basis for developing new modules. See [[Modular Architecture Initiative]] for an overview. | |
− | + | [[Category:Architecture]] | |
+ | [[Category:For Developers]] | ||
+ | [[Category:Plug-ins]] | ||
+ | [[Category:Nyquist]] |
Latest revision as of 09:39, 13 October 2020
Audacity is designed to support plug-ins that extend its functionality. Always checkout Audacity from the latest development code when creating your own plug-ins. |
Type of Plug-in | Language | To Set Up for Writing Your Own |
---|---|---|
Nyquist | Nyquist | Nyquist is based on XLisp, and Audacity has a built-in interpreter. Nyquist plug-ins are text files with file type .ny. A separate debugger is also available. |
Batch Macro | None | Built into Audacity. The 'Macros...' command in the Tools menu 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 | This was originally based on batch chains and has been much extended. You will need a distribution of Perl, such as on Windows ActivePerl. |
LADSPA | C/C++ | Needs LADSPA SDK (Open Source) to develop. |
LV2 | C/C++ | A more advanced evolution of the LADSPA plug-in architecture. |
VST | C/C++ | Compile Audacity with VST enabled. Needs VST SDK (proprietary) to develop, for which you need a license agreement. |
Vamp | C/C++ | Vamp SDK is provided as part of Audacity source code. |
Hi-Jacker | C/C++ | Same as for Audacity (e.g., development under Windows), i.e. MSVC C/C++, wxWidgets, Audacity source code retrieved from code repository. |
Audacity Modules | C/C++ | Same as for Audacity (e.g., development under Windows), i.e. MSVC C/C++, wxWidgets, Audacity source code retrieved from code repository. |
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. Generally, you can get started much much faster with any of the scripting languages, however you lose some flexibility in what you can do. LADSPA, VST and Vamp plug-ins are all usable in other applications 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 gradually improving our developer guide.
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. The Nyquist manual is available on the CMU website.
Batch Macros
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 limited to 'doing the same thing' over and over.
Perl
Still somewhat experimental. More information here. It's best to ask on the developer list before getting into this.
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 application. 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's list .
Hi-Jacker
Plug-in that takes over the entire GUI of Audacity and can use the underlying services for its own ends (not to be confused with the POSIX sound server called Jack ). Hi-Jacker has been used successfully in the Audacity-Extra project on Sourceforge. Hi-Jacker has the ability to hide and show the default user interface for Audacity, making it particularly suited for experiments with new track panels.
Audacity Modules
Work in progress, a proof-of-concept on Windows, Linux and Mac. It's a still experimental method for adding any feature to Audacity as a plug-in. The plug-in can use any exposed feature of Audacity, and of wxWidgets. The API for modules changes with updates to Audacity source code. We plan to move towards a defined and stable API for interaction with the Audacity application as we develop this further.
We highly recommend the main trunk of the current code repository as the basis for developing new modules. See Modular Architecture Initiative for an overview.