Re: [pygame] duration of song

2007-07-14 Thread Dave LeCompte (really)
Ian Mallett [EMAIL PROTECTED] wrote: On 7/13/07, Jason Coggins [EMAIL PROTECTED] wrote: Actually I was thinking of using the length of the music played as a variable in the program. my_sound = pygame.mixer.sound([filename]) number_of_seconds_long = my_sound.get_length() That works for OGG

Re: [pygame] duration of song

2007-07-14 Thread Ian Mallett
On 7/14/07, Dave LeCompte (really) [EMAIL PROTECTED] wrote: Ian Mallett [EMAIL PROTECTED] wrote: On 7/13/07, Jason Coggins [EMAIL PROTECTED] wrote: Actually I was thinking of using the length of the music played as a variable in the program. my_sound = pygame.mixer.sound([filename])

Re: [pygame] duration of song

2007-07-14 Thread Dave LeCompte (really)
Ian Mallett [EMAIL PROTECTED] wrote: On 7/14/07, Dave LeCompte (really) [EMAIL PROTECTED] wrote: That works for OGG and WAV sounds, but does not work for other music files, like MP3, MOD, and MIDI, right? Oh, opps. You're probably right. I'm curious now, why don't you know the length of

Re: [pygame] duration of song

2007-07-14 Thread Noah Kantrowitz
PyMedia claims to support this, though it mentions you may need to play the file for a second or two to initialize decoding and get the full length. --Noah Dave LeCompte (really) wrote: Ian Mallett [EMAIL PROTECTED] wrote: On 7/14/07, Dave LeCompte (really) [EMAIL PROTECTED] wrote: That

Re: [pygame] duration of song

2007-07-14 Thread Jason Coggins
: [pygame] duration of song On 7/14/07, Dave LeCompte (really) [EMAIL PROTECTED] wrote: Ian Mallett [EMAIL PROTECTED] wrote: On 7/13/07, Jason Coggins [EMAIL PROTECTED] wrote: Actually I was thinking of using the length of the music played as a variable in the program

Re: [pygame] duration of song

2007-07-14 Thread Dave LeCompte (really)
Jason Coggins [EMAIL PROTECTED] wrote: I was wanting to use .mp3 files. Perhaps this suits your needs: http://py.vaults.ca/apyllo.py?i=6226313 import mp3 mp3.mp3info(you-spin-me-round.mp3) {'STEREO': False, 'FREQUENCY': 44100, 'COPYRIGHT': 0L, 'MM': 3, 'LAYER': 2, 'SS' : 2, 'VERSION': 1L,

Re: [pygame] duration of song

2007-07-13 Thread Jason Coggins
Actually I was thinking of using the length of the music played as a variable in the program. Jason - Original Message - From: dbcad7 [EMAIL PROTECTED] To: pygame-users@seul.org Sent: Monday, July 09, 2007 10:55 PM Subject: RE: [pygame] duration of song I would thing that WinAmp

Re: [pygame] duration of song

2007-07-13 Thread Ian Mallett
PROTECTED] To: pygame-users@seul.org Sent: Monday, July 09, 2007 10:55 PM Subject: RE: [pygame] duration of song I would thing that WinAmp, or Xmms, or even media player would show you that information when you play it.. but I suppose there are more complicated ways to find out

RE: [pygame] duration of song

2007-07-09 Thread dbcad7
-users@seul.org Date: Sun, 8 Jul 2007 17:51:07 -0400 Subject: [pygame] duration of song Does anyone know of a method to determine how long (in time) a music file is?Jason ___ Join Excite! - http://www.excite.com The most personalized portal on the Web!

Re: [pygame] duration of song

2007-07-08 Thread Ian Mallett
http://www.pygame.org/docs/ref/mixer.html#Sound.get_length On 7/8/07, Jason Coggins [EMAIL PROTECTED] wrote: Does anyone know of a method to determine how long (in time) a music file is? Jason