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

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

Re: Boucle sur fichier maître


From: Éditions IN NOMINE
Subject: Re: Boucle sur fichier maître
Date: Fri, 29 May 2020 11:36:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

Bon bah, ça fonctionne au quart de poil avec cette dernière version. EN
plus, j'arrive à comprendre le code !

Un grand, grand merci à Jean et Valentin !

JMarc

Le 27/05/2020 à 16:40, Valentin Villenave a écrit :

> On 5/27/20, Éditions IN NOMINE <contact@editionsinnomine.com> wrote:
>> Merci Jean ! Je vais tester ça et je reviens vers la liste.
> Encore plus automatisé peut-être :
>
> %% cf 
> https://lists.gnu.org/archive/html/lilypond-user-fr/2020-05/msg00304.html
>
> %%%%
>
> \layout {
>   indent = 25\mm
>   \context {
>     \PianoStaff
>     \consists #Span_stem_engraver
>   }
>   \context {
>     \PianoStaff
>     \override StaffGrouper.staff-staff-spacing.basic-distance = #10
>   }
> }
>
> titreA = "toto"
> rightA = { b }
> leftA = { g }
>
> titreB = "tata"
> rightB = { a }
> leftB = { f }
>
> %%%%
>
> serie = #`(a b c d e f g h i j k l)
>
> chercheMorceau  =
> #(define-void-function (nom) (symbol?)
>    (define (symbol-append . args)
>      (let ((symbols (map symbol->string args)))
>        (string->symbol
>         (apply string-append
>                (cons (car symbols)
>                      (map string-upcase (cdr symbols)))))))
>    (let* ((rightX (ly:parser-lookup (symbol-append 'right nom)))
>           (leftX (ly:parser-lookup  (symbol-append 'left nom)))
>           (titreX (ly:parser-lookup (symbol-append 'titre nom))))
>      (if (and (ly:music? rightX)
>               (ly:music? leftX)
>               (markup? titreX))
>          (add-music #{
>            \new PianoStaff \with {instrumentName = $titreX } <<
>              \new Staff = "right" { $rightX }
>              \new Staff = "left" { $leftX }
>            >>
>                     #}))))
>
> #(map chercheMorceau serie)
>
> %%%%
>
> V.



reply via email to

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