Mike Solomon <[email protected]> writes: > Hey LilyPonders, > > I am trying to output MIDIs of a piece where I have swung and straight > parts going on at the same time. I have a little function I use that > changes the entire piece to swung by varying the tempo, but that won’t > work here. What I need is something that will act directly on notes, > multiplying all off-beat eighth notes by 2/3 and all on-beat eighth > notes by 4/3. This’d require a music function that knows where in a > measure notes fall, which’d require a two-pass mechanism - one that > counts notes and another that applies transformations to counted > notes. Before I spend a day writing the thing, does anyone have one I > could use?
I'd have suggested taking a look at extract-beam-exceptions in scm/auto-beam.scm. However, it seems a bit more complex than I remembered it to be. The cheapskate way to do this, assuming that we are talking about just a single context, would be to quote the music, then manipulate the representation of the quotation (which contains timing data along with the stream events). A bit more expensive, when we are talking about multiple contexts, is using recording-group-emulate to get a list of all stream events with associated times, then mess with the respective music-cause expressions. -- David Kastrup _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
