I'm trying to make a program that allows the user to create a short tune. To do so I need to allow the user to type in two numbers (x and y) and combine both of those numbers into the Beep(,) function.
This is what I have:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
cout << "Enter Note " << quantity << "." << endl;
cin >> chooser;
cin >> flatsharp;
cin >> length;
system("CLS");
if (chooser == 1) {
if (flatsharp == 2) {
if (length == 1) {
Beep(233.08,100);
} if (length == 2) {
........
.......
........
if statements on and on until all notes are done....
|
You probably already know what it does, but to make sure....
You enter what note you want (A, B, C, D, E, F, or G) it to play. Then you enter 1, 2, or 3 to make it flat, sharp, or normal. Afterwards, you enter the length you want it to be. It takes those values and puts them into billions of
if statements until it finds a match.
I want to try and make it play all of those notes without billions of
if statements. If you can help, please send me an email at: tyler.is.number.one@gmail.com or just post here.... :D