an Analyser misconception
Posted: Fri Feb 11, 2022 11:30 am
I confess the penny has only recently dropped ...
When using the Analyser prim for non-analysis things ( - personally I regularly employ the Analyser to create wave arrays, interpolations, control scales etc etc), you can write entirely normal-looking DSP code with stage(0) & stage(2) sections, the same as we can do when using DSP for stream purposes.
When DSP (or ASM) code is used normally in poly stream it is 'clocked' at your sample rate; stage(0) things are executed just once - at any Note_On - and then the stage(2) section is executed repeatedly, once per sample, at sample rate.
However, when you use such code with the Analyser it just goes for it all, flat out. See the attached - clearly if this was running at sample rate it would take the best part of 1 second to complete, whereas .... ah.
Bit of a clue here, actually, that you don't need to pull in an ASIO_out or DS_out to make this work - hence there IS NO sample rate. Doh!
This will be the reason that trying to connect any Analyser's code to a regular stream is prohibited. Obvious once the penny drops!
Anyway - probably the fastest single item we have in Flowstone
H
When using the Analyser prim for non-analysis things ( - personally I regularly employ the Analyser to create wave arrays, interpolations, control scales etc etc), you can write entirely normal-looking DSP code with stage(0) & stage(2) sections, the same as we can do when using DSP for stream purposes.
When DSP (or ASM) code is used normally in poly stream it is 'clocked' at your sample rate; stage(0) things are executed just once - at any Note_On - and then the stage(2) section is executed repeatedly, once per sample, at sample rate.
However, when you use such code with the Analyser it just goes for it all, flat out. See the attached - clearly if this was running at sample rate it would take the best part of 1 second to complete, whereas .... ah.
Bit of a clue here, actually, that you don't need to pull in an ASIO_out or DS_out to make this work - hence there IS NO sample rate. Doh!
This will be the reason that trying to connect any Analyser's code to a regular stream is prohibited. Obvious once the penny drops!
Anyway - probably the fastest single item we have in Flowstone
H