|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jfugue.Renderer
This class takes a pattern, and turns it into wonderful music.
Playing music is thing you can do to render a pattern. You could create your own rendrer that draws sheet music based on a pattern. Or, you could create a graphical light show based on the musical notes in the pattern.
Constructor Summary | |
Renderer()
Instantiates a Renderer |
Method Summary | |
void |
controllerEvent(Controller controller)
Called when the parser encounters a controller event. |
void |
instrumentEvent(Instrument instrument)
Called when the parser encounters a instrument event. |
void |
noteEvent(Note note)
Called when the parser encounters an initial note event. |
void |
parallelNoteEvent(Note note)
Called when the parser encounters a parallel note event. |
javax.sound.midi.Sequence |
render(Pattern pattern)
Starts rendering a pattern by sending it to the parser and listening for parser events to be fired when tokens from the pattern are interpreted. |
void |
sequentialNoteEvent(Note note)
Called when the parser encounters a sequential note event. |
void |
tempoEvent(Tempo tempo)
Called when the parser encounters a tempo event. |
void |
voiceEvent(Voice voice)
Called when the parser encounters a voice event. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Renderer()
Method Detail |
public javax.sound.midi.Sequence render(Pattern pattern)
pattern
- the pattern to renderpublic void voiceEvent(Voice voice)
ParserListener
voiceEvent
in interface ParserListener
org.jfugue.ParserListener
voice
- the event that has been parsedpublic void tempoEvent(Tempo tempo)
ParserListener
tempoEvent
in interface ParserListener
org.jfugue.ParserListener
tempo
- the event that has been parsedpublic void instrumentEvent(Instrument instrument)
ParserListener
instrumentEvent
in interface ParserListener
org.jfugue.ParserListener
instrument
- the event that has been parsedpublic void controllerEvent(Controller controller)
ParserListener
controllerEvent
in interface ParserListener
org.jfugue.ParserListener
controller
- the event that has been parsedpublic void noteEvent(Note note)
ParserListener
noteEvent
in interface ParserListener
org.jfugue.ParserListener
note
- the event that has been parsedpublic void sequentialNoteEvent(Note note)
ParserListener
sequentialNoteEvent
in interface ParserListener
org.jfugue.ParserListener
note
- the event that has been parsedpublic void parallelNoteEvent(Note note)
ParserListener
parallelNoteEvent
in interface ParserListener
org.jfugue.ParserListener
note
- the event that has been parsed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |