I'm working on an application that generates music. I'd like to use Lilypond to generate my scores, but I'm having difficulty figuring out the best way to produce the proper lilypond notation for the durations of the notes. Internally, all of my rhythmic durations are represented as fractions (i.e. 1/4 for a quarter note, 3/8 for a dotted quarter, 1/6 for one note of a quarter note triplet, etc). As long as my durations have a power of 2 in the denominator, it's not difficult to figure out the correct lilypond notation. But tuplets are much more difficult, especially when you get into nested tuplets, tuplets that mix durations (i.e. 8ths and 16ths in the same tuplet), etc.
Does anyone know of an algorithm to convert from fractional representations of durations to the lilypond format? Thanks! Myron _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user