Ok guys, I figured out how to reverse the playback but I am still having problems in driving the table input properly.
So first of all I want to summup what I want to achieve with this:
I want to create some kind of sampler/looper with live input. So I press a button, as long as the button is pressed live input ist being sampled and then retriggered by sequenced midi notes (or a sel sequ in axoloti).
I want to the playback of the samples to be either normal or in reverse. The recording and retriggering part was no problem so far.
I am struggling now with the phasor and reverse playback. So just to make sure I got it right:
The phasor reads through the table in audio samples (in samplerate), it should be a linear rising ramp that should go from 0 (start of the sample) to whatever value the samples ends.
With reverse playback it should start at the value the sample ends end go down all to zero.
Retriggering means retriggering this ramp.
Here are my two aproaches:
This is from Mood Organs looper. I realised that it reads length of the recording with a timer and then outputs a ramp between 0 and the end of the sample, just perfect for what I need. But how do I retrigger this?
This is a different aproach. Problem here is the lfo reads through the whole table instead of just the recorded part. For reverse this means it starts at the very end of the table rather then the end of the recording.
I would need to read the value where the recording stops (how long the sample is) and tell the lfo to just go to that value in forwards playback or to start at that value for reverse playback.