Re: pygame sound

  • From: BlueScale <bluescale1976@xxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Sat, 12 Sep 2009 17:33:33 -0400

Hi,
The way I do it is to think of the game world in X and Y.  X is the
volume in both speakers, if X is 0 the sound will only come through the
left speaker.  If X were 50 it would be botrh.  If Y is 0 then the sound
would be loudest, so it would be 100% but if Y were 50, max volume would
be 50%.  So, for example, if X were 0 and Y were 50, then sound would
only come through the left speaker at half volume.

On Sat, 2009-09-12 at 17:07 -0400, Alex Hall wrote:

> Hi all,
> 
> I have pygame working, I think, on Python 3.1, though I still have python 
> 2.6 and 2.3 on the computer. The documentation for pySonic made sense; you 
> create a world, put the player in it, then have sound sources with 
> properties like location. How would I do this in pygame? I found the mixer 
> object, but I am not sure how to use it to generate sounds that relate to 
> where the user is in the game world. Actually, I am not even sure how to 
> create the user's location for other sounds to be compared to the player. I 
> hope this makes sense and that I am just missing something easy here.
> 
> 
> Have a great day,
> Alex
> New email address: mehgcap@xxxxxxxxx 
> 
> __________
> View the list's information and change your settings at 
> //www.freelists.org/list/programmingblind
> 

Other related posts: