[mpg123-devel] OSC for mpg123 (experimental)
Brought to you by:
sobukus
From: <to...@tr...> - 2012-05-01 15:50:21
|
Hi, in order to control the mpg123 player with OSC (Open Sound Control), i tried to modify the control_generic.c interface and it seems to work OK. For anyone interested to test, this is how to proceed (for current version 1.15.0): Install liblo -http://liblo.sourceforge.net/ from source or with the package manager of your choice Get mpg123 source $ svn co svn://scm.orgis.org/mpg123/trunk Copy attached files -osc.h -control_generic.c -mpg123.c -configure.ac to src/ (diff or meld to see difference) then issue $ autoreconf -iv $ ./configure if all went fine, you should see Liblo ................... enabled OSC control interface ... enabled $ make $ sudo make install $ /usr/local/bin/mpg123 --longhelp .... .... --osc_port start osc udp server on port --osc_id set id, i.e. 'p1' will be addressed in osc as /p1 --osc_to_host send msg to this host, regardless of request source --osc_to_port port of host where msg is sent to --osc_help show osc commands The most easy way to start is $ /usr/local/bin/mpg123 --remote --osc_port 1234 @OSC INFO Starting OSC UDP Server with these Properties: @OSC INFO My Port: 1234 @OSC INFO My ID: p1 @OSC INFO Sending Reports to Host: localhost:3333 @OSC REC SELFTEST /self/test 0.123400, 56 "a string" @R MPG123 (ThOr) v7 You can use all ThOr commands now via OSC: $ oscsend 10.10.10.20 1234 /cmd s "load my.mp3" Some new ThOr commands here: @H UNSILENCE: be verbose again @H INTERVAL <int>: set report interval, every nth cycle @H SHOWINTERVAL: print current interval @H SHOWLOADED: print currently loaded file @H SHOWPAUSE: print current pause status Please feel free to comment and feedback. The code is *not* beautiful at all. I would be interested to know if it builds on other machines. Best regards, Thomas |