Pierre,
There's probably a better way, but this works for what I need.
// bus with gains
gain(c) = R(c) with {
R((c,cl)) = R(c),R(cl);
R(1) = _;
R(0) = !;
//R(0) = !:0; // if you need to preserve the number of outputs
R(float(0)) = R(0);
R(float(1)) = R(1);
R(c) = *(c);
};
// n = number of inputs
// m = number of output
matrix(n,m) = par(i,n,_) <: par(i,m,gain(a(i)):>_);
a(0) = (0.5, -0.5, 1.1, 1.2,0);
a(1) = (1,2,3,4,-1);
a(2) = (0.5,0.5,0,0.25,1/3);
a(3) = (0,0,0,.1, sqrt(2));
process = matrix(5,4);
Aaron ([email protected])
Menlo Park, CA US
On Mon, Sep 22, 2014 at 8:12 AM, Pierre Lecomte <[email protected]>
wrote:
> Hello,
>
> I would like to know if there is a easy-way to perform matrix
> multiplication in FAUST :
>
> More precisely, I would like to multiply N input audio streams by a
> constant matrix (M x N) to obtain M output audio streams :
>
> a0 a1 a2 in1 out1
> a3 a4 a5 X in2 = out2
> in3
>
> I would like to avoid to explicitely write the matrix operation :
> out1 = a0 in1 + a1 in2 + a2 in3, etc.
>
> Thank you for your help
>
> Pierre
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Faudiostream-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>
>
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users