In MusicXML, a rest can also have a pitch, given as
<display-step>A</display-step><display-octave>3</display-octave>
If given, convert these into ordinary lilypond pitches and print them
out as "a4 \rest" instead of "r4".
Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>
MusicXML: Reset measure position on backup elements, print => sys.stderr.write
-) Replace all relevant (i.e. non-testing outputs; these are still in there
in the main() functions for testing) occurrences of print by
sys.stderr.write
-) If a <backup> element is encountered (e.g. when there are two voices in
the measure), correctly reset the measure position to the desired
position after the backup.
Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>
MusicXML: Fix regression when adding expressions like octave shifts
Octave shifts in lilypond (like in MusicXML) are not associated with a
particular note but their position in the measure. So far, I simply
inserted them like a note, but unfortunately that reset the current
starting position in the measure (needed to find the correct position
for chords). So I added a method dedicated to inserting such commands
without resetting the position (of course, pending multi-bar rests
still need to be inserted before the music command).
Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>
MusicXML: Cleanup of span start/end and direction, coding style
Follow Han-Wen's tips:
-) Split the type of spanners into direction (start/stop) and type
(crescendo/decrescendo, up/down octave-shifts, ...)
-) Get rid of some ifs and use dicts instead
-) Get rid of unnecessary empty cases in dicts
-) Treat hairpins like all other spanners
-) Invert logic of quoting of lyrics and header fields to always quote unless
the text consists entirely of letters.
-) Implement all durations from MusicXML
-) If an ouput filename is given, the include needs to use only the basename
of the file, not the whole path
-) Change logic of adding .xml to the input file: First try the supplied
filename, then with .xml appended and only then with xml (no dot) appended.
-) Use progress (..) for the error message when input file does not exist.
Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>
John Mandereau [Thu, 13 Sep 2007 20:39:58 +0000 (22:39 +0200)]
Fix some French translation nitpicks and typos
- add Gilles Thibault to THANKS for his comments on Changing defaults
French translation,
- also add P.E. Brame to THANKS for his (older) suggestions on
Instrument-specific notation French translation,
- update French literature.itely.
MusicXML: No crash on note without <duration>, escape lyrics with parentheses
If lyrics syllables contain parentheses ( or ), we also need to wrap that
syllables in quotes.
It seems that some scanning applications write out some notes without a
<duration> child element. Work around this case and use a default value
instead of crashing. The user has to adjust the .ly file anyway.
MusicXML: Sample .xml files for regression and converage testing
Add sample MusicXML files generated with Finale, Rosegarden, Noteedit
and JScore to test for regressions and feature coverage. Currently,
these files are only converted to .ly files, but not processed further.
Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>
MusicXML: Allow .xml to be left out on input files, allow .ly on output files
The output file name is assumed to be without the .ly suffix, which is
counterintuitive: As as user I would expect the option "-o test.ly" to
generate a file test.ly. However, .ly was always appended to the filename,
so remove a possible .ly suffix if given on the output filename.
Similarly, the input file name was assumed to be the full file name. In
particular with tab-completion in a shell, this means several more keystrokes.
If the input file given does not exists, I now also check if a file
exists with the .xml suffix appended. This is similar to the behavior of
lilypond, where "lilypond test" will also convert a file test.ly.
Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>
John Mandereau [Thu, 6 Sep 2007 18:04:40 +0000 (20:04 +0200)]
Merge branch 'master' into lilypond/translation
* master:
LSR: update.
Misc small updates from bugs and mailist.
Bugfix in \showKeySignature
Put list of os-cpu back as found at http://lilypond.org/download/binaries.
MusicXML: Fine-tune chord detection in combination with dynamics
When trying to find the corresponding notes for notes with the <chord>
indicator, we need to skip all dynamics, but must not cross bar lines. In
particular, since we now also add dynamics events, we cannot automatically
take the last event, but have to look for the last EventChord.
Also some small bug fixes (need to quote texts with _, missing param in dead
code, style, etc.)
Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>
In my cleanup I accidentally removed the Staff entry from the dict, which
caused all PianoStaff objects to not be detected (as it checked for the
Staff class, which was not generated whn marshalling the xml)
Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>