public class NoteListParser
extends java.lang.Object
NoteListParser
receives a cons cell of Scheme language which contains
a list of association lists ( called note list ), and converts it to
MIDI data. The result of the conversion is sent to MetroEventBuffer
.
An instance of NoteListParser
contains a set of
NoteListParserElement
objects. Each of the elements is responsible to
convert a type of notes and generates MIDI data.Constructor and Description |
---|
NoteListParser() |
Modifier and Type | Method and Description |
---|---|
NoteListParserElement |
get(gnu.mapping.Symbol name)
Get a parser element from this parser object.
|
java.util.List<NoteListParserElement> |
getAllElements() |
static boolean |
isNotation(java.lang.Object o0) |
static boolean |
isNotationList(java.lang.Object o0) |
<T> void |
parse(Metro metro,
MetroTrack track,
gnu.lists.LList notation,
MetroBufferedMidiReceiver<T> buffer,
MetroCollector<T> result) |
<T> void |
parseAll(Metro metro,
MetroTrack track,
java.util.Collection<java.lang.Object> inputList,
MetroBufferedMidiReceiver<T> buffer,
MetroCollector<T> result)
This method parses the specified note list.
|
void |
put(NoteListParserElement e)
Add a parser element to this parser object.
|
void |
putAll(java.util.Collection<NoteListParserElement> ce)
Add all of parser elements in the given collection object.
|
public static boolean isNotation(java.lang.Object o0)
public static boolean isNotationList(java.lang.Object o0)
public void put(NoteListParserElement e)
e
- A parser element object to add.public void putAll(java.util.Collection<NoteListParserElement> ce)
ce
- a collection object contains the parser elmeents to add.public NoteListParserElement get(gnu.mapping.Symbol name)
name
- The element name as either a short name or a long name.public java.util.List<NoteListParserElement> getAllElements()
public <T> void parseAll(Metro metro, MetroTrack track, java.util.Collection<java.lang.Object> inputList, MetroBufferedMidiReceiver<T> buffer, MetroCollector<T> result)
Metro.currentObject
sets the default Pulsar
object as a current object. See NoteListCommon.S2J_PORT
.metro
- The instance of the current Metro
.track
- The instance of the current MetroTrack
which generated the
note.buffer
- The instance of the current MetroEventBuffer
to output
into as a result of the processing.result
- The result of the previous parser element.pulsar.NoteListParserElement#parseEvent(Metro, MetroTrack,
MetroBufferedMidiReceiver, Map, MetroCollector)
public <T> void parse(Metro metro, MetroTrack track, gnu.lists.LList notation, MetroBufferedMidiReceiver<T> buffer, MetroCollector<T> result)