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

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to