2015-12-14 1:37 GMT+01:00 Thomas Morley <thomasmorle...@gmail.com>: > 2015-12-13 23:08 GMT+01:00 David Kastrup <d...@gnu.org>: >> Thomas Morley <thomasmorle...@gmail.com> writes: >> >>> Hi all, >>> >>> currently I'm doing some research through the lily-versions. >>> Therefore it would be great I could have a test-case working even for 2.14.2 >>> >>> The following works back to 2.16.2 >>> How would be 2.14.2-syntax? >>> Any hint, even for more clumsy coding, appreciated. I need that >>> mapping over different staff-spaces. >>> >>> << >>> $@(map >>> (lambda (n) >>> #{ >>> \new Staff \with { \override StaffSymbol #'staff-space = $n } >>> { c''1 } >>> #}) >>> (iota 12 0.25 0.25)) >>>>> >> >> #(ly:export (make-simultaneous-music ... \override ... = #$n } ... >> >> And you better get it right because the error messages will be totally >> useless. > > > Got it work with the code below, it _is_ clumsy, but good enough for a > test-case. Compiles with 2.14.2, 2.16.2, 2.18.2 and recent > devel-version(s) > > #(define the-test-music > (let ((mus > (make-simultaneous-music > (map > (lambda (n) > #{ > \new Staff \with { \override StaffSymbol #'staff-space = $n } > { c''1 } > #}) > (iota 12 0.25 0.25))))) > ;; option to enable StaffGroup: > (if #f > (make-music > 'ContextSpeccedMusic > 'create-new #t > 'property-operations '() > 'context-type 'StaffGroup > 'element > mus) > mus))) > > #(cond ((string=? (lilypond-version) "2.14.2") > (ly:export (add-score parser (scorify-music the-test-music parser)))) > ((member (lilypond-version) '("2.16.2" "2.18.2")) > (add-score parser (scorify-music the-test-music parser))) > ((string-ci<=? (lilypond-version) "2.19.32") > (add-score (scorify-music the-test-music))) > (else (ly:error "unknown version: ~a" (lilypond-version))))
No need to special-case 2.14.2 while using (add-score parser (scorify-music ... #(cond ((member (lilypond-version) '("2.14.2" "2.16.2" "2.18.2")) (add-score parser (scorify-music the-test-music parser))) ((string-ci<=? (lilypond-version) "2.19.32") (add-score (scorify-music the-test-music))) (else (ly:error "unknown version: ~a" (lilypond-version)))) > > Long way since 2.14.2 and a lot of clean up was done since those days. > Mostly from you, I think > > Thanks a lot, again! > Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user