public class Cwn_to_musicXml extends Object
Score_cwn
object/s.
Usage: construct an instance and call convertVoices()
or sim.
Modifier and Type | Field and Description |
---|---|
(package private) static List<eu.bandm.music.small_musicXml.Element_dot[]> |
cache_dots
Local cache containing an arry of n prolongation dots at position n
|
protected static eu.bandm.music.small_musicXml.Element_rest |
const_PAUSE
Xml element representing a pause
|
protected static eu.bandm.music.small_musicXml.Element_rest |
const_PAUSE_MEASURE
Xml element representing a "whole measure" pause
|
(package private) static eu.bandm.music.small_musicXml.Element_dot |
element_dot
Constant xml element representing a prolongation dot.
|
protected Map<MTreeSpec,MSplitter> |
metricSplitters
Local cache of one metric splitter each (with its internal cache)
per metric tree specifications.
|
protected MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> |
msg
Target of all messages.
|
static XMLDocumentIdentifier |
musicXML_dtd_docId |
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_split
Parameter collection controlling metric split dotting, sibling merge, syncopes, etc.
|
protected Score_cwn |
score
The Score_cwn (corresponding to a tscore PART), which is rendered to one(1)
output "score-partwise" with one "part" for each voice.
|
protected String |
sourceName
Used for indicating the original data source when constructing IDs, etc.
|
(package private) static eu.bandm.music.small_musicXml.Element_note.Seq_2 |
tie_end
Constant xml content, part of an xml "note" element representing an arriving tie.
|
(package private) static eu.bandm.music.small_musicXml.Element_note.Seq_2 |
tie_middle
Constant xml content, part of an xml "note" element representing both an arriving
and an outgoing tie.
|
(package private) static eu.bandm.music.small_musicXml.Element_note.Seq_2 |
tie_start
Constant xml content, part of an xml "note" element representing an outgoing tie.
|
(package private) static eu.bandm.music.small_musicXml.Element_tied |
tied_end
Constant xml element representing the graphic aspect if an incomung tie.
|
(package private) static eu.bandm.music.small_musicXml.Element_tied |
tied_middle
Constant xml element representing the graphic aspect if an incomung and at the
same time outgoing tie.
|
(package private) static eu.bandm.music.small_musicXml.Element_tied |
tied_start
Constant xml element representing the graphic aspect if an outgoing tie.
|
(package private) static String[] |
typesByExponent_plus_3
The length of the basic note symbols, in words.
|
static int |
xml_octave_max
Maximal octave in Midi encoding.
|
static int |
xml_octave_min
Minimal octave in Midi encoding.
|
static int |
xml_octave_offset
The "small octave", numeric 0, is represented in MIDI encoding by three(3),
and "middle c" by four(4).
|
Constructor and Description |
---|
Cwn_to_musicXml(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
String sourceName,
Score_cwn score,
MTree.Parameters parameters_beams,
MCover.Parameters_approximate parameters_approximate,
MCover.Parameters_divide parameters_divide,
MSplitter.Parameters parameters_split)
Only constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
convertOneVoice(Vox voice,
List<eu.bandm.music.small_musicXml.Element_part> music_results,
List<eu.bandm.music.small_musicXml.Element_score_part> index_results)
Generate a format for one certain tscore.Vox (possibly including metric info)
in musicXml 3.0 "partwise" format.
|
eu.bandm.music.small_musicXml.Element_score_partwise |
convertVoices()
Generate musicXml output for all voices in Score_cwn.
|
eu.bandm.music.small_musicXml.Element_score_partwise |
convertVoices(List<Vox> voices)
Generate musicXml output for a selection of Vox elements in
score . |
protected static eu.bandm.music.small_musicXml.Element_dot[] |
dots(int dc)
Return an array of "dc" prolongation dots.
|
protected String |
exponent2nodeType(Event ev,
int exp)
Return the name of the basic note duration, as stored in
typesByExponent_plus_3 ,
given by the exponent of 1/2. |
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)
Test application, translates input file "arg[0]" to musicXml output file "arg[1]".
|
protected eu.bandm.music.small_musicXml.Element_beam |
makeBeam(String type,
int index)
Make a beam element.
|
protected eu.bandm.music.small_musicXml.Element_tuplet |
makeTuplet(Rational p,
boolean start)
Create one bracket element which stands for the start OR the stop of a bracket.
|
void |
toXml_metrumChange(List<eu.bandm.music.small_musicXml.Element> formats,
BigDecimal barnum)
Generate the indication of a meter change and of partial measures.
|
public static final XMLDocumentIdentifier musicXML_dtd_docId
protected final MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg
protected final Score_cwn score
protected final String sourceName
protected final MTree.Parameters parameters_beams
protected final MCover.Parameters_approximate parameters_approximate
protected final MCover.Parameters_divide parameters_divide
protected final MSplitter.Parameters parameters_split
protected final Map<MTreeSpec,MSplitter> metricSplitters
protected static final eu.bandm.music.small_musicXml.Element_rest const_PAUSE
protected static final eu.bandm.music.small_musicXml.Element_rest const_PAUSE_MEASURE
public static final int xml_octave_offset
public static final int xml_octave_min
public static final int xml_octave_max
static final String[] typesByExponent_plus_3
static final eu.bandm.music.small_musicXml.Element_dot element_dot
static final List<eu.bandm.music.small_musicXml.Element_dot[]> cache_dots
static final eu.bandm.music.small_musicXml.Element_note.Seq_2 tie_start
static final eu.bandm.music.small_musicXml.Element_note.Seq_2 tie_end
static final eu.bandm.music.small_musicXml.Element_note.Seq_2 tie_middle
static final eu.bandm.music.small_musicXml.Element_tied tied_start
static final eu.bandm.music.small_musicXml.Element_tied tied_end
static final eu.bandm.music.small_musicXml.Element_tied tied_middle
public Cwn_to_musicXml(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, String sourceName, Score_cwn score, MTree.Parameters parameters_beams, @Opt MCover.Parameters_approximate parameters_approximate, @Opt MCover.Parameters_divide parameters_divide, MSplitter.Parameters parameters_split)
convertVoices()
or sim.protected MSplitter getMetricSplitter(MTreeSpec mt)
public void toXml_metrumChange(List<eu.bandm.music.small_musicXml.Element> formats, BigDecimal barnum)
formats
- where to append the resulting xml elements.barnum
- the number of the barprotected String exponent2nodeType(Event ev, int exp)
typesByExponent_plus_3
,
given by the exponent of 1/2. So "0" gives a "whole note head" and "3" an Eighth.protected static eu.bandm.music.small_musicXml.Element_dot[] dots(int dc)
cache_dots
, which
means to re-use the Elements.protected eu.bandm.music.small_musicXml.Element_tuplet makeTuplet(Rational p, boolean start)
protected eu.bandm.music.small_musicXml.Element_beam makeBeam(String type, int index)
type
- the text contents of the result, can be "start", "end", "continue",
"forward-hook", "backward-hook".
("both-hook" seemingly not supported ?)index
- the value of "@number", which is the identifier (nesting level)
for the group of related beam elements.protected void convertOneVoice(Vox voice, List<eu.bandm.music.small_musicXml.Element_part> music_results, List<eu.bandm.music.small_musicXml.Element_score_part> index_results)
score
.
Assume all input data (semantic maps in Score_cwn) are valid.
Esp. it requires ...
Generation strategy: generate ONE(1) Element_notation in any case, and insert close-tuple notations a posteriori.
public eu.bandm.music.small_musicXml.Element_score_partwise convertVoices()
public eu.bandm.music.small_musicXml.Element_score_partwise convertVoices(List<Vox> voices)
score
.public static void main(String[] args)