[Top][All Lists]

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

Re: [Patch:] Negative fret numbers cause a warning (issue 1035)

From: Carl Sorensen
Subject: Re: [Patch:] Negative fret numbers cause a warning (issue 1035)
Date: Wed, 22 Dec 2010 14:02:24 -0700

On 12/22/10 4:16 AM, "Marc Hohl" <address@hidden> wrote:

> Am 22.12.2010 09:48, schrieb Carl Sorensen:
>> On 12/22/10 1:30 AM, "Marc Hohl"<address@hidden>  wrote:
>>> Hello all,
>>> attached is a small patch to handle Issue 1035.
>>> Instead of giving an error, it raises a warning when negative frets
>>> are calculated in tablature staves or in fret diagrams.
>> Marc,
>> If instead of being inside set-fret, this check took place in the form of a
>> (string-qualifies string (note-pitch note)) check at line 455, we could
>> issue the warning and then try to find a valid fretboard/tablature that
>> would handle the pitch, assuming the string number was incorrect.  That way,
>> we'd still have the note in play, and the string would be available for
>> other notes.
>> I think that's a more robust way to handle it than setting the negative fret
>> number.
> Hmmm - I wrote some tunes with a capo placed at the third fret but covering
> only strings one upto five, so the sixth string still sounds with an open e.
> I didn't wrote it down, but if I ever do so, I wonder whether the open e
> would be written as fret number "-3" in tablature relative to the capo
> position.

Hmm -- I wouldn't write things down relative to a partial capo.  I think the
meaning of a 1 on the e string is unclear if you do that.  Does it mean the
first fret or the fourth fret?

If I were writing music with a partial capo, I'd probably write everything
relative to the nut.  Or perhaps I'd change the string tunings to reflect
the presence of the capo and indicate somewhere on the score that frets were
relative to the capo on the capo'ed strings and relative to the nut on the
non-capo'ed strings.

> Despite this rather artificial example, I don't know whether we should make
> lilypond more "intelligent". Sometimes I did make some octavation errors and
> spotted the erroneous negative numbers after printing the scores and handing
> out the copies to my students (therefore way too late ;-) - the string
> number
> was right indeed, but I forgot a "'".

OK, so in this case, you didn't see the negative numbers because they were
part of the tablature.  Your tablature ended up clearly wrong -- the
tablature literally couldn't be played.

The warning here shows that there is a mistake.  The fact that we were
missing a warning is a bug, and we really need to add a warning.

> So in this case a warning is enough for me to see there is something wrong,
> and I don't expect lilypond to try to find out what I wanted to do or even
> rearrange the notes/frets/strings - and perhaps I *do* want negative
> numbers ;-)

My personal opinion is that string numbers and fingerings are articulations,
and that pitches are the essence of the note.  So we should have LilyPond
reflect the pitches as much as possible.

> But that's my personal opinion, if you think we should make lilypond
> more clever,
> I'll redo the patch.

Well, I don't know why my personal opinion should trump your personal
opinion.  If we have two of us with different opinions, we should either try
to come to a consensus or get opinions from more people.

I think we agree on the fact that a warning should be printed.  The only
remaining issue is what to do with the note having the negative fret number.
I see three possible choices (and all are achievable with code).

A) Go ahead and include the negative fret number in the tablature and the
fretboard.  In terms of fretboards, this might be preferred behavior,
because the fretboard will be ugly and should be easily visible.  In terms
of tablature, I think this is the worst behavior, because it creates an
impossible note to play and it's not clearly visible.

B) Leave the note out of the fretboard and the tablature.  This makes no
assumption about the relative importance of the pitch vs. the string.  Since
we don't know where the error is, we just drop the note.  This has the
advantage that the music is playable, but the major disadvantage (IMO) that
there is no evidence in the music that something isn't right (unless you
have both Staff notation and TabStaff notation, where you can see there is
a missing pitch).

C) Try to find a string that will allow the note to be played.  This assumes
that the pitch is right, and then tries to make the tablature match the
pitch.  In this case, the TabStaff will always reflect the notes on the
Staff if possible.

Your preference, as reflected in the patch, is to do A.

My preference is to do C, because I think that the TabStaff should always
match the Staff if possible.  That's the behavior I chose (and you agreed
with my reasoning) when dealing with an improperly labeled open string.

If you agree with this reasoning, then please redo the patch.  If you
disagree with this reasoning, then let's try to get more people involved in
the discussion, so we can get a sense of what the majority opinion is.

Thanks for all your work on LilyPond, and for your work on this issue in


reply via email to

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