lilypond-user
[Top][All Lists]
Advanced

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

Re: weird error writing a tablature which uses a custom tuning


From: Thomas Morley
Subject: Re: weird error writing a tablature which uses a custom tuning
Date: Thu, 26 Sep 2024 01:46:02 +0200

Am Di., 24. Sept. 2024 um 09:11 Uhr schrieb Thomas Morley
<thomasmorley65@gmail.com>:
>
> Am Di., 24. Sept. 2024 um 01:04 Uhr schrieb Federico Bruni 
> <fede@inventati.org>:
> >
> > Hi folks
> >
> > I've just come across a really weird error.
> > I'll try to make a minimal example tomorrow, but maybe you can give me
> > some hints.
> > The piece I'm writing is copyrighted but I can send it privately to
> > anyone who wants to help to debug this weird error. It uses a custom
> > guitar tuning.
> >
> > I'm entering a music and suddenly whatever note I write after this:
> >
> > \acciaccatura a'8\3 b\3 g' b,\3( a\3)
> >
> > will produce the following error:
> >
> > Drawing systems...
> > /app/dev/share/lilypond/2.25.19/ly/init.ly:66:2: error: Guile signaled
> > an error for the expression beginning here
> > #
> >  (let ((book-handler (if (defined? 'default-toplevel-book-handler)
> > In procedure ly:item-break-dir: Wrong type argument in position 1
> > (expecting Item): ()
> >
> >
> >
> >
> > And here's the verbose output running the official LilyPond binaries:
> >
> > /var/home/fede/.local/lilypond/lilypond-2.25.19/share/lilypond/2.25.19/ly/init.ly:66:2:
> > error: Guile signaled an error for the expression beginning here
> > #
> >  (let ((book-handler (if (defined? 'default-toplevel-book-handler)
> >
> > In ice-9/boot-9.scm:
> >   1755:12 15 (with-exception-handler _ _ #:unwind? _ # _)
> > In unknown file:
> >           14 (apply-smob/0 #<thunk 7f838110d300>)
> > In
> > /home/lily/lilypond-2.25.19/release/binaries/lilypond/build/out/share/lilypond/current/scm/lily/lily.scm:
> >   1070:16 13 (lilypond-main _)
> >    1099:4 12 (lilypond-all ("The-Pelican.ly"))
> > In srfi/srfi-1.scm:
> >     634:9 11 (for-each #<procedure 7f8381f68f30 at /home/lily/lilyp?> ?)
> > In
> > /home/lily/lilypond-2.25.19/release/binaries/lilypond/build/out/share/lilypond/current/scm/lily/lily.scm:
> >    1111:9 10 (_ "The-Pelican.ly")
> > In ice-9/boot-9.scm:
> >   1749:15 9 (with-exception-handler #<procedure 7f8381f68f00 at ic?> ?)
> > In unknown file:
> >            8 (ly:parse-file "The-Pelican.ly")
> > In ice-9/boot-9.scm:
> >   1755:12 7 (with-exception-handler _ _ #:unwind? _ # _)
> > In unknown file:
> >            6 (apply-smob/0 #<thunk 7f83824388c0>)
> >            5 (ly:book-process #<Book> #< Output_def> #< Output_def> #)
> >            4 (ly:optimal-breaking #<Paper_book>)
> > In
> > /home/lily/lilypond-2.25.19/release/binaries/lilypond/build/out/share/lilypond/current/scm/lily/tablature.scm:
> >    205:36 3 (tab-note-head::handle-ties #<Grob TabNoteHead >)
> > In unknown file:
> >            2 (ly:item-break-dir ())
> > In ice-9/boot-9.scm:
> >   1676:22 1 (raise-exception _ #:continuable? _)
> > In unknown file:
> >            0 (apply-smob/1 #<exception-handler 7f83824388a0> #<&comp?>)
> > In procedure ly:item-break-dir: Wrong type argument in position 1
> > (expecting Item): ()
> >
> >
> >
> >
>
> Hi Federico,
>
> commit 23a3778f2ed6a12b2e41026d3e6646f7177f0a29
> Author: Thomas Morley <thomasmorley65@gmail.com>
> Date:   Fri Jul 26 23:39:37 2024 +0200
>
>     Rewrite handling of tied tab note heads
>
>     If a tab note head is right bound of a tie (or has a repeat tie)
>     and a spanner starts, always print it parenthesized.
>     If a Tie is split, print the tied tab note head due to the
>     settings of tied-properties.
>     Same for a tied tab note holding a `RepeatTie`.
>
>     This was already intended by the first implementation
>     by 3417b5edd0596f128bc5faca6c600c3b11915709
>     Though, using break-visibility for a note head made no sense.
>
>     dcafb42fa6c1cf234a8916ec221a2b006d3582b9 deleted break-visibility,
>     but introduced a regression.
>
>     This patch rewrites most of the functionality:
>     - extend the engraver, port it to scheme
>     - introduce a new context-property tabFullNotation
>     - introduce new sub-properties ties/repeat-tied, for
>       TabNoteHead.details.tied-properties.
>       Delete TabNoteHead.details.repeat-tied-properties.
>     - Move functionality from (Repeat)Tie.after-line-breaking to
>       TabNoteHead.after-line-breaking.
>     - Extend tab-note-head interface
>     - Adjust hide/showSplitTiedTabNotes
>
>     Closes #6733
>
>
> may have introduced the problem.
> Though its hard to diagnose/fix without MWE.
>
> As an experiment, try to change in tablature.scm the lines
>          (nmpc (ly:grob-object pc 'left-neighbor))
>          (at-line-begin? (positive? (ly:item-break-dir nmpc)))
> to
>          (nmpc (ly:grob-object pc 'left-neighbor #f))
>          (at-line-begin? (and nmpc (positive? (ly:item-break-dir nmpc))))
>
> Cheers,
>   Harm


Hi Federico,

thanks for your files.

Minimal code to trigger the error:

\version "2.25.19"
\new TabStaff { b1 \break s2 b }

It's caused by the spacer in the new line, not initiating a NoteColumn
of its own, thus 'left-neighbor of the following NoteHead remains
empty.
The proposed fix seems to solve the problem, though I didn't run the
regtests so far.
Maybe tomorrow...

Cheers,
  Harm



reply via email to

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