lilypond-devel
[Top][All Lists]
Advanced

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

Re: fret-diagram with barre returns weird output (issue 247750043 by add


From: dak
Subject: Re: fret-diagram with barre returns weird output (issue 247750043 by address@hidden)
Date: Thu, 11 Jun 2015 11:53:52 +0000

Reviewers: carl.d.sorensen_gmail.com,

Message:
I just hate it when I find that a "Draft" of mine was "Unpublished".
This is really something that happens all the time when I am using
Rietveld.


https://codereview.appspot.com/247750043/diff/1/scm/fret-diagrams.scm
File scm/fret-diagrams.scm (right):

https://codereview.appspot.com/247750043/diff/1/scm/fret-diagrams.scm#newcode266
scm/fret-diagrams.scm:266: (set! minfret (apply min (cons minfret (map
last barre-list)))))
Instead of (apply min (cons minfret (map last barre-list))) one can just
write
(apply min minfret (map last barre-list))
since apply will just retain all arguments except the last one (which is
interpreted as a list of further arguments).

Description:
fret-diagram with barre returns weird output

issue 4428

take the fret-settings from barre into account

Please review this at https://codereview.appspot.com/247750043/

Affected files (+3, -0 lines):
  M scm/fret-diagrams.scm


Index: scm/fret-diagrams.scm
diff --git a/scm/fret-diagrams.scm b/scm/fret-diagrams.scm
index f8ccb59a111886ce250590d822c6f7bb9624aa6e..5eca63f3214ac5802d8f70f5e41262c4ddc2aa0e 100644
--- a/scm/fret-diagrams.scm
+++ b/scm/fret-diagrams.scm
@@ -261,6 +261,9 @@ with magnification @var{mag} of the string @var{text}."
               (if (> fretval maxfret) (set! maxfret fretval))
               (if (< fretval minfret) (set! minfret fretval))
               (updatemax (cdr fret-list)))))
+      ;; take frets of 'barre-settings into account
+      (if (not (null? barre-list))
+          (set! minfret (apply min (cons minfret (map last barre-list)))))
       (if (or (> maxfret my-fret-count) (> capo-fret 1))
           (set! fret-range
                 (cons minfret





reply via email to

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