Hello!
I'm typesetting a SATB score on two staves. I want to use partcombine
so that I can write the parts for each voice the way they supposed to
be sung. It's well known that partcombine doesn't work with the
lyrics, so I tried this workaround by Daniel E. Moctezuma
http://comments.gmane.org/gmane.comp.gnu.lilypond.general/73934
It turns out that the dots are positioned incorrectly, as the
transparent dots still take place and push the visible dots away. I
asked in lilypond-user but got no answer:
http://article.gmane.org/gmane.comp.gnu.lilypond.general/79243
So I implemented an engraver that kills transparent dots. It's good
enough for my purpose so far
(http://gitorious.org/lilypond-music/lilypond-music/blobs/c69aea3ddeecb92227544cf6c83a0fb513657a14/Popular/MyCountry.ly)
#(define-public (Hidden_dots_engraver ctx)
(make-engraver
(acknowledgers
((dots-interface trans dot source)
(if (eq? (ly:grob-property dot 'transparent) #t)
(ly:grob-suicide! dot))))))
\layout {
\context {
\Staff
\consists #Hidden_dots_engraver
}
}
However, it appears that rests need this treatment as well.
#(define-public (Hidden_voice_engraver ctx)
(make-engraver
(acknowledgers
((rest-interface trans rest source)
(if (eq? (ly:grob-property rest 'transparent) #t)
(ly:grob-suicide! rest)))
((dots-interface trans dot source)
(if (eq? (ly:grob-property dot 'transparent) #t)
(ly:grob-suicide! dot))))))
If there is a rest with dot, I get an error message:
programming error: unknown grob in dot col support
The result still looks good. Hopefully I can suppress the error
message by killing the dots before the rests, but I haven't tried it.
I just want to ask advice from the community whether I'm going in the
right direction. I dealt with engravers before, so it was a natural
choice for me. But maybe there is a better approach? Maybe it's
possible to write a music function that would turn the melody into a
rhythm that could be suppressed from the output? Or may it's possible
to do something to the dots and the rests to make the layout engine
ignore them completely?
I could make a snippet and post it to LSR. There is already a snippet
for the partcombine:
http://lsr.dsi.unimi.it/LSR/Snippet?id=653
But it lacks the comments and seems to deal with some other issues.
Also, it's not transparent. Some expressions need to be added to the
voice parts. I don't feel good about adding my code to the snippet I
don't understand.
--
Regards,
Pavel Roskin
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel