bug-lilypond
[Top][All Lists]
Advanced

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

Re: Issue 687 in lilypond: Enhancement: inequal MIDI quantization of equ


From: lilypond
Subject: Re: Issue 687 in lilypond: Enhancement: inequal MIDI quantization of equal durations (swing, rubato)
Date: Wed, 14 Jul 2010 00:18:39 +0000


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

adam.spiers - thank you for your valuable thoughts. I like the displacement-list concept you presented, but I think the note boundary issues are a red herring, as I think of swing as a belt-driven turntable with a misshapen cam =) Still I think with a couple tweaks, I can accomodate those scenarios and have an expansion point for user tweaks. I would:

1. Define a displacement map, of - say, a quarter note duration. A displacement function accepts the position of an event, and the map, and returns a new position (which may or may not modify the event, as explained by swing_factor section below)

Example 1: map ( (0 0) (99 99) ) - this is interpreted as a straight linear function across 100 (arbitrary) subdivisions of a quarter note. 25 gets mapped to 25, etc.. Example 2: map ( (0 0) (50 66) (99 99) ) - this maps 25 to 33, 50 to 66, and 99 to 99 - its eigth note swing in a 'continuous distortion' model. Example 3: map ( (0 -5) (50 61) (99 95) ) - this is swing, but behind the beat by 5 units out of a hundred.

Maps accomodate arbitrary distortions quite well, you could get as crazy as you like with yours !

2. A displacement list like yours adam.spiers can be used to set up the map. Common maps can be given names, and invoked as \swing_8 or similar variables.

3. Sometimes you will want the output of the displacement map to modify the position less than all the way, or none at all. The key to this is the choice of various swing_factor functions, which for each event, return how much to listen to the map as a number from 0 to 1.

Example 1: a simple implementation always returns 1 - the map continuously distorts every event like the misshapen cam. This would be enough for me :) Example 2: a swing factor function sees that swing is explictly turned off in the context during some events - the swing factor returned is 0 for each of those events. Example 3: a swing factor function returns 0 unless NoteOn and NoteOff are both aligned to 'kink' points in the map, 1 otherwise. Example 4: a swing factor function cancels swing for events of a certain type Example 5: a swing factor function scales between 1 and 0 between two tempo points.

etc.. it'd be fun to combine these too - I'd have to think about how the user would specify this.










reply via email to

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