Scripting Module

From Audacity Wiki
Jump to: navigation, search


The scripting module is a GUI plug-in for Audacity that uses named pipes to receive commands (typically from a perl script) and sends responses back. There is a pipe for sending and a pipe for receiving.

The command processing runs in its own thread and forwards commands to the GUI thread.

Written By


This module allows any script language that supports pipes to be used to drive Audacity. We deliberately did not introduce subroutines loops or conditional control steps into the built in batch chains feature. We wanted to avoid building a new custom language into Audacity and to allow users to choose Perl, Python, Tcl, Ruby, Lua or whatever scripting language they liked best. We already have Nyquist as an internal language specifically for building complex audio effects.


Future Plans

I am keen to keep the protocol low volume, textual and human readable. It's a simple high level control protocol. It ought to be usable 'in a terminal window'. I do not want to start mutating it into a binary interface or to be adding support for high-volume data. High volume data will generally be better handled by a custom plug-in that has an appropriate API. James 13:20, 1 October 2009 (CDT)

Some possible future extensions are:

  • Ability (user option) to give progress information (as series of dots)
  • Ability to interrupt a command, e.g by control-C
  • Wait-for-event command so that Audacity contacts the script when some event (such as playback finished, or clipping has occurred, or user creates a new track).