# Simulated Room Transfer Function

I need help obtaining a simulated transfer function in a simulated room. I have created image sources for first and second order reflections, and am assuming a point source for my source. I have the pressure arriving at my receiver position for each frequency band from the direct source and image sources. I am a bit lost on obtaining a transfer function from this data, since the pressure at the center of a point source is infinite. How would I go about getting a transfer function from the pressure data?

• I'm not sure where you are lost. Is your receiver at the same position as the sound source? If not, infinite pressure is not a problem. In fact, any source in reality has a finite size and the distance between receiver and source can't be zero. If you are using matlab, why not try RIR generator and python version here. Mar 13, 2022 at 13:20

How would I go about getting a transfer function from the pressure data?

Typically you calculate the impulse responses in the time domain and then just a Fourier Transform of that.

the pressure at the center of a point source is infinite.

The standard way of dealing with this is to normalize the free field pressure of the source at a specific distance, e.g. 1m. But yes, you can't calculate the transfer function directly at the source position, but it certainly works everywhere else in the room.

I have created image sources for first and second order reflection

Your model seems overly simplistic. A good room impulse generator is fairly difficult, at least if you want it to either sound reasonable or represent physical properties of real rooms. You need to take into account

1. 3D polar patter and frequency response of the source
2. 3D polar patter and frequency response of the receiver
3. Reflection, diffusion and absorption properties of surfaces as a function of frequency
4. Reflection, diffusion and absorption properties of the air as a function of frequency
5. Non rectangular geometries or other objects inside a rectangular room
6. Something to model late reverberation which can't be done efficiently with either the image source method or ray tracing.

Empty rectangular rooms are the easiest to model, however they typically sound terrible unless you put some objects or diffusion in there to break up the standing wave pattern (which almost all real rooms do).

What specifically you want to do depends a lot on how "good" your room transfer functions need to be like and what do you want to use them for.