On Apr 21, 2014, at 1:17 AM, David Hinkle <[email protected]> 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:
> https://github.com/drachs/singingPractice
> 
> 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
> 
> https://rawgit.com/drachs/singingPractice/2d53330f77122a435063b57dd5322418851510a4/notedisplay.html

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
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to