Hi Harm,

> Have a look at
> https://lilypondforum.de/index.php/topic,195.msg1231.html#msg1231

Ooh! It even works outside of the parent variable (as would be absolutely 
necessary in my usage):

%%%  SNIPPET BEGINS
\version "2.19.80"

tee = #(define-music-function (name mus) (string? ly:music?)
  (ly:parser-define! (string->symbol name) mus)
  mus)

testing_this = {
  g'1
  \repeat volta 2 \tee MusicRi {
    c''1
    e''1_\markup \halign #-1.5 "Fine"
  }
  \repeat volta 2 {
    g''1
    d''1_\markup \halign #-0.2 \column {
     \right-align "D.S. al Fine" \right-align "e poi"
    }
  }
  \MusicRi
}

another_test = {
  R1
  \MusicRi
  R1*2
  \MusicRi
}

\score {
  <<
    \new Staff \testing_this
    \new Staff \another_test
  >>
}
%%%  SNIPPET ENDS

> Though, I have no clue about the consequences...

Hmmm… It would be nice to hear from others about whether this construction 
makes sense, is "safe", etc.
Certainly the ability to define variables "in-line" would be a bit of a 
game-changer for my Lily-coding.

Thanks!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to