|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.webkitchen.brainathlon.gameComponents.MidiFeedback
public class MidiFeedback
Handles setup of Midi and playback of sounds
| Nested Class Summary | |
|---|---|
static class |
MidiFeedback.SoundType
|
static class |
MidiFeedback.Volume
|
| Method Summary | |
|---|---|
static MidiFeedback |
getInstance()
Factory method for return the single instance of MidiFeedback |
java.util.Map<java.lang.String,java.lang.Integer> |
getInstrumentOptions()
Returns the target instrument options |
boolean |
isLoaded()
|
void |
loadMidi()
Attempts to load Midi components |
void |
playCourseOverSong()
Play the Midi song specified in the configuration file |
void |
playSound(MidiFeedback.SoundType type,
int channel,
int instrument)
Plays a feedback sound at medium volume |
void |
playSound(MidiFeedback.SoundType type,
int channel,
int instrument,
MidiFeedback.Volume volume)
Plays a feedback sound |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MidiFeedback getInstance()
public void loadMidi()
throws javax.sound.midi.MidiUnavailableException
javax.sound.midi.MidiUnavailableException - if we are unable to load any componentspublic boolean isLoaded()
public java.util.Map<java.lang.String,java.lang.Integer> getInstrumentOptions()
public void playSound(MidiFeedback.SoundType type,
int channel,
int instrument)
type - the type of feedbackchannel - the channel to useinstrument - the Midi instrument number
public void playSound(MidiFeedback.SoundType type,
int channel,
int instrument,
MidiFeedback.Volume volume)
type - the type of feedbackchannel - the channel to useinstrument - the Midi instrument numbervolume - the sound levelpublic void playCourseOverSong()
Configuration
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||