#2 XMMS Music detection

open
nobody
None
5
2003-04-04
2003-04-04
Andy Brown
No

A suggestion to interface with XMMS to detect currently
playing music. Also an example implementation which
could be used possibly??

Using the perl module XMMS (cpan downloadable as
'install Xmms') you can retrieve info on currently
running instances of xmms and query, so the following
may provide the facility:

perl -MXmms -e "info"

Which returns:

File........./home/browna/mp3/lime/Christina Aguilera -
11 - Beautiful.mp3
Size......... 5.5M
Modified.....Fri Mar 28 15:35:24 2003
Album........Stripped
Artist.......Christina Aguilera
Comment......www
Genre........Pop
Title........Beautiful
Tracknum.....11
Year.........2002
Time.........3:58
Frequency....44.1
Stereo.......1
Bitrate......192
Layer........3
Version......1

So it should be fairly easy to trigger this when the
main window is displayed and strip the Artist/Title and
throw them into the Music field.

Andy.
(http://www.thebmwz3.co.uk - webjournal)

Discussion

  • Andy Brown
    Andy Brown
    2003-04-04

    Logged In: YES
    user_id=124148

    Actually, on closer inspection, perhaps the following would
    be more usefull:

    perl -MXmms -e "current"

    which output:

    24 - like a prayer - mad house
    [5:08/5:17 (97%)] [128 kbps][44 kHz][stereo]