C program to create music like sa re ga ma pa
Hello friends its very interesting to produce sound in a programming language like c language .
While playing with C language programs and some function and also frequencies i found some unique things .I learnt how to produce sounds of some known frequencies and then I succeeded in producing the music sa re ga ma pa .To produce this music it requires a little bit knowledge of some functions for example delay() and beep() .
First of all we learn about these two functions ..
1.Delay -This function is used to stop execution of the program for some time .
Declaration- void delay(unsigned miliseconds);
we provide the argument as integer in the term of milisecond to just stop the execution of the program for the time.
We will use this function and another two sound () and nosound() while working with Turbo C++ IDE .
2.Beep() - This function is provided by the headerfile windows.h ,so this is frequently used by the latest working IDEs with mingw compilers.
It takes two arguments the first one is frequency and the second one is duration to produce the sound.
Now we are good go to the source code to create a music like saa re ga ma pa
These are the frequencies that produce sa re ga ma pa music ...
So, I hope you enjoyed this post .
Feel free to comment ,share and and like...