Hi Greg and others,

----- Original Message ----
From: Greg Ewing <[EMAIL PROTECTED]>
To: pygame-users@seul.org
Cc: [EMAIL PROTECTED]
Sent: Thursday, 24 May, 2007 6:10:56 PM
Subject: Re: [pygame] music module bindings for python

René Dudfield wrote:

> pygame has mod support through sdl_mixer.

That's true. Note that you need to use pygame.mixer.music
rather than a pygame.mixer.Sound object, though.

I just tried the following on MacOSX and it worked:

from time import sleep
from pygame import mixer
mixer.init()
music = mixer.music
music.load("bigjapan.mod")
music.play()
sleep(10000)

(The mod file I used is from
http://www.df.lth.se/~fernbom/music/mods/files/bigjapan.zip).

--
Greg




Thanks for telling me about the mod support. I assumed that pygame didn't have 
mod support because I'd heard of PySonic, which led me on the wrong track. I 
have tested (with pygame's mixer) not only mods, but also more complex "mod" 
formats, including IT and XM. They all work, but I've had some trouble with 
playback. The worst problem is that of the music hissing. The same music plays 
perfectly with SoundTracker (on my Linux box) and also perfectly on Windows. I 
have experimented with the mixing speed and also the buffer size, but such 
changes make no difference. You may recall that I was the one with the "sound 
crackling" woes when I couldn't get Ogg files to play. Someone pointed me to 
SDL environment variables, and a line like: export SDLAUDIODRIVER=dsp did the 
trick: no more crackling. But I still get hiss with modules. Seems to be an OS 
problem. If anyone knows more detail about setting SDL variables, please tell 
me, as I'd like to get modules playing perfectly, if
 possible. The other problem is that I can't set the volume of the modules very 
high (100% is not very loud). Any ideas?

Cheers,

Andrew.




      
_________________________________________________________________________________
              

How would you spend $50,000 to create a more sustainable environment in 
Australia? Go to Yahoo!7 Answers and share your idea.
http://advision.webevents.yahoo.com/aunz/lifestyle/answers/y7ans-babp_reg.html


Reply via email to