Skip to content
Snippets Groups Projects
Commit 55f10166 authored by DAOUAIRI Houda's avatar DAOUAIRI Houda
Browse files

code

parent 4e45ee83
No related branches found
No related tags found
No related merge requests found
%% this is a simple example to read and play a wave file with matlab [x_piano, Fe] = audioread("synthetic_piano_ADSR.wav");
x_piano = x_piano(:,1); % mono
% set a string variable to a wave filename we want to open: delay_time = 0.25;
toneFileName = "wav/single_tone_piano1.wav"; g = 0.9;
% read the content of the wave file: K = 10;
[data,fe] = audioread(toneFileName); y_filtre = effet_delay_filtre(x_piano, delay_time, g, K, Fe);
% data is a matrix with 2 columns if the sound is stereo; keep the mono to ease further processing soundsc(y_filtre, Fe);
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 deleted
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment