Package de.saar.coli.arranger.abc
Class AbcParser
- java.lang.Object
-
- de.saar.coli.arranger.abc.AbcParser
-
public class AbcParser extends Object
Reads a score in ABC notation and returns it as aScore. The primary use case is to read just a melody with its accompanying lyrics and chords. As such, this class does not support arbitrary ABC notation, but makes the following assumptions:- The song has a single voice.
- Only T, C, K, Q, and M codes are read; all others are ignored. The K: field must come before all notes.
- The L: code (base unit of time) is assumed to be 1/8 notes.
- Every note must have an explicit duration (in 1/8 notes).
- Adjacent notes are separated by whitespace.
- Rests are not supported.
- Chords are supported (enclosed in double quotes), and are spelled as explained in
Chord.ChordType.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbcParser.AbcParsingException
-
Constructor Summary
Constructors Constructor Description AbcParser()
-
-
-
Method Detail
-
read
public Score read(Reader abcReader) throws IOException, AbcParser.AbcParsingException
Reads a Score from a Reader.- Parameters:
abcReader-- Returns:
- Throws:
IOException- - an I/O error occurredAbcParser.AbcParsingException- - something went wrong in parsing the ABC notation
-
-