title: Web Audio synthesis: how to handle changing the filter cutoff during the attack or release phase?
body: <p>I'm building an emulation of the Roland Juno-106 synthesizer using WebAudio. <a href="http://stevegoldberg.neocities.org/#juno" rel="noreferrer">The live WIP version is here</a>.</p>
  
  <p>I'm hung up on how to deal with updating the filter if the cutoff frequency or envelope modulation amount are changed during the attack or release while the filter is simultaneously being modulated by the envelope. <a href="https://github.com/stevengoldberg/juno106/blob/master/js/vcf.js#L118" rel="noreferrer">That code is located around here</a>. The current implementation doesn't respond the way an analog synth would, but I can't quite figure out how to calculate it.</p>
  
  <p>On a real synth the filter changes immediately as determined by the frequency cutoff, envelope modulation amount, and current stage in the envelope, but the ramp up or down also continues smoothly.</p>
  
  <p>How would I model this behavior?</p>