Which kind of "recursive" trick is this in FlowStone?

For general discussion related FlowStone
Post Reply
Nowhk
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Which kind of "recursive" trick is this in FlowStone?

Post by Nowhk »

Watching and learning FS within complex project, I usually see "tricks" like this:

trick.png
trick.png (4.18 KiB) Viewed 9647 times

and I don't understand what in fact it does. If I try to "emulate" with greens, I get weird results:

trick-green.png
trick-green.png (12.36 KiB) Viewed 9647 times

- 0 is 0 (ok)
- when I write 1, I got 21.
- when I write 2, I got 42.
- when I write 3, I got 63.

why this results? What's the math over it? Also (most important): why if I put 0, it turn back to 0 instead of just "sum" 0? I don't know if greens are correct (red line), but seems to trigger values.

Can you help me to understand this magic? Thanks!

P.s. I'm a programmer, but really: FlowStone is really mysterious!!!
Last edited by Nowhk on Tue Jan 12, 2016 4:52 pm, edited 1 time in total.
Nowhk
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: Which kind of "recursive" trick is this in FlowStone?

Post by Nowhk »

It seems it append the sum of the two values at the end. For example, using 8. Its 8+8 (16) first, than append 8. The result in fact is 168. But using 11, it does 22 and append 11 from the second digit, so 231. Bug?

On Double its different. It seems to works correctly; here I got 10000:

Immagine.png
Immagine.png (28.73 KiB) Viewed 9641 times


and when "step" return to 0, the value remains on 10000, it doesn't change back to 0. That's strange and different from green...

Auto Recursion.fsm
(126.93 KiB) Downloaded 819 times
User avatar
nix
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: Which kind of "recursive" trick is this in FlowStone?

Post by nix »

Heya Nowhk,
If you take away the stream doubles, it will still work and make it a bit simpler.
It is a samplerate counter.
So the figure(usually 1) is fed back and added.
Usually it would be called feedback, and not recursion.
This is the version in primitives of your coded counter.

The float version throws the infinite loop cpu failsafe.
It has no particular speed to count at defined, while the stream one has the specified samplerate.

Cheers man, Nick
Nowhk
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: Which kind of "recursive" trick is this in FlowStone?

Post by Nowhk »

nix wrote:Heya Nowhk,
If you take away the stream doubles, it will still work and make it a bit simpler.
It is a samplerate counter.
So the figure(usually 1) is fed back and added.
Usually it would be called feedback, and not recursion.
This is the version in primitives of your coded counter.

I see, thank you. Watching the Sampler schematic, I got how it changes the "speed" making the step high or low (pitch). Absolutly not sure why it needs Int result and Frac one, maybe interpolation. But when Ive opened that module I got scared :lol: pos, weight, strange moltiplication...

nix wrote:The float version throws the infinite loop cpu failsafe.

Ah so its a sort of warning to tell us "be carefull, green are not good for feedback". But why 8 generate 168? :shock:

nix wrote:It has no particular speed to count at defined, while the stream one has the specified samplerate.

God bless streams in FlowStone: fast and sync :P I'm starting to get it...
Post Reply