lilypond-user-fr
[Top][All Lists]
Advanced

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

Re: double-stem-for-half-notes


From: NOreply
Subject: Re: double-stem-for-half-notes
Date: Wed, 13 Feb 2019 14:28:33 -0700 (MST)

Bonjour,
Je ne suis pas sûr de bien comprendre la question.
Dans l'exemple ci-dessous, les hampes doubles sont appliquées uniquement aux 
têtes de notes "xcircle".
Dans cet exemple, avec la fonction \OX, les hampes doubles sont ajoutées
automatiquement en même temps que les têtes de notes "xcircle".

http://www.lilybin.com/mhwty4/1

%%%%%%%%%%%%%%
%%%%

\version "2.18.2"
\header {
  title = "double-stem-for-half-notes pour xcircle style"
}

#(define (double-stem-for-half-notes grob)
   (let ((stem (ly:stem::print grob)))
     (if (= 1 (ly:grob-property grob 'duration-log))
         (if (= 1 (ly:grob-property grob 'direction))
             (ly:stencil-combine-at-edge stem X LEFT stem 0.3)
             (ly:stencil-combine-at-edge stem X RIGHT stem 0.3))
         stem)))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
OX = #(define-music-function 
       (parser location m ) 
       (  ly:music? )
       #{  \override NoteHead.style = #'xcircle
           \override Voice.Stem.stencil = #double-stem-for-half-notes 
           $m
           \defaultNoteHeads 
           \undo    \override Voice.Stem.stencil =
#double-stem-for-half-notes 
       #} )

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\score {
  {

    \OX  { c''2 c' } c'' c'}

  \layout { }
  \midi {}
}

%%%%% 

 % ; = )





--
Sent from: http://lilypond-french-users.1298960.n2.nabble.com/



reply via email to

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