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

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

Re: Ajout de staccato


From: Gilles
Subject: Re: Ajout de staccato
Date: Mon, 24 Sep 2012 23:34:36 +0200
User-agent: Opera Mail/12.02 (Win64)


Plusieurs solutions
1- réécrire soi-même le code en tenant compte de la nouvelle structure ...

%%%%%%%%%%%%%%%%
\version "2.16.0"

%%% addStacc ..........................................
#(define (make-script x)
  (make-music 'ArticulationEvent
              'articulation-type x))

#(define (add-script m x)
  (case (ly:music-property m 'name)
    ((NoteEvent) (set! (ly:music-property m 'articulations)
                     (append (ly:music-property m 'articulations)
                        (list (make-script x))))
                  m)
    ((EventChord)(set! (ly:music-property m 'elements)
                     (append (ly:music-property m 'elements)
                        (list (make-script x))))
                  m)
    (else #f)))

#(define (add-staccato m)
        (add-script m "staccato"))

addStacc = #(define-music-function (parser location music)
                (ly:music?)
          (map-some-music add-staccato music))
%%% fin addStacc ............................................

\score {
  \relative c'' {
    c c c c
    \addStacc { c\p <c e> c-> c }
    %% ajoute un point (staccato) aux notes entre { }
  }
}
%%%%%%%%%%%%%%%%%%%%%%
--
Gilles



reply via email to

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