From: Carl Date: Fri, 27 Jan 2012 04:49:37 +0000 (-0700) Subject: Allow open strings in chords regardless of finger positions X-Git-Tag: release/2.15.28-1~11 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9203eadca5bcb79415060f8488889706a9c8e62a;p=lilypond.git Allow open strings in chords regardless of finger positions Add regression test for 2256 --- diff --git a/input/regression/tablature-open-string-chord.ly b/input/regression/tablature-open-string-chord.ly new file mode 100644 index 0000000000..36bd309595 --- /dev/null +++ b/input/regression/tablature-open-string-chord.ly @@ -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 + 1 1 + } +} diff --git a/scm/translation-functions.scm b/scm/translation-functions.scm index 6f7d052493..d373da0eeb 100644 --- a/scm/translation-functions.scm +++ b/scm/translation-functions.scm @@ -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)