Low-pass filtering a 1D vector

Mattia Zanzi's icon

Hi! Hope someone can help me with this. For a Max for Live project, I have a vector (a huge jit.matrix with size 1x160000) of numbers between -1 and 1 (audio range). I want to use the content of this vector as an audio signal, to process in real-time with audio effects in Ableton Live. For example, I want to 'pass' the content of the vector through a low-pass filter in Live, and store the resulting samples into a different vector having the same size of the original one.

Now, the tricky thing is the following: I want this process to occur as quickly as possible. For instance, I don't need to hear the result of the low-pass filtering in real-time, I just want to get/store the resulting output - the low-pass filtered signal - as quickly as possible for further operations. Do you know a way to do this?

If, for example, I put the content of the input vector into a buffer, and I play the buffer 20X faster (if possible) through Ableton's filter, would the output vector the the 'low-pass filtered' version of the input vector, thus having the same size? Very importantly, I need to have a sort of value-to-value correspondence between the scalars of the input and the output vectors. Think to it as an image: you have an input image, you parse it through a filter, and you get an output image having the same dimensions of the previous one, and a pixel-to-pixel correspondance between the unprocessed and the processed images.

Thank you!

Dimitri Aatos's icon

Playing the content of a buffer faster would just skip some samples and result to a lower dimensional vector, I don't believe there is a way to do it in audio. If you are only interested in low-pass filtering you could try to recreate the audio filter in jitter with a custom blur, or use Java or Javascript for recreating the filter and run it faster. I suspect you are doing something more than visualising the audio, otherwise I would suggest to reduce the samples (dimensions) since no display will have enough pixels to display all samples.