lilypond-user
[Top][All Lists]
Advanced

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

Re: Instructing fretboard-diagram-verbose to space frets proportionally


From: Torsten Hämmerle
Subject: Re: Instructing fretboard-diagram-verbose to space frets proportionally rather than equadistantly
Date: Thu, 9 Apr 2020 00:27:07 -0700 (MST)

I like the idea and have of having naturally spaced frets in fret diagrams.

As Aaron has already pointed out, the current implementation always uses

  fret-distance * fret

for positioning objects and calculating the length of the strings.
fret-distance is the distance between frets and fret is the fret number.

I've now replaced all these cases by a function

  (fret-position fret)

that will calculate the actual (non-linear) position depending on the fret
number (fret is an argument passed over to the function).

The calculations are based on the assumption that each bar represents a
half-tone step.
Using exponential functions, the "fret number" can even take any
intermediate value so that all placements of objects (dots, barrés, capos,
etc.) in between fretbars will smoothly adapt to the nonlinear scale. 

There's a new Boolean detail *property* called *proportional-frets* that can
be set if you want proportionally spaced frets.  The default setting is
"false" and the new fret-position function will behave just as linear as it
has always done.

Here's a short example of what the result looks like.

<http://lilypond.1069038.n5.nabble.com/file/t3887/Fret-diagram-proportional.png>
 

I think I'll open up an issue and upload this patch.
It should be available soon in LilyPond 2.21.1, I guess.

Cheerio,
Torsten

Fret-diagram-proportional.png
<http://lilypond.1069038.n5.nabble.com/file/t3887/Fret-diagram-proportional.png>
  




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



reply via email to

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