Infinity or NaN encountered when omitting NoteHead

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Infinity or NaN encountered when omitting NoteHead

Jean ABOU SAMRA
   Hi,

   This code:

   \version "2.21.0"
   { << { a } \\ { \omit NoteHead g } >> }
   causes LilyPond to complain twice:
   programming error: Infinity or NaN encountered
   This happens when the second note comes close to
   the first note. G notes and upper trigger the bug,
   F notes and lower are fine. So, I assume (pure
   speculation) that this happens when LilyPond has
   to place note heads on a column, because a G
   note requires a special shift.
   Could be linked with:
   [1]https://sourceforge.net/p/testlilyissues/issues/4964/
   Does anyone have an idea of a workaround?
   Thanks!
   Jean Abou Samra

References

   1. https://sourceforge.net/p/testlilyissues/issues/4964/
_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: Infinity or NaN encountered when omitting NoteHead

Jean ABOU SAMRA
   Hi,

   Eventually, I found a workaround for this:

   \version "2.21.0"
   {
      <<
        { a }
        \\
        {
        \override NoteHead.stencil =
          #(lambda (grob) (grob-interpret-markup grob
          #{
            \markup
            \transparent
            \filled-box #'(-0.01 . 0) #'(-1 . 0) #0
         #}))
      g
      }
     >>
   }
   Not very comfortable but works.
   Cheers,
   Jean Abou Samra
_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond