soul-lang / SOUL

The SOUL programming language and API
Other
1.71k stars 96 forks source link

Integer `events` seems to be messed up #76

Open Jaytheway opened 2 years ago

Jaytheway commented 2 years ago

If you have a top graph input event of type int connected to a member processor input event of type int, the values passed in are not exactly what you'd expect.

dummy event is an input of a member processor, to which the main graph's input is connected. Here's the console output of the values from 0 to 10 sent from the Main graph to the connected member processor input event:

image

Main graph event:

event int Dummy [[name: "main graph", min: 0, max: 10, init: 5, step: 1]];

Dummy processor:

processor DummyProc
{
    input event int DummyEvent [[min: 0, max: 10, init: 4]];
    output event int DummyOut;

    event DummyEvent(int i)
    {
        console << "dummy event " << i <<"\n";
    }
}

Another small point, all of the events of the Main graph are automatically fired right after the patch compilation, I'm assuming it is to initialize the init values, even if the init value is not specified in annotations?