DavidDiazGuerra / gpuRIR

Python library for Room Impulse Response (RIR) simulation with GPU acceleration
GNU Affero General Public License v3.0
477 stars 91 forks source link

How to simulate direct-path rir with gpuRIR #44

Closed quancs closed 1 year ago

quancs commented 1 year ago

Hello, I'm working on de-reverbration, and trying to use gpuRIR to simulate the reverberant rir and direct-path rir. I know how to simulate reverberant one, but don't know how to simulate direct-path rir (given an RT60=0 reports an error).

DavidDiazGuerra commented 1 year ago

Hi Changsheng! I cannot test it right now, but I think you should be able to simulate the direct-path RIR by using nb_img = [1, 1, 1] instead of computing it with the t2n function. With that you'll run the ISM only with the original source without any images, so I think you should get the direct-path RIR. You can just leave beta to all zeros (it shouldn't affect to the result anyway) and use any Tmax long enough to campure the direct-path propagation time.

quancs commented 1 year ago

OK. I will try it. Thank you~

quancs commented 1 year ago

It works. 👍

Hi Changsheng! I cannot test it right now, but I think you should be able to simulate the direct-path RIR by using nb_img = [1, 1, 1] instead of computing it with the t2n function. With that you'll run the ISM only with the original source without any images, so I think you should get the direct-path RIR. You can just leave beta to all zeros (it shouldn't affect to the result anyway) and use any Tmax long enough to campure the direct-path propagation time.