Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Systems LAB: Sound EffectsSounds are a part of everyday life. We use speech for communication, music is a major component of our entertainment, and we are using ultrasound in medical diagnostics....

1 answer below »
Systems LAB: Sound EffectsSounds are a part of everyday life. We use speech for communication, music is a major component of our entertainment, and we are using ultrasound in medical diagnostics. Sounds have provided the impetus for audio engineers to increase quality of life and level of entertainment through sound manipulation and engineering. In this lab, we will learn the fundamental ideas of sound effects and use the signal processing techniques in MATLAB. We will also build understanding about how the systems work.NOTE: Each time you see a new MATLAB command, please go to MATLAB Help and read the documentation on this command. You might need to use it in the future.Your goal is to populate all of the empty code gray boxes to replicate the presented results. Please submit the MATLAB code in a single M-file.
Basic Manipulations with Stereo SoundsReading Sound filesRead the file road.wav using audioread function and show its sampling frequency.
Fs is a sampling frequency of 44100 samples/second. This means that 44100 samples (numbers) in the vector represent 1 second of the audio.The size of the vector is (size function):
Note that it has multiple rows and two columns. The left (first) column is the left stereo channel, and the right column is the right stereo channel. To extract and play each side separately we define:left = road(:,1)
Plot the first quarter of a second (44100/4=11025 samples) for the left channel data versus time. To plot small portion in order to see details.
Now, we can play the sound for left channel, then right channel, and then stereo to hear the difference:soundsc(left,Fs) % plays left channel as monosoundsc(right,Fs) % plays right channel mono (sound nearly the same)soundsc(road,Fs) % plays stereoReversing AudioTo play the sound backwards, we simply reverse the order of the numbers in the arrays.Hint: flipud functionreverseRoad = ???soundsc(reverseRoad, Fs)Removing (Minimizing) VocalsIn most popular music recordings, the vocal track is the same on the left and right channels (or very similar). The volume of the various instruments are more unevenly distributed between the two channels. Since the voice is the same on both channels, what would happen if we subtract one channel from the other and listen to the result?soundsc(???, Fs)Notice the voice is virtually eliminated…Changing the SpeedThe sampling frequency Fs tells us how much time goes between each sample (T=1/Fs). If we play the song with more or less time between samples than was originally there when recorded, the speed will seem off, producing interesting effects.soundsc(road, Fs/1.5)soundsc(road, Fs*1.5)Sound EffectsDigital Tone ControlThe following program (or “digital filter”) is designed to soften high frequency components from the signal (treble). It retains the low frequency components (bass). Applying this digital filter has the same effect as turning down the treble tone control on your stereo. The simplest variant of this filter is exponential smoothing filter (yes, the same one you've implemented before for a weather plot smoothing).
Let's use , and y[n] is the output sound.y=road;alpha = 0.99;for n=2:size(road,1) y(n,:)=(1-alpha)*road(n,:) + alpha*y(n-1,:);endNow, let's play it:soundsc(y,Fs)Simple modification to the filter will emphasize the high frequencies and remove the bass:
Note that this difference is a numerical approximation for a derivative. Implement this filter and play the sound:
Echo EffectThe echo effect can be simply considered as a delay of music signal. It is produced by repeating the original music signal after a fixed amount of time period. This effect is creating an illusion of big open spaces or concert halls. A filter with a single delay will achieve this effect. The difference equation for the filter can be written as follows: Y[n] = X[n] + a*X[n – D]Where:X[n] : input signalY[n]: output signalD : number of samples during delay, fixed valuea : attenuation coefficient. |a| Read the Singing.wav file and its sampling frequency. Compute the length of the music file.[X,Fs] = audioread('Singing.wav');L = size(X,1);Set Attenuation Factor = 0.3 and D = 10000 samples.a = 0.3;D=10000;Initialize the output music signal. Apply the filter above.Y = zeros(L,1); % initialize the output music signalfor n = D + 1:L ???endPlay Echo. Use soundsc command to play the original and processed signal.soundsc(X, Fs)soundsc(Y, Fs)Flanger EffectThe flanging effect is produced by mixing two identical music signals with a varying delay function. Unlike the fixed delay D in the echo effect design, the flanger filter has a non-constant delay D, which changes periodically. The difference equation for this flanger filter can be written as follows: XXXXXXXXXXY[n] = X[n] + X[n - D[n]]Where:X[n] : input signalY[n]: output signalD : periodic delay functionThe implementation of flanging is using the file road and the delay changing as a cosine function.Implement the flanger system in the code below:L = size(road,1);D = 15+round(15*cos(3*(1:L)/Fs));Y = zeros(L,2);for n = 31:L ???end
soundsc(Y,Fs)
Answered 1 days After Feb 27, 2022

Solution

Sathishkumar answered on Mar 01 2022
100 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here