|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.jmsl.score.util.LilyPondWriter
public class LilyPondWriter
LilyPond is a common music notation interpreter that generates postscript and pdf files from
text-based input (visit www.lilypond.org).
LilyPondWriter exports a JMSL Score to LilyPond 2.10.0 format. Each staff of the JMSL Score is
written to its own .ly file, then combined in a full ensemble score by a master .ly file.
(According to LilyPond docs, this is the recommended method for creating a full ensemble score,
so parts can be transposed and printed separately). So if your LilyPond filename is MyScore.ly,
then LilyPondWriter will generate MyScoreStaffAA.ly, MyScoreStaffAB.ly, MyScoreStaffAC.ly, etc,
one for each staff. MyScore.ly will contain the commands that combine these staff files into a
full ensemble score. Double click MyScore.ly to generate a PDF (see LilyPond docs for updates,
changes, and variations).
Usage:
File lilyPondFile = new File("MyScore.ly"); try { LilyPondWriter lilyPondWriter = new LilyPondWriter(score, lilyPondFile); lilyPondWriter.write(); if (lilyPondWriter.durationErrorsInScore()) { System.err.println(lilyPondWriter.getDurationErrorReport()); } } catch (IOException e) { }
Field Summary | |
---|---|
static java.lang.String |
LY_VERSION
LilyPond version 2.10.0 |
Constructor Summary | |
---|---|
LilyPondWriter(Score score,
java.io.File file)
Write JMSL score to LilyPond file |
Method Summary | |
---|---|
boolean |
durationErrorsInScore()
It is important that the input Score has correct total durations in each staff of each measure. This is because LilyPond lays out its own barlines, so if you have 5 quarter notes in a measure of 4/4, for example, LilyPond will put the barline after the 4th note. |
java.lang.String |
getDurationErrorReport()
It is important that the input Score has correct total durations in each staff of each measure. This duration error report is generated by com.softsynth.jmsl.score.operators.DurationReporter on the Score that this LilyPondWriter is converting. |
static void |
main(java.lang.String[] args)
Create a JMSL Score with a variety of musical test cases and write to LilyPond format |
void |
write()
Export Score in LilyPond format. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LY_VERSION
Constructor Detail |
---|
public LilyPondWriter(Score score, java.io.File file) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void write() throws java.io.IOException
java.io.IOException
public boolean durationErrorsInScore()
getDurationErrorReport()
public java.lang.String getDurationErrorReport()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |