Doppler Effect Missing / Set Up Incorrectly

Hi!

I’ve successfully integrated your project into mine, can trigger events, and am properly setting the velocities in the attributes structs for the listener and the sources. But I cannot for the life of me hear any doppler working, or find a setting in Studio that lets me add that effect. I see settings for it in your Designer EX editor, is this possible in Studio?

Am I setting this up wrong in Studio somewhere? I also notice I can’t access System::set3DSettings() in the Unity scripts.

Thanks!

Edit: I should be clear – the sounds play and attenuate in 3D as they should (or at least it sounds like it), I can walk up to them and hear them get louder, etc.

Edit Again: I’ve now tested this with relative velocities (between listener and source) from 50m/sec to 2000m/sec and there is no audible difference.

Hey guys I am also very interested in this. We are currently trying to implement doppler with the code shown above. But please PM or email me, when this is due to be implemented within Studio.
thank you

thx peter. works fine.

You also have to change static FMOD_Listener sListener = null;
to public static FMOD_Listener sListener = null;
in the FMOD_Listener class, for this to work.

Awesome, thank you!

bump…
any info regarding the doppler?

I’m in the same situation, the doppler effect seems completely missing even after assigning position and velocity to audio sources. :frowning:

Hi Guys,

Yes, doppler isn’t currently implemented in Studio. It is a high priority feature and it’s on our backlog, I will let you know when we have scheduled it. In the mean time if you’re need doppler immediately you can implement in Unity like this:

const float SPEED_OF_SOUND = 340.0f;
var directionOfListener = (transform.position - FMOD_Listener.sListener.transform.position).normalized;
var speedRelativeToListener = speed * Vector3.Dot(transform.forward, directionOfListener);
var dopplerPitch = (SPEED_OF_SOUND - speedRelativeToListener) / SPEED_OF_SOUND;

eventInstance.setPitch(dopplerPitch);

Is this still necessary? The comment from over a year ago was that Doppler wasn’t implemented in Studio, but the current version of FMOD Studio does have a Doppler button and scale knob in the Event Macros section.

Should there be anything else needed when using the Unity integration? I’m OK with the default values for units and speed of sound, etc. In the cases where I do have the Doppler button turned on, in Unity, those events are assigned to “FMOD_Studio Event Emitter” components attached to the appropriate GameObjects. That would be equivalent to an AudioSource in the built-in Unity audio (no coding is required to get Doppler with that).

I was also wondering about that.
Cannot hear any doppler effect with FMOD events in Unity.