Question

In: Electrical Engineering

Need explanation of MATLAB code which creates echo. (SIGNAL PROCESSING) If the original audio signal is...

Need explanation of MATLAB code which creates echo. (SIGNAL PROCESSING)

If the original audio signal is x(t) then the echo is y(t) = x(t) + alpha*x(t-delay)

This code below creates this echo however I don't understand how every line of the code works, could someone comment this code so I can understand?

[x,Fs] = audioread('Hallelujah.wav');  
 sound(x,Fs);   
 delay = 0.5; % 0.5s delay  
 alpha = 0.65; % echo strength  
 D = delay*Fs;  
 y = zeros(size(x));  
 y(1:D) = x(1:D);  
   
 for i=D+1:length(x)  
   y(i) = x(i) + alpha*x(i-D);  
 end  

Solutions

Expert Solution

desired graph


Related Solutions

I need an original matlab code and gui for a simple double pendulum. This needs to...
I need an original matlab code and gui for a simple double pendulum. This needs to be original and not too complicated. Please provide basic instructions. Thank you!
2. A digital signal processing system with analog audio signal input in the range of 0-20...
2. A digital signal processing system with analog audio signal input in the range of 0-20 Khz uses oversampling techniques and a second order sigma delta modulator to convert the analog signal into a digital bit stream at a rate of 3.072 Mhz. i) Explain how the digital bit stream may be converted in to a digital multibit stream for x(n). ii) Determine the overall improvement in signal to quantization noise ratio made possible by oversampling and noise shaping and...
show the MATLAB Code with comments and Write an .m file in MATLAB, that records audio...
show the MATLAB Code with comments and Write an .m file in MATLAB, that records audio (you can record your own voice for 20 seconds), takes Fourier transform of the signal (probably FFT).
What would I add to the following code to detect the pitch of the audio signal?...
What would I add to the following code to detect the pitch of the audio signal? (use cepstral method) clear all; close all; clc; info = audiodevinfo; info.input(1) info.input(2) pause(3); % delete it if necessary clc; fs = 44.1e3; noBits = 16; noChannels = 1; recordObject = audiorecorder(fs,noBits,noChannels); disp('Start speaking...'); record(recordObject); pause(3); stop(recordObject); disp('End of Recording.'); x = getaudiodata(recordObject); %takin in as aperiodic signal noSamples = length(x); %length of vector x "max(size(x)) time = [1:noSamples]/fs; %time ticks %DFT: X[k]= (sigma...
USING MATLAB In signal processing applications, the Hankel matrix is useful. The elements of a (N...
USING MATLAB In signal processing applications, the Hankel matrix is useful. The elements of a (N × N) Hankel matrix are given by h?? =0   ?+?−1>? =?+?−1 otherwise Write a script that takes as input from the user an integer, n. Your code should accept input ≥1 and <10. The user should be repeatedly prompted until acceptable input is entered. Next, create n Hankel matrices for N=1,2,...,n. That is, if the user enters 4, you’ll generate 1×1, 2×2, 3×3, and...
Matlab Code that does the following: Takes as input 3 frequencies. Create a signal that is...
Matlab Code that does the following: Takes as input 3 frequencies. Create a signal that is a mixture of the 3 signals. Create a bandpass filter that only selects the center frequency. Output the filtered signal which contains only the middle frequency. Plot in time and frequency domain the original signal and the filtered signal. Show the output for filter order 1 and 15. Upload a pdf of the image files. Each figure should have your name in the title...
I need MATLAB layout programming for patient monitoring system which consists of ECG signal,body temperature, pulse...
I need MATLAB layout programming for patient monitoring system which consists of ECG signal,body temperature, pulse rate and blood pressure. Please do it quickly.
i need matlab code of heat equation in 1D with convection ?
i need matlab code of heat equation in 1D with convection ?
pls, I need Matlab code for, OFDM modulation (Matlab demo by at least 4 carriers)
pls, I need Matlab code for, OFDM modulation (Matlab demo by at least 4 carriers)
Hello, I need the Matlab code of the Fourier Transform without using the Matlab functions fft...
Hello, I need the Matlab code of the Fourier Transform without using the Matlab functions fft and dft. Applied to discrete signals. If you can with an example.Thank you!!
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT