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

  • Thread starter Thread starter exportedhuman
  • Start date Start date
  • Tags Tags
    Program
Click For Summary
SUMMARY

The discussion focuses on creating a program in C that outputs musical notes, specifically starting with the note 'do', which corresponds to C4 (middle C). The 'Beep(frequency, duration)' function is highlighted as a method to generate sound, particularly on a Windows platform using the windows.h library. Participants emphasize the importance of determining the correct frequency for each note and provide resources for understanding musical note frequencies, including a Wikipedia article on the subject.

PREREQUISITES
  • Basic knowledge of C programming
  • Understanding of sound frequencies and musical notes
  • Familiarity with the Windows.h library
  • Concept of frequency in Hertz (Hz)
NEXT STEPS
  • Research the 'Beep(frequency_in_Hz, duration_in_ms)' function in C++
  • Explore how to calculate frequencies for musical notes
  • Learn about sound synthesis techniques in programming
  • Investigate libraries for audio output in C beyond the Windows.h library
USEFUL FOR

This discussion is beneficial for beginner programmers, particularly those studying C, as well as music enthusiasts interested in programming sound generation. It is especially relevant for accountants looking to integrate basic programming skills with musical applications.

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#
 

Similar threads

Replies
4
Views
4K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 18 ·
Replies
18
Views
4K
Replies
29
Views
6K
Replies
3
Views
4K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 75 ·
3
Replies
75
Views
7K
Replies
1
Views
3K