Hi, I've just started writing patches dealing with the MSP signal network. If Im understanding things correctly, Max gets permission to compute something every millisecond while MSP object act at a much faster rate. How do I make decisions and do complext operations at a faster rate (like every time a vector is computed)?
I've tried using large sequences of and, not & or obects but that won't work for my latest patch.
Basically I have a pfft~ subpatch which takes in two signals computes the similarity between each cartesian point associated with each bin.
The next part Im unsure how to do.
For each FFT frame I want to store the similarity of each bin in a data structure (perhaps a list of some sort) and sort the list by similarity.
Perhaps I could use a buffer (or some variant) to store the values, the values stored would then be sorted before the patch moves on to the next frame. Then the process starts again.
Here is a rough outline:
The basic idea is to swap cartesian points of the two signals based on similarity and a threshold of minimum similarity computed from the previous frame (so I can control what fraction of points get swapped).
You probably dont need to understand the whole reasoning behind the patch. I just need to know how to store the similarity values, sort them and pass a chosen value from the sorted list to be used in the next fft frame.
Thanks for any help you can offer.