Variable audio delay

So now i’ve done a simple, filtering (or not) variable time and feedback simple audio delay vst. What i need now is to implement the time variation when the delay is doing his work. Like the ableton delay, you can change the delay time and the samples will change their delay time, also the previus samples recorded when the delay had another dl. time. My delay now do his work, but if i play a note whith a delay time, and then, i change del delay time, the note is playng with the first delay time and i don’t know how to make it changing.
I know i’ve not a perfect english, hope you’ll understend my question, thanks in advice for any answer, marco