[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: erreur dans fonction scheme
From: |
Daniel Cartron |
Subject: |
Re: erreur dans fonction scheme |
Date: |
Mon, 27 May 2013 16:35:55 +0200 |
User-agent: |
KMail/4.10.2 (Linux/3.8.0-22-generic; KDE/4.10.2; x86_64; ; ) |
Le lundi 27 mai 2013 16:07:35 Gilles a écrit :
> Il faut réécrire 2 fois la fonction, car sinon upperline et lowerline ne
> sont pas réévaluées.
> En particulier avec un \with ça ne marche pas :
j'ai pas encore pris le tps de comprendre tout ce que tu as écrit mais ça
marche avec ce code :
#(define syst "cadb")
#(define upperline #t)
#(define lowerline #t)
les lignes précédentes sont à adapter à ce qu'on veut, puis :
diatoTab = \with {
\override StaffSymbol #'line-count =
#(if (and (member kbd threerows) (string=? syst "corg"))
#{ #3 #}
#{ #2 #}
)
\override StaffSymbol #'line-positions =
#(if (and (member kbd threerows) (string=? syst "corg"))
#{ #'(-12 -5.8 0.4 6.6) #}
#{ #'(-12 -5.8 0.4) #}
)
\override StaffSymbol #'stencil =
#(cond
((and (member kbd threerows) (string=? syst
"corg") (not
upperline) (not lowerline))
#{ #(color-staff-lines white black
black white) #})
((and (member kbd threerows) (string=? syst
"corg") upperline
(not lowerline))
#{ #(color-staff-lines white black
black black) #})
((and (member kbd threerows) (string=? syst
"corg") (not
upperline) lowerline)
#{ #(color-staff-lines black black
black white) #})
((and (member kbd threerows) (string=? syst
"corg") upperline
lowerline)
#{ #(color-staff-lines black black
black black) #})
((and (or (not (member kbd threerows))
(string=? syst "cadb"))
(not upperline) (not lowerline))
#{ #(color-staff-lines white black
white) #})
((and (or (not (member kbd threerows))
(string=? syst "cadb"))
upperline (not lowerline))
#{ #(color-staff-lines white black
black) #})
((and (or (not (member kbd threerows))
(string=? syst "cadb"))
(not upperline) lowerline)
#{ #(color-staff-lines black black
white) #})
(else #{ #(color-staff-lines black black black)
#})
)
}
il y a des tas d'autres override en plus mais hors sujet
et ensuite
\new Staff \with { \diatoTab }
affiche ce que je veux avec le nombre de lignes visibles ou non, dès que je
change une des lignes du début et que je recompile j'ai la nouvelle version.
--
Cordialement, Daniel Cartron
« Le rire n'est jamais gratuit : l'homme donne à pleurer mais prête à rire.
»
Pierre Desproges - Fonds de tiroir
Re: erreur dans fonction scheme, Daniel Cartron, 2013/05/27