Using the Analyser prim
Posted: Mon Jun 15, 2020 8:18 pm
I find that I've regularly used this basic technique to generate float arrays of all sorts .. interpolating various controls, making envelope & LFO shapes, writing waveforms and so on. Here's a very simple example :
A quick description for those who haven't seen it before ..
In this instance it runs the dsp code 32 times over. In the very first pass, stage(0), it does ALL of the calculating, and writes the 32 results into array[32]. Then, in each of the 32 passes, it reads out the contents of array[32] just one element at a time, 0 thru 31. Pretty darn fast of course, it does all this in a mere 0.7mS at 44.1kHz. (Calculating & loading the array[32] takes just 1 sample, ~0.02mS!).
I'm guessing the Analyser prim was originally intended just for test purposes, however this kind of stuff is a most useful second string to its bow, I know lots of people have used it like this, and I've often thought the name 'Analyser' a bit archain.
However it occurs to me, the Analyser must only ever read one SSE channel (presumably chan 0). But with some packing and unpacking it could in theory surely accomplish the same thing at x4 speed in just 8 passes, processing 4 numbers at a time?
This would obviously need some re-configuring of the prim (and maybe a new name to boot). If you think I'm of sound mind regarding this (don't answer that ..) should I perhaps suggest such a thing on the FS4 Slack forum? Unless there's already some other shortcut for doing this is there?
H
A quick description for those who haven't seen it before ..
In this instance it runs the dsp code 32 times over. In the very first pass, stage(0), it does ALL of the calculating, and writes the 32 results into array[32]. Then, in each of the 32 passes, it reads out the contents of array[32] just one element at a time, 0 thru 31. Pretty darn fast of course, it does all this in a mere 0.7mS at 44.1kHz. (Calculating & loading the array[32] takes just 1 sample, ~0.02mS!).
I'm guessing the Analyser prim was originally intended just for test purposes, however this kind of stuff is a most useful second string to its bow, I know lots of people have used it like this, and I've often thought the name 'Analyser' a bit archain.
However it occurs to me, the Analyser must only ever read one SSE channel (presumably chan 0). But with some packing and unpacking it could in theory surely accomplish the same thing at x4 speed in just 8 passes, processing 4 numbers at a time?
This would obviously need some re-configuring of the prim (and maybe a new name to boot). If you think I'm of sound mind regarding this (don't answer that ..) should I perhaps suggest such a thing on the FS4 Slack forum? Unless there's already some other shortcut for doing this is there?
H