2017-09-18 13:34 GMT-03:00 Shahrokh Yadegari <sdy@ucsd.edu>:
Dear Alexandre and all,
Miller and I both agree that it is better not to change the behavior of expr~ and fexpr~ in respect to requiring the first inlet to be a signal.
Let us just be clear. You mean the request to allow the first inlet to be a float or symbol variable (such as $f1 or $s1) rather than a signal ($v1 for expr~ and $x1[0] for fexpr~) - right?
I think this means it would be a bit confusing not to use the first inlet as a signal... Pd would allow signal connections to it that you'd then ignore in favor of the float or symbol value it gets sent.
Hmm, I see that now! Unlike secondary inlets, which would not allow a signal connection, the left/main inlet would still allow it. So this is a good reasoning... in fact it'd be better if it would not allow a signal inlet, and that would require too much surgery.
Anyway, I only brought it up cause it said so in the source code this could be considered in the future. So yeah, just leave it as it is and remove that remark from the source code.
However, I will look into why fexpr~ does not convert float to signal.
It's coz it doesn't have CLASS_MAINSIGNALIN in the setup method. But expr~ has it, so it converts floats to signals.
So I just added CLASS_MAINSIGNALIN(fexpr_tilde_class, t_expr, exp_f) to fexpr~'s setup and it worked fine.
Though now I think the class_addmethod(fexpr_tilde_class, nullfn, gensym("signal"), 0) is unnecessary, as well as it is not necessary for expr~. Well, you and Miller should know better, I must be the most ignorant object developer for Pd :)