Monday, June 15, 2009

Computer Graphics - Piano Music

Posted by Sarjukottapuram

#include


#include

#include

#include

/** PC Internal Speaker Required **/

//** Author: Sarju www.sarjus-elearning.blogspot.com **/

main()





{

float octave[7]={130.81,146.83,164.81,174.61,196.220,246.94};
//You can change the music by changing above values
int adn;

while(!kbhit())





{

adn=random(7);

sound(octave[adn]*10);

delay(190);

nosound();

}}

0 comments:

Post a Comment