|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectc11files.calgorythmic.midi.MidiPlayer
public class MidiPlayer
A simple wrapper for the Java MIDI API that provides note start and stop for various instruments and channels.
| Constructor Summary | |
|---|---|
MidiPlayer()
This routine initializes the MIDI synthesizer, bank of synthesized sounds and the MIDI channels. |
|
| Method Summary | |
|---|---|
void |
close()
This routine shuts down the synthesizer. |
void |
setInstrument(int instrument)
This routines sets current synthesized instrument with which to play notes. |
void |
startNote(int note,
int velocity)
This routine starts a note with the given velocity on the default MIDI channel. |
void |
startNote(int note,
int velocity,
int channelIndex)
This routine starts a note with the given velocity on the given MIDI channel. |
void |
stopNote(int note,
int velocity)
This routine stops a note with the given velocity on the default MIDI channel. |
void |
stopNote(int note,
int velocity,
int channelIndex)
This routine stops a note with the given velocity on the given MIDI channel. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MidiPlayer()
| Method Detail |
|---|
public void close()
public void startNote(int note,
int velocity)
note - the desired pitch (Midi.C1-Midi.C8)velocity - the force of the attack
public void stopNote(int note,
int velocity)
note - the desired pitch (Midi.C1-Midi.C8)velocity - the force of the attach
public void startNote(int note,
int velocity,
int channelIndex)
note - the desired pitch (Midi.C1-Midi.C8)velocity - the force of the attachchannelIndex - the MIDI channel to use
public void stopNote(int note,
int velocity,
int channelIndex)
note - the desired pitch (Midi.C1-Midi.C8)velocity - the force of the attachchannelIndex - the MIDI channel to usepublic void setInstrument(int instrument)
instrument - the chosen instrument (Midi.PIANO, ...)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||