Creating a Program to Output Musical Notes in Computer Basics for Accountants

  • Thread starter Thread starter exportedhuman
  • Start date Start date
  • Tags Tags
    Program
AI Thread Summary
To create a program that outputs musical notes using C, the 'Beep(frequency)' function is essential. This function requires the frequency of the note, with 'do' typically corresponding to C4 (middle C). Frequencies for musical notes can be referenced from resources like Wikipedia. The 'Beep(frequency_in_Hz, duration_in_ms)' function is noted to work primarily with C++ on Windows platforms, utilizing the windows.h library. Users have successfully employed this function to play melodies, such as the theme from "2001: A Space Odyssey," by calculating the necessary frequencies for each note in a sequence.
exportedhuman
Messages
7
Reaction score
0
I have a class in computer basics, for accountants (my major)
I am also learning C and thinking if I can make a program that outputs a single sound of 'do'
(do in 'do re mi fa sol la si etc')

I also would like you to tell me how to change the 'vocality' in that increasing order so I can output all of them not justa single sound of do[/size]

Thank you :smile:
 
Technology news on Phys.org
yes you can,
there is a function called 'Beep(frequency)' if i have not forgotten,
the frequency is the one you need to figure out which is your standard 'do' and starts off you can find other harmony keys that come after.
 
danong said:
yes you can,
there is a function called 'Beep(frequency)' if i have not forgotten,
the frequency is the one you need to figure out which is your standard 'do' and starts off you can find other harmony keys that come after.

'Do' is usually C (and probably C4, or middle C). There's a frequency correspondence for the middle notes at the Wikipedia article on musical notes (along with the southern and eastern european names for the notes, i.e. Do-Re-Mi-Fa-So-La-Ti-Do):
http://en.wikipedia.org/wiki/Music_notes

I think the beep(frequency_in_Hz, duration_in_ms) may only work with C++ on a windows platform, using the windows.h library. However, I used it once to do the theme from 2001: A Space Odyssey (after working out the harmony on our piano). Here's more:
http://www.daniweb.com/forums/thread15252.html#
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.

Similar threads

Back
Top