[tablatures] cross-style note heads in tablature (was: Pitch_squash_engraver) |
[ Thread Index |
Date Index
| More lilynet.net/tablatures Archives
]
Hi Marc,
first of all: thanks for all your brilliant work on tablature!
-------- Original-Nachricht --------
> Datum: Wed, 09 Sep 2009 17:26:52 +0200
> Von: Marc Hohl <marc@xxxxxxxxxx>
> An: Patrick Schmidt <p.l.schmidt@xxxxxx>
> CC: Christian Henning <chhenning@xxxxxxxxx>, lilypond-user@xxxxxxx
> Betreff: Re: Pitch_squash_engraver
> Patrick Schmidt schrieb:
> > Hi Christian,
> >
> >
> >
> > -------- Original-Nachricht --------
> >
> >> Datum: Tue, 8 Sep 2009 23:10:51 -0400
> >> Von: Christian Henning <chhenning@xxxxxxxxx>
> >> An: lilypond-user@xxxxxxx
> >> Betreff: Pitch_squash_engraver
> >>
> >
> >
> >> Hi there, quick question since I cannot find anything in the
> >> documentation. Is there a way to have a note head struck out? Meaning
> >> the the chord is strum but only with muted strings.
> >>
> >
> > I think you want to alter note heads in chords to "x". You can do the
> following (It won't work in tablature):
> >
>
> x =
> #(define-music-function (parser location note) (ly:music?)
> (if (eq? (ly:music-property note 'name) 'NoteEvent)
> ;; yes -> add a tweak
> (begin (set! (ly:music-property note 'tweaks)
> (acons 'style 'cross (ly:music-property note
> 'tweaks)))
> note)
> #{
> \override TabNoteHead #'style = #'cross
> \override NoteHead #'style = #'cross
> $note
> \revert TabNoteHead #'style
> \revert NoteHead #'style
> #}))
>
> works in tablature staves, too (and outside of < ... >, too).
I didn't manage to engrave cross-style note heads inside or outside chords in tablature staves with this code. Here's my example:
\version "2.13.3"
x =
#(define-music-function (parser location note) (ly:music?)
(if (eq? (ly:music-property note 'name) 'NoteEvent)
;; yes -> add a tweak
(begin (set! (ly:music-property note 'tweaks)
(acons 'style 'cross (ly:music-property note 'tweaks)))
note)
#{
\override TabNoteHead #'style = #'cross
\override NoteHead #'style = #'cross
$note
\revert TabNoteHead #'style
\revert NoteHead #'style
#}))
xhead = \relative c {
\x< c e g>
}
\score {
<<
\new Staff = "guitar traditional" <<
\clef "treble_8"
\context Voice = "xhead" \xhead
>>
\new TabStaff = "guitar tab" <<
\context TabVoice = "xhead" \xhead
>>
>>
}
In tablature there are still numbers instead of crosses (x). When I use \relative c' the g of my C-major chord is not displayed and the c and e are in first position instead of third position.
Thanks for any help!
patrick
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01