lilypond-user
[Top][All Lists]
Advanced

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

Re: Custom bar line


From: Br. Samuel Springuel
Subject: Re: Custom bar line
Date: Sun, 18 Dec 2016 11:48:24 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

Thanks Harm, based on what you did I was able to develop the following which got me what I was looking for:

\version "2.19.52"

#(define ((make-custom-tick-bar-line x y) grob extent)
  "Draw a tick bar line."
  (let* ((staff (ly:staff-symbol-staff-space grob))
         (staff-line-thickness (ly:staff-symbol-line-thickness grob))
         (height (interval-end extent)))
    (bar-line::draw-filled-box
      (cons 0 (+ x staff-line-thickness))
      (cons (- height staff x) (+ height staff x))
      staff-line-thickness
      extent
      grob)))

#(add-bar-glyph-print-procedure "'" (make-custom-tick-bar-line 0.1 0.1))

#(define ((make-custom-half-bar-line x y) grob extent)
  "Draw a half bar line."
  (let* ((half-staff (* 1/2 (ly:staff-symbol-staff-space grob)))
         (staff-line-thickness (ly:staff-symbol-line-thickness grob))
         (height (interval-end extent)))
    (bar-line::draw-filled-box
      (cons 0 (+ x staff-line-thickness))
      (cons (- height (* 7 half-staff) x) (- height half-staff x))
      staff-line-thickness
      extent
      grob)))

#(add-bar-glyph-print-procedure "/" (make-custom-half-bar-line 0.1 0.1))

#(define-bar-line "/" "/" #f #f)

{
    R1
    \bar "'"
    R
    \bar "/"
    R
}
--
✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ



reply via email to

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