summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Sorensen <c_sorensen@byu.edu>2010-06-15 15:19:29 -0600
committerCarl Sorensen <c_sorensen@byu.edu>2010-07-17 22:36:35 -0600
commit0706458a184d83d0776ffa03b07f710d9e3138ba (patch)
tree5464376515fbee4a68b67e48da16ad949808318a
parentada8b75ada9cfe3069bc1d0220355af1cfe0df7d (diff)
Revised autobeam settings patch and ran makelsr.py
Eliminate context properties measureGrouping, beatLength, and beamSettings Create new context properties baseMoment, beatStructure, and beamExceptions. Save time-signature-specific settings in context property timeSignatureSettings Do away with virtually all special rules for beaming; the beat structure now governs almost all autobeaming. Fix documentation
-rw-r--r--Documentation/changes.tely10
-rw-r--r--Documentation/de/notation/rhythms.itely71
-rw-r--r--Documentation/es/notation/rhythms.itely54
-rw-r--r--Documentation/fr/notation/rhythms.itely247
-rw-r--r--Documentation/notation/rhythms.itely215
-rw-r--r--Documentation/snippets/adding-fingerings-to-tablatures.ly2
-rw-r--r--Documentation/snippets/adjusting-lyrics-vertical-spacing.ly2
-rw-r--r--Documentation/snippets/ancient-headword.ly2
-rw-r--r--Documentation/snippets/automatic-beam-subdivisions.ly26
-rw-r--r--Documentation/snippets/beam-endings-in-score-context.ly18
-rw-r--r--Documentation/snippets/beam-grouping-in-7-8-time.ly15
-rw-r--r--Documentation/snippets/centering-markup-on-note-heads-automatically.ly2
-rw-r--r--Documentation/snippets/changing-the-ambitus-gap.ly2
-rw-r--r--Documentation/snippets/changing-the-number-of-augmentation-dots-per-note.ly2
-rw-r--r--Documentation/snippets/changing-the-time-signature-without-affecting-the-beaming.ly2
-rw-r--r--Documentation/snippets/chordchanges-for-fretboards.ly2
-rw-r--r--Documentation/snippets/chords-headword.ly2
-rw-r--r--Documentation/snippets/clip-systems.ly2
-rw-r--r--Documentation/snippets/compound-time-signatures.ly7
-rw-r--r--Documentation/snippets/conducting-signs,-measure-grouping-signs.ly30
-rw-r--r--Documentation/snippets/controlling-spanner-visibility-after-a-line-break.ly2
-rw-r--r--Documentation/snippets/defining-an-engraver-in-scheme-ambitus-engraver.ly2
-rw-r--r--Documentation/snippets/displaying-complex-chords.ly2
-rw-r--r--Documentation/snippets/displaying-grob-ancestry.ly2
-rw-r--r--Documentation/snippets/dodecaphonic-style-accidentals-for-each-note-including-naturals.ly2
-rw-r--r--Documentation/snippets/dynamics-custom-text-spanner-postfix.ly2
-rw-r--r--Documentation/snippets/dynamics-text-spanner-postfix.ly2
-rw-r--r--Documentation/snippets/editorial-headword.ly2
-rw-r--r--Documentation/snippets/expressive-headword.ly2
-rw-r--r--Documentation/snippets/faking-a-hammer-in-tablatures.ly2
-rw-r--r--Documentation/snippets/figured-bass-headword.ly2
-rw-r--r--Documentation/snippets/flamenco-notation.ly2
-rw-r--r--Documentation/snippets/fretted-headword.ly8
-rw-r--r--Documentation/snippets/grouping-beats.ly2
-rw-r--r--Documentation/snippets/guitar-slides.ly2
-rw-r--r--Documentation/snippets/hiding-accidentals-on-tied-notes-at-the-start-of-a-new-system.ly2
-rw-r--r--Documentation/snippets/incipit.ly2
-rw-r--r--Documentation/snippets/keyboard-headword.ly2
-rw-r--r--Documentation/snippets/letter-tablature-formatting.ly2
-rw-r--r--Documentation/snippets/makam-example.ly2
-rw-r--r--Documentation/snippets/making-slurs-with-complex-dash-structure.ly2
-rw-r--r--Documentation/snippets/modern-tab-text-clef.ly2
-rw-r--r--Documentation/snippets/new/automatic-beam-subdivisions.ly39
-rw-r--r--Documentation/snippets/new/beam-endings-in-score-context.ly16
-rw-r--r--Documentation/snippets/new/beam-grouping-in-7-8-time.ly13
-rw-r--r--Documentation/snippets/new/compound-time-signatures.ly5
-rw-r--r--Documentation/snippets/new/conducting-signs,-measure-grouping-signs.ly28
-rw-r--r--Documentation/snippets/new/fretted-headword.ly6
-rw-r--r--Documentation/snippets/new/reverting-default-beam-endings.ly10
-rw-r--r--Documentation/snippets/new/subdividing-beams.ly40
-rw-r--r--Documentation/snippets/non-default-tuplet-numbers.ly2
-rw-r--r--Documentation/snippets/non-traditional-key-signatures.ly2
-rw-r--r--Documentation/snippets/numbers-as-easy-note-heads.ly2
-rw-r--r--Documentation/snippets/piano-template-with-centered-dynamics.ly2
-rw-r--r--Documentation/snippets/pitches-headword.ly2
-rw-r--r--Documentation/snippets/repeats-headword.ly2
-rw-r--r--Documentation/snippets/reverting-default-beam-endings.ly12
-rw-r--r--Documentation/snippets/rhythms-headword.ly2
-rw-r--r--Documentation/snippets/rhythms.snippet-list2
-rw-r--r--Documentation/snippets/screech-boink.ly2
-rw-r--r--Documentation/snippets/setting-the-double-repeat-default-for-volte.ly2
-rw-r--r--Documentation/snippets/showing-the-same-articulation-above-and-below-a-note-or-chord.ly2
-rw-r--r--Documentation/snippets/simultaneous-headword.ly2
-rw-r--r--Documentation/snippets/snap-pizzicato-bartok-pizzicato.ly2
-rw-r--r--Documentation/snippets/staff-headword.ly2
-rw-r--r--Documentation/snippets/stem-and-beam-behavior-in-tablature.ly2
-rw-r--r--Documentation/snippets/text-headword.ly2
-rw-r--r--Documentation/snippets/unfretted-headword.ly2
-rw-r--r--Documentation/snippets/using-ly-grob-object-to-access-grobs-with--tweak.ly2
-rw-r--r--Documentation/snippets/using-the-whiteout-property.ly2
-rw-r--r--Documentation/snippets/vocal-ensemble-template-with-verse-and-refrain.ly2
-rw-r--r--Documentation/snippets/wind-headword.ly2
-rw-r--r--Documentation/web/ly-examples/granados.ly44
-rw-r--r--Documentation/web/news-front.itexi4
-rw-r--r--VERSION2
-rw-r--r--input/regression/auto-beam-beaming-override.ly4
-rw-r--r--input/regression/beam-beat-grouping.ly6
-rw-r--r--input/regression/beaming-ternary-metrum.ly14
-rw-r--r--input/regression/les-nereides.ly7
-rw-r--r--input/regression/repeat-tremolo-one-note-articulation.ly2
-rw-r--r--input/regression/repeat-tremolo-three-notes.ly2
-rw-r--r--lily/auto-beam-engraver.cc54
-rw-r--r--lily/beam-engraver.cc22
-rw-r--r--lily/beam-setting-scheme.cc78
-rw-r--r--lily/beaming-pattern.cc17
-rw-r--r--lily/include/beam-settings.hh29
-rw-r--r--lily/include/beaming-pattern.hh2
-rw-r--r--lily/measure-grouping-engraver.cc26
-rw-r--r--lily/timing-translator.cc7
-rw-r--r--ly/bagpipe.ly32
-rw-r--r--ly/engraver-init.ly14
-rw-r--r--ly/music-functions-init.ly66
-rw-r--r--python/convertrules.py25
-rw-r--r--scm/auto-beam.scm132
-rw-r--r--scm/beam-settings.scm240
-rw-r--r--scm/define-context-properties.scm19
-rw-r--r--scm/define-music-display-methods.scm2
-rw-r--r--scm/lily-library.scm9
-rw-r--r--scm/lily.scm2
-rw-r--r--scm/music-functions.scm54
-rw-r--r--scm/time-signature-settings.scm299
-rw-r--r--scripts/musicxml2ly.py2
102 files changed, 1164 insertions, 1026 deletions
diff --git a/Documentation/changes.tely b/Documentation/changes.tely
index 1b6652221d..76ba8b56d1 100644
--- a/Documentation/changes.tely
+++ b/Documentation/changes.tely
@@ -67,6 +67,16 @@ which scares away people.
@end ignore
@item
+The autobeaming settings syntax has been changed. beatLength,
+beatGrouping, beamSettings, and measureGrouping have all been eliminated.
+Autobeaming is now controlled by baseMoment, beatStructure, and
+beamExceptions. Default settings for each of these properties can be
+stored for any time signature in time-signature-settings, so that
+when the time signature is changed, the autobeaming will automatically
+change. The new syntax should be much easier and require fewer
+overrides.
+
+@item
The SVG backend has optional support for
@uref{http://www.w3.org/Submission/WOFF, WOFF fonts}. Using the Scheme
option @code{-d svg-woff} together with the SVG backend selection
diff --git a/Documentation/de/notation/rhythms.itely b/Documentation/de/notation/rhythms.itely
index 34158d385b..ebac74e573 100644
--- a/Documentation/de/notation/rhythms.itely
+++ b/Documentation/de/notation/rhythms.itely
@@ -542,7 +542,7 @@ c2 ~ c
Die Definition von Muster für die Strichelung der Bindebögen hat
die gleiche Struktur wie die Definition für Legatobögen. Zu
weiterer Information zu komplizierten Strichelungsmustern, siehe
-die Schnipsel im Abschnitt @ref{Legatobögen}.
+die Schnipsel im Abschnitt @ref{Legatobögen}.
@predefined
@code{\tieUp},
@@ -995,12 +995,12 @@ berücksichtigt.
@translationof Displaying rhythms
@menu
-* Taktangabe::
-* Auftakte::
-* Musik ohne Metrum::
-* Polymetrische Notation::
-* Automatische Aufteilung von Noten::
-* Melodierhythmus anzeigen::
+* Taktangabe::
+* Auftakte::
+* Musik ohne Metrum::
+* Polymetrische Notation::
+* Automatische Aufteilung von Noten::
+* Melodierhythmus anzeigen::
@end menu
@node Taktangabe
@@ -1661,9 +1661,10 @@ Stimmen zusammenstoßen.
@cindex Gesangstext und Balken
@funindex autoBeaming
-@funindex beamSettings
+@funindex beatStructure
+@funindex beamExceptions
@funindex measureLength
-@funindex beatLength
+@funindex baseMoment
@funindex \time
@funindex time
@funindex \set
@@ -1745,12 +1746,12 @@ Balkenregeln werden verändert mit @code{\overrideBeamSettings}
und @code{\revertBeamSettings}.
@lilypond[quote,relative=2,verbatim]
- \time 5/16
- c8^"beats" c16 c8 |
- \overrideBeamSettings #'Score #'(5 . 16) #'end #'((* . (2 3)))
- c8^"(2+3)" c16 c8
- \overrideBeamSettings #'Score #'(5 . 16) #'end #'((* . (3 2)))
- c8^"(3+2)" c16 c8
+\time 5/16
+c8^"beats" c16 c8 |
+\set beatStructure = #'(2 3)
+c8^"(2+3)" c16 c8
+\set beatStructure = #'(3 2)
+c8^"(3+2)" c16 c8
@end lilypond
Balkenregelveränderungen können auf bestimmte Kontexte beschränkt
@@ -1761,16 +1762,16 @@ niedrigere befindet.
@lilypond[quote, verbatim,relative=1]
\new Staff <<
\time 7/8
+ \set Staff.beatStructure = #'(2 3 2)
\new Voice = one {
\relative c'' {
- \overrideBeamSettings #'Staff #'(7 . 8) #'end #'((* . (2 3 2)))
a8 a a a a a a
}
}
\new Voice = two {
\relative c' {
\voiceTwo
- \overrideBeamSettings #'Voice #'(7 . 8) #'end #'((* . (1 3 3)))
+ \set Voice.beatStructure = #'(1 3 3)
f8 f f f f f f
}
}
@@ -1786,12 +1787,12 @@ Systems angewendet werden sollen:
% rhythm 3-1-1-2
% Context Voice specified -- does not work correctly
% Because of autogenerated voices, all beating will
-% be at beatLength (1 . 8)
-\overrideBeamSettings #'Voice #'(7 . 8) #'end #'((* . (3 1 1 2)))
+% be at baseMoment (1 . 8)
+\set beatStructure = #'(3 1 1 2)
<< {a8 a a a16 a a a a8 a} \\ {f4. f8 f f f} >>
% Works correctly with context Staff specified
-\overrideBeamSettings #'Staff #'(7 . 8) #'end #'((* . (3 1 1 2)))
+\set Staff.beatStructure = #'(3 1 1 2)
<< {a8 a a a16 a a a a8 a} \\ {f4. f8 f f f} >>
@end lilypond
@@ -1810,13 +1811,13 @@ wie für @code{overrideBeamSettings}, außer das kein Wert für
@lilypond[quote,verbatim,relative=2]
\time 4/4
-\repeat unfold 16 {a16}
-% set default rule for (1 1 1 1) grouping
-\overrideBeamSettings #'Score #'(4 . 4) #'end #'((* . (1 1 1 1)))
-\repeat unfold 16 {a16}
-% revert the new rule
-\revertBeamSettings #'Score #'(4 . 4) #'end
-\repeat unfold 16 {a16}
+\repeat unfold 8 {a8}
+% set beaming rule for ending all beams at (1 . 4)
+\set Timing.beamExceptions = #'()
+\repeat unfold 8 {a8}
+% go back to default behavior
+\time 4/4
+\repeat unfold 8 {a8}
@end lilypond
@@ -1826,7 +1827,7 @@ wie für @code{overrideBeamSettings}, außer das kein Wert für
@funindex subdivideBeams
@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
-{sub-dividing-beams.ly}
+{subdividing-beams.ly}
@cindex Taktgruppen
@cindex Schlaggruppen
@@ -1993,10 +1994,10 @@ Snippets:
@translationof Bars
@menu
-* Taktstriche::
-* Taktzahlen::
-* Takt- und Taktzahlüberprüfung::
-* Übungszeichen::
+* Taktstriche::
+* Taktzahlen::
+* Takt- und Taktzahlüberprüfung::
+* Übungszeichen::
@end menu
@node Taktstriche
@@ -2503,9 +2504,9 @@ Referenz der Interna:
@translationof Special rhythmic concerns
@menu
-* Verzierungen::
-* An Kadenzen ausrichten::
-* Verwaltung der Zeiteinheiten::
+* Verzierungen::
+* An Kadenzen ausrichten::
+* Verwaltung der Zeiteinheiten::
@end menu
@node Verzierungen
diff --git a/Documentation/es/notation/rhythms.itely b/Documentation/es/notation/rhythms.itely
index 04c4252414..8d72b7531d 100644
--- a/Documentation/es/notation/rhythms.itely
+++ b/Documentation/es/notation/rhythms.itely
@@ -1711,9 +1711,10 @@ alteraciones accidentales de las otras voces.
@cindex letra y barrado
@funindex autoBeaming
-@funindex beamSettings
+@funindex beamExceptions
+@funindex baseMoment
+@funindex beatStructure
@funindex measureLength
-@funindex beatLength
@funindex \time
@funindex time
@funindex \set
@@ -1813,9 +1814,9 @@ nuevo patrón de barrado.}
@lilypond[quote,relative=2,verbatim]
\time 5/16
c8^"beats" c16 c8 |
-\overrideBeamSettings #'Score #'(5 . 16) #'end #'((* . (2 3)))
+\set beatStructure = #'(2 3)
c8^"(2+3)" c16 c8
-\overrideBeamSettings #'Score #'(5 . 16) #'end #'((* . (3 2)))
+\set beatStructure = #'(3 2)
c8^"(3+2)" c16 c8
@end lilypond
@@ -1824,22 +1825,24 @@ específicos. Si no se incluye ningún ajuste en un contexto de nivel
más bajo, se aplican los ajustes del contexto circundante.
@lilypond[quote, verbatim,relative=1]
-\new Staff <<
+\new Staff {
\time 7/8
- \new Voice = one {
- \relative c'' {
- \overrideBeamSettings #'Staff #'(7 . 8) #'end #'((* . (2 3 2)))
+ \set Staff.beatStructure = #'(2 3 2)
+ <<
+ \new Voice = one {
+ \relative c'' {
a8 a a a a a a
+ }
}
- }
- \new Voice = two {
- \relative c' {
- \voiceTwo
- \overrideBeamSettings #'Voice #'(7 . 8) #'end #'((* . (1 3 3)))
- f8 f f f f f f
+ \new Voice = two {
+ \relative c' {
+ \voiceTwo
+ \set Voice.beatStructure = #'(1 3 3)
+ f8 f f f f f f
+ }
}
- }
->>
+ >>
+}
@end lilypond
En caso de usar varias voces, se debe especificar el contexto
@@ -1851,12 +1854,12 @@ pentagrama:
% rhythm 3-1-1-2
% Context Voice specified -- does not work correctly
% Because of autogenerated voices, all beating will
-% be at beatLength (1 . 8)
-\overrideBeamSettings #'Voice #'(7 . 8) #'end #'((* . (3 1 1 2)))
+% be at baseMoment (1 . 8)
+\set beatStructure = #'(3 1 1 2)
<< {a8 a a a16 a a a a8 a} \\ {f4. f8 f f f} >>
% Works correctly with context Staff specified
-\overrideBeamSettings #'Staff #'(7 . 8) #'end #'((* . (3 1 1 2)))
+\set Staff.beatStructure = #'(3 1 1 2)
<< {a8 a a a16 a a a a8 a} \\ {f4. f8 f f f} >>
@end lilypond
@@ -1876,15 +1879,14 @@ ningún valor para @var{agrupación}:
@lilypond[quote,verbatim,relative=2]
\time 4/4
\repeat unfold 8 {a8}
-% set default rule for (1 1 1 1) grouping
-\overrideBeamSettings #'Score #'(4 . 4) #'end #'((* . (1 1 1 1)))
+% set beaming rule for ending all beams at (1 . 4)
+\set Timing.beamExceptions = #'()
\repeat unfold 8 {a8}
-% revert the new rule
-\revertBeamSettings #'Score #'(4 . 4) #'end
+% go back to default beahavior
+\time 4/4
\repeat unfold 8 {a8}
@end lilypond
-
@predefined
@code{\overrideBeamSettings},
@code{\revertBeamSettings}.
@@ -1896,7 +1898,7 @@ ningún valor para @var{agrupación}:
@cindex barras, subdivisión
@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
-{sub-dividing-beams.ly}
+{subdividing-beams.ly}
@cindex compás, agrupación
@cindex pulsos, agrupación
@@ -2601,7 +2603,7 @@ c1 \mark \default
@noindent
La letra@tie{}@q{I} se salta de acuerdo con las tradiciones de
grabado. Si quiere incluir la letra @q{I}, use una de las
-instrucciones siguientes, según el estilo de marcas de
+instrucciones siguientes, según el estilo de marcas de
ensayo que desee (sólo letras, letras dentro de un rectángulo
o letras dentro de un círculo).
diff --git a/Documentation/fr/notation/rhythms.itely b/Documentation/fr/notation/rhythms.itely
index 9cd5d9b149..81cc19aeb4 100644
--- a/Documentation/fr/notation/rhythms.itely
+++ b/Documentation/fr/notation/rhythms.itely
@@ -23,12 +23,12 @@ Cette section traite du rythme : durées, silences, barres de ligature
et de mesure.
@menu
-* Écriture du rythme::
-* Écriture des silences::
-* Gravure du rythme::
-* Barres de ligature::
-* Mesures::
-* Fonctionnalités rythmiques particulières::
+* Écriture du rythme::
+* Écriture des silences::
+* Gravure du rythme::
+* Barres de ligature::
+* Mesures::
+* Fonctionnalités rythmiques particulières::
@end menu
@@ -37,10 +37,10 @@ et de mesure.
@translationof Writing rhythms
@menu
-* Durées::
-* Nolets::
-* Changement d'échelle des durées::
-* Liaisons de prolongation::
+* Durées::
+* Nolets::
+* Changement d'échelle des durées::
+* Liaisons de prolongation::
@end menu
@node Durées
@@ -90,7 +90,7 @@ c4 c8 c16 c32 c64 c64
Une note dont la durée est de quatre brèves s'obtient par la commande
@code{\maxima}. Celle-ci n'est toutefois disponible que dans le cadre de
-la notation ancienne. Pour plus de détails, voir @ref{Notations anciennes}.
+la notation ancienne. Pour plus de détails, voir @ref{Notations anciennes}.
@cindex durée par défaut
@cindex défaut, durée
@@ -124,10 +124,10 @@ mais uniquement en @qq{liant} deux ou plusieurs notes entre elles. Voir
@ref{Liaisons de prolongation} à ce sujet.
Quant à la manière de spécifier la durée des syllabes ou bien d'aligner
-des paroles par rapport aux notes, reportez-vous au chapitre
+des paroles par rapport aux notes, reportez-vous au chapitre
@ref{Musique vocale}.
-Espacer les notes selon leur durée relative est tout à fait possible.
+Espacer les notes selon leur durée relative est tout à fait possible.
Pour plus de détails à ce sujet et sur les autres réglages propres à
cette forme de notation, reportez-vous à @ref{Notation proportionnelle}.
@@ -181,8 +181,8 @@ Manuel des références internes :
@knownissues
@c Deliberately duplicated in Durations and Rests. -gp
-Il n'existe pas à proprement parler de limite (inférieure ou supérieure)
-en terme de durée d'un silence. Cependant, le nombre de glyphes
+Il n'existe pas à proprement parler de limite (inférieure ou supérieure)
+en terme de durée d'un silence. Cependant, le nombre de glyphes
disponibles ne couvre que les silences allant du trente-deuxième de
soupir à la maxime (valant huit pauses).
@@ -208,8 +208,8 @@ fraction.
@noindent
La durée de @var{expression_musicale} sera multipliée par la fraction.
Le dénominateur de cette fraction sera imprimé au-dessus ou au-dessous
-des notes, parfois avec un crochet. Le nolet le plus courant est le
-triolet, dans lequel 3 notes ont la durée de 2, et où les notes durent
+des notes, parfois avec un crochet. Le nolet le plus courant est le
+triolet, dans lequel 3 notes ont la durée de 2, et où les notes durent
donc 2/3 de leur valeur écrite.
@lilypond[quote,verbatim,relative=2]
@@ -228,7 +228,7 @@ c4 c \times 2/3 { b4 a g }
Des commandes prédéfinies permettent de déroger au positionnement
automatique du crochet en surplomb ou au-dessous des notes -- voir le
-chapitre @ref{Direction et positionnement}.
+chapitre @ref{Direction et positionnement}.
Les nolets peuvent être imbriqués ; par exemple,
@@ -236,7 +236,7 @@ Les nolets peuvent être imbriqués ; par exemple,
\autoBeamOff
c4 \times 4/5 { f8 e f \times 2/3 { e[ f g] } } f4 |
@end lilypond
-
+
Lorsque, dans une imbrication, les nolets débutent au même instant, il
vous faut recourir à la commande @code{\tweak}.
@@ -281,7 +281,7 @@ Music Glossary:
@rglos{tuplet},
@rglos{polymetric}.
-Manuel d'apprentissage :
+Manuel d'apprentissage :
@rlearning{Méthodes de retouche}.
Manuel de notation :
@@ -408,7 +408,7 @@ a2 ~ a
@noindent
Les liaisons de tenue sont utilisées soit lorsque la note dépasse de la
-mesure, soit quand les points ne suffisent pas à donner la bonne durée.
+mesure, soit quand les points ne suffisent pas à donner la bonne durée.
Lorsque l'on utilise ces liaisons, les valeurs rythmiques les plus
longues doivent s'aligner sur les subdivisions de la mesure, comme ici :
@@ -557,7 +557,7 @@ Glossaire musical :
@rglos{tie},
@rglos{laissez vibrer}.
-Dans ce manuel :
+Dans ce manuel :
@ref{Découpage automatique des notes}.
Morceaux choisis :
@@ -586,12 +586,12 @@ résultat indéfini. Dans ces cas-là, il est préférable d'utiliser un
@translationof Writing rests
On saisit les silences dans une expression musicale tout comme les
-notes.
+notes.
@menu
-* Silences::
-* Silences invisibles::
-* Silences valant une mesure::
+* Silences::
+* Silences invisibles::
+* Silences valant une mesure::
@end menu
@node Silences
@@ -728,15 +728,15 @@ requiert une durée explicite.
@end lilypond
La commande de saut génère simplement une case musicale vide. Le code
-de saut @code{s} crée tout de même les contextes @code{Staff} et
-@code{Voice} lorsque nécessaire, à l'instar des notes ou des silences :
-
+de saut @code{s} crée tout de même les contextes @code{Staff} et
+@code{Voice} lorsque nécessaire, à l'instar des notes ou des silences :
+
@lilypond[quote,verbatim,fragment]
s1 s s
@end lilypond
Un @code{\skip} ne fait que sauter du temps musical ; il ne produit rien
-du tout, pas même un symbole transparent.
+du tout, pas même un symbole transparent.
@lilypond[quote,verbatim,fragment]
% This is valid input, but does nothing
@@ -765,7 +765,7 @@ Référence du programme :
@funindex R
Un silence valant une ou plusieurs mesures entières s'entre avec un
-@code{R} majuscule.
+@code{R} majuscule.
@lilypond[quote,verbatim,relative=2]
% Rest measures contracted to single measure
@@ -845,7 +845,7 @@ R2.*2 |
@funindex \fermataMarkup
@funindex fermataMarkup
@funindex MultiMeasureRestText
-
+
Vous pouvez aussi ajouter du texte à un silence multimesure en utilisant
la syntaxe @var{note}-@code{markup} (cf. @ref{Mise en forme du texte}). La
variable @code{\fermataMarkup} quant à elle permet d'ajouter un point
@@ -946,15 +946,15 @@ positionner des nombres au dessus d'un silence multimesure, le numéro
de doigt (4) risquant de chevaucher le nombre de mesures à compter (10).
@cindex condenser les silences
-@cindex silences, condenser les
+@cindex silences, condenser les
-Condenser plusieurs silences en un unique silence multimesure ne peut
-être automatisé.
+Condenser plusieurs silences en un unique silence multimesure ne peut
+être automatisé.
@cindex silences, collisions entre
Les silences multimesure peuvent générer des collisions avec d'autres
-silences.
+silences.
@node Gravure du rythme
@@ -962,12 +962,12 @@ silences.
@translationof Displaying rhythms
@menu
-* Métrique::
-* Levées::
-* Musique sans métrique::
-* Notation polymétrique::
-* Découpage automatique des notes::
-* Gravure de lignes rythmiques::
+* Métrique::
+* Levées::
+* Musique sans métrique::
+* Notation polymétrique::
+* Découpage automatique des notes::
+* Gravure de lignes rythmiques::
@end menu
@node Métrique
@@ -996,7 +996,7 @@ La métrique est imprimée en début de morceau, et à chaque fois qu'elle
est modifiée. Si cette modification intervient au niveau d'un saut de
ligne, une métrique @qq{de précaution} sera imprimée avant de passer à
la ligne suivante. Ce comportement par défaut peut être modifié, comme
-indiqué au chapitre @ref{Visibilité des objets}.
+indiqué au chapitre @ref{Visibilité des objets}.
@lilypond[quote,verbatim,relative=2]
\time 2/4
@@ -1034,7 +1034,7 @@ changé pour un style numérique :
@end lilypond
-Les métriques anciennes sont abordées au chapitre
+Les métriques anciennes sont abordées au chapitre
@ref{Métriques anciennes}.
@@ -1070,8 +1070,8 @@ Morceaux choisis :
Références internes :
@rinternals{TimeSignature},
@rinternals{Timing_translator}.
-
-
+
+
@node Levées
@unnumberedsubsubsec Levées
@translationof Upbeats
@@ -1137,7 +1137,7 @@ Références internes :
@knownissues
-@code{\partial} n'est destiné à être utilisé qu'en début de pièce.
+@code{\partial} n'est destiné à être utilisé qu'en début de pièce.
Si on l'utilise ailleurs qu'au début, des messages d'erreurs peuvent
s'afficher.
@@ -1263,7 +1263,7 @@ Il suffit, pour obtenir cette forme de notation, de tout d'abord affecter
une même métrique aux différentes portées. L'indicateur de métrique sera
ensuite remplacé dans chacune des portées par un quotient donné en
argument à la propriété @code{timeSignatureFraction}. La durée des
-notes sera enfin proratisée selon la métrique commune (voir
+notes sera enfin proratisée selon la métrique commune (voir
@ref{Métrique}) grâce à la fonction @code{\scaleDurations}, qui
s'utilise tout comme la commande @code{\times} -- sans toutefois créer
de crochet de nolet (voir @ref{Changement d'échelle des durées}).
@@ -1272,7 +1272,7 @@ de crochet de nolet (voir @ref{Changement d'échelle des durées}).
@cindex polymétrie et ligature
L'exemple suivant utilise parallèlement des mesures à 3/4, 9/8 et
-10/8. Pour la deuxième portée les durées sont multipliées par 2/3
+10/8. Pour la deuxième portée les durées sont multipliées par 2/3
de telle sorte que @w{2/3 * 9/8 = 3/4} ; pour la troisième elles sont
multipliées par 3/5, de telle sorte que @w{3/5 * 10/8 = 3/4}. Les
ligatures devront être explicites, la fonction d'échelonnement venant
@@ -1531,10 +1531,10 @@ Référence du programme :
@translationof Beams
@menu
-* Barres de ligature automatiques::
-* Définition des règles de ligature automatique::
-* Barres de ligature manuelles::
-* Liens de croches en soufflet::
+* Barres de ligature automatiques::
+* Définition des règles de ligature automatique::
+* Barres de ligature manuelles::
+* Liens de croches en soufflet::
@end menu
@node Barres de ligature automatiques
@@ -1559,7 +1559,7 @@ d'imprimer les ligatures.
@end lilypond
Lorsque ce comportement automatisé n'est pas satisfaisant, on peut
-définir des groupements manuellement -- voir
+définir des groupements manuellement -- voir
@ref{Barres de ligature manuelles}. Dans le cas où le groupe de notes
en question contient un silence, il est @strong{impératif} d'indiquer
explicitement les début et fin de la ligature.
@@ -1643,9 +1643,10 @@ altérations appartenant à d'autres voix.
@cindex paroles et ligatures
@funindex autoBeaming
-@funindex beamSettings
+@funindex beamExceptions
+@funindex baseMoment
+@funindex beatStructure
@funindex measureLength
-@funindex beatLength
@funindex \time
@funindex time
@funindex \set
@@ -1669,7 +1670,7 @@ toujours respectée ; sinon
sinon
@item si une règle explicite de terminaison a été définie pour un type
-de ligature dans la métrique en cours, c'est elle qui s'appliquera ; sinon
+de ligature dans la métrique en cours, c'est elle qui s'appliquera ; sinon
@item if a default beam-ending rule is defined in the time signature,
use it to group notes with beams, otherwise
@@ -1693,7 +1694,7 @@ pour plus d'information, consultez @ref{Gestion du temps}.
Les règles de ligature et de subdivision sont enregistrées dans la
propriété @code{beamSettings}. Ses valeurs par défaut, rangées par
métrique et type de règle, sont contenues dans le fichier
-@code{scm/@/beam@/-settings@/.scm}.
+@code{scm/@/beam@/-settings@/.scm}.
La métrique est constituée d'une paire en langage Scheme -- p.ex.
@w{@code{#'(4 . 4)}}.
@@ -1703,7 +1704,7 @@ terminaisons, soit @code{#'subdivide} pour les subdivisions.
Chaque règle, qu'il s'agisse de terminaison ou de subdivision, est
constituée d'une liste de paires en langage Scheme (un @emph{alist} pour
-les puristes), qui indique le durée de base et sa règle de regroupement.
+les puristes), qui indique le durée de base et sa règle de regroupement.
@example
#'((durée-type1 . groupement-1)
@@ -1714,24 +1715,24 @@ les puristes), qui indique le durée de base et sa règle de regroupement.
@var{durée-type} est soit constitué d'une paire indiquant la durée de
base -- par exemple @w{@code{(1 . 16)}}, soit du caractère @code{*} pour
indiquer une règle par défaut qui s'appliquera à toutes les ligatures en
-l'absence de règle explicite.
+l'absence de règle explicite.
@var{groupement} est constitué d'une liste Scheme qui indique le
regroupement à effectuer. En ce qui concerne les règles par défaut --
celles où la durée type est @code{*} -- le regroupement s'indique
en terme de @code{beatLength} ; pour les règles explicites, en durée
-type.
+type.
-Les règles de ligature automatique se modifient à l'aide des commandes
+Les règles de ligature automatique se modifient à l'aide des commandes
@code{\overrideBeamSettings} et @code{\revertBeamSettings}.
@lilypond[quote,relative=2,verbatim]
- \time 5/16
- c8^"beats" c16 c8 |
- \overrideBeamSettings #'Score #'(5 . 16) #'end #'((* . (2 3)))
- c8^"(2+3)" c16 c8
- \overrideBeamSettings #'Score #'(5 . 16) #'end #'((* . (3 2)))
- c8^"(3+2)" c16 c8
+\time 5/16
+c8^"beats" c16 c8 |
+\set beatStructure = #'(2 3)
+c8^"(2+3)" c16 c8
+\set beatStructure = #'(3 2)
+c8^"(3+2)" c16 c8
@end lilypond
Les effets de règles de ligature peuvent être restreints à un contexte
@@ -1740,22 +1741,24 @@ contexte de niveau inférieur, les règles définies au niveau directement
supérieur s'appliqueront.
@lilypond[quote, verbatim,relative=1]
-\new Staff <<
+\new Staff {
\time 7/8
- \new Voice = one {
- \relative c'' {
- \overrideBeamSettings #'Staff #'(7 . 8) #'end #'((* . (2 3 2)))
+ \set Staff.beatStructure = #'(2 3 2)
+ <<
+ \new Voice = one {
+ \relative c'' {
a8 a a a a a a
+ }
}
- }
- \new Voice = two {
- \relative c' {
- \voiceTwo
- \overrideBeamSettings #'Voice #'(7 . 8) #'end #'((* . (1 3 3)))
- f8 f f f f f f
+ \new Voice = two {
+ \relative c' {
+ \voiceTwo
+ \set Voice.beatStructure = #'(1 3 3)
+ f8 f f f f f f
+ }
}
- }
->>
+ >>
+}
@end lilypond
Lorsque plusieurs voix cohabitent sur une même portée et que les règles
@@ -1765,14 +1768,14 @@ ces règles affectent le contexte @code{Staff} :
@lilypond[quote,verbatim,relative=2]
\time 7/8
% rhythm 3-1-1-2
-% Context Voice specified - does not work correctly
+% Context Voice specified -- does not work correctly
% Because of autogenerated voices, all beating will
-% be at beatLength (1 . 8)
-\overrideBeamSettings #'Voice #'(7 . 8) #'end #'((* . (3 1 1 2)))
+% be at baseMoment (1 . 8)
+\set beatStructure = #'(3 1 1 2)
<< {a8 a a a16 a a a a8 a} \\ {f4. f8 f f f} >>
% Works correctly with context Staff specified
-\overrideBeamSettings #'Staff #'(7 . 8) #'end #'((* . (3 1 1 2)))
+\set Staff.beatStructure = #'(3 1 1 2)
<< {a8 a a a16 a a a a8 a} \\ {f4. f8 f f f} >>
@end lilypond
@@ -1790,13 +1793,13 @@ règles de regroupement.
@lilypond[quote,verbatim,relative=2]
\time 4/4
-\repeat unfold 16 {a16}
-% set default rule for (1 1 1 1) grouping
-\overrideBeamSettings #'Score #'(4 . 4) #'end #'((* . (1 1 1 1)))
-\repeat unfold 16 {a16}
-% revert the new rule
-\revertBeamSettings #'Score #'(4 . 4) #'end
-\repeat unfold 16 {a16}
+\repeat unfold 8 {a8}
+% set beaming rule for ending all beams at (1 . 4)
+\set Timing.beamExceptions = #'()
+\repeat unfold 8 {a8}
+% go back to default beahavior
+\time 4/4
+\repeat unfold 8 {a8}
@end lilypond
@snippets
@@ -1804,7 +1807,7 @@ règles de regroupement.
@cindex beams, subdividing
@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
-{sub-dividing-beams.ly}
+{subdividing-beams.ly}
@cindex measure groupings
@cindex beats, grouping
@@ -1883,7 +1886,7 @@ Lorsque l'une ou l'autre de ces propriétés est définie, elle ne
s'applique qu'une seule fois, après quoi sa définition est effacée.
Dans l'exemple qui suit, le dernier @code{fa} n'a de ligature
supplémentaire que sur sa gauche ; autrement dit, c'est la ligature à la
-croche qui est importante.
+croche qui est importante.
@lilypond[quote,relative=2,verbatim]
a8[ r16 f g a]
@@ -1952,7 +1955,7 @@ quatre dernières gardent un tempo régulier.
@noindent
Si le résultat imprimable ne reflète les durées que de manière
approximative, la sortie MIDI sera quant à elle parfaitement
-@qq{ponctuelle}.
+@qq{ponctuelle}.
@knownissues
@@ -1971,10 +1974,10 @@ Morceaux choisis :
@menu
-* Barres de mesure::
-* Numéros de mesure::
-* Vérification des limites et numéros de mesure::
-* Indications de repère::
+* Barres de mesure::
+* Numéros de mesure::
+* Vérification des limites et numéros de mesure::
+* Indications de repère::
@end menu
@node Barres de mesure
@@ -2027,7 +2030,7 @@ de barre de mesure visible, en utilisant :
Ceci insérera une barre de mesure invisible, et permettra -- sans pour
autant le forcer -- de sauter de ligne à cet endroit, sans incrémenter
le numéro de mesure. Pour forcer le saut de ligne, référez-vous à
-@ref{Sauts de ligne}.
+@ref{Sauts de ligne}.
@cindex manuelle, barre de mesure
@cindex barre de mesure manuelle
@@ -2038,7 +2041,7 @@ d'une mesure, elles remplacent la simple barre que LilyPond aurait
insérée automatiquement. Dans le cas contraire, la barre spécifiée
s'insérera là où vous l'aurez positionnée. Ces insertions n'affectent
en rien le calcul du positionnement automatique des barres de mesure à
-suivre.
+suivre.
Vous disposez de deux types de barres simples et de cinq différentes
doubles barres :
@@ -2117,7 +2120,7 @@ d'un @code{GrandStaff}.
@cindex barre de mesure par défaut, modification du style
-@cindex modification du style par défaut des barres de mesure
+@cindex modification du style par défaut des barres de mesure
@snippets
@@ -2128,26 +2131,26 @@ d'un @code{GrandStaff}.
@funindex bartype
-La commande @code{\bar }@var{type_de_barre} sert de raccourci pour
+La commande @code{\bar }@var{type_de_barre} sert de raccourci pour
@code{\set Timing.whichBar = }@var{type_de_barre}. Dès que l'on définit
@code{whichBar}, une barre de mesure est créée selon le style défini.
-Le type de barre de mesure par défaut utilisé pour l'insertion
+Le type de barre de mesure par défaut utilisé pour l'insertion
automatique est @code{"|"}. Vous pouvez en changer à tout moment grâce
à @code{\set@tie{}Timing.defaultBarType@tie{}=@tie{}}@var{type_de_barre}.
@seealso
-Dans ce manuel :
-@ref{Sauts de ligne},
-@ref{Répétitions et reprises},
+Dans ce manuel :
+@ref{Sauts de ligne},
+@ref{Répétitions et reprises},
@ref{Regroupement de portées}.
Morceaux choisis :
@rlsr{Rhythms}.
-Référence du programme :
-@rinternals{BarLine} (faisant partie du contexte @rinternals{Staff}),
+Référence du programme :
+@rinternals{BarLine} (faisant partie du contexte @rinternals{Staff}),
@rinternals{SpanBar} (sur plusieurs portées),
@rinternals{Timing_translator} (pour les propriétés liées au temps).
@@ -2229,7 +2232,7 @@ c1 | c | c | c
Morceaux choisis :
@rlsr{Rhythms}.
-Référence du programme :
+Référence du programme :
@rinternals{BarNumber}.
@@ -2435,19 +2438,19 @@ Pour affiner le positionnement des repères, veuillez vous référer à
@seealso
-Dans ce manuel :
+Dans ce manuel :
@ref{La fonte Feta},
@ref{Mise en forme du texte}.
-Fichiers d'initialisation :
+Fichiers d'initialisation :
@file{scm/@/translation@/-functions@/.scm} contient les définitions de
@code{format-mark-numbers} et @code{format-mark-letters}. Elles seront
source d'inspiration pour d'autres fonctions de formatage.
-Morceaux choisis :
+Morceaux choisis :
@rlsr{Rhythms}.
-Référence du programme :
+Référence du programme :
@rinternals{RehearsalMark}.
@@ -2457,9 +2460,9 @@ Référence du programme :
@menu
-* Notes d'ornement::
-* Alignement et cadences::
-* Gestion du temps::
+* Notes d'ornement::
+* Alignement et cadences::
+* Gestion du temps::
@end menu
@node Notes d'ornement
@@ -2600,13 +2603,13 @@ Glossaire musicologique :
@rglos{acciaccatura},
@rglos{appoggiatura}.
-Fichiers source :
+Fichiers source :
@file{ly/@/grace@/-init@/.ly}.
-Morceaux choisis :
+Morceaux choisis :
@rlsr{Rhythms}.
-Référence du programme :
+Référence du programme :
@rinternals{GraceMusic}.
@@ -2664,7 +2667,7 @@ Dans un contexte orchestral, une cadence constitue un problème
spécifique. Lors du montage d'une partition contenant une cadence,
tous les autres instruments doivent sauter autant de notes que ce
qu'en comporte la cadence, faute de quoi ils démarreraient trop tôt ou
-trop tard.
+trop tard.
Les fonctions @code{mmrest-of-length} ou @code{skip-of-length}
permettent de résoudre ce problème. Ces fonctions Scheme prennent en
@@ -2771,8 +2774,8 @@ Par conséquent, @code{ly:make-moment 1 8} correspond à une croche, et
@seealso
-Dans ce manuel :
-@ref{Numéros de mesure},
+Dans ce manuel :
+@ref{Numéros de mesure},
@ref{Musique sans métrique}
Morceaux choisis :
diff --git a/Documentation/notation/rhythms.itely b/Documentation/notation/rhythms.itely
index ba49de1003..28c1dd87be 100644
--- a/Documentation/notation/rhythms.itely
+++ b/Documentation/notation/rhythms.itely
@@ -1044,6 +1044,72 @@ changed to a numeric style:
Mensural time signatures are covered in
@ref{Mensural time signatures}.
+@cindex time signature default settings
+@cindex autobeaming properties for time signatures
+@cindex beaming, time signature default properties
+@funindex \overrideTimeSignatureSettings
+
+In addition to setting the printed time signature, the @code{\time}
+command also sets time-signature-based default values for the properties
+@code{baseMoment}, @code{beatStructure}, and @code{beamExceptions}. The
+predefined default values for these properties can be found in
+@file{scm/time-signature-settings.scm}. The existing default values can
+be changed, or new default values can be added:
+
+@lilypond[quote,verbatim]
+\score {
+ \relative c' {
+ \overrideTimeSignatureSettings
+ #'Score
+ #'(4 . 4) % time signature fraction
+ #'(1 . 4) % base moment fraction
+ #'(3 1) % beatStructure
+ #'() % beamExceptions
+ \time 4/4
+ \repeat unfold 8 c8 |
+ }
+}
+@end lilypond
+
+@code{\overrideTimeSignatureSettings} takes five arguments:
+context, time signature fraction, base moment, beat structure, and
+beaming exception. The context is a Scheme symbol that describes
+the context to which the default setting will apply. The
+time signature fraction is a Scheme pair describing the time signature.
+The base moment is a Scheme pair containing the
+numerator and denominator of the basic timing unit for the
+time signature. The beat structure is a Scheme list indicating
+the structure of the beats in the measure, in units of the base moment.
+The beaming exception is an alist containing any beaming rules for the
+time signature that go beyond ending at every beat,
+as described in @ref{Setting automatic beam behavior}.
+
+@cindex time signature properties, restoring default values
+@cindex restoring default properties for time signatures
+@funindex \revertTimeSignatureSettings
+
+Changed values of default time signature properties can be restored
+to the original values:
+
+@lilypond[quote,verbatim]
+
+\score{
+ \relative c' {
+ \repeat unfold 8 c8 |
+ \overrideTimeSignatureSettings
+ #'Score
+ #'(4 . 4)
+ #'(1 . 4)
+ #'(3 1)
+ #'((end . (((1 . 8) . (3 1)))))
+ \time 4/4
+ \repeat unfold 8 c8 |
+ \revertTimeSignatureSettings #'Score #'(4 . 4)
+ \time 4/4
+ \repeat unfold 8 c8 |
+ }
+}
+@end lilypond
@predefined
@code{\numericTimeSignature},
@@ -1661,19 +1727,18 @@ Beams can collide with note heads and accidentals in other voices.
@cindex lyrics and beaming
@funindex autoBeaming
-@funindex beamSettings
+@funindex baseMoment
+@funindex beamExceptions
+@funindex beatStructure
@funindex measureLength
-@funindex beatLength
@funindex \time
@funindex time
@funindex \set
@funindex set
-The placement of automatic beams is determined by the time signature.
-Three types of rules are used for determining the end of automatic
-beams: @emph{default} rules
-for the time signature, @emph{explicit} rules for the beam in the time
-signature, and the @emph{beatLength} for the time signature.
+The placement of automatic beams is determined by the context properties
+@code{baseMoment}, @code{beatStructure}, @code{beamExceptions},
+and @code{autoBeaming}.
The following rules, in order of priority, apply when determining
the appearance of beams:
@@ -1687,38 +1752,47 @@ as specified, otherwise
if @code{\autoBeamOff} is in force do not beam, otherwise
@item
-if an explicit beam-ending rule is defined for the beam type
-in the time signature, use it to determine the valid
-places where beams may end, otherwise
+if a beam-ending rule is defined in @code{beamExceptions}
+for the beam type, use it to determine the valid places where
+beams may end, otherwise
@item
-if a default beam-ending rule is defined in the time signature,
-use it to group notes with beams, otherwise
+if a beam-ending rule is defined in @code{beamExceptions}
+for a larger beam-type, use it to determined the valid places
+where beams may end, otherwise
@item
-use the value of @code{beatLength} to group notes with beams
+use the values of @code{baseMoment} and @code{beatStructure} to
+determine the ends of the beats in the measure, and
+end beams at the end of beats.
@end itemize
+The beam type is the duration of the shortest note in the beamed group.
+If no beam-ending rule is defined for a beam type, the rule for the
+smallest beam-type larger than the current beam is used.
+
@i{@strong{Modifying the grouping of beats}}
-By default @code{beatLength} is
-derived from the time signature set by the @code{\time} command.
-The @code{beatLength} is set to be one over the denominator
-of the time signature.
+By default @code{baseMoment} is set by the @code{\time} command,
+normally to one over the denominator of the time signature.
+Any exceptions to this default
+can be found in @file{scm/@/time@/-signature@/-settings@/.scm}.
+Changing the default value of @code{baseMoment} for a given
+time signature is described in @ref{Time signature}.
-@code{beatLength} is a @i{moment},
+@code{baseMoment} is a @i{moment},
a unit of musical duration. A quantity of type @i{moment} is
created by the scheme function @code{ly:make-moment}. For more
information about this function, see @ref{Time administration}.
-Autobeam settings are stored in the
-@code{beamSettings} property. Default values of @code{beamSettings}
-are determined in @file{scm/@/beam@/-settings@/.scm}. Entries in
-@code{beamSettings} are indexed by time signature and
-rule type.
-
-Time signature should be a scheme pair , e.g. @code{#'(4 . 4)}.
+Special (i.e., other than at the end of the beat) autobeam settings
+are stored in the
+@code{beamExceptions} property. Default values of @code{beamExceptions}
+are established by the @code{\time} command. Default values of
+@code{beamExceptions} for a time signature
+are determined in @file{scm/@/time@/-signature@/-settings@/.scm}.
+Entries in @code{beamExceptions} are indexed by rule type and beam type.
Rule type should be @code{#'end} for beam ending.
@@ -1734,37 +1808,33 @@ beam type.
(beam-type3 . grouping-3))
@end example
-Beam type is either a scheme pair indicating the duration
-of the beam, e.g. @code{(1 . 16)}, or @code{*} to indicate a
-default rule, which applies to all beams if no explicit rule is
-defined.
+Beam type is a scheme pair indicating the duration
+of the beam, e.g., @code{(1 . 16)}.
Grouping is a scheme list indicating the grouping to be applied to
-the beam. For default rules (where beam type is
-@code{*}, the grouping is in units of @code{beatLength}.
-For explicit rules, the grouping is in units of the beam type.
+the beam. The grouping is in units of the beam type.
For reference, the default beaming rules are found in
-@file{scm/beam-settings.scm}.
+@file{scm/time-signature-settings.scm}.
-Beam settings are changed with
-@code{\overrideBeamSettings} and @code{\revertBeamSettings}.
+Alternate values for @code{beamExceptions}
+can be defined using the @code{\set} command.
@warning{
-The ending settings must be
-@emph{complete} rules. That is, every rule that should apply to
-the current time signature must be included in the setting.
-It is not possible to change the grouping of only one beam type
-for a given time signature. While this may seem cumbersome,
+A @code{beamExceptions} value must be
+@emph{complete} exceptions list. That is, every exception that should
+be applied must be included in the setting.
+It is not possible to add, remove, or change only one of the exceptions.
+While this may seem cumbersome,
it means that the current beaming settings need not be known
in order to specify a new beaming pattern.}
@lilypond[quote,relative=2,verbatim]
\time 5/16
c8^"beats" c16 c8 |
-\overrideBeamSettings #'Score #'(5 . 16) #'end #'((* . (2 3)))
+\set beatStructure = #'(2 3)
c8^"(2+3)" c16 c8
-\overrideBeamSettings #'Score #'(5 . 16) #'end #'((* . (3 2)))
+\set beatStructure = #'(3 2)
c8^"(3+2)" c16 c8
@end lilypond
@@ -1773,22 +1843,24 @@ setting is included in a lower-level context, the setting of the
enclosing context will apply.
@lilypond[quote, verbatim,relative=1]
-\new Staff <<
+\new Staff {
\time 7/8
- \new Voice = one {
- \relative c'' {
- \overrideBeamSettings #'Staff #'(7 . 8) #'end #'((* . (2 3 2)))
+ \set Staff.beatStructure = #'(2 3 2)
+ <<
+ \new Voice = one {
+ \relative c'' {
a8 a a a a a a
+ }
}
- }
- \new Voice = two {
- \relative c' {
- \voiceTwo
- \overrideBeamSettings #'Voice #'(7 . 8) #'end #'((* . (1 3 3)))
- f8 f f f f f f
+ \new Voice = two {
+ \relative c' {
+ \voiceTwo
+ \set Voice.beatStructure = #'(1 3 3)
+ f8 f f f f f f
+ }
}
- }
->>
+ >>
+}
@end lilypond
When multiple voices are used the @code{Staff} context must be
@@ -1800,51 +1872,36 @@ staff:
% rhythm 3-1-1-2
% Context Voice specified -- does not work correctly
% Because of autogenerated voices, all beating will
-% be at beatLength (1 . 8)
-\overrideBeamSettings #'Voice #'(7 . 8) #'end #'((* . (3 1 1 2)))
+% be at baseMoment (1 . 8)
+\set beatStructure = #'(3 1 1 2)
<< {a8 a a a16 a a a a8 a} \\ {f4. f8 f f f} >>
% Works correctly with context Staff specified
-\overrideBeamSettings #'Staff #'(7 . 8) #'end #'((* . (3 1 1 2)))
+\set Staff.beatStructure = #'(3 1 1 2)
<< {a8 a a a16 a a a a8 a} \\ {f4. f8 f f f} >>
@end lilypond
-@funindex revertBeamSettings
-
-Beam settings can be reverted to get back to default behavior. This
-is accomplished by using @code{\revertBeamSettings}. The arguments
-are the same as for @code{\overrideBeamSettings}, except no value
-for @var{grouping} is given:
-
-@example
-\revertBeamSettings context time-signature rule-type
-@end example
-
+Beam settings can be set back to default behavior. This
+is accomplished by setting the time signature.
@lilypond[quote,verbatim,relative=2]
\time 4/4
\repeat unfold 8 {a8}
-% set default rule for (1 1 1 1) grouping
-\overrideBeamSettings #'Score #'(4 . 4) #'end #'((* . (1 1 1 1)))
+% eliminate beam exception that groups beats 1, 2 and 3, 4
+\set Timing.beamExceptions = #'()
\repeat unfold 8 {a8}
-% revert the new rule
-\revertBeamSettings #'Score #'(4 . 4) #'end
+% go back to default behavior
+\time 4/4
\repeat unfold 8 {a8}
@end lilypond
-@predefined
-@code{\overrideBeamSettings},
-@code{\revertBeamSettings}.
-@endpredefined
-
-
@snippets
@cindex beams, subdividing
@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
-{sub-dividing-beams.ly}
+{subdividing-beams.ly}
@cindex measure groupings
@cindex beats, grouping
diff --git a/Documentation/snippets/adding-fingerings-to-tablatures.ly b/Documentation/snippets/adding-fingerings-to-tablatures.ly
index 304c32be95..9444de62d7 100644
--- a/Documentation/snippets/adding-fingerings-to-tablatures.ly
+++ b/Documentation/snippets/adding-fingerings-to-tablatures.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.17
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/adjusting-lyrics-vertical-spacing.ly b/Documentation/snippets/adjusting-lyrics-vertical-spacing.ly
index 9c391c5899..9d55482f52 100644
--- a/Documentation/snippets/adjusting-lyrics-vertical-spacing.ly
+++ b/Documentation/snippets/adjusting-lyrics-vertical-spacing.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.16
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/ancient-headword.ly b/Documentation/snippets/ancient-headword.ly
index 78d901b873..72ad5d5ae6 100644
--- a/Documentation/snippets/ancient-headword.ly
+++ b/Documentation/snippets/ancient-headword.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
#(set-global-staff-size 15)
\paper {
diff --git a/Documentation/snippets/automatic-beam-subdivisions.ly b/Documentation/snippets/automatic-beam-subdivisions.ly
index 6711dd6bdd..d77e6e1c20 100644
--- a/Documentation/snippets/automatic-beam-subdivisions.ly
+++ b/Documentation/snippets/automatic-beam-subdivisions.ly
@@ -1,11 +1,10 @@
-%% Do not edit this file; it is automatically
-%% generated from LSR http://lsr.dsi.unimi.it
-%% This file is in the public domain.
-\version "2.13.20"
+% Do not edit this file; it is automatically
+% generated from Documentation/snippets/new
+% This file is in the public domain.
+%% Note: this file works from version 2.13.29
+\version "2.13.29"
\header {
- lsrtags = "rhythms"
-
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
texidoces = "
Se pueden subdividir las barras automáticamente. Estableciendo la
@@ -15,15 +14,18 @@ posiciones de pulso (tal y como se especifica en @code{beatLength}).
"
doctitlees = "Subdivisiones de barra automáticas"
+ lsrtags = "rhythms"
+
texidoc = "
Beams can be subdivided automatically. By setting the property
@code{subdivideBeams}, beams are subdivided at beat positions (as
-specified in @code{beatLength}).
+specified in @code{baseMoment}).
"
doctitle = "Automatic beam subdivisions"
} % begin verbatim
+
\new Staff {
\relative c'' {
<<
@@ -40,10 +42,12 @@ specified in @code{beatLength}).
}
>>
\oneVoice
- \set beatLength = #(ly:make-moment 1 8)
- b32^"beatLength 1 8"[ a g f c' b a g]
- \set beatLength = #(ly:make-moment 1 16)
- b32^"beatLength 1 16"[ a g f c' b a g]
+ \set baseMoment = #(ly:make-moment 1 8)
+ \set beatStructure = #'(2 2 2 2)
+ b32^"baseMoment 1 8"[ a g f c' b a g]
+ \set baseMoment = #(ly:make-moment 1 16)
+ \set beatStructure = #'(4 4 4 4)
+ b32^"baseMoment 1 16"[ a g f c' b a g]
}
}
diff --git a/Documentation/snippets/beam-endings-in-score-context.ly b/Documentation/snippets/beam-endings-in-score-context.ly
index 81fba58c34..869384b083 100644
--- a/Documentation/snippets/beam-endings-in-score-context.ly
+++ b/Documentation/snippets/beam-endings-in-score-context.ly
@@ -1,8 +1,8 @@
% Do not edit this file; it is automatically
% generated from Documentation/snippets/new
% This file is in the public domain.
-%% Note: this file works from version 2.13.4
-\version "2.13.20"
+%% Note: this file works from version 2.13.29
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
@@ -38,7 +38,7 @@ moduler au niveau @code{Staff} ou @code{Voice} :
lsrtags = "rhythms"
texidoc = "
-Beam-ending rules specified in the @code{Score} context apply to all
+Beat structure rules specified in the @code{Score} context apply to all
staves, but can be modified at both @code{Staff} and @code{Voice}
levels:
"
@@ -49,18 +49,15 @@ levels:
\relative c'' {
\time 5/4
% Set default beaming for all staves
- \overrideBeamSettings #'Score #'(5 . 4) #'end
- #'(((1 . 8) . (3 4 3))
- ((1 . 16) . (6 8 6))
- ((1 . 32) . (12 16 12)))
+ \set Score.baseMoment = #(ly:make-moment 1 8)
+ \set Score.beatStructure = #'(3 4 3)
<<
\new Staff {
c8 c c c c c c c c c
}
\new Staff {
% Modify beaming for just this staff
- \overrideBeamSettings #'Staff #'(5 . 4) #'end
- #'((* . (3 2)))
+ \set Staff.beatStructure = #'(6 4)
c8 c c c c c c c c c
}
\new Staff {
@@ -73,8 +70,7 @@ levels:
% Modify beaming for this voice only
\new Voice {
\voiceTwo
- \overrideBeamSettings #'Voice #'(5 . 4) #'end
- #'((* . (3 2)))
+ \set Voice.beatStructure = #'(6 4)
a8 a a a a a a a a a
}
>>
diff --git a/Documentation/snippets/beam-grouping-in-7-8-time.ly b/Documentation/snippets/beam-grouping-in-7-8-time.ly
index 35ed8b3e74..d7ffd2df8d 100644
--- a/Documentation/snippets/beam-grouping-in-7-8-time.ly
+++ b/Documentation/snippets/beam-grouping-in-7-8-time.ly
@@ -1,8 +1,8 @@
% Do not edit this file; it is automatically
% generated from Documentation/snippets/new
% This file is in the public domain.
-%% Note: this file works from version 2.13.4
-\version "2.13.20"
+%% Note: this file works from version 2.13.29
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
@@ -40,10 +40,10 @@ il faudra donc définir les terminaisons de 2/8 et 5/8 :
lsrtags = "rhythms"
texidoc = "
-There are no default automatic beam groupings specified for 7/8 time,
-so if automatic beams are required the grouping must be specified. For
-example, to group all beams 2-3-2 in 7/8 time, specify beam endings at
-2/8 and 5/8:
+There is no default beat structure specified for 7/8 time,
+so if automatic beams are required the structure must be specified. For
+example, to group all beams 2-3-2 in 7/8 time, specify the
+beat structure to be (2 3 2):
"
doctitle = "Beam grouping in 7/8 time"
} % begin verbatim
@@ -53,7 +53,6 @@ example, to group all beams 2-3-2 in 7/8 time, specify beam endings at
\time 7/8
% rhythm 2-3-2
a8 a a a a a a
- \overrideBeamSettings #'Score #'(7 . 8) #'end
- #'((* . (2 3 2)))
+ \set Score.beatStructure = #'(2 3 2)
a8 a a a a a a
}
diff --git a/Documentation/snippets/centering-markup-on-note-heads-automatically.ly b/Documentation/snippets/centering-markup-on-note-heads-automatically.ly
index 75ba91aeac..36fb7ffc49 100644
--- a/Documentation/snippets/centering-markup-on-note-heads-automatically.ly
+++ b/Documentation/snippets/centering-markup-on-note-heads-automatically.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.15
-\version "2.13.20"
+\version "2.13.29"
\header {
lsrtags = "text, tweaks-and-overrides, contexts-and-engravers"
diff --git a/Documentation/snippets/changing-the-ambitus-gap.ly b/Documentation/snippets/changing-the-ambitus-gap.ly
index 7140808d14..3cc767fb40 100644
--- a/Documentation/snippets/changing-the-ambitus-gap.ly
+++ b/Documentation/snippets/changing-the-ambitus-gap.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.26
-\version "2.13.26"
+\version "2.13.29"
\header {
lsrtags = "pitches"
texidoc = "It is possible to change the default gap setting for
diff --git a/Documentation/snippets/changing-the-number-of-augmentation-dots-per-note.ly b/Documentation/snippets/changing-the-number-of-augmentation-dots-per-note.ly
index 7d4e7dd538..7d5703d6ad 100644
--- a/Documentation/snippets/changing-the-number-of-augmentation-dots-per-note.ly
+++ b/Documentation/snippets/changing-the-number-of-augmentation-dots-per-note.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.26
-\version "2.13.26"
+\version "2.13.29"
\header {
lsrtags = "rhythms,expressive-marks"
texidoc = "This code demonstrates how to change the number of
diff --git a/Documentation/snippets/changing-the-time-signature-without-affecting-the-beaming.ly b/Documentation/snippets/changing-the-time-signature-without-affecting-the-beaming.ly
index 1c82852d31..ed0cd298aa 100644
--- a/Documentation/snippets/changing-the-time-signature-without-affecting-the-beaming.ly
+++ b/Documentation/snippets/changing-the-time-signature-without-affecting-the-beaming.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.5
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/chordchanges-for-fretboards.ly b/Documentation/snippets/chordchanges-for-fretboards.ly
index cd10b27309..2ba6b2f5be 100644
--- a/Documentation/snippets/chordchanges-for-fretboards.ly
+++ b/Documentation/snippets/chordchanges-for-fretboards.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.0
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/chords-headword.ly b/Documentation/snippets/chords-headword.ly
index 13c85d253f..71702df05c 100644
--- a/Documentation/snippets/chords-headword.ly
+++ b/Documentation/snippets/chords-headword.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
#(set-global-staff-size 15)
\paper {
ragged-right = ##f
diff --git a/Documentation/snippets/clip-systems.ly b/Documentation/snippets/clip-systems.ly
index a0e353663b..ed9b437efd 100644
--- a/Documentation/snippets/clip-systems.ly
+++ b/Documentation/snippets/clip-systems.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.4
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/compound-time-signatures.ly b/Documentation/snippets/compound-time-signatures.ly
index 7002435143..bd00f68e29 100644
--- a/Documentation/snippets/compound-time-signatures.ly
+++ b/Documentation/snippets/compound-time-signatures.ly
@@ -1,8 +1,8 @@
% Do not edit this file; it is automatically
% generated from Documentation/snippets/new
% This file is in the public domain.
-%% Note: this file works from version 2.13.4
-\version "2.13.20"
+%% Note: this file works from version 2.13.29
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
@@ -68,8 +68,7 @@ database.)
\relative c' {
\override Staff.TimeSignature #'stencil = #(compound-time "2" "3" "8")
\time 5/8
- \overrideBeamSettings #'Staff #'(5 . 8) #'end
- #'((* . (2 3)))
+ \set Staff.beatStructure = #'(2 3)
c8 d e fis gis
c8 fis, gis e d
c8 d e4 gis8
diff --git a/Documentation/snippets/conducting-signs,-measure-grouping-signs.ly b/Documentation/snippets/conducting-signs,-measure-grouping-signs.ly
index 91ce1bd121..7ab1b0d703 100644
--- a/Documentation/snippets/conducting-signs,-measure-grouping-signs.ly
+++ b/Documentation/snippets/conducting-signs,-measure-grouping-signs.ly
@@ -1,8 +1,8 @@
% Do not edit this file; it is automatically
% generated from Documentation/snippets/new
% This file is in the public domain.
-%% Note: this file works from version 2.13.4
-\version "2.13.20"
+%% Note: this file works from version 2.13.29
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
@@ -66,29 +66,39 @@ règles par défaut contenues dans le fichier @w{@code{scm/beam-settings.scm}}.
lsrtags = "rhythms"
texidoc = "
-Beat grouping within a bar is controlled by the default grouping
-established in @code{beamSettings}. This grouping can be established
-by the use of @code{\\overrideBeamSettings}. Alternatively, the
+Beat grouping within a measure is controlled by the context property
+@code{beatStructure}. Values of @code{beatStructure} are
+established for many time signatures in
+@file{scm/time-signature-settings.scm}. Values of @code{beatStructure}
+can be changed or set with @code{\set}.
+Alternatively, the
Scheme function @code{set-time-signature} can be used to both
-set the time signature and establish the default grouping rule.
+set the time signature and establish the beat structure.
@code{set-time-signature}, takes three arguments: the
number of beats, the beat length, and the internal grouping of beats in
-the measure. If the @code{Measure_grouping_engraver} is included
+the measure. @code{\time} and @code{set-time-signature} both apply
+to the @code{Timing} context, so they will not reset values of
+@code{beatStructure} or @code{baseMoment} that are set in
+other lower-level contexts, such as @code{Voice}.
+
+If the @code{Measure_grouping_engraver} is included
in one of the display contexts, measure grouping signs will be
created. Such signs ease reading rhythmically complex modern music.
In the example, the 9/8 measure is grouped in two different
patterns using the two different methods, while the 5/8 measure
is grouped according to the default setting in
-@file{scm/beam-settings.scm}:
+@file{scm/time-signature-settings.scm}:
"
doctitle = "Conducting signs measure grouping signs"
} % begin verbatim
+
\score {
- \relative c'' {
+ \new Voice \relative c'' {
\time 9/8
- \overrideBeamSettings #'Score #'(9 . 8) #'end #'((* . (2 2 2 3)))
+ g8 g d d g g a( bes g) |
+ \set Timing.beatStructure = #'(2 2 2 3)
g8 g d d g g a( bes g) |
#(set-time-signature 9 8 '(4 5))
g8 g d d g g a( bes g) |
diff --git a/Documentation/snippets/controlling-spanner-visibility-after-a-line-break.ly b/Documentation/snippets/controlling-spanner-visibility-after-a-line-break.ly
index 48435647c0..fdcc88444e 100644
--- a/Documentation/snippets/controlling-spanner-visibility-after-a-line-break.ly
+++ b/Documentation/snippets/controlling-spanner-visibility-after-a-line-break.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.1
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/defining-an-engraver-in-scheme-ambitus-engraver.ly b/Documentation/snippets/defining-an-engraver-in-scheme-ambitus-engraver.ly
index ae677a0515..50d6c675c0 100644
--- a/Documentation/snippets/defining-an-engraver-in-scheme-ambitus-engraver.ly
+++ b/Documentation/snippets/defining-an-engraver-in-scheme-ambitus-engraver.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.15
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/displaying-complex-chords.ly b/Documentation/snippets/displaying-complex-chords.ly
index a0d79ddad5..72a5758843 100644
--- a/Documentation/snippets/displaying-complex-chords.ly
+++ b/Documentation/snippets/displaying-complex-chords.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.1
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/displaying-grob-ancestry.ly b/Documentation/snippets/displaying-grob-ancestry.ly
index 2bc28f49ba..4254e0a34c 100644
--- a/Documentation/snippets/displaying-grob-ancestry.ly
+++ b/Documentation/snippets/displaying-grob-ancestry.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.10
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/dodecaphonic-style-accidentals-for-each-note-including-naturals.ly b/Documentation/snippets/dodecaphonic-style-accidentals-for-each-note-including-naturals.ly
index b97a987d9c..ccbbe5901d 100644
--- a/Documentation/snippets/dodecaphonic-style-accidentals-for-each-note-including-naturals.ly
+++ b/Documentation/snippets/dodecaphonic-style-accidentals-for-each-note-including-naturals.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.4
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/dynamics-custom-text-spanner-postfix.ly b/Documentation/snippets/dynamics-custom-text-spanner-postfix.ly
index 6fcb5e091f..b3c97576a2 100644
--- a/Documentation/snippets/dynamics-custom-text-spanner-postfix.ly
+++ b/Documentation/snippets/dynamics-custom-text-spanner-postfix.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.8
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/dynamics-text-spanner-postfix.ly b/Documentation/snippets/dynamics-text-spanner-postfix.ly
index cf14ac19ca..f847cf07cf 100644
--- a/Documentation/snippets/dynamics-text-spanner-postfix.ly
+++ b/Documentation/snippets/dynamics-text-spanner-postfix.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.20
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/editorial-headword.ly b/Documentation/snippets/editorial-headword.ly
index 0027caee34..ed285dbf64 100644
--- a/Documentation/snippets/editorial-headword.ly
+++ b/Documentation/snippets/editorial-headword.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
\include "english.ly"
#(set-global-staff-size 15)
\paper {
diff --git a/Documentation/snippets/expressive-headword.ly b/Documentation/snippets/expressive-headword.ly
index 8aa2a824cb..5b887eea2c 100644
--- a/Documentation/snippets/expressive-headword.ly
+++ b/Documentation/snippets/expressive-headword.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
\include "english.ly"
#(set-global-staff-size 15)
\paper {
diff --git a/Documentation/snippets/faking-a-hammer-in-tablatures.ly b/Documentation/snippets/faking-a-hammer-in-tablatures.ly
index 3e8d0d09c6..d984633376 100644
--- a/Documentation/snippets/faking-a-hammer-in-tablatures.ly
+++ b/Documentation/snippets/faking-a-hammer-in-tablatures.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.4
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/figured-bass-headword.ly b/Documentation/snippets/figured-bass-headword.ly
index d006468a22..4203bf7cdd 100644
--- a/Documentation/snippets/figured-bass-headword.ly
+++ b/Documentation/snippets/figured-bass-headword.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
#(set-global-staff-size 15)
\paper {
ragged-right = ##f
diff --git a/Documentation/snippets/flamenco-notation.ly b/Documentation/snippets/flamenco-notation.ly
index 84ddb69dd3..fa1b55cea3 100644
--- a/Documentation/snippets/flamenco-notation.ly
+++ b/Documentation/snippets/flamenco-notation.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.10
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/fretted-headword.ly b/Documentation/snippets/fretted-headword.ly
index c387787149..30888bd249 100644
--- a/Documentation/snippets/fretted-headword.ly
+++ b/Documentation/snippets/fretted-headword.ly
@@ -1,13 +1,13 @@
% Do not edit this file; it is automatically
% generated from Documentation/snippets/new
% This file is in the public domain.
-%% Note: this file works from version 2.13.20
+%% Note: this file works from version 2.13.29
% INSPIRATIONAL HEADER FOR LILYPOND DOCUMENTATION fretted-strings %
% Passage from Johann Kaspar Mertz "Opern Revue, Op. 8, no. 17" %
% on melodies from Bellini's "Norma" %
%*****************************************************************%
-\version "2.13.20"
+\version "2.13.29"
#(set-global-staff-size 15)
\paper {
@@ -119,9 +119,7 @@ bass = \relative c {
e,1 | % m. 4
%% new section starts here in A minor
- \overrideBeamSettings #'Score #'(4 . 4) #'end
- #'((* . (1 1 1 1))
- ((1 . 12) . (3 3 3 3)))
+ \set Score.beamExceptions = #'()
\once \override TextScript #'staff-padding = #1.7
\times 2/3 { a8\p^\andantino e' a c a e a, e' a c a e } | % m. 5
diff --git a/Documentation/snippets/grouping-beats.ly b/Documentation/snippets/grouping-beats.ly
index 58939542b4..e1abd6d0a9 100644
--- a/Documentation/snippets/grouping-beats.ly
+++ b/Documentation/snippets/grouping-beats.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.4
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/guitar-slides.ly b/Documentation/snippets/guitar-slides.ly
index f34912f8f0..74d0533dcc 100644
--- a/Documentation/snippets/guitar-slides.ly
+++ b/Documentation/snippets/guitar-slides.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.4
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/hiding-accidentals-on-tied-notes-at-the-start-of-a-new-system.ly b/Documentation/snippets/hiding-accidentals-on-tied-notes-at-the-start-of-a-new-system.ly
index ab7ddfd59b..2a73426403 100644
--- a/Documentation/snippets/hiding-accidentals-on-tied-notes-at-the-start-of-a-new-system.ly
+++ b/Documentation/snippets/hiding-accidentals-on-tied-notes-at-the-start-of-a-new-system.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.26
-\version "2.13.26"
+\version "2.13.29"
\header {
lsrtags = "pitches"
texidoc = "This shows how to hide accidentals on tied notes at the beginning of a
diff --git a/Documentation/snippets/incipit.ly b/Documentation/snippets/incipit.ly
index f0297fe12c..60c8336fb7 100644
--- a/Documentation/snippets/incipit.ly
+++ b/Documentation/snippets/incipit.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.4
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/keyboard-headword.ly b/Documentation/snippets/keyboard-headword.ly
index fbcc5cf14b..5cb2972043 100644
--- a/Documentation/snippets/keyboard-headword.ly
+++ b/Documentation/snippets/keyboard-headword.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
\include "english.ly"
#(set-global-staff-size 15)
diff --git a/Documentation/snippets/letter-tablature-formatting.ly b/Documentation/snippets/letter-tablature-formatting.ly
index 12adcb3b89..974b5c79b4 100644
--- a/Documentation/snippets/letter-tablature-formatting.ly
+++ b/Documentation/snippets/letter-tablature-formatting.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.10
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/makam-example.ly b/Documentation/snippets/makam-example.ly
index 365ceafdfc..eb58f15b8a 100644
--- a/Documentation/snippets/makam-example.ly
+++ b/Documentation/snippets/makam-example.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.0
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/making-slurs-with-complex-dash-structure.ly b/Documentation/snippets/making-slurs-with-complex-dash-structure.ly
index 489dcd38c8..72a9fc9bff 100644
--- a/Documentation/snippets/making-slurs-with-complex-dash-structure.ly
+++ b/Documentation/snippets/making-slurs-with-complex-dash-structure.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.1
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/modern-tab-text-clef.ly b/Documentation/snippets/modern-tab-text-clef.ly
index 4582e2f37e..9a39949aeb 100644
--- a/Documentation/snippets/modern-tab-text-clef.ly
+++ b/Documentation/snippets/modern-tab-text-clef.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.4
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/new/automatic-beam-subdivisions.ly b/Documentation/snippets/new/automatic-beam-subdivisions.ly
new file mode 100644
index 0000000000..59f6888ccb
--- /dev/null
+++ b/Documentation/snippets/new/automatic-beam-subdivisions.ly
@@ -0,0 +1,39 @@
+\version "2.13.29"
+
+\header {
+ lsrtags = "rhythms"
+
+ texidoc = "
+Beams can be subdivided automatically. By setting the property
+@code{subdivideBeams}, beams are subdivided at beat positions (as
+specified in @code{baseMoment}).
+
+"
+ doctitle = "Automatic beam subdivisions"
+}
+
+\new Staff {
+ \relative c'' {
+ <<
+ {
+ \voiceOne
+ \set subdivideBeams = ##t
+ b32[ a g f c' b a g
+ b32^"subdivide beams" a g f c' b a g]
+ }
+ \new Voice {
+ \voiceTwo
+ b32_"default"[ a g f c' b a g
+ b32 a g f c' b a g]
+ }
+ >>
+ \oneVoice
+ \set baseMoment = #(ly:make-moment 1 8)
+ \set beatStructure = #'(2 2 2 2)
+ b32^"baseMoment 1 8"[ a g f c' b a g]
+ \set baseMoment = #(ly:make-moment 1 16)
+ \set beatStructure = #'(4 4 4 4)
+ b32^"baseMoment 1 16"[ a g f c' b a g]
+ }
+}
+
diff --git a/Documentation/snippets/new/beam-endings-in-score-context.ly b/Documentation/snippets/new/beam-endings-in-score-context.ly
index 96a2f2c411..890e091ce1 100644
--- a/Documentation/snippets/new/beam-endings-in-score-context.ly
+++ b/Documentation/snippets/new/beam-endings-in-score-context.ly
@@ -1,9 +1,9 @@
-\version "2.13.4"
+\version "2.13.29"
\header {
lsrtags = "rhythms"
texidoc = "
-Beam-ending rules specified in the @code{Score} context apply to all
+Beat structure rules specified in the @code{Score} context apply to all
staves, but can be modified at both @code{Staff} and @code{Voice}
levels:
"
@@ -13,18 +13,15 @@ levels:
\relative c'' {
\time 5/4
% Set default beaming for all staves
- \overrideBeamSettings #'Score #'(5 . 4) #'end
- #'(((1 . 8) . (3 4 3))
- ((1 . 16) . (6 8 6))
- ((1 . 32) . (12 16 12)))
+ \set Score.baseMoment = #(ly:make-moment 1 8)
+ \set Score.beatStructure = #'(3 4 3)
<<
\new Staff {
c8 c c c c c c c c c
}
\new Staff {
% Modify beaming for just this staff
- \overrideBeamSettings #'Staff #'(5 . 4) #'end
- #'((* . (3 2)))
+ \set Staff.beatStructure = #'(6 4)
c8 c c c c c c c c c
}
\new Staff {
@@ -37,8 +34,7 @@ levels:
% Modify beaming for this voice only
\new Voice {
\voiceTwo
- \overrideBeamSettings #'Voice #'(5 . 4) #'end
- #'((* . (3 2)))
+ \set Voice.beatStructure = #'(6 4)
a8 a a a a a a a a a
}
>>
diff --git a/Documentation/snippets/new/beam-grouping-in-7-8-time.ly b/Documentation/snippets/new/beam-grouping-in-7-8-time.ly
index 98597bada1..f9e6253e26 100644
--- a/Documentation/snippets/new/beam-grouping-in-7-8-time.ly
+++ b/Documentation/snippets/new/beam-grouping-in-7-8-time.ly
@@ -1,12 +1,12 @@
-\version "2.13.4"
+\version "2.13.29"
\header {
lsrtags = "rhythms"
texidoc = "
-There are no default automatic beam groupings specified for 7/8 time,
-so if automatic beams are required the grouping must be specified. For
-example, to group all beams 2-3-2 in 7/8 time, specify beam endings at
-2/8 and 5/8:
+There is no default beat structure specified for 7/8 time,
+so if automatic beams are required the structure must be specified. For
+example, to group all beams 2-3-2 in 7/8 time, specify the
+beat structure to be (2 3 2):
"
doctitle = "Beam grouping in 7/8 time"
}
@@ -15,7 +15,6 @@ example, to group all beams 2-3-2 in 7/8 time, specify beam endings at
\time 7/8
% rhythm 2-3-2
a8 a a a a a a
- \overrideBeamSettings #'Score #'(7 . 8) #'end
- #'((* . (2 3 2)))
+ \set Score.beatStructure = #'(2 3 2)
a8 a a a a a a
}
diff --git a/Documentation/snippets/new/compound-time-signatures.ly b/Documentation/snippets/new/compound-time-signatures.ly
index 25952ca158..3685151a6d 100644
--- a/Documentation/snippets/new/compound-time-signatures.ly
+++ b/Documentation/snippets/new/compound-time-signatures.ly
@@ -1,4 +1,4 @@
-\version "2.13.4"
+\version "2.13.29"
\header {
lsrtags = "rhythms"
@@ -24,8 +24,7 @@ database.)
\relative c' {
\override Staff.TimeSignature #'stencil = #(compound-time "2" "3" "8")
\time 5/8
- \overrideBeamSettings #'Staff #'(5 . 8) #'end
- #'((* . (2 3)))
+ \set Staff.beatStructure = #'(2 3)
c8 d e fis gis
c8 fis, gis e d
c8 d e4 gis8
diff --git a/Documentation/snippets/new/conducting-signs,-measure-grouping-signs.ly b/Documentation/snippets/new/conducting-signs,-measure-grouping-signs.ly
index f212a0bbe1..b9867a7f5e 100644
--- a/Documentation/snippets/new/conducting-signs,-measure-grouping-signs.ly
+++ b/Documentation/snippets/new/conducting-signs,-measure-grouping-signs.ly
@@ -1,30 +1,40 @@
-\version "2.13.4"
+\version "2.13.29"
\header {
lsrtags = "rhythms"
texidoc = "
-Beat grouping within a bar is controlled by the default grouping
-established in @code{beamSettings}. This grouping can be established
-by the use of @code{\\overrideBeamSettings}. Alternatively, the
+Beat grouping within a measure is controlled by the context property
+@code{beatStructure}. Values of @code{beatStructure} are
+established for many time signatures in
+@file{scm/time-signature-settings.scm}. Values of @code{beatStructure}
+can be changed or set with @code{\set}.
+Alternatively, the
Scheme function @code{set-time-signature} can be used to both
-set the time signature and establish the default grouping rule.
+set the time signature and establish the beat structure.
@code{set-time-signature}, takes three arguments: the
number of beats, the beat length, and the internal grouping of beats in
-the measure. If the @code{Measure_grouping_engraver} is included
+the measure. @code{\time} and @code{set-time-signature} both apply
+to the @code{Timing} context, so they will not reset values of
+@code{beatStructure} or @code{baseMoment} that are set in
+other lower-level contexts, such as @code{Voice}.
+
+If the @code{Measure_grouping_engraver} is included
in one of the display contexts, measure grouping signs will be
created. Such signs ease reading rhythmically complex modern music.
In the example, the 9/8 measure is grouped in two different
patterns using the two different methods, while the 5/8 measure
is grouped according to the default setting in
-@file{scm/beam-settings.scm}:
+@file{scm/time-signature-settings.scm}:
"
doctitle = "Conducting signs, measure grouping signs"
}
+
\score {
- \relative c'' {
+ \new Voice \relative c'' {
\time 9/8
- \overrideBeamSettings #'Score #'(9 . 8) #'end #'((* . (2 2 2 3)))
+ g8 g d d g g a( bes g) |
+ \set Timing.beatStructure = #'(2 2 2 3)
g8 g d d g g a( bes g) |
#(set-time-signature 9 8 '(4 5))
g8 g d d g g a( bes g) |
diff --git a/Documentation/snippets/new/fretted-headword.ly b/Documentation/snippets/new/fretted-headword.ly
index 69c64ce7cc..d88039a5ce 100644
--- a/Documentation/snippets/new/fretted-headword.ly
+++ b/Documentation/snippets/new/fretted-headword.ly
@@ -3,7 +3,7 @@
% on melodies from Bellini's "Norma" %
%*****************************************************************%
-\version "2.13.20"
+\version "2.13.29"
#(set-global-staff-size 15)
\paper {
@@ -114,9 +114,7 @@ bass = \relative c {
e,1 | % m. 4
%% new section starts here in A minor
- \overrideBeamSettings #'Score #'(4 . 4) #'end
- #'((* . (1 1 1 1))
- ((1 . 12) . (3 3 3 3)))
+ \set Score.beamExceptions = #'()
\once \override TextScript #'staff-padding = #1.7
\times 2/3 { a8\p^\andantino e' a c a e a, e' a c a e } | % m. 5
diff --git a/Documentation/snippets/new/reverting-default-beam-endings.ly b/Documentation/snippets/new/reverting-default-beam-endings.ly
index fce28adcd8..0dad36760d 100644
--- a/Documentation/snippets/new/reverting-default-beam-endings.ly
+++ b/Documentation/snippets/new/reverting-default-beam-endings.ly
@@ -1,11 +1,10 @@
-\version "2.13.4"
+\version "2.13.29"
\header {
lsrtags = "rhythms"
texidoc = "
-To typeset beams grouped @code{3-4-3-2} in 12/8 it is no longer
-necessary first to override the default beam endings in 12/8,and
-then to set up the new beaming endings:
+To typeset beams grouped @code{3-4-3-2} one need only change the
+beat structure:
"
doctitle = "Reverting default beam endings"
}
@@ -17,7 +16,6 @@ then to set up the new beaming endings:
a8 a a a a a a a a a a a
% Set new values for beam endings
- \overrideBeamSettings #'Score #'(12 . 8) #'end
- #'((* . (3 4 3 2)))
+ \set Score.beatStructure = #'(3 4 3 2)
a8 a a a a a a a a a a a
}
diff --git a/Documentation/snippets/new/subdividing-beams.ly b/Documentation/snippets/new/subdividing-beams.ly
new file mode 100644
index 0000000000..963e44c0e2
--- /dev/null
+++ b/Documentation/snippets/new/subdividing-beams.ly
@@ -0,0 +1,40 @@
+\version "2.13.29"
+
+\header {
+ lsrtags = "rhythms"
+
+ texidoc = "
+The beams of consecutive 16th (or shorter) notes are, by default, not
+subdivided. That is, the three (or more) beams stretch unbroken over
+entire groups of notes. This behavior can be modified to subdivide
+the beams into sub-groups by setting the property
+@code{subdivideBeams}. When set, multiple beams will be subdivided at
+intervals defined by the current value of @code{baseMoment} by reducing
+the multiple beams to just one beam between the sub-groups. Note that
+@code{baseMoment} defaults to one over the denominator of the current
+time signature if not set explicitly. It must be set to a fraction
+giving the duration of the beam sub-group using the
+@code{ly:make-moment} function, as shown in this snippet. Also, when
+@code{baseMoment} is changed, @code{beatStructure} should also be changed
+to match the new @code{baseMoment}:
+
+"
+ doctitle = "Subdividing beams"
+}
+
+\relative c'' {
+ c32[ c c c c c c c]
+ \set subdivideBeams = ##t
+ c32[ c c c c c c c]
+
+ % Set beam sub-group length to an eighth note
+ \set baseMoment = #(ly:make-moment 1 8)
+ \set beatStructure = #'(2 2 2 2)
+ c32[ c c c c c c c]
+
+ % Set beam sub-group length to a sixteenth note
+ \set baseMoment = #(ly:make-moment 1 16)
+ \set beatStructure = #'(4 4 4 4)
+ c32[ c c c c c c c]
+}
+
diff --git a/Documentation/snippets/non-default-tuplet-numbers.ly b/Documentation/snippets/non-default-tuplet-numbers.ly
index a453c3b76f..909f9b938e 100644
--- a/Documentation/snippets/non-default-tuplet-numbers.ly
+++ b/Documentation/snippets/non-default-tuplet-numbers.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.1
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/non-traditional-key-signatures.ly b/Documentation/snippets/non-traditional-key-signatures.ly
index e00be32dc9..df9a8b630d 100644
--- a/Documentation/snippets/non-traditional-key-signatures.ly
+++ b/Documentation/snippets/non-traditional-key-signatures.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.0
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/numbers-as-easy-note-heads.ly b/Documentation/snippets/numbers-as-easy-note-heads.ly
index 906f424e20..bfeaa9d433 100644
--- a/Documentation/snippets/numbers-as-easy-note-heads.ly
+++ b/Documentation/snippets/numbers-as-easy-note-heads.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.11
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/piano-template-with-centered-dynamics.ly b/Documentation/snippets/piano-template-with-centered-dynamics.ly
index 4fc3530189..a1843fbd44 100644
--- a/Documentation/snippets/piano-template-with-centered-dynamics.ly
+++ b/Documentation/snippets/piano-template-with-centered-dynamics.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.4
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/pitches-headword.ly b/Documentation/snippets/pitches-headword.ly
index bce85cee0f..ef3b20a136 100644
--- a/Documentation/snippets/pitches-headword.ly
+++ b/Documentation/snippets/pitches-headword.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
\include "english.ly"
#(set-global-staff-size 15)
\paper {
diff --git a/Documentation/snippets/repeats-headword.ly b/Documentation/snippets/repeats-headword.ly
index df775861f4..1e50a53aa1 100644
--- a/Documentation/snippets/repeats-headword.ly
+++ b/Documentation/snippets/repeats-headword.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
\include "english.ly"
#(set-global-staff-size 15)
\paper {
diff --git a/Documentation/snippets/reverting-default-beam-endings.ly b/Documentation/snippets/reverting-default-beam-endings.ly
index 6a91023b14..c0d974719f 100644
--- a/Documentation/snippets/reverting-default-beam-endings.ly
+++ b/Documentation/snippets/reverting-default-beam-endings.ly
@@ -1,8 +1,8 @@
% Do not edit this file; it is automatically
% generated from Documentation/snippets/new
% This file is in the public domain.
-%% Note: this file works from version 2.13.4
-\version "2.13.20"
+%% Note: this file works from version 2.13.29
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
@@ -39,9 +39,8 @@ défaut relatifs à 12/8, puis ajouter nos propres règles :
lsrtags = "rhythms"
texidoc = "
-To typeset beams grouped @code{3-4-3-2} in 12/8 it is no longer
-necessary first to override the default beam endings in 12/8,and
-then to set up the new beaming endings:
+To typeset beams grouped @code{3-4-3-2} one need only change the
+beat structure:
"
doctitle = "Reverting default beam endings"
} % begin verbatim
@@ -54,7 +53,6 @@ then to set up the new beaming endings:
a8 a a a a a a a a a a a
% Set new values for beam endings
- \overrideBeamSettings #'Score #'(12 . 8) #'end
- #'((* . (3 4 3 2)))
+ \set Score.beatStructure = #'(3 4 3 2)
a8 a a a a a a a a a a a
}
diff --git a/Documentation/snippets/rhythms-headword.ly b/Documentation/snippets/rhythms-headword.ly
index 8143a0a7c8..b703d9d0c4 100644
--- a/Documentation/snippets/rhythms-headword.ly
+++ b/Documentation/snippets/rhythms-headword.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
\include "english.ly"
#(set-global-staff-size 15)
\paper {
diff --git a/Documentation/snippets/rhythms.snippet-list b/Documentation/snippets/rhythms.snippet-list
index 0f9e943738..d0c909cda6 100644
--- a/Documentation/snippets/rhythms.snippet-list
+++ b/Documentation/snippets/rhythms.snippet-list
@@ -51,7 +51,7 @@ rhythmic-slashes.ly
skips-in-lyric-mode-2.ly
skips-in-lyric-mode.ly
stemlets.ly
-sub-dividing-beams.ly
+subdividing-beams.ly
three-sided-box.ly
time-signature-printing-only-the-numerator-as-a-number-instead-of-the-fraction.ly
tweaking-grace-layout-within-music.ly
diff --git a/Documentation/snippets/screech-boink.ly b/Documentation/snippets/screech-boink.ly
index abd924112d..33fb3e1fea 100644
--- a/Documentation/snippets/screech-boink.ly
+++ b/Documentation/snippets/screech-boink.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
\header {
lsrtags = "headwords"
texidoc = "Random complex notation"
diff --git a/Documentation/snippets/setting-the-double-repeat-default-for-volte.ly b/Documentation/snippets/setting-the-double-repeat-default-for-volte.ly
index 655b7ca2d6..e36d5f9887 100644
--- a/Documentation/snippets/setting-the-double-repeat-default-for-volte.ly
+++ b/Documentation/snippets/setting-the-double-repeat-default-for-volte.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.26
-\version "2.13.26"
+\version "2.13.29"
\header {
lsrtags = "repeats"
texidoc = "There are three different styles of double repeats for
diff --git a/Documentation/snippets/showing-the-same-articulation-above-and-below-a-note-or-chord.ly b/Documentation/snippets/showing-the-same-articulation-above-and-below-a-note-or-chord.ly
index 96feaa19b6..370cd3b3c1 100644
--- a/Documentation/snippets/showing-the-same-articulation-above-and-below-a-note-or-chord.ly
+++ b/Documentation/snippets/showing-the-same-articulation-above-and-below-a-note-or-chord.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.27
-\version "2.13.27"
+\version "2.13.29"
\header {
lsrtags = "expressive-marks, tweaks-and-overrides"
diff --git a/Documentation/snippets/simultaneous-headword.ly b/Documentation/snippets/simultaneous-headword.ly
index d949d381b0..cf5460e6dc 100644
--- a/Documentation/snippets/simultaneous-headword.ly
+++ b/Documentation/snippets/simultaneous-headword.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
\include "english.ly"
#(set-global-staff-size 15)
\paper {
diff --git a/Documentation/snippets/snap-pizzicato-bartok-pizzicato.ly b/Documentation/snippets/snap-pizzicato-bartok-pizzicato.ly
index 0bb69f6f8c..b7adc7ae2c 100644
--- a/Documentation/snippets/snap-pizzicato-bartok-pizzicato.ly
+++ b/Documentation/snippets/snap-pizzicato-bartok-pizzicato.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.4
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/staff-headword.ly b/Documentation/snippets/staff-headword.ly
index 5bd81fb866..230c7532ce 100644
--- a/Documentation/snippets/staff-headword.ly
+++ b/Documentation/snippets/staff-headword.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
\include "catalan.ly"
#(set-global-staff-size 15)
\paper{
diff --git a/Documentation/snippets/stem-and-beam-behavior-in-tablature.ly b/Documentation/snippets/stem-and-beam-behavior-in-tablature.ly
index ecf1ee8941..6bbd767ad3 100644
--- a/Documentation/snippets/stem-and-beam-behavior-in-tablature.ly
+++ b/Documentation/snippets/stem-and-beam-behavior-in-tablature.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.4
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/text-headword.ly b/Documentation/snippets/text-headword.ly
index b2d4eeeadc..45e4c64b7b 100644
--- a/Documentation/snippets/text-headword.ly
+++ b/Documentation/snippets/text-headword.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
\include "english.ly"
#(set-global-staff-size 15)
\paper {
diff --git a/Documentation/snippets/unfretted-headword.ly b/Documentation/snippets/unfretted-headword.ly
index a6d6c26c85..aab47c5bd3 100644
--- a/Documentation/snippets/unfretted-headword.ly
+++ b/Documentation/snippets/unfretted-headword.ly
@@ -33,7 +33,7 @@
-\version "2.13.20"
+\version "2.13.29"
#(set-global-staff-size 15)
%%%
diff --git a/Documentation/snippets/using-ly-grob-object-to-access-grobs-with--tweak.ly b/Documentation/snippets/using-ly-grob-object-to-access-grobs-with--tweak.ly
index 7a5e506a58..4ec260377f 100644
--- a/Documentation/snippets/using-ly-grob-object-to-access-grobs-with--tweak.ly
+++ b/Documentation/snippets/using-ly-grob-object-to-access-grobs-with--tweak.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.10
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/using-the-whiteout-property.ly b/Documentation/snippets/using-the-whiteout-property.ly
index 2798f38fa8..90e84446b1 100644
--- a/Documentation/snippets/using-the-whiteout-property.ly
+++ b/Documentation/snippets/using-the-whiteout-property.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.10
-\version "2.13.20"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/vocal-ensemble-template-with-verse-and-refrain.ly b/Documentation/snippets/vocal-ensemble-template-with-verse-and-refrain.ly
index 6110610be0..63e69207d1 100644
--- a/Documentation/snippets/vocal-ensemble-template-with-verse-and-refrain.ly
+++ b/Documentation/snippets/vocal-ensemble-template-with-verse-and-refrain.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.21
-\version "2.13.21"
+\version "2.13.29"
\header {
%% Translation of GIT committish: 0b55335aeca1de539bf1125b717e0c21bb6fa31b
diff --git a/Documentation/snippets/wind-headword.ly b/Documentation/snippets/wind-headword.ly
index a194237b61..fbeea97088 100644
--- a/Documentation/snippets/wind-headword.ly
+++ b/Documentation/snippets/wind-headword.ly
@@ -2,7 +2,7 @@
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.12.0
-\version "2.13.20"
+\version "2.13.29"
#(set-global-staff-size 15)
\paper {
line-width = 16\cm
diff --git a/Documentation/web/ly-examples/granados.ly b/Documentation/web/ly-examples/granados.ly
index 7b2c4275ae..9ddacb50a1 100644
--- a/Documentation/web/ly-examples/granados.ly
+++ b/Documentation/web/ly-examples/granados.ly
@@ -1,4 +1,4 @@
-\version "2.12.0"
+\version "2.13.29"
\include "example-header.ily"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -14,7 +14,7 @@
}
-csh = \change Staff = "high"
+csh = \change Staff = "high"
csm = \change Staff = "middle"
csl = \change Staff = "low"
@@ -33,27 +33,28 @@ global = {
upperVoiceOne = \relative c'' {
\voiceOne
\override TupletBracket #'transparent = ##t
- <aes f'>8\([ \times 4/5{g'32( aes g f g]) }
+ <aes f'>8\([ \times 4/5{g'32( aes g f g]) }
<es aes>8[ \times 4/5{<d bes'>32( c' bes aes bes]) }
<es, aes es'>8 <d fis b d>\) | % end m. 1
%--------------------------------------------------%
- <c g' c>4\( \voiceTwo <bes es bes'\arpeggio>\)
+ <c g' c>4\( \voiceTwo <bes es bes'\arpeggio>\)
\slurUp <aes aes'>16( <bes bes'> <g g'>8) % end m. 2
%--------------------------------------------------%
\noBreak
- \voiceOne
+ \voiceOne
<f aes d f>8\([ \times 4/5{<g g'>32( aes' g f g]) }
\set subdivideBeams = ##t
- \set beatLength = #(ly:make-moment 1 8)
- <aes, aes'>16 <c f> \times 4/5{ bes'32( c bes aes bes]) }
- \set subdivideBeams = ##f
- \ottava #1 <es es'>16 <f f'> <d d'> \appoggiatura f8 <es es'>16\)
+ \set baseMoment = #(ly:make-moment 1 8)
+ \set beatStructure = #'(2 2 2)
+ <aes, aes'>16 <c f> \times 4/5{ bes'32( c bes aes bes]) }
+ \set subdivideBeams = ##f
+ \ottava #1 <es es'>16 <f f'> <d d'> \appoggiatura f8 <es es'>16\)
}
upperVoiceTwo = \relative c'' {
\voiceTwo
s8 c8\< <bes, f'>[ <bes aes'> c' <bes, d fis>\!]
- s32 s32_\appassmolto s8. \voiceOne r8 <bes'' es bes'>-> s4
+ s32 s32_\appassmolto s8. \voiceOne r8 <bes'' es bes'>-> s4
\override Stem #'cross-staff = ##t
\override Stem #'length = #28
\override Stem #'flag-style = #'no-flag
@@ -88,8 +89,9 @@ lowerVoiceOne = \relative c, {
bes8 \csm \stemDown <bes'' c es>8 s2
\csl \stemUp
\set subdivideBeams = ##t
- \set beatLength = #(ly:make-moment 1 16)
- s8 \hideNotes \slurUp \stemDown
+ \set baseMoment = #(ly:make-moment 1 16)
+ \set beatStructure = #'(4 4 4)
+ s8 \hideNotes \slurUp \stemDown
es,,64( bes'' s64 \unHideNotes \stemUp g64[ bes c d c]) s2
\set subdivideBeams = ##f
bes,,8 \csm \stemDown <bes'' c es>8 s2
@@ -97,15 +99,15 @@ lowerVoiceOne = \relative c, {
lowerVoiceTwo = \relative c, {
\voiceTwo
- bes2.
+ bes2.
\csh
\once \override Beam #'damping = #+inf.0
- <bes'' es g>8 \csl \slurUp
- %\once\override Slur #'extra-offset = #'(0 . 4)
- es,,64 bes' es g s32.
+ <bes'' es g>8 \csl \slurUp
+ %\once\override Slur #'extra-offset = #'(0 . 4)
+ es,,64 bes' es g s32.
c64
s4 <bes des>
- bes,,2.
+ bes,,2.
}
@@ -113,18 +115,18 @@ lowerVoiceTwo = \relative c, {
\new PianoStaff <<
\set PianoStaff.connectArpeggios = ##t
% \override PianoStaff.Arpeggio #'stencil = #ly:arpeggio::brew-chord-bracket
- \new Staff = "high" <<
+ \new Staff = "high" <<
\global
\context Voice = "upperVoiceOne" { \upperVoiceOne }
\context Voice = "upperVoiceTwo" { \upperVoiceTwo }
>>
- \new Staff = "middle" <<
+ \new Staff = "middle" <<
\global
\context Voice = "middleVoiceOne" { \middleVoiceOne }
\context Voice = "middleVoiceTwo" { \middleVoiceTwo }
>>
- \new Staff = "low" <<
- \clef bass
+ \new Staff = "low" <<
+ \clef bass
\global
\context Voice = "lowerVoiceOne" { \lowerVoiceOne }
\context Voice = "lowerVoiceTwo" { \lowerVoiceTwo }
diff --git a/Documentation/web/news-front.itexi b/Documentation/web/news-front.itexi
index 438f9a6af3..e62cc33f47 100644
--- a/Documentation/web/news-front.itexi
+++ b/Documentation/web/news-front.itexi
@@ -10,9 +10,9 @@
@c used for news about the upcoming release; see CG x.y
@newsItem
-@subsubheading LilyPond 2.13.28 released! @emph{July 13, 2010}
+@subsubheading LilyPond 2.13.29 released! @emph{July 13, 2010}
-We are happy to announce the release of LilyPond 2.13.28. This
+We are happy to announce the release of LilyPond 2.13.29. This
release contains the usual number of bugfixes. However, a number
of critical issues still remain, so this release is intended for
developers only.
diff --git a/VERSION b/VERSION
index e9edffb9ae..b1ac8cbd0d 100644
--- a/VERSION
+++ b/VERSION
@@ -4,4 +4,4 @@ MINOR_VERSION=13
PATCH_LEVEL=29
MY_PATCH_LEVEL=
VERSION_STABLE=2.12.3
-VERSION_DEVEL=2.13.28
+VERSION_DEVEL=2.13.29
diff --git a/input/regression/auto-beam-beaming-override.ly b/input/regression/auto-beam-beaming-override.ly
index afa8b99160..d6dd8f411a 100644
--- a/input/regression/auto-beam-beaming-override.ly
+++ b/input/regression/auto-beam-beaming-override.ly
@@ -8,14 +8,14 @@ beaming pattern related functions at the start of an autobeam."
}
-\version "2.12.0"
+\version "2.13.29"
\paper { ragged-right = ##t }
{
\time 2/4
b16 b b b
b16 b b b
\set subdivideBeams = ##t
- \set Score.beatLength = #(ly:make-moment 1 8)
+ \set Score.baseMoment = #(ly:make-moment 1 8)
b16 b b b
b16 b b b
}
diff --git a/input/regression/beam-beat-grouping.ly b/input/regression/beam-beat-grouping.ly
index 2be98d88bd..4f639f405c 100644
--- a/input/regression/beam-beat-grouping.ly
+++ b/input/regression/beam-beat-grouping.ly
@@ -1,7 +1,7 @@
\header {
texidoc = "Default beaming patterns can be set for the current time
-signature by @code{\\setBeatGrouping}. "
+signature. "
}
\layout {
@@ -12,8 +12,8 @@ signature by @code{\\setBeatGrouping}. "
\relative c'' {
\time 5/16
- \setBeatGrouping #'(2 3)
+ \set beatStructure = #'(2 3)
c8[^"(2+3)" c16 c8]
- \setBeatGrouping #'(3 2)
+ \set beatStructure = #'(3 2)
c8[^"(3+2)" c16 c8]
}
diff --git a/input/regression/beaming-ternary-metrum.ly b/input/regression/beaming-ternary-metrum.ly
index 907edf10f4..0580f2e6da 100644
--- a/input/regression/beaming-ternary-metrum.ly
+++ b/input/regression/beaming-ternary-metrum.ly
@@ -1,12 +1,11 @@
-\version "2.12.0"
+\version "2.13.29"
\header {
- texidoc = "Automatic beaming works also in ternary time sigs. In
- this case, the 8th is a beat, so the 16ths are split into two
- groups. This can be avoided by overriding @code{beatLength} to be
- three 8th notes."
+ texidoc = "Automatic beaming works also in ternary time sigs.
+ As desired, the measure is split in half, with beats 1-3 and
+ 4-6 beamed together as a whole."
}
@@ -14,8 +13,7 @@
\relative c'' {
\time 6/8
- c8.[ c16 c16 c16]
- \set beatLength = #(ly:make-moment 3 8)
- c8.[ c16 c16 c16]
+ c8. c16 c16 c16
+ c8. c16 c16 c16
}
diff --git a/input/regression/les-nereides.ly b/input/regression/les-nereides.ly
index 53866b4780..590e6607f4 100644
--- a/input/regression/les-nereides.ly
+++ b/input/regression/les-nereides.ly
@@ -1,4 +1,4 @@
-\version "2.13.4"
+\version "2.13.29"
\header {
composer = "ARTHUR GRAY"
@@ -235,9 +235,8 @@ middleDynamics = {
theScore = \score{
\context PianoStaff <<
\new Staff = "treble" <<
- \overrideBeamSettings #'Score #'(4 . 4) #'end
- #'((* . (1 1 1 1))
- ((1 . 32) (4 4 4 4 4 4 4 4)))
+ \set beamExceptions = #'((end . (((1 . 8) . (2 2 2 2))
+ ((1 . 32) . (4 4 4 4 4 4 4 4)))))
\treble
\trebleTwo
>>
diff --git a/input/regression/repeat-tremolo-one-note-articulation.ly b/input/regression/repeat-tremolo-one-note-articulation.ly
index 5b5d6206bd..f75e5c7f37 100644
--- a/input/regression/repeat-tremolo-one-note-articulation.ly
+++ b/input/regression/repeat-tremolo-one-note-articulation.ly
@@ -1,4 +1,4 @@
-\version "2.13.28"
+\version "2.13.29"
\header {
texidoc = "A tremolo repeat containing only one note (no sequential music)
diff --git a/input/regression/repeat-tremolo-three-notes.ly b/input/regression/repeat-tremolo-three-notes.ly
index 210ce39e55..3592584e9d 100644
--- a/input/regression/repeat-tremolo-three-notes.ly
+++ b/input/regression/repeat-tremolo-three-notes.ly
@@ -1,4 +1,4 @@
-\version "2.13.28"
+\version "2.13.29"
\header {
texidoc = "A tremolo can have more than two notes. Also check that
diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc
index fda5a9b93e..c976688a0d 100644
--- a/lily/auto-beam-engraver.cc
+++ b/lily/auto-beam-engraver.cc
@@ -147,7 +147,7 @@ Auto_beam_engraver::Auto_beam_engraver ()
forbid_ = 0;
process_acknowledged_count_ = 0;
stems_ = 0;
- shortest_mom_ = Moment (Rational (1, 8));
+ shortest_mom_ = Moment (Rational (1, 4));
finished_beam_ = 0;
finished_grouping_ = 0;
grouping_ = 0;
@@ -167,7 +167,7 @@ Auto_beam_engraver::test_moment (Direction dir, Moment test_mom, Moment dur)
return scm_call_4 (get_property ("autoBeamCheck"),
context ()->self_scm (),
scm_from_int (dir),
- test_mom.smobbed_copy(),
+ test_mom.smobbed_copy (),
dur.smobbed_copy ())
!= SCM_BOOL_F;
}
@@ -253,7 +253,7 @@ Auto_beam_engraver::junk_beam ()
grouping_ = 0;
beam_settings_ = SCM_EOL;
- shortest_mom_ = Moment (Rational (1, 8));
+ shortest_mom_ = Moment (Rational (1, 4));
}
void
@@ -277,7 +277,7 @@ Auto_beam_engraver::end_beam ()
beam_settings_ = SCM_EOL;
}
- shortest_mom_ = Moment (Rational (1, 8));
+ shortest_mom_ = Moment (Rational (1, 4));
}
void
@@ -393,8 +393,7 @@ Auto_beam_engraver::acknowledge_stem (Grob_info info)
if (bool (beam_start_location_.grace_part_) != bool (now.grace_part_))
return;
- Moment ev_dur = unsmob_duration (ev->get_property ("duration"))->get_length ();
- Moment dur = Rational (1, ev_dur.den ());
+ Moment dur = unsmob_duration (ev->get_property ("duration"))->get_length ();
Moment measure_now = measure_position (context ());
bool recheck_needed = false;
@@ -506,7 +505,6 @@ Auto_beam_engraver::process_acknowledged ()
{
Moment measure_now = measure_position (context ());
consider_end (measure_now, shortest_mom_);
- consider_begin (measure_now, shortest_mom_);
}
else if (process_acknowledged_count_ > 1)
{
@@ -529,23 +527,25 @@ ADD_ACKNOWLEDGER (Auto_beam_engraver, beam);
ADD_ACKNOWLEDGER (Auto_beam_engraver, breathing_sign);
ADD_ACKNOWLEDGER (Auto_beam_engraver, rest);
ADD_TRANSLATOR (Auto_beam_engraver,
- /* doc */
- "Generate beams based on measure characteristics and observed"
- " Stems. Uses @code{beatLength}, @code{measureLength}, and"
- " @code{measurePosition} to decide when to start and stop a"
- " beam. Overriding beaming is done through"
- " @ref{Stem_engraver} properties @code{stemLeftBeamCount} and"
- " @code{stemRightBeamCount}.",
-
- /* create */
- "Beam ",
-
- /* read */
- "autoBeaming "
- "beamSettings "
- "beatLength "
- "subdivideBeams ",
-
- /* write */
- ""
- );
+ /* doc */
+ "Generate beams based on measure characteristics and observed"
+ " Stems. Uses @code{baseMoment}, @code{beatStructure},"
+ " @code{beamExceptions}, @code{measureLength}, and"
+ " @code{measurePosition} to decide when to start and stop a"
+ " beam. Overriding beaming is done through"
+ " @ref{Stem_engraver} properties @code{stemLeftBeamCount} and"
+ " @code{stemRightBeamCount}.",
+
+ /* create */
+ "Beam ",
+
+ /* read */
+ "autoBeaming "
+ "baseMoment "
+ "beamExceptions "
+ "beatStructure "
+ "subdivideBeams ",
+
+ /* write */
+ ""
+ );
diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc
index fd043e89c8..7cbd3168c3 100644
--- a/lily/beam-engraver.cc
+++ b/lily/beam-engraver.cc
@@ -62,7 +62,7 @@ protected:
Beaming_options beaming_options_;
Beaming_options finished_beaming_options_;
-
+
void typeset_beam ();
void set_melisma (bool);
@@ -167,7 +167,7 @@ Beam_engraver::process_music ()
if (stop_ev_ && beam_)
{
announce_end_grob (beam_, stop_ev_->self_scm ());
-
+
}
}
@@ -212,7 +212,7 @@ Beam_engraver::stop_translation_timestep ()
finished_beam_ = beam_;
finished_beam_info_ = beam_info_;
finished_beaming_options_ = beaming_options_;
-
+
stop_ev_ = 0;
beam_ = 0;
beam_info_ = 0;
@@ -251,7 +251,7 @@ Beam_engraver::acknowledge_stem (Grob_info info)
{
if (!beam_)
return;
-
+
Moment now = now_mom ();
if (!valid_start_point ())
return;
@@ -259,7 +259,7 @@ Beam_engraver::acknowledge_stem (Grob_info info)
Item *stem = dynamic_cast<Item *> (info.grob ());
if (Stem::get_beam (stem))
return;
-
+
Stream_event *ev = info.ultimate_event_cause ();
if (!ev->in_event_class ("rhythmic-event"))
{
@@ -298,13 +298,14 @@ ADD_TRANSLATOR (Beam_engraver,
/* doc */
"Handle @code{Beam} events by engraving beams. If omitted,"
" then notes are printed with flags instead of beams.",
-
+
/* create */
"Beam ",
/* read */
+ "baseMoment "
"beamMelismaBusy "
- "beatLength "
+ "beatStructure "
"subdivideBeams ",
/* write */
@@ -317,7 +318,7 @@ public:
TRANSLATOR_DECLARATIONS (Grace_beam_engraver);
DECLARE_TRANSLATOR_LISTENER (beam);
-
+
protected:
virtual bool valid_start_point ();
virtual bool valid_end_point ();
@@ -365,13 +366,14 @@ ADD_TRANSLATOR (Grace_beam_engraver,
"Handle @code{Beam} events by engraving beams. If omitted,"
" then notes are printed with flags instead of beams. Only"
" engraves beams when we are at grace points in time.",
-
+
/* create */
"Beam ",
/* read */
+ "baseMoment "
"beamMelismaBusy "
- "beatLength "
+ "beatStructure "
"subdivideBeams ",
/* write */
diff --git a/lily/beam-setting-scheme.cc b/lily/beam-setting-scheme.cc
deleted file mode 100644
index 550f1e40f2..0000000000
--- a/lily/beam-setting-scheme.cc
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- This file is part of LilyPond, the GNU music typesetter.
-
- Copyright (C) 2009--2010 Carl Sorensen <c_sorensen@byu.edu>
-
- LilyPond is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- LilyPond is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "beam-settings.hh"
-#include "context.hh"
-#include "guile-compatibility.hh"
-
-LY_DEFINE (ly_grouping_rules, "ly:grouping-rules",
- 3, 0, 0, (SCM settings, SCM time_signature, SCM rule_type),
- "Return grouping rules for @var{time-signature} and"
- " @var{rule-type} from @var{settings}.")
-{
- LY_ASSERT_TYPE (ly_cheap_is_list, settings, 1);
- LY_ASSERT_TYPE (scm_is_pair, time_signature, 2);
- LY_ASSERT_TYPE (ly_is_symbol, rule_type, 3);
-
- SCM grouping_rules = SCM_EOL;
- if (scm_is_pair (settings))
- grouping_rules =
- ly_assoc_get (scm_list_2 (time_signature, rule_type),
- settings,
- SCM_EOL);
- return grouping_rules;
-}
-
-LY_DEFINE (ly_beam_grouping, "ly:beam-grouping",
- 4, 0, 0, (SCM settings, SCM time_signature, SCM rule_type,
- SCM beam_type),
- "Return grouping for beams of @var{beam-type} in"
- " @var{time-signature} for"
- " @var{rule-type} from @var{settings}.")
-{
- LY_ASSERT_TYPE (ly_cheap_is_list, settings, 1);
- LY_ASSERT_TYPE (scm_is_pair, time_signature, 2);
- LY_ASSERT_TYPE (ly_is_symbol, rule_type, 3);
- SCM_ASSERT_TYPE (scm_is_symbol(beam_type) || scm_is_pair(beam_type),
- beam_type, SCM_ARG4, __FUNCTION__, "symbol or pair");
- SCM beam_grouping =
- ly_assoc_get (beam_type,
- ly_grouping_rules (settings,time_signature,rule_type),
- SCM_EOL);
- return beam_grouping;
-}
-
-LY_DEFINE (ly_beat_grouping, "ly:beat-grouping",
- 1, 0, 0, (SCM context),
- "Return default beat grouping currently active in @var{context}.")
-{
- LY_ASSERT_SMOB (Context, context, 1);
- Context *c = unsmob_context (context);
- SCM time_signature =
- c->get_property ("timeSignatureFraction");
- SCM settings =
- c->get_property("beamSettings");
- SCM beat_grouping =
- ly_beam_grouping (settings,
- time_signature,
- ly_symbol2scm ("end"),
- ly_symbol2scm ("*"));
- return beat_grouping;
-}
-
diff --git a/lily/beaming-pattern.cc b/lily/beaming-pattern.cc
index 3659525f11..7567caa700 100644
--- a/lily/beaming-pattern.cc
+++ b/lily/beaming-pattern.cc
@@ -18,7 +18,6 @@
*/
#include "context.hh"
-#include "beam-settings.hh"
#include "beaming-pattern.hh"
/*
@@ -174,10 +173,10 @@ Beaming_pattern::find_rhythmic_importance (Beaming_options const &options)
if (infos_[i].start_moment_ == measure_pos)
infos_[i].rhythmic_importance_ = -2;
- // Mark the start of each beat up to the end of this beat group.
- for (int beat = 1; beat <= count; beat++)
+ // Mark the start of each unit up to the end of this beat group.
+ for (int unit = 1; unit <= count; unit++)
{
- Moment next_measure_pos = measure_pos + options.beat_length_;
+ Moment next_measure_pos = measure_pos + options.base_moment_;
while (i < infos_.size () && infos_[i].start_moment_ < next_measure_pos)
{
@@ -190,7 +189,7 @@ Beaming_pattern::find_rhythmic_importance (Beaming_options const &options)
// in an 8th-note triplet with a quarter-note beat, 1/3 of a beat should be
// more important than 1/2.
if (infos_[i].rhythmic_importance_ >= 0)
- infos_[i].rhythmic_importance_ = (dt / options.beat_length_).den ();
+ infos_[i].rhythmic_importance_ = (dt / options.base_moment_).den ();
i++;
}
@@ -293,10 +292,12 @@ Beaming_pattern::split_pattern (int i)
void
Beaming_options::from_context (Context *context)
{
- grouping_ = ly_beat_grouping (context->self_scm ());
+ grouping_ = context->get_property ("beatStructure");
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 (4, 4));
+ base_moment_ = robust_scm2moment (context->get_property ("baseMoment"),
+ Moment (1, 4));
+ measure_length_ = robust_scm2moment (context->get_property ("measureLength"),
+ Moment (4, 4));
}
Beaming_options::Beaming_options ()
diff --git a/lily/include/beam-settings.hh b/lily/include/beam-settings.hh
deleted file mode 100644
index 9c9e3cabf3..0000000000
--- a/lily/include/beam-settings.hh
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- This file is part of LilyPond, the GNU music typesetter.
-
- Copyright (C) 2009--2010 Carl Sorensen <c_sorensen@byu.edu>
-
- LilyPond is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- LilyPond is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef BEAM_SETTINGS_HH
-#define BEAM_SETTINGS_HH
-
-#include "lily-guile.hh"
-
-SCM ly_grouping_rules (SCM settings, SCM time_sig, SCM rule_type);
-SCM ly_beam_grouping (SCM settings, SCM time_sig, SCM rule_type,
- SCM beam_type);
-SCM ly_beat_grouping (SCM context);
-#endif // BEAM_SETTINGS_HH
diff --git a/lily/include/beaming-pattern.hh b/lily/include/beaming-pattern.hh
index 7fb07fc947..a9bb44ae9f 100644
--- a/lily/include/beaming-pattern.hh
+++ b/lily/include/beaming-pattern.hh
@@ -28,7 +28,7 @@ struct Beaming_options
{
SCM grouping_;
bool subdivide_beams_;
- Moment beat_length_;
+ Moment base_moment_;
Moment measure_length_;
Beaming_options ();
diff --git a/lily/measure-grouping-engraver.cc b/lily/measure-grouping-engraver.cc
index c61dd74c45..91e9f6957d 100644
--- a/lily/measure-grouping-engraver.cc
+++ b/lily/measure-grouping-engraver.cc
@@ -22,7 +22,6 @@
#include "global-context.hh"
#include "engraver.hh"
#include "spanner.hh"
-#include "beam-settings.hh"
#include "translator.icc"
@@ -73,27 +72,18 @@ Measure_grouping_engraver::process_music ()
if (now.grace_part_)
return;
- SCM settings = get_property ("beamSettings");
- SCM grouping = SCM_EOL;
- if (scm_is_pair (settings))
- {
- SCM time_signature_fraction = get_property ("timeSignatureFraction");
- grouping = ly_beam_grouping (settings,
- time_signature_fraction,
- ly_symbol2scm ("end"),
- ly_symbol2scm ("*"));
- }
+ SCM grouping = get_property ("beatStructure");
if (scm_is_pair (grouping))
{
Moment *measpos = unsmob_moment (get_property ("measurePosition"));
Rational mp = measpos->main_part_;
- Moment *beatlen_mom = unsmob_moment (get_property ("beatLength"));
- Rational beat_length = beatlen_mom->main_part_;
+ Moment *base_mom = unsmob_moment (get_property ("baseMoment"));
+ Rational base_moment = base_mom->main_part_;
Rational where (0);
for (SCM s = grouping; scm_is_pair (s);
- where += Rational ((int) scm_to_int (scm_car (s))) * beat_length,
+ where += Rational ((int) scm_to_int (scm_car (s))) * base_moment,
s = scm_cdr (s))
{
int grouplen = scm_to_int (scm_car (s));
@@ -109,7 +99,7 @@ Measure_grouping_engraver::process_music ()
grouping_ = make_spanner ("MeasureGrouping", SCM_EOL);
grouping_->set_bound (LEFT, unsmob_grob (get_property ("currentMusicalColumn")));
- stop_grouping_mom_ = now.main_part_ + Rational (grouplen - 1) * beat_length;
+ stop_grouping_mom_ = now.main_part_ + Rational (grouplen - 1) * base_moment;
get_global_context ()->add_moment_to_process (Moment (stop_grouping_mom_));
if (grouplen == 3)
@@ -138,10 +128,10 @@ ADD_TRANSLATOR (Measure_grouping_engraver,
"MeasureGrouping ",
/* read */
- "beatLength "
+ "baseMoment "
+ "beatStructure "
"currentMusicalColumn "
- "measurePosition "
- "beamSettings ",
+ "measurePosition ",
/* write */
""
diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc
index 1252c2e577..a7f986fb10 100644
--- a/lily/timing-translator.cc
+++ b/lily/timing-translator.cc
@@ -59,7 +59,7 @@ Timing_translator::initialize ()
*/
context ()->set_property ("measureLength",
Moment (Rational (1)).smobbed_copy ());
- context ()->set_property ("beatLength",
+ context ()->set_property ("baseMoment",
Moment (Rational (1, 4)).smobbed_copy ());
}
@@ -151,7 +151,10 @@ ADD_TRANSLATOR (Timing_translator,
"measurePosition ",
/* write */
- "internalBarNumber "
+ "baseMoment "
"currentBarNumber "
+ "internalBarNumber "
+ "measureLength "
"measurePosition "
+ "timeSignatureFraction "
);
diff --git a/ly/bagpipe.ly b/ly/bagpipe.ly
index cfe1ec1450..0b53e9ad29 100644
--- a/ly/bagpipe.ly
+++ b/ly/bagpipe.ly
@@ -1,15 +1,15 @@
%{
Bagpipe music settings for LilyPond.
This file builds on work by Andrew McNabb (http://www.mcnabbs.org/andrew/)
-
- Substantial changes and additions made by
+
+ Substantial changes and additions made by
Sven Axelsson, the Murray Pipes & Drums of Gothenburg
(http://www.murrays.nu)
-
+
$Id: bagpipe.ly,v 1.12 2006/03/16 14:39:46 hanwen Exp $
%}
-\version "2.12.0"
+\version "2.13.29"
% Notes of the scale of the Great Highland Bagpipe. Extra high notes for bombarde.
% Flat notes used mainly in some modern music.
@@ -69,22 +69,20 @@ showKeySignature = {
% Sets the autobeamer to span quarter notes only. Use for fast music.
% TODO: Needs more tweaking
quarterBeaming = {
- \overrideBeamSettings #'Staff #'(4 . 4) #'end
- #'((* . (1 1 1 1)) ; could omit this and use beatLength
- ((1 . 32) . (4 4 4 4 4 4 4 4)))
- \overrideBeamSettings #'Staff #'(2 . 4) #'end
- #'((* . (1 1))
- ((1 . 32) . (4 4 4 4)))
+ \set Staff.beamExceptions = #'()
}
+
halfBeaming = {
- \overrideBeamSettings #'Staff #'(2 . 2) #'end
- #'((* . (1 1))) % could omit this and use beatLength
+ \set Staff.beamExceptions = #'((end . (((1 . 8) . (4 4))
+ ((1 . 12) . (3 3)))))
}
+
% Reels are in allabreve time with half note beaming.
reelTime = {
\time 2/2
\halfBeaming
}
+
% 4/4 marches are written with numerical time signature and with quarter beaming.
marchTime = {
\time 4/4
@@ -266,12 +264,12 @@ pthrwd = { \grace { \small G16[ d32 c] } }
darodo = { \grace { \small G32[ d G c G] } }
Gdarodo = { \grace { \small d32[ G c G] } }
% Non-gracenote piobaireachd markup.
-trebling = \markup {
+trebling = \markup {
\override #'(baseline-skip . 0.3)
- \column {
- \musicglyph #"scripts.tenuto"
- \musicglyph #"scripts.tenuto"
- \musicglyph #"scripts.tenuto"
+ \column {
+ \musicglyph #"scripts.tenuto"
+ \musicglyph #"scripts.tenuto"
+ \musicglyph #"scripts.tenuto"
}
}
% Abbreviated notation common in piobaireachd scores.
diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly
index 701ca52092..8522001347 100644
--- a/ly/engraver-init.ly
+++ b/ly/engraver-init.ly
@@ -16,7 +16,7 @@
%%%% You should have received a copy of the GNU General Public License
%%%% along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-\version "2.13.10"
+\version "2.13.27"
\context {
\name "Global"
@@ -552,9 +552,19 @@ automatically when an output definition (a @code{\score} or
repeatCountVisibility = #all-repeat-counts-visible
- beamSettings = #default-beam-settings
+ timeSignatureSettings = #default-time-signature-settings
+ timeSignatureFraction = #'(4 . 4)
+
+%% These defaults should be the same as the rules established in
+%% scm/time-signature-settings.scm for 4/4 time
+ measureLength = #(ly:make-moment 4 4)
+ baseMoment = #(ly:make-moment 1 4)
+ beatStructure = #'(1 1 1 1)
+ beamExceptions = #'((end . (((1 . 8) . (4 4))
+ ((1 . 12) . (3 3 3 3)))))
autoBeaming = ##t
autoBeamCheck = #default-auto-beam-check
+
scriptDefinitions = #default-script-alist
pedalSustainStrings = #'("Ped." "*Ped." "*")
diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly
index 52299a0361..f26e0a1154 100644
--- a/ly/music-functions-init.ly
+++ b/ly/music-functions-init.ly
@@ -18,7 +18,7 @@
%%%% You should have received a copy of the GNU General Public License
%%%% along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-\version "2.12.0"
+\version "2.13.29"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -409,29 +409,19 @@ ottava =
(_i "Set the octavation.")
(make-ottava-set octave))
-overrideBeamSettings =
+overrideTimeSignatureSettings =
#(define-music-function
- (parser location context time-signature rule-type grouping-rule)
- (symbol? pair? symbol? pair?)
-
- (_i "Override beamSettings in @var{context}
-for time signatures of @var{time-signature} and rules of type
-@var{rule-type} to have a grouping rule alist
-@var{grouping-rule}.
-@var{rule-type} can be @code{end} or @code{subdivide},
-with a potential future value of @code{begin}.
-@var{grouping-rule} is an alist of @var{(beam-type . grouping)}
-entries. @var{grouping} is in units of @var{beam-type}. If
-@var{beam-type} is @code{*}, grouping is in units of the denominator
-of @var{time-signature}.")
+ (parser location context time-signature base-moment beat-structure beam-exceptions)
+ (symbol? pair? pair? cheap-list? cheap-list?)
+
+ (_i "Override @code{timeSignatureSettings} in @var{context}
+for time signatures of @var{time-signature} to have settings
+of @var{base-moment}, @var{beat-structure}, and @var{beam-exceptions}.")
;; TODO -- add warning if largest value of grouping is
;; greater than time-signature.
-
- #{
- #(override-beam-setting
- $time-signature $rule-type $grouping-rule $context)
- #})
+ (let ((setting (make-setting base-moment beat-structure beam-exceptions)))
+ (override-time-signature-setting time-signature setting context)))
overrideProperty =
#(define-music-function (parser location name property value)
@@ -675,18 +665,14 @@ resetRelativeOctave =
reference-note))
-revertBeamSettings =
+revertTimeSignatureSettings =
#(define-music-function
- (parser location context time-signature rule-type)
- (symbol? pair? symbol?)
+ (parser location context time-signature)
+ (symbol? pair?)
- (_i "Revert beam settings in @var{context} for time signatures of
-@var{time-signature} and groups of type
-@var{group-type}. @var{group-type} can be @code{end}
-or @code{subdivide}.")
- #{
- #(revert-beam-setting $time-signature $rule-type $context)
- #})
+ (_i "Revert @code{timeSignatureSettings} in @var{context}
+for time signatures of @var{time-signature}.")
+ (revert-time-signature-setting time-signature context))
rightHandFinger =
#(define-music-function (parser location finger) (number-or-string?)
@@ -710,26 +696,6 @@ scaleDurations =
(ly:music-compress music
(ly:make-moment (car fraction) (cdr fraction))))
-setBeatGrouping =
-#(define-music-function (parser location grouping) (pair?)
- (_i "Set the beat grouping in the current time signature to
-@var{grouping}.")
- (define (default-group-setting c)
- (let* ((context-time-signature
- (ly:context-property c 'timeSignatureFraction))
- (time-signature (if (null? context-time-signature)
- '(4 . 4)
- context-time-signature)))
- (override-property-setting
- c
- 'beamSettings
- (list time-signature 'end)
- (list (cons '* grouping)))))
-
- (context-spec-music
- (make-apply-context default-group-setting)
- 'Score))
-
shiftDurations =
#(define-music-function (parser location dur dots arg)
(integer? integer? ly:music?)
diff --git a/python/convertrules.py b/python/convertrules.py
index 465eead803..673d04d478 100644
--- a/python/convertrules.py
+++ b/python/convertrules.py
@@ -3005,6 +3005,31 @@ def conv (str):
str = re.sub (r'\\(cresc|dim|endcresc|enddim)\b', r'\\deprecated\1', str)
return str
+@rule ((2, 13, 29),
+ _ ("Eliminate beamSettings, beatLength, \setBeatGrouping, \overrideBeamSettings and \revertBeamSettings"))
+def conv(str):
+ if re.search(r'overrideBeamSettings', str):
+ stderr_write("\n")
+ stderr_write(NOT_SMART % _("\overrideBeamSettings. Use \set beamExceptions or \overrideTimeSignatureSettings.\n"))
+ stderr_write(UPDATE_MANUALLY)
+ if re.search(r'revertBeamSettings', str):
+ stderr_write("\n")
+ stderr_write(NOT_SMART % _("\revertBeamSettings. Use \set beamExceptions or \revertTimeSignatureSettings.\n"))
+ stderr_write(UPDATE_MANUALLY)
+ if re.search(r'beamSettings', str):
+ stderr_write("\n")
+ stderr_write(NOT_SMART % _("beamSettings. Use baseMoment, beatStructure, and beamExceptions.\n"))
+ stderr_write(UPDATE_MANUALLY)
+ if re.search(r'beatLength', str):
+ stderr_write("\n")
+ stderr_write(NOT_SMART % _("beatLength. Use baseMoment and beatStructure.\n"))
+ stderr_write(UPDATE_MANUALLY)
+ if re.search(r'setBeatGrouping', str):
+ stderr_write("\n")
+ stderr_write(NOT_SMART % _("setbeatGrouping. Use baseMoment and beatStructure.\n"))
+ stderr_write(UPDATE_MANUALLY)
+ return str
+
# Guidelines to write rules (please keep this at the end of this file)
#
# - keep at most one rule per version; if several conversions should be done,
diff --git a/scm/auto-beam.scm b/scm/auto-beam.scm
index 43ec64e9b4..c8877ecd7a 100644
--- a/scm/auto-beam.scm
+++ b/scm/auto-beam.scm
@@ -15,36 +15,51 @@
;;;; You should have received a copy of the GNU General Public License
;;;; along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-;; Determine end moment for auto beaming (or begin moment, but mostly
-;; 0== anywhere). We only consider the current time signature.
-;; In order of decreasing priority:
+;; Determine whether an auto beam should be extended to the right
+;; of the current stem. We start anywhere except on the last note
+;; of a beat. We end according to the follwing rules, in order
+;; of decreasing priority:
;;
;; 1. end <type>
-;; 2. end *
-;; 3. if 1-2 not specified, begin anywhere, end at beatLength intervals
+;; 2. end <greater type>
+;; 3. if 1-2 not specified, end at beatStructure intervals
;;
;; Rationale:
;;
;; [user override]
;; 1. override for specific duration type
-;; 2. override for all duration types in a time signature.
+;; 2. overrides apply to shorter durations
;;
-;; defined in scm/beam-settings.scm:
+;; defined in scm/time-signature-settings.scm:
;; 1. Default grouping for common time signatures
-;; 2. exceptions for specific time signature, for specific duration type
-
(define-public (default-auto-beam-check context dir measure-pos test-beam)
(define (get name default)
(let ((value (ly:context-property context name)))
(if (not (null? value)) value default)))
- (define (ending-moments group-list start-beat beat-length)
+ (define (beaming<? a b)
+ (ly:moment<? (fraction->moment (car a))
+ (fraction->moment (car b))))
+
+ (define (ending-moments group-list start-beat base-moment)
(if (null? group-list)
'()
(let ((new-start (+ start-beat (car group-list))))
- (cons (ly:moment-mul (ly:make-moment new-start 1) beat-length)
- (ending-moments (cdr group-list) new-start beat-length)))))
+ (cons (ly:moment-mul (ly:make-moment new-start 1) base-moment)
+ (ending-moments (cdr group-list) new-start base-moment)))))
+
+ (define (larger-setting test-beam sorted-alist)
+ (if (null? sorted-alist)
+ '()
+ (let* ((first-key (caar sorted-alist))
+ (first-moment (fraction->moment first-key)))
+ (if (moment<=? test-beam first-moment)
+ (car sorted-alist)
+ (larger-setting test-beam (cdr sorted-alist))))))
+
+ (define (beat-end? moment beat-structure)
+ (pair? (member moment beat-structure))) ;; member returns a list if found, not #t
;; Start of actual auto-beam test routine
;;
@@ -53,46 +68,53 @@
(if (and (!= (ly:moment-grace-numerator (ly:context-now context)) 0)
(= dir START))
#f
- (if (= dir START)
- ;; start anywhere is currently implemented
- #t
- (let* ((beat-length (get 'beatLength (ly:make-moment 1 4)))
- (measure-length (get 'measureLength (ly:make-moment 1 1)))
- (time-signature-fraction
- (get 'timeSignatureFraction '(4 . 4)))
- (settings (get 'beamSettings '()))
- (function (if (= dir START) 'begin 'end))
- (type (cons (ly:moment-main-numerator test-beam)
- (ly:moment-main-denominator test-beam)))
- (pos (if (>= (ly:moment-main-numerator measure-pos) 0)
- measure-pos
- (ly:moment-add measure-length measure-pos)))
- (type-grouping (ly:beam-grouping
- settings
- time-signature-fraction
- function
- type))
- (default-grouping (ly:beam-grouping
- settings
- time-signature-fraction
- function
- '*))
- (beat-grouping (if (null? type-grouping)
- default-grouping
- type-grouping))
- (grouping-moment (if (null? type-grouping)
- beat-length
- test-beam))
- (grouping-moments (ending-moments
- beat-grouping 0 grouping-moment)))
- (if (null? beat-grouping)
- ;; no rule applies, so end at beatLength
- (= (ly:moment-main-denominator
- (ly:moment-div pos beat-length)) 1)
- ;; otherwise, end at beginning of measure or
- ;; at specified moment
- (or
- ;; start/end at beginning of measure
- (= (ly:moment-main-numerator pos) 0)
- ;; end if measure-pos matches a specified ending moment
- (member pos grouping-moments)))))))
+ (let* ((base-moment (get 'baseMoment (ly:make-moment 1 4)))
+ (measure-length (get 'measureLength (ly:make-moment 1 1)))
+ (time-signature-fraction
+ (get 'timeSignatureFraction '(4 . 4)))
+ (beat-structure (get 'beatStructure '(1 1 1 1)))
+ (beat-endings (ending-moments beat-structure 0 base-moment))
+ (exceptions (sort (assoc-get 'end
+ (get 'beamExceptions '())
+ '())
+ beaming<?))
+ (function (if (= dir START) 'begin 'end))
+ (type (moment->fraction test-beam))
+ (non-grace (ly:make-moment
+ (ly:moment-main-numerator measure-pos)
+ (ly:moment-main-denominator measure-pos)))
+ (pos (if (ly:moment<? non-grace ZERO-MOMENT)
+ (ly:moment-add measure-length non-grace)
+ non-grace))
+ (type-grouping (assoc-get type exceptions '()))
+ (default-rule (if (null? type-grouping)
+ (larger-setting test-beam exceptions)
+ '()))
+ (default-grouping (if (pair? default-rule)
+ (cdr default-rule)
+ '()))
+ (default-beat-length (if (pair? default-rule)
+ (car default-rule)
+ '()))
+ (exception-grouping (if (null? type-grouping)
+ default-grouping
+ type-grouping))
+ (grouping-moment (if (null? type-grouping)
+ (fraction->moment default-beat-length)
+ test-beam))
+ (exception-moments (ending-moments
+ exception-grouping 0 grouping-moment)))
+
+ (if (= dir START)
+ ;; Start rules
+ (or (not (equal? time-signature-fraction '(3 . 4))) ;; start anywher if not 3/4
+ (beat-end? pos beat-endings) ;; are we at start of beat?
+ (and (not (equal? test-beam base-moment)) ;; is beat split?
+ (not (beat-end? (ly:moment-add pos test-beam)
+ beat-endings)))) ;; will this note end the beat
+ ;; End rules
+ (or (= (ly:moment-main-numerator pos) 0) ;; end at measure beginning
+ (if (null? exception-grouping)
+ (beat-end? pos beat-endings) ;; no exception, so check beat ending
+ (member pos exception-moments))))))) ;; check exception rule
+
diff --git a/scm/beam-settings.scm b/scm/beam-settings.scm
deleted file mode 100644
index ecc7c8e412..0000000000
--- a/scm/beam-settings.scm
+++ /dev/null
@@ -1,240 +0,0 @@
-;;;; This file is part of LilyPond, the GNU music typesetter.
-;;;;
-;;;; Copyright (C) 2009--2010 Carl Sorensen <c_sorensen@byu.edu>
-;;;;
-;;;; LilyPond is free software: you can redistribute it and/or modify
-;;;; it under the terms of the GNU General Public License as published by
-;;;; the Free Software Foundation, either version 3 of the License, or
-;;;; (at your option) any later version.
-;;;;
-;;;; LilyPond is distributed in the hope that it will be useful,
-;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;;; GNU General Public License for more details.
-;;;;
-;;;; You should have received a copy of the GNU General Public License
-;;;; along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
-
-;;; specify default beaming rules
-
-;;; format:
-;;;
-;;; alist of
-;;; ((time-signature function) . (beam-type . grouping)) entries
-;;;
-;;; where
-;;;
-;;; time-signature = time signature fraction (pair of numbers, (4 . 4) )
-;;; function = 'end or 'subdivide (possibly implement 'begin in the future)
-;;; beam-type = '* or (numerator . denominator); e.g. (1 . 16)
-;;; NOTE: numerator is kept in beam-type because of
-;;; tuplets, e.g. (2 . 24) = (2 . 3) * (1 . 8)
-;;; for eighth-note triplets.
-;;; grouping = a list of groups, in units of time signature denominator
-;;; (for default rules) or beam-type (for explicit rules)
-;;;
-
-(define-public default-beam-settings
- `(
- ;; in 2 2 time:
- ;; default: end beams on 1 2 note boundaries
- ;; end beams with 32nd notes each 1 4 beat
- (((2 . 2) end) .
- ((* . (1 1))
- ((1 . 32) . (8 8 8 8))))
-
- ;; in 2 4, 2 8 and 2 16 time:
- ;; default: end beams on beats
- (((2 . 4) end) . ((* . (1 1))))
- (((2 . 8) end) . ((* . (1 1))))
- (((2 . 16) end) . ((* . (1 1))))
-
- ;; in 3 2 time:
- ;; default: end beams on beats
- ;; end beams with 32nd notes each 1 4 beat
- (((3 . 2) end) .
- ((* . (1 1 1))
- ((1 . 32) . (8 8 8 8 8 8))))
-
- ;; in 3 4 time:
- ;; default: set grouping to (3) so we'll get
- ;; the proper measure grouping symbol
- ;;
- ;; set all beams to end on beats, but 1 8 to beam entire measure
- (((3 . 4) end) .((* . (3))
- ((1 . 8) . (6))
- ((1 . 16) . (4 4 4))
- ((1 . 32) . (8 8 8))
- ((1 . 64) . (16 16 16))
- ((1 . 128) . (32 32 32))))
-
- ;; in 3 8 and 3 16 time time:
- ;; default: group on 3
- (((3 . 8) end) . ((* . (3))))
- (((3 . 16) end) . ((* . (3))))
-
- ;; in 4 2 time:
- ;; default: end beams on beats
- ;; end beams with 16th notes each 1 4 beat
- ;; end beams with 32nd notes each 1 8 beat
- (((4 . 2) end) .
- ((* . (1 1 1 1))
- ((1 . 16) . (4 4 4 4 4 4 4 4))
- ((1 . 32) . (4 4 4 4
- 4 4 4 4
- 4 4 4 4
- 4 4 4 4))))
-
- ;; in 4 4 (common) time:
- ;; default: end beams on beats
- ;; end beams with 8th notes each 1 2 beat
- (((4 . 4) end) .
- ((* . (1 1 1 1))
- ((1 . 8) . (4 4))))
-
- ;; in 4 8 time:
- ;; default: group on 1 4 notes
- (((4 . 8) end) . ((* . (2 2))))
-
- ;; in 4 16 time:
- ;; default: group on beats
- (((4 . 16) end) . ((* . (1 1 1 1))))
-
- ;; in 6 4 time:
- ;; default group at 3 4
- ;; end beams with 16th or 32nd notes each 1 4 beat
- (((6 . 4) end) .
- ((* . (3 3))
- ((1 . 16) . (4 4 4 4 4 4))
- ((1 . 32) . (8 8 8 8 8 8))))
-
- ;; in 6 8 time:
- ;; default: group at 3 8
- ;; end beams with 32nd notes each 1 8 beat
- (((6 . 8) end) .
- ((* . (3 3))
- ((1 . 32) . (4 4 4 4 4 4))))
-
- ;; in 6 16 time:
- ;; default: group at 3 16
- (((6 . 16) end) . ((* . (3 3))))
-
- ;; in 9 4 time:
- ;; default: group at 3 4
- ;; end beams with 16th or 32nd notes each 1 4 beat
- (((9 . 4) end) .
- ((* . (3 3 3))
- ((1 . 16) . (4 4 4 4 4 4 4 4 4))
- ((1 . 32) . (8 8 8 8 8 8 8 8 8))))
-
- ;; in 9 8 time:
- ;; default: group at 3 8
- ;; use beatGrouping for all except 32nd notes
- ;; end beams with 32nd notes each 1 8 beat
- (((9 . 8) end) .
- ((* . (3 3 3))
- ((1 . 32) . (4 4 4 4 4 4 4 4 4))))
-
- ;; in 9 16 time
- ;; default: group at 3 8
- (((9 . 16) end) . ((* . (3 3 3))))
-
- ;; in 12 4 time:
- ;; default: group at 3 4
- ;; end beams with 16th or 32nd notes each 1 4 beat
- (((12 . 4) end) .
- ((* . (3 3 3 3))
- ((1 . 16) . (4 4 4 4 4 4 4 4 4 4 4 4 4))
- ((1 . 32) . (8 8 8 8 8 8 8 8 8 8 8 8 8))))
-
- ;; in 12 8 time:
- ;; default: group at 3 8
- ;; end beams with 32nd notes each 1 8 beat
- (((12 . 8) end) .
- ((* . (3 3 3 3))
- ((1 . 32) . (4 4 4 4 4 4 4 4 4 4 4 4 4))))
-
- ;; in 12 16 time:
- ;; default: group at 3 16
- (((12 . 16) end) . ((* . (3 3 3 3))))
-
- ;; in 5 8 time:
- ;; default: group (3 2)
- (((5 . 8) end) . ((* . (3 2))))
-
- ;; in 8 8 time:
- ;; default: group (3 3 2)
- (((8 . 8) end) . ((* . (3 3 2))))
- )) ; end of alist definition
-
-;;; Functions for overriding beam settings
-;;;
-
-(define (overridden-property-alist context property setting value)
- "Return an alist containing the current @{context} value of
-@code{property} overriden by @code{(setting . value)}. "
- (cons (cons setting value) (ly:context-property context property)))
-
-(define-public (override-property-setting context property setting value)
- "Like the C++ code that executes \\override, but without type
-checking. "
- (ly:context-set-property!
- context property
- (overridden-property-alist context property setting value)))
-
-(define (revert-property-setting context property setting)
- "Like the C++ code that executes \revert, but without type
-checking. "
-
- (define (revert-member alist entry new)
- "Return ALIST, with ENTRY removed. ALIST is not modified, instead
-a fresh copy of the list-head is made."
- (cond
- ((null? alist) new)
- ((equal? (car alist) entry) (revert-member (cdr alist) entry new))
- (else (revert-member (cdr alist) entry (cons (car alist) new)))))
-
- (ly:context-set-property!
- context property
- (revert-member (ly:context-property context property) setting '())))
-
-(define-public (override-beam-setting
- time-signature rule-type rule . rest)
- "Override the beam settings for the context in @var{rest},
-for @var{time-signature} and @var{rule-type}, with the
-new rule alist @var{rule}. "
- (define (make-setting c)
- (let ((new-settings
- (overridden-property-alist
- c
- 'beamSettings
- (list time-signature rule-type)
- rule)))
- (ly:context-set-property! c 'beamSettings new-settings)))
-
- (let ((music-to-export
- (context-spec-music
- (make-apply-context make-setting)
- (if (and (pair? rest) (symbol? (car rest)))
- (car rest)
- 'Voice))))
- (ly:export music-to-export)))
-
-(define-public (score-override-beam-setting
- time-signature rule-type rule)
- (override-beam-setting
- time-signature rule-type rule 'Score))
-
-(define-public (revert-beam-setting
- time-signature rule-type . rest)
- (ly:export
- (context-spec-music
- (make-apply-context
- (lambda (c)
- (revert-property-setting
- c
- 'beamSettings
- (list time-signature rule-type))))
- (if (and (pair? rest) (symbol? (car rest)))
- (car rest)
- 'Voice))))
diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm
index 1da05b637a..755c9fdf34 100644
--- a/scm/define-context-properties.scm
+++ b/scm/define-context-properties.scm
@@ -121,6 +121,8 @@ each note.")
(barNumberVisibility ,procedure? "A Procedure that takes an
integer and returns whether the corresponding bar number should be
printed.")
+ (baseMoment ,ly:moment? "Smallest unit of time that will stand on its
+own as a subdivided section.")
(bassFigureFormatFunction ,procedure? "A procedure that is
called to produce the formatting for a @code{BassFigure} grob. It
takes a list of @code{BassFigureEvent}s, a context, and the grob to
@@ -128,13 +130,10 @@ format.")
(bassStaffProperties ,list? "An alist of property settings to
apply for the down staff of @code{PianoStaff}. Used by
@code{\\autochange}.")
- (beamSettings ,list? "Specifies when automatically generated
-beams should begin and end, as well as beam subdivision behavior.
-See @ruser{Setting automatic beam
-behavior} for more information.")
- (beatLength ,ly:moment? "The length of one beat in this time
-signature.")
-
+ (beamExceptions ,list? "An alist of exceptions to autobeam rules
+that normally end on beats.")
+ (beatStructure ,list? "List of @code{baseMoment}s that are combined
+to make beats.")
(chordChanges ,boolean? "Only show changes in chords scheme?")
(chordNameExceptions ,list? "An alist of chord exceptions.
@@ -442,7 +441,7 @@ one).")
(strokeFingerOrientations ,list? "See
@code{fingeringOrientations}.")
(subdivideBeams ,boolean? "If set, multiple beams will be
-subdivided at beat positions by only drawing one beam over the beat.")
+subdivided at @code{baseMoment} positions by only drawing one beam over the beat.")
(suggestAccidentals ,boolean? "If set, accidentals are typeset as
cautionary suggestions over the note.")
(systemStartDelimiter ,symbol? "Which grob to make for the start
@@ -470,6 +469,10 @@ arpeggios.")
(timeSignatureFraction ,number-pair? "A pair of numbers,
signifying the time signature. For example, @code{#'(4 . 4)} is a
4/4 time signature.")
+ (timeSignatureSettings ,cheap-list? "A nested alist of settings for
+time signatures. Contains elements for various time signatures. The
+element for each time signature contains entries for @code{baseMoment},
+@code{beatStructure}, and @code{beamExceptions}.")
(timing ,boolean? "Keep administration of measure length,
position, bar number, etc.? Switch off for cadenzas.")
(tonic ,ly:pitch? "The tonic of the current scale.")
diff --git a/scm/define-music-display-methods.scm b/scm/define-music-display-methods.scm
index 53bddaac93..f3304dadab 100644
--- a/scm/define-music-display-methods.scm
+++ b/scm/define-music-display-methods.scm
@@ -1001,7 +1001,7 @@ Otherwise, return #f. Note: default grouping is not available."
(> (length ?elts) 2)
(with-music-match ((cadr ?elts)
(music 'PropertySet
- symbol 'beatLength))
+ symbol 'baseMoment))
#t)
(with-music-match ((caddr ?elts)
(music 'PropertySet
diff --git a/scm/lily-library.scm b/scm/lily-library.scm
index 8958c81cc1..254fb397d9 100644
--- a/scm/lily-library.scm
+++ b/scm/lily-library.scm
@@ -66,6 +66,15 @@
(or (equal? a b)
(ly:moment<? a b)))
+(define-public (fraction->moment fraction)
+ (if (null? fraction)
+ ZERO-MOMENT
+ (ly:make-moment (car fraction) (cdr fraction))))
+
+(define-public (moment->fraction moment)
+ (cons (ly:moment-main-numerator moment)
+ (ly:moment-main-denominator moment)))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; arithmetic
(define-public (average x . lst)
diff --git a/scm/lily.scm b/scm/lily.scm
index c0c1f44256..14c283a3e5 100644
--- a/scm/lily.scm
+++ b/scm/lily.scm
@@ -375,7 +375,7 @@ LilyPond safe mode. The syntax is the same as `define*-public'."
"part-combiner.scm"
"autochange.scm"
"define-music-properties.scm"
- "beam-settings.scm"
+ "time-signature-settings.scm"
"auto-beam.scm"
"chord-name.scm"
"bezier-tools.scm"
diff --git a/scm/music-functions.scm b/scm/music-functions.scm
index ae02fb614a..011cdaf2ab 100644
--- a/scm/music-functions.scm
+++ b/scm/music-functions.scm
@@ -521,8 +521,8 @@ OTTAVATION to `8va', or whatever appropriate."
;;; Used for calls that include beat-grouping setting
(define-public (set-time-signature num den . rest)
"Set properties for time signature @var{num/den}.
-If @var{rest} is present, it is used to make a default
-@code{beamSetting} rule."
+If @var{rest} is present, it is used to set
+@code{beatStructure}."
(ly:export (apply make-beam-rule-time-signature-set
(list num den rest))))
@@ -530,30 +530,32 @@ If @var{rest} is present, it is used to make a default
"Implement settings for new time signature. Can be
called from either make-time-signature-set (used by \time
in parser) or set-time-signature (called from scheme code
-included in .ly file."
-
- (define (make-default-beaming-rule context)
- (override-property-setting
- context
- 'beamSettings
- (list (cons num den) 'end)
- (list (cons '* (car rest)))))
-
- (let* ((set1 (make-property-set 'timeSignatureFraction (cons num den)))
- (beat (ly:make-moment 1 den))
- (len (ly:make-moment num den))
- (set2 (make-property-set 'beatLength beat))
- (set3 (make-property-set 'measureLength len))
- (beaming-rule
- (if (null? rest)
- '()
- (list (make-apply-context make-default-beaming-rule))))
- (output (cons* set1 set2 set3 beaming-rule)))
- (descend-to-context
- (context-spec-music
- (make-sequential-music output)
- 'Timing)
- 'Score)))
+included in .ly file)."
+
+ (let ((m (make-music 'ApplyContext)))
+ (define (make-time-settings context)
+ (let* ((fraction (cons num den))
+ (time-signature-settings (ly:context-property context 'timeSignatureSettings))
+ (my-base-fraction (base-fraction fraction time-signature-settings))
+ (my-beat-structure (if (null? rest)
+ (beat-structure my-base-fraction
+ fraction
+ time-signature-settings)
+ (car rest)))
+ (beaming-exception
+ (beam-exceptions fraction time-signature-settings))
+ (new-measure-length (ly:make-moment num den)))
+ (ly:context-set-property! context 'timeSignatureFraction fraction)
+ (ly:context-set-property!
+ context 'baseMoment (fraction->moment my-base-fraction))
+ (ly:context-set-property! context 'beatStructure my-beat-structure)
+ (ly:context-set-property! context 'beamExceptions beaming-exception)
+ (ly:context-set-property! context 'measureLength new-measure-length)))
+ (set! (ly:music-property m 'procedure) make-time-settings)
+ (descend-to-context
+ (context-spec-music m 'Timing)
+ 'Score)))
+
(define-public (make-mark-set label)
"Make the music for the \\mark command."
diff --git a/scm/time-signature-settings.scm b/scm/time-signature-settings.scm
new file mode 100644
index 0000000000..dbca769a1c
--- /dev/null
+++ b/scm/time-signature-settings.scm
@@ -0,0 +1,299 @@
+;;;; This file is part of LilyPond, the GNU music typesetter.
+;;;;
+;;;; Copyright (C) 2009--2010 Carl Sorensen <c_sorensen@byu.edu>
+;;;;
+;;;; LilyPond is free software: you can redistribute it and/or modify
+;;;; it under the terms of the GNU General Public License as published by
+;;;; the Free Software Foundation, either version 3 of the License, or
+;;;; (at your option) any later version.
+;;;;
+;;;; LilyPond is distributed in the hope that it will be useful,
+;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;;; GNU General Public License for more details.
+;;;;
+;;;; You should have received a copy of the GNU General Public License
+;;;; along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+
+;;; specify time signature default settings
+
+;;; format:
+;;;
+;;; alist of
+;;; (time-signature . default-properties) entries.
+;;;
+;;; where default-properties is an alist containing information about the
+;;; time signature. Each default-properties set can contain the
+;;; following entries:
+;;;
+;;; (baseMoment . (numerator . denominator))
+;;; (beatStructure . structure-list)
+;;; (beamExceptions . (alist of beam exceptions that don't follow beats))
+;;;
+;;; The alist of beam exceptions has the following entries:
+;;;
+;;; (end . grouping-rules)
+;;; (subdivide . grouping-rules) (not yet implemented, reserved for future use)
+;;;
+;;; grouping-rules is an alist containing (beam-type . grouping-list) entries
+;;;
+;;; beam-type is (numerator . denominator)
+;;; grouping-list is a list that specifies the
+;;; number of stems of the given duration that are grouped in a beamed unit.
+;;; For an exception, the duration used is beam-type. For measureBeats,
+;;; the duration used is baseMoment.
+;;;
+;;; If an exception is specified for a given beam-type, it will apply to all
+;;; beams of shorter durations that don't have an individual exception, so
+;;; ((1 . 8) . (3 3 2))
+;;; will cause all primary beams to be broken at 3/8, 5/8, and 8/8.
+;;;
+;;; ((1. 32) . (16 8 4 4))
+;;; will cause all 1/32, 1/64, and 1/128 beams to be broken at 1/2, 3/4,
+;;; 7/8, and 8/8.
+;;;
+;;; If no values are given for baseMoment and measureBeats, default values
+;;; will be assigned:
+;;; baseMoment gets the value (ly:make-moment 1 time-signature-denominator)
+;;; beatStructure gets a list of (3 3 3 ...), where the number of entries is the
+;;; number of beats, each containing 3 base-moments, if the time
+;;; signature numerator is greater than 3 and divisible by 3, and
+;;; a list of (1 1 1 ...), where the number of entries is the
+;;; number of base moments in a measure otherwise.
+;;;
+;;; If no value is given for beatCombinations, no beats will be combined without
+;;; beamExceptions rules.
+;;;
+;;; NOTE: numerator is kept in beam-type because of
+;;; tuplets, e.g. (2 . 24) = (2 . 3) * (1 . 8)
+;;; for eighth-note triplets.
+
+(define-public default-time-signature-settings
+ '(
+ ;; in 2/2 time:
+ ;; use defaults, but end beams with 32nd notes each 1 4 beat
+ ((2 . 2) .
+ ((beamExceptions . ((end . (((1 . 32) . (8 8 8 8))))))))
+
+ ;; in 2/4, 2/8 and 2/16 time:
+ ;; use defaults, so no entries are necessary
+
+ ;; in 3 2 time:
+ ;; use defaults, but end beams with 32nd notes and higher each 1 4 beat
+
+ ((3 . 2) .
+ ((beamExceptions . ((end . (((1 . 32) . (8 8 8 8 8 8))))))))
+
+ ;; in 3 4 time:
+ ;; use defaults, but combine all beats into a unit if possible
+ ;;
+ ;; set all beams to end on beats, but 1 8 to beam entire measure
+ ;; in order to avoid beaming every beat for entier measure, we set
+ ;; triplets back to every beat.
+ ((3 . 4) .
+ ((beamExceptions . ((end . (((1 . 8) . (6))
+ ((1 . 12) . (3 3 3))))))))
+
+ ;; in 3 8 time:
+ ;; beam entire measure together
+ ((3 . 8) . ((beamExceptions . ((end . (((1 . 8) . (3))))))))
+
+ ;; in 3 16 time:
+ ;; use defaults -- no entries necessary
+
+ ;; in 4 2 time:
+ ;; use defaults, but end beams with 16th notes or finer each 1 4 beat
+ ((4 . 2) .
+ ((beamExceptions . ((end . (((1 . 16) . (4 4 4 4 4 4 4 4))))))))
+
+ ;; in 4 4 (common) time:
+ ;; use defaults, but combine beats 1,2 and 3,4 if only 8th notes
+ ;; NOTE: Any changes here need to be duplicated in
+ ;; ly/engraver-init.ly where the default time signature is set
+ ;; are set
+ ((4 . 4) .
+ ((beamExceptions . ((end . (((1 . 8) . (4 4))
+ ((1 . 12) . (3 3 3 3))))))))
+
+ ;; in 4/8 time:
+ ;; combine beats 1 and 2, so beam in 2
+ ((4 . 8) . ((beatStructure . (2 2))))
+
+ ;; in 4/8 and 4/16 time:
+ ;; use defaults, so no entries necessary
+
+ ;; in 6 4 time:
+ ;; use defaults, but end beams with 32nd or finer each 1/4 beat
+ ((6 . 4) .
+ ((beamExceptions . ((end . (((1 . 16) . (4 4 4 4 4 4))))))))
+
+ ;; in 6 8 time:
+ ;; use defaults, but end beams with 32nd or finer each 1 8 beat
+ ((6 . 8) .
+ ((beamExceptions . ((end . (((1 . 32) . (4 4 4 4 4 4))))))))
+
+ ;; in 6 16 time:
+ ;; use defaults, so no entry necessary
+
+ ;; in 9 4 time:
+ ;; use defaults, but end beams with 32nd or finer each 1 4 beat
+ ((9 . 4) .
+ ((beamExceptions . ((end . (((1 . 32) . (8 8 8 8 8 8 8 8))))))))
+
+ ;; in 9 8 time
+ ;; use defaults, but end beams with 32nd notes each 1 8 beat
+ ((9 . 8) .
+ ((beamExceptions . ((end . (((1 . 32) . (4 4 4 4 4 4 4 4 4))))))))
+
+ ;; in 9 16 time
+ ;; use defaults, so no entry necessary
+
+ ;; in 12 4 time:
+ ;; use defaults, but end beams with 32nd or finer notes each 1 4 beat
+ ((12 . 4) .
+ ((beamExceptions . ((end . (((1 . 32) . (8 8 8 8 8 8 8 8 8 8 8 8))))))))
+
+ ;; in 12 8 time:
+ ;; use defaults, but end beams with 32nd notes each 1 8 beat
+ ((12 . 8) .
+ ((beamExceptions . ((end . (((1 . 32) . (4 4 4 4 4 4 4 4 4 4 4 4))))))))
+
+ ;; in 12 16 time:
+ ;; use defaults; no entry needed
+
+ ;; in 5 8 time:
+ ;; default: group (3 2)
+ ((5 . 8) .
+ ((baseMoment . (1 . 8))
+ (beatStructure . (3 2))))
+
+ ;; in 8 8 time:
+ ;; default: group (3 3 2)
+ ((8 . 8) .
+ ((baseMoment . (1 . 8))
+ (beatStructure . (3 3 2))))
+
+ )) ; end of alist definition
+
+;;;
+;;; Accessor and constructor functions
+;;;
+
+(define (get-setting my-symbol time-signature time-signature-settings)
+ "Get setting @code{my-symbol} for @code{time-signature} from
+@code{time-signature-settings}."
+ (let ((my-time-signature-settings
+ (assoc-get time-signature time-signature-settings '())))
+ (assoc-get my-symbol my-time-signature-settings '())))
+
+(define-public (make-setting base-fraction
+ beat-structure
+ beam-exceptions)
+ (list
+ (cons 'baseMoment base-fraction)
+ (cons 'beatStructure beat-structure)
+ (cons 'beamExceptions beam-exceptions)))
+
+(define-public (base-fraction time-signature time-signature-settings)
+ "Get @code{baseMoment} fraction value for @code{time-signature} from
+@code{time-signature-settings}."
+ (let ((return-value (get-setting 'baseMoment
+ time-signature
+ time-signature-settings)))
+ (if (null? return-value)
+ (cons 1 (cdr time-signature))
+ return-value)))
+
+(define-public (beat-structure base-fraction time-signature time-signature-settings)
+ "Get beatStructure value in @code{base-fraction} units
+for @code{time-signature} from
+@code{time-signature-settings}."
+ (define (fraction-divide numerator denominator)
+ (/ (* (car numerator) (cdr denominator))
+ (* (cdr numerator) (car denominator))))
+
+ (let ((return-value (get-setting 'beatStructure
+ time-signature
+ time-signature-settings)))
+ (if (null? return-value)
+ ;; calculate default beatStructure
+ (let* ((numerator (car time-signature))
+ (group-size (if (and (> numerator 3)
+ (zero? (remainder numerator 3)))
+ 3
+ 1))
+ (beat-length (cons (* group-size (car base-fraction))
+ (cdr base-fraction)))
+ (beat-count (fraction-divide time-signature beat-length)))
+ (if (integer? beat-count)
+ (make-list beat-count group-size)
+ '()))
+ ;; use value obtained from time-signature-settings
+ return-value)))
+
+(define-public (beam-exceptions time-signature time-signature-settings)
+ "Get beamExceptions value for @code{time-signature} from
+@code{time-signature-settings}."
+ (get-setting 'beamExceptions time-signature time-signature-settings))
+
+
+;;; Functions for overriding time-signature settings
+;;;
+
+(define (override-property-setting context property setting value)
+ "Like the C++ code that executes \\override, but without type
+checking. "
+ (begin
+ (revert-property-setting context property setting)
+ (ly:context-set-property!
+ context
+ property
+ (cons (cons setting value) (ly:context-property context property)))))
+
+(define (revert-property-setting context property setting)
+ "Like the C++ code that executes \revert, but without type
+checking. "
+
+ (define (revert-member alist entry new)
+ "Return ALIST, with ENTRY removed. ALIST is not modified, instead
+a fresh copy of the list-head is made."
+ (cond
+ ((null? alist) new)
+ ((equal? (car alist) entry) (revert-member (cdr alist) entry new))
+ (else (revert-member (cdr alist) entry (cons (car alist) new)))))
+
+ (ly:context-set-property!
+ context property
+ (revert-member (ly:context-property context property) setting '())))
+
+(define-public (override-time-signature-setting time-signature setting . rest)
+ "Override the time signature settings for the context in @var{rest},
+with the new setting alist @var{setting}. "
+ (context-spec-music
+ (make-apply-context
+ (lambda (c) (override-property-setting
+ c
+ 'timeSignatureSettings
+ time-signature
+ setting)))
+ (if (and (pair? rest) (symbol? (car rest)))
+ (car rest)
+ 'Voice)))
+
+(define-public (score-override-time-signature-setting
+ time-signature setting)
+ (override-time-signature-setting
+ time-signature setting 'Score))
+
+(define-public (revert-time-signature-setting
+ time-signature . rest)
+ (context-spec-music
+ (make-apply-context
+ (lambda (c)
+ (revert-property-setting
+ c
+ 'timeSignatureSettings
+ time-signature)))
+ (if (and (pair? rest) (symbol? (car rest)))
+ (car rest)
+ 'Voice)))
diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py
index 88058b17d0..7e8dbbae02 100644
--- a/scripts/musicxml2ly.py
+++ b/scripts/musicxml2ly.py
@@ -165,7 +165,7 @@ compoundMeter =
\set Timing.measureLength = $mlen
\set Timing.timeSignatureFraction = #(cons (ly:moment-main-numerator $mlen)
(ly:moment-main-denominator $mlen))
-\set Timing.beatLength = $beat
+\set Timing.baseMoment = $beat
% TODO: Implement beatGrouping and auto-beam-settings!!!
#} ))