Center text below hairpin dynamics: Difference between revisions

m New category
Tags: Mobile edit Mobile web edit
mNo edit summary
Line 1: Line 1:
This example provides a function to typeset a hairpin (de)crescendo with some additional text below it, such as “molto” or “poco”. The added text will change the direction according to the direction of the hairpin. The Hairpin is aligned to DynamicText.
This example provides a function to typeset a hairpin (de)crescendo with some additional text below it, such as “molto” or “poco”. The added text will change the direction according to the direction of the hairpin. The Hairpin is aligned to a <code>DynamicText</code> grob.


The example also illustrates how to modify the way an object is normally printed, using some Scheme code.
The example also illustrates how to modify the way an object is normally printed, using some Scheme code.


<lilypond version="2.24" full>
<lilypond version="2.24">
\paper { tagline = ##f }
 
hairpinWithCenteredText =
hairpinWithCenteredText =
#(define-music-function (text) (markup?)
#(define-music-function (text) (markup?)
Line 56: Line 54:
hairpinMore =  
hairpinMore =  
\hairpinWithCenteredText \markup { \larger moltissimo }
\hairpinWithCenteredText \markup { \larger moltissimo }
\layout { ragged-right = ##f }


\relative c' {
\relative c' {