What I am forced to do is set a different transposition command after each
variable. I get the result, but wondered if there a more elegant manner.

I don't know if it is a more elegant solution but here is a quick solution if you have a lot of practice exercices to do.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
doPract = #(define-music-function (parser location music notes skipmusic) (ly:music? ly:music? ly:music?)
(let (
 (pitch-list (list))
 (final-list (list )))
(music-filter
(lambda (evt);;%% build of pitch-list
 (let ((pitch (ly:music-property evt 'pitch)))
  (if (ly:pitch? pitch)
   (set! pitch-list (append
     pitch-list
     (list pitch))))
  #t ))
notes)

(while (not (null? pitch-list)) ;;%% build of final-list
(set! final-list (append
  final-list
  (list
   (ly:music-transpose
     (ly:music-deep-copy music)
     (car pitch-list)))))
(set! pitch-list (cdr pitch-list)))

(make-music 'SimultaneousMusic 'elements (list
   (make-music 'SequentialMusic 'elements  final-list)
   skipmusic))

))
       %%%% here is your job
PractOne = {g'( c') g'( c'')}
PitchesOne = { c' b bes a aes }
skipmusicOne = { s1-1 s1-2 \slurDown s1-1 \breathe }

\new Voice {
    \doPract \PractOne \PitchesOne \skipmusicOne
    %% \doPract \PractTwo \PitchesTwo \skipmusicTwo
}

%%%%%%%%%%%%%%

Gilles



_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to