3

enter image description hereWhy are some stems missing?

\version "2.22.1"
\include "changePitch.ly"

nl = \break

chord_a = \relative c''' {<e gis c>}
chord_b = \relative c'' {<fis b d>}

root = {c d e f fis gis ais b}

motif_a = \relative {
\modalTranspose e e \root \chord_a
\modalTranspose e d \root \chord_a
\modalTranspose e c \root \chord_a 
\modalTranspose e b, \root \chord_a
\modalTranspose e ais, \root \chord_a
\modalTranspose e gis, \root \chord_a
\modalTranspose e fis, \root \chord_a
\modalTranspose e f, \root \chord_a
}

motif_b = \relative {
\modalTranspose fis fis \root \chord_b
\modalTranspose fis gis \root \chord_b
\modalTranspose fis ais \root \chord_b
\modalTranspose fis b \root \chord_b
\modalTranspose fis c' \root \chord_b
\modalTranspose fis d' \root \chord_b
\modalTranspose fis e' \root \chord_b
\modalTranspose fis f' \root \chord_b
}
  
rhythm = { 
c8 c4
}


iaa = \new Staff
\new Voice
\with {
\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"
\remove "Rest_engraver"
\consists "Completion_rest_engraver"
}

{

\key c \major
\time 2/4
\ottava1
\changePitch \rhythm \motif_a \nl \ottava0
\changePitch \rhythm \modalTranspose e e, \root \motif_a \nl
%\changePitch \rhythm \modalInversion e'' e'' \root \motif \nl
%\changePitch \rhythm \retrograde \modalInversion e'' e'' \root \motif \nl
  
}

iab = \new Staff
\with {
\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"
\remove "Rest_engraver"
\consists "Completion_rest_engraver"
}
{
\ottava1
\changePitch \rhythm \motif_b \nl \ottava1
\changePitch \rhythm \modalTranspose fis fis' \root \motif_b \nl
}

\bookpart {

\header {

dedication  =  \markup { \with-dimensions #'(0 . 0) #'(0 . 0) \with-color #(rgb-color 1 0.99 0.94) \filled-box #'(-10000 . 10000) #'(-10000 . 10000) #0 }
title = \markup { \vspace #4 \fontsize #1 \override #'(font-name . "Consolas") \eyeglasses }

}

\score {
\new GrandStaff
<<
\iaa
\iab
>>

\layout {}

\midi{ \tempo 4 = 120 }

}

}

\paper {
indent = 0\mm
left-margin = #21
right-margin = #21
markup-system-spacing.basic-distance = #30
}
3
  • I found resolution! I'm sorry. code \layout { \context { \Voice \remove "Note_heads_engraver" \consists "Completion_heads_engraver" \remove "Rest_engraver" \consists "Completion_rest_engraver" } }
    – semiono
    Commented Mar 1, 2022 at 22:46
  • If you can remove the parts of the code that aren't required to demonstrate the problem, it will make it much easier to diagnose. Commented Mar 1, 2022 at 22:46
  • @semiono Yes, either that or \new Staff \new Voice \with { ... }. The problem here is that most engravers handling such stuff sit on Voice level, so when the heads are created on Staff level the engravers acknowledging heads won’t see them.
    – Lazy
    Commented Mar 1, 2022 at 23:36

1 Answer 1

2

You add a Completion_heads_engraver to the Staff in \iab instead of adding it to a Voice context. This results in the completed NoteHead grobs getting produced at Staff level where they escape notice of the Stem_engraver that sits at Voice level and does not get to see grobs emitted at Staff level.

You just need to write things for \iab like you did for \iaa, namely adding an extra \new Voice before the \with clause substituting the normal notehead engravers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.