Python and MP3

O

O-Zone

Hi all,
i'm looking for an MP3 player/library in Python/wxPython to use in a
multiplatform program. Someone can help me ?

Oz
 
A

A. Lloyd Flanagan

O-Zone said:
Hi all,
i'm looking for an MP3 player/library in Python/wxPython to use in a
multiplatform program. Someone can help me ?

Oz

I haven't looked for a player, but you may be interested in a library
for reading/editing the information tags that are part of MP3 files:
http://pyid3lib.sourceforge.net/. This is where things like the song
title, album, artist, etc. are stored.
 
R

Rod Stephenson

O-Zone said:
Hi all,
i'm looking for an MP3 player/library in Python/wxPython to use in a
multiplatform program. Someone can help me ?

It might be worth mentioning the snack sound library for Tcl,
(though the orginator of this thread is after something for
wxPython)

http://www.speech.kth.se/snack/index.html


Tcl is built into Python via Tkinter, but many packages are not
available. You will need to install Tcl separately - I use the
Active State installation here.

You can then copy missing packages to the tcl
subdirectory. In the Active State installation they are under
the lib subdirectory. Copy the Snack2.2 folder from there to
the Python23/tcl directory.

Then:

from Tkinter import *
root=Tk()

snackScript = '''package require -exact sound 2.2;
snack::sound s -file "chaconne.mp3";
s play -block 1
'''

root.tk.eval(snackScript)


Snack has a lot of useful tools for visualization and synthesis.


On the subject of Tcl generally, is there some way of telling
Python to use my native Tcl installation rather than the
stripped down one that comes with the Python installation -
then these additional libraries would be generally available.
 
K

klappnase

Rod Stephenson said:
It might be worth mentioning the snack sound library for Tcl,
(though the orginator of this thread is after something for
wxPython)

http://www.speech.kth.se/snack/index.html

(...)

from Tkinter import *
root=Tk()

snackScript = '''package require -exact sound 2.2;
snack::sound s -file "chaconne.mp3";
s play -block 1
'''

root.tk.eval(snackScript)

It's even easier, because snack comes with a python wrapper included:

from Tkinter import *
import tkSnack

root=Tk()
root.withdraw()#in case you don't want to see a Tk window in your app
tkSnack.initializeSnack()
s=tkSnack.Sound(file="chaconne.mp3")
s.play()

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,055
Members
47,659
Latest member
salragu

Latest Threads

Top