Home » Source Code » Java simulation of piano

Java simulation of piano

ingpingp
2013-12-30 00:35:06
The author
View(s):
Download(s): 0
Point (s): 1 
Category Category:
javajava JavaJava

Description

1) programming: first of all, this exercise in order to make Instances of simulated piano , So the first thing you want to build the program interface: via statement Image m_ImgUp Keyboard picture is displayed when generating the keyboard, mouse, and statements Image m_ImgDown Build keyboard, the keyboard picture displayed when the mouse is pressed, final adoption of the statement m_ImgUp=getImage(getDocumentBase(),"img/up.gif") And statements m_ImgDown = getImage getDocumentBase () ,"img/down.gif" ) Loads a picture, build a piano interface. Then, because to achieve simulated piano effect, so analog sound playback, first through the statement AudioClip[]m_AudioClip=new AudioClip[14] generates an array of audio objects, saved seven midrange and seven treble tones, and finally, through the function public void keyPressed ( KeyEvent e) to respond to the keyboard by pressing the action, achieving the sound will play.

Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
01.96 kB
01.96 kB
0.AU1,010.00 B2000-03-22 01:51
1.AU946.00 B2000-03-22 01:51
10.AU989.00 B2000-03-22 01:51
11.AU989.00 B2000-03-22 01:51
12.AU989.00 B2000-03-22 01:51
13.AU989.00 B2000-03-22 01:51
14.AU989.00 B2000-03-22 01:51
2.AU1.01 kB2000-03-22 01:51
3.AU993.00 B2000-03-22 01:51
4.AU1,006.00 B2000-03-22 01:51
5.AU1,016.00 B2000-03-22 01:51
6.AU1.02 kB2000-03-22 01:51
7.AU980.00 B2000-03-22 01:51
8.AU1.04 kB2000-03-22 01:51
9.AU989.00 B2000-03-22 01:51
_desktop.ini10.00 B2006-11-19 09:49
01.96 kB
DOWN.GIF220.00 B2001-02-19 00:52
Thumbs.db4.50 kB2007-06-24 15:28
UP.GIF279.00 B2001-02-19 00:52
_desktop.ini10.00 B2006-11-19 09:49
Piano.class5.13 kB2003-07-22 11:46
Piano.html351.00 B2003-05-28 15:39
Piano.java6.60 kB2003-07-22 11:46
_desktop.ini10.00 B2006-11-19 09:49
...
Sponsored links

Comments

(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words
mmm445599
2016-03-30

代码写的很不错,效果很好,实现了很多功能,值得借鉴

  • 1
  • Page 1
  • Total 1

Java simulation of piano (16.58 kB)

Need 1 Point(s)
Your Point (s)

Your Point isn't enough.

Get 22 Point immediately by PayPal

Point will be added to your account automatically after the transaction.

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more Points

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D