http://people.via.ecp.fr/~flo/index.en.xhtml#PyXMMS_and_PyXMMS-remote
http://people.via.ecp.fr/~flo/2002/PyXMMS/doc/xmms.control.html
http://people.via.ecp.fr/~flo/2002/PyXMMS-remote/pyxmms-remote.html
>>> import xmms >>> dir(xmms) ['ExecutableNotFound', 'InvalidFadeOutAction', 'PyXMMSGenericException', 'RequestedSessionDoesNotComeUp', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__path__', '_xmmscontrol', 'common', 'control', 'eject', 'enqueue_and_play', 'enqueue_and_play_launch_if_session_not_started', 'eq_win_toggle', 'error', 'fade_out', 'get_balance', 'get_eq', 'get_eq_band', 'get_eq_preamp', 'get_info', >>> xmms.get_info() (128000, 44100, 2) 'get_main_volume', >>> xmms.get_main_volume() 35 TimePlayed=get_output_time() CurFilePath=get_playlist_file(aktuellePositionPL) 'get_playlist_length', aktuellePositionPL=get_playlist_pos() curSongLenght=get_playlist_time(get_playlist_pos()) 'get_playlist_title(aktuellePositionPL) Interpret und Title 'get_skin', 'get_version', 'get_volume', 'is_eq_win', 'is_main_win', 'is_paused', 'is_pl_win', 'is_playing', 'is_repeat', 'is_running', 'is_shuffle', 'jump_to_time', 'main_win_toggle', 'os', 'pause', 'pl_win_toggle', 'play', 'play_files', 'play_pause', 'playlist', 'playlist_add', 'playlist_add_allow_relative', 'playlist_add_url_string', 'playlist_clear', 'playlist_delete', 'playlist_ins_url_string', 'quit', 're', 'set_balance', 'set_eq', 'set_eq_band', 'set_eq_preamp', 'set_main_volume', VolUp(getVol+10) ... set_main_volume(0-100) 'set_playlist_pos', NextSongPL=playlist_next() PrevSongPL=playlist_prev() 'quit', 'set_skin', 'set_volume', 'show_about_box', 'show_prefs_box', 'stop', 'string', 'sys', 'time', 'toggle_aot', 'toggle_repeat', 'toggle_shuffle'] >>>
Beispiele im Netz
http://svn.oreto.inf-cr.uclm.es/alladinbox/Source/Aladdinbox/freevo-1.5.2/src/audio/plugins/fxmms.py
feature - [curSong in Playlist - search artist - insert rows/new playlist - store or insert Num,]
def NextSongsFromArtists():
playlist_ins_url_string(...)
Insert a file/URL at a given position in the playlist.
playlist_ins_url_string(string, pos, session=0) -> None
string -- an absolute file name or a URL
pos -- index (starting at 0) of the playlist entry before
which the entry for `string' will be inserted
session -- the XMMS session to act on
Function names
--------------
The binding for the libxmms function xmms_remote_foo() will be called
foo; therefore, you will probably use it in this way:
import xmms.control
res = xmms.control.foo(arg, ...)
void xmms_remote_set_volume(gint session, gint vl, gint vr)
is mapped to:
set_volume(vl, vr, session)
void xmms_remote_get_eq(gint session, gfloat *preamp,
gfloat **bands)
which returns a global preamp gain (in dB) and a list of gains for
10 frequeny bands. It is called like this in Python:
(preamp, bands) = get_eq(session)
where 'session' is optional (see above), 'preamp' is a float and
'bands' is a 10-tuple of floats.
Note: this is written from this module's scope, but in real life,
you would of course probably have:
import xmms.control
[...]
(preamp, bands) = xmms.control.get_eq(session)
Linux/Musik/pyxmms (last modified 2008-11-04 06:59:56)