On 08/04/2008, Trevor Daniels wrote:
It's possible (most things are in LilyPond) but it's not easy (at least
I
don't know an easy way). Essentially you have to create a tiny score
without a staff, etc. Have a look at
http://lsr.dsi.unimi.it/LSR/Item?id=204
This should give you some clues, or maybe easier, you can simply copy
out
the functions and use them.
The snippet 204 doesn't work very well with 2.11 because it uses
negative padding to position the rhythm mark closer to the staff and
that's not supported by 2.11.
I fiddled with it a bit and found out that if the VerticalAxisGroup
#'Y-extent and VerticalAxisGroup #'minimum-Y-extent are set to #'(0 .
0) the output is more or less agreeable.
The mark is positioned a bit to the right from the center of the note
center, possibly because of the two \hspace #0 (they, or something
else, must be there, otherwise the layout breaks).
-Risto
%%%%%%%
\version "2.11.43"
rhythmMarkStaffReduce = #-4
rhythmMarkLabelFontSize = #-3
rhythmMark = \markup
{
\line \vcenter
{
\combine % 1st column in line
\hspace #0
\hspace #0
% This fakes a uniform baseline (ie. create common anchor for
vcenter)
\score
{ % 2nd column in line
\new Staff \with
{
fontSize = #rhythmMarkStaffReduce
\override StaffSymbol #'staff-space =
#(magstep rhythmMarkStaffReduce)
\override StaffSymbol #'line-count = #0
\override VerticalAxisGroup #'Y-extent = #'(0 . 0)
\override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0)
}
\relative c'' { \stemUp b8[ b] }
\layout {
ragged-right= ##t
indent = 0
\context
{
\Staff
\remove "Clef_engraver"
\remove "Time_signature_engraver"
}
} % layout
} % 1st Score end
\hspace #0
\italic \fontsize #rhythmMarkStaffReduce \column { "=" " " }
\score { % 5th column in line
\new Staff \with
{
fontSize = #rhythmMarkStaffReduce
\override StaffSymbol #'staff-space =
#(magstep rhythmMarkStaffReduce)
\override StaffSymbol #'line-count = #0
\override VerticalAxisGroup #'Y-extent = #'(0 . 0)
\override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0)
}
\relative c'' { \stemUp \times 2/3 { b4 b8 } }
\layout
{
ragged-right= ##t
indent = 0
\context
{
\Staff
\remove "Clef_engraver"
\remove "Time_signature_engraver"
}
} % layout end
} % 2nd Score end
} % line end
} % markup end
\relative c'
{
c4^\rhythmMark
}
%%%%%%%