Re: [tablatures] hammer on and pull off |
[ Thread Index |
Date Index
| More lilynet.net/tablatures Archives
]
- To: tablatures@xxxxxxxxxxx
- Subject: Re: [tablatures] hammer on and pull off
- From: Marc Hohl <marc@xxxxxxxxxx>
- Date: Thu, 27 Aug 2009 20:31:17 +0200
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1251397878; l=4038; s=domk; d=hohlart.de; h=Content-Type:In-Reply-To:References:Subject:To:MIME-Version:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=PvQMw+7a+Wifb2hWq+9+OwZF9K4=; b=UxYODNkMQO4PPJomuA42nkcfDqkpGvN2ffvwSJk8qIgvZcA3vu+xWPpdKrxsoGvyrIl 04bz7O3DToeRIs9+YBzMBn0aff24Cxg2EiXGa2MGZug28JMTPcGDAb3yeNZpiAvR8bRo7 rRAZHEeX7QusdCVqbH96C6VFWFkdlHx8Sm4=
Federico Bruni schrieb:
Marc Hohl wrote:
Federico Bruni schrieb:
[...]
I suggest you to add in the example two hammeron/pulloff happening
at the same time in two different voices.
In this case, I think slurs in the upper voice should point up (i.e.
over the numbers) and slurs in lower voice point down (under the
numbers).
I don't know if LilyPond is able to adjust this automatically or if
you have to add some code to fix this behaviour..
Have you some examples where this would be needed? It is easier for
me to adapt real-life situations
than to think of all possible situations that may come across...
You find attached an example file.
I've done something wrong because even in the first bar - where the
music is monophonic - slurs are far from the numbers.
How can I fix that?
I changed the slur callback; please try the attached file.
For now, there is still the \slurUp workaround in it - I have to have a
closer
look into the internals for \voiceOne etc.
Marc
\version "2.13.3"
%% \include "english.ly"
\include "tablature.ly"
upper= \relative c' {
\time 4/4
\key g \major
g'8 ( a ) d, ( e\2 ) d ( b ) c ( d ) |
b4 ( c b2 )
b4 ( c b2 )
b4 ( c b2 )
b4 ( c b2 )
}
lower= \relative c {
s1
g'4 ( a g2 )
d4 ( e d2 )
a4 ( c a2 )
e4 ( f e2 )
}
#(define-public (slur::draw-lowered-slur grob)
(let* ((staff-symbol (ly:grob-object grob 'staff-symbol))
(staff-space (ly:grob-property staff-symbol 'staff-space))
(control-points (ly:grob-property grob 'control-points))
(new-control-points (map (lambda (p)
(cons (car p) (- (cdr p)
(* staff-space
(ly:grob-property grob 'direction)
0.35))))
control-points)))
(ly:grob-set-property! grob 'control-points new-control-points)
(ly:slur::print grob)))
\score {
\new StaffGroup <<
\new Staff = "guitar" <<
\context Voice = "upper guitar" { \clef "G_8" \voiceOne \override Voice.StringNumber #'transparent = ##t \upper }
\context Voice = "lower guitar" { \clef "G_8" \voiceTwo \override Voice.StringNumber #'transparent = ##t \lower }
>>
\new TabStaff = "tab" <<
\context TabVoice = "upper tab" { \clef "moderntab" \voiceOne \stemDown \slurUp \upper }
\context TabVoice = "lower tab" { \clef "moderntab" \voiceTwo \stemUp \slurDown \lower }
>>
>>
\layout {
\context {
\TabVoice
\override Slur #'direction = #UP
\override Stem #'direction = #DOWN
\override Slur #'stencil = #slur::draw-lowered-slur
}
\context {
\TabStaff
\override NoteColumn #'ignore-collision = ##t
}
}
}