Instead of always using s1 and adding the duration as factor,
I now convert the duration of the skip to real lilypond durations,
i.e. s4, s2., s1, etc.
Relative mode for pitches is now triggered by an -r or --relative
command-line switch.
In this case, each voice is wrapped inside a RelativeMusic wrapper
object, and the previously converted pitch is stored in a global state
variable. The case of chords needs to be handled with special care,
as the whole chord uses the pitch of the first note as its base pitch.
So, after converting all notes in the chord, we have to reset the
global state variable to the pitch of the first note.
Mats Bengtsson [Thu, 15 Nov 2007 13:54:56 +0000 (14:54 +0100)]
Warn about the new semantics of dash-fraction (unfortunately hard to automate, since we don't know if the setting of dash-fraction was only intended to change the dash spacing or also to influence if the line was solid or dashed).
MusicXML: Add support for compressed MusicXML files (command-line option -z)
MusicXML also defined a compressed format, where the .xml file is
stored inside a ZIP archive (with extension .mxl) . In this case, we need to
read the META-INF/container.xml file from the archive to get the name
of the XML file inside the archive, and then load this file. Thanks
to the zipfile module and the StringIO module, implementing this was quite easy.
I also fixed some other small bugs that led to crashes.
Oops, I didn't want to commit this. Han-Wen does not want this in GIT, but I need it locally so that the regression tests are really shown in the output...
MusicXML: Add command line option to not convert directions on articulations, etc.
Add --nd or --no-articulation-directions command-line option, which causes
musicxml2ly to not convert ^ or _ up/down indicators for articulations, texts, etc.
Rather, "-" is used where necessary.
I'm now storing the command-line options in another global variable, so that one
can access them anywhere in the whole script.
MusicXML: Implement pitch names for different languages
Added a --language (-l) command line switch for the musicxml2ly
script that allows you to specify the name of a language.ly file,
so that localized pitch names (e.g. do/re/mi/fa/sol/la/ti for
espanol) are used and \include "language.ly" is automatically
inserted into the lilypond file.
Unfortunately, I had to use a global variable in the musicxml.py
file, which holds the function to convert pitches to strings.
However, I found this much cleaner than passing the language or
the function through all functions calls...
John Mandereau [Sun, 11 Nov 2007 09:44:58 +0000 (10:44 +0100)]
Merge branch 'master' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
* 'master' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond:
When working out page breaks, take into account the fact that titles
Set max-stretch to zero by default.
Bump Texinfo version requirement to 4.11
MusicXML: Implement conversion of page layout options
A MusicXML contains page size, margins, font size, spacing
settings etc. inside the <defaults> element, which is now
converted to the \paper {..} block and some #(set-global-... ...)
commands in lilypond.
MusicXML: Sample file for bar lines somewhere inside a measure
Sometimes, musical scores contain dotted bar lines inside
measures. This is an example that does not use implicit measures
(like Finale does). Note that Finale does NOT handle this
example correctly!
MusicXML: Add possibility for additional defs, implement snap-pizzicato
Lilypond does not have all definitions that we might need for the score,
so I now also keep a list of additional definitions and insert the
corresponding lilypond code at the beginning of the *-defs.ly file.
One example is the snap-pizzicato markup (see Snippet 335 on LSR),
which is also implemented with this commit.