lilypond-user
[Top][All Lists]
Advanced

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

Re: Generating a score for screen display


From: Han-Wen Nienhuys
Subject: Re: Generating a score for screen display
Date: Wed, 03 Aug 2005 12:25:58 +0200
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)

Pete Yandell wrote:
I'm writing a music tuition type app for Mac OS X, and Lilypond is top of my list of potential tools for generating scores for display on the screen. Lilypond seems a good choice because it can spit out nice looking scores in PDF, and can also spit out some basic MIDI.

Now the questions. I have several, in order of importance:


1. Can I work out which notes in the MIDI file correspond to which notes in the PDF of the score?

I want to highlight notes on the screen as they're played, so I need to map between the MIDI data and locations of notes in the PDF.

Currently, as a quick-and-dirty solution, I'm scanning the PDF for the hyperlinks that connect the notes back to the original source file, sorting these, and assuming that one note in the score equals one note in the MIDI file. This is (obviously) not what you'd call a robust solution. Any of the Lilypond gurus/developers suggest a better way?

I could implement origin information in the MIDI, by sending out extra MIDI text events. This would be a sponsored feature. Contact me at address@hidden if you're interested.

2. Can I generate a score as a single horizontal line rather than as multiple lines and pages?

I may want to have the music scroll horizontally as it is played, rather than vertically. To do this, I'd need to make Lilypond spit out one long line of music.

Yes. Try the EPS backend, with raggedright and a really long linewidth.
You can then use ps2pdf and pdfcrop to get PDF file.


3. Can I make Lilypond put all the staff lines, bar lines, note stems, etc. on integer pixel boundaries such that horizontal and vertical lines aren't anti-aliased?

Obviously this would make the screen display a bit nicer.

I could try to cook up something for you, but this is rather fragile. For example, if the stem and note head X-position are both rounded, it might be that an upstem note gets disconnected with the stem.

You can tune the vertical size by doing #(set-global-staff-size 19.985)
to make the coordinates observe some nice ratio.

--
 Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

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