Re: programming error: note column without heads and stem

2019-12-02 Thread Thomas Morley
Am Mo., 2. Dez. 2019 um 11:51 Uhr schrieb Sandro Santilli :
>
> On Sat, Nov 30, 2019 at 05:25:28PM +0100, Thomas Morley wrote:
> > Am Fr., 29. Nov. 2019 um 12:11 Uhr schrieb Sandro Santilli :
> > >
> > > When using \partcombine I'm getting 3 of these errors:
> > >
> > >   programming error: note column without heads and stem
> > >   continuing, cross fingers
> > >
> > > The errors doesn't tell which line/column they come from.
> > > How can I debug it ?
> >
> > Took me 20 min to boil it down to a three lines minimal. That's _your_ task.
> > No time left for searching a sollution ;)
>
> Ok, sorry. The problem was this block:
>
>   \layout {
> \context { \Voice
>   \consists "Ambitus_engraver"
> }
>   }
>
> It looks like using an "Ambitus_engraver" with a \partcombine
> results in that warning.

Not exactly. Below returns the same programming error:

\version "2.19.83"

\layout { \context { \Voice \consists "Ambitus_engraver" } }

\new Staff
  <<
\new Voice s4
\new Voice s4
  >>

\partcombine creates a bunch of Voices called "one", "two", "shared",
"solo" and "null"
It's not unlikely that some of them remain without notes, so
\partcombine will trigger the problem more frequently.

Probably Ambitus_engraver should return a more meaningful warning for
Voices with no nore-columns, avoiding a 'programming error' at all.

> I tried a \remove "Ambitus_engraver"
> in the part-combined score but didn't work so I ended up moving
> the \consist in each score in which I wanted the Ambitus engraver.

Consisting in Staff always works for me:
\layout { \context { \Staff \consists "Ambitus_engraver" } }

Cheers,
  Harm

P.S. never post example code without the needed include-files ;)



Re: programming error: note column without heads and stem

2019-12-02 Thread Sandro Santilli
On Sat, Nov 30, 2019 at 05:25:28PM +0100, Thomas Morley wrote:
> Am Fr., 29. Nov. 2019 um 12:11 Uhr schrieb Sandro Santilli :
> >
> > When using \partcombine I'm getting 3 of these errors:
> >
> >   programming error: note column without heads and stem
> >   continuing, cross fingers
> >
> > The errors doesn't tell which line/column they come from.
> > How can I debug it ?
>
> Took me 20 min to boil it down to a three lines minimal. That's _your_ task.
> No time left for searching a sollution ;)

Ok, sorry. The problem was this block:

  \layout {
\context { \Voice
  \consists "Ambitus_engraver"
}
  }

It looks like using an "Ambitus_engraver" with a \partcombine
results in that warning. I tried a \remove "Ambitus_engraver"
in the part-combined score but didn't work so I ended up moving
the \consist in each score in which I wanted the Ambitus engraver.

--strk;



Re: programming error: note column without heads and stem

2019-11-30 Thread Thomas Morley
Am Fr., 29. Nov. 2019 um 12:11 Uhr schrieb Sandro Santilli :
>
> When using \partcombine I'm getting 3 of these errors:
>
>   programming error: note column without heads and stem
>   continuing, cross fingers
>
> The errors doesn't tell which line/column they come from.
> How can I debug it ?
>
> The source code is attached
>
> --strk;

http://lilypond.org/doc/v2.19/Documentation/usage/troubleshooting

Took me 20 min to boil it down to a three lines minimal. That's _your_ task.
No time left for searching a sollution ;)

-Harm



programming error: note column without heads and stem

2019-11-29 Thread Sandro Santilli
When using \partcombine I'm getting 3 of these errors:

  programming error: note column without heads and stem
  continuing, cross fingers

The errors doesn't tell which line/column they come from.
How can I debug it ?

The source code is attached

--strk;

\version "2.18.2"

#(load "../lilylib/swing.scm")
\include "../lilylib/range.ly"
\include "../lilylib/parenthesis.ly"

\header {
title = "Sidewinder"
%year = "1935"

%poet = "DuBose Hayward"
composer = "Lee Morgan"
%arranger = "arranged by Sandro Santilli"

%piece = "Funk (Pseudo Bossa)"

tagline = \markup {
  \column {
"Lilypond typesetting by Sandro Santilli  - https://strk.kbt.io - November 2019"
  }
}
}

% Giorgio Gadotti capabilities
giorgioGadottiRange = { d' b'' }
altoRange = \highlightPitches outside \giorgioGadottiRange

% Sandro Santilli capabilities as of 2019
sandroSantilliRange = { c' g'' }
trumpetRange = \highlightPitches outside \sandroSantilliRange

% Desy Vaselli capabilities (just a guess)
desyVaselliRange = { a g'' }
voiceRange = \highlightPitches outside \desyVaselliRange

bassRange = \highlightPitches outside \doubleBassDesignedWrittenRange

%#(set-global-staff-size 21)

\paper {
%indent = 0\cm
}

\layout {
  \override Glissando #'style = #'zigzag
  \set Score.markFormatter = #format-mark-box-alphabet
  \context { \Voice
\consists "Ambitus_engraver"
  }
}

% Available range: c' -- b''
melody_alto =  \relative c' {
  \clef "treble"
  \key c \major
  \numericTimeSignature
  \time 4/4

  r1 |

  \repeat volta 2 {

\repeat percent 2 { r4 dis-^ r8 e8-^ r4 | }
  r8 a,8 bes4 c d | a8 bes a g~ g2 |

% 6
\repeat percent 2 { r4 dis'-^ r8 e8-^ r4 | }
  r8 a,8 bes4 c d | dis8 e c bes r8 fis8 r4 |

% 10
\parenthesize
f4-- gis'-^ r8 a-^ r4 | r4 gis-^ r8 a-^ r4 |
  r8 d, ees f g f ees d | f c d ees~ ees \glissando g, f g |

% 14
c4-- dis-^ r8 e-^ r4 | r4 dis-^ r8 e-^ r4 |
  r8 g,8 a[ bes] c d4. | r8 e f[ fis] g a4. |

% 18
\repeat percent 2 { r4 f-^ r8 g-^ r4 | }
  r8 d e4 f fis | fis8 g f cis r cis g[ cis] |

% 22
c?4-- dis-^ r8 e-^ r4 | r4 dis-^ r8 e-^ r4 \bar "||"
  r4 r8 g,16 bes c8 c c16 g bes8 | c4-^ r8 bes~ bes g f g |
  }
}

melody_trp =  \relative c'' {
  \clef "treble"
  \key c \major
  \numericTimeSignature
  \time 4/4

  r1 |

  \repeat volta 2 {

\repeat percent 2 { r4 a-^ r8 bes-^ r4 | }
  r8 a bes4 c d | a8 bes a g~ g2 |

\repeat percent 2 { r4 a-^ r8 bes-^ r4 | }
  r8 a bes4 c d | dis8 e c bes r8 fis8 r4 |

% 10
\parenthesize
f4-- d'-^ r8 ees8-^ r4 | r4 d-^ r8 ees-^ r4 |
  r8 d ees f g f ees d |
  f c d ees~ ees \glissando g, f g |

% 14
c,4-- a'-^ r8 bes-^ r4 | r4 a-^ r8 bes8-^ r4 |
  r8 g a[ bes] c d4. | r8 e f[ fis] g a4. |

% 18
\repeat percent 2 { r4 d,-^ r8 e-^ r4 | }
  r8 d e4 f fis | fis8 g f cis r8 cis? g[ cis?] |

% 22
c?4-- a-^ r8 bes-^ r4 | r4 a-^ r8 bes-^ r4 \bar "||"
  r4 r8 g16 bes c8 c c16 g bes?8 | c4-^ r8 bes8~ bes g f g |
  }
}

melody_bass = \relative c' {
  \bassRange
  \clef "bass"
  \key c \major
  \numericTimeSignature
  \time 4/4

  r4 r8 g r f cis4 |

  \repeat volta 2 {

\repeat percent 4 { c4 r8 c g4 bes | }
% TODO: change notehead to slash
\repeat percent 4 { r4 b r8 c8 r4 | }

% TODO: change notehead to slash
\repeat percent 4 { r4 b r8 c8 r4 | }
\repeat percent 4 { r4 b r8 c8 r4 | }

% TODO: change notehead to slash
\repeat percent 4 { r4 b r8 c8 r4 | }
\repeat percent 2 { r4 b r8 c8 r4 | }

%TODO: change notehead to X
c4 r4 r2 | r1 |
  }
}



harmony_realbook =  \chords \with {
\consists Percent_repeat_engraver
\override PercentRepeat.Y-offset = 1
} {

  r1 |

  \repeat volta 2 {

\repeat percent 4 { b2:7 c:7 | }

\break

\repeat percent 4 { b2:7 c:7 | }

\bar "||"
\break

\repeat percent 4 { e2:7 f:7 | }

\break

\repeat percent 3 { b2:7 c:7 | }
e:m7.5- c:7.9- |

\bar "||"
\break

\repeat percent 4 { d2:m7 g:7 | }

\break

\repeat percent 2 { b2:7 c:7 | }
  \bar "||"
  c4:7 r2. | r1 |
  }

}

harmony = \harmony_realbook

% The alto sax part
altoSheet = {
<<
  \context ChordNames {
\harmony
  }

  \new Staff \with {
instrumentName = #"Alto"
  } {
\new Voice = "alto" { \melody_alto }
  }

>>
}

% The trumpet part
trumpetSheet = {
<<
  \context ChordNames {
\harmony
  }

  \new Staff \with {
instrumentName = #"Trumpet"
  } {
\new