Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tp-audio-ee-etudiant-a24perbe
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UEEE
sar-signal-audio
gr-vhdl-a24perbe
tp-audio-ee-etudiant-a24perbe
Commits
b994cac6
Commit
b994cac6
authored
2 weeks ago
by
PERBEN Anatole
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
4313ccbb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/wav/question_3_6.m
+38
-0
38 additions, 0 deletions
src/wav/question_3_6.m
with
38 additions
and
0 deletions
src/wav/question_3_6.m
0 → 100644
+
38
−
0
View file @
b994cac6
function
y
=
effet_reverb
(
x
,
h
);
x
=
x
(:);
h
=
h
(:);
y
=
conv
(
x
,
h
,
'same'
);
end
% Chargement du son de guitare (supposons qu'il est dans le script)
[
x_guitare
,
fe
]
=
audioread
(
'single_tone_guitar_nylon_string_a3.wav'
);
% par exemple
load
(
"signal_excitation.mat"
);
% si tu as stocké h avant
x_guitare
=
x_guitare
(:,
1
)
x
=
xe1
;
% tu peux tester aussi avec xe2 si tu veux comparer
N
=
length
(
x
);
% Étape 2 : Simuler la sortie de la pièce
y
=
simule_piece
(
x
,
fe
);
% réponse mesurée simulée
% Étape 3 : Estimer la réponse impulsionnelle via la corrélation croisée
h
=
xcorr
(
y
,
x
,
'none'
);
% Mesure du temps d’exécution
tic
;
y_reverb
=
effet_reverb
(
x_guitare
,
h
);
temps_execution
=
toc
;
% Affichage du temps
fprintf
(
'Temps de calcul de effet_reverb : %.4f secondes\n'
,
temps_execution
);
% Écoute du résultat
soundsc
(
y_reverb
,
fe
);
% Affichage (optionnel)
figure
;
plot
(
y_reverb
);
title
(
"Son de guitare avec réverbération"
);
xlabel
(
"Échantillons"
);
ylabel
(
"Amplitude"
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment