More control over doppler due to camera movement

The amount of doppler effect due to moving the camera is too much for me. It makes things very disorienting to hear the pitch change so much due to rotating the camera. It might be a realistic simulation based on the camera’s speed, but that doesn’t make it any less annoying.

As a developer of larger-scale train games, I am concerned about the sound quality of the game. On one hand, I want elevated doppler scales because that creates more realistic moving sounds. On the other hand, higher doppler scales create ugly effects due to the camera’s motion being taken into account when calculating doppler. Specifically, the tangential and normal velocities relative to the camera’s Target.

I want to have a high-quality sound scape for my train games where train sound effects have realistic doppler effects, and I want to have a responsive and intuitive camera like the default roblox camera without having ugly audio effects as a consequence of the camera’s smooth rotation and zooming.

Researching and experimenting with the API yields SetListener, which is intriguing but has not yielded results:

  • Setting the Listener to use the character’s head in ObjectPosition mode removes the pesky doppler effect when moving the camera and does align the L/R audio channels with the camera’s facing direction, but there is a big drawback in that the sound is no longer coming from the user’s perspective – quite disorienting
  • Setting the Listener to use the Camera’s CFrame in CFrame mode on heartbeat is identical to the original behavior – no dice
  • Setting the listener to use the Camera’s CFrame in CFrame mode on a wait() loop has the appearance of mitigating the effect slightly – but still no dice
  • Setting the listener to use the Camera’s CFrame in CFrame mode on a wait(1) loop does not seem to have doppler effects, but has huge jumps in sound position – quite disorienting
  • Setting the listener to use the Camera’s CFrame in CFrame mode on a wait(0.1) loop does not create doppler effects when the camera moves, and is not too disorienting. However, doppler does not work when riding a train and passing stationary sound – no dice

I’ve discovered that the threshold for doppler effect is approximately 15 hz. To that end, with asynchronous loops, I’ve managed to create a script that has what I’m looking for: doppler created by character movement, without the doppler created by camera movement.

You can get it here:


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.