lilypond-user
[Top][All Lists]
Advanced

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

Re: moving colliding rests


From: Mats Bengtsson
Subject: Re: moving colliding rests
Date: Wed, 07 Dec 2005 10:07:53 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511

Why not simply define a macro like
restsUp = {
 \override Rest #'direction = #UP
 \override MultiMeasureRest #'staff-position = 1
}

  /Mats

Jonatan Liljedahl wrote:

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 )=-


_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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