On 04/10/2014 08:30 AM, Mike Solomon wrote: > 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?
My swing function at <URL: http://crism.maden.org/music/swing.ly > may be a starting point. It currently doesn’t look at the actual on-beat points, but takes pairs of eighth notes. It doesn’t deal with dotted quarters or ties... but it’s a start. The code is public domain, but if anyone improves it, I’d certainly like to see what comes out of it. ~Chris -- Chris Maden, text nerd <URL: http://crism.maden.org/ > Surround hate and force it to surrender. GnuPG fingerprint: DB08 CF6C 2583 7F55 3BE9 A210 4A51 DBAC 5C5C 3D5E _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
