lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parenthesized dynamics


From: Andrew Bernard
Subject: Re: Parenthesized dynamics
Date: Tue, 9 May 2017 20:51:11 +1000

Hi Michiel,

Generalising your code so you don't need to create a function with hard coded offsets for every dynamic used and every instance leads to:

== snip

parenOffsetDyn =
#(define-event-function (dyn x-off y-off) (ly:event? number? number?)
   (make-dynamic-script
    #{ \markup \concat {
      \normal-text \italic \fontsize #2 (
      \pad-x #0.2 \translate #(cons x-off y-off) #(ly:music-property dyn 'text)
      \normal-text \italic \fontsize #2 )
       }
    #}))

== snip

Example usage:

c\parenOffsetDyn\p 0.2 -0.2

You could play around with this concept. Obviously the offsets will need to be small or else it starts to look poor.

With recent lilypond versions you no longer need to use the parser and location arguments.

Andrew


reply via email to

[Prev in Thread] Current Thread [Next in Thread]