Skip to content
Snippets Groups Projects
Commit 6917aa68 authored by LERAYS Camille's avatar LERAYS Camille
Browse files

coucou

parent 4828ae37
No related branches found
No related tags found
No related merge requests found
[x,fe]=audioread("C:\Users\camil\Documents\IMT_A\semestre_6\electrical engineering\tp-audio-ee-etudiant-c24leray\src\wav\single_tone_celtic-harp-a3.wav");
soundsc(x,fe);
L1 = length(x1)
X1 = fftshift(fft(x1))
f1 = (-L1/2 : L1/2 - 1)*(fe1/L1)
figure;
plot(f1, log(abs(X1)),'r');
title("spectre")
xlabel("fréquence en Hz")
ylabel("log|X(f)|")
[x1,fe1]=audioread("C:\Users\camil\Documents\IMT_A\semestre_6\electrical engineering\tp-audio-ee-etudiant-c24leray\src\wav\single_tone_piano1.wav"); [x1,fe1]=audioread("C:\Users\camil\Documents\IMT_A\semestre_6\electrical engineering\tp-audio-ee-etudiant-c24leray\src\wav\single_tone_piano1.wav");
[x2,fe2]=audioread("C:\Users\camil\Documents\IMT_A\semestre_6\electrical engineering\tp-audio-ee-etudiant-c24leray\src\wav\single_tone_piano2.wav"); [x2,fe2]=audioread("C:\Users\camil\Documents\IMT_A\semestre_6\electrical engineering\tp-audio-ee-etudiant-c24leray\src\wav\single_tone_piano2.wav");
soundsc(x1,fe1); soundsc(x1,fe1);
...@@ -20,4 +36,3 @@ plot(f2, log(abs(X2)),'b') ...@@ -20,4 +36,3 @@ plot(f2, log(abs(X2)),'b')
title("spectre") title("spectre")
xlabel("fréquence en Hz") xlabel("fréquence en Hz")
ylabel("log|X(f)|") ylabel("log|X(f)|")
legend(piano1, piano2)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment