Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java thank you! Ask the user to enter 0, 1, 2, 3, or 4. If the user enters anything other than one of those five
Java
thank you!
Ask the user to enter 0, 1, 2, 3, or 4. If the user enters anything other than one of those five options, the program should reprompt the user to enter one of the four options (it should continue to do this forever) It should also give the user some indication of what each option does (explained below). If the user enters 0, the program should exit. If the user enters 1, the program should prompt the user to enter a filename (without the.wav extension) and then read the file in and write a separate .wav file with only every other audio sample. This will have the effect of raising the pitch by one octave (and shortening the play time. The resulting file should be named "(original name)Higher.wav" For example, if the user enters cymbal, the output file should be called cymbalHigher.wav. Once this has been completed, the program should return to the prompt which asks the user to enter 0, 1, 2, 3 or 4 If the user enters 2, the program should prompt the user to enter a filename (without the .wav extension) and then read the file in and write a separate .wav file with (almost) twice as many samples. Between each pair of consective samples from the original, the result should contain the average of the pair (in addition to the originals). This will have the effect of lowering the pitch by one octave (and lengthening the play time).The resulting file should be named "original name)Lower.wav For example, if the user enters cymbal, the output file should be called cymbalLower.wav. Once this has been completed, the program should return to the prompt which asks the user to enter 0, 1, 2, 3 or 4 If the user enters 3, then the program should ask the user for a filename (without an extension) and a frequency. The program should then create a .wav file containing one second worth of audio that represents a tone at the specified frequency. Once this has been completed, the program should return to the prompt which asks the user to enter 0, 1, 2, 3 or 4 Optional If the user enters 4, then the program should ask the user for a filename (without an extension) and two frequencies. The program should then create a.wav file containing one second worth of audio in stereo One frequency should be on one channel and the other frequency on the other channel. Once this has been completed, the program should return to the prompt which asks the user to enter 0, 1, 2, 3 or 4 Ask the user to enter 0, 1, 2, 3, or 4. If the user enters anything other than one of those five options, the program should reprompt the user to enter one of the four options (it should continue to do this forever) It should also give the user some indication of what each option does (explained below). If the user enters 0, the program should exit. If the user enters 1, the program should prompt the user to enter a filename (without the.wav extension) and then read the file in and write a separate .wav file with only every other audio sample. This will have the effect of raising the pitch by one octave (and shortening the play time. The resulting file should be named "(original name)Higher.wav" For example, if the user enters cymbal, the output file should be called cymbalHigher.wav. Once this has been completed, the program should return to the prompt which asks the user to enter 0, 1, 2, 3 or 4 If the user enters 2, the program should prompt the user to enter a filename (without the .wav extension) and then read the file in and write a separate .wav file with (almost) twice as many samples. Between each pair of consective samples from the original, the result should contain the average of the pair (in addition to the originals). This will have the effect of lowering the pitch by one octave (and lengthening the play time).The resulting file should be named "original name)Lower.wav For example, if the user enters cymbal, the output file should be called cymbalLower.wav. Once this has been completed, the program should return to the prompt which asks the user to enter 0, 1, 2, 3 or 4 If the user enters 3, then the program should ask the user for a filename (without an extension) and a frequency. The program should then create a .wav file containing one second worth of audio that represents a tone at the specified frequency. Once this has been completed, the program should return to the prompt which asks the user to enter 0, 1, 2, 3 or 4 Optional If the user enters 4, then the program should ask the user for a filename (without an extension) and two frequencies. The program should then create a.wav file containing one second worth of audio in stereo One frequency should be on one channel and the other frequency on the other channel. Once this has been completed, the program should return to the prompt which asks the user to enter 0, 1, 2, 3 or 4Step 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