]> git.donarmstrong.com Git - lilypond.git/commitdiff
Allow open strings in chords regardless of finger positions
authorCarl <c_sorensen@byu.edu>
Fri, 27 Jan 2012 04:49:37 +0000 (21:49 -0700)
committerCarl <c_sorensen@byu.edu>
Tue, 31 Jan 2012 01:16:06 +0000 (18:16 -0700)
Add regression test for 2256

input/regression/tablature-open-string-chord.ly [new file with mode: 0644]
scm/translation-functions.scm

diff --git a/input/regression/tablature-open-string-chord.ly b/input/regression/tablature-open-string-chord.ly
new file mode 100644 (file)
index 0000000..36bd309
--- /dev/null
@@ -0,0 +1,17 @@
+\version "2.15.28"
+
+\header {
+
+  texidoc = "
+Open strings can always be part of a chord in tablature, even when frets
+above 4 have been used in the chord.  In this case, both chords should show
+an open fourth string."
+
+}  
+
+\score {
+  \new TabStaff { 
+    \set TabStaff.stringTunings = \stringTuning <c g d' a'>
+    <c g'> 1 <c\4 g'> 1
+  }
+}
index 6f7d0524938969c5ba26a5b903917df321f4858a..d373da0eebcc0079c2e0c8d0e76a747ceba38742 100644 (file)
@@ -326,6 +326,7 @@ if no string-number is present."
          #t
          (map (lambda (specced-fret)
                 (or (eq? 0 specced-fret)
+                     (eq? 0 fret)
                     (>= maximum-stretch (abs (- fret specced-fret)))))
               specified-frets))))
 
@@ -333,7 +334,7 @@ if no string-number is present."
       "Can @var{pitch} be played on @var{string}, given already placed
 notes?"
       (let* ((fret (calc-fret pitch string tuning)))
-       (and (>= fret minimum-fret)
+       (and (or (eq? fret 0) (>= fret minimum-fret))
             (close-enough fret))))
 
     (define (open-string string pitch)