lilypond-user
[Top][All Lists]
Advanced

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

Re: Display Question Mark at center of a measure


From: Jean Abou Samra
Subject: Re: Display Question Mark at center of a measure
Date: Wed, 19 Jan 2022 01:11:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1

Le 19/01/2022 à 00:40, Rajesh Baskar a écrit :

Hi Jean,

Here is the complete code.



Yes. Here is a simplified example:

\version "2.22.1"

\score {
  {
    \startMeasureCount
    <<
      \hideNotes b'4 a' g' a'
      \new Voice { R1 }
    >>
    \stopMeasureCount
  }
  \midi { }
  \layout { }
}

What's happening here is that you are not
telling LilyPond about the delimitation between
your voices. Since the b'4, a', etc. are not
grouped in any way, they form individual expressions.
In other words, the indentation is misleading and
this is interpreted as

\version "2.22.1"

\score {
  {
    \startMeasureCount
    <<
      \hideNotes
      b'4
      a'
      g'
      a'
      \new Voice { R1 }
    >>
    \stopMeasureCount
  }
  \midi { }
  \layout { }
}

Because there is \startMeasureCount at the
beginning, a new Voice is started. Then you have
this polyphonic construction, which spans a new
Voice for each of the notes and a last one
for the \new Voice { R1 }. This puts all of
the notes in parallel at the same moment.
Because \hideNotes happens in the voice that
is continued from the beginning, it applies
in this voice before the voices for the notes
are branched off, so \hideNotes still affects
them even though the construct is not doing
what you want. The solution is simple: group
the notes with braces. To end the \hideNotes,
either create a new voice explicitly instead
of continuing the main one, so that \hideNotes
will not bleed over the following music, or
insert \unHideNotes at the end.

\version "2.22.1"

\score {
  {
    \startMeasureCount
    <<
      \new Voice { \hideNotes b'4 a' g' a' }
      \new Voice { R1 }
    >>
    \stopMeasureCount
    c'1
  }
  \midi {}
  \layout {}
}

or

\version "2.22.1"

\score {
  {
    \startMeasureCount
    <<
      { \hideNotes b'4 a' g' a' \unHideNotes }
      \new Voice { R1 }
    >>
    \stopMeasureCount
    c'1
  }
  \midi {}
  \layout {}
}

Best,
Jean



reply via email to

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