Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
LilyPond wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Metric modulation (proportional tempi)
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
This snippet shows how you can '''typeset a metric modulation as a rehearsal mark'''. (See [https://lists.gnu.org/archive/html/lilypond-user/2026-05/msg00194.html this thread on the mailing list].) In the code below, the following commands enable you to '''center the = glyph above the bar line'''. # <code>\general-align</code> commands set the center of the <code>myMetricModulation</code> markup to be the center of the equals sign (=). For more information, see [https://lilypond.org/doc/v2.26/Documentation/notation/text-markup-commands#markup-for-text-alignment A.1.2 Markup for text alignment] in the Notation Reference. # <code>\put-adjacent</code> commands add elements to the sides of the equals sign without shifting it. See [https://lilypond.org/doc/v2.26/Documentation/notation/text-markup-commands#markup-for-text-alignment A.1.2 Markup for text alignment]. # Switching off <code>self-alignment-X</code> means that the 0 coordinate of the stencil gets used for alignment with the bar line, without any shifting. (If you do not include <code>\tweak self-alignment-X ##f</code>, then <code>self-alignment-X = 0</code> will calculate a shift in order to align the center of the markup, rather than the equals sign, to its anchor point.) The music on this page is from Tomás Luis de Victoria, “O magnum mysterium,” Tenor part ([https://ks15.imslp.org/files/imglnks/usimg/6/69/IMSLP106031-PMLP216234-TENOR.pdf PDF of source]). '''Some other approaches to metric modulations:''' # [[Metric modulation with tuplet]] shows a way to indicate a metric modulation that refers to a duration within a tuplet. # Yoshiaki Onishi’s approaches use <code>\textEndMark</code> and <code>\textMark</code> and print left and right arrows (← →) on each side of the equation, following the example of the scores of composer Elliott Carter. For an explanation, search for “Metric Modulation Equation” in Onishi’s [https://github.com/yoshiakionishi/lilypond-snippets/blob/main/DOCUMENT/YO_SNIPPETS_COOKBOOK_MASTER.pdf LilyPond Contemporary Notation Cookbook]; for the code, see [https://github.com/yoshiakionishi/lilypond-snippets/blob/main/DOCUMENT/metricModulationRegularFlag.ly metricModulationRegularFlag.ly] and [https://github.com/yoshiakionishi/lilypond-snippets/blob/main/DOCUMENT/metricmodulationStraightFlag.ly metricmodulationStraightFlag.ly]. His commands support tuplet note values. <lilypond version="2.26"> % Optional: Define markup commands % to contain shortcuts for the notes % to typeset in your metric modulation markup. simpleBreve = \markup { \override #'(style . baroque) \note { \breve } #UP % (stem direction) } dottedBreve = \markup { \override #'(style . baroque) \note { \breve. } #UP % (stem direction) } thickSpace = \markup \char ##x2004 % Unicode codepoint U+2004 is a % Three-per-Em space % (also known as a “thick space”); see % https://en.wikipedia.org/wiki/Whitespace_character#Unicode % Define a custom markup command % to typeset an equals sign (=) % with a thick space on each side. equals = \markup { \put-adjacent #X #RIGHT \put-adjacent #X #LEFT \general-align #Y #DOWN \char ##x003D % https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode \thickSpace \thickSpace } % Define a markup that says % “breve = dotted breve” % with the = glyph at the % center of this markup. myMetricModulation = \markup { \put-adjacent #X #RIGHT \put-adjacent #X #LEFT \general-align #X #CENTER \general-align #Y #CENTER \equals \simpleBreve \dottedBreve } words = \lyricmode { Ie -- sum Chris -- tum al -- le -- lu -- ia al } music = \relative { \key g \dorian \clef "petrucci-c4" \override NoteHead.style = #'baroque \tag #'metronome { \tempo 1 = 60 } \time 2/1 f\breve | g1 a1 | \tweak self-alignment-X ##f \mark \myMetricModulation \tag #'metronome { \once \override Score.MetronomeMark.X-offset = #7 \tempo "" 1 = 90 } \time 3/1 g\breve g1 | d'\breve d1 | c\breve c1 | } \markup { \circle 1 Metric modulation: } \markup \vspace #0.2 \score { << \new Voice = "tenor" \removeWithTag #'metronome \music \new Lyrics \lyricsto "tenor" \words >> } \markup { \circle 2 With metronome marks added: } \markup \vspace #0.2 \score { << \new Voice = "tenor" \keepWithTag #'metronome \music \new Lyrics \lyricsto "tenor" \words >> } </lilypond> [[Category:Rhythms]] [[Category:Editorial annotations]] [[Category:Ancient notation]] [[Category:Real music]] [[Category:Snippet]]
Summary:
Please note that all contributions to LilyPond wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Metric modulation (proportional tempi)
Add topic