Kevin Dalley <[EMAIL PROTECTED]> writes: > This doesn't work. The if block appears to be skipped. > > 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) > #} > )
Here is the structure of your function: setAltStaff = #(define-music-function (parser location style lowerOctave upperOctave) (string? number? number?) (if #t #{ ..foo.. #}) #{ ..baz.. #}) The function return the last form, which is always #{ ..baz.. #}. You should write instead: setAltStaff = #(define-music-function (parser location style lowerOctave upperOctave) (string? number? number?) (if condition #{ ..foo.. #} #{ ..baz.. #})) nicolas _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user