complex modulation matrix

Martin Beck's icon

Hello, I try to find a convenient way to create complex modulation matrices.
Unfortunately the [router] and [matrixctrl] objects don't provide what I am looking for. I have no experience with mc objects. So I describe in the following a feature request for [gen] and maybe someone can give me a hint on how to achieve this behaviour with existing objects.

Feature Request: Attribute for gen [gen @router N M] with the following behaviour:

a) creates N hot inputs and M outputs
b) parameters (param) are assigned with address (n,m) specifying the parameter's value for input n and output to m
c) for each input the code inside [gen] is evaluated and the result is routed to all outputs. Each output sums all N results.

Example:

Example: N = 3, M = 10 with two parameter matrices called gain and offset.

In this simple example the first output would be calculated by

output(0) =
input(0) * gain(0,0) + offset(0,0) +
input(1) * gain(1,0) + offset(1,0) +
input(2) * gain(2,0) + offset(2,0)

the second output would be calculated by
output(1) =
input(0) * gain(0,1) + offset(0,1) +
input(1) * gain(1,1) + offset(1,1) +
input(2) * gain(2,1) + offset(2,1)