On 2019-01-25 7:22 pm, Gack McShite wrote:
Trying to clean up errors. I see this pattern a lot, so I assume it
should work.
TrackAVoiceAMusic = #(define-music-function (parser location inTab)
(boolean?)
#{
\tempo 4=106
\clef #(if $inTab "tab" "treble_8")
What stands out to me is the extra $. Since the # already switches
context from LilyPond syntax to Scheme, you need only write "inTab" in
that case. Otherwise to Scheme, "$inTab" is a different symbol than
"inTab".
Side note: It is a common convention in Scheme that Boolean variables
and functions end in a question mark. Certainly not required, but you
might consider using "inTab?".
-- Aaron Hill
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user