Processors and parameters/default values

Let’s say I want a processor that takes 2 streams, sums them, and outputs the result :

processor Addition
{
    input stream float in1, in2;
    output stream float out1;

    void run()
    {
       loop
       {
           out1 << in1 + in2;
           advance();
       }
    }
}

Now I want to modify my processor, so that if there is nothing connected
to the second input, then a default given value is added to the first input.
is there a way I can do that? should I have a different approach?

processor Addition (float defaultValToAdd)
{
    input stream float in1, in2;
    output stream float out1;
    ...?
}

Processors aren’t given any visibility over whether something is connected to a stream or not.

One of the bits of syntactic sugar that’s on our to-do list is to make it possible to connect a constant value to an endpoint in a graph, e.g.

graph Foo
{
    connection in -> node1.input1;
    connection 1.0f -> node1.input2;
}

But in the meantime you can get the same effect by connecting a little processor that just emits a constant, e.g.

processor EmitConstant (float value)
{
    output stream float out;
    void run() { loop { out << value; advance(); } }
}