]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' into lilypond/translation
authorFrancisco Vila <francisco.vila@hispalinux.es>
Mon, 13 Apr 2009 14:32:52 +0000 (16:32 +0200)
committerFrancisco Vila <francisco.vila@hispalinux.es>
Mon, 13 Apr 2009 14:32:52 +0000 (16:32 +0200)
48 files changed:
Documentation/de/user/input.itely
Documentation/user/input.itely
Documentation/user/rhythms.itely
Documentation/user/staff.itely
input/lsr/aligning-bar-numbers.ly [new file with mode: 0644]
input/lsr/contexts-and-engravers.snippet-list
input/lsr/modern-tab-text-clef.ly
input/lsr/positioning-grace-notes-with-floating-space.ly [new file with mode: 0644]
input/lsr/printing-bar-numbers-at-regular-intervals.ly [new file with mode: 0644]
input/lsr/printing-bar-numbers-inside-boxes-or-circles.ly [new file with mode: 0644]
input/lsr/redefining-grace-note-global-defaults.ly [new file with mode: 0644]
input/lsr/removing-bar-numbers-from-a-score.ly [new file with mode: 0644]
input/lsr/rhythms.snippet-list
input/lsr/tweaking-grace-layout-within-music.ly [new file with mode: 0644]
input/lsr/tweaks-and-overrides.snippet-list
input/lsr/using-grace-note-slashes-with-normal-heads.ly [new file with mode: 0644]
input/new/modern-tab-text-clef.ly
input/new/tweaking-grace-layout-within-music.ly [new file with mode: 0644]
input/regression/accidental-single-double.ly
input/regression/fret-diagram-origins.ly [new file with mode: 0644]
input/regression/musicxml/33i-Ties-NotEnded.xml [new file with mode: 0644]
input/regression/musicxml/41g-PartNoId.xml [new file with mode: 0644]
input/regression/musicxml/41h-TooManyParts.xml [new file with mode: 0644]
input/regression/musicxml/46f-IncompleteMeasures.xml [new file with mode: 0644]
input/regression/musicxml/46g-PickupMeasure-Chordnames-FiguredBass.xml [new file with mode: 0644]
input/regression/musicxml/51d-EmptyTitle.xml [new file with mode: 0644]
input/regression/musicxml/52b-Breaks.xml [new file with mode: 0644]
input/regression/musicxml/71g-MultipleChordnames.xml [new file with mode: 0644]
input/regression/non-empty-text.ly
input/regression/spacing-knee-compressed.ly
input/regression/trill-spanner-auto-stop.ly [new file with mode: 0644]
input/regression/trill-spanner-chained.ly [new file with mode: 0644]
lily/beam-quanting.cc
lily/beam.cc
lily/beaming-pattern.cc
lily/general-scheme.cc
lily/include/beam.hh
lily/midi-item.cc
lily/trill-spanner-engraver.cc
lilypond-texi2html.init
python/convertrules.py
python/musicexp.py
python/musicxml.py
scm/define-grob-properties.scm
scm/define-grobs.scm
scm/fret-diagrams.scm
scm/markup.scm
scripts/musicxml2ly.py

index 1326011e1a5725dee3d420a004d8f3c89ef877eb..2ab88aa86f30ea497c8310fa7cc4f69dfab5a912 100644 (file)
@@ -571,7 +571,7 @@ Dieses Verhalten kann verändert werden (sodass alle Angaben aus der
 Die Standardfußzeile ist leer mit Ausnahme der ersten Seite, auf der
 das @code{copyright}-Feld aus der @code{\header}-Umgebung eingefügt wird,
 und die letzte Seite, auf der das @code{tagline}-Feld eingefügt wird.
-Der Standardinhalt von @code{tagline} ist @qq{Music engraving by 
+Der Standardinhalt von @code{tagline} ist @qq{Music engraving by
 LilyPond (@var{version})---www.lilypond.org}.  Gut gesetzte Noten werben sehr effektiv
 für LilyPond, darum bitten wir darum, diese Zeile stehen zu lassen,
 wenn es möglich ist.
@@ -1080,7 +1080,7 @@ LilyPond files}.
 Der @code{\tag #'@var{TeilA}}-Befehl markiert einen musikalischen
 Ausdruck mit der Bezeichnung @var{TeilA}.  Ausdrücke, die auf diese
 Weise markiert werden, können mit ihrer Bezeichnung später ausgewählt
-bzw. ausgefiltert werden.  Das geschieht mit den Befehlen 
+bzw. ausgefiltert werden.  Das geschieht mit den Befehlen
 @code{\keepWithTag #'@var{Bezeichnung}} bzw. @code{\removeWithTag #'@var{Bezeichnung}}.
 Die Wirkung dieser Filter auf die markierten Notenabschnitte ist
 wie folgt:
@@ -1089,12 +1089,12 @@ wie folgt:
 
 @headitem Filter
   @tab Resultat
-  
+
 @item
 Markierte Noten mit vorgesetztem @code{\keepWithTag #'@var{Bezeichnung}}
   @tab Unmarkierte Noten und Noten mit der Marke @var{Bezeichnung} werden
   gesetzt, Noten mit einer anderen Marke werden nicht angezeigt.
-  
+
 @item
 Markierte Noten mit vorgesetztem @code{\removeWithTag #'@var{Bezeichnung}}
   @tab Unmarkierte Noten und Noten mit einer anderen Marke als
@@ -1551,6 +1551,25 @@ auch unterdrückt werden kann, siehe @ref{Metronome marks}.  Eine
 andere möglichkeit, ein eigenes MIDI-Tempo anzugeben, wird weiter
 unten gezeigt, siehe @ref{MIDI block}.
 
+Aufgrund einiger Einschränkungen auf Windows ist auf Windows-Systemen
+die Standarddateierweiterung von MIDI-Dateien @code{.mid}. Andere
+Betriebssysteme verwenden weiterhin @code{.midi}. Wenn eine
+andere Endung erwünscht ist, kann man die folgende Zeile auf oberster
+Ebene der Quelldatei, vor Beginn eines @code{\book}, @code{\bookpart}
+oder @code{\score} Blocks einfügen:
+
+@example
+#(ly:set-option 'midi-extension "midi")
+@end example
+
+Diese Codezeile setzt die Dateiendung auf @code{.midi}.
+
+Als Alternative kann man diese Option auch als Kommandozeilenparameter
+übergeben:
+
+@example
+lilypond … -dmidi-extension=midi lilyDatei.ly
+@end example
 
 @unnumberedsubsubsec Instrument names
 
@@ -1664,7 +1683,7 @@ die @code{\new Score}- als auch die @code{\midi}-Umgebungen in eine
 
 @example
 \score @{
-  \new Score @{ @dots{}Noten@dots{} @} 
+  \new Score @{ @dots{}Noten@dots{} @}
   \midi @{ @}
 @}
 @end example
index 27cdfbd041b324fbdd2115e18ef8c9ea0b6669a7..e384a4fc24e610b27dec17037c21f96101f975f4 100644 (file)
@@ -265,7 +265,7 @@ toplevel.  The default handler is defined in the init file
 @item
 A @code{\bookpart} block.  A book may be divided into several parts,
 using @code{\bookpart} blocks, in order to ease the page breaking,
-or to use different @code{\paper} settings in different parts. 
+or to use different @code{\paper} settings in different parts.
 
 @item
 A compound music expression, such as
@@ -1457,6 +1457,26 @@ can be suppressed, see @ref{Metronome marks}.  An alternative way
 of specifying the inital or overall MIDI tempo is described below,
 see @ref{MIDI block}.
 
+Due to some limitations on Windows, the default extension for
+MIDI files on Windows is @code{.mid}. Other operating systems still
+use the extension @code{.midi}. If a different extension is preferred,
+insert the following line at the top-level of the input file,
+before the start of any @code{\book}, @code{\bookpart} or @code{\score} blocks:
+
+@example
+#(ly:set-option 'midi-extension "midi")
+@end example
+
+The line above will set the default extension for MIDI files to
+@code{.midi}.
+
+Alternatively, this option can also be supplied on the command line:
+
+@example
+lilypond … -dmidi-extension=midi lilyFile.ly
+@end example
+
+
 @unnumberedsubsubsec Instrument names
 
 @cindex instrument names
index a931db3d979b5dfb78b55626b0deb6ffb9bd9071..2c63d75d21e59d95780f750000a5c84d16231c2e 100644 (file)
@@ -81,6 +81,10 @@ A note with the duration of a quadruple breve may be entered with
 @code{\maxima}, but this is supported only within ancient music
 notation.  For details, see @ref{Ancient notation}.
 
+@cindex duration, default
+@cindex default note duration
+@cindex note duration, default
+
 If the duration is omitted, it is set to the previously
 entered duration.  The default for the first note is a quarter
 note.
@@ -198,6 +202,8 @@ a2 \times 2/3 { b4 b b }
 c4 c \times 2/3 { b4 a g }
 @end lilypond
 
+@cindex tuplet bracket placement
+
 @funindex \tupletUp
 @funindex tupletUp
 @funindex \tupletDown
@@ -241,6 +247,8 @@ see @ref{Scaling durations}.
 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
 {entering-several-tuplets-using-only-one--times-command.ly}
 
+@cindex Tuplet number changes
+
 @funindex TupletNumber
 
 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
@@ -275,9 +283,9 @@ Internals Reference:
 @rinternals{TupletNumber},
 @rinternals{TimeScaledMusic}.
 
+@cindex grace notes within tuplet brackets
 
 @knownissues
-@cindex grace notes within tuplet brackets
 When the first note on a staff is a grace note followed by a
 tuplet the grace note must be placed before the @code{\times}
 command to avoid errors.  Anywhere else, grace notes may be
@@ -318,6 +326,7 @@ a multiplier.  This is useful for skipping many measures, e.g.,
 @code{s1*23}.
 
 @cindex compressing music
+@cindex expanding music
 
 @funindex \scaleDurations
 @funindex scaleDurations
@@ -535,6 +544,7 @@ Rests are entered as part of the music in music expressions.
 
 @node Rests
 @unnumberedsubsubsec Rests
+
 @cindex rest
 @cindex rest, entering durations
 @cindex maxima rest
@@ -774,9 +784,12 @@ R2.*2 |
 @cindex multi-measure rest, script
 @cindex fermata on multi-measure rest
 @cindex multi-measure rest, attaching fermata
+@cindex markup on multi-measure rest
+@cindex multi-measure rest with markup
 
 @funindex \fermataMarkup
 @funindex fermataMarkup
+@funindex MultiMeasureRestText
 
 Markups can be added to multi-measure rests.
 The predefined command @code{\fermataMarkup}
@@ -809,6 +822,17 @@ When a multi-measure rest immediately follows a @code{\partial}
 setting, resulting bar-check warnings may not be displayed.
 
 
+@funindex \textLengthOn
+@funindex textLengthOn
+@funindex \textLengthOff
+@funindex textLenthOff
+@funindex \fermataMarkup
+@funindex fermataMarkup
+@funindex \compressFullBarRests
+@funindex compressFullBarRests
+@funindex \expandFullBarRests
+@funindex expandFullBarRests
+
 @predefined
 @code{\textLengthOn},
 @code{\textLengthOff},
@@ -995,8 +1019,8 @@ Internals Reference:
 @cindex measure, partial
 @cindex pickup measure
 @cindex measure, change length
-@cindex measurePosition
 
+@funindex measurePosition
 @funindex \partial
 @funindex partial
 
@@ -1115,6 +1139,16 @@ Snippets:
 @rlsr{Rhythms}.
 
 
+@cindex cadenza line breaks
+@cindex cadenza page breaks
+@cindex unmetered music, line breaks
+@cindex unmetered music, page breaks
+@cindex breaks in unmetered music
+@cindex line breaks in cadenzas
+@cindex page breaks in cadenzas
+@cindex line breaks in unmetered music
+@cindex page breaks in unmetered music
+
 @knownissues
 
 LilyPond will insert line breaks and page breaks only at a
@@ -1463,6 +1497,9 @@ c4 c8 c8. c16 c8.
 c16 c8
 @end lilypond
 
+@cindex melismata, beams
+@cindex beams and melismata
+
 @warning{If beams are used to indicate melismata in songs, then
 automatic beaming should be switched off with @code{\autoBeamOff}
 and the beams indicated manually.}
@@ -1563,13 +1600,12 @@ group notes with beams, otherwise
 
 If there are no beam-ending rules defined for the beam duration of a
 particular beam in the time signature in use, its beaming is
-controlled by three context properties:
-@code{measureLength}, @code{beatLength} and @code{beatGrouping}.
-These properties may be set in the @code{Score}, @code{Staff} or
-@code{Voice} contexts to delimit their scope.  The default values
-are set while processing @code{\time} commands, so any @code{\set}
-commands to modify their value must be placed after all @code{\time}
-commands.
+controlled by three context properties: @code{measureLength},
+@code{beatLength} and @code{beatGrouping}.  These properties may be
+set in the @code{Score}, @code{Staff} or @code{Voice} contexts to
+delimit their scope.  The default values are set while processing
+@code{\time} commands, so any @code{\set} commands to modify their
+value must be placed after all @code{\time} commands.
 
 @warning{These three properties become effective for a particular
 beam @strong{only} if there are no beam-ending rules predefined for
@@ -1636,6 +1672,12 @@ beats in each group.
 @cindex grouping beats
 @cindex measure sub-grouping
 
+@funindex autoBeamSettings
+@funindex beam-limit
+@funindex beam-numerator
+@funindex beam-denominator
+
+
 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
 {conducting-signs,-measure-grouping-signs.ly}
 
@@ -1677,20 +1719,28 @@ defined.  This can be either @code{begin} or @code{end} but
 only @code{end} is effective.
 
 @item @code{beam-numerator/beam-denominator} is the beam duration
-to which the rule is to apply.  A beam is considered to have
-the duration of its shortest note.  Set @code{beam-numerator}
-and @code{beam-denominator} to @code{'*'} to have this rule apply
-to beams of any duration.
+to which the rule is to apply.  A beam is considered to have the
+duration of its shortest note.  Set @code{beam-numerator} and
+@code{beam-denominator} to @code{'*'} to have this rule apply to beams
+of any duration.
+
+@funindex time-signature-numerator
+@funindex time-signature-denominator
 
 @item @code{time-signature-numerator/time-signature-denominator}
-specifies the time signature to which this rule should apply.
-If @code{time-signature-numerator} and
-@code{time-signature-denominator} are set to @code{'*'} this rule
-will apply in any time signature.
+specifies the time signature to which this rule should apply.  If
+@code{time-signature-numerator} and @code{time-signature-denominator}
+are set to @code{'*'} this rule will apply in any time signature.
+
+@funindex moment-numerator
+@funindex moment-denominator
 
-@item @code{monent-numerator/moment-denominator} is the position
+@item @code{moment-numerator/moment-denominator} is the position
 in the bar at which the beam should end.
 
+@funindex score-override-auto-beam-setting
+@funindex override-auto-beam-setting
+
 @item @code{context} is optional, and it specifies the context at which
 the change should be made.  The default is @code{'Voice}.
 
@@ -1761,6 +1811,8 @@ automatic beam settings in @file{scm/@/auto@/-beam@/.scm} for
 possible interference, because the beam endings defined there will
 still apply in addition to your own.}
 
+@funindex revert-auto-beam-setting
+
 Any unwanted or conflicting default endings must be reverted for
 your time signature(s).  Existing default or user-defined
 beam-ending rules are removed by using
@@ -1905,6 +1957,7 @@ g a]
 @unnumberedsubsubsec Feathered beams
 
 @cindex beams, feathered
+@cindex feathered beams
 
 @funindex \featherDurations
 @funindex featherDurations
@@ -1917,12 +1970,12 @@ feathered beam must be indicated manually using @code{[} and
 @code{]}, and the beam feathering is turned on by specifying a
 direction to the @code{Beam} property @code{grow-direction}.
 
-If the placement of the notes and the sound in the MIDI output
-is to reflect the ritardando or accelerando indicated by the
-feathered beam the notes must be grouped as a
-music expression delimited by braces and preceded by a
-@code{featheredDurations} command which specifies the ratio
-between the durations of the first and last notes in the group.
+If the placement of the notes and the sound in the MIDI output is to
+reflect the ritardando or accelerando indicated by the feathered beam
+the notes must be grouped as a music expression delimited by braces
+and preceded by a @code{featherDurations} command which specifies
+the ratio between the durations of the first and last notes in the
+group.
 
 The square brackets show the extent of the beam and the braces show
 which notes are to have their durations modified.  Normally these
@@ -1978,6 +2031,10 @@ Snippets:
 
 @cindex bar lines
 @cindex measure lines
+@cindex closing bar lines
+@cindex bar lines, closing
+@cindex double bar lines
+@cindex bar lines, double
 @cindex repeat bars
 
 @funindex \bar
@@ -2111,6 +2168,9 @@ connected between different staves of a @code{StaffGroup},
 @end lilypond
 
 
+@cindex default bar lines, changing
+@cindex bar lines, default, changing
+
 @snippets
 
 @funindex whichBar
@@ -2166,16 +2226,10 @@ c1 c c c
 c1 c c c
 @end lilypond
 
-
-@snippets
-
 @cindex bar numbers, regular spacing
 
 @funindex barNumberVisibility
-
-@c Uncomment this after next LSR update.
-@c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
-@c {printing-the-bar-number-for-the-first-measure.ly}
+@funindex BarNumber
 
 Bar numbers can be typeset at regular intervals instead of just at
 the beginning of every line.  To do this the default behavior
@@ -2191,97 +2245,35 @@ example bar numbers are printed at all possible places:
 @lilypond[verbatim,quote,relative=1]
 \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
 \set Score.currentBarNumber = #11
-\bar ""  % Permit first bar number to be printed
-c1 c c c
+% Permit first bar number to be printed
+\bar ""
+c1 | c | c | c
 \break
-c c c c
+c1 | c | c | c
 @end lilypond
 
-@c  All the rest of these examples will be added to LSR
-@c  and moved into the Snippets.  -gp
 
-@noindent
-and here the bar numbers are printed every two measures
-except at the end of the line:
+@snippets
 
-@lilypond[verbatim,quote,relative=1]
-\override Score.BarNumber #'break-visibility = #'#(#f #t #t)
-\set Score.currentBarNumber = #11
-\bar ""  % Permit first bar number to be printed
-% Print a bar number every second measure
-\set Score.barNumberVisibility = #(every-nth-bar-number-visible 2)
-c1 c c c c
-\break
-c c c c c
-@end lilypond
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
+{printing-the-bar-number-for-the-first-measure.ly}
+
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
+{printing-bar-numbers-at-regular-intervals.ly}
 
 @cindex measure number, format
 @cindex bar number, format
 
-The size of the bar number may be changed.  This is illustrated
-in the following example, which also shows how to enclose bar
-numbers in boxes and circles, and shows an alternative way
-of specifying @code{#(#f #t #t)} for @code{break-visibility}.
-
-@lilypond[verbatim,quote,relative=1]
-% Prevent bar numbers at the end of a line and permit them elsewhere
-\override Score.BarNumber #'break-visibility
-  = #end-of-line-invisible
-
-% Increase the size of the bar number by 2
-\override Score.BarNumber #'font-size = #2
-\repeat unfold 3 { c1 } \bar "|"
-
-% Draw a box round the following bar number(s)
-\override Score.BarNumber  #'stencil
-  = #(make-stencil-boxer 0.1 0.25 ly:text-interface::print)
-\repeat unfold 3 { c1 } \bar "|"
-
-% Draw a circle round the following bar number(s)
-\override Score.BarNumber  #'stencil
-  = #(make-stencil-circler 0.1 0.25 ly:text-interface::print)
-\repeat unfold 4 { c1 } \bar "|."
-@end lilypond
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
+{printing-bar-numbers-inside-boxes-or-circles.ly}
 
 @cindex bar number alignment
 
-Bar numbers by default are left-aligned to their parent object.
-This is usually the left edge of a line or, if numbers are printed
-within a line, the left bar line of the measure.  The numbers may also
-be positioned directly on the bar line or right-aligned to the
-bar line:
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
+{aligning-bar-numbers.ly}
 
-@lilypond[verbatim,quote,relative=1]
-\set Score.currentBarNumber = #111
-\override Score.BarNumber #'break-visibility = #'#(#t #t #t)
-% Increase the size of the bar number by 2
-\override Score.BarNumber #'font-size = #2
-% Print a bar number every second measure
-\set Score.barNumberVisibility = #(every-nth-bar-number-visible 2)
-c1 c1
-% Center-align bar numbers
-\override Score.BarNumber #'self-alignment-X = #0
-c1 c1
-% Right-align bar numbers
-\override Score.BarNumber #'self-alignment-X = #-1
-c1 c1
-@end lilypond
-
-Bar numbers can be removed entirely by removing the
-@code{Bar_number_engraver} from the @code{Score} context.
-
-@lilypond[verbatim,quote]
-\layout {
-  \context {
-    \Score
-    \remove "Bar_number_engraver"
-  }
-}
-\relative c''{
-  c4 c c c \break
-  c4 c c c
-}
-@end lilypond
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
+{removing-bar-numbers-from-a-score.ly}
 
 
 @seealso
@@ -2368,10 +2360,10 @@ pipeSymbol = \bar "||"
 @funindex \barNumberCheck
 @funindex barNumberCheck
 
-When copying large pieces of music, it can be helpful to check
-that the LilyPond bar number corresponds to the original that you
-are entering from.  This can be checked with
-@code{\barNumberCheck}, for example,
+When copying large pieces of music, it can be helpful to check that
+the LilyPond bar number corresponds to the original that you are
+entering from.  This can be checked with @code{\barNumberCheck}, for
+example,
 
 @verbatim
 \barNumberCheck #123
@@ -2428,6 +2420,7 @@ mark manually.  The value to use is stored in the property
 @cindex rehearsal mark, manual
 @cindex mark, rehearsal, manual
 @cindex custom rehearsal mark
+@cindex manual rehearsal mark
 
 The style is defined by the property @code{markFormatter}.  It is
 a function taking the current mark (an integer) and the current
@@ -2476,7 +2469,7 @@ string.
 
 @cindex segno
 @cindex coda
-@cindex D.S al Fine
+@cindex D.S. al Fine
 @cindex fermata
 @cindex music glyphs
 @cindex glyphs, music
@@ -2618,6 +2611,10 @@ note after a space lasting 7/8 of the main note.
 }
 @end lilypond
 
+@cindex tweaking grace notes
+@cindex grace notes, tweaking
+@cindex grace notes, changing layout settings
+
 A @code{\grace} music expression will introduce special
 typesetting settings, for example, to produce smaller type, and
 set directions.  Hence, when introducing layout tweaks to
@@ -2643,60 +2640,17 @@ direction is overriden and then reverted.
 
 @snippets
 
-The slash through the stem found in @emph{acciaccatura}s can be applied
-in other situations:
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
+{using-grace-note-slashes-with-normal-heads.ly}
 
-@lilypond[quote,verbatim,relative=2]
-\relative c'' {
-  \override Stem #'stroke-style = #"grace"
-  c8( d2) e8( f4)
-}
-@end lilypond
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
+{tweaking-grace-layout-within-music.ly}
 
-The layout of grace expressions can be changed throughout the
-music using the function @code{add-grace-property}.  The following
-example undefines the @code{Stem} direction for this grace, so
-that stems do not always point up.
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
+{redefining-grace-note-global-defaults.ly}
 
-@lilypond[quote,verbatim,relative=2]
-\relative c'' {
-  \new Staff {
-    #(add-grace-property 'Voice 'Stem 'direction ly:stem::calc-direction)
-    #(remove-grace-property 'Voice 'Stem 'direction)
-    \new Voice {
-       \acciaccatura { f16 } g4
-       \grace { d16[ e] } f4
-       \appoggiatura { a,32[ b c d] } e2
-    }
-  }
-}
-@end lilypond
-
-Another option is to change the variables @code{startGraceMusic},
-@code{stopGraceMusic}, @code{startAcciaccaturaMusic},
-@code{stopAcciaccaturaMusic}, @code{startAppoggiaturaMusic},
-@code{stopAppoggiaturaMusic}.  The default values of these can be
-seen in the file @code{ly/@/grace@/-init@/.ly}.  By redefining
-them other effects may be obtained.
-
-Grace notes may be forced to align with regular notes
-in other staves:
-
-@lilypond[verbatim,quote]
-\relative c'' {
-  <<
-    \override Score.SpacingSpanner #'strict-grace-spacing = ##t
-    \new Staff {
-      c4
-      \afterGrace c4 { c16[ c8 c16] }
-      c4 r
-    }
-    \new Staff {
-      c16 c c c c c c c c4 r
-    }
-  >>
-}
-@end lilypond
+@lilypondfile[verbatim,lilyquote,texidoc,doctitle]
+{positioning-grace-notes-with-floating-space.ly}
 
 
 @seealso
@@ -2714,6 +2668,10 @@ Internals Reference: @rinternals{GraceMusic}.
 
 @knownissues
 
+@cindex acciaccatura, multi-note
+@cindex multi-note acciaccatura
+@cindex grace-note synchronization
+
 A multi-note beamed @i{acciaccatura} is printed without a slash,
 and looks exactly the same as a multi-note beamed
 @i{appoggiatura}.
@@ -2726,8 +2684,10 @@ synchronized.  Take care when you mix staves with grace notes and
 staves without, for example,
 
 @lilypond[quote,relative=2,verbatim]
-<< \new Staff { e4 \bar "|:" \grace c16 d2. }
-   \new Staff { c4 \bar "|:" d2. } >>
+<<
+  \new Staff { e4 \bar "|:" \grace c16 d2. }
+  \new Staff { c4 \bar "|:" d2. }
+>>
 @end lilypond
 
 @noindent
@@ -2735,8 +2695,10 @@ This can be remedied by inserting grace skips of the corresponding
 durations in the other staves.  For the above example
 
 @lilypond[quote,relative=2,verbatim]
-<< \new Staff { e4 \bar "|:" \grace c16 d2. }
-   \new Staff { c4 \bar "|:" \grace s16 d2. } >>
+<<
+  \new Staff { e4 \bar "|:" \grace c16 d2. }
+  \new Staff { c4 \bar "|:" \grace s16 d2. }
+>>
 @end lilypond
 
 Grace sections should only be used within sequential music
index 559ab203a52d59e8424c5e0423de8ada991a4845..354ce5e898c41c1e69378688752ff4d658456e54 100644 (file)
@@ -486,13 +486,6 @@ Internals Reference:
 @rinternals{staff-symbol-interface}.
 
 
-@knownissues
-
-When setting vertical staff line positions manually, bar lines are
-always centered on position 0, so the maximum distance between the
-outermost bar lines in either direction must be equal.
-
-
 @node Ossia staves
 @unnumberedsubsubsec Ossia staves
 
diff --git a/input/lsr/aligning-bar-numbers.ly b/input/lsr/aligning-bar-numbers.ly
new file mode 100644 (file)
index 0000000..f79ecc2
--- /dev/null
@@ -0,0 +1,32 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.1"
+
+\header {
+  lsrtags = "rhythms"
+
+  texidoc = "
+Bar numbers by default are right-aligned to their parent object. This
+is usually the left edge of a line or, if numbers are printed within a
+line, the left hand side of a bar line.  The numbers may also be
+positioned directly over the bar line or left-aligned to the bar line.
+
+"
+  doctitle = "Aligning bar numbers"
+} % begin verbatim
+
+\relative c' {
+  \set Score.currentBarNumber = #111
+  \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
+  % Increase the size of the bar number by 2
+  \override Score.BarNumber #'font-size = #2
+  % Print a bar number every second measure
+  \set Score.barNumberVisibility = #(every-nth-bar-number-visible 2)
+  c1 | c1
+  % Center-align bar numbers
+  \override Score.BarNumber #'self-alignment-X = #CENTER
+  c1 | c1
+  % Left-align bar numbers
+  \override Score.BarNumber #'self-alignment-X = #LEFT
+  c1 | c1
+}
index e8c484113ed1437d9c2b9613c6bff24c4ccd6d59..0fefd9fdd0c25b76a1b32b4f7bd4018e52e3b705 100644 (file)
@@ -8,5 +8,6 @@ creating-blank-staves.ly
 engravers-one-by-one.ly
 mensurstriche-layout-bar-lines-between-the-staves.ly
 nesting-staves.ly
+removing-bar-numbers-from-a-score.ly
 use-square-bracket-at-the-start-of-a-staff-group.ly
 vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
index 8a0ded1c16ef6724b9caa3a18465412eef0e86ee..1e49132c566c68970e4a23f4134bbddba7036ceb 100644 (file)
@@ -28,6 +28,6 @@ TAB = \markup {
 
 \new TabStaff {
   \override Staff.Clef #'stencil = #(lambda (grob)
-    ly:clef::print (grob-interpret-markup grob TAB))
+    (grob-interpret-markup grob TAB))
   a
 }
diff --git a/input/lsr/positioning-grace-notes-with-floating-space.ly b/input/lsr/positioning-grace-notes-with-floating-space.ly
new file mode 100644 (file)
index 0000000..5068f62
--- /dev/null
@@ -0,0 +1,32 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.1"
+
+\header {
+  lsrtags = "rhythms"
+
+  texidoc = "
+Setting the property @code{'strict-grace-spacing} makes the musical
+columns for grace notes 'floating', i.e., decoupled from the non-grace
+notes: first the normal notes are spaced, then the (musical columns of
+the) graces are put left of the musical columns for the main notes.
+
+"
+  doctitle = "Positioning grace notes with floating space"
+} % begin verbatim
+
+\relative c'' {
+  <<
+    \override Score.SpacingSpanner #'strict-grace-spacing = ##t
+    \new Staff \new Voice {
+      \afterGrace c4 { c16[ c8 c16] }
+      c8[ \grace { b16[ d] } c8]
+      c4 r
+    }
+    \new Staff {
+      c16 c c c c c c c c4 r
+    }
+  >>
+}
+
+
diff --git a/input/lsr/printing-bar-numbers-at-regular-intervals.ly b/input/lsr/printing-bar-numbers-at-regular-intervals.ly
new file mode 100644 (file)
index 0000000..d0411a7
--- /dev/null
@@ -0,0 +1,27 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.1"
+
+\header {
+  lsrtags = "rhythms"
+
+  texidoc = "
+Bar numbers can be printed at regular intervals by setting the property
+@code{barNumberVisibility}. Here the bar numbers are printed every two
+measures except at the end of the line. 
+
+"
+  doctitle = "Printing bar numbers at regular intervals"
+} % begin verbatim
+
+\relative c' {
+  \override Score.BarNumber #'break-visibility = #'#(#f #t #t)
+  \set Score.currentBarNumber = #11
+  % Permit first bar number to be printed
+  \bar ""
+  % Print a bar number every second measure
+  \set Score.barNumberVisibility = #(every-nth-bar-number-visible 2)
+  c1 | c | c | c | c 
+  \break
+  c1 | c | c | c | c
+}
diff --git a/input/lsr/printing-bar-numbers-inside-boxes-or-circles.ly b/input/lsr/printing-bar-numbers-inside-boxes-or-circles.ly
new file mode 100644 (file)
index 0000000..0f30c09
--- /dev/null
@@ -0,0 +1,34 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.1"
+
+\header {
+  lsrtags = "rhythms, tweaks-and-overrides"
+
+  texidoc = "
+Bar numbers can also be printed inside boxes or circles.
+
+
+
+"
+  doctitle = "Printing bar numbers inside boxes or circles"
+} % begin verbatim
+
+\relative c'{
+  % Prevent bar numbers at the end of a line and permit them elsewhere
+  \override Score.BarNumber  #'break-visibility = #end-of-line-invisible
+  \set Score.barNumberVisibility = #(every-nth-bar-number-visible 4)
+
+  % Increase the size of the bar number by 2
+  \override Score.BarNumber #'font-size = #2
+
+  % Draw a box round the following bar number(s)
+  \override Score.BarNumber #'stencil
+    = #(make-stencil-boxer 0.1 0.25 ly:text-interface::print)
+  \repeat unfold 5 { c1 }
+
+  % Draw a circle round the following bar number(s)
+  \override Score.BarNumber #'stencil
+    = #(make-stencil-circler 0.1 0.25 ly:text-interface::print)
+  \repeat unfold 4 { c1 } \bar "|."
+}
diff --git a/input/lsr/redefining-grace-note-global-defaults.ly b/input/lsr/redefining-grace-note-global-defaults.ly
new file mode 100644 (file)
index 0000000..4995065
--- /dev/null
@@ -0,0 +1,34 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.1"
+
+\header {
+  lsrtags = "rhythms"
+
+  texidoc = "
+The global defaults for grace notes are stored in the identifiers
+@code{startGraceMusic}, @code{stopGraceMusic},
+@code{startAcciaccaturaMusic}, @code{stopAcciaccaturaMusic},
+@code{startAppoggiaturaMusic} and @code{stopAppoggiaturaMusic}, which
+are defined in the file @code{ly/grace-init.ly}.  By redefining them
+other effects may be obtained. 
+
+"
+  doctitle = "Redefining grace note global defaults"
+} % begin verbatim
+
+startAcciaccaturaMusic = {
+  s1*0(
+  \override Stem #'stroke-style = #"grace"
+  \slurDashed
+}
+
+stopAcciaccaturaMusic = {
+  \revert Stem #'stroke-style
+  \slurSolid
+  s1*0)
+}
+
+\relative c'' {
+  \acciaccatura d8 c1
+}
diff --git a/input/lsr/removing-bar-numbers-from-a-score.ly b/input/lsr/removing-bar-numbers-from-a-score.ly
new file mode 100644 (file)
index 0000000..e3c8fdc
--- /dev/null
@@ -0,0 +1,26 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.1"
+
+\header {
+  lsrtags = "rhythms, contexts-and-engravers"
+
+  texidoc = "
+Bar numbers can be removed entirely by removing the
+@code{Bar_number_engraver} from the @code{Score} context.
+
+"
+  doctitle = "Removing bar numbers from a score"
+} % begin verbatim
+
+\layout {
+  \context {
+    \Score
+    \remove "Bar_number_engraver"
+  }
+}
+
+\relative c'' {
+  c4 c c c \break
+  c4 c c c
+}
index bdcc20533da68db905d39707006db60164ef7081..e2022dc7835ffc89f977f40ce25a2c1dcd0ae451 100644 (file)
@@ -1,5 +1,6 @@
 adding-beams,-slurs,-ties-etc.-when-using-tuplet-and-non-tuplet-rythms..ly
 adding-drum-parts.ly
+aligning-bar-numbers.ly
 automatic-beam-subdivisions.ly
 automatic-beams-two-per-two-in-4-4-or-2-2-time-signature.ly
 avoiding-collisions-with-chord-fingerings.ly
@@ -31,10 +32,15 @@ modifying-tuplet-bracket-length.ly
 multi--measure-rest-markup.ly
 non-default-tuplet-numbers.ly
 permitting-line-breaks-within-beamed-tuplets.ly
+positioning-grace-notes-with-floating-space.ly
 positioning-multi--measure-rests.ly
+printing-bar-numbers-at-regular-intervals.ly
+printing-bar-numbers-inside-boxes-or-circles.ly
 printing-metronome-and-rehearsal-marks-below-the-staff.ly
 printing-music-with-different-time-signatures.ly
 printing-the-bar-number-for-the-first-measure.ly
+redefining-grace-note-global-defaults.ly
+removing-bar-numbers-from-a-score.ly
 rest-styles.ly
 reverting-default-beam-endings.ly
 rhythmic-slashes.ly
@@ -44,5 +50,7 @@ specifying-context-with-beatgrouping.ly
 stemlets.ly
 sub-dividing-beams.ly
 three-sided-box.ly
+tweaking-grace-layout-within-music.ly
 using-beatlength-and-beatgrouping.ly
+using-grace-note-slashes-with-normal-heads.ly
 using-ties-with-arpeggios.ly
diff --git a/input/lsr/tweaking-grace-layout-within-music.ly b/input/lsr/tweaking-grace-layout-within-music.ly
new file mode 100644 (file)
index 0000000..0a84b02
--- /dev/null
@@ -0,0 +1,28 @@
+%% Do not edit this file; it is auto-generated from input/new
+%% This file is in the public domain.
+\version "2.13.1"
+
+\header {
+  lsrtags = "rhythms"
+  texidoc = "
+The layout of grace expressions can be changed throughout the
+music using the functions @code{add-grace-property} and
+@code{remove-grace-property}.  The following example undefines
+the @code{Stem} direction for this grace, so that stems do not
+always point up, and changes the default note heads to crosses.
+"
+  doctitle = "Tweaking grace layout within music"
+} % begin verbatim
+
+
+\relative c'' {
+  \new Staff {
+    #(remove-grace-property 'Voice 'Stem 'direction)
+    #(add-grace-property 'Voice 'NoteHead 'style 'cross)
+    \new Voice {
+       \acciaccatura { f16 } g4
+       \grace { d16[ e] } f4
+       \appoggiatura { f,32[ g a] } e2
+    }
+  }
+}
index fdd1591de6a0c68d3e201afe2e8f16e2039a449a..dd9f7b06b5c64d7db3ab8b960b74d309b9a01abf 100644 (file)
@@ -33,6 +33,7 @@ percent-repeat-count-visibility.ly
 positioning-multi--measure-rests.ly
 positioning-text-markups-inside-slurs.ly
 printing-a-repeat-sign-at-the-beginning-of-a-piece.ly
+printing-bar-numbers-inside-boxes-or-circles.ly
 printing-metronome-and-rehearsal-marks-below-the-staff.ly
 proportional-strict-notespacing.ly
 removing-the-first-empty-line.ly
diff --git a/input/lsr/using-grace-note-slashes-with-normal-heads.ly b/input/lsr/using-grace-note-slashes-with-normal-heads.ly
new file mode 100644 (file)
index 0000000..c0dd895
--- /dev/null
@@ -0,0 +1,19 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.1"
+
+\header {
+  lsrtags = "rhythms"
+
+  texidoc = "
+The slash through the stem found in acciaccaturas can be applied in
+other situations.
+
+"
+  doctitle = "Using grace note slashes with normal heads"
+} % begin verbatim
+
+\relative c'' {
+  \override Stem #'stroke-style = #"grace"
+  c8( d2) e8( f4)
+}
index fa7dadee7d46e5fb1dd2915ff4637524d2035d4f..ff165ad28b61543e19ee96df1fe38a213deae0f0 100644 (file)
@@ -25,6 +25,6 @@ TAB = \markup {
 
 \new TabStaff {
   \override Staff.Clef #'stencil = #(lambda (grob)
-    ly:clef::print (grob-interpret-markup grob TAB))
+    (grob-interpret-markup grob TAB))
   a
 }
diff --git a/input/new/tweaking-grace-layout-within-music.ly b/input/new/tweaking-grace-layout-within-music.ly
new file mode 100644 (file)
index 0000000..8459c9c
--- /dev/null
@@ -0,0 +1,25 @@
+\version "2.12.0"
+
+\header {
+  lsrtags = "rhythms"
+  texidoc = "
+The layout of grace expressions can be changed throughout the
+music using the functions @code{add-grace-property} and
+@code{remove-grace-property}.  The following example undefines
+the @code{Stem} direction for this grace, so that stems do not
+always point up, and changes the default note heads to crosses.
+"
+  doctitle = "Tweaking grace layout within music"
+}
+
+\relative c'' {
+  \new Staff {
+    #(remove-grace-property 'Voice 'Stem 'direction)
+    #(add-grace-property 'Voice 'NoteHead 'style 'cross)
+    \new Voice {
+       \acciaccatura { f16 } g4
+       \grace { d16[ e] } f4
+       \appoggiatura { f,32[ g a] } e2
+    }
+  }
+}
index b69bfe67dd28680a71fcea9287b18ea98c4e7450..4cdbc7896749ef50fb2360f7a87e45cfd2ddb95b 100644 (file)
@@ -1,4 +1,3 @@
-
 \version "2.12.0"
 \header{
   texidoc="
@@ -8,9 +7,6 @@ natural sign.
 "
 }
 
-
-\layout { ragged-right = ##t }
-
 thenotes =  \relative cis' {
   \time 4/4
   gisis'4 gis geses ges |
@@ -18,10 +14,5 @@ thenotes =  \relative cis' {
 
 <<
   \context Staff \thenotes
-  \context NoteNames  {
-    \override NoteNames.NoteName   #'no-spacing-rods = ##f 
-    \thenotes
-  }
+  \context NoteNames \thenotes
 >>
-
-
diff --git a/input/regression/fret-diagram-origins.ly b/input/regression/fret-diagram-origins.ly
new file mode 100644 (file)
index 0000000..4042bf5
--- /dev/null
@@ -0,0 +1,39 @@
+\version "2.12.0"
+
+\header {
+  texidoc="
+Fret diagrams of different orientation should share a common origin
+of the topmost fret or string.
+
+"
+}
+
+\include "predefined-guitar-fretboards.ly"
+\layout { ragged-right = ##t }
+<<
+  \chords {
+    c1 |
+    c1 |
+    c1
+  }
+
+  \new FretBoards {
+    \chordmode{
+    c1 |
+    \override FretBoard #'fret-diagram-details
+       #'orientation = #'landscape
+    c1 |
+    \override FretBoard #'fret-diagram-details
+       #'orientation = #'opposing-landscape
+    c1
+    }
+  }
+
+  \new Voice {
+    c'1 |
+    c'1 |
+    c'
+ }
+>>
+
+
diff --git a/input/regression/musicxml/33i-Ties-NotEnded.xml b/input/regression/musicxml/33i-Ties-NotEnded.xml
new file mode 100644 (file)
index 0000000..7ce312c
--- /dev/null
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 2.0 Partwise//EN"
+                                "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise version="2.0">
+  <identification>
+    <miscellaneous>
+      <miscellaneous-field name="description">Several ties that have their end tag missing.</miscellaneous-field>
+    </miscellaneous>
+  </identification>
+  <part-list>
+    <score-part id="P1">
+      <part-name></part-name>
+    </score-part>
+  </part-list>
+  <!--=========================================================-->
+  <part id="P1">
+    <measure number="1">
+      <attributes>
+        <divisions>1</divisions>
+        <key>
+          <fifths>0</fifths>
+          <mode>major</mode>
+        </key>
+        <time symbol="common">
+          <beats>4</beats>
+          <beat-type>4</beat-type>
+        </time>
+        <clef>
+          <sign>G</sign>
+          <line>2</line>
+        </clef>
+      </attributes>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>4</duration>
+        <tie type="start"/>
+        <voice>1</voice>
+        <type>whole</type>
+        <notations>
+          <tied type="start"/>
+        </notations>
+        <lyric number="1">
+          <syllabic>end</syllabic>
+          <text>A</text>
+        </lyric>
+      </note>
+    </measure>
+    <!--=======================================================-->
+    <measure number="2">
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>4</duration>
+        <voice>1</voice>
+        <type>whole</type>
+        <lyric number="1">
+          <syllabic>end</syllabic>
+          <text>B</text>
+        </lyric>
+      </note>
+    </measure>
+    <!--=======================================================-->
+    <measure number="3">
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>4</duration>
+        <tie type="stop"/>
+        <tie type="start"/>
+        <voice>1</voice>
+        <type>whole</type>
+        <notations>
+          <tied type="stop"/>
+          <tied type="start"/>
+        </notations>
+        <lyric number="1">
+          <syllabic>end</syllabic>
+          <text>C</text>
+        </lyric>
+      </note>
+    </measure>
+    <!--=======================================================-->
+    <measure number="4">
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>4</duration>
+        <tie type="start"/>
+        <voice>1</voice>
+        <type>whole</type>
+        <notations>
+          <tied type="start"/>
+        </notations>
+        <lyric number="1" name="verse">
+          <syllabic>end</syllabic>
+          <text>D</text>
+        </lyric>
+      </note>
+    </measure>
+    <!--=======================================================-->
+    <measure number="5">
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>4</duration>
+        <tie type="stop"/>
+        <voice>1</voice>
+        <type>whole</type>
+        <notations>
+          <tied type="stop"/>
+        </notations>
+        <lyric number="1" name="verse">
+          <syllabic>end</syllabic>
+          <text>E</text>
+        </lyric>
+      </note>
+      <barline location="right">
+        <bar-style>light-heavy</bar-style>
+      </barline>
+    </measure>
+  </part>
+  <!--=========================================================-->
+</score-partwise>
diff --git a/input/regression/musicxml/41g-PartNoId.xml b/input/regression/musicxml/41g-PartNoId.xml
new file mode 100644 (file)
index 0000000..337b851
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 2.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise version="2.0">
+  <identification>
+    <miscellaneous>
+      <miscellaneous-field name="description">A part with no id attribute.
+            Since this piece has only one part, it is clear which part 
+            is described by the one part element.</miscellaneous-field>
+    </miscellaneous>
+  </identification>
+  <part-list>
+    <score-part id="P1">
+      <part-name print-object="no">MusicXML Part</part-name>
+    </score-part>
+  </part-list>
+  <part>
+    <measure number="1">
+      <note>
+        <rest/>
+        <duration>4</duration>
+        <voice>1</voice>
+        <type>whole</type>
+      </note>
+    </measure>
+  </part>
+</score-partwise>
diff --git a/input/regression/musicxml/41h-TooManyParts.xml b/input/regression/musicxml/41h-TooManyParts.xml
new file mode 100644 (file)
index 0000000..64b7dc9
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 2.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise version="2.0">
+  <identification>
+    <miscellaneous>
+      <miscellaneous-field name="description">This piece has more part elements
+              than the part-list section gives. One can either convert all
+              the parts present, but not listed in the part-list, or simply 
+              not import / ignore them.</miscellaneous-field>
+    </miscellaneous>
+  </identification>
+  <part-list>
+    <score-part id="P1">
+      <part-name print-object="no">MusicXML Part</part-name>
+    </score-part>
+  </part-list>
+  <part id="P1">
+    <measure number="1">
+      <note>
+        <rest/>
+        <duration>4</duration>
+        <voice>1</voice>
+        <type>whole</type>
+      </note>
+    </measure>
+  </part>
+  <part id="P3">
+    <measure number="1">
+      <note>
+        <rest/>
+        <duration>4</duration>
+        <voice>1</voice>
+        <type>whole</type>
+      </note>
+    </measure>
+  </part>
+  <part id="P4">
+    <measure number="1">
+      <note>
+        <rest/>
+        <duration>4</duration>
+        <voice>1</voice>
+        <type>whole</type>
+      </note>
+    </measure>
+  </part>
+</score-partwise>
diff --git a/input/regression/musicxml/46f-IncompleteMeasures.xml b/input/regression/musicxml/46f-IncompleteMeasures.xml
new file mode 100644 (file)
index 0000000..d16a463
--- /dev/null
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 2.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise version="2.0">
+  <identification>
+    <miscellaneous>
+      <miscellaneous-field name="description">Measures can contain less notes
+          than the time signature says. Here, the first and third measures 
+          contain only two quarters instead of four.</miscellaneous-field>
+    </miscellaneous>
+  </identification>
+  <part-list>
+    <score-part id="P1">
+      <part-name>MusicXML Part</part-name>
+    </score-part>
+  </part-list>
+  <!--=========================================================-->
+  <part id="P1">
+        <measure number="1">
+            <attributes>
+                <divisions>1</divisions>
+                <time>
+                    <beats>4</beats>
+                    <beat-type>4</beat-type>
+                </time>
+                <clef>
+                    <sign>G</sign>
+                    <line>2</line>
+                </clef>
+            </attributes>
+            <note>
+                <pitch>
+                    <step>A</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>1</duration>
+                <voice>1</voice>
+                <type>quarter</type>
+            </note>
+            <note>
+                <pitch>
+                    <step>A</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>1</duration>
+                <voice>1</voice>
+                <type>quarter</type>
+            </note>
+        </measure>
+        <measure number="2">
+            <note>
+                <pitch>
+                    <step>A</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>1</duration>
+                <voice>1</voice>
+                <type>quarter</type>
+            </note>
+            <note>
+                <pitch>
+                    <step>A</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>1</duration>
+                <voice>1</voice>
+                <type>quarter</type>
+            </note>
+            <note>
+                <pitch>
+                    <step>A</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>1</duration>
+                <voice>1</voice>
+                <type>quarter</type>
+            </note>
+            <note>
+                <pitch>
+                    <step>A</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>1</duration>
+                <voice>1</voice>
+                <type>quarter</type>
+            </note>
+        </measure>
+        <measure number="3">
+            <note>
+                <pitch>
+                    <step>A</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>1</duration>
+                <voice>1</voice>
+                <type>quarter</type>
+            </note>
+            <note>
+                <pitch>
+                    <step>A</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>1</duration>
+                <voice>1</voice>
+                <type>quarter</type>
+            </note>
+        </measure>
+        <measure number="4">
+            <note>
+                <pitch>
+                    <step>A</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>1</duration>
+                <voice>1</voice>
+                <type>quarter</type>
+            </note>
+            <note>
+                <pitch>
+                    <step>A</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>1</duration>
+                <voice>1</voice>
+                <type>quarter</type>
+            </note>
+            <note>
+                <pitch>
+                    <step>A</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>1</duration>
+                <voice>1</voice>
+                <type>quarter</type>
+            </note>
+            <note>
+                <pitch>
+                    <step>A</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>1</duration>
+                <voice>1</voice>
+                <type>quarter</type>
+            </note>
+        </measure>
+    </part>
+</score-partwise>
diff --git a/input/regression/musicxml/46g-PickupMeasure-Chordnames-FiguredBass.xml b/input/regression/musicxml/46g-PickupMeasure-Chordnames-FiguredBass.xml
new file mode 100644 (file)
index 0000000..99af4c6
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 2.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise version="2.0">
+  <identification>
+    <miscellaneous>
+      <miscellaneous-field name="description">Pickup measure with chord names 
+           and figured bass.</miscellaneous-field>
+    </miscellaneous>
+  </identification>
+  <part-list>
+    <score-part id="P1">
+      <part-name>MusicXML Part</part-name>
+    </score-part>
+  </part-list>
+  <!--=========================================================-->
+  <part id="P1">
+    <measure number="0" implicit="yes">
+      <attributes>
+        <divisions>2</divisions>
+        <key>
+          <fifths>0</fifths>
+          <mode>major</mode>
+        </key>
+        <time>
+          <beats>4</beats>
+          <beat-type>4</beat-type>
+        </time>
+      </attributes>
+      <harmony print-frame="no">
+        <root>
+          <root-step>C</root-step>
+        </root>
+        <kind>major</kind>
+      </harmony>
+      <figured-bass>
+        <figure><figure-number>3</figure-number></figure>
+        <duration>1</duration>
+      </figured-bass>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>eighth</type>
+      </note>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>eighth</type>
+      </note>
+    </measure>
+    <measure number="1">
+      <harmony print-frame="no">
+        <root>
+          <root-step>C</root-step>
+        </root>
+        <kind>major</kind>
+      </harmony>
+      <figured-bass>
+        <figure><figure-number>3</figure-number></figure>
+        <duration>1</duration>
+      </figured-bass>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>4</octave>
+        </pitch>
+        <duration>2</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+      </note>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>4</octave>
+        </pitch>
+        <duration>2</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+      </note>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>4</octave>
+        </pitch>
+        <duration>2</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+      </note>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>4</octave>
+        </pitch>
+        <duration>2</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+      </note>
+    </measure>
+  </part>
+</score-partwise>
diff --git a/input/regression/musicxml/51d-EmptyTitle.xml b/input/regression/musicxml/51d-EmptyTitle.xml
new file mode 100644 (file)
index 0000000..49a089b
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 2.0 Partwise//EN"
+                                "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise version="2.0">
+  <work>
+    <work-number></work-number>
+    <work-title></work-title>
+  </work>
+  <movement-number></movement-number>
+  <movement-title>Empty work-title, non-empty movement-title</movement-title>
+  <identification>
+    <miscellaneous>
+      <miscellaneous-field name="description">A piece with an empty (but
+            existing) work-title, but a non-empty movement-title. In this case
+            the movement-title should be chosen, even though the work-title
+            exists.</miscellaneous-field>
+    </miscellaneous>
+  </identification>
+  <part-list>
+    <score-part id="P1">
+      <part-name print-object="no">MusicXML Part</part-name>
+    </score-part>
+  </part-list>
+  <!--=========================================================-->
+  <part id="P1">
+    <measure number="1">
+      <note>
+        <rest/>
+        <duration>4</duration>
+        <voice>1</voice>
+        <type>whole</type>
+      </note>
+    </measure>
+  </part>
+  <!--=========================================================-->
+</score-partwise>
diff --git a/input/regression/musicxml/52b-Breaks.xml b/input/regression/musicxml/52b-Breaks.xml
new file mode 100644 (file)
index 0000000..6232618
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.1 Partwise//EN"
+                                "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise>
+  <identification>
+    <miscellaneous>
+      <miscellaneous-field name="description">System and page breaks, given in 
+              a &lt;print&gt; element</miscellaneous-field>
+    </miscellaneous>
+  </identification>
+  <part-list>
+    <score-part id="P1">
+      <part-name print-object="no">MusicXML Part</part-name>
+    </score-part>
+  </part-list>
+  <!--=========================================================-->
+  <part id="P1">
+    <measure number="1">
+      <attributes>
+        <divisions>1</divisions>
+        <time symbol="common">
+          <beats>4</beats>
+          <beat-type>4</beat-type>
+        </time>
+      </attributes>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>4</duration>
+        <voice>1</voice>
+        <type>whole</type>
+      </note>
+    </measure>
+    <!--=======================================================-->
+    <measure number="2">
+      <print new-system="yes"/>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>4</duration>
+        <voice>1</voice>
+        <type>whole</type>
+      </note>
+    </measure>
+    <!--=======================================================-->
+    <measure number="3">
+      <print new-page="yes"/>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>4</duration>
+        <voice>1</voice>
+        <type>whole</type>
+      </note>
+    </measure>
+  </part>
+  <!--=========================================================-->
+</score-partwise>
diff --git a/input/regression/musicxml/71g-MultipleChordnames.xml b/input/regression/musicxml/71g-MultipleChordnames.xml
new file mode 100644 (file)
index 0000000..6c42cdb
--- /dev/null
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 2.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise version="2.0">
+  <identification>
+    <miscellaneous>
+      <miscellaneous-field name="description">There can be multiple subsequent
+          harmony elements, indicating a harmony change during a note</miscellaneous-field>
+    </miscellaneous>
+  </identification>
+  <part-list>
+    <score-part id="P1">
+      <part-name>MusicXML Part</part-name>
+    </score-part>
+  </part-list>
+  <!--=========================================================-->
+  <part id="P1">
+        <measure number="1">
+            <attributes>
+                <divisions>480</divisions>
+                <key>
+                    <fifths>0</fifths>
+                    <mode>major</mode>
+                </key>
+                <time>
+                    <beats>4</beats>
+                    <beat-type>4</beat-type>
+                </time>
+                <clef>
+                    <sign>G</sign>
+                    <line>2</line>
+                </clef>
+            </attributes>
+            <harmony print-frame="no">
+                <root>
+                    <root-step>C</root-step>
+                </root>
+                <kind text="">major</kind>
+            </harmony>
+            <harmony print-frame="no">
+                <root>
+                    <root-step>F</root-step>
+                    <root-alter>1</root-alter>
+                </root>
+                <kind text="m6">minor-sixth</kind>
+            </harmony>
+            <note>
+                <pitch>
+                    <step>A</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>960</duration>
+                <voice>1</voice>
+                <type>half</type>
+            </note>
+            <harmony print-frame="no">
+                <root>
+                    <root-step>D</root-step>
+                </root>
+                <kind text="m7">minor-seventh</kind>
+            </harmony>
+            <harmony print-frame="no">
+                <root>
+                    <root-step>G</root-step>
+                </root>
+                <kind text="7">dominant</kind>
+            </harmony>
+            <note>
+                <pitch>
+                    <step>G</step>
+                    <octave>4</octave>
+                </pitch>
+                <duration>960</duration>
+                <voice>1</voice>
+                <type>half</type>
+            </note>
+        </measure>
+    </part>
+</score-partwise>
index f4d9e94e3d153485a5f7c4e2ee2d7e67ca075be6..6e19ca830731d15e87872ba86ed628e18b11b619 100644 (file)
@@ -1,10 +1,10 @@
-
 \version "2.12.0"
 
 \header{
-  texidoc=" By default, text is set with empty horizontal dimensions.  
-The boolean property @code{no-spacing-rods} in @code{TextScript} is used
-to control the horizontal size of text.  " }
+  texidoc = "By default, text is set with empty horizontal dimensions.
+The property @code{extra-spacing-width} in @code{TextScript} is used
+to control the horizontal size of text."
+}
 
 \layout {
   line-width = 3.0\cm
@@ -12,11 +12,11 @@ to control the horizontal size of text.  " }
 
 \relative c''{
   %% \textLengthOff
-  %% short for \override TextScript  #'no-spacing-rods = ##t
+  %% short for \override TextScript #'extra-spacing-width = #'(+inf.0 . -inf.0)
+  %%           \override TextScript #'extra-spacing-height = #'(0 . 0)
   c2_"very wide and long text" c | \break
-  %% short for \override TextScript  #'no-spacing-rods = ##f
+  %% short for \override TextScript #'extra-spacing-width = #'(0 . 0)
+  %%           \override TextScript #'extra-spacing-height = #'(-inf.0 . +inf.0)
   \textLengthOn
-  c_"very wide and long text" c
+  c2_"very wide and long text" c
 }
-
-
index 8cf8d2c0e821ad0d39d3075df656dd0028e4bc80..ad74e1837ede182b1f761559d4260c49cb0d32e8 100644 (file)
@@ -1,18 +1,19 @@
 \version "2.12.0"
 
 \header {
-  texidoc = "Spacing corrections for kneed beams still work when compression is involved."
+  texidoc = "Spacing corrections for kneed beams still work when
+compression is involved."
 }
 
-\paper { line-width = 14.4 \cm }
+\paper { line-width = 14.4\cm }
 rh = \change Staff = "rh"
 lh = \change Staff = "lh"
 \new PianoStaff <<
-        \new Staff ="rh" {
-                s1*3
-        }
-        \new Staff ="lh" {
-                \clef bass
-                \repeat unfold 12 { \rh a'16 \lh d \rh a' \lh d \noBreak}
-        }
+  \new Staff ="rh" {
+    s1*3
+  }
+  \new Staff ="lh" \new Voice {
+    \clef bass
+    \repeat unfold 12 { \rh a'16 \lh d \rh a' \lh d \noBreak }
+  }
 >>
\ No newline at end of file
diff --git a/input/regression/trill-spanner-auto-stop.ly b/input/regression/trill-spanner-auto-stop.ly
new file mode 100644 (file)
index 0000000..cda0cc2
--- /dev/null
@@ -0,0 +1,15 @@
+\version "2.13.1"
+\header {
+  texidoc = "Consecutive trill spans work without explicit
+@code{\\stopTrillSpan} commands, since successive trill spanners
+will automatically become the right bound of the previous trill.
+"
+}
+
+\paper { ragged-right = ##f }
+
+\relative c'' {
+  c1\startTrillSpan
+  c1\startTrillSpan
+  c2\stopTrillSpan r
+}
diff --git a/input/regression/trill-spanner-chained.ly b/input/regression/trill-spanner-chained.ly
new file mode 100644 (file)
index 0000000..3e756ce
--- /dev/null
@@ -0,0 +1,20 @@
+\version "2.13.1"
+\header {
+  texidoc = "Chained trills end at the next trill or barline.
+Collisions can be prevented by overriding @code{bound-details}.
+"
+}
+
+\paper { ragged-right = ##f }
+
+\relative c'' {
+  g8 f\startTrillSpan ~
+  f8 g\stopTrillSpan \startTrillSpan ~
+  g8 r\stopTrillSpan r4
+  \once \override TrillSpanner #'to-barline = ##t
+  c1\startTrillSpan ~
+  c1
+  \once \override TrillSpanner #'(bound-details right padding) = #1.2
+  c1\stopTrillSpan \startTrillSpan
+  c1\stopTrillSpan\startTrillSpan
+}
index ed1321450256aaa15a8a7345c7908e392a9dbb79..48272ae10fa0bc84dcc5761eeb5ca655fbb829e8 100644 (file)
@@ -37,10 +37,6 @@ Beam_quant_parameters::fill (Grob *him)
 {
   SCM details = him->get_property ("details");
 
-  /* 
-     TODO: The default values should be copied to define-grobs.scm.
-   */
-  INTER_QUANT_PENALTY = get_detail (details, ly_symbol2scm ("inter-quant-penalty"), 1000.0);
   SECONDARY_BEAM_DEMERIT = get_detail (details, ly_symbol2scm ("secondary-beam-demerit"), 10.0);
   STEM_LENGTH_DEMERIT_FACTOR = get_detail (details, ly_symbol2scm ("stem-length-demerit-factor"), 5);
   REGION_SIZE = get_detail (details, ly_symbol2scm ("region-size"), 2);
index 83d82e3ccabb91e0725d06ef5053f92f184a2f80..e803b806c89fa974eddbf81769325f2dff63795b 100644 (file)
@@ -1555,7 +1555,41 @@ ADD_INTERFACE (Beam,
               "The @code{thickness} property is the weight of beams,"
               " measured in staffspace.  The @code{direction} property is"
               " not user-serviceable.  Use the @code{direction} property"
-              " of @code{Stem} instead.",
+              " of @code{Stem} instead.\n"
+               "\n"
+               "The following properties may be set in the @code{details}"
+               " list.\n"
+               "\n"
+               "@table @code\n"
+               "@item stem-length-demerit-factor\n"
+               "Demerit factor used for inappropriate stem lengths.\n"
+               "@item secondary-beam-demerit\n"
+               "Demerit used in quanting calculations for multiple"
+               " beams.\n"
+               "@item region-size\n"
+               "Size of region for checking quant scores.\n"
+               "@item beam-eps\n"
+               "Epsilon for beam quant code to check for presence"
+               " in gap.\n"
+               "@item stem-length-limit-penalty\n"
+               "Penalty for differences in stem lengths on a beam.\n"
+               "@item damping-direction-penalty\n"
+               "Demerit penalty applied when beam direction is different"
+               " from damping direction.\n"
+               "@item hint-direction-penalty\n"
+               "Demerit penalty applied when beam direction is different"
+               " from damping direction, but damping slope is"
+               " <= @code{round-to-zero-slope}.\n"
+               "@item musical-direction-factor\n"
+               "Demerit scaling factor for difference between"
+               " beam slope and music slope.\n"
+               "@item ideal-slope-factor\n"
+               "Demerit scaling factor for difference between"
+               " beam slope and damping slope.\n"
+               "@item round-to-zero-slope\n"
+               "Damping slope which is considered zero for purposes of"
+               " calculating direction penalties.\n"
+               "@end table\n",
               
               /* properties */
               "annotation "
index 75dfc5a8c000954fa70d7e9f97192a0f922cde62..251e65bb99461063cbb0ebb74604454d6635d703 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  beaming-info.cc -- implement Beam_rhythmic_element, Beaming_pattern
+  beaming-pattern.cc -- implement Beam_rhythmic_element, Beaming_pattern
 
   A Beaming_pattern object takes a set of stems at given moments and calculates
   the pattern of their beam. That is, it works out, for each stem, how many
@@ -246,7 +246,7 @@ Beaming_options::from_context (Context *context)
   grouping_ = context->get_property ("beatGrouping");
   subdivide_beams_ = to_boolean (context->get_property ("subdivideBeams"));
   beat_length_ = robust_scm2moment (context->get_property ("beatLength"), Moment (1, 4));
-  measure_length_ = robust_scm2moment (context->get_property ("measureLength"), Moment (1, 4));
+  measure_length_ = robust_scm2moment (context->get_property ("measureLength"), Moment (4, 4));
 }
 
 Beaming_options::Beaming_options ()
index 8b5766387e0de808afe9c81d567c5cd9dfc16844..e0a21527b0510fa66a463a68300496d7ef78a678 100644 (file)
@@ -88,6 +88,8 @@ LY_DEFINE (ly_error, "ly:error",
           "  The error is formatted with @code{format} and @var{rest}.")
 {
   LY_ASSERT_TYPE (scm_is_string, str, 1);
+  if (scm_is_pair(scm_car(rest)))
+    rest=scm_car(rest);
   str = scm_simple_format (SCM_BOOL_F, str, rest);
   error (ly_scm2string (str));
   return SCM_UNSPECIFIED;
index 89a11a263b8cc326b6fb180d33efdd9cbcf1e337..3abccea544df70a15b210f65550f928685914796 100644 (file)
@@ -20,7 +20,6 @@
 */
 struct Beam_quant_parameters
 {
-  Real INTER_QUANT_PENALTY;
   Real SECONDARY_BEAM_DEMERIT;
   Real STEM_LENGTH_DEMERIT_FACTOR;
   Real REGION_SIZE;
index b6838215f5c421c80936fec689a23fa93f660c5c..63b6be6b1103447ae02772b3090e9f90d5839c37 100644 (file)
@@ -169,7 +169,7 @@ Midi_time_signature::to_string () const
 Midi_note::Midi_note (Audio_note *a)
 {
   audio_ = a;
-  dynamic_byte_ = 0x7f;
+  dynamic_byte_ = 0x5a;
 }
 
 
@@ -225,17 +225,14 @@ Midi_note_off::Midi_note_off (Midi_note *n)
   on_ = n;
   channel_ = n->channel_;
 
-  // Anybody who hears any difference, or knows how this works?
-  //  0 should definitely be avoided, notes stick on some sound cards.
-  // 64 is supposed to be neutral
-
-  aftertouch_byte_ = 64;
+  // use note_on with velocity=0 instead of note_off
+  aftertouch_byte_ = 0;
 }
 
 string
 Midi_note_off::to_string () const
 {
-  Byte status_byte = (char) (0x80 + channel_);
+  Byte status_byte = (char) (0x90 + channel_);
 
   string str = ::to_string ((char)status_byte);
   str += ::to_string ((char) (get_semitone_pitch () + Midi_note::c0_pitch_));
index 513a2ae6050d558709f37b180f1330fa6a73d5bf..94554b790bf1eb90648e17a217bf128f69dc2d3b 100644 (file)
@@ -49,8 +49,7 @@ Trill_spanner_engraver::Trill_spanner_engraver ()
   finished_ = 0;
   current_event_ = 0;
   span_ = 0;
-  event_drul_[START] = 0;
-  event_drul_[STOP] = 0;
+  event_drul_.set (0, 0);
 }
 
 IMPLEMENT_TRANSLATOR_LISTENER (Trill_spanner_engraver, trill_span);
@@ -64,45 +63,43 @@ Trill_spanner_engraver::listen_trill_span (Stream_event *ev)
 void
 Trill_spanner_engraver::acknowledge_note_column (Grob_info info)
 {
-  if (span_) {
-    Pointer_group_interface::add_grob (span_,
-                                      ly_symbol2scm ("note-columns"),
-                                      info.grob());
-    add_bound_item (span_, info.grob ());
-  } else if (finished_) {
-    Pointer_group_interface::add_grob (finished_, ly_symbol2scm ("note-columns"),
-                                      info.grob());
-    add_bound_item (finished_, info.grob ());
-  }
+  if (span_)
+    {
+      Pointer_group_interface::add_grob (span_,
+                                        ly_symbol2scm ("note-columns"),
+                                        info.grob());
+      if (!span_->get_bound (LEFT))
+       add_bound_item (span_, info.grob ());
+    }
+  else if (finished_)
+    {
+      Pointer_group_interface::add_grob (finished_, ly_symbol2scm ("note-columns"),
+                                        info.grob());
+      if (!finished_->get_bound (RIGHT))
+       add_bound_item (finished_, info.grob ());
+    }
 }
 
 void
 Trill_spanner_engraver::process_music ()
 {
-  if (event_drul_[STOP])
+  if (span_
+      && (event_drul_[STOP] || event_drul_[START]))
     {
-      if (!span_)
-       event_drul_[STOP]->origin ()->warning (_ ("cannot find start of trill spanner"));
-      else
-       {
-         finished_ = span_;
-         announce_end_grob (finished_, SCM_EOL);
-         span_ = 0;
-         current_event_ = 0;
-       }
+      Stream_event *ender = event_drul_[STOP];
+      if (!ender)
+       ender = event_drul_[START];
+      finished_ = span_;
+      announce_end_grob (finished_, ender->self_scm ());
+      span_ = 0;
+      current_event_ = 0;
     }
 
   if (event_drul_[START])
     {
-      if (current_event_)
-       event_drul_[START]->origin ()->warning (_ ("already have a trill spanner"));
-      else
-       {
-         current_event_ = event_drul_[START];
-         span_ = make_spanner ("TrillSpanner", event_drul_[START]->self_scm ());
-         Side_position_interface::set_axis (span_, Y_AXIS);
-         event_drul_[START] = 0;
-       }
+      current_event_ = event_drul_[START];
+      span_ = make_spanner ("TrillSpanner", event_drul_[START]->self_scm ());
+      Side_position_interface::set_axis (span_, Y_AXIS);
     }
 }
 
@@ -130,8 +127,7 @@ Trill_spanner_engraver::stop_translation_timestep ()
     }
 
   typeset_all ();
-  event_drul_[START] = 0;
-  event_drul_[STOP] = 0;
+  event_drul_.set (0, 0);
 }
 
 void
@@ -140,8 +136,8 @@ Trill_spanner_engraver::finalize ()
   typeset_all ();
   if (span_)
     {
-      finished_ = span_;
-      typeset_all ();
+      Grob *e = unsmob_grob (get_property ("currentCommandColumn"));
+      span_->set_bound (RIGHT, e);
     }
 }
 
@@ -155,7 +151,8 @@ ADD_TRANSLATOR (Trill_spanner_engraver,
                "TrillSpanner ",
 
                /* read */
-               "",
+               "currentCommandColumn "
+               "currentMusicalColumn ",
 
                /* write */
                ""
index cb57e6b7a0ceff5276f47cca288a7ff466412d0f..4e33ce43826461da048de62236e9b633cb19f012 100644 (file)
@@ -130,7 +130,6 @@ $Texi2HTML::Config::print_page_head      = \&lilypond_print_page_head;
 $Texi2HTML::Config::foot_line_and_ref  = \&makeinfo_like_foot_line_and_ref;
 $Texi2HTML::Config::foot_lines         = \&makeinfo_like_foot_lines;
 $Texi2HTML::Config::paragraph          = \&makeinfo_like_paragraph;
-$Texi2HTML::Config::init_out             = \&lilypond_init_out;
 
 
 
@@ -313,7 +312,7 @@ my $node_to_filename_map = ();
 # according to node titles, which works by simply overriding the id element of
 # the $element hash.
 # If an external nodename<=>filename/anchor map file is found (loaded in
-# lilypond_init_out, use the externally created values, otherwise use the
+# the command handler, use the externally created values, otherwise use the
 # same logic here.
 sub lilypond_element_file_name($$$)
 {
@@ -573,17 +572,10 @@ sub lilypond_init_toc_depth ()
     $page_toc_depth = 1;
   }
 }
-# We can't use a command-handler, because texinfo variables are not yet 
-# available at that stage:
-# push @Texi2HTML::Config::command_handler_init, \&lilypond_init_toc_depth;
+# Set the TOC-depth (depending on a texinfo variable short_toc) in a 
+# command-handler, so we have them available when creating the pages
+push @Texi2HTML::Config::command_handler_process, \&lilypond_init_toc_depth;
 
-# Initialize the toc_depth to 1 if the command-line option -D=short_toc is given
-sub lilypond_init_out()
-{
-  my $rval = t2h_default_init_out();
-  lilypond_init_toc_depth ();
-  return $rval;
-}
 
 # recursively generate the TOC entries for the element and its children (which
 # are only shown up to maxlevel. All ancestors of the current element are also
@@ -729,9 +721,6 @@ sub lilypond_print_element_header
 sub lilypond_toc_body($)
 {
     my $elements_list = shift;
-    # Workaround: Initialize the toc-depth here, because init_out is called
-    # only later in texi2html 1.83
-    lilypond_init_toc_depth ();
     # Generate a default TOC for pages without THIS_ELEMENT
     @default_toc = lilypond_generate_page_toc_body(@$elements_list[0]);
     return T2H_GPL_toc_body($elements_list);
index 45ade153967a1b2aacc6c30557c537e2a7295299..72479a952f27d98de986e7ab573aaf87d40630c8 100644 (file)
@@ -2573,6 +2573,12 @@ def conv (str):
     return re.sub ('ly:clone-parser',
                    'ly:parser-clone', str)
 
+@rule ((2, 11, 3), "no-spacing-rods -> extra-spacing-width")
+def conv (str):
+    str = re.sub (r"no-spacing-rods\s+=\s+##t", r"extra-spacing-width = #'(+inf.0 . -inf.0)", str)
+    str = re.sub (r"no-spacing-rods\s+=\s+##f", r"extra-spacing-width = #'(0 . 0)", str)
+    return str
+
 
 @rule ((2, 11, 5), _ ("deprecate cautionary-style. Use AccidentalCautionary properties"))
 def conv (str):
index 0e8b212c85360c7ffb309e51244eb37db5867720..61598f28e51e7c58258cc5532c163ce84e45bcb3 100644 (file)
@@ -1707,6 +1707,14 @@ class MultiMeasureRest(Music):
         return 'R%s' % self.duration.ly_expression ()
 
 
+class Break (Music):
+    def __init__ (self, tp="break"):
+        Music.__init__ (self)
+        self.type = tp
+    def print_ly (self, printer):
+        if self.type:
+            printer.dump ("\\%s" % self.type)
+
 class StaffGroup:
     def __init__ (self, command = "StaffGroup"):
         self.stafftype = command
index b6a5bbeac87fde3fbef733ffde49c03d318a722a..db53bc49106fa5217d4cec879849c91737672079 100644 (file)
@@ -828,7 +828,7 @@ class Part (Music_xml_node):
            if not (isinstance (n, Note) or isinstance (n, Attributes) or
                     isinstance (n, Direction) or isinstance (n, Partial) or
                     isinstance (n, Barline) or isinstance (n, Harmony) or
-                    isinstance (n, FiguredBass) ):
+                    isinstance (n, FiguredBass) or isinstance (n, Print)):
                continue
 
            if isinstance (n, Attributes) and not start_attr:
@@ -844,7 +844,7 @@ class Part (Music_xml_node):
                             voices[v].add_element (staff_attributes)
                 continue
 
-            if isinstance (n, Partial) or isinstance (n, Barline):
+            if isinstance (n, Partial) or isinstance (n, Barline) or isinstance (n, Print):
                 for v in voices.keys ():
                     voices[v].add_element (n)
                 continue
@@ -1147,6 +1147,9 @@ class BeatUnitDot (Music_xml_node):
 class PerMinute (Music_xml_node):
     pass
 
+class Print (Music_xml_node):
+    pass
+
 
 
 ## need this, not all classes are instantiated
@@ -1197,6 +1200,7 @@ class_dict = {
         'pedal': Pedal,
         'per-minute': PerMinute,
        'pitch': Pitch,
+        'print': Print,
        'rest': Rest,
         'root': Root,
         'score-part': Score_part,
index 7e276078368810a5bf627623cd92ec2e4fc411eb..38e7d93d30ef77324be861549c506e81056913cf 100644 (file)
@@ -178,6 +178,10 @@ this should list the control points of a third-order B@'ezier curve.")
 whitespace.  If negative, no line is drawn at all.")
      (default-direction ,ly:dir? "Direction determined by note head
 positions.")
+     (details ,list? "Alist of parameters for detailed grob behavior.
+More information on the allowed parameters for a grob can be found by 
+looking at the top of the Internals Reference page for each interface
+having a @code{details} property.")
      (digit-names ,vector "Names for string finger digits.")
      (direction ,ly:dir? "If @code{side-axis} is @code{0} (or
 @code{#X}), then this property determines whether the object is placed
@@ -938,14 +942,8 @@ chord changes.")
 
      (cause ,scheme? "Any kind of causation objects (i.e., music, or perhaps
 translator) that was the cause for this grob.")
-     (delta-position ,number? "The vertical position difference.")
-     (details ,list? "Alist of parameters for detailed grob behavior.
 
-More information on the allowed parameters can be found by inspecting
-@file{lily/slur-scoring.cc}, @file{lily/beam-quanting.cc}, and
-@file{lily/tie-formatting-problem.cc}.  Setting @code{debug-tie-scoring},
-@code{debug-beam-scoring} or @code{debug-slur-scoring} also provides
-useful clues.")
+     (delta-position ,number? "The vertical position difference.")
 
      (font ,ly:font-metric? "A cached font metric object.")
 
index dae6bdc8a870258a5314efc1253b8895d20d4dfb..97f36809b893f296b2c06bf05c0eb0890e5e163a 100644 (file)
        (stencil . ,ly:beam::print)
        (clip-edges . #t)
        (cross-staff . ,ly:beam::calc-cross-staff)
-
-       (details .  ((hint-direction-penalty . 20)))
+       (details 
+         .(
+           (secondary-beam-demerit . 10)
+           (stem-length-demerit-factor . 5)
+           (region-size . 2)
+           (beam-eps . 0.001)
+           (stem-length-limit-penalty . 5000)
+           (damping-direction-penalty . 800)
+           (hint-direction-penalty . 20)
+           (musical-direction-factor . 400)
+           (ideal-slope-factor . 10)
+           (round-to-zero-slope . 0.02)))
        ;; TODO: should be in SLT.
        (thickness . 0.48) ; in staff-space
        (neutral-direction . ,DOWN)
index 0bf9d6bda717f42ca4ca07c32c3679599836b516..a37c490aa9880facbe4b49ac787a4bd0a2a296b1 100644 (file)
@@ -8,7 +8,7 @@
 ;  Utility functions
 ;
 ;
-    
+
 (define (string-x-extent start-point end-point)
   "Return the x-extent of a string that goes from start-point
 to end-point."
@@ -67,48 +67,6 @@ to end-point."
                          (third this-list)))
                (subtract-base-fret base-fret (cdr dot-list))))))
 
-(define (make-bezier-sandwich-list start stop base height 
-         half-thickness orientation)
-  "Make the argument list for a bezier sandwich from
-string coordinate @var{start} to string-coordinate @var{stop} with a 
-baseline at fret coordinate @var{base}, a height of
-@var{height}, and a half thickness of @var{half-thickness}."
-  (let* ((width (+ (- stop start) 1))
-         (cp-left-width (+ (* width half-thickness) start))
-         (cp-right-width (- stop (* width half-thickness)))
-         (bottom-control-point-height 
-           (- base (- height half-thickness)))
-         (top-control-point-height
-           (- base height))
-         (left-end-point 
-          (stencil-coordinates base start orientation))
-         (right-end-point
-          (stencil-coordinates base stop orientation))
-         (left-upper-control-point
-          (stencil-coordinates 
-            top-control-point-height cp-left-width orientation))
-         (left-lower-control-point
-          (stencil-coordinates 
-            bottom-control-point-height cp-left-width orientation))
-         (right-upper-control-point
-          (stencil-coordinates 
-            top-control-point-height cp-right-width orientation))
-         (right-lower-control-point
-          (stencil-coordinates 
-            bottom-control-point-height cp-right-width orientation)))
-    ; order of bezier control points is:
-    ;    left cp low, right cp low, right end low, left end low
-    ;    right cp high, left cp high, left end high, right end high.
-    ;
-   (list left-lower-control-point
-         right-lower-control-point
-         right-end-point
-         left-end-point
-         right-upper-control-point
-         left-upper-control-point
-         left-end-point
-         right-end-point)))
-
 (define (drop-paren item-list)
   "Drop a final parentheses from a fret indication list
 @code{item-list} resulting from a terse string specification of barre."
@@ -154,7 +112,7 @@ found."
 ;
 ;  Conversions between fret/string coordinate system and x-y coordinate
 ;  system.
-;  
+;
 ;  Fret coordinates are measured down the fretboard from the nut,
 ;   starting at 0.
 ;
@@ -171,7 +129,7 @@ found."
    (cons (- (cdr extent)) (- (car extent))))
 
 (define (stencil-fretboard-extent stencil fretboard-axis orientation)
-  "Return the extent of @code{stencil} in the @code{fretboard-axis} 
+  "Return the extent of @code{stencil} in the @code{fretboard-axis}
 direction."
   (if (eq? fretboard-axis 'fret)
   (cond ((eq? orientation 'landscape)
@@ -192,23 +150,13 @@ direction."
 (define (stencil-fretboard-offset stencil fretboard-axis orientation)
  "Return a the stencil coordinates of the center of @code{stencil}
 in the @code{fretboard-axis} direction."
-  (* 0.5 (interval-length 
+  (* 0.5 (interval-length
            (stencil-fretboard-extent stencil fretboard-axis orientation))))
 
-(define (stencil-coordinates fret-coordinate string-coordinate orientation)
- "Return a pair @code{(x-coordinate . y-coordinate)} in stencil coordinate 
-system."
-  (cond
-   ((eq? orientation 'landscape)
-    (cons fret-coordinate string-coordinate))
-   ((eq? orientation 'opposing-landscape)
-    (cons (- fret-coordinate) (- string-coordinate)))
-   (else
-    (cons string-coordinate (- fret-coordinate)))))
+
 (define (string-thickness string thickness-factor)
   (expt (1+ thickness-factor) (1- string)))
-  
+
 ;
 ;  Functions that create stencils used in the fret diagram
 ;
@@ -222,404 +170,6 @@ with magnification @var{mag} of the string @var{text}."
            (prepend-alist-chain 'font-family 'sans props))))
     (interpret-markup layout my-props text)))
 
-
-(define (string-stencil string string-count fret-range
-                        th thickness-factor size orientation)
- "Make a stencil for @code{string}, given the fret-diagram
-overall parameters."
-  (let* ((string-coordinate (- string-count string))
-         (current-string-thickness 
-           (* th size (string-thickness string thickness-factor)))
-         (fret-half-thickness (* size th 0.5))
-         (half-string (* current-string-thickness 0.5))
-         (start-coordinates
-           (stencil-coordinates
-             (- fret-half-thickness)
-             (- (* size string-coordinate) half-string)
-             orientation))
-         (end-coordinates
-           (stencil-coordinates
-            (+ fret-half-thickness (* size (1+ (fret-count fret-range))))
-            (+ half-string (* size string-coordinate))
-            orientation)))
-   (ly:round-filled-box (string-x-extent start-coordinates end-coordinates)
-                        (string-y-extent start-coordinates end-coordinates)
-                        (* th size))))
-   
-(define (fret-stencil fret string-count th 
-                      thickness-factor size orientation)
- "Make a stencil for @code{fret}, given the fret-diagram overall parameters."
- (let* ((low-string-half-thickness 
-          (* 0.5 size th (string-thickness string-count thickness-factor)))
-        (fret-half-thickness (* 0.5 size th)) 
-        (start-coordinates 
-         (stencil-coordinates
-           (* size fret)
-           (- fret-half-thickness low-string-half-thickness)
-           orientation))
-        (end-coordinates
-         (stencil-coordinates
-          (* size fret)
-          (* size (1- string-count))
-          orientation)))
-  (make-line-stencil
-   (* size th)
-   (car start-coordinates) (cdr start-coordinates)
-   (car end-coordinates) (cdr end-coordinates))))
-
-(define (make-straight-barre-stencil 
-          size half-thickness fret-coordinate
-          start-string-coordinate end-string-coordinate orientation)
-  "Create a straight barre stencil."
-  (let ((start-point 
-         (stencil-coordinates
-          (* size fret-coordinate)
-          (* size start-string-coordinate)
-          orientation))
-        (end-point
-         (stencil-coordinates
-          (* size fret-coordinate)
-          (* size end-string-coordinate)
-          orientation)))
-   (make-line-stencil
-     half-thickness
-     (car start-point)
-     (cdr start-point)
-     (car end-point)
-     (cdr end-point))))
-
-(define (make-curved-barre-stencil 
-          size half-thickness fret-coordinate
-          start-string-coordinate end-string-coordinate orientation)
-  "Create a curved barre stencil."
-  (let* ((bezier-thick 0.1)
-         (bezier-height 0.5)
-         (bezier-list 
-           (make-bezier-sandwich-list
-            (* size start-string-coordinate)
-            (* size end-string-coordinate)
-            (* size fret-coordinate)
-            (* size bezier-height)
-            (* size bezier-thick)
-            orientation))
-         (box-lower-left
-          (stencil-coordinates 
-           (+ (* size fret-coordinate) half-thickness)
-           (- (* size start-string-coordinate) half-thickness)
-           orientation))
-         (box-upper-right
-          (stencil-coordinates
-           (- (* size fret-coordinate) (* size bezier-height) half-thickness)
-           (+ (* size end-string-coordinate) half-thickness)
-           orientation))
-         (x-extent (cons (car box-lower-left) (car box-upper-right)))
-         (y-extent (cons (cdr box-lower-left) (cdr box-upper-right))))
-    (ly:make-stencil
-      (list 'bezier-sandwich
-            `(quote ,bezier-list)
-            (* size bezier-thick))
-      x-extent
-      y-extent)))
-
-
-;
-;
-;  Functions used to draw fret-diagram elements
-;
-;
-
-(define (draw-strings string-count fret-range th 
-                      thickness-factor size orientation)
-  "Draw the string lines for a fret diagram with
-@var{string-count} strings and frets as indicated in @var{fret-range}.
-Line thickness is given by @var{th}, fret & string spacing by
-@var{size}.  Orientation is determined by @var{orientation}. "
-
-  (define (helper x)
-     (if (null? (cdr x))
-         (string-stencil 
-          (car x) string-count fret-range th
-          thickness-factor size orientation)
-         (ly:stencil-add 
-           (string-stencil 
-            (car x) string-count fret-range th
-            thickness-factor size orientation)
-           (helper (cdr x)))))
-
-  (let* ( (string-list (map 1+ (iota string-count))))
-   (helper string-list)))
-
-(define (draw-fret-lines fret-count string-count th 
-                         thickness-factor size orientation)
-  "Draw @var{fret-count} fret lines for a fret diagram
-with @var{string-count} strings.  Line thickness is given by @var{th},
-fret & string spacing by @var{size}. Orientation is given by @var{orientation}"
-  (define (helper x)
-     (if (null? (cdr x))
-         (fret-stencil 
-          (car x) string-count th thickness-factor
-           size orientation)
-         (ly:stencil-add 
-           (fret-stencil 
-            (car x) string-count th thickness-factor
-            size orientation)
-           (helper (cdr x)))))
-
-  (let* ( (fret-list (iota (1+ fret-count))))
-   (helper fret-list)))
-
-(define (draw-thick-zero-fret details string-count th 
-                              thickness-factor size orientation)
-  "Draw a thick zeroth fret for a fret diagram whose base fret is 1."
-  (let* ((sth (* th size))
-         (half-lowest-string-thickness 
-           (* 0.5 th (string-thickness string-count thickness-factor))) 
-         (half-thick (* 0.5 sth))
-         (top-fret-thick
-           (* sth (assoc-get 'top-fret-thickness details 3.0)))
-         (start-string-coordinate (- half-lowest-string-thickness))
-         (end-string-coordinate (+ (* size (1- string-count)) half-thick))
-         (start-fret-coordinate half-thick)
-         (end-fret-coordinate (- half-thick top-fret-thick))
-         (lower-left 
-          (stencil-coordinates 
-            start-fret-coordinate start-string-coordinate orientation))
-         (upper-right 
-          (stencil-coordinates 
-            end-fret-coordinate end-string-coordinate orientation)))
-   (ly:round-filled-box 
-     (cons (car lower-left) (car upper-right))
-     (cons (cdr lower-left) (cdr upper-right))
-     sth)))
-  
-
-(define (draw-capo details string-count fret fret-count th size 
-                   dot-pos orientation)
-  "Draw a capo indicator across the full width of the fret-board
-at @var{fret}."
-(let* ((capo-thick
-         (* size (assoc-get 'capo-thickness details 0.5)))
-       (half-thick (* capo-thick 0.5))
-       (last-string-pos 0)
-       (first-string-pos (* size (- string-count 1)))
-       (fret-pos ( * size (1- (+ dot-pos fret))))
-       (start-point 
-         (stencil-coordinates fret-pos first-string-pos orientation))
-       (end-point 
-         (stencil-coordinates fret-pos last-string-pos orientation)))
-  (make-line-stencil
-     capo-thick 
-     (car start-point) (cdr start-point)
-     (car end-point) (cdr end-point))))
-
-(define (draw-frets fret-range string-count th 
-                    thickness-factor size orientation)
-  "Draw the fret lines for a fret diagram with
-@var{string-count} strings and frets as indicated in @var{fret-range}.
-Line thickness is given by @var{th}, fret & string spacing by
-@var{size}. Orientation is given by @var{orientation}."
-  (let* ((my-fret-count (fret-count fret-range)))
-   (draw-fret-lines 
-     my-fret-count string-count th thickness-factor size orientation)))
-
-(define (draw-dots layout props string-count fret-count
-                   size finger-code
-                   dot-position dot-radius dot-thickness dot-list orientation)
-  "Make dots for fret diagram."
-
-  (let* ((details (merge-details 'fret-diagram-details props '()))
-         (scale-dot-radius (* size dot-radius))
-         (scale-dot-thick (* size dot-thickness))
-         (dot-color (assoc-get 'dot-color details 'black))
-         (finger-label-padding 0.3)
-         (dot-label-font-mag
-           (* scale-dot-radius (assoc-get 'dot-label-font-mag details 1.0)))
-         (string-label-font-mag
-           (* size 
-             (assoc-get 'string-label-font-mag details 
-                        (cond ((or (eq? orientation 'landscape)
-                                   (eq? orientation 'opposing-landscape))
-                               0.5)
-                              (else  0.6)))))
-         (mypair (car dot-list))
-         (restlist (cdr dot-list))
-         (string (car mypair))
-         (fret (cadr mypair))
-         (fret-coordinate (* size (+ (1- fret) dot-position)))
-         (string-coordinate (* size (- string-count string)))
-         (dot-coordinates 
-          (stencil-coordinates fret-coordinate string-coordinate orientation))
-         (extent (cons (- scale-dot-radius) scale-dot-radius))
-         (finger (caddr mypair))
-         (finger (if (number? finger) (number->string finger) finger))
-         (dot-stencil (if (eq? dot-color 'white)
-                       (ly:stencil-add
-                         (make-circle-stencil
-                           scale-dot-radius scale-dot-thick #t)
-                         (ly:stencil-in-color
-                           (make-circle-stencil
-                             (- scale-dot-radius (* 0.5 scale-dot-thick))
-                             0  #t)
-                           1 1 1))
-                       (make-circle-stencil
-                         scale-dot-radius scale-dot-thick #t)))
-         (positioned-dot (ly:stencil-translate dot-stencil dot-coordinates))
-         (labeled-dot-stencil 
-           (cond 
-             ((or (eq? finger '())(eq? finger-code 'none))
-              positioned-dot)
-             ((eq? finger-code 'in-dot)
-              (let ((finger-label 
-                     (centered-stencil
-                       (sans-serif-stencil
-                         layout props dot-label-font-mag finger))))
-              (ly:stencil-translate
-                (ly:stencil-add
-                  dot-stencil
-                  (if (eq? dot-color 'white)
-                      finger-label
-                      (ly:stencil-in-color finger-label 1 1 1)))
-                dot-coordinates)))
-             ((eq? finger-code 'below-string)
-              (let* ((label-stencil 
-                       (centered-stencil 
-                         (sans-serif-stencil
-                           layout props string-label-font-mag
-                           finger)))
-                     (label-fret-offset
-                       (stencil-fretboard-offset 
-                         label-stencil 'fret orientation))
-                     (label-fret-coordinate 
-                       (+ (* size (+ 1 fret-count finger-label-padding))
-                          label-fret-offset))
-                     (label-string-coordinate string-coordinate)
-                     (label-translation 
-                       (stencil-coordinates 
-                         label-fret-coordinate
-                         label-string-coordinate
-                         orientation)))
-                (ly:stencil-add
-                  positioned-dot
-                  (ly:stencil-translate label-stencil label-translation))))
-             (else ;unknown finger-code
-               positioned-dot))))
-    (if (null? restlist)
-      labeled-dot-stencil
-      (ly:stencil-add
-        (draw-dots
-          layout props string-count fret-count size finger-code
-          dot-position dot-radius dot-thickness restlist orientation)
-        labeled-dot-stencil))))
-
-(define (draw-xo 
-          layout props string-count fret-range size xo-list orientation)
-  "Put open and mute string indications on diagram, as contained in
-@var{xo-list}."
-  (let* ((details (merge-details 'fret-diagram-details props '()))
-         (xo-font-mag
-           (* size (assoc-get 
-                    'xo-font-magnification details 
-                    (cond ((or (eq? orientation 'landscape)
-                            (eq? orientation 'opposing-landscape))
-                           0.4)
-                     (else 0.4)))))
-         (mypair (car xo-list))
-         (restlist (cdr xo-list))
-         (glyph-string (if (eq? (car mypair) 'mute)
-                         (assoc-get 'mute-string details "X")
-                         (assoc-get 'open-string details "O")))
-         (glyph-string-coordinate (* (- string-count (cadr mypair)) size))
-         (glyph-stencil 
-           (centered-stencil
-             (sans-serif-stencil 
-               layout props (* size xo-font-mag) glyph-string)))
-         (glyph-stencil-coordinates 
-           (stencil-coordinates 0 glyph-string-coordinate orientation))
-         (positioned-glyph
-           (ly:stencil-translate glyph-stencil glyph-stencil-coordinates)))
-    (if (null? restlist)
-        positioned-glyph
-        (ly:stencil-add
-         (draw-xo
-          layout props string-count fret-range size restlist orientation)
-         positioned-glyph))))
-
-(define (draw-barre layout props string-count fret-range
-                    size finger-code dot-position dot-radius
-                    barre-list orientation)
-  "Create barre indications for a fret diagram"
-  (if (not (null? barre-list))
-    (let* ((details (merge-details 'fret-diagram-details props '()))
-           (string1 (caar barre-list))
-           (string2 (cadar barre-list))
-           (barre-fret (caddar barre-list))
-           (top-fret (cdr fret-range))
-           (low-fret (car fret-range))
-           (fret (1+ (- barre-fret low-fret)))
-           (barre-vertical-offset 0.5)
-           (dot-center-fret-coordinate (+ (1- fret) dot-position))
-           (barre-fret-coordinate
-             (+ dot-center-fret-coordinate
-                (* (- barre-vertical-offset 0.5) dot-radius)))
-           (barre-start-string-coordinate (- string-count string1))
-           (barre-end-string-coordinate (- string-count string2))
-           (scale-dot-radius (* size dot-radius))
-           (barre-type (assoc-get 'barre-type details 'curved))
-           (barre-stencil
-             (cond 
-               ((eq? barre-type 'straight)
-                (make-straight-barre-stencil 
-                  size scale-dot-radius 
-                  barre-fret-coordinate barre-start-string-coordinate
-                  barre-end-string-coordinate orientation))
-               ((eq? barre-type 'curved)
-                (make-curved-barre-stencil 
-                  size scale-dot-radius
-                  barre-fret-coordinate barre-start-string-coordinate
-                  barre-end-string-coordinate orientation)))))
-      (if (not (null? (cdr barre-list)))
-        (ly:stencil-add
-          barre-stencil
-          (draw-barre layout props string-count fret-range size finger-code
-                      dot-position dot-radius (cdr barre-list) orientation))
-        barre-stencil ))))
-
-(define (label-fret layout props string-count fret-range size orientation)
-  "Label the base fret on a fret diagram"
-  (let* ((details (merge-details 'fret-diagram-details props '()))
-         (base-fret (car fret-range))
-         (label-font-mag (assoc-get 'fret-label-font-mag details 0.5))
-         (label-space (* 0.5 size))
-         (label-dir (assoc-get 'label-dir details RIGHT))
-         (label-vertical-offset
-           (assoc-get 'fret-label-vertical-offset details 0))
-         (number-type
-           (assoc-get 'number-type details 'roman-lower))
-         (label-text
-           (cond
-             ((equal? number-type 'roman-lower)
-              (fancy-format #f "~(~@r~)" base-fret))
-             ((equal? number-type 'roman-upper)
-              (fancy-format #f "~@r" base-fret))
-             ((equal? 'arabic number-type)
-              (fancy-format #f "~d" base-fret))
-             (else (fancy-format #f "~(~@r~)" base-fret))))
-         (label-stencil
-           (centered-stencil
-             (sans-serif-stencil 
-               layout props (* size label-font-mag) label-text)))
-         (label-half-width 
-           (stencil-fretboard-offset label-stencil 'string orientation))
-         (label-outside-diagram (+ label-space label-half-width)))
-    (ly:stencil-translate
-      label-stencil
-      (stencil-coordinates 
-        (1+ (* size label-vertical-offset))
-        (if (eq? label-dir LEFT)
-            (- label-outside-diagram)
-            (+ (* size (1- string-count)) label-outside-diagram))
-        orientation))))
-
 ;;
 ;;
 ;;  markup commands and associated functions
@@ -649,7 +199,7 @@ Line thickness is given by @var{th}, fret & string spacing by
               (set! dot-list (cons* (cdr my-item) dot-list))))
             (parse-item (cdr mylist)))))
     ;; calculate fret-range
-    (let ((maxfret 0) 
+    (let ((maxfret 0)
           (minfret (if (> capo-fret 0) capo-fret 99)))
       (let updatemax ((fret-list dot-list))  ;CHANGE THIS TO HELPER FUNCTION?
         (if (null? fret-list)
@@ -669,7 +219,7 @@ Line thickness is given by @var{th}, fret & string spacing by
     (acons 'fret-range fret-range
            (acons 'barre-list barre-list
                   (acons 'dot-list dot-list
-                         (acons 'xo-list xo-list 
+                         (acons 'xo-list xo-list
                                 (acons 'capo-fret capo-fret '())))))))
 
 (define (make-fret-diagram layout props marking-list)
@@ -680,41 +230,42 @@ Line thickness is given by @var{th}, fret & string spacing by
          ; called from this routine.  If they're only used in one of the
          ; sub-procedure, they're obtained in that procedure
          (size (chain-assoc-get 'size props 1.0)) ; needed for everything
-;TODO -- get string-count directly from length of stringTunings;
-;         from FretBoard engraver, but not from markup call
+         ;TODO -- get string-count directly from length of stringTunings;
+         ;         from FretBoard engraver, but not from markup call
          (details (merge-details 'fret-diagram-details props '()))
          (string-count
-          (assoc-get 'string-count details 6)) ; needed for everything
+           (assoc-get 'string-count details 6)) ; needed for everything
          (my-fret-count
-          (assoc-get 'fret-count details 4)) ; needed for everything
+           (assoc-get 'fret-count details 4)) ; needed for everything
          (orientation
-          (assoc-get 'orientation details 'normal)) ; needed for everything
+           (assoc-get 'orientation details 'normal)) ; needed for everything
          (finger-code
-          (assoc-get
-           'finger-code details 'none)) ; needed for draw-dots and draw-barre
+           (assoc-get
+             'finger-code details 'none)) ; needed for draw-dots and draw-barre
          (default-dot-radius
            (if (eq? finger-code 'in-dot) 0.425 0.25)) ; bigger dots if labeled
          (default-dot-position
            (if (eq? finger-code 'in-dot)
                (- 0.95 default-dot-radius)
-               0.6)) ; move up to make room for bigger if labeled
+               0.6)) ; move up to make room for bigger dot if labeled
          (dot-radius
-          (assoc-get
-           'dot-radius details default-dot-radius))  ; needed for draw-dots
-                                                     ; and draw-barre
+           (assoc-get
+             'dot-radius details default-dot-radius))  ; needed for draw-dots
+                                                       ; and draw-barre
          (dot-position
-          (assoc-get
-           'dot-position details default-dot-position)) ; needed for draw-dots
-                                                        ; and draw-barre
+           (assoc-get
+             'dot-position details default-dot-position)) ; needed for 
+                                                    ; draw-dots and draw-barre
          (th
-          (* (ly:output-def-lookup layout 'line-thickness)
-             (chain-assoc-get 'thickness props 0.5))) ; needed for draw-frets
-                                                      ; and draw-strings
+           (* (ly:output-def-lookup layout 'line-thickness)
+              (chain-assoc-get 'thickness props 0.5))) ; needed for draw-frets
+                                                       ; and draw-strings
+         (sth (* size th))
          (thickness-factor (assoc-get 'string-thickness-factor details 0))
          (alignment
-          (chain-assoc-get 'align-dir props -0.4)) ; needed only here
+           (chain-assoc-get 'align-dir props -0.4)) ; needed only here
          (xo-padding
-          (* size (assoc-get 'xo-padding details 0.2))) ; needed only here
+           (* size (assoc-get 'xo-padding details 0.2))) ; needed only here
          (parameters (fret-parse-marking-list marking-list my-fret-count))
          (capo-fret (assoc-get 'capo-fret parameters 0))
          (dot-list (cdr (assoc 'dot-list parameters)))
@@ -723,72 +274,489 @@ Line thickness is given by @var{th}, fret & string spacing by
          (my-fret-count (fret-count fret-range))
          (barre-list (cdr (assoc 'barre-list parameters)))
          (barre-type
-          (assoc-get 'barre-type details 'curved))
-         (fret-diagram-stencil
+           (assoc-get 'barre-type details 'curved))
+         (fret-diagram-stencil '()))
+    ;
+    ;;  Here are the fret diagram helper functions that depend on the
+    ;;  fret diagram parameters.  The functions are here because the
+    ;;  diagram parameters are part of the lexical scope here.
+
+    (define (stencil-coordinates fret-coordinate string-coordinate)
+      "Return a pair @code{(x-coordinate . y-coordinate)}
+      in stencil coordinate system."
+      (cond
+        ((eq? orientation 'landscape)
+         (cons fret-coordinate
+               (- string-coordinate (1- string-count))))
+        ((eq? orientation 'opposing-landscape)
+         (cons (- fret-coordinate) (- string-coordinate)))
+        (else
+          (cons string-coordinate (- fret-coordinate)))))
+
+    (define (make-bezier-sandwich-list start stop base height
+                                       half-thickness)
+      "Make the argument list for a bezier sandwich from
+string coordinate @var{start} to string-coordinate @var{stop} with a
+baseline at fret coordinate @var{base}, a height of
+@var{height}, and a half thickness of @var{half-thickness}."
+     (let* ((width (+ (- stop start) 1))
+           (cp-left-width (+ (* width half-thickness) start))
+           (cp-right-width (- stop (* width half-thickness)))
+           (bottom-control-point-height
+             (- base (- height half-thickness)))
+           (top-control-point-height
+             (- base height))
+           (left-end-point
+             (stencil-coordinates base start))
+           (right-end-point
+             (stencil-coordinates base stop))
+           (left-upper-control-point
+             (stencil-coordinates
+               top-control-point-height cp-left-width))
+           (left-lower-control-point
+             (stencil-coordinates
+               bottom-control-point-height cp-left-width))
+           (right-upper-control-point
+             (stencil-coordinates
+               top-control-point-height cp-right-width))
+           (right-lower-control-point
+             (stencil-coordinates
+               bottom-control-point-height cp-right-width)))
+      ; order of bezier control points is:
+      ;    left cp low, right cp low, right end low, left end low
+      ;    right cp high, left cp high, left end high, right end high.
+      ;
+      (list left-lower-control-point
+            right-lower-control-point
+            right-end-point
+            left-end-point
+            right-upper-control-point
+            left-upper-control-point
+            left-end-point
+            right-end-point)))
+
+    (define (draw-strings)
+      "Draw the string lines for a fret diagram with
+@var{string-count} strings and frets as indicated in @var{fret-range}.
+Line thickness is given by @var{th}, fret & string spacing by
+@var{size}.  Orientation is determined by @var{orientation}. "
+
+      (define (helper x)
+        (if (null? (cdr x))
+          (string-stencil (car x))
           (ly:stencil-add
-           (draw-strings 
-             string-count fret-range th thickness-factor size orientation)
-           (draw-frets 
-             fret-range string-count th thickness-factor size orientation))))
+            (string-stencil (car x))
+            (helper (cdr x)))))
+
+      (let* ( (string-list (map 1+ (iota string-count))))
+        (helper string-list)))
+
+    (define (string-stencil string)
+      "Make a stencil for @code{string}, given the fret-diagram
+      overall parameters."
+      (let* ((string-coordinate (- string-count string))
+             (current-string-thickness
+               (* th size (string-thickness string thickness-factor)))
+             (fret-half-thickness (* size th 0.5))
+             (half-string (* current-string-thickness 0.5))
+             (start-coordinates
+               (stencil-coordinates
+                 (- fret-half-thickness)
+                 (- (* size string-coordinate) half-string)))
+             (end-coordinates
+               (stencil-coordinates
+                 (+ fret-half-thickness (* size (1+ (fret-count fret-range))))
+                 (+ half-string (* size string-coordinate)))))
+        (ly:round-filled-box
+         (string-x-extent start-coordinates end-coordinates)
+         (string-y-extent start-coordinates end-coordinates)
+         (* th size))))
+
+    (define (draw-frets)
+      "Draw the fret lines for a fret diagram with
+@var{string-count} strings and frets as indicated in @var{fret-range}.
+Line thickness is given by @var{th}, fret & string spacing by
+@var{size}. Orientation is given by @var{orientation}."
+      (define (helper x)
+        (if (null? (cdr x))
+          (fret-stencil (car x))
+          (ly:stencil-add
+            (fret-stencil (car x))
+            (helper (cdr x)))))
+
+      (let ((fret-list (iota (1+ my-fret-count))))
+        (helper fret-list)))
+
+     (define (fret-stencil fret)
+        "Make a stencil for @code{fret}, given the
+fret-diagram overall parameters."
+       (let* ((low-string-half-thickness
+                (* 0.5
+                   size
+                   th
+                   (string-thickness string-count thickness-factor)))
+              (fret-half-thickness (* 0.5 size th))
+              (start-coordinates
+                (stencil-coordinates
+                  (* size fret)
+                  (- fret-half-thickness low-string-half-thickness)))
+              (end-coordinates
+                (stencil-coordinates
+                  (* size fret)
+                  (* size (1- string-count)))))
+         (make-line-stencil
+           (* size th)
+           (car start-coordinates) (cdr start-coordinates)
+           (car end-coordinates) (cdr end-coordinates))))
+
+     (define (draw-barre barre-list)
+       "Create barre indications for a fret diagram"
+       (if (not (null? barre-list))
+         (let* ((string1 (caar barre-list))
+                (string2 (cadar barre-list))
+                (barre-fret (caddar barre-list))
+                (top-fret (cdr fret-range))
+                (low-fret (car fret-range))
+                (fret (1+ (- barre-fret low-fret)))
+                (barre-vertical-offset 0.5)
+                (dot-center-fret-coordinate (+ (1- fret) dot-position))
+                (barre-fret-coordinate
+                  (+ dot-center-fret-coordinate
+                     (* (- barre-vertical-offset 0.5) dot-radius)))
+                (barre-start-string-coordinate (- string-count string1))
+                (barre-end-string-coordinate (- string-count string2))
+                (scale-dot-radius (* size dot-radius))
+                (barre-type (assoc-get 'barre-type details 'curved))
+                (barre-stencil
+                  (cond
+                    ((eq? barre-type 'straight)
+                     (make-straight-barre-stencil
+                       barre-fret-coordinate
+                       barre-start-string-coordinate
+                       barre-end-string-coordinate
+                       scale-dot-radius))
+                    ((eq? barre-type 'curved)
+                     (make-curved-barre-stencil
+                       barre-fret-coordinate
+                       barre-start-string-coordinate
+                       barre-end-string-coordinate
+                       scale-dot-radius)))))
+           (if (not (null? (cdr barre-list)))
+             (ly:stencil-add
+               barre-stencil
+               (draw-barre (cdr barre-list)))
+             barre-stencil ))))
+
+     (define (make-straight-barre-stencil
+               fret-coordinate
+               start-string-coordinate
+               end-string-coordinate
+               half-thickness)
+       "Create a straight barre stencil."
+       (let ((start-point
+               (stencil-coordinates
+                 (* size fret-coordinate)
+                 (* size start-string-coordinate)))
+             (end-point
+               (stencil-coordinates
+                 (* size fret-coordinate)
+                 (* size end-string-coordinate))))
+         (make-line-stencil
+           half-thickness
+           (car start-point)
+           (cdr start-point)
+           (car end-point)
+           (cdr end-point))))
+
+     (define (make-curved-barre-stencil
+               fret-coordinate
+               start-string-coordinate
+               end-string-coordinate
+               half-thickness)
+       "Create a curved barre stencil."
+       (let* ((bezier-thick 0.1)
+              (bezier-height 0.5)
+              (bezier-list
+                (make-bezier-sandwich-list
+                  (* size start-string-coordinate)
+                  (* size end-string-coordinate)
+                  (* size fret-coordinate)
+                  (* size bezier-height)
+                  (* size bezier-thick)))
+              (box-lower-left
+                (stencil-coordinates
+                  (+ (* size fret-coordinate) half-thickness)
+                  (- (* size start-string-coordinate) half-thickness)))
+              (box-upper-right
+                (stencil-coordinates
+                  (- (* size fret-coordinate)
+                     (* size bezier-height)
+                     half-thickness)
+                  (+ (* size end-string-coordinate) half-thickness)))
+              (x-extent (cons (car box-lower-left) (car box-upper-right)))
+              (y-extent (cons (cdr box-lower-left) (cdr box-upper-right))))
+         (ly:make-stencil
+           (list 'bezier-sandwich
+                 `(quote ,bezier-list)
+                 (* size bezier-thick))
+           x-extent
+           y-extent)))
+
+     (define (draw-dots dot-list)
+       "Make dots for fret diagram."
+
+       (let* ( (scale-dot-radius (* size dot-radius))
+              (scale-dot-thick (* size th))
+              (dot-color (assoc-get 'dot-color details 'black))
+              (finger-label-padding 0.3)
+              (dot-label-font-mag
+                (* scale-dot-radius
+                   (assoc-get 'dot-label-font-mag details 1.0)))
+              (string-label-font-mag
+                (* size
+                   (assoc-get
+                     'string-label-font-mag details
+                     (cond ((or (eq? orientation 'landscape)
+                                (eq? orientation 'opposing-landscape))
+                            0.5)
+                           (else  0.6)))))
+              (mypair (car dot-list))
+              (restlist (cdr dot-list))
+              (string (car mypair))
+              (fret (cadr mypair))
+              (fret-coordinate (* size (+ (1- fret) dot-position)))
+              (string-coordinate (* size (- string-count string)))
+              (dot-coordinates
+                (stencil-coordinates fret-coordinate string-coordinate))
+              (extent (cons (- scale-dot-radius) scale-dot-radius))
+              (finger (caddr mypair))
+              (finger (if (number? finger) (number->string finger) finger))
+              (dot-stencil (if (eq? dot-color 'white)
+                             (ly:stencil-add
+                               (make-circle-stencil
+                                 scale-dot-radius scale-dot-thick #t)
+                               (ly:stencil-in-color
+                                 (make-circle-stencil
+                                   (- scale-dot-radius (* 0.5 scale-dot-thick))
+                                   0  #t)
+                                 1 1 1))
+                             (make-circle-stencil
+                               scale-dot-radius scale-dot-thick #t)))
+              (positioned-dot
+                (ly:stencil-translate dot-stencil dot-coordinates))
+              (labeled-dot-stencil
+                (cond
+                  ((or (eq? finger '())(eq? finger-code 'none))
+                   positioned-dot)
+                  ((eq? finger-code 'in-dot)
+                   (let ((finger-label
+                           (centered-stencil
+                             (sans-serif-stencil
+                               layout props dot-label-font-mag finger))))
+                     (ly:stencil-translate
+                       (ly:stencil-add
+                         dot-stencil
+                         (if (eq? dot-color 'white)
+                           finger-label
+                           (ly:stencil-in-color finger-label 1 1 1)))
+                       dot-coordinates)))
+                  ((eq? finger-code 'below-string)
+                   (let* ((label-stencil
+                            (centered-stencil
+                              (sans-serif-stencil
+                                layout props string-label-font-mag
+                                finger)))
+                          (label-fret-offset
+                            (stencil-fretboard-offset
+                              label-stencil 'fret orientation))
+                          (label-fret-coordinate
+                            (+ (* size
+                                  (+ 1 my-fret-count finger-label-padding))
+                               label-fret-offset))
+                          (label-string-coordinate string-coordinate)
+                          (label-translation
+                            (stencil-coordinates
+                              label-fret-coordinate
+                              label-string-coordinate)))
+                     (ly:stencil-add
+                       positioned-dot
+                       (ly:stencil-translate
+                         label-stencil
+                         label-translation))))
+                  (else ;unknown finger-code
+                    positioned-dot))))
+         (if (null? restlist)
+           labeled-dot-stencil
+           (ly:stencil-add
+             (draw-dots restlist)
+             labeled-dot-stencil))))
+
+     (define (draw-thick-zero-fret)
+       "Draw a thick zeroth fret for a fret diagram whose base fret is 1."
+       (let* ((half-lowest-string-thickness
+                (* 0.5 th (string-thickness string-count thickness-factor)))
+              (half-thick (* 0.5 sth))
+              (top-fret-thick
+                (* sth (assoc-get 'top-fret-thickness details 3.0)))
+              (start-string-coordinate (- half-lowest-string-thickness))
+              (end-string-coordinate (+ (* size (1- string-count)) half-thick))
+              (start-fret-coordinate half-thick)
+              (end-fret-coordinate (- half-thick top-fret-thick))
+              (lower-left
+                (stencil-coordinates
+                  start-fret-coordinate start-string-coordinate))
+              (upper-right
+                (stencil-coordinates
+                  end-fret-coordinate end-string-coordinate)))
+         (ly:round-filled-box
+           (cons (car lower-left) (car upper-right))
+           (cons (cdr lower-left) (cdr upper-right))
+           sth)))
+
+     (define (draw-xo xo-list)
+       "Put open and mute string indications on diagram, as contained in
+@var{xo-list}."
+       (let* ((xo-font-mag
+                (* size (assoc-get
+                          'xo-font-magnification details
+                          (cond ((or (eq? orientation 'landscape)
+                                     (eq? orientation 'opposing-landscape))
+                                 0.4)
+                                (else 0.4)))))
+              (mypair (car xo-list))
+              (restlist (cdr xo-list))
+              (glyph-string (if (eq? (car mypair) 'mute)
+                              (assoc-get 'mute-string details "X")
+                              (assoc-get 'open-string details "O")))
+              (glyph-string-coordinate (* (- string-count (cadr mypair)) size))
+              (glyph-stencil
+                (centered-stencil
+                  (sans-serif-stencil
+                    layout props (* size xo-font-mag) glyph-string)))
+              (glyph-stencil-coordinates
+                (stencil-coordinates 0 glyph-string-coordinate))
+              (positioned-glyph
+                (ly:stencil-translate
+                  glyph-stencil
+                  glyph-stencil-coordinates)))
+         (if (null? restlist)
+           positioned-glyph
+           (ly:stencil-add
+             (draw-xo restlist)))))
+
+       (define (draw-capo fret)
+         "Draw a capo indicator across the full width of the fret-board
+at @var{fret}."
+         (let* ((capo-thick
+                  (* size (assoc-get 'capo-thickness details 0.5)))
+                (half-thick (* capo-thick 0.5))
+                (last-string-position 0)
+                (first-string-position (* size (- string-count 1)))
+                (fret-position ( * size (1- (+ dot-position fret))))
+                (start-point
+                  (stencil-coordinates
+                    fret-position
+                    first-string-position))
+                (end-point
+                  (stencil-coordinates
+                    fret-position
+                    last-string-position)))
+           (make-line-stencil
+             capo-thick
+             (car start-point) (cdr start-point)
+             (car end-point) (cdr end-point))))
+
+        (define (label-fret fret-range)
+          "Label the base fret on a fret diagram"
+          (let* ((base-fret (car fret-range))
+                 (label-font-mag (assoc-get 'fret-label-font-mag details 0.5))
+                 (label-space (* 0.5 size))
+                 (label-dir (assoc-get 'label-dir details RIGHT))
+                 (label-vertical-offset
+                   (assoc-get 'fret-label-vertical-offset details 0))
+                 (number-type
+                   (assoc-get 'number-type details 'roman-lower))
+                 (label-text
+                   (cond
+                     ((equal? number-type 'roman-lower)
+                      (fancy-format #f "~(~@r~)" base-fret))
+                     ((equal? number-type 'roman-upper)
+                      (fancy-format #f "~@r" base-fret))
+                     ((equal? 'arabic number-type)
+                      (fancy-format #f "~d" base-fret))
+                     (else (fancy-format #f "~(~@r~)" base-fret))))
+                 (label-stencil
+                   (centered-stencil
+                     (sans-serif-stencil
+                       layout props (* size label-font-mag) label-text)))
+                 (label-half-width
+                   (stencil-fretboard-offset
+                     label-stencil
+                     'string
+                     orientation))
+                 (label-outside-diagram (+ label-space label-half-width)))
+            (ly:stencil-translate
+              label-stencil
+              (stencil-coordinates
+                (1+ (* size label-vertical-offset))
+                (if (eq? label-dir LEFT)
+                  (- label-outside-diagram)
+                  (+ (* size (1- string-count)) label-outside-diagram))))))
+
+
+              ; Here is the body of make-fret-diagram
+              ;
+
+    (set! fret-diagram-stencil
+      (ly:stencil-add (draw-strings) (draw-frets)))
     (if (and (not (null? barre-list))
              (not (eq? 'none barre-type)))
-        (set! fret-diagram-stencil
-              (ly:stencil-add
-               (draw-barre layout props string-count fret-range size
-                           finger-code dot-position dot-radius
-                           barre-list orientation)
-               fret-diagram-stencil)))
+      (set! fret-diagram-stencil
+        (ly:stencil-add
+          (draw-barre barre-list)
+          fret-diagram-stencil)))
     (if (not (null? dot-list))
-        (set! fret-diagram-stencil
-              (ly:stencil-add
-               fret-diagram-stencil
-               (draw-dots layout props string-count my-fret-count 
-                          size finger-code dot-position dot-radius
-                          th dot-list orientation))))
+      (set! fret-diagram-stencil
+        (ly:stencil-add
+          fret-diagram-stencil
+          (draw-dots dot-list))))
     (if (= (car fret-range) 1)
-        (set! fret-diagram-stencil
-                  (ly:stencil-add
-                     fret-diagram-stencil 
-                     (draw-thick-zero-fret
-                       details string-count th 
-                       thickness-factor size orientation))))
-    (if (not (null? xo-list))
-     (let* ((diagram-fret-top 
-              (car (stencil-fretboard-extent
-                     fret-diagram-stencil
-                     'fret
-                     orientation)))
-            (xo-stencil 
-              (draw-xo layout props string-count fret-range
-                       size xo-list orientation))
-            (xo-fret-offset
-              (stencil-fretboard-offset
-                xo-stencil 'fret orientation)))
       (set! fret-diagram-stencil
         (ly:stencil-add
           fret-diagram-stencil
-          (ly:stencil-translate
-            xo-stencil
-            (stencil-coordinates
-             (- diagram-fret-top
-                xo-fret-offset
-                (* size xo-padding))
-             0 ; no string offset
-             orientation))))))
-               
-    (if (> capo-fret 0)
+          (draw-thick-zero-fret))))
+    (if (not (null? xo-list))
+      (let* ((diagram-fret-top
+               (car (stencil-fretboard-extent
+                      fret-diagram-stencil
+                      'fret
+                      orientation)))
+             (xo-stencil (draw-xo xo-list))
+             (xo-fret-offset
+               (stencil-fretboard-offset
+                 xo-stencil 'fret orientation)))
         (set! fret-diagram-stencil
-              (ly:stencil-add
-                fret-diagram-stencil
-                (draw-capo details string-count capo-fret my-fret-count
-                           th size dot-position orientation))))
+          (ly:stencil-add
+            fret-diagram-stencil
+            (ly:stencil-translate
+              xo-stencil
+              (stencil-coordinates
+                (- diagram-fret-top
+                   xo-fret-offset
+                   (* size xo-padding))
+                0)))))) ; no string offset
+
+    (if (> capo-fret 0)
+      (set! fret-diagram-stencil
+        (ly:stencil-add
+          fret-diagram-stencil
+          (draw-capo capo-fret))))
     (if (> (car fret-range) 1)
       (set! fret-diagram-stencil
         (ly:stencil-add
-           fret-diagram-stencil
-           (label-fret 
-             layout props string-count fret-range size orientation))))
-      (ly:stencil-aligned-to fret-diagram-stencil X alignment)))
+          fret-diagram-stencil
+          (label-fret fret-range))))
+    (ly:stencil-aligned-to fret-diagram-stencil X alignment)))
 
 (define (fret-parse-definition-string props definition-string)
  "Parse a fret diagram string and return a pair containing:
@@ -858,9 +826,9 @@ a fret-indication list with the appropriate values"
          (prepend-alist-chain 'fret-diagram-details details props))
    `(,props . ,output-list))) ;ugh -- hard-coded spell -- procedure better
 
-(define-public 
+(define-public
   (fret-parse-terse-definition-string props definition-string)
-  "Parse a fret diagram string that uses terse syntax; 
+  "Parse a fret diagram string that uses terse syntax;
 return a pair containing:
 @var{props}, modified to include the string-count determined by the
 definition-string, and
@@ -933,7 +901,7 @@ a fret-indication list with the appropriate values"
     `(,props . ,output-list))) ; ugh -- hard coded; proc is better
 
 
-(define-builtin-markup-command 
+(define-builtin-markup-command
   (fret-diagram-verbose layout props marking-list)
   (pair?) ; argument type (list, but use pair? for speed)
   instrument-specific-markup ; markup type
index 89eba1a42bf93a3beee192e80398b6ac94011aa8..b0680ead52868bcbdf8ec5e4ec9b512ab341917c 100644 (file)
@@ -207,8 +207,8 @@ against SIGNATURE, reporting MAKE-NAME as the user-invoked function.
         (ly:error
         (string-append
          make-name ": "
-         (_ "Invalid argument in position ~A.  Expect: ~A, found: ~S.")
-         error-msg))
+         (_ "Invalid argument in position ~A.  Expect: ~A, found: ~S."))
+         error-msg)
        (cons markup-function args))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
index 52e697148786be8a306b4a50bd964bacfbd86e10..d9dfaf3be64171ae4de27938ac1f56be4b22434c 100644 (file)
@@ -273,15 +273,15 @@ def extract_score_information (tree):
         if value:
             header.set_field (field, musicxml.escape_ly_output_string (value))
 
+    movement_title = tree.get_maybe_exist_named_child ('movement-title')
+    if movement_title:
+        set_if_exists ('title', movement_title.get_text ())
     work = tree.get_maybe_exist_named_child ('work')
     if work:
+        # Overwrite the title from movement-title with work->title
         set_if_exists ('title', work.get_work_title ())
         set_if_exists ('worknumber', work.get_work_number ())
         set_if_exists ('opus', work.get_opus ())
-    else:
-        movement_title = tree.get_maybe_exist_named_child ('movement-title')
-        if movement_title:
-            set_if_exists ('title', movement_title.get_text ())
     
     identifications = tree.get_named_children ('identification')
     for ids in identifications:
@@ -307,18 +307,23 @@ def extract_score_information (tree):
 
         # Case 1: "Sibelius 5.1" with the "Dolet 3.4 for Sibelius" plugin
         #         is missing all beam ends => ignore all beaming information
-        if "Dolet 3.4 for Sibelius" in software:
-            conversion_settings.ignore_beaming = True
-            progress (_ ("Encountered file created by Dolet 3.4 for Sibelius, containing wrong beaming information. All beaming information in the MusicXML file will be ignored"))
-        # ditto for Dolet 3.5
-        if "Dolet 3.5 for Sibelius" in software:
-            conversion_settings.ignore_beaming = True
-            progress (_ ("Encountered file created by Dolet 3.5 for Sibelius, containing wrong beaming information. All beaming information in the MusicXML file will be ignored"))
-        if "Noteworthy Composer" in software:
-            conversion_settings.ignore_beaming = True
-            progress (_ ("Encountered file created by Noteworthy Composer's nwc2xml, containing wrong beaming information. All beaming information in the MusicXML file will be ignored"))
-        # TODO: Check for other unsupported features
-
+        ignore_beaming_software = {
+            "Dolet 4 for Sibelius, Beta 2": "Dolet 4 for Sibelius, Beta 2",
+            "Dolet 3.5 for Sibelius": "Dolet 3.5 for Sibelius",
+            "Dolet 3.4 for Sibelius": "Dolet 3.4 for Sibelius",
+            "Dolet 3.3 for Sibelius": "Dolet 3.3 for Sibelius",
+            "Dolet 3.2 for Sibelius": "Dolet 3.2 for Sibelius",
+            "Dolet 3.1 for Sibelius": "Dolet 3.1 for Sibelius",
+            "Dolet for Sibelius 1.3": "Dolet for Sibelius 1.3",
+            "Noteworthy Composer": "Noteworthy Composer's nwc2xm[",
+        }
+        for s in software:
+            app_description = ignore_beaming_software.get (s, False);
+            if app_description:
+                conversion_settings.ignore_beaming = True
+                progress (_ ("Encountered file created by %s, containing wrong beaming information. All beaming information in the MusicXML file will be ignored") % app_description)
+
+    # TODO: Check for other unsupported features
     return header
 
 class PartGroupInfo:
@@ -926,6 +931,30 @@ def musicxml_attributes_to_lily (attrs):
                 elts.append (ev)
     
     return elts
+    
+def musicxml_print_to_lily (el):
+    # TODO: Implement other print attributes
+    #  <!ELEMENT print (page-layout?, system-layout?, staff-layout*,
+    #          measure-layout?, measure-numbering?, part-name-display?, 
+    #          part-abbreviation-display?)>
+    #  <!ATTLIST print
+    #      staff-spacing %tenths; #IMPLIED
+    #      new-system %yes-no; #IMPLIED
+    #      new-page %yes-no-number; #IMPLIED
+    #      blank-page NMTOKEN #IMPLIED
+    #      page-number CDATA #IMPLIED 
+    #  >
+    elts = []
+    if (hasattr (el, "new-system")):
+        val = getattr (el, "new-system")
+        if (val == "yes"):
+            elts.append (musicexp.Break ("break"))
+    if (hasattr (el, "new-page")):
+        val = getattr (el, "new-page")
+        if (val == "yes"):
+            elts.append (musicexp.Break ("pageBreak"))
+    return elts
+
 
 class Marker (musicexp.Music):
     def __init__ (self):
@@ -1619,6 +1648,7 @@ chordkind_dict = {
     'diminished': 'dim5',
         # Sevenths:
     'dominant': '7',
+    'dominant-seventh': '7',
     'major-seventh': 'maj7',
     'minor-seventh': 'm7',
     'diminished-seventh': 'dim7',
@@ -1905,12 +1935,12 @@ class LilyPondVoiceBuilder:
     def current_duration (self):
         return self.end_moment - self.begin_moment
         
-    def add_music (self, music, duration):
+    def add_music (self, music, duration, relevant = True):
         assert isinstance (music, musicexp.Music)
         if self.pending_multibar > Rational (0):
             self._insert_multibar ()
 
-        self.has_relevant_elements = True
+        self.has_relevant_elements = self.has_relevant_elements or relevant
         self.elements.append (music)
         self.begin_moment = self.end_moment
         self.set_duration (duration)
@@ -1922,18 +1952,27 @@ class LilyPondVoiceBuilder:
             self.pending_dynamics = []
 
     # Insert some music command that does not affect the position in the measure
-    def add_command (self, command):
+    def add_command (self, command, relevant = True):
         assert isinstance (command, musicexp.Music)
         if self.pending_multibar > Rational (0):
             self._insert_multibar ()
-        self.has_relevant_elements = True
+        self.has_relevant_elements = self.has_relevant_elements or relevant
         self.elements.append (command)
-    def add_barline (self, barline):
-        # TODO: Implement merging of default barline and custom bar line
-        self.add_music (barline, Rational (0))
+    def add_barline (self, barline, relevant = False):
+        # Insert only if we don't have a barline already
+        # TODO: Implement proper merging of default barline and custom bar line
+        has_relevant = self.has_relevant_elements
+        if (not (self.elements) or 
+            not (isinstance (self.elements[-1], musicexp.BarLine)) or 
+            (self.pending_multibar > Rational (0))):
+            self.add_music (barline, Rational (0))
+        self.has_relevant_elements = has_relevant or relevant
     def add_partial (self, command):
         self.ignore_skips = True
+        # insert the partial, but restore relevant_elements (partial is not relevant)
+        relevant = self.has_relevant_elements
         self.add_command (command)
+        self.has_relevant_elements = relevant
 
     def add_dynamics (self, dynamic):
         # store the dynamic item(s) until we encounter the next note/rest:
@@ -1942,11 +1981,9 @@ class LilyPondVoiceBuilder:
     def add_bar_check (self, number):
         # re/store has_relevant_elements, so that a barline alone does not
         # trigger output for figured bass, chord names
-        has_relevant = self.has_relevant_elements
         b = musicexp.BarLine ()
         b.bar_number = number
         self.add_barline (b)
-        self.has_relevant_elements = has_relevant
 
     def jumpto (self, moment):
         current_end = self.end_moment + self.pending_multibar
@@ -1980,7 +2017,7 @@ class LilyPondVoiceBuilder:
 
             evc = musicexp.ChordEvent ()
             evc.elements.append (skip)
-            self.add_music (evc, diff)
+            self.add_music (evc, diff, False)
 
         if diff > Rational (0) and moment == 0:
             self.ignore_skips = False
@@ -2071,6 +2108,7 @@ def musicxml_voice_to_lily_voice (voice):
     voice_builder.set_measure_length (current_measure_length)
 
     for n in voice._elements:
+        tie_started = False
         if n.get_name () == 'forward':
             continue
         staff = n.get_maybe_exist_named_child ('staff')
@@ -2084,6 +2122,8 @@ def musicxml_voice_to_lily_voice (voice):
             a = musicxml_partial_to_lily (n.partial)
             if a:
                 voice_builder.add_partial (a)
+                figured_bass_builder.add_partial (a)
+                chordnames_builder.add_partial (a)
             continue
 
         is_chord = n.get_maybe_exist_named_child ('chord')
@@ -2091,8 +2131,12 @@ def musicxml_voice_to_lily_voice (voice):
         if not is_chord and not is_after_grace:
             try:
                 voice_builder.jumpto (n._when)
+                figured_bass_builder.jumpto (n._when)
+                chordnames_builder.jumpto (n._when)
             except NegativeSkip, neg:
                 voice_builder.correct_negative_skip (n._when)
+                figured_bass_builder.correct_negative_skip (n._when)
+                chordnames_builder.correct_negative_skip (n._when)
                 n.message (_ ("Negative skip found: from %s to %s, difference is %s") % (neg.here, neg.dest, neg.dest - neg.here))
 
         if isinstance (n, musicxml.Barline):
@@ -2100,8 +2144,18 @@ def musicxml_voice_to_lily_voice (voice):
             for a in barlines:
                 if isinstance (a, musicexp.BarLine):
                     voice_builder.add_barline (a)
+                    figured_bass_builder.add_barline (a, False)
+                    chordnames_builder.add_barline (a, False)
                 elif isinstance (a, RepeatMarker) or isinstance (a, EndingMarker):
                     voice_builder.add_command (a)
+                    figured_bass_builder.add_barline (a, False)
+                    chordnames_builder.add_barline (a, False)
+            continue
+
+
+        if isinstance (n, musicxml.Print):
+            for a in musicxml_print_to_lily (n):
+                voice_builder.add_command (a, False)
             continue
 
         # Continue any multimeasure-rests before trying to add bar checks!
@@ -2297,6 +2351,7 @@ def musicxml_voice_to_lily_voice (voice):
                 if mxl_tie and mxl_tie.type == 'start':
                     ev_chord.append (musicexp.TieEvent ())
                     is_tied = True
+                    tie_started = True
                 else:
                     is_tied = False
 
@@ -2392,7 +2447,13 @@ def musicxml_voice_to_lily_voice (voice):
                 if not lnr in note_lyrics_processed:
                     lyrics[lnr].append ("\skip4")
 
-    ## force trailing mm rests to be written out.   
+        # Assume that a <tie> element only lasts for one note.
+        # This might not be correct MusicXML interpretation, but works for
+        # most cases and fixes broken files, which have the end tag missing
+        if is_tied and not tie_started:
+            is_tied = False
+
+    ## force trailing mm rests to be written out.
     voice_builder.add_music (musicexp.ChordEvent (), Rational (0))
     
     ly_voice = group_tuplets (voice_builder.elements, tuplet_events)
@@ -2430,7 +2491,7 @@ def musicxml_voice_to_lily_voice (voice):
     # create \figuremode { figured bass elements }
     if figured_bass_builder.has_relevant_elements:
         fbass_music = musicexp.SequentialMusic ()
-        fbass_music.elements = figured_bass_builder.elements
+        fbass_music.elements = group_repeats (figured_bass_builder.elements)
         v = musicexp.ModeChangingMusicWrapper()
         v.mode = 'figuremode'
         v.element = fbass_music
@@ -2439,7 +2500,7 @@ def musicxml_voice_to_lily_voice (voice):
     # create \chordmode { chords }
     if chordnames_builder.has_relevant_elements:
         cname_music = musicexp.SequentialMusic ()
-        cname_music.elements = chordnames_builder.elements
+        cname_music.elements = group_repeats (chordnames_builder.elements)
         v = musicexp.ModeChangingMusicWrapper()
         v.mode = 'chordmode'
         v.element = cname_music
@@ -2498,7 +2559,17 @@ def voices_in_part (part):
 
 def voices_in_part_in_parts (parts):
     """return a Part -> Name -> Voice dictionary"""
-    return dict([(p.id, voices_in_part (p)) for p in parts])
+    # don't crash if p doesn't have an id (that's invalid MusicXML,
+    # but such files are out in the wild!
+    dictionary = {}
+    for p in parts:
+        voices = voices_in_part (p)
+        if (hasattr (p, "id")):
+             dictionary[p.id] = voices
+        else:
+             # TODO: extract correct part id from other sources
+             dictionary[None] = voices
+    return dictionary;
 
 
 def get_all_voices (parts):