On 12/21/06, bbarros <[EMAIL PROTECTED]> wrote:
I was interested in construct/processing rhythms with lisp or python, like we could do in open music with "tree" library, and output for Lillypond. OM uses the Comom Music Notation, that is very good for this kind of task. It looks like this: (cmn treble (rqq '(2 ((1 (1 1 1 2)) (1 (1 2)) (1 (1 2 4)))) g4 fs4 sixteenth-rest en4 (chord c4 ef4) eighth-rest af4 bf4 gf4)) the part '(2 ((1 (1 1 1 2)) (1 (1 2)) (1 (1 2 4)))) is the rhythm, and you can make construct very easily in different ways, and then further modify it, sometimes very radically. this kind of rhythm notation, separated from the pitch material, can be interesting for this kind of construction and processing. I can choose a sequence of measures sizes, and then a sequence of proportions inside it. I can't figure out how to do this and export to lilypond easily. This separations between proportions and measures sizes. Does Lilypond allow other kinds of notation that is separated from pitch material and more handy for tuples.. ? If not, is there projects for that? I found very easy to generate pitch material for lilypond output, but I didn't have any insight about rhythms yet... :-(
Hi Bernardo, If you know about LilyPond's RhythmicStaff context and if you're clever with recursion, you should be able to write a single function in Scheme (or python or whatever) to transform OpenMusic stuff like ... '(2 ((1 (1 1 1 2)) (1 (1 2)) (1 (1 2 4)))) ... into ... \new Rhythmic Staff \time 2/4 \times 2/3 { \times 4/5 { c'16 [ c'16 c'16 c'8 ] } \times 2/3 { c'8 c'4 } \times 6/7 { c'16 [ c'8 ] c'4 } } } ... which, IIRC, is the LilyPond representation. In other words, LilyPond is perfect for complex rhythmic modelling outside the pitch domain. Just build up your OpenMusic expressions however you want and then write a transform function that will spit out the LilyPond input and shove it into a RhythmicStaff. One *really* helpful thing about LilyPond that you'll find when you start using it for time modelling is that LilyPond -- unlike Finale and Sibelius -- is not bound by the measure in any way whatsoever. So nonbinary meters like 3/14, 7/9 and 5/28 all work correctly out of the box (which is almost impossible to believe), as do incomplete tuplets like \times 2/3 { c'8 [ c'8 ] }. If barlines do not fit *between* the notes of your rhythm but rather come *in the middle* of the notes of your rhythm, no problem: put your rhythms in one voice, put you barlines in a second voice, and set both voices against each other using << and >>. This works absolutely perfectly out of the box and is a major reason to model complex rhythm in LilyPond as opposed to any other notation package. (What's more, not only will LilyPond correctly typeset barlines that come in the middle of note durations, LilyPond will also typeset *line breaks* that come in the middle of note durations (!). To do this, simply \remove Forbid_line_break_engraver.) Finally, if your rhythms are involved you'll probably find it quite helpful to turn on the different proportional notation settings, especially 'uniform-stretching = ##t in the SpacingSpanner. You'll see time proportions exactly. If you do wind up using LilyPond for your rhythmic modelling, please feel free to post back examples to the list. -- Trevor Bača [EMAIL PROTECTED]
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user