lilypond-user
[Top][All Lists]
Advanced

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

moving colliding rests


From: Jonatan Liljedahl
Subject: moving colliding rests
Date: Tue, 6 Dec 2005 21:17:24 -0200

I have a little special case where I need to enter music as two voices.
The thing is that the second voice is not a real voice but just a layer
that shows a pitch with a parenthesized note-head. I have made
everything but noteheads transparent in this voice. 

But sometimes there's a rest in the first voice that collides with the
parenthesized note-head, in that case I want the rest to be moved up
just as if I had put \voiceOne and \voiceTwo in the two voices... But
If I do that, then all stems directions are forced up/down and also
rest positions are changed even when there are no colliding stuff.

It seems like \override Rest #'Y-offset = #0 fixed that, at least it
looks like rests are changed only when they collides with the second
voice noteheads... But the stem direction is still forced, so I tried
to make my own make-voice-props-set scheme function like this, where I
removed all grobs but Rests in the set-direction-loop (I think):

#(define (my-make-voice-props-set n)
  (make-sequential-music
   (append
    (map (lambda (x) (make-grob-property-set x 'direction
                                             (if (odd? n) -1 1)))
         '(Rest))
    (list
     (make-grob-property-set 'NoteColumn 'horizontal-shift (quotient n
2)) (make-grob-property-set 'MultiMeasureRest 'staff-position (if (odd?
n) -4 4 )))))) 

And then I call it with

#(context-spec-music (my-make-voice-props-set 0) 'Voice)

instead of \voiceOne

But nothing happens! It's just as if there was no \voiceOne or
equivalent... Any tips? What am I missing?

/Jonatan    -=( http://kymatica.com )=-




reply via email to

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