How to create custom dynamic markings: Difference between revisions
Appearance
Import snippet from LSR |
m New category |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
While it is trivial to create individual dynamic markings, if a more complex dynamic is required that LilyPond does not offer 'as standard' then it is quite easy to create your own. This also has the advantage of centering correctly without the need for more complex h-align positioning. | While it is trivial to create individual dynamic markings, if a more complex dynamic is required that LilyPond does not offer 'as standard' then it is quite easy to create your own. This also has the advantage of centering correctly without the need for more complex h-align positioning. | ||
<lilypond version="2.24 | <lilypond version="2.24"> | ||
%% http://lsr.di.unimi.it/LSR/Item?id=789 | %% http://lsr.di.unimi.it/LSR/Item?id=789 | ||
| Line 38: | Line 38: | ||
[[Category:Specific notation]] | [[Category:Specific notation]] | ||
[[Category:Symbols and glyphs]] | [[Category:Symbols and glyphs]] | ||
[[Category:Snippet]] | |||
Latest revision as of 23:32, 21 November 2025
While it is trivial to create individual dynamic markings, if a more complex dynamic is required that LilyPond does not offer 'as standard' then it is quite easy to create your own. This also has the advantage of centering correctly without the need for more complex h-align positioning.
\version "2.24"
%% http://lsr.di.unimi.it/LSR/Item?id=789
% Based on http://lsr.di.unimi.it/LSR/Snippet?id=382
% the #:hspace value controls the amount of space between each dynamic symbol.
dynamicOne = #(make-dynamic-script (markup #:line (
#:dynamic "f"
#:dynamic "z"
#:dynamic "p" )))
dynamicTwo = #(make-dynamic-script (markup #:line (
#:dynamic "p" #:hspace -0.5
#:dynamic "z" #:hspace -0.5
#:dynamic "f" #:hspace -0.5
#:dynamic "z" #:hspace -0.5
#:dynamic "p" )))
dynamicThree = #(make-dynamic-script (markup #:line (
#:dynamic "s" #:hspace -0.8
#:dynamic "f" #:hspace -0.8
#:dynamic "z" #:hspace -0.8
#:dynamic "z" #:hspace -0.8
#:dynamic "z" #:hspace -0.8
#:dynamic "z" #:hspace -0.8
#:dynamic "p" )))
\relative c'' {
c1\dynamicOne c2 c c1\dynamicTwo c2 c c1\dynamicThree
}