Modifier and Type | Field and Description |
---|---|
protected boolean |
compoundMeter
Whether for "irregular" meters not only the overall duration shall be printed, but the first
generation child nodes, as in "
3/8+2/8 " instead of simply "5/8 ". |
protected @Opt String |
const_layout
An additional lilypond "
paper{...} " text block entered into the generated
source format. |
protected @Opt String |
const_paper
An additional lilypond "
layout{...} " text block entered into the generated
source format. |
static String |
default_includefile
Name of the lilypond include file for language selection.
|
static String |
default_language
Default language to use for pitch class names etc.
|
protected Map<Vox,String> |
firstLabels
Maps of the labels which shall be printed before the very first staff for this voice.
|
static Format |
format_lilypond_cautionary
Evident.
|
static Format |
format_lilypond_forceAccidental
Evident.
|
static Format |
format_lilypond_measure_pause
Evident.
|
static Format |
format_lilypond_pause
Evident.
|
static Format |
format_lilypond_setMetrum
Evident.
|
static Format |
format_lilypond_tie
Evident.
|
protected String |
includefile
Name of the lilypond include file for language selection.
|
protected String |
language
Language to use for pitch class names etc.
|
static String |
lily_generation_comment
Template for the generation comment added into the generated source file format.
|
static String |
lily_header
Template for the global include command added into the generated source file format.
|
static String |
lilypond_comment_leadin
Evident.
|
protected Map<MTreeSpec,MSplitter> |
metricSplitters
Local cache of one metric splitter each (with its internal cache)
per metric tree specifications.
|
protected MessageReceiver<SimpleMessage<?>> |
msg
Evident
|
protected boolean |
numericTimeSignature
Whether "4/4" shall be printed instead of "C", etc.
|
protected MCover.Parameters_approximate |
parameters_approximate
Parameter collection controlling metric split approximation by binary division.
|
protected MTree.Parameters |
parameters_beams
Parameter collection controlling metric split beams.
|
protected MCover.Parameters_divide |
parameters_divide
Parameter collection controlling metric split approximation by synthesis of new divisions.
|
protected MSplitter.Parameters |
parameters_splitter
Parameter collection controlling metric split dotting, sibling merge, syncopes, etc.
|
protected Score_cwn |
score
The currently processed score input.
|
protected List<Score_cwn> |
scores
All scores which shall be printed by this instance.
|
protected boolean |
shareDenominator
Whether compound meters shall be printed with a common denominator.
|
protected Map<Vox,String> |
shortLabels
Maps of the labels which shall be printed before the subsequent (non-first)
staves for this voice.
|
protected Map<Vox,FunctionalInterval> |
transpositions
Maps of transpostions to be applied to the score data before writing out.
|
protected boolean |
wholeMeasurePauses
Whether a pause covering a whole measure shall be printed in a special way, namely
always with the duration "1/1" and in the geometric middle between the bars.
|
Constructor and Description |
---|
Cwn_to_lilypond(MessageReceiver<SimpleMessage<?>> msg,
List<Score_cwn> scores,
MTree.Parameters parameters_beams,
MCover.Parameters_approximate parameters_approximate,
MCover.Parameters_divide parameters_divide,
MSplitter.Parameters parameters_splitter,
boolean wholeMeasurePauses)
Only constructor.
|
Modifier and Type | Method and Description |
---|---|
static Format |
barnum2format(BigDecimal barnum)
Generate a lilypond comment format indicating the bar number / measure number-
|
Format |
convertOneVoice(Vox voice,
boolean includeMetric,
@Opt List<Format> formatsLyrics)
Generate a format for one certain voice (possibly including metric info)
which can be read by Lilypond.
|
Format |
convertVoices(String sourcename)
Generate the format of a lilypond source file, for all Score_cwn instances
in
scores . |
Format |
convertVoices(String sourcename,
Part part,
List<Vox> voices)
Generate a format representing Lilypond source text, for one tscore soure "PART"
and the given list of voices.
|
static Format |
formatValueOf(Rational rat)
Translate the rational value into a literal format.
|
protected MSplitter |
getMetricSplitter(MTreeSpec mt)
Get a metric splitter (with its internal cache) for the given metric
tree specifications, or construct a new one.
|
static void |
main(String[] args)
Stand-alone application, translates input file "arg[0]"
to lilypond output file "arg[1]".
|
static String |
meterName(MTree_<?> meter,
boolean useCompoundFormat,
boolean compress)
Generate a meter name based only on duration, or on an "addition" of the first
generation child nodes.
|
Cwn_to_lilypond |
putLabels(Vox voice,
String firstLabel,
String shortLabel)
Set the initial=long and subsequent=short labels to be printed before the staff
of a voice.
|
Cwn_to_lilypond |
putTransposition(Vox voice,
FunctionalInterval ival)
Set a transposition to be applied to the voice before generating the lilypond source.
|
Cwn_to_lilypond |
set_const_layout(String s)
Set
const_layout . |
Cwn_to_lilypond |
set_const_paper(String s)
Set
const_paper . |
Cwn_to_lilypond |
set_meter_names(boolean numericTimeSignature,
boolean compoundMeter,
boolean shareDenominator)
Sets parameters how to render meter names.
|
static void |
toLilyPond_clefSelect(List<Format> formats,
ClefUsage cu)
Generate a format for changing the clef.
|
void |
toLilyPond_clefSelect(List<Format> formats,
Event event)
Generate a format for changing the clef, iff event carries such a command.
|
static String |
toLilyPond_duration(RationalDuration.DottedBaseDuration db)
Translate duration information into lilypond format.
|
void |
toLilyPond_key(List<Format> formats,
Event event)
Emit a lilypond diatonic key change, if the Event carries such a command.
|
protected void |
toLilyPond_key(@Opt Vox voice,
List<Format> formats,
Event event)
Emit a lilypond diatonic key change, if the Event carries such a command.
|
void |
toLilyPond_metrics(List<Format> formats,
BigDecimal barnum)
Generate a format for the start text for the measure with the given barnum,
indicating its meter, (and its duration, if it is partial).
|
static String |
toLilyPond_pitch(PitchAndOctave<OctaveRegister,FunctionalPitchModOctave> ap)
Translate pitch information into lilypond format.
|
protected FunctionalPitchModOctave |
transpose(@Opt Vox v,
FunctionalPitchModOctave p)
Deliver the pitch transposed UP by the interval which is assigned to the voice
in
transpositions , if any. |
protected PitchAndOctave<OctaveRegister,FunctionalPitchModOctave> |
transpose(@Opt Vox v,
PitchAndOctave<OctaveRegister,FunctionalPitchModOctave> p)
Deliver the pitch transposed UP by the interval which is assigned to the voice
in
transpositions , if any. |
protected final MessageReceiver<SimpleMessage<?>> msg
protected final List<Score_cwn> scores
protected Score_cwn score
protected final MTree.Parameters parameters_beams
@Opt protected final MCover.Parameters_approximate parameters_approximate
@Opt protected final MCover.Parameters_divide parameters_divide
protected final MSplitter.Parameters parameters_splitter
protected final boolean wholeMeasurePauses
public static final String default_includefile
default_language
.public static final String default_language
default_includefile
.protected String includefile
getTimeless("lilypond.language")
. Must be in sync with language
.protected String language
getTimeless("lilypond.includefile")
. Must be in sync with includefile
.protected final Map<MTreeSpec,MSplitter> metricSplitters
protected Map<Vox,FunctionalInterval> transpositions
putTransposition(Vox,FunctionalInterval)
.protected Map<Vox,String> firstLabels
protected Map<Vox,String> shortLabels
putLabels(Vox,String,String)
.@Opt protected @Opt String const_paper
layout{...}
" text block entered into the generated
source format. Can be set by set_const_paper(String)
.@Opt protected @Opt String const_layout
paper{...}
" text block entered into the generated
source format. Can be set by set_const_paper(String)
.protected boolean numericTimeSignature
set_meter_names(boolean,boolean,boolean)
.protected boolean compoundMeter
3/8+2/8
" instead of simply "5/8
".
Is set by set_meter_names(boolean,boolean,boolean)
.protected boolean shareDenominator
3+2/8
" instead of "3/8+2/8
".
Is set by set_meter_names(boolean,boolean,boolean)
.public static final String lily_generation_comment
public static final String lily_header
public static final String lilypond_comment_leadin
public static final Format format_lilypond_tie
public static final Format format_lilypond_pause
public static final Format format_lilypond_measure_pause
public static final Format format_lilypond_cautionary
public static final Format format_lilypond_forceAccidental
public static final Format format_lilypond_setMetrum
public Cwn_to_lilypond(MessageReceiver<SimpleMessage<?>> msg, List<Score_cwn> scores, @Opt MTree.Parameters parameters_beams, @Opt MCover.Parameters_approximate parameters_approximate, @Opt MCover.Parameters_divide parameters_divide, @Opt MSplitter.Parameters parameters_splitter, boolean wholeMeasurePauses)
convertVoices(String)
or sim.protected MSplitter getMetricSplitter(MTreeSpec mt)
public Cwn_to_lilypond putTransposition(Vox voice, FunctionalInterval ival)
public Cwn_to_lilypond putLabels(Vox voice, String firstLabel, String shortLabel)
public Cwn_to_lilypond set_const_paper(String s)
const_paper
.public Cwn_to_lilypond set_const_layout(String s)
const_layout
.public Cwn_to_lilypond set_meter_names(boolean numericTimeSignature, boolean compoundMeter, boolean shareDenominator)
numericTimeSignature
, compoundMeter
, and shareDenominator
.public static String toLilyPond_duration(RationalDuration.DottedBaseDuration db)
public static String toLilyPond_pitch(PitchAndOctave<OctaveRegister,FunctionalPitchModOctave> ap)
pitchClass Octave Accidental Duration
public static String meterName(MTree_<?> meter, boolean useCompoundFormat, boolean compress)
FIXME CHECK whether lilypond copes with "6/6" etc. !?!?!
FIXME GEHEN NICHT ALLE siehe sig/examples/msplit/nichtUebersetzbar.ly !!!
compress
- whether to put on ONE fractional line: "1+2+3/8" instead of "1/8+2/8+3/8".public void toLilyPond_metrics(List<Format> formats, BigDecimal barnum)
formats
- where to append the generated commandprotected PitchAndOctave<OctaveRegister,FunctionalPitchModOctave> transpose(@Opt @Opt Vox v, PitchAndOctave<OctaveRegister,FunctionalPitchModOctave> p)
transpositions
, if any.protected FunctionalPitchModOctave transpose(@Opt @Opt Vox v, FunctionalPitchModOctave p)
transpositions
, if any.public void toLilyPond_key(List<Format> formats, Event event)
formats
- where to append the generated commandprotected void toLilyPond_key(@Opt @Opt Vox voice, List<Format> formats, Event event)
transpositions
is applied.formats
- where to append the generated commandpublic void toLilyPond_clefSelect(List<Format> formats, Event event)
formats
- where to append the generated commandpublic static void toLilyPond_clefSelect(List<Format> formats, ClefUsage cu)
format
- where output is appended.public static Format barnum2format(BigDecimal barnum)
public Format convertOneVoice(Vox voice, boolean includeMetric, @Opt @Opt List<Format> formatsLyrics)
includeMetric
- In lilypond, changes of metrum and duration of all
measures are global and valid for all voices simultaneously. They thus
need to appear only in one voice.
This parameter says whether metrum information shall be included in the currently
generated lilypond voice.public static Format formatValueOf(Rational rat)
public Format convertVoices(String sourcename)
scores
. Each such is contained in one lilypond "Score{..}
" block.public Format convertVoices(String sourcename, Part part, List<Vox> voices)
public static void main(String[] args)