lilypond-user
[Top][All Lists]
Advanced

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

Re: wah-wah-effect


From: Alexander Kobel
Subject: Re: wah-wah-effect
Date: Sun, 27 Dec 2009 20:15:34 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Alexander Kobel wrote:
Hi, Stefan,

you could try to experiment with Hairpin #'stencil. I imagine combining the usual stencil with a "+" markup at the right side should work. Have a look for the ly:stencil-combine-at-edge and ly:text-interface::interpret-markup (other possibilities exist, of course; you can draw a "+" or a circle outside of a text block, but this looks quite easy) functions. You'll find examples for both functions here on the list, or in the LSR.


Actually, the LSR nearly has the correct function, so it wasn't too much work to figure it out:


%% idea from: http://lsr.dsi.unimi.it/LSR/Item?id=233

hairpinPlus = \once \override Voice.Hairpin #'stencil =
#(lambda (grob)
  (ly:stencil-aligned-to
   (ly:stencil-combine-at-edge
    (ly:stencil-aligned-to (ly:hairpin::print grob) Y CENTER)
    X RIGHT
(ly:stencil-aligned-to (grob-interpret-markup grob (markup "+")) Y CENTER))
   Y CENTER))

\layout { ragged-right = ##f }
\relative c' {
  \hairpinPlus
  c2\< c\!
}


I didn't know about grob-interpret-markup. Well, that's a great shortcut!


Cheers,
Alexander




reply via email to

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