Comment #12 on issue 687 by arvidgr: Enhancement: inequal MIDI quantization of equal durations (swing, rubato)
http://code.google.com/p/lilypond/issues/detail?id=687

This is perhaps a silly idea, but should we really limit this to MIDI?

Personally, I'd like a 2:1 swing { c8 c8 } to be printed, as well as performed, as { c8*4/3 c8*2/3 }. If I have a triplet in a different voice (again assuming 2:1 swing), that means I'd want the second swing eight aligned vertically with the third note of the triplet.

(I don't really know if this is usual practice or not. As far as I could look up, Read doesn't mention this at all. But in my opinion, it would make quite a bit of sense.)

This is an implementation strategy that should be feasible to do in Scheme. (Doing this manually, with 8*4/3 and 8*2/3 (and 4.*10/9 and...) all over the place, is certainly possible in Lilypond input. And equally certainly tedious.)

Of course, anyone wanting swing in MIDI only could have different score blocks for printed and MIDI output, doing

  \swing #2 #1 \themusic % or whatever

...only on the MIDI part.

To re-iterate, I'm proposing a music-function (swing a b sequential-music) (integer? integer? ly:music?), possibly based on a more generic framework, where:

  \swing #2 #1 { c4. c8 c8 c8 }

gives the same as the following input:

  { c4.*10/9 c8*2/3 c8*4/3 c8*2/3 }

A possible more generic interface could be something like this:

  (define-music-function (unequal duration weight-list sequential-music)
     (ly:duration? list? ly:music?)
     [...]

Anyway, this approach does not touch MIDI at all. It all happens very long before the music touches the C++ MIDI code. It should even be possible to implement this as a preprocessor to Lilypond. In Perl. Stupid, but possible.

So is there any reason this can't be done in Scheme?


_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to