Hi Ted,
On Mon, Dec 22, 2014 at 9:16 AM, Ted Lemon mel...@fugue.com wrote:
On Dec 22, 2014, at 10:04 AM, David Nalesnik david.nales...@gmail.com
wrote:
I always thought the traditional Ped. looked a bit like an elephant...
Heh! Yes, I can see that. Or perhaps like a Snuffleupagus, if that
reference makes any sense to you.
sure does!
Anyway, yes, Kieren's right. You can replace the drawing with whatever
you'd like. You'd simply need to come up with a replacement stencil
function. There will be a bit of complication for markings that stretch
across system breaks, but that's also doable.
In this particular piece they do not, although the vertical tics on either
and do actually adjust relative to the music on the staff, similarly to
slurs.
Maybe later today I'll get a chance to work something out--something
similar to get you started.
If you happen to have time I would be interested and grateful, but please
don't let my obscure inquiry sidetrack you if you have better things to do
this afternoon! :)
It's fun to work these things out. Besides, I always learn something, and
possibly my answer can help somebody with something less obscure.
This gives you the shape in the original (minus the odd little horizontal
jog at the left end--whatever does that mean?) It will behave rationally
over line-breaks, too. (You can see what happens by uncommenting the
breaks in the first example.)
The slant of the jogs at the ends is hard-coded. Sorry. You can of course
change the line
(flare '(0.25 . 0.25))
to whatever you want. I'm emulating the property 'bracket-flare here. I'd
love to be able to look up bracket-flare and use that, but apparently it's
only used for the internal jog in designs like the following:
|___/\___|
Anyway, hope this helps--
David
\version 2.19.15
\paper {
ragged-right = ##t
}
#(define (bound-coord bound refp)
(if (not (= (ly:item-break-dir bound) CENTER))
(cdr (ly:generic-bound-extent bound refp))
(ly:grob-relative-coordinate bound refp X)))
#(define slanted-bracket
(lambda (grob)
(let* ((bound-L (ly:spanner-bound grob LEFT))
(bound-R (ly:spanner-bound grob RIGHT))
(common (ly:grob-common-refpoint bound-L bound-R X))
(coord-L (bound-coord bound-L common))
(coord-R (bound-coord bound-R common))
(height (ly:grob-property grob 'edge-height))
(shorten (ly:grob-property grob 'shorten-pair))
(flare '(0.25 . 0.25))
(th (ly:output-def-lookup (ly:grob-layout grob) 'line-thickness))
(main
(make-line-stencil
th
(+ coord-L (car flare) (car shorten)) 0
(+ coord-R (- (cdr flare)) (cdr shorten)) (car height)))
(wing-L (make-line-stencil
th
0 (car height)
(car flare) 0))
(wing-R (make-line-stencil
th
0 (car height)
(cdr flare) (- (car height) (cdr height
(main
(if (= (ly:item-break-dir bound-L) CENTER)
(ly:stencil-combine-at-edge main X LEFT wing-L 0)
main))
(main
(if (= (ly:item-break-dir bound-R) CENTER)
(ly:stencil-combine-at-edge main X RIGHT wing-R 0)
main))
(main
(ly:stencil-translate-axis
main
(- (ly:grob-relative-coordinate bound-L common X))
X)))
main)))
{
\set Staff.pedalSustainStyle = #'bracket
%\override Staff.PianoPedalBracket.edge-height = #'(2 . 0.5)
%\override Staff.PianoPedalBracket.shorten-pair = #'(-2 . 0)
\override Staff.PianoPedalBracket.stencil = #slanted-bracket
c4\sustainOn g c d
%\break
c4 g c d
%\break
c4 g c d
c1\sustainOff
}
{
\set Staff.pedalSustainStyle = #'bracket
\override Staff.PianoPedalBracket.stencil = #slanted-bracket
\clef bass
% move right end to right
\override Staff.PianoPedalBracket.shorten-pair = #'(0 . 0.75)
d8-5\sustainOn
\clef treble d'8_5 [ d'_2 f'_1 a8_5]
a8_5 a a \sustainOff a
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user