how an empty node can produce a value?

For general discussion related FlowStone
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

how an empty node can produce a value?

Post by tester »

Looks that some sort of magic is going on.
Run audio.
I'm getting readouts out of the empty air and empty nodes.
??? :mrgreen:
Attachments
magic.fsm
(1.67 KiB) Downloaded 1008 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: how an empty node can produce a value?

Post by tester »

I have reduced the code to minimum. The same happens.
Attachments
magic2a.fsm
(1.06 KiB) Downloaded 982 times
magic2.fsm
(1.11 KiB) Downloaded 980 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: how an empty node can produce a value?

Post by tester »

Hmm... It looks serious. I tried to copy/paste the content of the code to new schematic and re-produced the same design. Readouts show activity from empty air. I have no idea what and why is happening, but looks like a bug.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: how an empty node can produce a value?

Post by Nubeat7 »

you need some input on the phase.. because you calculate with an input with no value
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: how an empty node can produce a value?

Post by tester »

It does not matters. Readout should not show anything, neither connected nor floating in the air. Besides as I said - I reduced the schematic to minimum in order to reproduce error.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: how an empty node can produce a value?

Post by Nubeat7 »

btw your osc isnt playing the right frquencies, it is playing the double freq, if you use

Code: Select all

ph = ph + freq*0.5

it should be fine, here is the corrected version with comparsion
Attachments
corrected switchosc.fsm
(6.03 KiB) Downloaded 987 times
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: how an empty node can produce a value?

Post by MyCo »

You are not allowed to write to a streamin variable. You code does:

Code: Select all

streamin ph;
ph = ph + freq;
ph = ph-(ph>=1&1);


ph is an input memory address, you are not allowed to reassign it.
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: how an empty node can produce a value?

Post by tester »

Nubeat7, yes, I know. It's a partial/fractional schematic, scaling is elsewhere.

MyCo, so how is that possible, that the initial design, commented by Trog - works?

I mean - should not be, that blue input node, not connected to anything - should have "input = 0" by default? Check this. When float is connected to ph (or whatever you rename it inside the code) - it works, when you disconnect it - the whole design starts to get sick. What I'm missing? How to make this ramp/triangle thing differently?
Attachments
triamp-error.fsm
(27.91 KiB) Downloaded 990 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: how an empty node can produce a value?

Post by MyCo »

You are not allowed to write to an input. That's all that I can tell you. It messes up the whole compiler code. Infact FS should throw a big red stop sign error message when someone tries to do something like this.
Sometimes it works, but as soon you have more stream processing everything goes crazy, because you overwrite outputs from previous modules with writing to an input.
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: how an empty node can produce a value?

Post by tester »

Okay, I read you, but on the other hand I admit - I have rather vague understanding about this thing. So let me rephrase the question. In the example above - what should be changed in the code, to make it work correct?

//edit:
This general issue drew attention of devs, so it's possible that the behavior will be corrected.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Post Reply