lilypond-user
[Top][All Lists]
Advanced

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

Re: 2.14.2-syntax for listed Staffs in SimultaneousMusic?


From: Thomas Morley
Subject: Re: 2.14.2-syntax for listed Staffs in SimultaneousMusic?
Date: Mon, 14 Dec 2015 01:37:29 +0100

2015-12-13 23:08 GMT+01:00 David Kastrup <address@hidden>:
> Thomas Morley <address@hidden> 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))))

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



reply via email to

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