Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need to write a function that can create noise, and then add that noise to the sound signal in my matlab code below: %Creating
I need to write a function that can create noise, and then add that noise to the sound signal in my matlab code below:
%Creating 5 seconds of pleasant sound %Sampling frequency more than twice of the frequency fs- 2000; ?= [0:1/fs:5/15-1/ ; %5 seconds of peaceful music G-sin(2*pi*392*t): A-sin(2*pi*400*t); F-sin(2*pi*370*t); %Notes B-sin(2*pi*4939*t); C = sin(2*pi*261.6*t); %Notes line!-[G,G,A,G,F,A,A,B,A,G,B,B,C,BA]; % Piece of music combing the notes sng [line1]; sound(song f); %Sound the music %Normalizing the sound matrix to make in range of 16 bit precision max valuemax(abs song)); song = song,/max. xal; %Declaring the file name to save the audio filename- 'myAudioFile.wav; %Writing the audio to file"myAudioFile.way' audiowrite(filename, song, ts); %Readin, the audio fileStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started