lilypond-user
[Top][All Lists]
Advanced

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

Defining variables mid-stream in a music expression using tags.


From: dfro
Subject: Defining variables mid-stream in a music expression using tags.
Date: Wed, 17 May 2023 15:58:49 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

I want to define and change variables mid-stream in a music expression, while also using tags. Below is an example of what I am trying; but, it does not work.


\version "2.24.1"

\keepWithTag #'textI
%\keepWithTag #'textII


{
  \tag #'textI { #(define l "A") }
  \tag #'textII { #(define l "B") }
  c''1 ^\markup \l
  \tag #'textI { #(define l "C") }
  \tag #'textII { #(define l "D") }
  c''1 ^\markup \l
}


The tags are not keeping lilypond from skipping the define's that are in \tag #'textII. Is there a way to make this work?

Is there a way to define variables using lilypond syntax inside a music expression?


Peace,

David




reply via email to

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