lilypond-user
[Top][All Lists]
Advanced

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

Re: Catch possible non-rhythmic-event music expressions


From: Urs Liska
Subject: Re: Catch possible non-rhythmic-event music expressions
Date: Tue, 26 Jun 2018 15:48:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0



Am 25.06.2018 um 14:30 schrieb Urs Liska:
2)
How can I know the comprehensive list of type/grob mappings I have to support?

3)
What would be a better structure than the growing list of memq conditionals, especially if the list should turn out to be significantly longer than the five I currently have?

I found this better structure to be 'any' which allows me to iterate over a list of mappings like this:

     (property-path
      (any
       (lambda (type)
         (if (memq (car type) types)
             (let ((result (cdr type)))
               (if (procedure? result)
                   (result)
                   result))
             #f))
       `((context-specification . ,parse-context-spec)
         (key-change-event . (Staff KeySignature))
         (mark-event . (Score RehearsalMark))
         (ottava-music . (Staff OttavaBracket))
         (tempo-change-event . (Score MetronomeMark))
         (time-signature-music . (Staff TimeSignature)))
       ))

(within a let-block).
However, this leaves open my question of where and how to determine which events/grobs I will have to support in this alist.

Any suggestions?
Thanks
Urs



reply via email to

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