This is an old revision of the document!


graphics files as marks

If you're generating scores with Lilypond you can add arbitrary Lilypond code to any event via add-mark and related methods. Sometimes no existing mark will do the trick so you need to create your own graphics file and attach that as a mark. Several such graphics files are already available as mark extensions to Lilypond. If you want to see how those new marks are created and linked to the graphics files, see the slippery chicken source code file lilypond.ly

If you want to attach to a note/event the Lilypond code to create a mark out of one of your own postscript graphics, try modifying the following example:

(let* ((mini
       (make-slippery-chicken
        '+mini+
        :ensemble '(((fl (flute :midi-channel 1))))
        :set-palette '((1 ((c4 d4 e4 f4 g4 a4 b4 c5))))
        :set-map '((1 (1)))
        :rthm-seq-palette '((1 ((((4 4) h. (q))
                                 ((q) h.)
                                 ((e) e (q) - e e e e -))
                                :pitch-seq-palette ((1 2 3 4 5 6 7)))))
        :rthm-seq-map '((1 ((fl (1))))))))
  (add-mark-to-note
   mini 1 1 'fl
   '(text "^\\markup {\\general-align #Y #DOWN  ~
           {\\epsfile #X #1.5 #\"blah.eps\"} }"))
  (lp-display mini))