[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How do I mix ly and scheme in define-music-function
From: |
Kevin Dalley |
Subject: |
How do I mix ly and scheme in define-music-function |
Date: |
Sat, 31 Mar 2007 14:28:52 -0700 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.19 (linux) |
I want to stick an if statement in the middle of setting many values:
This doesn't work. The if block appears to be skipped.
By the way, in the real code, I replace #t with something else, but if
I can't get it to work with #t, there is something wrong with my
understanding.
The later block does work.
setAltStaff = #(define-music-function (parser location style lowerOctave
upperOctave)
(string? number? number?)
(if #t
#{
\set shapeNoteStyles = #(chromatic-value notation-style
"shape-note-styles")
\set shapeLayout = #shapeSemitone
#})
#{
\set Staff.clefGlyph = #"clefs.G"
\set middleCPosition = #(chromatic-value $style "middleCPosition")
\set clefPosition = #(+ (chromatic-value $style
"middleCPosition") (chromatic-value $style "g-clef-from-c"))
\set staffLineLayout = #(chromatic-value $style "layout")
\override Staff.StaffSymbol #'line-count = #(length
(all-lines-notation $style $lowerOctave $upperOctave))
\override Staff.StaffSymbol #'line-positions =
#(all-lines-notation $style $lowerOctave $upperOctave)
\override Staff.StaffSymbol #'internal-ledger-lines =
#(all-ledgers-notation $style $lowerOctave $upperOctave)
#}
)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- How do I mix ly and scheme in define-music-function,
Kevin Dalley <=