[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Missing ties between chords
From: |
Marc Hohl |
Subject: |
Missing ties between chords |
Date: |
Sun, 17 May 2009 19:53:57 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090318) |
I engraved a piece for guitar where some chords are tied together.
On a guitar it is possible to play the same note on different strings,
so this note appears twice:
\relative c { < fis\4 b\3 b\2 e\1 >2 ~ < fis\4 b\3 b\2 e\1 > }
see the first example on the attached pdf; everything is fine, I got two
ties connecting
each b.
But there is another voice played on the guitar, so I decided to declare
my bit as \voiceOne.
One tie is gone, but this seems to be okay (or should there still be
four ties? - second line).
When I add a tablature, there are four tied in the tablature staff and
three in the normal staff,
which was to be expected (third line).
When I want to remove the numbers that are following a tie, I use a function
\override Tie #'after-line-breaking = #tie::handle-tab-tie
which is not perfect yet, but for ties in the same staff line, it works,
but as you can see
on the fourth line, one tie isn't recognized properly, but this seems to
be the case only with
two equal notes, because when I change one b to an a
\relative c { < fis\4 a\3 b\2 e\1 >2 ~ < fis\4 a\3 b\2 e\1 > }
there are still only _three_ ties in the normal staff, but the tab numbers
disappear without complaining.
As I can see, something is wrong with the number of ties in a chord, and
as this is a widely accepted
way of notating guitar music, a workaround with several seperate voices
won't be suited to avoid
this situation.
Any hints/suggestions/explanations are highly appreciated!
Marc
\version "2.13.0"
#(define (tie::handle-tab-tie grob)
(let* ((original (ly:grob-original grob))
(tied-tabnotehead (ly:spanner-bound grob RIGHT))
(siblings (if (ly:grob? original)
(ly:spanner-broken-into original) '() )))
(if (and (>= (length siblings) 2)
(eq? (car (last-pair siblings)) grob))
;; tie is split
;; just a dummy function here, parentheses should be inserted
(begin (ly:grob-set-property! tied-tabnotehead 'color (rgb-color 1 0 0))
(newline)
(display "Tie is split.")
(newline))
;; tie is not split -> make fret number invisible
(ly:grob-set-property! tied-tabnotehead 'transparent #t)
);; end if
))
test = \relative c { \override Voice.StringNumber #'transparent = ##t
% as we have tablature, we don't need string
% numbers in the normal staff
< fis\4 b\3 b\2 e\1 >2 ~ < fis\4 b\3 b\2 e\1 > }
\score { \new Staff { \clef "G_8" \test } }
\score { \new Staff { \voiceOne \clef "G_8" \test } }
\score { << \new Staff { \voiceOne \clef "G_8" \test }
\new TabStaff { \voiceOne \clef "tab" \test } >> }
\score { << \new Staff { \voiceOne \clef "G_8" \test }
\new TabStaff { \voiceOne \clef "tab"
\override Tie #'after-line-breaking =
#tie::handle-tab-tie
\test } >> }
anothertest = \relative c { \override Voice.StringNumber #'transparent = ##t
< fis\4 a\3 b\2 e\1 >2 ~ < fis\4 a\3 b\2 e\1 > }
\score { << \new Staff { \voiceOne \clef "G_8" \anothertest }
\new TabStaff { \voiceOne \clef "tab"
\override Tie #'after-line-breaking =
#tie::handle-tab-tie
\anothertest } >> }
ties.pdf
Description: Adobe PDF document
- Missing ties between chords,
Marc Hohl <=