lilypond-user
[Top][All Lists]
Advanced

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

Re: Locating X/Y positions of staves and bars in PNG output


From: Mike Solomon
Subject: Re: Locating X/Y positions of staves and bars in PNG output
Date: Mon, 21 Apr 2014 10:09:02 +0300

On Apr 21, 2014, at 1:17 AM, David Hinkle <address@hidden> wrote:

I'm working on a new GPL web application designed to help new people learn to sing using the new FFT capabilities of HTML5.  (Git hub links below if you're interested).

I'd like to use Lilypond to generate scores for display in the app.  In order to show the user the feedback about where they're singing I'd like to superimpose that feedback on the score, but I need to know the X/Y positions of the bars and staves.

I'm willing to go so far as to modify Lilypond to export this information when it generates an PNG but I'd like to ask the list first if they have any other ideas, and if not, maybe they could point me to the best place to start tinkering with Lilypond source to get the information exported.

My Proof of concept:

A live example of precisely identifying the frequency of a tone and displaying it on a staff.  Blue line is the precise frequency based on a curve fit of the FFT, red bars are fft output.   White lines are bass and treble clef staff lines.  (Staff lines are spread further out as the frequency gets higher


LilyPond may not be the best tool to do what you want.

For short examples, check out the GUIDO server.

http://guidoeditor.grame.fr

It sends scores to a server in realtime and recuperates either a canvas or a png (http://guidoeditor.grame.fr/png.html).  The public API has methods that generate what are called 
Time2GraphicMap, which give you this type of XY information.

GUIDO is available at http://sourceforge.net/p/guidolib/code/ci/master/tree/.

For LilyPond, I’d recommend using the SVG to get data about where things are placed globally.

Cheers,
MS

reply via email to

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