lilypond-devel
[Top][All Lists]
Advanced

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

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


From: Marc Hohl
Subject: Re: [Patch:] Negative fret numbers cause a warning (issue 1035)
Date: Thu, 23 Dec 2010 11:27:25 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

Am 22.12.2010 22:02, schrieb Carl Sorensen:


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.
Well, this seems to be a rather philosophical question, but assume
I have a partial capo on strings 1-5 and I want to play a Bflat major chord
in G shape.

A pattern like

Capo III (1-5)

-3-
-3-
-0-
-0-
-2-
-3-

seems to me more readable/understandable than

Capo III (1-5)

-3-
-3-
-0-
-0-
-2-
-6-

which at first glance looks like only Allan Holdsworth would be able to play ;-)

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.
Yes, but in this case the normal staff is wrong, too, so I have to rework
it in any case.
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.
Yes, of course.
[...]
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.
You're right, but I have to take the warning into account (as with
open strings, unterminated ties and more). If I know that there is something
wrong with my tablature and I have to search for a negative fret number,
I'll find it very soon.
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.
C sounds reasonable, but it will cause lilypond not to allow for
negative frets without hacking the fret number printing callback,
and while I don't know whether it is standard, I think *I* will probably
need them in the future. So for me, the warning is ok, saying
"hey, you are specifying negative fret numbers, I hope you know what
you do" - and if it is a "normal" piece of music, I will check the resulting
score for these errors, as I would do for things like a ~ b .

But I am open for discussions on this, of course ...

[...]

Thanks for all your work on LilyPond, and for your work on this issue in
particular.
Well, I still think I should spend more time on lilypond, and for 2011,
I'll give it another try, but that's another issue...

Thanks for your kind words!

Regards,

Marc




reply via email to

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