lilypond-devel
[Top][All Lists]
Advanced

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

Re: Modify fret calculation algorithm (issue3320041)


From: Carl Sorensen
Subject: Re: Modify fret calculation algorithm (issue3320041)
Date: Sat, 27 Nov 2010 06:50:19 -0700

On 11/27/10 2:17 AM, "David Kastrup" <address@hidden> wrote:

> address@hidden writes:
> 
>> Yes, the assumption is that the string specification needs to be in
>> the same order as the note specification.  When the documentation is
>> done, we'll need to be sure that is mentioned.  If you specify the
>> notes and the strings in reverse order, it's likely to be impossible
>> to find frets that are close enough together to meet both notes.
> 
> Sorry to disagree, but I see two sane approaches here.
> 
> a) when the specification is not in the required order, throw an error.
> b) when the specification is not in the required order, sort it.
> 
> The preference being b).  If the problem is that this would require a
> check of some data structure every time before using it, make an
> interface for creating the data structure and discourage the user from
> ever creating this data structure (subject to change without notice)
> without using the given constructing function.

The data structure is perfectly valid, it just doesn't match the notes.  The
order of the notes is arbitrary, and the order of the strings is arbitrary,
it's just that they need to match.  And the user has full control over both.

> 
> The insane approach is
> 
> c) produce unfathomable results for things that seem likely to work, and
>    document somewhere that this will not work.

In general, I agree with you.  However, in this particular case, the user is
saying "I want to specify that, until further notice, the chords to follow
should be played on strings 5 and 3."  If the user then enters chords that
can't be played on strings 5 and 3, should the system override the behavior
the user asks for?  Personally, I don't think so.

> 
> There is no sense in tripping people up and document how it was done.

I agree in general.  In this specific case, it's not tripping people up.
It's trying to give them just what they ask for.

\set defaultStrings = #'(5 3)
<c c'>
<d d'>

is equivalent to 

<c c'>\5\3
<d d'>\5\3

This is different from the infeasible set:

\set defaultStrings #'(3 5)
<c c'>
<d d'>

or 

<c c'>\3\5
<d d'>\3\5

But the person who is entering the music should *know* which strings they
want with which note.  If they don't have a preference, they should just
eliminate the string requests, and the tab calculator will handle it all for
them.

<c c'>
<d d'>

If they specify a set of strings that lead to an infeasible fingering, do
you really propose that LilyPond should ignore the user's request and turn
it in to what they *should* have asked for?

> 
> This rant was brought to you discourtesy of

:)  Loved the signature!

Thanks

Carl




reply via email to

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