Brendan,
assuming that you want to have a reatime live looping audio quantization functionality for short percussive audio elements here are my thoughts:
This exercise is a lot about audio analysis to I would try to do this in GEN with CODEBOX code as you will need to do some programming.
If I were you I would try the following:
1. Quantization counter / grid: First of all you need a quantization grid. I would implement it this way: Let a counter continuously run from 0 to 441000. this would be 10 seconds of sound. This is your master quantization length. If you have a 4/4 time signature every 2.5 seconds there is a beat.
So this is the basis for the next step:
2. "Hit" & grid identification: As a precondition I would run another counter that counts from the beginning to the end of all the recordings. All audio that will come in will need to be recorded and analyzed. First step would be identifying the start and the end position of a "hit". Then when a certain audio threshold is reached the start position (counter position) would be stored. In addition you need to store the current position of the quantization counter (from step1). When the sound is fading out and the threshold is reached again the end position (counter position) of the "hit" is stored. So at the end of this you would have an array that looks like this:
sampleNumber, sampleStart, sampleEnd, gridPosition;
1 4500 25000 300000
3. Quantization:
Now the last step is pretty simple. You need to realign the sample start position according the grid. To do so you need to write a function that gets the start position as an input and provides the exact position according to the grid. Below you will find a piece of code that I was using already. So in this example variable a would be 441000 (as this would be your size of the quantization grid) and b would be 300000 (as this is the grid position for your "hit). If you feed this example in the Slave_Size is 330750 and this is also the position on the quantization grid.
// play slave loop
// calc slave size to match master size
a = Store_MasterLength;
b = Play_Length;
if (a > b) {
while (a > b) a = a / 2;
if (b > (a*1.5)) Size = a*2;
else Size = a;
}
else
if (a < b) {
while (a < b) a = a * 2;
if (b < (a*0.75)) Size = a/2;
else Size = a;
}
else if (a == b) Size = a;
Slave_Size = Size;
3. Writing the "hit" in the buffer: last step is to write the hit to the buffer. Now you have all the information needed: Take the audio from the buffer your recorded (positions are already known sample start 4500; sample end 25000) and write it to the quantized buffer from position 330750 onwards.
So you would need to get your hands dirty with gen and this will take some time but in my experience it can be done with gen programming.
BR
Jo