Adding @lookback to ampslice-based JIT onset detection?

And actually remembering the discussion in this thread about managing different edge cases for window analysis (mirroring, zero-padding, etc…) I’ve been thinking about this specifically:

Where at the moment I’m analyzing 7 frames, that have a lot of zero padding on each side. So I’m thinking of revisiting this idea of including the audio outside the 256 analysis window (dark green in that image).

The reason I bring this up is because if I’m offsetting the start of the window analysis to be more precise (using the fluid.ampgate~ / fluid.bufstats~ possibilities above), that it may be beneficial to center the onset such that the transient falls in the center of a hop.

So lets say my transient starts precisely on sample 100, instead of starting to analyze there, I would instead analyze {hop / 2} samples before that (so sample 68 in this case) so the transient falls exactly in the middle of a hop with the thinking that this would (potentially) ensure that the transient is best represented across all of the hops.

I guess that would mean that frame #2 (in the above screenshot) would no longer be “centered” but that geometric centering puts all the energy in the second half of the center (50-75% through that hop).