Right now (or at least the last time I looked at your code), it seems that even though pLevel is a float between 0.0 and 1.0, only those two values are relevant.
I think it would be interesting to make use of the intermediary values. Say tidal-looper is recording. At any given time, we have one sample coming from the input i, and one sample coming from the buffer b. The new value put in the buffer could be b * pLevel + b * (1 - pLevel). That way, pLevel = 0 is replace mode, while pLevel = 0.5 is like overdub (with an attenuation of the previous loop) and pLevel = 1.0 is regular playback.
Does it make sense?
Right now (or at least the last time I looked at your code), it seems that even though
pLevelis a float between0.0and1.0, only those two values are relevant.I think it would be interesting to make use of the intermediary values. Say tidal-looper is recording. At any given time, we have one sample coming from the input
i, and one sample coming from the bufferb. The new value put in the buffer could beb * pLevel + b * (1 - pLevel). That way,pLevel = 0is replace mode, whilepLevel = 0.5is like overdub (with an attenuation of the previous loop) andpLevel = 1.0is regular playback.Does it make sense?