Piano : Using C/C++ and Graphics
Hey guys, today I am going to post one awesome program which I have been working for a quiet long time. It's not complete yet though, I will try to complete it soon. It's mini piano which we can play using keyboard. Press the keys as shown in the keyboard layout in the out put screen to play piano. If you want to exit, press Esc key. Here's the screenshot of the output. Here's the code: Note: Please save the file in .cpp extension if it is showing error. Make sure your speaker works properly because this program generates different sound according to key pressed. /* Programmer: Ashok Kumar Shrestha (ak007) Program Description: mini piano v 1.0 */ #include<stdio.h> #include<conio.h> #include<dos.h> #include<graphics.h> #include<process.h> getkey() { union REGS i,o; while(!kbhit()); i.h.ah=0; int86(22,&i,&o); ...






Comments
Post a Comment