Crude "realtime" time expansion - issue with playback head positioning

    Jun 06 2016 | 1:46 pm
    Here's a patcher for crude "realtime" time expansion. The idea is to expand the time on an incoming signal recorded into a circular buffer with a granular engine (of course, no time compression is not possible in real time). As the buffer is long, the recording head is supposed not to catch up with playback head on its next lap. When expansion factor goes to the no-expansion value (1.0), the playback head to catches up to the recording head. There's some room for improvement of course (intelligent segmentation, playback position randomizing...). However there is an issue: the playback head is often ahead the recording head instead of being behind. There's something with the wrapping I guess but I can't find where. Any idea?

    • Jun 24 2016 | 12:50 pm
      why are you translating sample value into phase ? I think it could be a source of problems. I think your wraping should start with 1, the first sample of the buffer, and not 0.
    • Jul 11 2016 | 7:18 am
      I thought sample's object demanded playback position to be expressed as phase but now I understand it can be expressed as samples, so indeed I can remove the samples-to-phase translation. However I don't agree for the wrapping, the first sample's position is 0, not 1.
    • Jul 11 2016 | 7:35 am
      I have made another correction, as using mstosamps to convert the current position within a grain doesn't go down to 0. So I have replaced the mstosamps with a "/ 1000." object followed by "* samplerate".
      However I haven't solved the main issue yet.
    • Jul 11 2016 | 8:02 am
      Issue solved. There was a calculation which didn't make sense in big codebox (see line #8).