On 6/18/09 8:45 AM, "Laura Conrad" <lcon...@laymusic.org> wrote:
>>>>>> "Carl" == Carl D Sorensen <c_soren...@byu.edu> writes:
>
> Carl> Does this seem at all promising?
>>>
>>> Yes, but there's still the problem of extra space at the barline. I
>>> tried Michael's solutions and doing nothing at all and there's still
>>> extra space after the 4th whole note.
>
> Carl> How about this?
>
> Carl> \relative c'' {
> Carl> \key f \major
> Carl> \cadenzaOn
> Carl> g1*1/4 bes1*1/4 a1*1/4 g1*1/4 g1.*1/6 c4 bes4 c1*1/4
> Carl> }
>
> Carl> I think that gets rid of the extra space.
>
> Yes, it does.
>
Here's the code defining petrucciSpacing:
petrucciSpacing =
#(define-music-function (parser location music) (ly:music?)
"Set effective spacing of all notes to 1/4"
(music-map (lambda (m)
(if (eq? (ly:music-property m 'name) 'NoteEvent)
(let*
((current-duration (ly:music-property m 'duration))
(current-log (ly:duration-log current-duration))
(current-length (ly:duration-length current-duration))
(current-dotcount
(ly:duration-dot-count current-duration))
(new-factor (ly:moment-div
(ly:make-moment 1 4)
current-length))
(new-numerator (ly:moment-main-numerator new-factor))
(new-denominator
(ly:moment-main-denominator new-factor)))
(set! (ly:music-property m 'duration)
(ly:make-duration
current-log
current-dotcount
new-numerator
new-denominator))
m)
m))
music))
\relative c'' {
\key f \major
\cadenzaOn
\petrucciSpacing {
g1 bes 1 a1 g1 g1. c4 bes4 c1 \bar "||"
}
}
HTH,
Carl
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user