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

  • Thread starter Thread starter exportedhuman
  • Start date Start date
  • Tags Tags
    Program
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
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:
 
Physics 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#