X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fhorizontally-aligning-custom-dynamics-e.g.-sempre-pp%2C-piu-f%2C-subito-p.ly;h=fb0629e36a60ddb784196f115c85e29115a77cfd;hb=8cce5dd067a8a2bab508f5abebc3955db8837bbf;hp=8b6c7490c47759db26a1a05d5d52f3dbe9150f19;hpb=d65a3a9777a9e96029f6aa408d86d13a88f6619d;p=lilypond.git diff --git a/Documentation/snippets/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly b/Documentation/snippets/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly index 8b6c7490c4..fb0629e36a 100644 --- a/Documentation/snippets/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly +++ b/Documentation/snippets/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly @@ -1,10 +1,13 @@ -%% Do not edit this file; it is automatically -%% generated from LSR http://lsr.dsi.unimi.it +%% DO NOT EDIT this file manually; it is automatically +%% generated from LSR http://lsr.di.unimi.it +%% Make any changes in LSR itself, or in Documentation/snippets/new/ , +%% and then run scripts/auxiliar/makelsr.py +%% %% This file is in the public domain. -\version "2.13.31" +\version "2.18.0" \header { - lsrtags = "expressive-marks, tweaks-and-overrides" + lsrtags = "expressive-marks, tweaks-and-overrides, version-specific" texidoc = " Some dynamic expressions involve additional text, like @qq{sempre pp}. @@ -14,16 +17,18 @@ displayed way after the note it applies to. To correctly align the @qq{sempre pp} horizontally, so that it is aligned as if it were only the \\pp, there are several approaches: -* Simply use @code{\\once\\override DynamicText #'X-offset = #-9.2} +* Simply use @code{\\once\\override DynamicText.X-offset = #-9.2} before the note with the dynamics to manually shift it to the correct position. Drawback: This has to be done manually each time you use that -dynamic markup... * Add some padding (@code{#:hspace 7.1}) into the -definition of your custom dynamic mark, so that after lilypond -center-aligns it, it is already correctly aligned. Drawback: The -padding really takes up that space and does not allow any other markup -or dynamics to be shown in that position. +dynamic markup... -* Shift the dynamic script @code{\\once\\override ... #'X-offset = ..}. +* Add some padding (@code{#:hspace 7.1}) into the definition of your +custom dynamic mark, so that after lilypond center-aligns it, it is +already correctly aligned. Drawback: The padding really takes up that +space and does not allow any other markup or dynamics to be shown in +that position. + +* Shift the dynamic script @code{\\once\\override ... .X-offset = ..}. Drawback: @code{\\once\\override} is needed for every invocation! * Set the dimensions of the additional text to 0 (using @@ -38,7 +43,7 @@ dynamic-script. * Set an explicit alignment inside the dynamic-script. By default, this won't have any effect, only if one sets X-offset! Drawback: One needs -to set @code{DynamicText #'X-offset}, which will apply to all dynamic +to set @code{DynamicText.X-offset}, which will apply to all dynamic texts! Also, it is aligned at the right edge of the additional text, not at the center of pp. @@ -59,7 +64,7 @@ not at the center of pp. semppMarkup = \markup { \halign #1.4 \italic "sempre" \dynamic "pp" } % Solution 2: Using a dynamic script & shifting with -% \once \override ... #'X-offset = .. +% \once \override ...X-offset = .. % Drawback: \once \override needed for every invocation semppK = #(make-dynamic-script @@ -104,7 +109,7 @@ semppG = % Solution 6: Dynamic with explicit alignment. This has only effect % if one sets X-offset! -% Drawback: One needs to set DynamicText #'X-offset! +% Drawback: One needs to set DynamicText.X-offset! % Drawback: Aligned at the right edge of the additional text, % not at the center of pp semppMII = @@ -133,10 +138,10 @@ semppMII = \set Staff.instrumentName = \markup \column { Explicit shifting } \relative c'' { \key es \major - \once \override DynamicText #'X-offset = #-9.2 + \once \override DynamicText.X-offset = #-9.2 c4\semppK c\p c c c4\ff c - \once \override DynamicText #'X-offset = #-9.2 + \once \override DynamicText.X-offset = #-9.2 c4\semppK c } >> @@ -166,9 +171,8 @@ semppMII = \relative c'' { \key es \major % Setting to ##f (false) gives the same result - \override DynamicText #'X-offset = #0 + \override DynamicText.X-offset = #0 c4\semppMII c\p c c | c\ff c c\semppMII c } >> >> -