eomono
New Member
Posts: 11
Posts: 11
|
Post by eomono on Apr 13, 2020 10:05:11 GMT
Hello,
We just bought Master Audio 2 weeks ago and been trying to set it up. We are developing a racing game and set up multiple groups of sounds in 2D for the player SFXs and a copy in 3D for other racers sounds (is there a better way to set this up?); also, the sound's fall off seem pretty steep, about 5 meters away from the listener they go mute, no fade proportional to distance, not even doppler effect, are we doing something wrong?
Anyway, the main issue we are having is the engine SFXs. We are accessing every frame the PlaySoundResult and modify its pitch proportional to the car acceleration. However, since we added this, sound quality has been dropping. The higher the engine sfx volume is, everything sounds chopped and low quality, some unrelated sound effects sound "gobbly", like when you play with the pitch controller of a sound. Also, when the pitch is at its highest, the engine sfx sounds like going up, suffocating and going down, the engines sound like struggling mosquitoes and from time to time the quality goes as low as sounding with digital artifacts (like when entering the matrix).
What are we doing wrong?
Thank you in advance.
|
|
|
Post by DarkTonic Dev on Apr 13, 2020 14:55:29 GMT
No, you can't play a 3D sound in 2D so you must duplicate it. That's correct.
If you are hearing something undesirable when you change pitch, unfortunately Master Audio has nothing to do with that. It's all Unity Audio Sources and Audio Clips doing the work there. You can see the doppler on each Audio Source and tweak it if you like.
You could ask on the normal Unity Audio forum and see if anyone has ideas.
-Brian
|
|
eomono
New Member
Posts: 11
Posts: 11
|
Post by eomono on Apr 13, 2020 21:51:20 GMT
Hey Brian,
Thank you for your prompt response. So we finally found the cause of the "gobbling" and the "struggling mosquitoes" sound: the objects were not moving synced to the listener, we just changed the Audio Listener settings to Fixed Update and that seems to have solved the issue.
But we still have the sound quality issue, when the Engine sound is too loud and there are other engines sounding next to the listener, other sounds start sounding choppy and low quality. Is this normal behavior? Is there a way we could solve this?
Thank you for your help.
|
|
|
Post by DarkTonic Dev on Apr 13, 2020 21:57:29 GMT
I really have no idea. The fixed update setting means that your Audio Listener is probably on a physics game object, and that's what the option is for.
Are the other engines physics game objects too? If they aren't, that will be difficult / impossible to fix. If they are, it should just work.
|
|
eomono
New Member
Posts: 11
Posts: 11
|
Post by eomono on Apr 13, 2020 22:11:13 GMT
Yeah, listener and engines SFXs are attached each to physics game objects.
So, at the start of the race, all of the cars are sounding their engines at the same time, which makes the engine sfx sound too loud (because is the sound 12 times stacking up in itself). Then, the race count down starts sounding (this is a 2D sound on a different bus), and because of the stacked up engine sound, the 2D sounds are sounding choppy and overly saturated, low quality. When all of the other engines go away, the sound quality goes up again, because we don't have all of the engine sounds saturating the volume.
When lowering the engine volume, the issue is avoided, however, we need the engine volume to be louder because when all of the other cars are gone, the player engine is too quiet to be distinguishable.
I'm guessing we need some kind of ducking or logic that lowers the volume when a bus gets too loud?
|
|
|
Post by DarkTonic Dev on Apr 14, 2020 2:52:38 GMT
Ducking only works for tracks on a Playlist Controller, it has nothing to do with lowering sound effects unfortunately.
You can actually set up a bus voice limit, which I might recommend, so that all 12 aren't heard if it's too loud.
It might also be phasing making it sound weird, which can happen with similar sounds playing at the same time.
|
|
eomono
New Member
Posts: 11
Posts: 11
|
Post by eomono on Apr 14, 2020 6:53:05 GMT
Thank you for your response Brian.
I set the voice limit to 4 and it seems to do the trick. However, now I have some cars in complete silence when passing by them; is there a way to rearrange the active sounds based on proximity to the listener?
Thank you
|
|
|
Post by DarkTonic Dev on Apr 14, 2020 15:01:33 GMT
Not really. The priority field on Audio Source does that, but it's only for purposes of limiting the audio to 32 active sources and silencing the rest.
You might want to try using multiple buses (4 cars per bus). For more pointers, you should ask the question at the Unity audio forum. This really has nothing to do with Master Audio functionality, but just Unity audio in general, so maybe someone there can offer assistance.
|
|
eomono
New Member
Posts: 11
Posts: 11
|
Post by eomono on Apr 15, 2020 7:25:04 GMT
I was referring to the SoundGroupVariaton children of the MasterAudioGroup that get deactivated when the bus arrives at its maximum limit of voices; I was asking if there was a way to activate/deactivate those objects based on their closeness to the listener while retaining the bus voice limit. We just tried to separate the sounds into multiple buses but the issue was still there, I'm guessing the main problem is that THAT many sounds stacking on each other are saturating everything and chopping it out?
|
|
|
Post by DarkTonic Dev on Apr 15, 2020 15:12:29 GMT
Most likely correct.
No, there is no way to do that. It does it based on "oldness" or just plan stops playing new sounds when limit is reached, depending on how you have it configured.
The Ambient Sound script will play only audible sounds based on distance, but you can't change the pitch or anything like that.
If the volume is lower for each car, does the problem still occur?
|
|
eomono
New Member
Posts: 11
Posts: 11
|
Post by eomono on Apr 15, 2020 23:53:13 GMT
If we lower the volume of each car, the issue is no longer there, it sounds great. However, when a single car is passing by, is barely audible.
Also, we have the bus configured to stop older voices when reaching the voice limit. That's why we have 11 sound group variations but only 4 are active. We were wondering if there was a simple way to tap into this deactivation system and make it deactivate excess voices based on distance instead of oldness.
|
|
|
Post by DarkTonic Dev on Apr 16, 2020 2:27:33 GMT
No, that won't be simple at all. I can add that to the roadmap and investigate how tough it would be.
You could try to add a compressor or limiter or some effect like that on the Unity mixer channel that the cars play through. Did you check if the channel is clipping when it sounds bad? You are using a Unity Mixer asset right?
|
|
eomono
New Member
Posts: 11
Posts: 11
|
Post by eomono on Apr 16, 2020 6:24:37 GMT
Oh... Actually we weren't using a Unity Mixer asset... But we just set it up. So, the Engine Mixer group gets very high (around 8dB) but wasn't clipping at all. So we added the compressor as you suggested and it works as a charm. It seems that it really was easier to fix this on Unity's side so I apologize for wasting your time but thank you very much for staying with us and helping us until the end to solve this issue!
|
|
|
Post by DarkTonic Dev on Apr 16, 2020 19:27:26 GMT
No problem! Glad you are sorted.
|
|