Jonathan Stowe > Audio-Ardour-Control-0.20 > Audio::Ardour::Control

Download:
Audio-Ardour-Control-0.20.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.20   Source  

NAME ^

Audio::Ardour::Control - Automate the Ardour DAW software.

SYNOPSIS ^

  use Audio::Ardour::Control;

  my $ardcontrol = Audio::Ardour::Control->new($url);

  $ardcontrol->rec_enable_toggle();
  $ardcontrol->transport_play();
  # do stuff
  $ardcontrol->transport_stop();

DESCRIPTION ^

Ardour is an open source digital audio workstation software (DAW) for Unix-like systems, it provides an interface to allow it to be controlled using the Open Sound Control (OSC) protocol. This module uses OSC to enable control of Ardour from a Perl program.

The methods below represent all of the actions exposed by Ardour via OSC, for more detail on what they actually do you probably want to refer to the Ardour documentation.

METHODS

new

Construct a new Audio::Ardour::Control object. The only argument is the URL of the Ardour OSC instance in the form osc.udp://<hostname:<port>/>, this is printed to STDERR by Ardour when the OSC is enabled. For versions of Ardour from 2.2 onwards the URL will be written to a file in the user specific config directory and an attempt will be made to determine the URL from that source, if it is not present and no URL has been specified as an argument then this will croak.

add_marker

Adds a new location marker at the current location of the playhead.

loop_toggle

This toggles the effect of the loop range, if loop is on then transport_play will loop over the defined loop range.

goto_start

Reposition the playhead at the start of the tracks.

goto_end

Reposition the playhead at the end of the session - (i.e. the "End" marker)

rewind

Roll the transport backward at twice the standard transport speed.

ffwd

Roll the transport forward at twice the standard transport speed.

transport_stop

Stop the current motion of the transport.

transport_play

Start playing.

set_transport_speed

Set the transport speed for use by other operations. The argument is a floating point number, where 0 is stopped and 1 is normal speed.

save_state

Cause the session to be saved.

prev_marker

Move the playhead to the previous location marker.

next_marker

Move the playhead to the next location marker.

undo

Undo the last action.

redo

Repeat the last action.

toggle_punch_in

Switch the punch in point on or off.

toggle_punch_out

Switch the punch out point on or off.

rec_enable_toggle

Toggle the global record arming.

toggle_all_rec_enables

Toggle the track record enables. The track enables will not turn *off* unless global record arming is set (i.e. the big record button is highlighted.)

INTERNAL METHODS

The below methods are used internally and might not be useful for general use unless you are sub-classing or extending this module.

url

Get and/or set the URL to connect to the instance of Ardour we want to control.

If the url is not specifiied and has not been previously set then discover_url() will be called. It will return undef if no URL can be found.

discover_url

Attempt to read the URL from the $HOME/.ardour2/osc_url file, returns undef if the file doesn't exist.

This will not work for Ardour versions earlier than 2.2

send

Send a request to the OSC host. The arguments are the OSC path and the arguments for the call.

lo

Get and/or set the underlying Net::LibLO object that we are using.

address

Get and/or set the Net::LibLO::Address object based on the URL of the Ardour OSC instance that we are going to use. If the address has not previously been set then a new object will be created.

EXPORT

None.

BUGS AND SUPPORT ^

Some of the control methods might not work in the version of Ardour that you are using.

The OSC support in Ardour and this module should be considered experimental, you almost certainly don't want to use this on any important Sessions without thorough testing.

Please provider full details of the version of Ardour you are using if you want to report a bug. Also please feel free to tell me which bits *do* work along with the version of Ardour :-)

SEE ALSO ^

Net::LibLO, Ardour documentation http://www.ardour.org, OSC <http://opensoundcontrol.org/>

AUTHOR ^

Jonathan Stowe, <jns@gellyfish.com>

COPYRIGHT AND LICENSE ^

Copyright (C) 2008 by Jonathan Stowe

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: