amy
amy copied to clipboard
Smooth retrigger
Under this change, we add state for each BP_SET that records which segment it was in (synth[osc].current_seg[bp_set]
), and has a dynamic field for the start value of the current envelope segment (synth[osc].seg_start_val[bp_set]
). When compute_breakpoint_scale
detects that the envelope is in a new segment, it sets seg_start_val
to the most recently-returned scale value (last_scale
) and the envelope segment proceeds from there.
This is quite nice in that it subsumes the previous behavior of release segments (which started from wherever you had gotten to) and extends it to the attack segment of retriggered notes. If you want to always restart your attacks from 0, simply add a '0,0,'
prefix to your envelope spec.
This was to allow smooth retriggering of waveforms as suggested by @vijaymarupudi on Discord.