File: pycdg.6

package info (click to toggle)
pykaraoke 0.7.5-1.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,608 kB
  • ctags: 1,168
  • sloc: python: 6,696; ansic: 577; makefile: 69; sh: 46
file content (90 lines) | stat: -rw-r--r-- 3,975 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
.\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.\" Please adjust this date whenever revising the manpage.
.\" 
.\" Some roff macros, for reference:
.\" .nh        disable hyphenation
.\" .hy        enable hyphenation
.\" .ad l      left justify
.\" .ad b      justify to both left and right margins
.\" .nf        disable filling
.\" .fi        enable filling
.\" .br        insert line break
.\" .sp <n>    insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.TH "PYCDG" "6" "july 16, 2006" "" ""
.SH "NAME"
pykaraoke \- free CDG/MIDI/MPEG karaoke player
.SH "SYNOPSIS"
.B pycdg
[ options ] songfilename.cdg
.SH "OVERVIEW"
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
.\" respectively.
\fBpykaraoke\fP is a free karaoke player for Linux, FreeBSD and Windows. 
.PP 
\fBpycdg\fP is a CDG karaoke player which supports MP3+G and OGG+G tracks.
.PP 
The player uses the pygame library (www.pygame.org), and can therefore run on any operating system that runs pygame (currently Linux, FreeBSD, Windows and OSX).
.PP 
You can use this file as a standalone player, or together with PyKaraoke. PyKaraoke provides a graphical user interface, playlists, searchable song database etc.
.PP 
For those writing a media player or similar project who would like CDG support, this module has been designed to be easily incorporated into such projects and is released under the LGPL.
.PP 
Numeric module (numpy.sourceforge.net) is required only if you do not use the compiled C low\-level CDG implementation in _pycdgAux.c
.SH "USAGE"
To start the player, pass the CDG filename/path on the command line:
.PP 
	python pycdg.py /path/song.cdg
.PP 
You can also incorporate a CDG player in your own projects by importing this module. The class cdgPlayer is exported by the module. You can import and start it as follows:
.PP 
	import pycdg
.br 
	player = pycdg.cdgPlayer("/path/song.cdg")
.br 
	player.Play()
.PP 
If you do this, you must also arrange to call pycdg.manager.Poll() from time to time, at least every 100 milliseconds or so, to allow the player to do its work.
.PP 
The class also exports Close(), Pause(), Rewind(), GetPos().
.PP 
There are two optional parameters to the initialiser, errorNotifyCallback and doneCallback:
.PP 
errorNotifyCallback, if provided, will be used to print out any error messages (e.g. song file not found). This allows the module to fit together well with GUI playlist managers by utilising the same GUI's error popup window mechanism (or similar). If no callback is provided, errors are printed to stdout. errorNotifyCallback should take one parameter, the error string, e.g.:
.PP 
	def errorPopup (ErrorString):
.br 
		msgBox (ErrorString)
.PP 
doneCallback can be used to register a callback so that the player calls you back when the song is finished playing. The callback should take no parameters, e.g.:
.PP 
	def songFinishedCallback():
.br 
		msgBox ("Song is finished")
.PP 
To register callbacks, pass the functions in to the initialiser:
.PP 
	cdgPlayer ("/path/song.cdg", errorPopup, songFinishedCallback)
.PP 
These parameters are optional and default to None.
.PP 
If the initialiser fails (e.g. the song file is not present), __init__ raises an exception.
.SH "OPTIONS"
pycdg also takes various command\-line options for setting the window size, position, and update rate. Type the following for a full list of options:

$ pycdg \-\-help

.SH "SEE ALSO"
.
You can find PyKaraoke's home page at: http://www.kibosh.org/pykaraoke/
.P
.SH "AUTHOR"
PyKaraoke was written by Kelvin Lawson <kelvinl@users.sourceforge.net>
and William Ferrell <willfe@gmail.com>.
.PP 
This manual page was written by Miriam Ruiz <little_miry@yahoo.es>,
for the Debian project (but may be used by others).