amy
amy copied to clipboard
Make all envelope generator durations be relative to segment start
Currently, the envelope generator breakpoint set:
bp0="200,1.0,500,0.3,50,0.0"
means "ramp up to 1.0 in the first 200ms after the note-on (attack), then ramp-down to 0.3 by 500ms after the note-on (decay). When the note ends, ramp down to zero over 50ms (release)."
I keep getting tripped-up by the way the end of the decay is specified as ms since the beginning of the note, so includes the attack time. I think it should be since the beginning of the decay, so the equivalent bp string under the proposed scheme would be:
bp0="200,1.0,300,0.3,50,0.0"
Note that bp strings can have up to 8 segments, and all the times are (currently) relative to the start of the note except the final one (release) which is special. This modification would make all the durations relative to the start of that segment, making the release segment different only in that it doesn't begin until note-end.
Also, we'll have to reprocess the DX7 preset envelopes which, although segment-relative natively, were processed to cumulate the times when being translated by fm.py:355
.