On Mon, May 05, 2003 at 11:46:50PM -0500, Tim Nowaczyk wrote:
Well, here's a patch that does what I want, but I'd rather do this in
scheme in the header. The included patch adds a new barline ":4|" that
creates the correct symbol.
I'm trying to learn all this, but I've never used lisp before. Here's the
scheme code I have so far. I'm trying to override the ':|' symbol with
a custom one.
Well, no pointers, so I struck out on my own. Am I asking a stupid
question, does no one know or does no one care? That's my main
question.
Here's what I've got. It looks right, but I don't know if
it is really spaced correctly.
\version "1.7.18"
\paper
{
papersize="letter"
}
\include "paper20.ly"
\header {
title = "Candenzen f\\\"ur Gitarre"
composer = "Anton Diabelli"
enteredby = "tim"
}
#(define (brew-custom-barline grob)
(if (string=? (ly:get-grob-property grob 'glyph) ":|" )
(let*
( (dot (ly:find-glyph-by-name (ly:get-default-font grob) "dots-dot"))
(dot (ly:molecule-translate-axis dot 1.5 1))
(colon4 (ly:molecule-combine-at-edge dot 1 -1 dot .5 0))
(colon4 (ly:molecule-combine-at-edge colon4 1 -1 dot .5 0))
(colon4 (ly:molecule-combine-at-edge colon4 1 -1 dot .5 0))
)
(ly:set-grob-property! grob 'glyph "|.")
(ly:molecule-combine-at-edge (Bar_line::brew_molecule grob) 0 -1 colon4
.5 0)
)
(Bar_line::brew_molecule grob)
)
)
global = \notes
{
\key c \major
\clef "G_8"
\time 4/4
\skip 1*4
\bar ":|"
}
upNotes = \notes \relative c
{
\stemUp
<e2 g c> <g b> |
<g c> <a d> |
<e g c> <d g b> |
<e1 g c>
}
downNotes = \notes \relative c
{
\stemDown
c2 d e f g, g c1
}
\score
{
\context Staff
<
\property Staff.BarLine \override #'molecule-callback =
#brew-custom-barline
\global
\context Voice = upVoice \upNotes
\context Voice = downVoice \downNotes
>
\header {piece="No. 1"}
\paper{}
%\midi{}
}