(Solved) : 88 Keys Standard Piano Key Produces Music Note Different Frequency Different Musical Pitch Q44119912 . . .
There are 88 keys on a standard piano. Each key produces a musicnote that is at a different frequency (a different musical pitch).For example the A4 note on a piano is key 49 and has a frequency of440.0 Hz. You can convert any piano key into its correspondingfrequency using the following formula: Where n is the piano notenumber (between 1 and 88) and f(n) gives the frequency in Hertz.Note that 2 is raised to the power of that fraction. You are givena Helper file for this assignment called StdAudio.java and astarter BlueJ project. You should add your solution to thisexisting BlueJ project. The helper file allows you to play amusical note (provided you supply a frequency (double), duration(in seconds) (double) ) and volume (as a percentage) (double). Forexample to play an A4 note for 0.7 seconds at half volume you do asfollows: StdAudio.play(440.0, 0.7, 0.5); //or similarly: double a4= 440.0; StdAudio.play(a4, 0.7, 0.5); For Problem 1 you will createa program that plays a musical note (a piano key between 1 and 88of your predetermined choosing) and asks the user to guess what thenote is. The user will be asked to input a number between 1 and 88representing their guess as to which piano key matches the soundthey heard. Your program will then play their note so they can hearwhat they have input. You should output the user guessed piano keynumber and the corresponding frequency and the actual piano keynumber and its corresponding frequency indicating by how many keysthe user was incorrect – or a congratulatory message if they got itcorrect
Expert Answer
Answer to There are 88 keys on a standard piano. Each key produces a music note that is at a different frequency (a different musi…
OR