Biasing a query

Kind of an old bump here, but I think this thread is the most relevant to this discussion/idea.

After getting some ok results using a regressor to use a short analysis window to predict a longer one I was wondering how to best implement this in a patch.

Ideally I would take the realtime audio input (analysis window of 256 samples) and compare this to the corresponding window in the corpus,

and also

use the regressor on the realtime input to predict a longer window and then use that longer window to query the longer window in the corpus… with less weight.

I was thinking that a “lofi” solution to this would be to concatenate the realtime input descriptors/stats (8d) with the predicted/regressed one (also 8d) into a 16d point which would get compared to a concatenated 16d for the corpus (8d of the first 256 samples, and 8d of the first 4410 samples).

But this would give me a 50/50 weighting between the “real” data, and the predicted one.

So I was wondering if I could just double up on the initial 8d by duplicating them so each point would have:

8d of first 256samples
8d of first 256samples (a literal duplicate)
8d of predicted 4410samples

and that would be used to query:

8d of first 256samples (of corpus)
8d of first 256samples (of corpus, a literal duplicate)
8d of first 4410samples (of corpus)

I was thinking I could also achieve similar results by scaling the 8d of the 4410 windows down, but there aren’t simple ways to transform a buffer this way on the fly (as far as I know). I was thinking I could perhaps do something weird like creating a fit using [fluid.normalize~ @min 0. @max 0.5] and then use that to transformpoint the corresponding realtime input, but not sure if that would behave as I would expect.

Any thoughts on this kind of “lofi” weighting?