Menu

#5264 Left-handed fret-diagram nut alignment

Invalid
None
abandoned
Enhancement
2018-03-21
2018-01-18
No

http://codereview.appspot.com/335430043

Ticket 5025 https://sourceforge.net/p/testlilyissues/issues/5025/ opened up the possibilty of reversing the order of strings by setting a negative string-distance:

\new FretBoards { 
  \chordmode { 
    \override FretBoard.fret-diagram-details.string-thickness-factor = #0.3
    c1 
    \override FretBoard.fret-diagram-details.string-distance = #-1 
   c1 
  } 
} 

Karlin High reported an unwanted side effect of negative string-distance values (see attached image):
The "nut" doesn't properly align with the outer edges of the fretboard.
Reason for misalignment: half-linethickness of the outer strings is effectively being subtracted rather than being added due to the negative sign introduced by the negative string-distance.

Cheerio,
Torsten

Related feature documentation: issue 5263 Document distance of strings and frets
https://sourceforge.net/p/testlilyissues/issues/5263/

1 Attachments

Discussion

  • Malte Meyn

    Malte Meyn - 2018-01-18

    Issue 5264: fret diagram nut alignment

    This fixes the alignment for negative string-distance.

    http://codereview.appspot.com/335430043

     
  • Malte Meyn

    Malte Meyn - 2018-01-18
    • assigned_to: Malte Meyn
    • Needs: -->
    • Type: -->
     
  • Malte Meyn

    Malte Meyn - 2018-01-18
    • Type: --> Enhancement
     
  • Torsten Hämmerle

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -3,6 +3,7 @@
     ~~~~
     \new FretBoards { 
       \chordmode { 
    +    \override FretBoard.fret-diagram-details.string-thickness-factor = #0.3
         c1 
         \override FretBoard.fret-diagram-details.string-distance = #-1 
        c1 
    
     
  • Torsten Hämmerle

    Hi Malte,

    Your fix does the trick - everyting's working as expected now...

    I've set a string-thickness-factor in the original coding example in order to ensure that even varying string thicknesses work as expected in spite of the negative string-distance.

    Remark: Insted of if clauses, I'd probably just multiply the "half-thicknesses" by (sign string-distance) in order to toggle between + and -.
    But that's just a matter of taste... both ways are OK.

    How about setting the status to "review"?

    Cheerio,
    Torsten

     
    • David Kastrup

      David Kastrup - 2018-01-18

      How about setting the status to "review"?

      This is something done after a "Patch-new" issue has been tested with a standard testing procedure. Usually by James.

       
    • Malte Meyn

      Malte Meyn - 2018-01-18

      Remark: Insted of if clauses, I'd probably just multiply the "half-thicknesses" by (sign string-distance) in order to toggle between + and -.

      Such things can be discussed on Rietveld (see the codereview… link above). There seems to be no signum function (I tried sign, signum, sgn, sig and reading the reference).

       
  • Torsten Hämmerle

    Oh, wait - there are obviously more problems than expected...
    (landscape mode moves below the baseline, marginal objects (e.g. capo numbers) flip inside the diagram...

    Probably we should gerneralize and rename this issue so that it is not only restricted to nut line alignment but generally handles effects caused by negative string-number values.

    @Malte: As to the sign function, I'll drop a note at Rietveld.
    @DAK: Thanks for the enlightenment and sorry for my naiveness - I'm working on it...

     
  • Malte Meyn

    Malte Meyn - 2018-01-18

    use sign function from lily-library.scm instead of if clause

    http://codereview.appspot.com/335430043

    I didn’t realise that LilyPond has defined its own sign function. Of course that’s better to read.

     

    Last edit: Malte Meyn 2018-01-18
  • Anonymous

    Anonymous - 2018-01-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,6 @@
    +http://codereview.appspot.com/335430043
    +
    +
     Ticket 5025 [https://sourceforge.net/p/testlilyissues/issues/5025/](http://) opened up the possibilty of reversing the order of strings by setting a negative string-distance:
    
     ~~~~
    
    • Needs: -->
    • Type: --> Enhancement
     
  • Malte Meyn

    Malte Meyn - 2018-01-18

    align correctly for different size

    http://codereview.appspot.com/335430043

     
  • Anonymous

    Anonymous - 2018-01-18
    • Needs: -->
    • Patch: new --> review
    • Type: --> Enhancement
     
  • Anonymous

    Anonymous - 2018-01-18

    Passes make, make check and a full make doc.

     
  • Thomas Morley

    Thomas Morley - 2018-01-18

    As mentioned on Rietveld a concurrent patch attached.
    Ordering strings and frets correctly right from the start, as we already do for 'landscape and 'opposing-landcape.
    If we follow this route we should disable negative string-distance.
    Regtests/docs are todo

     
  • Malte Meyn

    Malte Meyn - 2018-01-18

    That looks like a way better approch IMO. I’d suggest you take over the issue (change owner & subject, add your patch to Rietveld) or make a new one and mark this one Invalid (?).

     
  • Anonymous

    Anonymous - 2018-01-19
    • assigned_to: Malte Meyn --> Thomas Morley
    • Patch: review --> needs_work
     
  • Anonymous

    Anonymous - 2018-01-19

    Thomas, can you upload a patch as per the normal process for this case (I have made you the current owner as per Malte's suggestion) it will then enter the normal Patch test queue. At this time I have set the call to 'needs work'.

     
  • Thomas Morley

    Thomas Morley - 2018-01-19

    Will do, likely after the weekend, though. Have to work. And the patch needs some additional polish.

     
  • Thomas Morley

    Thomas Morley - 2018-01-22

    I opened a new ticket for code/docs of left-handed fret-diagrams.
    https://sourceforge.net/p/testlilyissues/issues/5265/
    Closing this one.

     
  • Thomas Morley

    Thomas Morley - 2018-01-22
    • Patch: needs_work --> abandoned
     
  • Thomas Morley

    Thomas Morley - 2018-03-21
    • status: Started --> Invalid
     
MongoDB Logo MongoDB