Search for question
Question

VIRTUAL KEYBOARD, PHONE, & FLYER CIS 4930/ CIS 6930 - HW #3 PARTI OVERVIEW & GOALS The goal of this assignment is to practice digitally creating and manipulating sounds, you will create a keyboard in MATLAB, using your knowledge from lecture. Each key will play a different note between C3 and C6. You will implement the keyboard to play a particular note when pressed, according to the frequencies specified on the chart below. You will include additional functionality that creates, plays, and saves a song (of your choice) as a .wav file. Lastly, you will practice using the MATLAB Spectrogram feature to analyze the spectral components of your song. MIDI number ನಟಿಸ935888899999988885888958 8 8 8೧೧&a8599…? 23 24 26 28 29 31 33 36 40 41 37 38 39 43 47 42 44 45 46 50 65 48 49 67 71 72 76 77 79 81 84 66 68 69 70 86 22 88 25 27 96 30 32 34 73 74 75 100 101 103 105 107 108 51 54 56 58 61 63 78 80 91 92 93 94 82 85 87 97 98 99 90 102 104 106 Note name AO ВО C1 D1 E1 F1 G1 Al B1 C2 D2 E2 F2 G2 A2 B2 F3 G3 A3 B3 C4 D4 E4 F4 G4 B4 C5 D5 E5 F5 G5 A5 B5 C6 D6 E6 F6 G6 A6 B6 C7 D7 E7 F7 G7 A7 B7 C8 Keyboard J. Wolfe, UNSW ASSIGNMENT Frequency 27.500 30.868 29.135 32.703 36.708 34.648 41.203 38.891 43.654 48.999 55.000 51.913 46.249 58.270 61.735 65.406 73.416 69.296 82.407 77.782 87.307 97.999 92.499 110.00 103.83 123.47 116.54 554.37 622.25 Period ms 698.46 783.99 739.99 830.61 880.00 987.77 932.33 1046.5 1174.7 1108.7 13 18.5 1244.5 1396.9 1568.0 1480.0 1760.0 1661.2 1975.5 1864.7 2093.0 2349.3 22 17.5 2637.0 2489.0 2793.0 3136.0 2960.0 3520.0 3322.4 3951.1 3729.3 4186.0 36.36 32.40 34.32 30.58 27.24 28.86 24.27 25.71 22.91 20.41 21.62 18.18 19.26 16.20 17.16 15.29 9.09 1 8.099 130.81 7.645 146.83 138.59 6.811 7.216 6.068 6.428 5.727 164.81 155.56 174.61 196.00 185.00 220.00 207.65 246.94 233.08 261.63 293.67 277.18 329.63 311.13 349.23 392.00 369.99 5.102 5.405 4.545 4.816 4.050 4.290 3.822 3.405 3.608 3.034 3.214 2.863 2.551 2.703 440.00 415.30 2.273 2.408 493.88 523.25 466.16 2.025 2.145 587.33 659.26 13.62 14.29 12.13 12.86 11.45 10.20 10.81 9.631 8.581 1.910 1.703 1.804 1.517 1.607 1.432 1.276 1.351 1.136 1.204 1.012 1.073 0.9556 0.85 13 0.9020 0.7584 0.8034 0.7159 0.6378 0.6757 0.5682 0.6020 0.5062 0.5363 0.4778 0.4257 0.45 10 0.3792 0.40 18 0.3580 0.3189 0.3378 0.2841 0.30 10 0.2531 0.2681 0.2389 :6 PART II Using MATLAB, implement a virtual keyboard 1. Please don't call it keyboard.m 2. Use notes from C3 to C6 3. Play as a sine wave 4. Each note's duration is your choice Pick a Song (30-45 seconds) 1. Some ideas: ● https://latouchemusicale.com/en/easiest-piano-songs-with- letters Make one button to play the song you chose and output the song to a wav file. 1. This will involve appending many sine waves together for different durations and saving the results to a .wav file Make a second button that graphs the spectrogram for your entire song Include the picture of your spectrogram (as an image file) OVERVIEW & GOALS You will use MATLAB to create an "old school" traditional analog telephone keypad. When the buttons are pressed, the correct tone is played for .5 seconds. Next, you will read five different mystery phone numbers (hint: “digit-by-digit”) and determine what phone number has been dialed. ASSIGNMENT Using MATLAB, implement a virtual telephone keypad 1. Pressing a single key of a traditional analog telephone keypad produces a telephony signaling event to the remote switching system. For touchtone service, the signal is a dual-tone multi-frequency signaling tone consisting of two simultaneous pure tone sinusoidal frequencies. The row in which the key appears determines the low-frequency component, and the column determines the high-frequency component. For example, pressing key 1 results in a signal composed of tones with frequencies 697 hertz (Hz) and 1209 Hz. 697 Hz. 770 Hz. 852 Hz. 941 Hz. guess-phone1.wav guess-phone2.wav 1209 Hz. guess-phone3.wav 1 guess-phone4.wav 4 7 1336 Hz. 2 (1 Decoding the phone numbers 1. Download the 5 phone numbers below. 5 8 1477 Hz. 2. As each button is pressed, it should play the corresponding tone 3. Each button's duration is .5 seconds 3 6 9 # guess-phone5.wav 2. Each digit is played for .5 seconds, sample rate is 44,100 3. For each mystery phone number, ● Read in each digit, determine its spectral content (hint: use a spectrogram) and note the dialed phone number Write down the full phone number (10 digits) SUBMISSION Upload to Canvas one (1) zip file that contains Part 1 (in its own separate folder, containing the relevant.m, .fig, .wav, and image files) Part 2 (in its own separate folder, containing the relevant .m, .fig, and text file containing the phone number guesses) Include a separate text file entitled “contributions.txt” describing who was responsible for each portion of the homework.