lilypond-user
[Top][All Lists]
Advanced

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

Re: swung and straight at the same time


From: David Kastrup
Subject: Re: swung and straight at the same time
Date: Thu, 10 Apr 2014 16:27:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Mike Solomon <address@hidden> 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



reply via email to

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