[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: programming error: note-column has no direction
From: |
Thomas Morley |
Subject: |
Re: programming error: note-column has no direction |
Date: |
Thu, 12 Oct 2023 10:07:24 +0200 |
Am Sa., 7. Okt. 2023 um 19:23 Uhr schrieb Valentin Petzel <valentin@petzel.at>:
>
> Hello Harm,
>
> The error you are seeing is caused by handling NoteCollisions. This has
> different behavior depending on the direction of the note column. The
> direction
> is set by the stem engraver, which is removed in this context.
>
> To get rid of this message we can either remove collision handling alltogether
> by doing
>
> \layout {
> \context {
> \GregorianTranscriptionStaff
> \remove Collision_engraver
> }
> }
>
> or we can let Lilypond properly handle collision by having a Stem grob
> created, but not actually printed:
>
> \layout {
> \context {
> \GregorianTranscriptionVoice
> \consists Stem_engraver
> \omit Stem
> }
> }
>
> The second one is most likely the more stable one, as other places might also
> assume that a note column does always have a stem.
>
> Regarding whether this is a valid bug: Basically we are running into UB here.
> This context is explicitely intended for transcribing gregorian chant, so we
> would not expect polyphony in the first place. But I think no syntactically
> correct Lilypond code should trigger an internal error, so I’d say there are
> these two paths to resove this:
>
> → Remove the very concept of collision from these contexts or
> → Allow the context to create silent Stem grobs
>
> I do not know if there is any reason for not engraving the stems, but if there
> isn’t I’d say the latter one is the more stable path.
>
> Cheers,
> Valentin
>
> Am Samstag, 7. Oktober 2023, 10:35:20 CEST schrieb Thomas Morley:
> > Hi,
> >
> > this came up in the german forum:
> > https://lilypondforum.de/index.php/topic,1280.msg6613.html
> >
> > A more minimel example:
> >
> > \version "2.24.2"
> >
> > %% \include "gregorian.ly"
> > %%
> > %% \layout {
> > %% \context {
> > %% \GregorianTranscriptionVoice
> > %% \consists Stem_engraver
> > %% \omit Stem
> > %% }
> > %% }
> >
> > \new GregorianTranscriptionStaff
> > <<
> > \new GregorianTranscriptionVoice
> > { \voiceOne b' }
> > \new GregorianTranscriptionVoice
> > { \voiceTwo g' }
> >
> >
> > Returns:
> > programming error: note-column has no direction
> > { \voiceOne
> > b' }
> >
> > Looks like its triggered by the removed Stem_engraver in 2.24., thus a
> > first fix is to reconsist said engraver and omit Stems.
> >
> > Is this a valid bug?
> >
> >
> > Thanks,
> > Harm
>
Hi Valentin,
thanks for your hints.
Though, please have a look at https://lsr.di.unimi.it/LSR/Item?id=104
Current 2.24.-output is simply wrong.
I see two possibilities to fix it:
a) tweak Voice-context
b) use GregorianTranscriptionVoice instead
The former will add a bunch of overrides and other settings to an
otherwise simple snippet.
With GregorianTranscriptionVoice one could even delete some of the
present overrides, making for:
\version "2.14.0"
\score {
<<
\context GregorianTranscriptionVoice \transpose c c' {
g4( a) g^\markup { "divisio minima" }
\divisioMinima
g4( a) g^\markup { "divisio maior" }
\divisioMaior
g4( a) g^\markup { "divisio maxima" }
\divisioMaxima
g4( a) g^\markup { " finalis" }
\finalis
\break
g4( a) g
^\markup { "virgula" }
\virgula
g4( a) g
^\markup { "caesura" }
\caesura
g4( a) g
}
\new Lyrics \lyricsto "" {
Blah blub, blah blam.
Blah blub, blah blam.
Blah blub, blah blam.
Blah blub.
}
>>
}
Alas, a plethora of "programming error: no stem for note column" for
this non-polyphonic snippet is returned. Furthermore removing
Collision_engraver takes no effect.One needs to add the already
mentioned:
\layout {
\context {
\GregorianTranscriptionVoice
\consists Stem_engraver
\omit Stem
}
}
Thus, I lean toward calling it a bug.
Opinions?
Thanks,
Harm