-
Notifications
You must be signed in to change notification settings - Fork 3
graphics files as marks
Michael Edwards edited this page Jan 5, 2019
·
1 revision
If you're generating scores with Lilypond you can add arbitrary Lilypond code to an event via add-mark and related methods. This is useful for all kinds of situations but especially when it comes to adding or modifying marks in a score.
Sometimes no existing mark expresses what you need so the best thing to do is create your own graphics file and attach that as a mark, using Lilypond code via a text mark.* An example follows:
(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))
In order for this to work, the graphics file blah.eps will of course need to be in a place Lilypond can find it, e.g. in the same directory as the files generated by lp-display.
- 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
- which instruments are available in the standard instrument-palette?
- how can I change the default directory for output?
- how can I change the range of instruments in the standard instrument-palette?
- how can I stop (or start) slippery chicken from opening score files automatically?
- how do I make a one-note rthm-seq with a chord?
- set-limits by section
- empty bars
- combining bars
- combining chopped and unchopped rthm-seq palettes
- how can I 'roll-my-own' slippery-chicken
- graphics files as marks
- three-quarter tone accidentals
- what to do when lilypond fails?
- tuplets with colons e.g 7:6