lilypond-devel
[Top][All Lists]
Advanced

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

Re: Problem with alignment of Chord Symbols over notes.


From: David Kastrup
Subject: Re: Problem with alignment of Chord Symbols over notes.
Date: Sun, 18 Oct 2015 11:43:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Richard Shann <address@hidden> writes:

> On Sun, 2015-10-18 at 11:19 +0200, David Kastrup wrote:
>> Richard Shann <address@hidden> writes:
>> 
>> > Can anyone spot the error in this:
>> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
>> > \version "2.19.25"
>> >
>> > \score {
>> >           <<
>> >              \new ChordNames \chordmode {  e4 s4 f:/g8 s8 s4 
>> >                                            d8:m s8 s8 s8 s8 s8 s8 s8  }
>> >              \new Staff {
>> >                          d'4 d' b8 d' f4
>> >                          a'8 g' a' g' a' g' a' g' }
>> >           >>
>> >        } 
>> > 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
>> > run under Frescobaldi (which says version 2.18.2) it gives
>> > warning: Spurious garbage following chord: (#<Pitch c'' >)
>> > and the Dm chord symbol is shifted to the right - without the /g the
>> > positioning is correct.
>> 
>> You probably mean f8:/g instead of f:/g8 here.  The error message is
>> awful, though.
>> 
>
> Thank you! I see that the page
> http://www.lilypond.org/doc/v2.18/Documentation/notation/chord-mode
> I was looking at was only showing implicit durations so I should have
> engaged my brain more with it to understand where the duration should
> come...

By the way, chord steps are encoded relative to #<Pitch c'> so the error
message indeed refers to the trailing "8" which is unexpected after a
chord root specification.  Usually trailing garbage would consist of
symbols like (dim) instead.  I think this at least warrants an actual
parser error, like

-*- mode: compilation; default-directory: "/tmp/" -*-
Compilation started at Sun Oct 18 11:35:53

/usr/local/tmp/lilypond/out/bin/lilypond gaga.ly 
GNU LilyPond 2.19.29
Processing `gaga.ly'
Parsing...
gaga.ly:5:56: error: Spurious garbage following chord: (#<Pitch c'' >)
             \new ChordNames \chordmode {  e4 s4 f:/g8 
                                                       s8 s4 
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `/tmp/lilypond-pRpiGC'...
Converting to `gaga.pdf'...
Deleting `/tmp/lilypond-pRpiGC'...
fatal error: failed files: "gaga.ly"

Compilation exited abnormally with code 1 at Sun Oct 18 11:35:54

The error location is not perfect (the parsed chord data does not
provide error locators, but these days at least the current position in
the file after the whole chord is accessible).

But it certainly is much better than none at all.

-- 
David Kastrup



reply via email to

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