Audio::MadJACK - Talk to MadJACK server using Object Oriented Perl
use Audio::MadJACK; my $mj = new Audio::MadJACK( 'osc.udp://madjack.example.net:4444/' ); $mj->load( 'Playlist_A/mymusic.mp3' ); $mj->play();
The Audio::MadJACK module uses Net::LibLO to talk to a MadJACK (MPEG Audio Deck) server. It has an Object Oriented style API making it simple to control multiple decks from a single script.
Connect to MadJACK deck specified by oscurl. A ping is sent to the MadJACK deck to check to see if it is there. If a reply is not recieved or there was an error then undef is returned.
oscurl
undef
Send a message to the deck requesting that filepath is loaded. Note: it is up to the developer to check to see if the file was successfully loaded, by calling the get_state() method.
filepath
get_state()
Returns 1 if command was successfully received or 0 on error.
Tell the deck to start playing the current track.
Tell the deck to pause the current track.
Tell the deck to stop decoding and playback of the current track.
Tell the deck to start decoding from $cuepoint, which is the position in the track in seconds. If no $cuepoint is specified, the the deck will start decoding from the start of the track.
$cuepoint
Close the currect track loaded.
Returns the current state of the MadJACK deck. Returns one of the following strings:
- PLAYING - PAUSED - READY - LOADING - STOPPED - EMPTY - ERROR
If no reply if received from the server or there is an error then undef is returned.
Returns the a string describing the current error (if state is ERROR).
Returns the version number of the MadJACK server.
Returns the durtion (in seconds) of the current track.
Returns the deck's position (in seconds) in the current track.
Returns the file path of the track currently loaded in the deck (path will be in the same form as originally passed to load()).
If no track is currently loaded then an empty string is returned. If no reply if received from the server or there is an error then undef is returned.
Pings the remote deck to see if it is there.
Returns 1 if the server responds, or 0 if there is no reply.
Returns the OSC URL of the MadJACK deck.
Net::LibLO
http://www.ecs.soton.ac.uk/~njh/madjack/
Nicholas J. Humfrey <njh@aelius.com>
Copyright (C) 2005 Nicholas J. Humfrey
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install Audio::MadJACK, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Audio::MadJACK
CPAN shell
perl -MCPAN -e shell install Audio::MadJACK
For more information on module installation, please visit the detailed CPAN module installation guide.