A list,
Room impulse response based on matlab mono source and two microphones
Ii. Source code
clear all;
close all;
fs=8000; % Sampling frequency path_length =256; % Path length mic1=[0.9 1.5 1.5]; % the microphone1Mic2 ="1.7 1.5 1.5]; % the microphone2Where n =12; % Number of virtual sources r=0.25; % reflection coefficient c=340; Rm = [% sound4 4 3]; % room size SRC =[2.1 2.5 1.5]; % Source position h=rir(fs, mic1, n, r, rm, SRC); h1=h(1:path_length);
h=rir(fs, mic2, n, r, rm, src);
h2=h(1:path_length);
figure(1);
subplot(2.1.1), plot(h1),axis([1,path_length,- 1.1]);
ylabel('幅度')
xlabel('points')
title('Impulse response of Microphone 1')
subplot(2.1.2), plot(h2),axis([1,path_length,- 1.1]);
ylabel('幅度')
xlabel('points')
Copy the code
3. Operation results
Fourth, note
Version: 2014 a