lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pitch_squash_engraver


From: Marc Hohl
Subject: Re: Pitch_squash_engraver
Date: Wed, 09 Sep 2009 17:26:52 +0200
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Patrick Schmidt schrieb:
Hi Christian,



-------- Original-Nachricht --------
Datum: Tue, 8 Sep 2009 23:10:51 -0400
Von: Christian Henning <address@hidden>
An: address@hidden
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).

Marc
\version "2.13.3"

  x = #(define-music-function (parser location note) (ly:music?)
(set!
(ly:music-property note 'tweaks)
(acons 'style 'cross
(ly:music-property note 'tweaks)))
note)
\relative c' {
   <\x c \x e \x g>
}


Cheers,
patrick





reply via email to

[Prev in Thread] Current Thread [Next in Thread]