Class RealtimePlayer
java.lang.Object
org.jfugue.realtime.RealtimePlayer
This player sends messages directly to the MIDI Synthesizer, rather than creating a
sequence with the MIDI Sequencer.
There are two ways that you can send messages to RealTimePlayer, and you can freely intermix these:
1. Pass any Staccato string to the play() method. In this case, start notes should be indicated as the start of a tie
(e.g., "C4s-") and stop notes should be indicated as the end of a tie (e.g., "C4-s")
2. Call specific methods, like startNote or changeInstrument
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeChannelPressure(byte pressure) voidchangeController(byte controller, byte value) voidchangeInstrument(int newInstrument) voidchangeInstrument(String newInstrument) voidchangePolyphonicPressure(byte key, byte pressure) voidchangeTrack(int newTrack) voidclose()protected MidiChannellongvoidvoidplay(PatternProducer pattern) voidschedule(long timeInMillis, ScheduledEvent event) voidsetPitchBend(byte lsb, byte msb) voidsetPitchBend(int pitch) voidstartChord(Chord chord) voidstartInterpolator(RealtimeInterpolator interpolator, long durationInMillis) voidvoidvoidstopInterpolator(RealtimeInterpolator interpolator) voidvoidunschedule(long timeInMillis, ScheduledEvent event)
-
Constructor Details
-
RealtimePlayer
- Throws:
MidiUnavailableException
-
-
Method Details
-
play
-
play
-
getCurrentChannel
-
getCurrentTime
public long getCurrentTime() -
schedule
-
unschedule
-
startNote
-
stopNote
-
startChord
-
stopChord
-
startInterpolator
-
stopInterpolator
-
changeInstrument
public void changeInstrument(int newInstrument) -
changeInstrument
-
changeTrack
public void changeTrack(int newTrack) -
setPitchBend
public void setPitchBend(int pitch) -
setPitchBend
public void setPitchBend(byte lsb, byte msb) -
changeChannelPressure
public void changeChannelPressure(byte pressure) -
changePolyphonicPressure
public void changePolyphonicPressure(byte key, byte pressure) -
changeController
public void changeController(byte controller, byte value) -
close
public void close()
-