

Source Control has features and workflows to allow people to safely work without conflicting with each other. Since many people will have access to the same files, you can see how this can create conflicts if two people try to change the same thing at the same time.
MUSICA CON OBJETOS SONOROS SOFTWARE
What is Source Control?īasically, It is a system used within software development to share and keep track of code and other assets. Here is a summary of ideas and concepts about Source Control or Version Control that I wished I knew when I starting out in game audio since they can get a bif confusing. So firstly, let’s add a new bool variable to the public settings within StudioEventEmitter: This would be independent of having a rigidbody and also independent of the event having doppler activated. So my solution was to add a new option to StudioEventEmitter where you can set if you want to calculate kinematic velocity. The problem with this approach is that sometimes we may have doppler turned off, but we still want to send kinematic velocity information to Fmod to use it as a parameter for other things. On the other hand, sometimes we will have a rigidbody and we still want to use kinematic velocity since the object could be moved by just animation or code.įirst, I thought about reading the event description to see if the event in question had doppler activated and turn on kinematic velocity based on that. In theory, everytime there is no rigidbody, we want to potentially use it but it would be a waste to do it if the event in Fmod is not even using doppler. Modifying StudioEventEmitterįirst, let’s think about when we want to use kinematic velocity. I personally don’t use it since I have my own emitters but the default one is a good example to learn what’s going on. Let’s call this manually calculated velocity, “kinematic velocity”, since it doesn’t care about the forces applied, just the movement itself. But as the docs say, we can also provide this information manually which means we need to calculate the velocity ourselves but at least we don’t depend on the physics engine anymore. So this is how we are currently sending the velocity to Fmod, via the rigibody. In the case of the Unity and Unreal Engine integrations, this is usually set automatically to match the velocity of the associated Rigidbody or RigidBody.” Velocity can be provided by the game engine or by calling EventInstance::set3DAttributes. If we look at Fmod’s documentation, we can see that: “The Doppler property requires velocity in order to calculate how much Doppler adjustment needs to be applied. As you can hear, at first we hear no doppler effect but activating the doppler feature on the event macro section and re-building banks makes the doppler effect work. On the cube, I added a rigidbody and an Fmod emitter. On the Unity project I just have a camera with the Fmod studio listener, a plane with no collisions and a cube. The Fmod project simply contains a 3D event with a looping testing sine wave tone. As you can see in the video below, I have a very basic setup: I created a new, clean Unity project, integrated Fmod into it and created an Fmod project. Using Doppler with a rigidbody and the physics engineīefore we do anything else, let’s see how the system was intended to be used by default. Here is the zipped project in case you prefer that.

You can get this project on GitHub so you can copy the code more easily or play around with it. Note: this work was done on the following versions so as time goes by, it could get more and more outdated:įmod Studio & Fmod Unity implementation plugin version: 2.02.04

I took most of the code from this thread on the Fmod forums. So let’s jump into Unity and try to find a solution for this problem. This limitation has prevented me from really using the doppler effect since, on the games I have worked on, we usually move objects by code or using animations which means that Unity’s physics engine has no clue what the object’s velocity is, so in turn, Fmod doesn’t know either.Īdditionally, we would also need to know the listener’s velocity, since in nature the doppler effect always takes into consideration the relative velocity between the listener (you and your ears driving in a car) and the emitter (another car’s horn). The game object needs to be moving via the physics engine, like for example using Rigidbody.AddForce or just using gravity. As I mentioned on this article, Fmod includes a built-in doppler feature but unfortunately it requires two things in order to work on Unity:Ī rigidbody on the game object where the emitter is.
