Re: Custom Bar Line for Renaissance Polyphony
Yoshiaki Onishi <[email protected]> Mon, 27 Jul 2026 08:16:32 -0400
| Newsgroups | gmane.comp.gnu.lilypond.general |
|---|---|
| Message-ID | <[email protected]> |
Hello Gabriel,
> I am confused:
>=20
> Why is it that I can add (+) 0.25 staff space above the lowest line, =
but I *cannot subtract* (-) 0.25 staff space below that line?
Because the value =E2=80=9Ccenter=E2=80=9D identifies the position of =
the center line from which the tick needs to be drawn (e.g. if center is =
0, the tick would be on the center of the staff line), by turning + into =
- in the code that sets the value =E2=80=9Ccenter,=E2=80=9D you are =
ending up the center value to be turned into a positive value (as in (- =
5 -5) =3D> 10), having the tick end up at the top.
So the fix I would propose is actually to look at the value of =
=E2=80=9Cquarter-staff,=E2=80=9D which finds the value of quarter the =
staff space. Turning this into a negative value will draw the tick =
downward. So there are two solutions.
You can replace part of the code you have with either of the followings:
%%% SNIPPET BEGINS=20
(if (>=3D line-count 2)
(set! center
(+ ; WILL FAIL if I change this plus to minus (-)
(* quarter-staff -1) ;<=E2=80=94 This is the changed =
line!
; in the following code,
; min WORKS to find the lowest line:
(* (apply min line-pos) half-staff))))
%%% SNIPPET ENDS
OR =E2=80=A6 directly turn the quarter-staff value into a negative =
value:
%%% SNIPPET BEGINS
=20
(quarter-staff (* -1/4 staff-space))
%%% SNIPPET ENDS
Very best,
Yoshi
-- -- --
Yoshiaki Onishi
https://github.com/yoshiakionishi/lilypond-snippets