|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfugue.StreamingPlayer
public class StreamingPlayer
Provides a player that can be given new MusicStrings at runtime. The original Player class requires that a MusicString be fully formed before sending to Player.play(). This class lets you add new bits of a MusicString with the add() method. The newly-added patterns are played immediately.
Pattern
,
Player
Constructor Summary | |
---|---|
StreamingPlayer(Pattern pattern)
Instantiates a new Player object, which is used for playing music. |
Method Summary | |
---|---|
void |
close()
Closes MIDI resources - be sure to call this after play() has returned. |
void |
fragmentAdded(Pattern fragment)
Listener for additions to streaming patterns. |
javax.sound.midi.Sequence |
getSequence()
Returns the sequence containing the MIDI data from the given pattern. |
javax.sound.midi.Sequencer |
getSequencer()
Returns the sequencer containing the MIDI data from a pattern that has been parsed. |
void |
saveMidi(java.io.File file)
Saves the MIDI data from a pattern into a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamingPlayer(Pattern pattern)
Method Detail |
---|
public void close()
public void saveMidi(java.io.File file) throws java.io.IOException
file
- the File to save the sequence to. Should include file extension, such as .mid
java.io.IOException
public javax.sound.midi.Sequencer getSequencer()
public javax.sound.midi.Sequence getSequence()
public void fragmentAdded(Pattern fragment)
fragmentAdded
in interface PatternListener
fragment
- the fragment added to the pattern.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |