Well in my case (not a very common one, I'll admit) I wanted to do something different.
I've found a workaround. Works well if no line-breaks are needed.
Besides, your solution would need manual alignment in some cases and I want to minimise manual tweaks as much as possible. My scores are HUGE and when those little things are starting to add up the process gets unwieldy.
hairpinBetweenText =
#(define-music-function (parser location leftText rightText) (markup? markup?)
#{
\once \override Hairpin.stencil =
#(lambda (grob)
(ly:grob-set-property! grob 'circled-tip #t)
(ly:grob-set-property! grob 'height 0.5)
(ly:grob-set-property! grob 'thickness 1.2)
(ly:stencil-combine-at-edge
(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 leftText) Y CENTER)
0)
X RIGHT
(ly:stencil-aligned-to (grob-interpret-markup grob rightText) Y CENTER)
0.6))
#})
parenthesizedHairpin = \hairpinBetweenText \markup { \with-dimensions #'(0 . 0) #'(0 . 0) \translate #'(-0.12 . 0.5) \override #'(baseline-skip . 1.5)
\center-column { \draw-line #'(0.1 . 0.5) \draw-line #'(-0.1 . 0.5) } } \markup\with-dimensions #'(0 . 0) #'(0 . 0) {
\translate #'(0 . 0) \fontsize #-1 \musicglyph #"scripts.halfopenvertical"
}
% the music
\score {
\relative c' {
\time 3/4
\parenthesizedHairpin
c16\< d e f g a b\! c d e f g
| \break
a \<
c d a\!
}
}
%%%%%%%%%%%%%%%
Dimitris