lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

is it possible to scale the horizontal width of a custom markup accordin


From: Jeffrey Trevino
Subject: is it possible to scale the horizontal width of a custom markup according to the graphic position of notes?
Date: Wed, 13 Feb 2013 23:47:10 -0800

Hi there,

I'm having trouble grasping how a horizontally spanning custom markup can reliably correspond to the graphic space occupied by several notes, aside from lots of trial-and-error coordinate tweaking.

I'd like to do something like,

my_horizontal_markup = #'(eleventy_lineto_commands)

\new Staff{
{c1 ~ c ~ c}^\markup {
  \path #0.18 #my_markup

and have the markup automatically scale to begin at the first note in the container and end with the end of the container's last note's duration space, regardless of the coordinates I've given in the original markup definition. Instead, it looks like I can only attach the markup to a single note, even though it spans horizontally, and then I've got to adjust relative coordinates to make sure the end of the horizontally spanning markup lands where I'd like; I also don't see any way to include the spatial location of the final note's end in the markup definition, which would also allow this to happen. Any thoughts?

I'm notating a gradually increasing diaphragmatic vibrato:

\version "2.17.0"

samplePath =
  #'(
     (moveto 0 2)
     (lineto 4 2)
     (lineto 4 0)
     (lineto 8 0)
     (lineto 8 2)
     (lineto 12 2)
(lineto 12 0)
(lineto 15 0)
(lineto 15 2)
(lineto 17 2)
(lineto 17 0)
(lineto 19 0)
(lineto 19 2)
(lineto 20 2)
(lineto 20 0)
(lineto 21 0)
(lineto 21 2)
(lineto 22 2)
(lineto 22 0)
(lineto 23 0)
(lineto 23 2)
(lineto 24 2)
(lineto 24 0)
(lineto 24.5 0)
(lineto 24.5 2)
(lineto 25 2)
(lineto 25 0)
(lineto 25.5 0)
(lineto 25.5 2)
(lineto 26 2)
(lineto 26 0)
(lineto 26.5 0)
(lineto 26.5 2)
(lineto 27 2)
(lineto 27 0)
(lineto 27.5 0)
(lineto 27.5 2)
(lineto 28 2)
(lineto 28 0)

     )
\new Staff{
c1^\markup {
  \path #0.18 #samplePath
} ~ c1 ~ c1 ~ c1 ~ c1
}

cheers,
Jeff

reply via email to

[Prev in Thread] Current Thread [Next in Thread]