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

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

Re: Evénements "mark simultanés"


From: Vincent Gay
Subject: Re: Evénements "mark simultanés"
Date: Tue, 12 Sep 2017 23:17:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

Le 12/09/2017 à 23:10, julien a écrit :
Bonjour, 
au même changement de section d'une partition, il y a un segno.

<http://lilypond-french-users.1298960.n2.nabble.com/file/t395454/marzia.jpg> 
Je reçois l'avertissement suivant :

*Avertissement : Deux événements mark simultanés, rejet de celui-ci
       \mark  \markup {\bold {Tempo di marzia}}
 Avertissement : Événement mark précédent ici
  \mark \markup { \musicglyph #"scripts.segno" }*

Comment écrire les deux indications sans que la compilation les rejette ?
Merci pour vos conseils.
Cordialement.


Arf... ce problème revient périodiquement

voici une fonction dont j'ai oublié (si je ne l'ai jamais su) l'auteur et que j'ai trouvé, je crois, ici même. Colle-la en début de fichier ou mieux encore dans un fichier inclus.

----
\version "2.18.2"

#(define-public (string-or-markup-or-boolean? e)
(or (string? e) (markup? e) (boolean? e)))

#(define (double-rehearsalmark-stencil grob)
(let*
((grobs-event (ly:grob-property grob 'cause '()))

(left-label (ly:event-property grobs-event 'left-label))
(right-label (ly:event-property grobs-event 'right-label))
(gap (ly:grob-property grob 'gap 1.4)))
(case (ly:item-break-dir grob)
((-1)
(if (boolean? left-label) empty-stencil
(grob-interpret-markup grob
(make-right-align-markup left-label))))
((1)
(if (boolean? right-label) empty-stencil
(grob-interpret-markup grob
(make-left-align-markup right-label))))
(else
(if (boolean? left-label)
(grob-interpret-markup grob
(if left-label
(make-center-align-markup right-label)
(make-left-align-markup right-label)))
(if (boolean? right-label)
(grob-interpret-markup grob
(if right-label
(make-center-align-markup left-label)
(make-right-align-markup left-label)))
(ly:stencil-add
(ly:stencil-translate
(grob-interpret-markup grob
(make-right-align-markup left-label))
(cons (* -0.5 gap) 0.0))
(ly:stencil-translate
(grob-interpret-markup grob
(make-left-align-markup right-label))
(cons (* 0.5 gap) 0.0)))))))))

doubleMark =
#(define-music-function
(parser location left-string right-string)
(string-or-markup-or-boolean? string-or-markup-or-boolean?)
(if (and (boolean? left-string) (boolean? right-string))
(ly:warning "~a \\doubleMark - at least one string or markup required" location))
(make-music 'SequentialMusic
'elements (list

(make-music 'ContextSpeccedMusic
'context-type 'Score
'element
(make-music 'OverrideProperty
'symbol 'RehearsalMark
'grob-value double-rehearsalmark-stencil
'grob-property-path (list 'stencil)
'pop-first #t
'once #t))
(make-music 'ContextSpeccedMusic
'context-type 'Score
'element
(make-music 'OverrideProperty
'symbol 'RehearsalMark
'grob-value #f
'grob-property-path (list 'self-alignment-X)
'pop-first #t
'once #t))
(make-music 'ContextSpeccedMusic
'context-type 'Score
'element
(make-music 'OverrideProperty
'symbol 'RehearsalMark
'grob-value `#(,(not (boolean? left-string))
#t
,(not (boolean? right-string)))
'grob-property-path (list 'break-visibility)
'pop-first #t
'once #t))
(make-music 'MarkEvent
'label #f
'left-label (if (string? left-string)
(make-simple-markup left-string)
left-string)
'right-label (if (string? right-string)
(make-simple-markup right-string)
right-string)
'origin location))))
----

Il suffit maintenant de faire appel à la fonction par \doubleMark

exemple:
\once\override Score.RehearsalMark.break-visibility = #end-of-line-visible
\once\override Score.RehearsalMark.self-alignment-X = #RIGHT
\doubleMark
\markup {\bold "D.S. al Coda"}
\markup { \box \fontsize #2 \musicglyph #"scripts.coda" }


-- 
Vincent Gay
Envoyé depuis mon saxo-phone :)
http://blog.vintherine.org/ - http://photos.vintherine.org/

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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