Re: [tablatures] Re: Could I get a critique on my first lilypond tab?

[ Thread Index | Date Index | More lilynet.net/tablatures Archives ]


On 04/24/2011 12:40 AM, Federico Bruni wrote:
> ... elision by patrick ...
> Anyway, "H"s actually **showed up** in your previous file because you
> used \tabFullNotation.  So you can comment out the Text_engraver and put
> again \tabFullNotation:
>
>
> \new TabStaff % \with { \consists "Text_engraver" }
>       <<
>         \context TabVoice = "hammersNpulls" { \tabFullNotation
> \hammersNpulls }
Thanks!  I did that.  Now I've changed again, I've made a markup command
\hammer-mark which takes an offset and puts a small sans whited out
circled bold H above (or below if you use _ instead of ^) the TabStaff. 

#(define-markup-command (hammer-mark layout props offset) (number?)
  "Draw a small bold H at an offset.\
  Positive offset moves the H left, negative moves H right.\
  Usually put just after the first note of the slur.\
  Attach markup with ^ to put above the TabStaff and _ to put below."
  (interpret-markup layout props (markup #:sans #:bold #:tiny #:halign
offset #:whiteout #:circle "H" )))


Still, I was hoping for any comments on how I do the whole thing, and
whether there are more elegant ways to accomplish the same thing.

I'd also like to figure out how to attach the markup to the top of the
slur instead of to the staff.

Still, it's nice.  I love lilypond.

Patrick
\version "2.13.45"
 	
\header {
  title = "Let Him Roll"
  subtitle = "by Guy Clark"
  subsubtitle = "tablature by Patrick Horgan"
  copyright = "Copyright Guy Clark"
}

\layout {
  indent = 0.0 % make the first line be left aligned with no indent
}

#(define-markup-command (hammer-mark layout props offset) (number?)
  "Draw a small bold H at an offset.\
  Positive offset moves the H left, negative moves H right.\
  Usually put just after the first note of the slur.\
  Attach markup with ^ to put above the TabStaff and _ to put below."
  (interpret-markup layout props (markup #:sans #:bold #:tiny #:halign offset #:whiteout #:circle "H" )))

hammersNpulls = {
  %1
  s1 | s2 s4 s8 s8^ \markup \hammer-mark #-3 |
  %3
  s4 s8 s8^ \markup \hammer-mark #-2 s4 s8 s8^ \markup \hammer-mark #-3 |
  %4
  s4 s8 s8^ \markup \hammer-mark #-2 s2 |
  %5
  s1 | s1^ \markup \hammer-mark #0.5 | s1| s1 |
  %9
  s1 | s1 | s1 | s1 |
  %13
  s1 | s1^ \markup \hammer-mark #0.5 | s1 | s1 |
}

thechords = {
  s1^"C" s2 s2^"Cadd9" s1^"Fmaj13" s1
  s1^"Em7/G" s1^"G7" s2^"Cadd9" s2^"C" s1
  s1^"C" s2 s2^"Cadd9" s1^"Fmaj13" s1
  s1^"Em7/G" s1 s2^"Cadd9" s2^"C" s1
}

upper = \relative c {
  \time 4/4
  \key c \major
  \voiceOne
  \stemUp
  < c' g' >2. <g c g'>4     | <c g'>4. g8 e' d c g(   |
  a) d ~ d g,( a) d ~ d g,( | a) d ~ d g,( a) d ~ d4  |

  d4. r8 d e ~ e4 | \appoggiatura e8 <d f>4. <d g,>8 ~ <d g,>8 g,4. |
  d'2 r8 c ~ c g  | r8 b ~ b4 e f                                   |

  % repeat with variations
  < c g' >2. <g c g'>4 | <c g'>4. g8 e' d ~ d4   |
  d2 r4 <a d>          | a8 d ~ d g,( a) d ~ d4  |

  d4. r8 d e ~ e4 | \appoggiatura e8 <d f>4. <d g,>8 ~ <d g,>8 g,4. |
  d'2 r8 c ~ c g  | r8 b ~ b4 e f                                   |

  \bar ":|"
}

lower = \relative c {
  \time 4/4
  \key c \major
  \voiceTwo
  \stemDown
  c4 e g, r   | c e c e     | f f f f | f f f f    | \break
  g, d' g, d' | g, d' g, d' | c e c e | g, d' g, b | \break
% repeat with variations
  c4 e g, r   | c e c e     | f a c,2 | f4 f f f   | \break
  g, d' g, d' | g, d' g, d' | c e c e | g, d' g, b |
}


\score {
  <<
    \new StaffGroup = "tab with traditional" <<
      \new Staff = "guitar traditional" <<
	\clef "treble_8"
	\context Voice = "theChords" \thechords % Put chord names in
	\context Voice = "upper" \upper
	\context Voice = "lower" \lower
      >> % regular staff
      \new TabStaff <<
	\context TabVoice = "hammersNpulls" { \tabFullNotation \hammersNpulls }
	\context TabVoice = "upper" { \tabFullNotation \upper }
	\context TabVoice = "lower" { \tabFullNotation \lower }
      >>  % tab staff
    >> % staff group
  >> % score
}


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/