lilypond-user
[Top][All Lists]
Advanced

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

Re: Uke tab questions


From: Paulo Matos
Subject: Re: Uke tab questions
Date: Fri, 13 Aug 2021 10:56:27 +0200
User-agent: mu4e 1.6.1; emacs 27.2

Hi Valentin,

You are correct. I compiled lilypond with and without your patch and
your patch fixes it. :)

I was wondering, if you want to prepare it to be merged, or if you want
me to do it? It would be great to have this upstream.

In any case, there's something that doesn't seem yet quite right with
the chords. For the A7 chord example:

\version "2.22.0"

global = {
  \key c \major
  \time 4/4
}

ukulele = {
  \chordmode { a,:7 }
}

\score {
  \new StaffGroup \with {
    \consists "Instrument_name_engraver"
    instrumentName = "Ukulele"
  } <<
    \new Staff \with {
      midiInstrument = "acoustic guitar (steel)"
    } \ukulele
    \new TabStaff \with {
      stringTunings = #ukulele-tuning
    } \ukulele
  >>
}

You'll get:
Interpreting music...
/home/pmatos/Nextcloud/Ukulele/Lilypond/HighG-Ukulele-Chords.ly:9:16: warning: 
No string for pitch #<Pitch a > (given frets (1 0 0))
  \chordmode { 
               a,:7 }

Pitch a is obtained through picking the last string open. So, I feel
something is still missing. If you don't have time, I will look at the
code of the patch and surrounding context and try to figure it out.

Thanks for your help on this,

Paulo

Valentin Petzel <valentin@petzel.at> writes:

> [[PGP Signed Part:Undecided]]
> Hello Paolo, hello Carl,
>
> This is actually very easy to fix. By default the algorithm works like this: 
> We try to put each note to the lowest possible fret. To do this we assume the 
> strings are in falling pitch and then we just walk through all strings and 
> stop once we get one that works.
>
> To get this to work with non-monotonous strings, one has to simply change 
> this 
> to: Instead of always getting the next string, try to find the next highest 
> string. And then you’re done.
>
> I’ve included a quick and moderately unefficient (but then, how many strings 
> might we get?) patch for scm/translation-functions.scm which solves this 
> issue.
>
> Cheers,
> Valentin
>
> Am Freitag, 13. August 2021, 00:03:47 CEST schrieb Carl Sorensen:
>> Dear Paulo,
>> 
>> The automatic fret generation code only works for instruments with monotonic
>> (steadily increasing or decreasing) string pitches.  Since the ukulele has
>> non-monotonic string pitches, the algorithms do not work.  See Known issues
>> and warnings under
>> https://lilypond.org/doc/v2.22/Documentation/notation/common-notation-for-f
>> retted-strings#automatic-fret-diagrams
>  
>> 
>> You can work around this by using the predefined fret diagrams for ukulele.
>> 
>> \include "predefined-ukulele-fretboards.ly"
>> 
>> See
>> https://lilypond.org/doc/v2.22/Documentation/notation/common-notation-for-f
>> retted-strings#predefined-fret-diagrams
>  
>> Hope this helps,
>> 
>> Carl
>> 
>>     
>> 
>
> [2. text/x-patch; translation-functions.scm.patch]...
>
> [[End of PGP Signed Part]]


-- 
Paulo Matos



reply via email to

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