Universite-Gustave-Eiffel / I-Simpa

An Open Source software for 3D sound propagation modelling
https://i-simpa.univ-gustave-eiffel.fr/
GNU General Public License v3.0
234 stars 57 forks source link

SPPS Energy Decay #33

Open juliuselo opened 8 years ago

juliuselo commented 8 years ago

I've been trying to obtain the impulse response of a simple 5x5x5 room using the SPPS calculation method. The absorption coefficient I'm using is 0.25 and I'm using Lambert's Law of diffusion. Also, I'm not accounting the absorption of air. Comparing my RIR to other programs, it is off.

One possibility I've been looking into is that the SPL values decay from about 80db to 30db and suddenly cuts off. My advisor says this is not natural. I tried increasing the number of sound particles per source but nothing changes much.

Anyone know a solution to where I can get a more complete, "natural" decay? Or a better way get the RIR?

wbinek commented 8 years ago

If you are using random calculation method try changing it to energetic. Random method may result in such cut off.

juliuselo commented 8 years ago

Thank you! It worked but it did little in improving the RIR.

After converting the SPL values to effective pressures, I pass the pressure values through either a bandpass or 1/3 octave filter, and sum the results to get the RIR. Below is the energy decay and RIR's from the filters.

energy decay

bandpass

1_3 octave

Does anyone have any suggestions for filtering the data or getting an accurate RIR?

wbinek commented 8 years ago

Could you please tell me what are you trying to obtain? I-SIMPA can calculate echograms for selected frequency bands, so why do you sum and filter the pressure?

juliuselo commented 8 years ago

I am trying to find the impulse response of the virtual room for auralization. I believed that by summing and filtering the pressures obtained by the SPPS calculation method would give the impulse response. Is this the correct procedure for obtaining the RIR or is there a better way?

wbinek commented 8 years ago

I am not sure it will work that way. You have to keep in mind the fact that the result of simulation is an echogram not a impulse response. I am not sure if by filtering echogram you will get desired results although it is needs to be checked and I am very interested in final results.

I've made a simple auralization script some time ago. I've loaded results from I-SIMPA separately for each frequency band, then I searched it for peaks. That gave me a set of impulses.

Before findpeaks: image

After findpeaks: image

Then I filtered the audio sample to have a signal in corresponding frequency band. Because convolving signal with impulse gives the same signal with different amplitude and delay I could convolve my filtered audio with echogram after find peaks. I did it for all frequency bands separately and summed the results. I think the results were quite ok.

juliuselo commented 8 years ago

Thank you. Do you still have the script that I could use as a reference? For my research project I will be using I-SIMPA so hopefully I could shed light on using echograms for auralization.

For the after findpeaks plot, did you just plot the peaks from the MATLAB findpeaks() function? Also how did you go about filtering the audio sample to have a signal in the correspondeing freq. band?

wbinek commented 8 years ago

I've attached the scripts and some samples. There may be some errors in the scripts.

I've made changes to the source code of I-SIMPA to be able to record angle of incidence of the particle. It allowed me to create stereo responses, however the official release doesn't include it.

The audio is filtered using octave butterworth filters.

aura.zip

juliuselo commented 8 years ago

Thank you!

Also quick question, for your two figures, what results did you actually plot? The SPL, pressure, or pressure square?

wbinek commented 8 years ago

That is pressure. I am don't know if the pressure or pressure squared should be used for auralization. I thought about it, but I am not sure. If you know please tell me. In my scripts (genechogram.m) I used pressure.

juliuselo commented 8 years ago

I'll let you know if I find out.

The only .m files in the zip were:

So far it appears I'm missing

for the scripts to work

wbinek commented 8 years ago

At first I didn't upload all files. Now everything should be ok.

juliuselo commented 8 years ago

I believe you were right for using pressure. Because auralization requires the RIR and the RIR is based off of pressure, not pressure square.

juliuselo commented 8 years ago

For your sample input files (the .csv ones), where did you get the results from in I-Simpa? I'm confused how you got results in terms of not only the frequency bands, but also phi and theta?

wbinek commented 8 years ago

I've made some modifications to SPPS source code to calculate the incidence angles. The changes are not included in the official release.