File Exchange

image thumbnail

Image-source method for room impulse response simulation (room acoustics)

version (29.4 KB) by Eric A. Lehmann
Simulates audio data at one or more microphones from a source moving in a reverberant environment


Updated 10 Mar 2012

View License

These files can be used to simulate a sound source moving in a reverberant environment and generate the corresponding samples of audio data received at one or more microphones. In addition, the user can define the desired level of environmental reverberation time in a simple and accurate manner. The audio data can be simply generated by executing the following two commands:

>> ISM_RIR_bank(my_ISM_setup, 'ISM_RIRs.mat');
>> AuData = ISM_AudioData('ISM_RIRs.mat', SrcSignalVec);

where SrcSignalVec contains the source signal, and my_ISM_setup.m contains the various user-defined parameters needed for the simulation (such as room dimension, positions of the microphones, trajectory of the sound source, desired reverberation time of the environment, etc.). The multi-channel matrix of audio data AuData contains the signals generated at each of the sensors.

These files further allow the user to define a range of simulation parameters such as automatic saving of the audio data into a .mat or .wav file, addition of white noise to the resulting signals, how much to crop the generated impulse responses, different ratios of absorption coefficients in the room, etc.

A full documentation of these files, as well as detailed explanations regarding the simulation process can be found at

Cite As

Eric A. Lehmann (2020). Image-source method for room impulse response simulation (room acoustics) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)


Hi, If I want to simulate the trajectory of multiple sound sources, What should I do?


very useful. Thank you very much!

sean zeng

thanks a lots! Nice job!

Henry Way

Hi, Please could I have help with the following error. I am using Matlab 2017a, so it could be a syntax error from change in syntax since 2012?

Error: File: ISM_RoomResp.m Line: 163 Column: 1
Function definition is misplaced or improperly nested.

Many thanks


Hi, I am trying to use your RIR simulation but I am getting this error. I couldn't figure it out. Can you please help me?

>> ISM_RIR_bank(my_ISM_setup, 'ISM_RIRs.mat');
>> AuData = ISM_AudioData('ISM_RIRs.mat', SrcSignalVec);
[ISM_RIR_bank] Computing room impulse responses. Loop execution: done 50% Improper assignment with rectangular empty matrix.

Error in ISM_RIR_DecayTime (line 141)
DTime_vec(nn) = 1.15*tvec_rec(foo); % statistical offset correction...

Error in ISM_RoomResp (line 123)
MaxDelay = ISM_RIR_DecayTime(Delta_dB,rt_type,rt_val,1-beta.^2,room,X_src,X_rcv,Fs,c);

Error in ISM_RIR_bank (line 131)
RIR_cell{mm,tt} = ISM_RoomResp(Fs,beta,rttype,rtval,X_src,X_rcv,room,'SilentFlag',1,'c',cc,'Delta_dB',Delta_dB);

fei ma


Minor updates to ISM_RoomResp.m and ISM_RIR_DecayTime.m so as to better handle anechoic environments (thanks to comments from Maryam Naghibolhosseini). Anechoic responses can now be achieved by setting either RT_VAL=0 or BETA=[0 0 0 0 0 0] (or both).

Function 'ISM_RIR_DecayTime.m' updated to allow for a greater accuracy in the predicted decay time results. Several other functions were modified and/or created as a result of this update.

BSD license

Updated URL for full documentation

small bug fixed in ISM_AudioData.m (thanks to Benedikt Lösch!)

updated keywords

minor update in title and keywords

keywords updated

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux