lilypond-user
[Top][All Lists]
Advanced

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

Custom parenthesize ignoring Staves?


From: kmg
Subject: Custom parenthesize ignoring Staves?
Date: Sat, 15 Apr 2017 20:11:01 +0200

Hey, I'm working on re-typing some educational notes and I'm wondering if maybe someone had this problem and also came up with some Scheme to deal with this.

http://i.imgur.com/T7z8Ty7.png - this is the source;

http://i.imgur.com/IGocUKW.png - this is what I came up with (nevermind wrong notes)

So, I'm basically using #parch scheme which I luckily found on german Lilypond forums (sadly seems to be down now).. scheme for it is the following:

parch =  #(define-music-function (parser location gap) (number?)
#{
   \once \override Arpeggio.stencil = #(lambda (grob)
     (ly:stencil-add
       (ly:arpeggio::brew-chord-slur grob)
       (ly:stencil-translate-axis
         (ly:stencil-rotate (ly:arpeggio::brew-chord-slur grob) 180 0 0)
         gap X)))
   \once \override Arpeggio.X-extent = #(lambda (grob)
     (ly:stencil-extent (ly:arpeggio::brew-chord-slur grob) X))
   \once \override Arpeggio.positions = #(lambda (grob)
     (interval-widen (ly:arpeggio::calc-positions grob) 1.5))
   $(make-music 'EventChord 'elements (list (make-music 'ArpeggioEvent)))
#})

// usage: \parch #<distance of the right bracket>

which I kinda made work by doing the chord on d# note with greater range, but with the upper note hidden, so the parenthese is not too small. However, if I make the chord with super low note, staff will stretch and it's not working.

I've been thinking, would there be an easy way to do this? I already use handy Scheme for Box markup (http://lsr.di.unimi.it/LSR/Item?id=953). I think it's superior in the sense that you can place it basically anywhere and offset it like you want it. So there are no problems with having to do some gimmicks to make it work.

Thought that chords will be trickier, but it seems that using harmony scheme from Repository and doing \center-column in \figuremode with markups does the job nicely.

I sometimes wonder if it should be that tricky (I mean, having to learn Scheme to do some things).. but then, I wonder if such thing would be doable at all in other notation programs. .

Anyway, thanks for your input guys and.. Happy Easter!


Pozdrawiam,
Krzysztof Gutowski

reply via email to

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