Difference between revisions of "Scripting Module"

From Audacity Wiki
Jump to: navigation, search
(See also)
m (plug-in => plugin)
Line 6: Line 6:
 
==Overview==
 
==Overview==
  
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 scripting module is a GUI plugin 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.
 
The command processing runs in its own thread and forwards commands to the GUI thread.
Line 25: Line 25:
 
==Future Plans==
 
==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.  [[User:James|James]] 13:20, 1 October 2009 (CDT)
+
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 plugin that has an appropriate API.  [[User:James|James]] 13:20, 1 October 2009 (CDT)
  
 
Some possible future extensions are:
 
Some possible future extensions are:
Line 35: Line 35:
  
  
[[Category:Plug-ins]]
+
[[Category:Plugins]]

Revision as of 19:12, 29 October 2014



Overview

The scripting module is a GUI plugin 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

Rationale

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.

Details

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 plugin 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).