Here is what I'm trying to do:
- Take input with scanf()
- Pass input to function
- Beep frequency associated with input
I have notes defined, e.g
const in C5 = 523.25;
I want the user to be able to input "C5", and have the computer beep at a frequency of 523.25.
When I run my code, I get the same sound no matter what I input, even if it is just random letters.
I am fairly new to C, but I think what is happening is that the function is trying to beep at the frequency of the string the user inputs, rather than the in that the note is associated with.
How can I solve this problem?