|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopenpiano.piano.Piano
public class Piano
The Piano class loads a 3D-piano and handles the animations of keys
| Constructor Summary | |
|---|---|
Piano(Controller controller,
javax.media.opengl.GL gl)
Constructs a 3D-piano with 88 keys |
|
| Method Summary | |
|---|---|
Boolean |
isKeyMarked(int key)
Return true if the key is marked |
void |
releaseAllKeys()
Release all keys |
void |
sendKey(int key,
int velocity,
Boolean autoPlayed)
Sends played notes to the piano and shows them |
void |
setKeyMarker(int key,
int color,
float factor)
Sets the depth of the color of a key |
void |
setKeyMarkerOff(int key)
Sets the key's color off |
void |
showPiano()
Draws the piano |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Piano(Controller controller,
javax.media.opengl.GL gl)
controller - the main controller of the applicationgl - the relevant GL context| Method Detail |
|---|
public Boolean isKeyMarked(int key)
key - the affected key
public void releaseAllKeys()
public void sendKey(int key,
int velocity,
Boolean autoPlayed)
key - the affected keyvelocity - the velocity of the key, a velocity of 0 means release keyautoPlayed - true if the application, false if the user activated the key
public void setKeyMarker(int key,
int color,
float factor)
key - the affected keycolor - the color of the affected keyfactor - the depth factor of the color (0.0 - 1.0)public void setKeyMarkerOff(int key)
key - the affected keypublic void showPiano()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||