Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python please! Assignment 2: Amplitude Operations on Signals Again, following the guidelines in the Lab 1 template, start a new cell and write a script
Python please!
Assignment 2: Amplitude Operations on Signals Again, following the guidelines in the Lab 1 template, start a new cell and write a script to meet the following specifications. This assignment will have four parts, A-C, each of which should be indicated with comments. A. Create a discrete time signal sl that is the same length as xl and has value 1 for t=[0,0.5] and value 0.2 for t>0.5. You can use the command below where lenl is the length of xl and n0 is the index corresponding to t=0.5 sl = np.concatenate((np.ones(n0),0.2*np.ones(len(xl)-n0)) Multiply xl with sl to create v1. Save this signal to a wav file. B. Create a discrete-time decaying ramp signal r1, that is the same length as xl. The signal should have value 1 at time 0 and linearly decay to value 0. (Hint: use numpy.arange.) Multiply xl with rl to create v2. Save this signal to a wav file. C. Read in vl and v2 using simpleaudio and play the two different modifications together with the original, to verify that the volume of the second whistle is reducedStep 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