Adding @lookback to ampslice-based JIT onset detection?

Ah yeah, I have this patch somewhere.

Hmm, I guess I could keep track of a small amount of zero crossings then poke out the right-most one when an onset is detected but it’s probably expensive/overkill since I’m doing JIT based on onsets only.

I may just try mocking up a peek~-based version and then see how fast it is.

Do you happen to know how @lookback works in terms of the point it picks offhand? Like if there are multiple zero crossings will it take the later one (i.e. closest to the onset) or the first one it finds? And does it have wiggle room like if there’s a pure zero crossing present in the @lookback range, but then a 0.0001 much later, will it go with that instead?

the latency is incurred either way, so it doesn’t matter too much, but would be useful to match the behavior there.