On 18 December 2017 at 10:49, Thomas Morley <[email protected]> wrote:
> 2017-12-17 23:51 GMT+01:00 Gianmaria Lari <[email protected]>: > > Does exist any english resource about the circus-note-heads? A minimum > code > > example? > > > > Thank you, g. > > > > Attached to this post > >> https://archiv.lilypondforum.de/index.php/topic,1432. > msg7908.html#msg7908 > [...] Thank you Harm for your fix, it works! Just in case other lilypond beginner want to try it, here it is the detailed instruction to get the circus note heads example on *windows 10*. 1 Download CircusNoteheads.otf font attached to this mail 2 Install the font: locate the file, right click on it and select "install" from the context menu 3 Download HappyBirthday-CircusNotehead.ly code attached to this email Then compile the lilypond file etc. etc. I also attached the resulting pdf. Best regards, g.
CircusNoteheads.otf
Description: application/vnd.oasis.opendocument.formula-template
\version "2.19.80"
#(set-global-staff-size 35)
#(set-default-paper-size "a4 landscape")
\header {
title = \markup \sans "Happy Birthday"
subtitle = \markup \sans "für Oma"
tagline = ##f
}
\paper {
top-margin = 15 \mm
bottom-margin = 30 \mm
markup-system-spacing.basic-distance = 12\mm
ragged-last-bottom = ##f
}
makeUnpurePureContainer =
#(ly:make-unpure-pure-container
ly:grob::stencil-height
(lambda (grob start end) (ly:grob::stencil-height grob)))
#(define (new-markup-stencil mrkp)
(lambda (grob)
(grob-interpret-markup grob mrkp)))
newClef =
#(define-music-function (parser location mrkp)(markup?)
#{
\override Staff.Clef #'Y-extent = \makeUnpurePureContainer
\override Staff.Clef #'X-extent = #'(-0.5 . 7)
\override Staff.Clef #'stencil =
#(lambda (grob)
(new-markup-stencil mrkp))
#})
rechts = \markup \lower #0.9 \fontsize #8 "R"
links = \markup \lower #3.3 \fontsize #8 "L"
#(define (circus-notehead grob)
"stencil: circus noteheads"
(let* ((pitch (ly:event-property (event-cause grob) 'pitch))
(pitch-index (ly:pitch-notename pitch))
(pitch-octave (ly:pitch-octave pitch))
(charnum (+ #xe190 0 (- pitch-index 3) (* (+ pitch-octave 1) 7))))
(if (and (>= charnum #xe190) (<= charnum #xe198))
(begin (set! (ly:grob-property grob 'stem-attachment) '(1.0 . 0.1))
(grob-interpret-markup grob
(markup #:fontsize 3 #:override '(font-name . "CircusNoteheads") #:char charnum)))
(ly:note-head::print grob))))
\layout {
indent = 0
\context {
\Score
\remove "Bar_number_engraver"
proportionalNotationDuration = #(ly:make-moment 1 4)
}
\context {
\PianoStaff
\override BarLine #'break-visibility = ##(#t #f #f)
}
\context {
\Staff
\remove "Time_signature_engraver"
\override NoteHead #'stencil = #circus-notehead
\override NoteHead #'Y-extent = \makeUnpurePureContainer
\override StaffSymbol #'thickness = #0.7
\override StaffSymbol #'staff-space = #1.25
\override StaffSymbol #'ledger-line-thickness = #'(2 . 0)
\override Stem #'thickness = #2
}
}
\score {
\new PianoStaff <<
\new Staff
\relative c' {
\newClef \rechts \clef treble
s4 s s2 s c s1 s4 s s2 s d c1
s4 s g'2 e c8*2 c s2 s f8*2 f e2 c d c1 \bar "|."
}
\new Staff
\relative c' {
\newClef \links \clef bass
g8*2 g a2 g s b1 g8*2 g a2 g s s1
g8*2 g s2 s s4 s b2 a c8*2 c g2 s b s1
}
>>
\layout {}
\midi {}
}
HappyBirthday-CircusNotehead.pdf
Description: Adobe PDF document
_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
