| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectworld.sound.SoundWorld
world.sound.test.SoundTest
public class SoundTest
Quick test of the sound library/world: A Bouncing ball with sound.
| Field Summary | 
|---|
| Fields inherited from class world.sound.SoundWorld | 
|---|
| DEFAULT_TICK_RATE, KEY_ARROW_DOWN, KEY_ARROW_LEFT, KEY_ARROW_RIGHT, KEY_ARROW_UP, keyTunes, MOUSE_DOWN, MOUSE_DRAG, MOUSE_ENTER, MOUSE_LEAVE, MOUSE_MOVE, MOUSE_UP, musicBox, tickTunes | 
| Constructor Summary | |
|---|---|
| SoundTest() | |
| Method Summary | |
|---|---|
| static void | main(java.lang.String[] args)Main Method... | 
|  Scene | onDraw()Draw the Ball | 
|  void | onKey(java.lang.String ke)Change this World when a key event is triggered. | 
|  void | onTick()On Tick, move/bounce the ball and add a Sound | 
|  double | tickRate()Reasonable tick rate | 
| Methods inherited from class world.sound.SoundWorld | 
|---|
| bigBang, equals, lastScene, onMouse, onRelease, stopWhen | 
| Methods inherited from class java.lang.Object | 
|---|
| getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public SoundTest()
| Method Detail | 
|---|
public Scene onDraw()
onDraw in class SoundWorldpublic double tickRate()
tickRate in class SoundWorldpublic void onTick()
onTick in class SoundWorldpublic void onKey(java.lang.String ke)
SoundWorldSpecial Key
| "up" : | The user presses the up-arrow key | 
| "down" : | The user presses the down-arrow key | 
| "left" : | The user presses the left-arrow key | 
| "right" : | The user presses the right-arrow key | 
Notes) to play when the given key is pressed
  may be added to the keyTunes tune-collection
  to be played until the same key is released.  Notes will not stop playing until the
  key is released.
 
  Sounds to be played for a specific length of time after a certain key press (i.e., not
  until the key is released) may be added to the tickTunes
  tune-collection (instead of keyTunes) played until
  amount of time corresponding to the note's duration has elapsed.
 
onKey in class SoundWorldpublic static void main(java.lang.String[] args)
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||