resonance-audio / resonance-audio-unity-sdk

Resonance Audio SDK for Unity
https://resonance-audio.github.io/resonance-audio/develop/unity/getting-started
Other
297 stars 38 forks source link

Resonance Audio Reverb Dead Zone #75

Closed dzlin99 closed 3 years ago

dzlin99 commented 3 years ago

Hi,

Currently I am setting up a sound system that tries to capture the echoes of a car and the surrounding environment. I set up all the reverb probes in the rooms that I am walking through; however, there seems to be this dead zone that occurs. The audio source and the audio listener are very close to each other, and we emit chirps from the source that goes from high frequency to low frequencies. I have binaural audio set up and have tried many different signals.

However, in the screenshot below of the audio; after the final chirp, it seems to me like there is a deadzone with the audio itself before some noise pops in. This deadzone almost always occurs at around the time it takes sound to travel 4m. As you can see, the initial echoes are promising, as you can clearly see spikes in the audio but after a short period, they all disappear. Does anyone have any suggestiongs?

Screen Shot 2020-10-24 at 9 41 01 AM

pan-athen commented 3 years ago

Very interesting finding. Maybe I'm far off here, but have you checked the code to see if there is some kind of optimization as the engine is made for real-time games?

The volume envelope seems ok for a car or small room, but it also reminds me of the short impulses we use in games to unload some resources from the CPU. All I'm saying is that maybe there is some optimization playing on the background, that creates those artifacts, balancing room acoustics simulation for a real-time entertainment application.

dzlin99 commented 3 years ago

Ok yeah I’ll look into that. I have one more question. So right now with the echo system, I want to try and formulate an echolocation like effect. I send out a mono channel chirp from one the source (on the player) and would like to have a binaural effect; i.e having two separate channels come back with a right side and a left side showing two somewhat different audio tracks. I would prefer to use two microphones (audio listener) and place them somewhat apart so that you can distinctly hear two separate mono channels of audio. But, Unity only allows one microphones, so I put one binaural microphone (right above the source) to try and simulate the effect. However, the one microphone is currently not working as well because the right and left audio tracks look very similar in all places, which it shouldn’t be. For example, if I am standing with a wall on my right and send out a chirp; I should hear an echo that comes back faster on the right channel than the left one. However, it seems like it is all the same throughout.

I have baked everything and am not exactly sure how the RT60s from the reverb probes play in. I have sanity checked some of the audio because if I put the audio 1 unit to the left of the player. The audio is significantly louder on the left side than it is the right side. Do you guys know of anything that I should look out for in this type of setup?

pan-athen commented 3 years ago

Time and frequency differences between left and right ears are enough for the brain to process location, but small to see on a stereo recording on a moderate zoom level. If I remember correctly the differences are about 30 microseconds at 40 and 140 degrees from directly ahead of the listener, and they go up to around 60 microseconds 90 degrees (ear plane surface normal). Do you have a screenshot of the stereo recording on a high zoom level?

Also, Unity as far as I know, uses the computer's speaker setup to create its listener (mic). At what setting do you have that?