Skip to content
Snippets Groups Projects
Commit 9ea26fb6 authored by Marc DUBOC's avatar Marc DUBOC
Browse files

Version finale du code

parent 4abec0f3
No related branches found
No related tags found
No related merge requests found
File added
%% this is a simple example to read and play a wave file with matlab
% set a string variable to a wave filename we want to open:
toneFileName = "wav/single_tone_piano1.wav";
% read the content of the wave file:
[data,fe] = audioread(toneFileName);
% data is a matrix with 2 columns if the sound is stereo; keep the mono to ease further processing
data = data(:,1);
% get the number of sample in vector data
N = length(data);
% play the sound in the audio output:
soundsc(data,fe);
\ No newline at end of file
File added
function [ y ] = simule_piece( x,fech )
%ENTREE : x=signal émis par le haut-parleur
% fech=fréquence d'échantillonnage de x
%SORTIE : y=signal capté par le microphone dans la pièce
%%
load('empreinte_ac')
if fech~=fe, error('Fréquence d''échantillonnage incorrecte'), end
empreinte=empreinte(1:80000);
y=conv(x,empreinte);
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment