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: Valentin Villenave
Subject: Re: Boucle sur fichier maître
Date: Wed, 27 May 2020 16:40:49 +0200

On 5/27/20, Éditions IN NOMINE <address@hidden> 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]