Signals M1

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Signals Project Milestone 1

Report

By: Ziad Tamer (55-1378), Abdelrahman Khairat (55-


0254)
- First of all, we started by importing the three packages
numpy, matplotlib.pyplot, and sounddevice.
- Sounddevice was not installed on spyder so we installed it
using the anaconda prompt.
- Then, we set the total time of the song using np.linspace to
3 seconds.
- After that, we chose 8 frequencies, 4 for the right hand and
4 for the left.
- We then used the function np.where to generate unit steps
by minusing each 2 consecutive functions from each other.
- Post that, we wrote our function which consisted of 4 notes,
multiplying each note by its unit step to asset when each
note will start and end.
- Finally, we used plt.plot to plot the function shown below
and sd.play to hear how the notes sound next to each other.

You might also like