Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tp-audio-ee-etudiant-k24jebar
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
Admin message
La purge estivale des projets de gitlab-df sera réalisée jeudi 10 juillet vers 10h.
Show more breadcrumbs
UEEE
sar-signal-audio
gr-vhdl-k24jebar
tp-audio-ee-etudiant-k24jebar
Commits
1e0146c5
Commit
1e0146c5
authored
1 month ago
by
BOUZID Adam
Browse files
Options
Downloads
Patches
Plain Diff
Update file Q_2_4.m
parent
0e1a7695
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/Q_2_4.m
+19
-13
19 additions, 13 deletions
src/wav/Q_2_4.m
with
19 additions
and
13 deletions
src/wav/Q_2_4.m
+
19
−
13
View file @
1e0146c5
% Appel de la fonction simulée
x_sim
=
simule_piece
(
xe1
,
fe
);
clear
all
close
all
% Corrélation croisée
[
xc
,
lags
]
=
xcorr
(
x_sim
,
xe1
);
% ----- Chargement du signal réel -----
[
x1
,
fe
]
=
audioread
(
"single_tone_cello-a3.wav"
);
x1
=
x1
(:,
1
);
% Un seul canal si stéréo
x1
=
x1
(:);
% Forcer en vecteur colonne
% Axe temporel en secondes
lags_time
=
lags
/
fe
;
% ----- Conception du filtre -----
d
=
designfilt
(
'lowpassfir'
,
'FilterOrder'
,
10
,
...
'HalfPowerFrequency'
,
0.27
);
% Affichage
figure
;
plot
(
lags_time
,
xc
);
xlabel
(
'Décalage temporel (s)'
);
ylabel
(
'Corrélation croisée'
);
title
(
'réponse impulsionnelle'
);
grid
on
;
\ No newline at end of file
% ----- Application du filtre -----
x_filt
=
filter
(
d
,
x1
);
% ----- Normalisation -----
x_filt
=
x_filt
/
max
(
abs
(
x_filt
));
% ----- Écoute -----
sound
(
x1
,
fe
);
pause
(
2
);
disp
(
'Lecture : signal filtré avec filtre FIR amortisseur'
);
soundsc
(
x_filt
,
fe
);
pause
(
2
);
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