lilypond-user
[Top][All Lists]
Advanced

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

Re: Tikz(or any) integration or drawing curved arrows


From: Stretto
Subject: Re: Tikz(or any) integration or drawing curved arrows
Date: Fri, 16 Nov 2012 11:34:33 -0800 (PST)

The main issue is not an overlay but lilypond actually exporting the node
information to be used in tikz. Each note, for example, would need to be
wrapped in a node. What this allows is tikz to use the notes instead of
absolute coordinate. 

Possibly all that is needed is for lilypond to export the coordinates of
objects and their bounding box and some type of naming convention.

For example

ScoreX.StaffY.Measure3.Beat2.Note->(x,y,w,h)
ScoreX.StaffY.Measure3.Beat1.Markup->(x,y,w,h)

or whatever. It would be quite easy to convert such a notation directly into
a tikz node. From there one could add their own tikz code using these nodes,
generate an image, and overlay it with the ly output.

(in fact, it would be possible to do this directly in ly code by exporting
the tikz code into a .tex file and running tex on it, then grabbing the
image and overlaying it at the end of the code)

The real issue, is, figuring out how to let the user interact with the
coordinates of the notation elements in tikz. The whole point of all this is
to get away from having to use absolute coordinates.

Another way might be to use something like \tikzmarkup which executes tikz
commands. 

Maybe

a4 ces d-\tikzmarkup[note_d]{} e-\tikzmarkup{\draw (note_d) -- (note);}

the bracketed argument defines a node around whatever is marked up(node_d is
a, possibly empty, tikz node around the d note), and note is a default node
around the e note(internally it would be given a unique random name).

All these tikz commands are strung together, put in a tikzpicture, passed to
latex, which should generate an appropriate overlay image.







--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Tikz-or-any-integration-or-drawing-curved-arrows-tp136419p136444.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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