Audio Player Plug-ins

There are HomeVisionXL plug-ins for several popular audio players: You can control the audio player of your choice from HomeVisionXL by installing the appropriate plug-in. The plug-ins for all audio players behave pretty much the same towards the outside world. As a result you will not be sentenced to use a specific audio player just because you did all the programming for it in your schedule and control plug-in. Simply switch to another audio player plug-in when you switch audio players and the major functions will still work.

Controlling the audio player from within the schedule is done by sending serial strings to the main serial port. The following commands are supported:

music play
start or restart playback
music pause
pause playback
music resume
resume playback after pausing
music toggle
pause or resume playback depending on the current state
music stop
stop playback
music next
jump to the next song in the playlist
music prev
jump to the previous song in the playlist
music delete
delete the current song from the playlist
music finish
stop playback when the current song finishes and terminate the audio player application, if possible.
volume up
increase volume by 5% of maximum volume
volume down
decrease volume by 5% of maximum volume
volume <level>%
set the volume level between 0 and 100
playlist "<name>"
start playing the named playlist
Examples:
   Serial port 1: Transmit string 'music stop'
   Serial port 1: Transmit string 'volume 80%'
   Serial port 1: Transmit string 'playlist "Rock"'

Interaction with other plug-ins

The different audio player plug-ins can be used in combination with other plug-ins. All audio player plug-ins add the MusicCommand command. They also invoke the MusicEvent command to notify other plug-ins of certain events. The MusicCommand command supports the same actions as the serial commands described above (but dropping the "music", if present). The MusicEvent command is invoked with one or more arguments. It is called in two situations:
trackchange
The current track has changed
finished
The song has ended after a finish command
The MusicCommand command supports the same actions as the serial commands described above. However, when calling the MusicCommand, omit "music", e.g.: MusicCommand next and MusicCommand pause, but MusicCommand volume up.

Control plug-in interworking

The audio player plug-ins advertise the MusicCommand command to the Control plug-in, resulting in the following additional commands that can be used in the actions attached to control plug-in widgets:
  • MusicCommand("play")
  • MusicCommand("pause")
  • MusicCommand("resume")
  • MusicCommand("toggle")
  • MusicCommand("stop")
  • MusicCommand("next")
  • MusicCommand("prev")
  • MusicCommand("delete")
  • MusicCommand("finish")
  • MusicCommand("volume","up")
  • MusicCommand("volume","down")
  • MusicCommand("volume",<level>)
  • MusicCommand("playlist","<name>")

The audio player plug-ins also report information about the current state of the audio player back to the Control plug-in. The following control variables will be updated as appropriate by the audio player plug-ins:

wavolume
wastatus
watrack
walength
waartist
watitle
waalbum
washuffle

Audio Player plug-in specifics

Media Player Remote Interfacing Specification (MPRIS)

The MPRIS plug-in supports audio players that conform to either the MPRIS 1.0 standard or the MPRIS 2.1 standard. This includes Amarok 2, VLC, Audacious, and Rhythmbox, but perhaps surprisingly, not xmms2.

Amarok

The HomeVisionXL Amarok plug-in only works with Amarok 1. Amarok 2 supports the MPRIS 1.0 standard for media players (see above).

The Amarok plug-in comes with a Tcl script that needs to be installed in Amarok to work. This means that a suitable version of tclsh must be present on your computer. On most Linux installations that will normally already be the case.

X Multimedia System

The XMMS Control plug-in for HomeVisionXL works together with the Inet Control plugin for XMMS by Gerry Duprey. Unfortunately the Inet control plugin crashes XMMS on recent linux installations and neither the plugin nor XMMS appear to be maintained any longer. Audacious is probably a good choice for people looking for an alternative.

WinAmp

To use the HomeVisionXL WinAmp plug-in also on the WinAmp side a plug-in is needed: The ActiveWinAmp plug-in.

The WinAmp plug-in will only work on various Microsoft Windows platforms, which I don't use myself. As a result, the initial version of the plug-in was only an example of the possibilities. The example code was extended by Bob Gardner.

iTunes

There are versions of the iTunes audio player for two platforms: Mac OSX and Windows. The HomeVisionXL iTunes-Win plug-in only works with the Windows version. There is currently no HomeVisionXL plug-in for the Mac OSX version.

Last modified: 19 February 2011, 14:00 CET