I am trying to understand the rate at which the “fluid.onsetfeature~” generates output values. I was assuming that the output rate was determined by the Hop Size. I made this small MAX patch to analyze this point.

With the default setting: “fluid.onsetfeature~ @fftsettings 1024 512 -1”

I was expecting an onset feature value each 11.6 ms. But this seems to depend on the size of Signal and I/O vector size. If I set both vector sizes to 512 as the Hop size everything is fine. The print I am getting from the patch is:

print: 11.609977 241.88843

print: 11.609977 499.457685

print: 11.609977 135.080762

print: 11.609977 0.

print: 11.609977 -88.049114

print: 11.609977 -158.878539

print: 11.609977 -124.43916

print: 11.609977 -89.999782

print: 11.609977 -55.542309

print: 11.609977 -22.809686

print: 11.609977 -3.669806

print: 11.609977 -0.012383

The first value is the time interval and the second, the onset feature value.

But if I lower both vector sizes to 256 but keeping the Hop size to 512, I got different timings, sometimes with repetition and sometimes without.

print: 11.609977 0.

print: 11.609977 -88.049114

print: 11.609977 -88.049114

print: 5.804989 -132.999661

print: 5.804989 -132.999661

print: 5.804989 255.860709

print: 5.804989 255.860709

print: 5.804989 164.360588

print: 11.609977 0.

print: 11.609977 -96.658959

print: 11.609977 -176.098228

print: 5.804989 -176.098228

print: 5.804989 -141.658849

print: 5.804989 -141.658849

print: 11.609977 -72.780093

print: 11.609977 -38.332619

print: 11.609977 -11.084429

print: 11.609977 -11.084429

print: 5.804989 -0.532012

print: 5.804989 -0.532012

I was hoping that if I set the Hop size to 256 as well as the vector sizes to 256, everything was going to run smoothly creating a value at each 5.80 ms. But this is not what I get.

print: 5.804989 16.37757

print: 5.804989 241.88843

print: 5.804989 494.113026

print: 5.804989 0.

print: 11.609977 -113.878648

print: 11.609977 -96.658959

print: 11.609977 -88.049114

print: 5.804989 -79.439269

print: 5.804989 -70.829425

print: 5.804989 -62.21958

print: 5.804989 -53.609736

print: 5.804989 -36.390046

print: 11.609977 -19.152263

print: 11.609977 -3.657423

print: 11.609977 -0.532012

For my specific application, I would like to have low latency. So, I was willing to use vector sizes as low as 64. So here the results are even more chaotic (Hop size: 256, vector sizes 64)

print: 1.451247 -60.067119

print: 4.353741 -60.067119

print: 2.902494 -51.457274

print: 4.353741 -51.457274

print: 1.451247 -42.84743

print: 4.353741 -42.84743

print: 1.451247 -34.237585

print: 5.804989 -25.627741

print: 2.902494 -16.976876

print: 4.353741 -16.976876

print: 2.902494 -8.559195

print: 2.902494 -8.559195

print: 2.902494 -2.504547

print: 4.353741 -2.504547

I have the feeling that I am missing something and any help on understanding these timing and repetition issues would be very welcome.

Many thanks in advance.