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

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

Re: fonction scheme avec paramètre optionnel


From: Pierre Perol-Schneider
Subject: Re: fonction scheme avec paramètre optionnel
Date: Sun, 17 May 2015 19:52:59 +0200

bah oui c'est tout bon : http://www.lilypond.org/doc/v2.16/Documentation/extending/music-functions

Le 17 mai 2015 17:43, Daniel Cartron <address@hidden> a écrit :
Le dimanche 17 mai 2015, 17:33:57 Daniel Cartron a écrit :
> Bonjour/soir
>
> J'ai music = {a b c d} et mafonction qui fait bien son boulot quand j'écris
> \mafonction \music
>
> Je voudrais dans mon fichier ly et donc pas dans du scheme mais du lilypond
> donner un paramètre optionnel à ma fonction :
> \mafonction 2 \music
> \mafonction 3 \music
> et si il n'y a rien ça veut dire
> \mafonction 1 \music
>
> Je suis sûr d'avoir lu qq chose là-dessus qq part mais où....

je pense avoir trouvé, dites moi juste si c'est bon :
mafonction = #(define-music-function  (parser location parametre music)
  (number? ly:music?)
--
Cordialement, Daniel Cartron
« Pour une réponse affirmative, il n'existe qu'un seul mot : oui. Tous les
autres mots ont été inventés pour dire non. »
Tristan Bernard


_______________________________________________
liste de diffusion lilypond-user-fr
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user-fr


reply via email to

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