< Back to IRCAM Forum

Expression controller one-dimensional only?

Hello Robert!

I am exploring the expression controller in an effort to test its functionalities.

I noticed that in Max-Modalys it only instantiate as a one-dimensional controller no matter its arguments.
Since many interesting functions (nonlinear, of course!) require multiple outputs it would be very beneficial if expression controller could be made to reflect it arguments when used as multi-in / multi-out.

See that patch for an example!

Best Hans Peter

07E-Expression-Controller-TEST.maxpat (13 KB)

Hi Hans Peter,

Looks like a bug!

Will be fixed soon…

Robert

Great! Of all my recent post this is the most important one.
Expression controller can have multiple output when final statement is [ output_1, output_2, … ]
Once its fixed I will supply a patch that demonstrates this feature.

Best Hans Peter

I will look into this and see how we can make sense of dimension > 1.
Dealing with explicit multidimensional controllers is not something that was originally planned in mlys, it seems.
Interesting.

R.

Hi Robert !

It seems this subject remains an issue to be solved in Modalys 3.4.5 (3b).
I am still only getting one dimensional expression controllers with the testing patch provided earlier on.
A shame! I hope this is solvable as it remains a very important feature of the expression controller.

Any news on this?

Best Hans Peter

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

Hi Hans Peter,

At first sight, methinks that the dimension of an expression controller should be automatic, i.e. based on the expression itself (the presence of the balanced enclosing brackets and commas). The (explicit) dimension argument should be removed.
What say you?

I am also looking into the connection issue with mlys.point-output objects.

Robert

Hi Hans Peter,

Multi-dimensional mlys.expression and combination with mlys.point-output now works :wink:

I wonder if it would make sense to also have multidimensional mlys.dynamic for instance?

Will publish 3.4.5.b4 today, promised!

Robert

Hi Hans Peter,

Multidimensionality should now work with the just uploaded 3.4.5.b4.

Thanks,
Robert