Page 1 of 1

Kester, Saluk...please help!

Posted: Tue Dec 28, 2004 7:08 pm
by Rebel
Hi Guys,

I've posted this a few times before, and I apologise in advance for bringing this up again. The doppler shift in the listener settings does not work properly in the game engine. It works when the camera (listener) moves with a moving object, and then moves independently at the same time ie. both objects move. Doppler shift should work when a moving noise moves past a fixed point as well. I'm pretty sure that it is no train smash to sort this out for the guys that are involved with the coding.

I also have some info on this from FMOD, so if you would like this stuff, I could send it to you if you give me an e-mail address. I have many uses for sound in my planned use of Blender, and this needs to work properly if Blender is to make more progress. It's a really fantastic program, and I really appreciate the work that folks like Saluk, Kester and all others involved are doing. Thanks and keep it up!

Keith

Re: Kester, Saluk...please help!

Posted: Tue Dec 28, 2004 7:33 pm
by z3r0_d
Rebel wrote:Hi Guys,

I've posted this a few times before, and I apologise in advance for bringing this up again. The doppler shift in the listener settings does not work properly in the game engine. It works when the camera (listener) moves with a moving object, and then moves independently at the same time ie. both objects move. Doppler shift should work when a moving noise moves past a fixed point as well. I'm pretty sure that it is no train smash to sort this out for the guys that are involved with the coding.
you're saying that the doppler shift doesn't work when the camera is stationary?

the camera didn't move in the MG1.blend demo which demonstrated the doppler effect, the planes [coming towards the camera] did

though, that file works much much better in 2.25

Posted: Wed Dec 29, 2004 2:10 am
by alien-xmp
Confirmed - the settings in the listener panel do pretty much nothing:

1. The game engine doesn't use them.
2. They are only set when you hit the play sample button
3. The doppler setting is mapped to the speed of sound.
4. The values aren't saved in blend files.

Re: Kester, Saluk...please help!

Posted: Wed Dec 29, 2004 5:44 am
by Rebel
z3r0_d wrote:
Rebel wrote:Hi Guys,

I've posted this a few times before, and I apologise in advance for bringing this up again. The doppler shift in the listener settings does not work properly in the game engine. It works when the camera (listener) moves with a moving object, and then moves independently at the same time ie. both objects move. Doppler shift should work when a moving noise moves past a fixed point as well. I'm pretty sure that it is no train smash to sort this out for the guys that are involved with the coding.
you're saying that the doppler shift doesn't work when the camera is stationary?

the camera didn't move in the MG1.blend demo which demonstrated the doppler effect, the planes [coming towards the camera] did

though, that file works much much better in 2.25
The MG1 file does not have any doppler shift, it just uses a shift in volume. Doppler shift means that the frquency builds up as the object approaches you, and then drops down as it goes past. What you hear sometimes in Blender is a moving from one speaker to the other (left to right etc.) This almost sounds like doppler, but it isn't.

I tired many types of wav files yesterday, and every now and then the doppler actually works. I just can't seem to find a regular way to make it work. I'll do some more fiddling around today.

Thanks for the info on the "listener" box. The only mention of this that I can find, is in the Game Engine book, and that has only a few lines.

Posted: Thu Dec 30, 2004 3:04 am
by alien-xmp
I made some changes to this yesterday.

I've added a new slider to set the speed of sound. Make sure it is set to something useful, eg 340.

Doppler shift changes the pitch of the sound depending on the relative velocity of the source & listener, and the speed of sound.

Posted: Thu Dec 30, 2004 5:40 am
by Rebel
I did some more testing in 2.34 yesterday, and found that the doppler works if you start the game with the sound assigned in the "always" sensor. If you use a key to start the sound, then it works when the key is held down. If you let the key go, the doppler is disabled. Alternatively, you can use the "inv" option, and then it works the other way around.

The doppler routines are obviously all there, but the activation logic is mixed up somewhere. I noticed on versions 2.35 and 2.36 that the key logic has also been changed. My program is a simulation on the control line model plane aerobatic pattern, and I use plenty of IPO's. The key actions on these last two versions, prevent me from using them. My program reads the press and release differently, so something has changed.

The "speed of sound" thing is interesting. Are you going to make it available some way? Thanx for the help so far.

Keith

Posted: Thu Dec 30, 2004 9:09 am
by z3r0_d
Rebel wrote:The "speed of sound" thing is interesting. Are you going to make it available some way? Thanx for the help so far.
in 2.25 it could be adjusted in the sound window with the pitch slider [up/down 12 semitones [up or down a single octave?], or in python [at runtime, you set the speed by a multiple, I can't find my code at the moment though]

Posted: Fri Dec 31, 2004 2:23 am
by alien-xmp
Rebel:

I sounds like the sound actuator is stopped, therefore it doesn't update the sounds/velocity.

The speed of sound is currently available in the listener panel in cvs.

How has the key actions changed? The logic updates at a fixed rate in 2.35/2.36 but that shouldn't effect it.

z3ro_d:

Changing pitch doesn't change the speed of sound, it just adjusts the [reference] pitch of a sample.

intrr is recoding the sound system for SDL - the sound system feature set and stability should hopefully improve in newer Blender versions.

Posted: Fri Dec 31, 2004 5:41 am
by Rebel
I have not tried the sound again in 2.35/2.36 because the keys dont work well in my model plane simulation. The IPO's are effected by the press and release of the keys. I will re-load 2.36 again, and do some more testing.

I need to learn Python it seems! My last bit of programming was done on "steam-driven" Apple 2+ computers, so I battle a bit. (I'm giving my age away here!!) I luv Blender, so thanks for the help.