Andrew Bernard <andrew.bern...@gmail.com> writes:

> Hello Ponderers,
>
> My score has many places where a beamed set of grace notes start precisely on 
> a note in a voice, and consequently overlap the first starting note. This is 
> fine, and what the composer specifically intends (common notation in the New 
> Complexity School). The attached image shows a snippet of a typical scenario.
>
> In my example, I can’t get the start of the grace to sit on top of the note 
> in the other voice. Indeed, lilypond is being very excellent about avoiding a 
> collision, but I want to persuade it to align. I can achieve this with normal 
> notes, but not with grace notes. Is this even remotely possible?

grace notes have different time.  So you cannot actually work with grace
notes.  But you may borrow the way grace note appearance.  Try playing
around with the following and see whether you can make it do what you
want with some parallel voices (you need a separate Voice or the grace
note settings will invade your main voice).

graceOn =
\applyContext
#(lambda (c)
  (for-each
   (lambda (e)
    (let ((ct (ly:context-find c (car e))))
     (if ct
      (apply ly:context-pushpop-property ct (cdr e)))))
   (ly:context-property c 'graceSettings)))

graceOff =
\applyContext
#(lambda (c)
  (for-each
   (lambda (e)
    (let ((ct (ly:context-find c (car e))))
     (if ct
      (apply ly:context-pushpop-property ct (list-head (cdr e) 2)))))
   (ly:context-property c 'graceSettings)))

\new Staff
<<
  \new Voice \scaleDurations 1/4 { \voiceOne \graceOn g'8[ a'] \graceOff }
  \new Voice { c' d' e' f' }
>>

-- 
David Kastrup
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to