Page 1 of 1

an Analyser misconception

Posted: Fri Feb 11, 2022 11:30 am
by HughBanton
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.

analyser test.fsm
(627 Bytes) Downloaded 755 times

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 :shock:

H

Re: an Analyser misconception

Posted: Fri Feb 11, 2022 11:41 am
by Spogg
Very useful insight Hugh, many thanks.

Re: an Analyser misconception

Posted: Fri Feb 11, 2022 12:08 pm
by nix
ooh ty Hugh- will try to understand
-just playing with analyzer now for rendering
..do you want to help- the project is open source

it's for rendering a recorder/renderer in stereo with float array conversion

-do you think float arrays could be processed more quickly using 'analyzer'?

bahaha- it's soo darn fast at making arrays
- how can I make the .wav stereo though?

omg omg- this is such a quick toy

Re: an Analyser misconception

Posted: Fri Feb 11, 2022 12:37 pm
by nix
here r some edits- making it longer and using a simpler and complexer counter==>
analyser test_little mods.fsm
(1.4 KiB) Downloaded 771 times


-can this be bent into the mythical green samplerate timing?

-omg-this is working wicked to render stereo fx

Re: an Analyser misconception

Posted: Fri Feb 11, 2022 2:13 pm
by nix
here's the tidied stereo normalizer,
which u can do any float array operations on,
then it renders as fast as cpu,
so vastly beyond realtime==>
stereo normalize_0_0.fsm
(6.75 KiB) Downloaded 797 times

Re: an Analyser misconception

Posted: Fri Feb 11, 2022 5:08 pm
by RJHollins
What FS version Nix ??

Re: an Analyser misconception

Posted: Fri Feb 11, 2022 6:07 pm
by nix
the latest 64 bit Alpha,
RJ mate