Package org.jfugue.realtime
Class RealtimePlayer
- java.lang.Object
-
- org.jfugue.realtime.RealtimePlayer
-
public class RealtimePlayer extends java.lang.Object
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 Constructor Description RealtimePlayer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeChannelPressure(byte pressure)
void
changeController(byte controller, byte value)
void
changeInstrument(int newInstrument)
void
changeInstrument(java.lang.String newInstrument)
void
changePolyphonicPressure(byte key, byte pressure)
void
changeTrack(int newTrack)
void
close()
protected javax.sound.midi.MidiChannel
getCurrentChannel()
long
getCurrentTime()
void
play(java.lang.String pattern)
void
play(PatternProducer pattern)
void
schedule(long timeInMillis, ScheduledEvent event)
void
setPitchBend(byte lsb, byte msb)
void
setPitchBend(int pitch)
void
startChord(Chord chord)
void
startInterpolator(RealtimeInterpolator interpolator, long durationInMillis)
void
startNote(Note note)
void
stopChord(Chord chord)
void
stopInterpolator(RealtimeInterpolator interpolator)
void
stopNote(Note note)
void
unschedule(long timeInMillis, ScheduledEvent event)
-
-
-
Method Detail
-
play
public void play(PatternProducer pattern)
-
play
public void play(java.lang.String pattern)
-
getCurrentChannel
protected javax.sound.midi.MidiChannel getCurrentChannel()
-
getCurrentTime
public long getCurrentTime()
-
schedule
public void schedule(long timeInMillis, ScheduledEvent event)
-
unschedule
public void unschedule(long timeInMillis, ScheduledEvent event)
-
startNote
public void startNote(Note note)
-
stopNote
public void stopNote(Note note)
-
startChord
public void startChord(Chord chord)
-
stopChord
public void stopChord(Chord chord)
-
startInterpolator
public void startInterpolator(RealtimeInterpolator interpolator, long durationInMillis)
-
stopInterpolator
public void stopInterpolator(RealtimeInterpolator interpolator)
-
changeInstrument
public void changeInstrument(int newInstrument)
-
changeInstrument
public void changeInstrument(java.lang.String newInstrument)
-
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()
-
-