That's great, really!
Is it also possible to have "wah" inside the hairpin?

2009/12/27 Alexander Kobel <n...@a-kobel.de>

> 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
>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to