Tempo (metronome) marks with approximation sign: Difference between revisions

Import snippet from LSR
 
Account for LilyPond change _ → G_
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
If you want to display an approximation sign in your (numeric) tempo marks, or if you want to display the tempo number in a different color, or if you want to hide the parentheses in your combined tempo mark (both name and number), this example demonstrates how the translation functions found in <code>.../scm/translation-functions.scm</code> can be adopted, doing it in a tunable way with new optional context properties.
If you want to display an approximation sign in your (numeric) tempo marks, or if you want to display the tempo number in a different color, or if you want to hide the parentheses in your combined tempo mark (both name and number), this example demonstrates how the translation functions found in <code>.../scm/translation-functions.scm</code> can be adopted, doing it in a tunable way with new optional context properties.


<lilypond version="2.24.0" full>
<lilypond version="2.24" full>
%% http://lsr.di.unimi.it/LSR/Item?id=869
%% http://lsr.di.unimi.it/LSR/Item?id=869


Line 93: Line 93:
       (ly:error "error in call of define-translator-property"))
       (ly:error "error in call of define-translator-property"))
   (if (not (equal? (object-property symbol 'translation-doc) #f))
   (if (not (equal? (object-property symbol 'translation-doc) #f))
       (ly:error (_ "symbol ~S redefined") symbol))
       (ly:error (G_ "symbol ~S redefined") symbol))


   (set-object-property! symbol 'translation-type? type?)
   (set-object-property! symbol 'translation-type? type?)
Line 175: Line 175:
[[Category:Text]]
[[Category:Text]]
[[Category:Tweaks and overrides]]
[[Category:Tweaks and overrides]]
[[Category:Snippet]]