C++ Code To Emulate A Piano

 

Are you bored of typing Graphics Programs in C++? Here is something for your acoustic senses! This code will transform your ordinary keyboard into a Digital Piano!

// DIGIP.CPP
// DIGITAL PIANO
// Created by Karthik Sampath on 3/3/2010.
// Copyright 2010, Karthik. All rights reserved.
// The copyright to the computer program(s) herein
// is the property of Karthik Sampath ,India. The
// program(s) may be used and/or copied only with the
// written permission of Karthik Sampath or in accordance
// with the terms and conditions stipulated in the
// agreement/contract under which the program(s) have
// been supplied. This copyright notice must not be
// removed.
// Published in www.geekyard.com

#include
#include
#include
void main()
{
int i;
int music=710;
int freq;
clrscr();
cout<>freq;
while(1)
{
i=getch();
music=freq*i;
sound(music);
delay(1000);
nosound();
}
}

Feel free to experiment with your own Reference Frequencies.

P.S: Avoid running this code at work  ;)

Popularity: 14% [?]

Related posts:

  1. C++ Code To Draw A Winking Face
  2. C Code To Display List Of ASCII Characters

Subscribe to receive more Adsense, SEO,Blog Hacks articles to your Inbox

Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

13 Responses to “C++ Code To Emulate A Piano”

commenter

Although I do think your current write-up is on the ideal track there are two items that i don’t go along with.

commenter

Exceptional Weblog, I just found this post while seeking by way of Blogburst I think that you and I could have been completely close friends inside a previous living – the posts that I’ve learnt from so far are truly charm to me and to my sense of personality! Anyways, chit chat aside, it appears that your Feed will not appear to perform in my browser (Ive just installed Google chrome) have you been in a position to notify me how I can fix it?

commenter

Hello! Just wanted to tell you that I like your entire publishing style and that so I am going to follow your blog often from now on ;) Stay the best!

commenter

Which two items Best tips?

commenter

Learned something new today after all. Thank you.

commenter

Hi, excelent, this is good stuff, keep up the good work.Greetings

commenter

Outstanding site. I really loved this post, I’m bookmarking your site right now!

commenter

I feel a lot more people need to read this, very good info!

commenter

Hi! Your post rocks and is a time saver!

commenter

Hello,Excellent article dude! i’m Fed up with using RSS feeds and do you use twitter?so i can follow you there:D.
PS:Do you thought about putting video to your web site to keep the readers more enjoyed?I think it works.Kind regards, Ray Ovitt

commenter

Interesting blog. It would be great if you can provide more details about it. Thanks you

commenter

Great info, thanks for useful post. I am waiting for more

commenter

Being a new blogger, I would like to tell you that you have given me much knowledge about it. Thanks for everything.

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Website:
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

CommentLuv badge

Spam protection by WP Captcha-Free