@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
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},
@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
@cindex Gesangstext und Balken
@funindex autoBeaming
-@funindex beamSettings
+@funindex beatStructure
+@funindex beamExceptions
@funindex measureLength
-@funindex beatLength
+@funindex baseMoment
@funindex \time
@funindex time
@funindex \set
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
@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
}
}
% 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
@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
@funindex subdivideBeams
@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
-{sub-dividing-beams.ly}
+{subdividing-beams.ly}
@cindex Taktgruppen
@cindex Schlaggruppen
@translationof Bars
@menu
-* Taktstriche::
-* Taktzahlen::
-* Takt- und Taktzahlüberprüfung::
-* Ãœbungszeichen::
+* Taktstriche::
+* Taktzahlen::
+* Takt- und Taktzahlüberprüfung::
+* Ãœbungszeichen::
@end menu
@node Taktstriche
@translationof Special rhythmic concerns
@menu
-* Verzierungen::
-* An Kadenzen ausrichten::
-* Verwaltung der Zeiteinheiten::
+* Verzierungen::
+* An Kadenzen ausrichten::
+* Verwaltung der Zeiteinheiten::
@end menu
@node Verzierungen
@cindex letra y barrado
@funindex autoBeaming
-@funindex beamSettings
+@funindex beamExceptions
+@funindex baseMoment
+@funindex beatStructure
@funindex measureLength
-@funindex beatLength
@funindex \time
@funindex time
@funindex \set
@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
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
% 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
@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}.
@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
@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).
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
@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
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
@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}.
@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).
@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]
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,
\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}.
@rglos{tuplet},
@rglos{polymetric}.
-Manuel d'apprentissage :
+Manuel d'apprentissage :
@rlearning{Méthodes de retouche}.
Manuel de notation :
@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 :
@rglos{tie},
@rglos{laissez vibrer}.
-Dans ce manuel :
+Dans ce manuel :
@ref{Découpage automatique des notes}.
Morceaux choisis :
@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
@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
@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
@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
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
@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
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
@end lilypond
-Les métriques anciennes sont abordées au chapitre
+Les métriques anciennes sont abordées au chapitre
@ref{Métriques anciennes}.
Références internes :
@rinternals{TimeSignature},
@rinternals{Timing_translator}.
-
-
+
+
@node Levées
@unnumberedsubsubsec Levées
@translationof Upbeats
@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.
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}).
@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
@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
@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.
@cindex paroles et ligatures
@funindex autoBeaming
-@funindex beamSettings
+@funindex beamExceptions
+@funindex baseMoment
+@funindex beatStructure
@funindex measureLength
-@funindex beatLength
@funindex \time
@funindex time
@funindex \set
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
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)}}.
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)
@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
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
@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
@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
@cindex beams, subdividing
@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
-{sub-dividing-beams.ly}
+{subdividing-beams.ly}
@cindex measure groupings
@cindex beats, grouping
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]
@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
@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
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
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 :
@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
@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).
Morceaux choisis :
@rlsr{Rhythms}.
-Référence du programme :
+Référence du programme :
@rinternals{BarNumber}.
@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}.
@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
@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}.
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
@seealso
-Dans ce manuel :
-@ref{Numéros de mesure},
+Dans ce manuel :
+@ref{Numéros de mesure},
@ref{Musique sans métrique}
Morceaux choisis :
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},
@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:
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.
(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
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
% 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
% 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
% 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
% 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 {
-%% 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
"
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'' {
<<
}
>>
\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]
}
}
% 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
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:
"
\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 {
% 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
}
>>
% 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
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
\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
}
% 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"
% 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
% 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
% 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
% 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
% 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
% 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
% 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
\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
% 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
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) |
% 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
% 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
% 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
% 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
% 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
% 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
% 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
% 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 {
% 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 {
% 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
% 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
% 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
% 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 {
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
% 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
% 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
% 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
% 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
% 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)
% 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
% 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
% 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
% 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
--- /dev/null
+\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]
+ }
+}
+
-\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:
"
\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 {
% 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
}
>>
-\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"
}
\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
}
-\version "2.13.4"
+\version "2.13.29"
\header {
lsrtags = "rhythms"
\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
-\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) |
% on melodies from Bellini's "Norma" %
%*****************************************************************%
-\version "2.13.20"
+\version "2.13.29"
#(set-global-staff-size 15)
\paper {
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
-\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"
}
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
}
--- /dev/null
+\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]
+}
+
% 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
% 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
% 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
% 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
% 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 {
% 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 {
% 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
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
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
}
% 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 {
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
% 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"
% 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
% 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"
% 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 {
% 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
% 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{
% 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
% 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 {
-\version "2.13.20"
+\version "2.13.29"
#(set-global-staff-size 15)
%%%
% 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
% 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
% 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
% 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
-\version "2.12.0"
+\version "2.13.29"
\include "example-header.ily"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}
-csh = \change Staff = "high"
+csh = \change Staff = "high"
csm = \change Staff = "middle"
csl = \change Staff = "low"
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
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
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.
}
\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 }
@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.
PATCH_LEVEL=29
MY_PATCH_LEVEL=
VERSION_STABLE=2.12.3
-VERSION_DEVEL=2.13.28
+VERSION_DEVEL=2.13.29
}
-\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
}
\header {
texidoc = "Default beaming patterns can be set for the current time
-signature by @code{\\setBeatGrouping}. "
+signature. "
}
\layout {
\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]
}
-\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."
}
\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
}
-\version "2.13.4"
+\version "2.13.29"
\header {
composer = "ARTHUR GRAY"
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
>>
-\version "2.13.28"
+\version "2.13.29"
\header {
texidoc = "A tremolo repeat containing only one note (no sequential music)
-\version "2.13.28"
+\version "2.13.29"
\header {
texidoc = "A tremolo can have more than two notes. Also check that
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;
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;
}
grouping_ = 0;
beam_settings_ = SCM_EOL;
- shortest_mom_ = Moment (Rational (1, 8));
+ shortest_mom_ = Moment (Rational (1, 4));
}
void
beam_settings_ = SCM_EOL;
}
- shortest_mom_ = Moment (Rational (1, 8));
+ shortest_mom_ = Moment (Rational (1, 4));
}
void
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;
{
Moment measure_now = measure_position (context ());
consider_end (measure_now, shortest_mom_);
- consider_begin (measure_now, shortest_mom_);
}
else if (process_acknowledged_count_ > 1)
{
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 */
+ ""
+ );
Beaming_options beaming_options_;
Beaming_options finished_beaming_options_;
-
+
void typeset_beam ();
void set_melisma (bool);
if (stop_ev_ && beam_)
{
announce_end_grob (beam_, stop_ev_->self_scm ());
-
+
}
}
finished_beam_ = beam_;
finished_beam_info_ = beam_info_;
finished_beaming_options_ = beaming_options_;
-
+
stop_ev_ = 0;
beam_ = 0;
beam_info_ = 0;
{
if (!beam_)
return;
-
+
Moment now = now_mom ();
if (!valid_start_point ())
return;
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"))
{
/* 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 */
TRANSLATOR_DECLARATIONS (Grace_beam_engraver);
DECLARE_TRANSLATOR_LISTENER (beam);
-
+
protected:
virtual bool valid_start_point ();
virtual bool valid_end_point ();
"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 */
+++ /dev/null
-/*
- 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;
-}
-
*/
#include "context.hh"
-#include "beam-settings.hh"
#include "beaming-pattern.hh"
/*
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)
{
// 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++;
}
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 ()
+++ /dev/null
-/*
- 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
{
SCM grouping_;
bool subdivide_beams_;
- Moment beat_length_;
+ Moment base_moment_;
Moment measure_length_;
Beaming_options ();
#include "global-context.hh"
#include "engraver.hh"
#include "spanner.hh"
-#include "beam-settings.hh"
#include "translator.icc"
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));
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)
"MeasureGrouping ",
/* read */
- "beatLength "
+ "baseMoment "
+ "beatStructure "
"currentMusicalColumn "
- "measurePosition "
- "beamSettings ",
+ "measurePosition ",
/* write */
""
*/
context ()->set_property ("measureLength",
Moment (Rational (1)).smobbed_copy ());
- context ()->set_property ("beatLength",
+ context ()->set_property ("baseMoment",
Moment (Rational (1, 4)).smobbed_copy ());
}
"measurePosition ",
/* write */
- "internalBarNumber "
+ "baseMoment "
"currentBarNumber "
+ "internalBarNumber "
+ "measureLength "
"measurePosition "
+ "timeSignatureFraction "
);
%{
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.
% 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
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.
%%%% 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"
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." "*")
%%%% 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"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(_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)
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?)
(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?)
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,
;;;; 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
;;
(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
+
+++ /dev/null
-;;;; 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))))
(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
(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.
(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
(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.")
(> (length ?elts) 2)
(with-music-match ((cadr ?elts)
(music 'PropertySet
- symbol 'beatLength))
+ symbol 'baseMoment))
#t)
(with-music-match ((caddr ?elts)
(music 'PropertySet
(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)
"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"
;;; 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))))
"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."
--- /dev/null
+;;;; 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)))
\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!!!
#} ))