Graham Percival [Thu, 27 Sep 2007 06:32:12 +0000 (23:32 -0700)]
Updates from Michael Rasmussen:
removed superfulous "For example" in first Transposition example.
Changed paragraph describing relative to bulleted list for easier
scanning/readability.
Paragraph describing -es and -is suffixes changed to match form used elsewhere.
John Mandereau [Sat, 22 Sep 2007 15:33:25 +0000 (17:33 +0200)]
Copy notation.itely into translated docs
'make web' is expected to fail, because I haven't reorganized actual
contents of translated docs. I'll most probably do this tomorrow;
then the translated docs will be hopefully synced.
-) Depending on the staff attributes, create TabStaff/TabVoice,
DrumStaff/DrumVoice, RhythmicStaff/Voice or ordinary Staff/Voice
staves.
-) From the staff attributes, create the list of string tunings
for tab staves.
These two points were all that was missing for proper tablature support.
As an implementation detail, I changed all the keys in the dicts from
the full part objects to the part ID (which is also used in the part-list
element in Lilypond, so we can do proper assignments now).
Implement some more conversions for articulations, make \context Staff
actually use the type attribute instead of hard-coded "Staff", fix crashes
due to empty type attributes in articulations.
For tab staves and voices, we will need to convert the <string> number
to lilypond to lilypond's \1, ..., \6 commands. So far, the tab staff
is not yet created, so these commands do not have any effect yet, but
they will be needed in the near future.
MusicXML: Correctly convert nested staff/part groups
In MusicXML, part group nesting is done simply by inserting
start/stop markers in the list of parts, where the part groups
might even overlap. In Lilypond, we want the real hierarchy (so
that we can assign group names etc.). To achieve this, we need
to loop through all parts, trying to detect the correct start/stop
markers. What makes things even more complicated is the fact
that the group IDs don't have to the unique in the whole score,
just unique enough to describe overlapping part groups. The other
issue are overlapping part groups, which we need to split up into
a part, which fits into the hierarchy and the remaining part, which
we simply ignore.
MusicXML: Cleanup voice handling and fix lyrics order for multiple stanzas
So far, multiple stanzas were handled by a dict, indexed by the voice ID.
However, the order of the elements in a dict is not defined (in particular,
the order is not preserved), so the stanzas got reordered and lost their
sorting.
Furthermore, each voice (with the associated lyrics and the raw data) was
handled by nested lists, which were really complicated to work with (since
one always had to remember the structure of these lists). I now use a
class/struct instead for each voice, which is much more intuitive!
MusicXML: Fix problem with lyrics on notes with grace notes
When a note had grace notes (and it was tied or part of a slur), sometimes
the lyrics for that note were completely ignored and all subsequent
lyrics were one note off. Now I simply ignore all slurs/ties of grace notes
and everything works just fine.
Also, clean up the staff change code. Now a staff change is not only applied
before a note, but also before other stuff (like clef change).
When we encounter a note with a different staff value than the
previous note in that voice, simply add the \change Staff=.. event
into the notes. However, this does not work inside chords, so we
ignore all staff changes inside chords. I'll have to find a different
way to print some notes of a chord on one staff and the other notes
on the other staff...
MusicXML: Fix problems with chord detection and pickup measures
Pickup measures messed up chord detection and voice start positions
for multi-voice parts, because I erroneously reset the position after
a pickup measure to 1, while in fact it should have been the length
of the pickup measure!
Also, fix some typos and only ignore skips in pickup measures intended
for padding to a full measure. Explicitly adde skips need to be honored.
-) Sometimes the contents of the first volta was duplicated (once
before and the second time inside the first volta). The cause
was theat I forgot an if clause to mark the repeat's body finished
when the first volta ending is encountered
-) I messed up the order of the repeat/ending markers in the output.
MusicXML: Fix small problems with assignment <harmony> <=> voice
Oops, I didn't want to treat <direction > elements like <harmony>.
The direction elements should still be asssigned to all voices (or
all voices of the staff).
Also, at the end of the loop, assign all remaining <harmony> elements
to the voice of the previous note and don't simply discard it.
Instead of assigning <harmony> elements to every voice or only the very
first voice (in the frist case, we'll have duplicated frets, in the
second one the fretboards will often be inserted at the completely
wrong position), simply insert the fretboard into the next note that
we encounter in the MusicXML file.
I suppose we could also do something similar for text markup (i.e.
<direction><words>...</word></direction>), but there we need to
distinguish direction elements with words-only subelements and with
dynamics subelements.
MusicXML: Convert fretboards from MusicXML to Lilypond
In MusicXML, fretboards are inside <harmony> elements, assigned
to a particular staff, while in lilypond the \fret-diagram is a
text markup assigned to a particular note. So we run into the same
problems as we do with dynamics (i.e. we need to find a proper
note to assign the element to, which is not very robust). For
single-voice harmony, this works quite well so far.