Hi there!
I would like to explain a few more details about this issue. I hope it proves itself simple to solve!
I will refer to the patch posted earlier on. The patch demonstrates that :
The argument for the number of outputs that one gives to the mlys.expression is not reflected in the script.
The max object will instantiate with the correct number of inlets and outlets according to its initial arguments. So far it seems fine.
However looking to the generated script the dimension of the expression controller remains always 1. It must reflect the argument given to mlys.expression.
The provided patch generates this statement :
VanDenPol = make_controller(‘EXPRESSION’,1,0,’[inlet(2,1)*inlet(3,1),inlet(4,1)-inlet(1,1)]’,{w0,a,w,dt})
… where it should have should become :
VanDenPol = make_controller(‘EXPRESSION’,2,0,’[inlet(2,1)*inlet(3,1),inlet(4,1)-inlet(1,1)]’,{w0,a,w,dt})
As for the code expression itself it looks correct. So I think the issue is about how arguments supplied at initialisation in max is transferred to the script.
Sorry if this exposition was already clear. But I felt i need to clarify the task.
All the best Hans Peter