_id
stringlengths 64
64
| repository
stringlengths 7
61
| name
stringlengths 5
45
| content
stringlengths 0
943k
| download_url
stringlengths 94
213
| language
stringclasses 1
value | comments
stringlengths 0
20.9k
| code
stringlengths 0
943k
|
---|---|---|---|---|---|---|---|
dc03e0594c681885e7d4d0692afcd0510850649dccf475250d061d1fcf9c0b62 | Rickr922/Faust-FDS | dampedStringAutoRoute.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
nPoints = 5;
L = 0.1; // String length [m]
//nPoints=int(L/h);
k = 1/48000;//1/ma.SR;
//Stability condition
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
T = 150; // Tension [N]
//T = hslider("Tension",150,10,1000,0.1);
radius = 3.5560e-04; // Radius (0.016 gauge) [m]
rho = 8.05*10^3; // Density [kg/m^3];
Area = ma.PI*radius^2; // Area of string section
I = (ma.PI*radius^4)/ 4; // Moment of Inertia
Emod = 174e4; // Young modulus [Pa]
K = sqrt(Emod*I/rho/Area); // Stiffness parameter
c = sqrt(T/rho/Area); // Wave speed
sigma1 = 0.01; // Frequency dependent damping
sigma0 = 0.0005;
//----------------------------------Equations--------------------------------//
nInputs = inputs(schemeMidPoint);
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
//west=left, east=right
schemeMidPoint(u_ww,u_w,u,u_e,u_ee,fIn) =
A*u + B*u' + C*(u_e+u_w) + D*(u_e'+u_w') + E*(u_ee+u_ww) + fIn;
schemeFixedPoint(u_ww,u_w,u,u_e,u_ee,fIn) = 0;
//----------------------------------Controls---------------------------------//
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,0.01);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
//----------------------------------Force---------------------------------//
forceModel = hit;
linInterp1DForce(i,inPoint,force) = force*select2(
i==int(inPoint), select2(i==int(inPoint+1),0,fraction),(1-fraction))
with
{
fraction = ma.frac(inPoint);
};
linInterp1D(selectedPoint,nPoints) = par(i,nPoints,_*select2(
i==int(selectedPoint), select2(i==int(selectedPoint+1),0,fraction),(1-fraction)))
with
{
fraction = ma.frac(outPoint);
};
//----------------------------------Output-------------------------------//
linInterp1DOut(outPoint,nPoints) = linInterp1D(outPoint,nPoints):>_;
//----------------------------------Build Model-------------------------------//
buildScheme(nPoints) = par (i, nPoints, schemeMidPoint);
/*schemeFixedPoint,
par (i, nPoints-2, schemeMidPoint),
schemeFreePointEast;*/
routing(nPoints,nInputs) = route(nPoints+nPoints, nPoints*nInputs,
par(x, nPoints, connections(x)))
with
{
connections(x) = par(i, nInputs-1, U(x),I(x-spaceDepX+i,nInputs-2-i)),
U(x)+nPoints, I(x,nInputs-1);
U(x) = x+1;
I(x,j) = (1 + j + (x*nInputs)) * (x>=0) * (x<nPoints);
spaceDepX = (nInputs - 2)/2;
};
model(nPoints) = (routing(nPoints,nInputs) : buildScheme(nPoints)) ~
(par(i, nPoints, _*(stop==0)));
process = forceModel<:linInterp1D(inPoint,nPoints): model(nPoints):linInterp1DOut(outPoint,nPoints)<:_,_;
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/newRoute/dampedString/dampedStringAutoRoute.dsp | faust | --------------------------------Model Settings-----------------------------//
String length [m]
nPoints=int(L/h);
1/ma.SR;
Stability condition
Tension [N]
T = hslider("Tension",150,10,1000,0.1);
Radius (0.016 gauge) [m]
Density [kg/m^3];
Area of string section
Moment of Inertia
Young modulus [Pa]
Stiffness parameter
Wave speed
Frequency dependent damping
----------------------------------Equations--------------------------------//
west=left, east=right
----------------------------------Controls---------------------------------//
----------------------------------Force---------------------------------//
----------------------------------Output-------------------------------//
----------------------------------Build Model-------------------------------//
schemeFixedPoint,
par (i, nPoints-2, schemeMidPoint),
schemeFreePointEast; | import("stdfaust.lib");
nPoints = 5;
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
sigma0 = 0.0005;
nInputs = inputs(schemeMidPoint);
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
schemeMidPoint(u_ww,u_w,u,u_e,u_ee,fIn) =
A*u + B*u' + C*(u_e+u_w) + D*(u_e'+u_w') + E*(u_ee+u_ww) + fIn;
schemeFixedPoint(u_ww,u_w,u,u_e,u_ee,fIn) = 0;
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,0.01);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
forceModel = hit;
linInterp1DForce(i,inPoint,force) = force*select2(
i==int(inPoint), select2(i==int(inPoint+1),0,fraction),(1-fraction))
with
{
fraction = ma.frac(inPoint);
};
linInterp1D(selectedPoint,nPoints) = par(i,nPoints,_*select2(
i==int(selectedPoint), select2(i==int(selectedPoint+1),0,fraction),(1-fraction)))
with
{
fraction = ma.frac(outPoint);
};
linInterp1DOut(outPoint,nPoints) = linInterp1D(outPoint,nPoints):>_;
buildScheme(nPoints) = par (i, nPoints, schemeMidPoint);
routing(nPoints,nInputs) = route(nPoints+nPoints, nPoints*nInputs,
par(x, nPoints, connections(x)))
with
{
connections(x) = par(i, nInputs-1, U(x),I(x-spaceDepX+i,nInputs-2-i)),
U(x)+nPoints, I(x,nInputs-1);
U(x) = x+1;
I(x,j) = (1 + j + (x*nInputs)) * (x>=0) * (x<nPoints);
spaceDepX = (nInputs - 2)/2;
};
model(nPoints) = (routing(nPoints,nInputs) : buildScheme(nPoints)) ~
(par(i, nPoints, _*(stop==0)));
process = forceModel<:linInterp1D(inPoint,nPoints): model(nPoints):linInterp1DOut(outPoint,nPoints)<:_,_;
|
79506c62d8c73a0a880cc65b68bba52ac90d7cf4ccab682e7ca8118240f9ef64 | Rickr922/Faust-FDS | 2dWave.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
k = 1/ma.SR;
c = 344;
h = c * k*sqrt(2);
nPointsX = 3;
nPointsY = 3;
lambda = c*k/h;
A = lambda*lambda;
B = 2*(1-2*lambda*lambda);
C = -1;
midCoeff = 0,A,0,
A,B,A,
0,A,0;
midCoeffDelay1 = 0,0,0,
0,C,0,
0,0,0;
r=1;
t=1;
coefficients = midCoeff,midCoeffDelay1;
scheme(pointsX,pointsY) = par (i, pointsX,
par(j,pointsY, coefficients));
//----------------------------------Controls---------------------------------//
inPointX=hslider("input point x", floor(nPointsX/2),0,nPointsX-1,0.01);
inPointY=hslider("input point y", floor(nPointsY/2),0,nPointsY-1,0.01);
outPointX=hslider("output point x",floor(nPointsX/2),0,nPointsX-1,0.01);
outPointY=hslider("output point y",floor(nPointsY/2),0,nPointsY-1,0.01);
hit = button("play");
stop = button("Stop");
//----------------------------------Library---------------------------------//
schemePoint2D(R,T,fIn) = coeffs,neighbors<:
sum(t,T+1,
sum(i,nNeighbors,
ba.selector(int(i+t*nNeighbors),nNeighbors*(T+1),coeffs)*
ba.selector(i,nNeighbors,neighbors)@(t)))
+ fIn
with
{
nNeighbors = (2*R+1)^2;
neighbors = si.bus(nNeighbors);
coeffs=si.bus(nNeighbors*(T+1));
};
buildScheme2D(R,T,pointsX,pointsY) =
par (x, pointsX,
par(y,pointsY, schemePoint2D(R,T)));
//----------------------------------Interpolation---------------------------------//
linInterpolation2D(X,Y,pointX,pointY) =
par(i,X,
par(j,Y,_*
select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY))))
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
//----------------------------------Force---------------------------------//
forceModel = hit:ba.impulsify;
stairsForce(X,Y,pointX,pointY) = ba.selectoutn(X*Y,pointY+pointX*Y);
//----------------------------------Output-------------------------------//
stairsOutput(X,Y,pointX,pointY) = ba.selectn(X*Y,pointY+pointX*Y);
linInterpolation2DOut(X,Y,pointX,pointY) = linInterpolation2D(X,Y,pointX,pointY):>_;
//----------------------------------Build Model-------------------------------//
//nInputs = inputs(schemeMidPoint);
route2D(X, Y, R, T) = route(nPoints*2+nPoints*nCoeffs, nPoints*nInputs,
par(x, X, par(y, Y, connections(x,y))))
with
{
connections(x,y) = par(k,nCoeffs,nPoints+(x*Y+y)*nCoeffs+k+1,C(x,y,k+1)),
P(x,y) + nPoints + nCoeffs*nPoints, C(x,y,0),
par(j,nNeighborsXY,
par(i,nNeighborsXY,
P(x,y),C(x+i-R,y+j-R,nInputs-1-(i*nNeighborsXY+j))));
P(x,y) = x*Y+y+1;
C(x,y,count) = (1 + count + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
nNeighborsXY = 2*R+1;
nNeighbors = nNeighborsXY^2;
nCoeffs = nNeighbors*(T+1);
nInputs = nNeighbors+1+nCoeffs;
nPoints = X*Y;
};
model(X,Y,r,t) =
(route2D(X,Y,r,t) : buildScheme2D(r,t,X,Y)) ~ par(i,X*Y,_*(stop==0));
process = scheme(nPointsX,nPointsY),(forceModel<:linInterpolation2D(nPointsX,nPointsY,inPointX,inPointY)):model(nPointsX,nPointsY,r,t):linInterpolation2DOut(nPointsX,nPointsY,outPointX,outPointY);
//process = coefficients,10,par(i,9,i):schemePoint2D(1,1);
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/caRoute/2dWave/2dWave.dsp | faust | --------------------------------Model Settings-----------------------------//
----------------------------------Controls---------------------------------//
----------------------------------Library---------------------------------//
----------------------------------Interpolation---------------------------------//
----------------------------------Force---------------------------------//
----------------------------------Output-------------------------------//
----------------------------------Build Model-------------------------------//
nInputs = inputs(schemeMidPoint);
process = coefficients,10,par(i,9,i):schemePoint2D(1,1); | import("stdfaust.lib");
k = 1/ma.SR;
c = 344;
h = c * k*sqrt(2);
nPointsX = 3;
nPointsY = 3;
lambda = c*k/h;
A = lambda*lambda;
B = 2*(1-2*lambda*lambda);
C = -1;
midCoeff = 0,A,0,
A,B,A,
0,A,0;
midCoeffDelay1 = 0,0,0,
0,C,0,
0,0,0;
r=1;
t=1;
coefficients = midCoeff,midCoeffDelay1;
scheme(pointsX,pointsY) = par (i, pointsX,
par(j,pointsY, coefficients));
inPointX=hslider("input point x", floor(nPointsX/2),0,nPointsX-1,0.01);
inPointY=hslider("input point y", floor(nPointsY/2),0,nPointsY-1,0.01);
outPointX=hslider("output point x",floor(nPointsX/2),0,nPointsX-1,0.01);
outPointY=hslider("output point y",floor(nPointsY/2),0,nPointsY-1,0.01);
hit = button("play");
stop = button("Stop");
schemePoint2D(R,T,fIn) = coeffs,neighbors<:
sum(t,T+1,
sum(i,nNeighbors,
ba.selector(int(i+t*nNeighbors),nNeighbors*(T+1),coeffs)*
ba.selector(i,nNeighbors,neighbors)@(t)))
+ fIn
with
{
nNeighbors = (2*R+1)^2;
neighbors = si.bus(nNeighbors);
coeffs=si.bus(nNeighbors*(T+1));
};
buildScheme2D(R,T,pointsX,pointsY) =
par (x, pointsX,
par(y,pointsY, schemePoint2D(R,T)));
linInterpolation2D(X,Y,pointX,pointY) =
par(i,X,
par(j,Y,_*
select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY))))
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
forceModel = hit:ba.impulsify;
stairsForce(X,Y,pointX,pointY) = ba.selectoutn(X*Y,pointY+pointX*Y);
stairsOutput(X,Y,pointX,pointY) = ba.selectn(X*Y,pointY+pointX*Y);
linInterpolation2DOut(X,Y,pointX,pointY) = linInterpolation2D(X,Y,pointX,pointY):>_;
route2D(X, Y, R, T) = route(nPoints*2+nPoints*nCoeffs, nPoints*nInputs,
par(x, X, par(y, Y, connections(x,y))))
with
{
connections(x,y) = par(k,nCoeffs,nPoints+(x*Y+y)*nCoeffs+k+1,C(x,y,k+1)),
P(x,y) + nPoints + nCoeffs*nPoints, C(x,y,0),
par(j,nNeighborsXY,
par(i,nNeighborsXY,
P(x,y),C(x+i-R,y+j-R,nInputs-1-(i*nNeighborsXY+j))));
P(x,y) = x*Y+y+1;
C(x,y,count) = (1 + count + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
nNeighborsXY = 2*R+1;
nNeighbors = nNeighborsXY^2;
nCoeffs = nNeighbors*(T+1);
nInputs = nNeighbors+1+nCoeffs;
nPoints = X*Y;
};
model(X,Y,r,t) =
(route2D(X,Y,r,t) : buildScheme2D(r,t,X,Y)) ~ par(i,X*Y,_*(stop==0));
process = scheme(nPointsX,nPointsY),(forceModel<:linInterpolation2D(nPointsX,nPointsY,inPointX,inPointY)):model(nPointsX,nPointsY,r,t):linInterpolation2DOut(nPointsX,nPointsY,outPointX,outPointY);
|
60347fe4727dc8d7789629bc2e6901e8d3ddfb58736c6acabfe51d0716708da5 | Rickr922/Faust-FDS | ControllableNonPhysicalString.dsp | import("stdfaust.lib");
/*DISCLAMER:
This is a creative "non physical" finite difference scheme physical model
of a string, intended to show how changing the different physical
parameters has an impact on the sounding characteristics of the string.
I have to say that to make things physically correct, the number of
string points should change according to the variations of each
parameter. However, this cannot be done at run time, so physically
correct models can become a bit boring. You can use this model to
get an idea on how the parameters work, and then try with values even
outside these sliders range, to explore new sounds.
Beware that, being non physical, some parameters configurations could
blow up the model. In case that happens, simply re-run the program
to reset the dsp.
Have fun!
*/
declare name "ControllableNonPhysicalString";
declare description "Linear string model with controllable (non physical) parameters.";
declare author "Riccardo Russo";
//----------------------------------String Settings---------------------------//
//nPoints=int(Length/h);
nPoints = 100;
k = 1/ma.SR;
//Stability condition
coeff = c^2*k^2 + 4*sigma1*k;
h = sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
T = hslider("[4]String Tension (N)", 150,20,1000,0.1); // Tension [N]
radius = hslider("[5]String Radius (m)", 3.6e-04,2e-5,1e-3,0.00001); // Radius (0.016 gauge) [m]
rho = hslider("[6]String Material Density (kg/m^3)", 8.05*10^3,1e1,1e6,1); // Density [kg/m^3];
Emod = hslider("[7]String Young Modulus (Pa)",174e4,1e-3,1e8,1); // Young modulus [Pa]
Area = ma.PI*radius^2; // Area of string section
I = (ma.PI*radius^4)/ 4; // Moment of Inertia
K = sqrt(Emod*I/rho/Area); // Stiffness parameter
c = sqrt(T/rho/Area); // Wave speed
sigma1 = hslider("[9]Frequency Dependent Damping", 0.01,1e-5,1,0.0001); // Frequency dependent damping
sigma0 = hslider("[8]Damping", 0.0005,1e-6,100,0.0001); // Frequency independent damping
//----------------------------------Equations--------------------------------//
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2-6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2+4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = -K^2*k^2/den/h^4;
midCoeff = E,C,A,C,E;
midCoeffDel = 0,D,B,D,0;
r = 2;
t = 1;
scheme(points) = par(i,points,midCoeff,midCoeffDel);
//----------------------------------Controls---------------------------------//
play = button("[3]Play");
inPoint = hslider("[1]Input Point",floor(nPoints/2),0,nPoints-1,0.01);
outPoint = hslider("[2]Output Point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
//----------------------------------Force---------------------------------//
forceModel = play:ba.impulsify;
//----------------------------------Process---------------------------------//
process = forceModel<:fd.linInterp1D(nPoints,inPoint):
fd.model1D(nPoints,r,t,scheme(nPoints)):
fd.linInterp1DOut(nPoints,outPoint)<:_,_; | https://raw.githubusercontent.com/Rickr922/Faust-FDS/ead5c05c0eced6ed111dcfd8eeea14d313f74ef6/library/CorrectExamples/ControllableNonPhysicalString.dsp | faust | DISCLAMER:
This is a creative "non physical" finite difference scheme physical model
of a string, intended to show how changing the different physical
parameters has an impact on the sounding characteristics of the string.
I have to say that to make things physically correct, the number of
string points should change according to the variations of each
parameter. However, this cannot be done at run time, so physically
correct models can become a bit boring. You can use this model to
get an idea on how the parameters work, and then try with values even
outside these sliders range, to explore new sounds.
Beware that, being non physical, some parameters configurations could
blow up the model. In case that happens, simply re-run the program
to reset the dsp.
Have fun!
----------------------------------String Settings---------------------------//
nPoints=int(Length/h);
Stability condition
Tension [N]
Radius (0.016 gauge) [m]
Density [kg/m^3];
Young modulus [Pa]
Area of string section
Moment of Inertia
Stiffness parameter
Wave speed
Frequency dependent damping
Frequency independent damping
----------------------------------Equations--------------------------------//
----------------------------------Controls---------------------------------//
----------------------------------Force---------------------------------//
----------------------------------Process---------------------------------//
| import("stdfaust.lib");
declare name "ControllableNonPhysicalString";
declare description "Linear string model with controllable (non physical) parameters.";
declare author "Riccardo Russo";
nPoints = 100;
k = 1/ma.SR;
coeff = c^2*k^2 + 4*sigma1*k;
h = sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2-6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2+4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = -K^2*k^2/den/h^4;
midCoeff = E,C,A,C,E;
midCoeffDel = 0,D,B,D,0;
r = 2;
t = 1;
scheme(points) = par(i,points,midCoeff,midCoeffDel);
play = button("[3]Play");
inPoint = hslider("[1]Input Point",floor(nPoints/2),0,nPoints-1,0.01);
outPoint = hslider("[2]Output Point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
forceModel = play:ba.impulsify;
process = forceModel<:fd.linInterp1D(nPoints,inPoint):
fd.model1D(nPoints,r,t,scheme(nPoints)):
fd.linInterp1DOut(nPoints,outPoint)<:_,_; |
6ae2da798a26a18880f527f56ce9604144795bdb95ebce197aeb3243528ea2ef | Rickr922/Faust-FDS | thinPlateNewSchemePoint.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
k = 1/ma.SR;
K = 20;
s0 = 2;
s1 = 0.05;
c=344;
coeff = c^2*k^2+4*s1*k;
h = sqrt((coeff+sqrt(coeff*coeff+16*K*K*k*k)));
nPointsX = 5;
nPointsY = 5;
lambda = c*k/h;
//----------------------------------Equations--------------------------------//
mu=K*K*k*k/(h^4);
den = 1+s0*k;
A = 2*(1-10*mu-2*lambda*lambda-4*s1*k*k)/den;
B = (s0*k+4*k*k-1)/den;
C = (8*mu + lambda*lambda + 2*s1*k*k)/den;
D = -2*mu/den;
E = -mu/den;
F = -2*s1*k*k/den;
midCoeff = 0,0,E,0,0,
0,D,C,D,0,
E,C,A,C,E,
0,D,C,D,0,
0,0,E,0,0;
midCoeffDelay1 = 0,0,0,0,0,
0,0,F,0,0,
0,F,B,F,0,
0,0,F,0,0,
0,0,0,0,0;
r=2;
t=1;
coefficients = midCoeff,midCoeffDelay1;
scheme(pointsX,pointsY) = par (i, pointsX,
par(j,pointsY, coefficients));
//----------------------------------Controls---------------------------------//
inPointX=hslider("input point x", floor(nPointsX/2),0,nPointsX-1,0.01);
inPointY=hslider("input point y", floor(nPointsY/2),0,nPointsY-1,0.01);
outPointX=hslider("output point x",floor(nPointsX/2),0,nPointsX-1,0.01);
outPointY=hslider("output point y",floor(nPointsY/2),0,nPointsY-1,0.01);
hit = button("play");
//----------------------------------Library---------------------------------//
schemePoint2D(R,T) = routing:operations:>_
with
{
nNeighbors = (2*R+1)^2;
routing =
route(nNeighbors*(T+1)+nNeighbors+1,2*nNeighbors*(T+1)+1,
(1,1),
par(t,T+1,
par(i,nNeighbors,i+t*nNeighbors+2,2*(i+t*nNeighbors)+3,
i+nNeighbors*(T+1)+2,2*(i+t*nNeighbors)+2)));
operations = _,par(t,T+1,
par(i,nNeighbors,(_@t),_:*));
};
buildScheme2D(pointsX,pointsY,R,T) =
par (x, pointsX,
par(y,pointsY, schemePoint2D(R,T)));
//----------------------------------Interpolation---------------------------------//
linInterpolation2D(X,Y,pointX,pointY) =
par(i,X,
par(j,Y,_*
select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY))))
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
//----------------------------------Force---------------------------------//
forceModel = hit:ba.impulsify;
stairsForce(X,Y,pointX,pointY) = ba.selectoutn(X*Y,pointY+pointX*Y);
//----------------------------------Output-------------------------------//
stairsOutput(X,Y,pointX,pointY) = ba.selectn(X*Y,pointY+pointX*Y);
linInterpolation2DOut(X,Y,pointX,pointY) = linInterpolation2D(X,Y,pointX,pointY):>_;
//----------------------------------Build Model-------------------------------//
route2D(X, Y, R, T) = route(nPoints*2+nPoints*nCoeffs, nPoints*nInputs,
par(x, X, par(y, Y, connections(x,y))))
with
{
connections(x,y) = P(x,y) + nPoints, C(x,y,0),
par(k,nCoeffs,(x*Y+y)*nCoeffs+k+1,C(x,y,k+1)),
par(j,nNeighborsXY,
par(i,nNeighborsXY,
P(x,y),C(x+i-R,y+j-R,nInputs-1-(i*nNeighborsXY+j))));
P(x,y) = x*Y+y+1 + nCoeffs*nPoints;
C(x,y,count) = (1 + count + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
nNeighborsXY = 2*R+1;
nNeighbors = nNeighborsXY^2;
nCoeffs = nNeighbors*(T+1);
nInputs = nNeighbors+1+nCoeffs;
nPoints = X*Y;
};
model2D(X,Y,r,t,scheme) =
(route2D(X,Y,r,t,scheme) : buildScheme2D(X,Y,r,t)) ~ si.bus(X*Y);
process =
forceModel<:linInterpolation2D(nPointsX,nPointsY,inPointX,inPointY):
model2D(nPointsX,nPointsY,r,t,scheme(nPointsX,nPointsY)):
linInterpolation2DOut(nPointsX,nPointsY,outPointX,outPointY);
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/caRoute/thinPlate/thinPlateNewSchemePoint.dsp | faust | --------------------------------Model Settings-----------------------------//
----------------------------------Equations--------------------------------//
----------------------------------Controls---------------------------------//
----------------------------------Library---------------------------------//
----------------------------------Interpolation---------------------------------//
----------------------------------Force---------------------------------//
----------------------------------Output-------------------------------//
----------------------------------Build Model-------------------------------// | import("stdfaust.lib");
k = 1/ma.SR;
K = 20;
s0 = 2;
s1 = 0.05;
c=344;
coeff = c^2*k^2+4*s1*k;
h = sqrt((coeff+sqrt(coeff*coeff+16*K*K*k*k)));
nPointsX = 5;
nPointsY = 5;
lambda = c*k/h;
mu=K*K*k*k/(h^4);
den = 1+s0*k;
A = 2*(1-10*mu-2*lambda*lambda-4*s1*k*k)/den;
B = (s0*k+4*k*k-1)/den;
C = (8*mu + lambda*lambda + 2*s1*k*k)/den;
D = -2*mu/den;
E = -mu/den;
F = -2*s1*k*k/den;
midCoeff = 0,0,E,0,0,
0,D,C,D,0,
E,C,A,C,E,
0,D,C,D,0,
0,0,E,0,0;
midCoeffDelay1 = 0,0,0,0,0,
0,0,F,0,0,
0,F,B,F,0,
0,0,F,0,0,
0,0,0,0,0;
r=2;
t=1;
coefficients = midCoeff,midCoeffDelay1;
scheme(pointsX,pointsY) = par (i, pointsX,
par(j,pointsY, coefficients));
inPointX=hslider("input point x", floor(nPointsX/2),0,nPointsX-1,0.01);
inPointY=hslider("input point y", floor(nPointsY/2),0,nPointsY-1,0.01);
outPointX=hslider("output point x",floor(nPointsX/2),0,nPointsX-1,0.01);
outPointY=hslider("output point y",floor(nPointsY/2),0,nPointsY-1,0.01);
hit = button("play");
schemePoint2D(R,T) = routing:operations:>_
with
{
nNeighbors = (2*R+1)^2;
routing =
route(nNeighbors*(T+1)+nNeighbors+1,2*nNeighbors*(T+1)+1,
(1,1),
par(t,T+1,
par(i,nNeighbors,i+t*nNeighbors+2,2*(i+t*nNeighbors)+3,
i+nNeighbors*(T+1)+2,2*(i+t*nNeighbors)+2)));
operations = _,par(t,T+1,
par(i,nNeighbors,(_@t),_:*));
};
buildScheme2D(pointsX,pointsY,R,T) =
par (x, pointsX,
par(y,pointsY, schemePoint2D(R,T)));
linInterpolation2D(X,Y,pointX,pointY) =
par(i,X,
par(j,Y,_*
select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY))))
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
forceModel = hit:ba.impulsify;
stairsForce(X,Y,pointX,pointY) = ba.selectoutn(X*Y,pointY+pointX*Y);
stairsOutput(X,Y,pointX,pointY) = ba.selectn(X*Y,pointY+pointX*Y);
linInterpolation2DOut(X,Y,pointX,pointY) = linInterpolation2D(X,Y,pointX,pointY):>_;
route2D(X, Y, R, T) = route(nPoints*2+nPoints*nCoeffs, nPoints*nInputs,
par(x, X, par(y, Y, connections(x,y))))
with
{
connections(x,y) = P(x,y) + nPoints, C(x,y,0),
par(k,nCoeffs,(x*Y+y)*nCoeffs+k+1,C(x,y,k+1)),
par(j,nNeighborsXY,
par(i,nNeighborsXY,
P(x,y),C(x+i-R,y+j-R,nInputs-1-(i*nNeighborsXY+j))));
P(x,y) = x*Y+y+1 + nCoeffs*nPoints;
C(x,y,count) = (1 + count + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
nNeighborsXY = 2*R+1;
nNeighbors = nNeighborsXY^2;
nCoeffs = nNeighbors*(T+1);
nInputs = nNeighbors+1+nCoeffs;
nPoints = X*Y;
};
model2D(X,Y,r,t,scheme) =
(route2D(X,Y,r,t,scheme) : buildScheme2D(X,Y,r,t)) ~ si.bus(X*Y);
process =
forceModel<:linInterpolation2D(nPointsX,nPointsY,inPointX,inPointY):
model2D(nPointsX,nPointsY,r,t,scheme(nPointsX,nPointsY)):
linInterpolation2DOut(nPointsX,nPointsY,outPointX,outPointY);
|
440a47e0068d79e20404d57b8a836b0dba31a72f5086528fd8ddb03a45d56a92 | Rickr922/Faust-FDS | stringDampedInOutSelector.dsp | import("stdfaust.lib");
/*Number of points: 19*/
k = 1/ma.SR;
c = 344;
h = c*k;
s0 = 1000;
nPoints = 19;
C1 = 1+(2*s0*k*k/h);
C2 = (2*s0*k*k/h)-1;
lambda = c*k/h;
//------------------------------------------Equations--------------------------
nSpatialDependency = 2; //n° of spatial side points needed by the update eq
stringDampMidPoint(fIn, uSide_l, uSide_r) = u //u_(l-1)=uSide_l, u_(l+1)=uSide_
letrec
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*(uSide_l+uSide_r)/C1 + fIn;
}<:par(i,nSpatialDependency,_);
stringDampFreePoint(fIn,uSide) = u
letrec
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide/C1 + fIn;
}<:par(i,nSpatialDependency-1,_);
fixedPoint(fIn,uSide) = par(i,nSpatialDependency-1,0);
//----------------------------------------Controls-----------------------------
hit = button("hit"):ba.impulsify;
inPoint=hslider("input point", 9,0,nPoints-1,1);
outPoint=hslider("output point",5,0,(nPoints*nSpatialDependency-2)/nSpatialDependency,1);
//because every module has 2 outs, except
//the boundaries-> -2
//-----------------------------------------Model------------------------------
model =
(route((nPoints*nSpatialDependency-2+nPoints),(nPoints*nSpatialDependency-2+nPoints),
//Feedback connections
(1,4),
(2,2),(3,7),
(4,5),(5,10),
(6,8),(7,13),
(8,11),(9,16),
(10,14),(11,19),
(12,17),(13,22),
(14,20),(15,25),
(16,23),(17,28),
(18,26),(19,31),
(20,29),(21,34),
(22,32),(23,37),
(24,35),(25,40),
(26,38),(27,43),
(28,41),(29,46),
(30,44),(31,49),
(32,47),(33,52),
(34,50),(35,55),
(36,53),
//Force connections
(37,1),(38,3),(39,6),(40,9),(41,12),(42,15),(43,18),(44,21),(45,24),(46,27),(47,30),(48,33),(49,36),(50,39),(51,42),(52,45),(53,48),(54,51),(55,54)):
stringDampFreePoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
fixedPoint)~par(i, (nPoints*nSpatialDependency-2), _):
_,par(i,nPoints-2,!,_),_:ba.selectn(nPoints,outPoint);
process = hit:ba.selectoutn(nPoints,inPoint):model<:_,_;
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/oldRoute/stringDamped/stringDampedInOutSelector.dsp | faust | Number of points: 19
------------------------------------------Equations--------------------------
n° of spatial side points needed by the update eq
u_(l-1)=uSide_l, u_(l+1)=uSide_
----------------------------------------Controls-----------------------------
because every module has 2 outs, except
the boundaries-> -2
-----------------------------------------Model------------------------------
Feedback connections
Force connections | import("stdfaust.lib");
k = 1/ma.SR;
c = 344;
h = c*k;
s0 = 1000;
nPoints = 19;
C1 = 1+(2*s0*k*k/h);
C2 = (2*s0*k*k/h)-1;
lambda = c*k/h;
letrec
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*(uSide_l+uSide_r)/C1 + fIn;
}<:par(i,nSpatialDependency,_);
stringDampFreePoint(fIn,uSide) = u
letrec
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide/C1 + fIn;
}<:par(i,nSpatialDependency-1,_);
fixedPoint(fIn,uSide) = par(i,nSpatialDependency-1,0);
hit = button("hit"):ba.impulsify;
inPoint=hslider("input point", 9,0,nPoints-1,1);
outPoint=hslider("output point",5,0,(nPoints*nSpatialDependency-2)/nSpatialDependency,1);
model =
(route((nPoints*nSpatialDependency-2+nPoints),(nPoints*nSpatialDependency-2+nPoints),
(1,4),
(2,2),(3,7),
(4,5),(5,10),
(6,8),(7,13),
(8,11),(9,16),
(10,14),(11,19),
(12,17),(13,22),
(14,20),(15,25),
(16,23),(17,28),
(18,26),(19,31),
(20,29),(21,34),
(22,32),(23,37),
(24,35),(25,40),
(26,38),(27,43),
(28,41),(29,46),
(30,44),(31,49),
(32,47),(33,52),
(34,50),(35,55),
(36,53),
(37,1),(38,3),(39,6),(40,9),(41,12),(42,15),(43,18),(44,21),(45,24),(46,27),(47,30),(48,33),(49,36),(50,39),(51,42),(52,45),(53,48),(54,51),(55,54)):
stringDampFreePoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
stringDampMidPoint,
fixedPoint)~par(i, (nPoints*nSpatialDependency-2), _):
_,par(i,nPoints-2,!,_),_:ba.selectn(nPoints,outPoint);
process = hit:ba.selectoutn(nPoints,inPoint):model<:_,_;
|
ee9be7def3b4569a52f7e18fd94df0c6949f09f386a9e7e30f08256461910d11 | Rickr922/Faust-FDS | stringDampedNewRoute.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
nPoints = 150;
//modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
modelType = 0;
k = 1/ma.SR;
c = 344;
//Stability condition
h = c*k;
s0 = 1000;
//----------------------------------Equations--------------------------------//
nPointInputs = inputs(stringDampMidPoint);
nSidePoints = nPointInputs-1; //twice the number of side points (left + right)
spaceDep = nSidePoints/2; //n° of spatial side points needed by the update eq
C1 = 1+(2*s0*k*k/h);
C2 = (2*s0*k*k/h)-1;
lambda = c*k/h;
stringDampMidPoint(fIn, uSide_l, uSide_r) = u //u_(l-1)=uSide_l,u_(l+1)=uSide_r
letrec
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*(uSide_l+uSide_r)/C1 + fIn;
};
stringDampFreePointL(fIn, uSide_l, uSide_r) = u
letrec
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide_r/C1 + fIn;
};
stringDampFreePointR(fIn, uSide_l, uSide_r) = u
letrec
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide_l/C1 + fIn;
};
fixedPoint(fIn, uSide_l, uSide_r) = 0;
buildStringDamp(nPoints,modelType) =
//modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
(si.bus(nPointInputs)<:(stringDampMidPoint, stringDampFreePointL:select2(modelType==1))),
par(i, nPoints-2, stringDampMidPoint),
(si.bus(nPointInputs)<:(stringDampMidPoint, stringDampFreePointR:select2(modelType==2)));
//Nota che non mi servono i fixed points perchè nelle connessioni
// vuote entra 0!! Praticamente è come se avessi dei virtual boundaries
//----------------------------------Controls---------------------------------//
hit = button("hit"):ba.impulsify;
inPoint=hslider("input point", 1,0,nPoints-1,1);
outPoint=hslider("output point",1,0,nPoints-1,1);
//----------------------------------Build Model-------------------------------//
model =
(route(2*nPoints,nPoints*nSidePoints+nPoints,
par(i,nPoints,
par(j, spaceDep,
(i+1, nPointInputs*i + nSidePoints*j - nPointInputs*(spaceDep-1)),
(i+1, nPointInputs*i + nSidePoints*j - nPointInputs*(spaceDep-1) +
2*spaceDep^2+nPointInputs))),
par(i,nPoints,(nPoints+1+i,1+nPointInputs*i))):
buildStringDamp(nPoints,modelType))~si.bus(nPoints):
si.bus(nPoints):ba.selectn(nPoints,outPoint);
process = hit:ba.selectoutn(nPoints,inPoint):model<:_,_;
//process = buildStringDamp(nPoints,modelType);
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/oldRoute/stringDamped/stringDampedNewRoute.dsp | faust | --------------------------------Model Settings-----------------------------//
modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
Stability condition
----------------------------------Equations--------------------------------//
twice the number of side points (left + right)
n° of spatial side points needed by the update eq
u_(l-1)=uSide_l,u_(l+1)=uSide_r
modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
Nota che non mi servono i fixed points perchè nelle connessioni
vuote entra 0!! Praticamente è come se avessi dei virtual boundaries
----------------------------------Controls---------------------------------//
----------------------------------Build Model-------------------------------//
process = buildStringDamp(nPoints,modelType); | import("stdfaust.lib");
nPoints = 150;
modelType = 0;
k = 1/ma.SR;
c = 344;
h = c*k;
s0 = 1000;
nPointInputs = inputs(stringDampMidPoint);
C1 = 1+(2*s0*k*k/h);
C2 = (2*s0*k*k/h)-1;
lambda = c*k/h;
letrec
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*(uSide_l+uSide_r)/C1 + fIn;
};
stringDampFreePointL(fIn, uSide_l, uSide_r) = u
letrec
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide_r/C1 + fIn;
};
stringDampFreePointR(fIn, uSide_l, uSide_r) = u
letrec
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide_l/C1 + fIn;
};
fixedPoint(fIn, uSide_l, uSide_r) = 0;
buildStringDamp(nPoints,modelType) =
(si.bus(nPointInputs)<:(stringDampMidPoint, stringDampFreePointL:select2(modelType==1))),
par(i, nPoints-2, stringDampMidPoint),
(si.bus(nPointInputs)<:(stringDampMidPoint, stringDampFreePointR:select2(modelType==2)));
hit = button("hit"):ba.impulsify;
inPoint=hslider("input point", 1,0,nPoints-1,1);
outPoint=hslider("output point",1,0,nPoints-1,1);
model =
(route(2*nPoints,nPoints*nSidePoints+nPoints,
par(i,nPoints,
par(j, spaceDep,
(i+1, nPointInputs*i + nSidePoints*j - nPointInputs*(spaceDep-1)),
(i+1, nPointInputs*i + nSidePoints*j - nPointInputs*(spaceDep-1) +
2*spaceDep^2+nPointInputs))),
par(i,nPoints,(nPoints+1+i,1+nPointInputs*i))):
buildStringDamp(nPoints,modelType))~si.bus(nPoints):
si.bus(nPoints):ba.selectn(nPoints,outPoint);
process = hit:ba.selectoutn(nPoints,inPoint):model<:_,_;
|
071a30ea8ca784765e1d2ab2766559ac0133e120c13ea393ea55e2021ca86c2e | Rickr922/Faust-FDS | thinPlate.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
k = 1/ma.SR;
K = 20;
s0 = 2;
s1 = 0.05;
c=344;
coeff = c^2*k^2+4*s1*k;
h = sqrt((coeff+sqrt(coeff*coeff+16*K*K*k*k)));
nPointsX = 40;
nPointsY = 30;
lambda = c*k/h;
//----------------------------------Equations--------------------------------//
mu=K*K*k*k/(h^4);
den = 1+s0*k;
A = 2*(1-10*mu-2*lambda*lambda-4*s1*k*k)/den;
B = (s0*k+4*k*k-1)/den;
C = (8*mu + lambda*lambda + 2*s1*k*k)/den;
D = -2*mu/den;
E = -mu/den;
F = -2*s1*k*k/den;
schemeMidPoint(fIn,u_nn,u_n,u_ss,u_s,u,u_w,u_ww,u_e,u_ee,u_nw,u_ne,u_sw,u_se) =
A*u + B*u' + C*(u_n+u_s+u_w+u_e) + D*(u_nw+u_ne+u_sw+u_se) + E*(u_nn+u_ss+u_ww+u_ee) + F*(u_n'+u_s'+u_w'+u_e') + fIn;
buildScheme(X,Y) = par (x, X,
par(y,Y, schemeMidPoint));
//----------------------------------Controls---------------------------------//
inPointX=hslider("input point x", floor(nPointsX/2),0,nPointsX-1,1);
inPointY=hslider("input point y", floor(nPointsY/2),0,nPointsY-1,1);
outPointX=hslider("output point x",floor(nPointsX/2),0,nPointsX-1,1);
outPointY=hslider("output point y",floor(nPointsY/2),0,nPointsY-1,1);
forceModel = button("play") : ba.impulsify/3;
stop = button("Stop");
//----------------------------------Interpolation---------------------------------//
linInterpolation2D(nPointsX,nPointsY,pointX,pointY) =
par(i,nPointsX,
par(j,nPointsY,_*
select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY))))
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
//----------------------------------Force---------------------------------//
stairsForce(X,Y,pointX,pointY) = ba.selectoutn(X*Y,pointY+pointX*Y);
//----------------------------------Output-------------------------------//
stairsOutput(X,Y,pointX,pointY) = ba.selectn(X*Y,pointY+pointX*Y);
linInterpolation2DOut(nPointsX,nPointsY,pointX,pointY) = linInterpolation2D(nPointsX,nPointsY,pointX,pointY):>_;
//----------------------------------Build Model-------------------------------//
nInputs = inputs(schemeMidPoint);
routing(X, Y) = route(X*Y*2, X*Y*nInputs,
par(x, X, par(y, Y, connections(x,y))))
with
{
connections(x,y) = P(x,y) + X*Y, F(x,y),
P(x,y), NN(x,y+2),
P(x,y), N(x,y+1),
P(x,y), SS(x,y-2),
P(x,y), S(x,y-1),
P(x,y), C(x,y),
P(x,y), WW(x+2,y),
P(x,y), W(x+1,y),
P(x,y), EE(x-2,y),
P(x,y), E(x-1,y),
P(x,y), NW(x+1,y+1),
P(x,y), NE(x-1,y+1),
P(x,y), SW(x+1,y-1),
P(x,y), SE(x-1,y-1);
P(x,y) = x*Y+y+1;
F(x,y) = (1 + 0 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
NN(x,y) = (1 + 1 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
N(x,y) = (1 + 2 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
SS(x,y) = (1 + 3 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
S(x,y) = (1 + 4 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
C(x,y) = (1 + 5 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
W(x,y) = (1 + 6 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
WW(x,y) = (1 + 7 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
E(x,y) = (1 + 8 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
EE(x,y) = (1 + 9 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
NW(x,y) = (1 + 10 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
NE(x,y) = (1 + 11 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
SW(x,y) = (1 + 12 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
SE(x,y) = (1 + 13 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
};
model(X,Y) = (routing(X,Y) : buildScheme(X,Y)) ~ si.bus(X*Y); //par(i,X*Y,_*(stop==0));*/
process = forceModel <: stairsForce(nPointsX,nPointsY,inPointX,inPointY) : model(nPointsX,nPointsY) : stairsOutput(nPointsX,nPointsY,outPointX,outPointY)<:_,_;
//process=B;
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/newRoute/thinPlate/thinPlate.dsp | faust | --------------------------------Model Settings-----------------------------//
----------------------------------Equations--------------------------------//
----------------------------------Controls---------------------------------//
----------------------------------Interpolation---------------------------------//
----------------------------------Force---------------------------------//
----------------------------------Output-------------------------------//
----------------------------------Build Model-------------------------------//
par(i,X*Y,_*(stop==0));*/
process=B; | import("stdfaust.lib");
k = 1/ma.SR;
K = 20;
s0 = 2;
s1 = 0.05;
c=344;
coeff = c^2*k^2+4*s1*k;
h = sqrt((coeff+sqrt(coeff*coeff+16*K*K*k*k)));
nPointsX = 40;
nPointsY = 30;
lambda = c*k/h;
mu=K*K*k*k/(h^4);
den = 1+s0*k;
A = 2*(1-10*mu-2*lambda*lambda-4*s1*k*k)/den;
B = (s0*k+4*k*k-1)/den;
C = (8*mu + lambda*lambda + 2*s1*k*k)/den;
D = -2*mu/den;
E = -mu/den;
F = -2*s1*k*k/den;
schemeMidPoint(fIn,u_nn,u_n,u_ss,u_s,u,u_w,u_ww,u_e,u_ee,u_nw,u_ne,u_sw,u_se) =
A*u + B*u' + C*(u_n+u_s+u_w+u_e) + D*(u_nw+u_ne+u_sw+u_se) + E*(u_nn+u_ss+u_ww+u_ee) + F*(u_n'+u_s'+u_w'+u_e') + fIn;
buildScheme(X,Y) = par (x, X,
par(y,Y, schemeMidPoint));
inPointX=hslider("input point x", floor(nPointsX/2),0,nPointsX-1,1);
inPointY=hslider("input point y", floor(nPointsY/2),0,nPointsY-1,1);
outPointX=hslider("output point x",floor(nPointsX/2),0,nPointsX-1,1);
outPointY=hslider("output point y",floor(nPointsY/2),0,nPointsY-1,1);
forceModel = button("play") : ba.impulsify/3;
stop = button("Stop");
linInterpolation2D(nPointsX,nPointsY,pointX,pointY) =
par(i,nPointsX,
par(j,nPointsY,_*
select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY))))
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
stairsForce(X,Y,pointX,pointY) = ba.selectoutn(X*Y,pointY+pointX*Y);
stairsOutput(X,Y,pointX,pointY) = ba.selectn(X*Y,pointY+pointX*Y);
linInterpolation2DOut(nPointsX,nPointsY,pointX,pointY) = linInterpolation2D(nPointsX,nPointsY,pointX,pointY):>_;
nInputs = inputs(schemeMidPoint);
routing(X, Y) = route(X*Y*2, X*Y*nInputs,
par(x, X, par(y, Y, connections(x,y))))
with
{
connections(x,y) = P(x,y) + X*Y, F(x,y),
P(x,y), NN(x,y+2),
P(x,y), N(x,y+1),
P(x,y), SS(x,y-2),
P(x,y), S(x,y-1),
P(x,y), C(x,y),
P(x,y), WW(x+2,y),
P(x,y), W(x+1,y),
P(x,y), EE(x-2,y),
P(x,y), E(x-1,y),
P(x,y), NW(x+1,y+1),
P(x,y), NE(x-1,y+1),
P(x,y), SW(x+1,y-1),
P(x,y), SE(x-1,y-1);
P(x,y) = x*Y+y+1;
F(x,y) = (1 + 0 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
NN(x,y) = (1 + 1 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
N(x,y) = (1 + 2 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
SS(x,y) = (1 + 3 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
S(x,y) = (1 + 4 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
C(x,y) = (1 + 5 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
W(x,y) = (1 + 6 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
WW(x,y) = (1 + 7 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
E(x,y) = (1 + 8 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
EE(x,y) = (1 + 9 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
NW(x,y) = (1 + 10 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
NE(x,y) = (1 + 11 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
SW(x,y) = (1 + 12 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
SE(x,y) = (1 + 13 + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
};
process = forceModel <: stairsForce(nPointsX,nPointsY,inPointX,inPointY) : model(nPointsX,nPointsY) : stairsOutput(nPointsX,nPointsY,outPointX,outPointY)<:_,_;
|
6c3b75e816a73d8dece83e4aadba0a9a7f36b0bb3271f1af2543a2c167990f81 | Rickr922/Faust-FDS | thinPlate.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
k = 1/ma.SR;
K = 20;
s0 = 2;
s1 = 0.05;
c=344;
coeff = c^2*k^2+4*s1*k;
h = sqrt((coeff+sqrt(coeff*coeff+16*K*K*k*k)));
nPointsX = 10;
nPointsY = 10;
lambda = c*k/h;
//----------------------------------Equations--------------------------------//
mu=K*K*k*k/(h^4);
den = 1+s0*k;
A = 2*(1-10*mu-2*lambda*lambda-4*s1*k*k)/den;
B = (s0*k+4*k*k-1)/den;
C = (8*mu + lambda*lambda + 2*s1*k*k)/den;
D = -2*mu/den;
E = -mu/den;
F = -2*s1*k*k/den;
midCoeff = 0,0,E,0,0,
0,D,C,D,0,
E,C,A,C,E,
0,D,C,D,0,
0,0,E,0,0;
midCoeffDelay1 = 0,0,0,0,0,
0,0,F,0,0,
0,F,B,F,0,
0,0,F,0,0,
0,0,0,0,0;
r=2;
t=1;
coefficients = midCoeff,midCoeffDelay1;
scheme(pointsX,pointsY) = par (i, pointsX,
par(j,pointsY, coefficients));
//----------------------------------Controls---------------------------------//
inPointX=hslider("input point x", floor(nPointsX/2),0,nPointsX-1,0.01);
inPointY=hslider("input point y", floor(nPointsY/2),0,nPointsY-1,0.01);
outPointX=hslider("output point x",floor(nPointsX/2),0,nPointsX-1,0.01);
outPointY=hslider("output point y",floor(nPointsY/2),0,nPointsY-1,0.01);
hit = button("play");
stop = button("Stop");
//----------------------------------Library---------------------------------//
schemePoint2D(R,T,fIn) = coeffs,neighbors<:
sum(t,T+1,
sum(i,nNeighbors,
ba.selector(int(i+t*nNeighbors),nNeighbors*(T+1),coeffs)*
ba.selector(i,nNeighbors,neighbors)@(t)))
+ fIn
with
{
nNeighbors = (2*R+1)^2;
neighbors = si.bus(nNeighbors);
coeffs=si.bus(nNeighbors*(T+1));
};
buildScheme2D(R,T,pointsX,pointsY) =
par (x, pointsX,
par(y,pointsY, schemePoint2D(R,T)));
//----------------------------------Interpolation---------------------------------//
linInterpolation2D(X,Y,pointX,pointY) =
par(i,X,
par(j,Y,_*
select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY))))
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
//----------------------------------Force---------------------------------//
forceModel = hit:ba.impulsify;
stairsForce(X,Y,pointX,pointY) = ba.selectoutn(X*Y,pointY+pointX*Y);
//----------------------------------Output-------------------------------//
stairsOutput(X,Y,pointX,pointY) = ba.selectn(X*Y,pointY+pointX*Y);
linInterpolation2DOut(X,Y,pointX,pointY) = linInterpolation2D(X,Y,pointX,pointY):>_;
//----------------------------------Build Model-------------------------------//
//nInputs = inputs(schemeMidPoint);
route2D(X, Y, R, T) = route(nPoints*2+nPoints*nCoeffs, nPoints*nInputs,
par(x, X, par(y, Y, connections(x,y))))
with
{
connections(x,y) = par(k,nCoeffs,nPoints+(x*Y+y)*nCoeffs+k+1,C(x,y,k+1)),
P(x,y) + nPoints + nCoeffs*nPoints, C(x,y,0),
par(j,nNeighborsXY,
par(i,nNeighborsXY,
P(x,y),C(x+i-R,y+j-R,nInputs-1-(i*nNeighborsXY+j))));
P(x,y) = x*Y+y+1;
C(x,y,count) = (1 + count + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
nNeighborsXY = 2*R+1;
nNeighbors = nNeighborsXY^2;
nCoeffs = nNeighbors*(T+1);
nInputs = nNeighbors+1+nCoeffs;
nPoints = X*Y;
};
model(X,Y,r,t) =
(route2D(X,Y,r,t) : buildScheme2D(r,t,X,Y)) ~ par(i,X*Y,_*(stop==0));
process = scheme(nPointsX,nPointsY),(forceModel<:linInterpolation2D(nPointsX,nPointsY,inPointX,inPointY)):model(nPointsX,nPointsY,r,t):linInterpolation2DOut(nPointsX,nPointsY,outPointX,outPointY);
//process = coefficients,10,par(i,9,i):schemePoint2D(1,1);
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/caRoute/thinPlate/thinPlate.dsp | faust | --------------------------------Model Settings-----------------------------//
----------------------------------Equations--------------------------------//
----------------------------------Controls---------------------------------//
----------------------------------Library---------------------------------//
----------------------------------Interpolation---------------------------------//
----------------------------------Force---------------------------------//
----------------------------------Output-------------------------------//
----------------------------------Build Model-------------------------------//
nInputs = inputs(schemeMidPoint);
process = coefficients,10,par(i,9,i):schemePoint2D(1,1); | import("stdfaust.lib");
k = 1/ma.SR;
K = 20;
s0 = 2;
s1 = 0.05;
c=344;
coeff = c^2*k^2+4*s1*k;
h = sqrt((coeff+sqrt(coeff*coeff+16*K*K*k*k)));
nPointsX = 10;
nPointsY = 10;
lambda = c*k/h;
mu=K*K*k*k/(h^4);
den = 1+s0*k;
A = 2*(1-10*mu-2*lambda*lambda-4*s1*k*k)/den;
B = (s0*k+4*k*k-1)/den;
C = (8*mu + lambda*lambda + 2*s1*k*k)/den;
D = -2*mu/den;
E = -mu/den;
F = -2*s1*k*k/den;
midCoeff = 0,0,E,0,0,
0,D,C,D,0,
E,C,A,C,E,
0,D,C,D,0,
0,0,E,0,0;
midCoeffDelay1 = 0,0,0,0,0,
0,0,F,0,0,
0,F,B,F,0,
0,0,F,0,0,
0,0,0,0,0;
r=2;
t=1;
coefficients = midCoeff,midCoeffDelay1;
scheme(pointsX,pointsY) = par (i, pointsX,
par(j,pointsY, coefficients));
inPointX=hslider("input point x", floor(nPointsX/2),0,nPointsX-1,0.01);
inPointY=hslider("input point y", floor(nPointsY/2),0,nPointsY-1,0.01);
outPointX=hslider("output point x",floor(nPointsX/2),0,nPointsX-1,0.01);
outPointY=hslider("output point y",floor(nPointsY/2),0,nPointsY-1,0.01);
hit = button("play");
stop = button("Stop");
schemePoint2D(R,T,fIn) = coeffs,neighbors<:
sum(t,T+1,
sum(i,nNeighbors,
ba.selector(int(i+t*nNeighbors),nNeighbors*(T+1),coeffs)*
ba.selector(i,nNeighbors,neighbors)@(t)))
+ fIn
with
{
nNeighbors = (2*R+1)^2;
neighbors = si.bus(nNeighbors);
coeffs=si.bus(nNeighbors*(T+1));
};
buildScheme2D(R,T,pointsX,pointsY) =
par (x, pointsX,
par(y,pointsY, schemePoint2D(R,T)));
linInterpolation2D(X,Y,pointX,pointY) =
par(i,X,
par(j,Y,_*
select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY))))
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
forceModel = hit:ba.impulsify;
stairsForce(X,Y,pointX,pointY) = ba.selectoutn(X*Y,pointY+pointX*Y);
stairsOutput(X,Y,pointX,pointY) = ba.selectn(X*Y,pointY+pointX*Y);
linInterpolation2DOut(X,Y,pointX,pointY) = linInterpolation2D(X,Y,pointX,pointY):>_;
route2D(X, Y, R, T) = route(nPoints*2+nPoints*nCoeffs, nPoints*nInputs,
par(x, X, par(y, Y, connections(x,y))))
with
{
connections(x,y) = par(k,nCoeffs,nPoints+(x*Y+y)*nCoeffs+k+1,C(x,y,k+1)),
P(x,y) + nPoints + nCoeffs*nPoints, C(x,y,0),
par(j,nNeighborsXY,
par(i,nNeighborsXY,
P(x,y),C(x+i-R,y+j-R,nInputs-1-(i*nNeighborsXY+j))));
P(x,y) = x*Y+y+1;
C(x,y,count) = (1 + count + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
nNeighborsXY = 2*R+1;
nNeighbors = nNeighborsXY^2;
nCoeffs = nNeighbors*(T+1);
nInputs = nNeighbors+1+nCoeffs;
nPoints = X*Y;
};
model(X,Y,r,t) =
(route2D(X,Y,r,t) : buildScheme2D(r,t,X,Y)) ~ par(i,X*Y,_*(stop==0));
process = scheme(nPointsX,nPointsY),(forceModel<:linInterpolation2D(nPointsX,nPointsY,inPointX,inPointY)):model(nPointsX,nPointsY,r,t):linInterpolation2DOut(nPointsX,nPointsY,outPointX,outPointY);
|
4c7691bd29d2950654b0045657374f100496476f405753fc46873c8130ef291b | Rickr922/Faust-FDS | 2dWaveBUG.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
k = 1/ma.SR;
c = 344;
h = c * k*sqrt(2);
nPointsX = 3;
nPointsY = 3;
lambda = c*k/h;
alpha = lambda*lambda;
beta = 2*(1-2*lambda*lambda);
midCoeff = 0,alpha,0,
alpha,beta,alpha,
0,alpha,0;
midCoeffDelay1 = 0,0,0,
0,-1,0,
0,0,0;
r=1;
t=1;
coefficients = midCoeff,midCoeffDelay1;
scheme(pointsX,pointsY) = par (i, pointsX,
par(j,pointsY, coefficients));
//----------------------------------Controls---------------------------------//
inPointX=hslider("input point x", floor(nPointsX/2),0,nPointsX-1,1);
inPointY=hslider("input point y", floor(nPointsY/2),0,nPointsY-1,1);
outPointX=hslider("output point x",floor(nPointsX/2),0,nPointsX-1,1);
outPointY=hslider("output point y",floor(nPointsY/2),0,nPointsY-1,1);
forceModel = button("play") : ba.impulsify;
stop = button("Stop");
//----------------------------------Library---------------------------------//
schemePoint2D(R,T,fIn) = coeffs,neighbors<:
sum(t,T+1,
sum(i,nNeighbors,
ba.selector(int(i+t*nNeighbors),nNeighbors*(T+1),coeffs)*
ba.selector(i,nNeighbors,neighbors)@(t)))
+ fIn
with
{
nNeighbors = (2*R+1)^2;
neighbors = si.bus(nNeighbors);
coeffs=si.bus(nNeighbors*(T+1));
};
buildScheme2D(R,T,pointsX,pointsY) =
par (x, pointsX,
par(y,pointsY, schemePoint2D(R,T)))
with
{/*
nPoints = pointsX*pointsY;
nNeighbors = (2*R+1)^2;
coeffsLength = int(nNeighbors*(T+1));
coeffs(x,y,i) = ba.selector((x*pointsY+y)*coeffsLength+i,coeffsLength*nPoints,coefficients);*/
};
//----------------------------------Interpolation---------------------------------//
linInterpolation2D(pointX,pointY) =
par(i,nPointsX,
par(j,nPointsY,_*
select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY))))
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
//----------------------------------Force---------------------------------//
stairsForce(X,Y,pointX,pointY) = ba.selectoutn(X*Y,pointY+pointX*Y);
//----------------------------------Output-------------------------------//
stairsOutput(X,Y,pointX,pointY) = ba.selectn(X*Y,pointY+pointX*Y);
linInterpolation2DOut(pointX,pointY) = linInterpolation2D(pointX,pointY):>_;
//----------------------------------Build Model-------------------------------//
//nInputs = inputs(schemeMidPoint);
route2D(X, Y, R, T) = route(nPoints*2+nPoints*nCoeffs, nPoints*nInputs,
par(x, X, par(y, Y, connections(x,y))))
with
{
connections(x,y) = par(k,nCoeffs,nPoints*2+(x*Y+y)*nCoeffs+k,C(x,y,k)),
P(x,y) + nPoints + nCoeffs*nPoints, C(x,y,nCoeffs),
par(j,nNeighborsXY,
par(i,nNeighborsXY,
P(x,y),C(x+i-R,y+j-R,nInputs-(i*nNeighborsXY+j))));
P(x,y) = x*Y+y+1;
C(x,y,count) = (1 + count + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
nNeighborsXY = 2*R+1;
nNeighbors = nNeighborsXY^2;
nCoeffs = nNeighbors*(T+1);
nInputs = nNeighbors+1+nCoeffs;
nPoints = X*Y;
};
model(X,Y,r,t,coeffs) =
(route2D(X,Y,r,t) : buildScheme2D(r,t,X,Y)) ~ par(i,X*Y,_/**(stop==0)*/);
process = forceModel <: model(nPointsX,nPointsY,r,t,scheme(nPointsX,nPointsY));
//process = coefficients,10,par(i,9,i):schemePoint2D(1,1);
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/caRoute/2dWave/2dWaveBUG.dsp | faust | --------------------------------Model Settings-----------------------------//
----------------------------------Controls---------------------------------//
----------------------------------Library---------------------------------//
nPoints = pointsX*pointsY;
nNeighbors = (2*R+1)^2;
coeffsLength = int(nNeighbors*(T+1));
coeffs(x,y,i) = ba.selector((x*pointsY+y)*coeffsLength+i,coeffsLength*nPoints,coefficients);
----------------------------------Interpolation---------------------------------//
----------------------------------Force---------------------------------//
----------------------------------Output-------------------------------//
----------------------------------Build Model-------------------------------//
nInputs = inputs(schemeMidPoint);
*(stop==0)
process = coefficients,10,par(i,9,i):schemePoint2D(1,1); | import("stdfaust.lib");
k = 1/ma.SR;
c = 344;
h = c * k*sqrt(2);
nPointsX = 3;
nPointsY = 3;
lambda = c*k/h;
alpha = lambda*lambda;
beta = 2*(1-2*lambda*lambda);
midCoeff = 0,alpha,0,
alpha,beta,alpha,
0,alpha,0;
midCoeffDelay1 = 0,0,0,
0,-1,0,
0,0,0;
r=1;
t=1;
coefficients = midCoeff,midCoeffDelay1;
scheme(pointsX,pointsY) = par (i, pointsX,
par(j,pointsY, coefficients));
inPointX=hslider("input point x", floor(nPointsX/2),0,nPointsX-1,1);
inPointY=hslider("input point y", floor(nPointsY/2),0,nPointsY-1,1);
outPointX=hslider("output point x",floor(nPointsX/2),0,nPointsX-1,1);
outPointY=hslider("output point y",floor(nPointsY/2),0,nPointsY-1,1);
forceModel = button("play") : ba.impulsify;
stop = button("Stop");
schemePoint2D(R,T,fIn) = coeffs,neighbors<:
sum(t,T+1,
sum(i,nNeighbors,
ba.selector(int(i+t*nNeighbors),nNeighbors*(T+1),coeffs)*
ba.selector(i,nNeighbors,neighbors)@(t)))
+ fIn
with
{
nNeighbors = (2*R+1)^2;
neighbors = si.bus(nNeighbors);
coeffs=si.bus(nNeighbors*(T+1));
};
buildScheme2D(R,T,pointsX,pointsY) =
par (x, pointsX,
par(y,pointsY, schemePoint2D(R,T)))
with
};
linInterpolation2D(pointX,pointY) =
par(i,nPointsX,
par(j,nPointsY,_*
select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY))))
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
stairsForce(X,Y,pointX,pointY) = ba.selectoutn(X*Y,pointY+pointX*Y);
stairsOutput(X,Y,pointX,pointY) = ba.selectn(X*Y,pointY+pointX*Y);
linInterpolation2DOut(pointX,pointY) = linInterpolation2D(pointX,pointY):>_;
route2D(X, Y, R, T) = route(nPoints*2+nPoints*nCoeffs, nPoints*nInputs,
par(x, X, par(y, Y, connections(x,y))))
with
{
connections(x,y) = par(k,nCoeffs,nPoints*2+(x*Y+y)*nCoeffs+k,C(x,y,k)),
P(x,y) + nPoints + nCoeffs*nPoints, C(x,y,nCoeffs),
par(j,nNeighborsXY,
par(i,nNeighborsXY,
P(x,y),C(x+i-R,y+j-R,nInputs-(i*nNeighborsXY+j))));
P(x,y) = x*Y+y+1;
C(x,y,count) = (1 + count + (x*Y+y)*nInputs) * (x>=0) * (x<X) * (y>=0) * (y<Y);
nNeighborsXY = 2*R+1;
nNeighbors = nNeighborsXY^2;
nCoeffs = nNeighbors*(T+1);
nInputs = nNeighbors+1+nCoeffs;
nPoints = X*Y;
};
model(X,Y,r,t,coeffs) =
process = forceModel <: model(nPointsX,nPointsY,r,t,scheme(nPointsX,nPointsY));
|
8d51c859b44366b6964a1dfebff0fd41b0402b15be1d2d5a50a388fdeaa304b8 | Rickr922/Faust-FDS | stiffString.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
nPoints = 100;
L = 0.7; // String length [m]
//nPoints=int(L/h);
k = 1/48000;//1/ma.SR;
//Stability condition
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
T = 150; // Tension [N]
//T = hslider("Tension",150,10,1000,0.1);
radius = 3.5560e-04; // Radius (0.016 gauge) [m]
rho = 8.05*10^3; // Density [kg/m^3];
Area = ma.PI*radius^2; // Area of string section
I = (ma.PI*radius^4)/ 4; // Moment of Inertia
Emod = 174e4; // Young modulus [Pa]
K = sqrt(Emod*I/rho/Area); // Stiffness parameter
c = sqrt(T/rho/Area); // Wave speed
sigma1 = 0.01; // Frequency dependent damping
sigma0 = 0.0005;
//----------------------------------Equations--------------------------------//
nInputs = inputs(schemeMidPoint);
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
//west=left, east=right
schemeMidPoint(fIn,u_ww,u_w,u,u_e,u_ee) =
A*u + B*u' + C*(u_e+u_w) + D*(u_e'+u_w') + E*(u_ee+u_ww) + fIn;
schemeFixedPoint(fIn,u_ww,u_w,u,u_e,u_ee) = 0;
//----------------------------------Controls---------------------------------//
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,0.01);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
//----------------------------------Force---------------------------------//
forceModel = hit;
linInterp1DForce(i,inPoint,force) = force*select2(
i==int(inPoint), select2(i==int(inPoint+1),0,fraction),(1-fraction))
with
{
fraction = ma.frac(inPoint);
};
linInterp1D(selectedPoint,nPoints) = par(i,nPoints,_*select2(
i==int(selectedPoint), select2(i==int(selectedPoint+1),0,fraction),(1-fraction)))
with
{
fraction = ma.frac(outPoint);
};
//----------------------------------Output-------------------------------//
linInterp1DOut(outPoint,nPoints) = linInterp1D(outPoint,nPoints):>_;
//----------------------------------Build Model-------------------------------//
buildScheme(nPoints) = par (i, nPoints, schemeMidPoint);
/*schemeFixedPoint,
par (i, nPoints-2, schemeMidPoint),
schemeFreePointEast;*/
routing(nPoints,nInputs) = route(nPoints+nPoints, nPoints*nInputs,
par(x, nPoints, connections(x)))
with {
connections(x) = U(x)+nPoints, F(x),
U(x), EE(x-2),
U(x), E(x-1),
U(x), C(x),
U(x), W(x+1),
U(x), WW(x+2);
U(x) = x+1;
F(x) = (1 + 0 + (x*nInputs)) * (x>=0) * (x<nPoints);
WW(x) = (1 + 1 + (x*nInputs)) * (x>=0) * (x<nPoints);
W(x) = (1 + 2 + (x*nInputs)) * (x>=0) * (x<nPoints);
C(x) = (1 + 3 + (x*nInputs)) * (x>=0) * (x<nPoints);
E(x) = (1 + 4 + (x*nInputs)) * (x>=0) * (x<nPoints);
EE(x) = (1 + 5 + (x*nInputs)) * (x>=0) * (x<nPoints);
};
model(nPoints) = (routing(nPoints,nInputs) : buildScheme(nPoints)) ~
(par(i, nPoints, _*(stop==0)));
process = forceModel<:linInterp1D(inPoint,nPoints): model(nPoints):linInterp1DOut(outPoint,nPoints)<:_,_;
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/newRoute/stiffString/stiffString.dsp | faust | --------------------------------Model Settings-----------------------------//
String length [m]
nPoints=int(L/h);
1/ma.SR;
Stability condition
Tension [N]
T = hslider("Tension",150,10,1000,0.1);
Radius (0.016 gauge) [m]
Density [kg/m^3];
Area of string section
Moment of Inertia
Young modulus [Pa]
Stiffness parameter
Wave speed
Frequency dependent damping
----------------------------------Equations--------------------------------//
west=left, east=right
----------------------------------Controls---------------------------------//
----------------------------------Force---------------------------------//
----------------------------------Output-------------------------------//
----------------------------------Build Model-------------------------------//
schemeFixedPoint,
par (i, nPoints-2, schemeMidPoint),
schemeFreePointEast; | import("stdfaust.lib");
nPoints = 100;
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
sigma0 = 0.0005;
nInputs = inputs(schemeMidPoint);
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
schemeMidPoint(fIn,u_ww,u_w,u,u_e,u_ee) =
A*u + B*u' + C*(u_e+u_w) + D*(u_e'+u_w') + E*(u_ee+u_ww) + fIn;
schemeFixedPoint(fIn,u_ww,u_w,u,u_e,u_ee) = 0;
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,0.01);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
forceModel = hit;
linInterp1DForce(i,inPoint,force) = force*select2(
i==int(inPoint), select2(i==int(inPoint+1),0,fraction),(1-fraction))
with
{
fraction = ma.frac(inPoint);
};
linInterp1D(selectedPoint,nPoints) = par(i,nPoints,_*select2(
i==int(selectedPoint), select2(i==int(selectedPoint+1),0,fraction),(1-fraction)))
with
{
fraction = ma.frac(outPoint);
};
linInterp1DOut(outPoint,nPoints) = linInterp1D(outPoint,nPoints):>_;
buildScheme(nPoints) = par (i, nPoints, schemeMidPoint);
routing(nPoints,nInputs) = route(nPoints+nPoints, nPoints*nInputs,
par(x, nPoints, connections(x)))
with {
connections(x) = U(x)+nPoints, F(x),
U(x), EE(x-2),
U(x), E(x-1),
U(x), C(x),
U(x), W(x+1),
U(x), WW(x+2);
U(x) = x+1;
F(x) = (1 + 0 + (x*nInputs)) * (x>=0) * (x<nPoints);
WW(x) = (1 + 1 + (x*nInputs)) * (x>=0) * (x<nPoints);
W(x) = (1 + 2 + (x*nInputs)) * (x>=0) * (x<nPoints);
C(x) = (1 + 3 + (x*nInputs)) * (x>=0) * (x<nPoints);
E(x) = (1 + 4 + (x*nInputs)) * (x>=0) * (x<nPoints);
EE(x) = (1 + 5 + (x*nInputs)) * (x>=0) * (x<nPoints);
};
model(nPoints) = (routing(nPoints,nInputs) : buildScheme(nPoints)) ~
(par(i, nPoints, _*(stop==0)));
process = forceModel<:linInterp1D(inPoint,nPoints): model(nPoints):linInterp1DOut(outPoint,nPoints)<:_,_;
|
b85cc2ea0cb42755ef51c2fab9b48404a504f2adcb303e6d82e95c74fe529e3a | Rickr922/Faust-FDS | stiffStringDampNofIn.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
nPoints = 200;
//modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
modelType = 0;
k = 1/ma.SR;
//Stability condition
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
//T = 150; // Tension [N]
T = hslider("Tension",150,10,1000,0.1);
radius = 3.5560e-04; // Radius (0.016 gauge) [m]
rho = 8.05*10^3; // Density [kg/m^3];
Area = ma.PI*radius^2; // Area of string section
I = (ma.PI*radius^4)/ 4; // Moment of Inertia
L = 1; // String length [m]
Emod = 174e6; // Young modulus [Pa]
K = sqrt(Emod*I/rho/Area); // Stiffness parameter
c = sqrt(T/rho/Area); // Wave speed
sigma1 = 0.01; // Frequency dependent damping
sigma0 = 0.0005;
//----------------------------------Equations--------------------------------//
nPointInputs = inputs(midPointEq);
spaceDep = (nPointInputs-1)/2; //n° of spatial side points needed by the update eq
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
midPointEq(i, uSide_ll, uSide_l, uSide_r, uSide_rr) = equation
with
{
fIn = force*(i==inPoint);
equation = u
letrec //u_(l-1)=uSide_l,u_(l+1)=uSide_r
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
};
//NOT WORKING
freePointEqL(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
freePointEqR(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
fixedPoint(i, uSide_ll, uSide_l, uSide_r, uSide_rr) = 0;
buildStringDamp(nPoints,modelType) = par(i, nPoints, midPointEq(i));
/*force :
route(nPoints,nPoints,par(i,nPoints,(i+1,1+nPointInputs*i))):
par(i, nPoints, midPointEq);*/
//----------------------------------Controls---------------------------------//
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,1);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,1);
//----------------------------------Force---------------------------------//
force = hit;
//----------------------------------Build Model-------------------------------//
model = (route(nPoints,nPoints*spaceDep*2,
par(i,nPoints,
par(j, spaceDep,
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep)),
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep) +
2*spaceDep^2+spaceDep)))):
buildStringDamp(nPoints,modelType))~
(si.bus(nPoints)):
si.bus(nPoints):ba.selectn(nPoints,outPoint);
process = model<:_,_;
//process = buildStringDamp(nPoints,modelType);
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/oldRoute/stiffStringDamp/stiffStringDampNofIn.dsp | faust | --------------------------------Model Settings-----------------------------//
modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
Stability condition
T = 150; // Tension [N]
Radius (0.016 gauge) [m]
Density [kg/m^3];
Area of string section
Moment of Inertia
String length [m]
Young modulus [Pa]
Stiffness parameter
Wave speed
Frequency dependent damping
----------------------------------Equations--------------------------------//
n° of spatial side points needed by the update eq
u_(l-1)=uSide_l,u_(l+1)=uSide_r
NOT WORKING
force :
route(nPoints,nPoints,par(i,nPoints,(i+1,1+nPointInputs*i))):
par(i, nPoints, midPointEq);
----------------------------------Controls---------------------------------//
----------------------------------Force---------------------------------//
----------------------------------Build Model-------------------------------//
process = buildStringDamp(nPoints,modelType); | import("stdfaust.lib");
nPoints = 200;
modelType = 0;
k = 1/ma.SR;
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
T = hslider("Tension",150,10,1000,0.1);
sigma0 = 0.0005;
nPointInputs = inputs(midPointEq);
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
midPointEq(i, uSide_ll, uSide_l, uSide_r, uSide_rr) = equation
with
{
fIn = force*(i==inPoint);
equation = u
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
};
freePointEqL(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
freePointEqR(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
fixedPoint(i, uSide_ll, uSide_l, uSide_r, uSide_rr) = 0;
buildStringDamp(nPoints,modelType) = par(i, nPoints, midPointEq(i));
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,1);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,1);
force = hit;
model = (route(nPoints,nPoints*spaceDep*2,
par(i,nPoints,
par(j, spaceDep,
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep)),
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep) +
2*spaceDep^2+spaceDep)))):
buildStringDamp(nPoints,modelType))~
(si.bus(nPoints)):
si.bus(nPoints):ba.selectn(nPoints,outPoint);
process = model<:_,_;
|
ebe088fc51408982380d3e01c3022e09de9b8d4c2ae786e45a5b0b0730fc8cb3 | Rickr922/Faust-FDS | stiffStringDampNofIn_compilercrash.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
nPoints = 80;
//modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
modelType = 0;
k = 1/ma.SR;
//Stability condition
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
//T = 150; // Tension [N]
T = hslider("Tension",150,10,1000,0.1);
radius = 3.5560e-04; // Radius (0.016 gauge) [m]
rho = 8.05*10^3; // Density [kg/m^3];
Area = ma.PI*radius^2; // Area of string section
I = (ma.PI*radius^4)/ 4; // Moment of Inertia
L = 1; // String length [m]
Emod = 174e6; // Young modulus [Pa]
K = sqrt(Emod*I/rho/Area); // Stiffness parameter
c = sqrt(T/rho/Area); // Wave speed
sigma1 = 0.01; // Frequency dependent damping
sigma0 = 0.0005;
//----------------------------------Equations--------------------------------//
nPointInputs = inputs(midPointEq);
spaceDep = (nPointInputs-1)/2; //n° of spatial side points needed by the update eq
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
midPointEq(i, uSide_ll, uSide_l, uSide_r, uSide_rr) = equation
with
{
fIn = force:ba.selectn(nPoints,i);
equation = u
letrec //u_(l-1)=uSide_l,u_(l+1)=uSide_r
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
};
//NOT WORKING
freePointEqL(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
freePointEqR(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
fixedPoint(i, uSide_ll, uSide_l, uSide_r, uSide_rr) = 0;
buildStringDamp(nPoints,modelType) = par(i, nPoints, midPointEq(i));
/*force :
route(nPoints,nPoints,par(i,nPoints,(i+1,1+nPointInputs*i))):
par(i, nPoints, midPointEq);*/
//----------------------------------Controls---------------------------------//
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,1);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,1);
//----------------------------------Force---------------------------------//
/*force = par(i, nPoints, hit);
index((x,v),0) = x;
index((x,v),n) = index(v,n-1);
index(x,n) = x;
rindex(v,index) = v : par(i, outputs(v), *(index==i)) :> _;*/
force = hit:ba.selectoutn(nPoints,inPoint);
//----------------------------------Build Model-------------------------------//
model = (route(nPoints,nPoints*spaceDep*2,
par(i,nPoints,
par(j, spaceDep,
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep)),
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep) +
2*spaceDep^2+spaceDep)))):
buildStringDamp(nPoints,modelType))~
(si.bus(nPoints)):
si.bus(nPoints):ba.selectn(nPoints,outPoint);
process = model<:_,_;
//process = buildStringDamp(nPoints,modelType);
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/oldRoute/stiffStringDamp/stiffStringDampNofIn_compilercrash.dsp | faust | --------------------------------Model Settings-----------------------------//
modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
Stability condition
T = 150; // Tension [N]
Radius (0.016 gauge) [m]
Density [kg/m^3];
Area of string section
Moment of Inertia
String length [m]
Young modulus [Pa]
Stiffness parameter
Wave speed
Frequency dependent damping
----------------------------------Equations--------------------------------//
n° of spatial side points needed by the update eq
u_(l-1)=uSide_l,u_(l+1)=uSide_r
NOT WORKING
force :
route(nPoints,nPoints,par(i,nPoints,(i+1,1+nPointInputs*i))):
par(i, nPoints, midPointEq);
----------------------------------Controls---------------------------------//
----------------------------------Force---------------------------------//
force = par(i, nPoints, hit);
index((x,v),0) = x;
index((x,v),n) = index(v,n-1);
index(x,n) = x;
rindex(v,index) = v : par(i, outputs(v), *(index==i)) :> _;
----------------------------------Build Model-------------------------------//
process = buildStringDamp(nPoints,modelType); | import("stdfaust.lib");
nPoints = 80;
modelType = 0;
k = 1/ma.SR;
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
T = hslider("Tension",150,10,1000,0.1);
sigma0 = 0.0005;
nPointInputs = inputs(midPointEq);
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
midPointEq(i, uSide_ll, uSide_l, uSide_r, uSide_rr) = equation
with
{
fIn = force:ba.selectn(nPoints,i);
equation = u
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
};
freePointEqL(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
freePointEqR(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
fixedPoint(i, uSide_ll, uSide_l, uSide_r, uSide_rr) = 0;
buildStringDamp(nPoints,modelType) = par(i, nPoints, midPointEq(i));
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,1);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,1);
force = hit:ba.selectoutn(nPoints,inPoint);
model = (route(nPoints,nPoints*spaceDep*2,
par(i,nPoints,
par(j, spaceDep,
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep)),
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep) +
2*spaceDep^2+spaceDep)))):
buildStringDamp(nPoints,modelType))~
(si.bus(nPoints)):
si.bus(nPoints):ba.selectn(nPoints,outPoint);
process = model<:_,_;
|
be4526fa5a0988396f4b54811d1d954c34262c3e0ee6fd167c697181b506b133 | Rickr922/Faust-FDS | stiffStringDamp.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
nPoints = 6;
//modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
modelType = 0;
k = 1/ma.SR;
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
T = 75; // Tension [N]
radius = 3.5560e-04; // Radius (0.016 gauge) [m]
rho = 8.05*10^3; // Density [kg/m^3];
Area = ma.PI*radius^2; // Area of string section
I = (ma.PI*radius^4)/ 4; // Moment of Inertia
L = 1; // String length [m]
Emod = 174e6; // Young modulus [Pa]
K = sqrt(Emod*I/rho/Area); // Stiffness parameter
c = sqrt(T/rho/Area); // Wave speed
sigma1 = 0.005; // Frequency dependent damping
sigma0 = 0.5;
//----------------------------------Equations--------------------------------//
nPointInputs = inputs(midPointEq);
spaceDep = nPointInputs-1; //n° of spatial side points needed by the update eq
sidePoints = spaceDep/2;
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
lambda = c*k/h;
midPointEq(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u //u_(l-1)=uSide_l,u_(l+1)=uSide_r
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
//NOT WORKING
freePointEqL(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
freePointEqR(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
fixedPoint(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = 0;
buildStringDamp(nPoints,modelType) = par(i, nPoints, midPointEq);
//Nota che non mi servono i fixed points perchè nelle connessioni vuote entra 0!! (e i free points ancora non funzionano)
//modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
/*par(i,sidePoints,
(si.bus(nPointInputs)<:(fixedPoint, freePointEqL:select2(modelType==1)))),
par(i, nPoints-spaceDep, midPointEq),
par(i,sidePoints,
(si.bus(nPointInputs)<:(fixedPoint, freePointEqR:select2(modelType==1))));*/
//----------------------------------Controls---------------------------------//
hit = button("hit"):ba.impulsify;
inPoint=hslider("input point", 1,0,nPoints-1,1);
outPoint=hslider("output point",1,0,nPoints-1,1);
//because every module has 2 outs, except
//the boundaries-> -2
//----------------------------------Build Model-------------------------------//
model =
(route(2*nPoints,nPoints*spaceDep+nPoints,
par(i,nPoints,(i+1,nPointInputs*i - 5),(i+1,nPointInputs*i - 1),
(i+1,nPointInputs*i + 8),(i+1,nPointInputs*i + 12)),
par(i,nPoints,(nPoints+1+i,1+nPointInputs*i))):
buildStringDamp(nPoints,modelType))~si.bus(nPoints):
si.bus(nPoints):ba.selectn(nPoints,outPoint);
process = hit:ba.selectoutn(nPoints,inPoint):model<:_,_;
//process = buildStringDamp(nPoints,modelType);
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/oldRoute/stiffStringDamp/stiffStringDamp.dsp | faust | --------------------------------Model Settings-----------------------------//
modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
Tension [N]
Radius (0.016 gauge) [m]
Density [kg/m^3];
Area of string section
Moment of Inertia
String length [m]
Young modulus [Pa]
Stiffness parameter
Wave speed
Frequency dependent damping
----------------------------------Equations--------------------------------//
n° of spatial side points needed by the update eq
u_(l-1)=uSide_l,u_(l+1)=uSide_r
NOT WORKING
Nota che non mi servono i fixed points perchè nelle connessioni vuote entra 0!! (e i free points ancora non funzionano)
modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
par(i,sidePoints,
(si.bus(nPointInputs)<:(fixedPoint, freePointEqL:select2(modelType==1)))),
par(i, nPoints-spaceDep, midPointEq),
par(i,sidePoints,
(si.bus(nPointInputs)<:(fixedPoint, freePointEqR:select2(modelType==1))));
----------------------------------Controls---------------------------------//
because every module has 2 outs, except
the boundaries-> -2
----------------------------------Build Model-------------------------------//
process = buildStringDamp(nPoints,modelType); | import("stdfaust.lib");
nPoints = 6;
modelType = 0;
k = 1/ma.SR;
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
sigma0 = 0.5;
nPointInputs = inputs(midPointEq);
sidePoints = spaceDep/2;
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
lambda = c*k/h;
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
freePointEqL(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
freePointEqR(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
fixedPoint(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = 0;
buildStringDamp(nPoints,modelType) = par(i, nPoints, midPointEq);
hit = button("hit"):ba.impulsify;
inPoint=hslider("input point", 1,0,nPoints-1,1);
outPoint=hslider("output point",1,0,nPoints-1,1);
model =
(route(2*nPoints,nPoints*spaceDep+nPoints,
par(i,nPoints,(i+1,nPointInputs*i - 5),(i+1,nPointInputs*i - 1),
(i+1,nPointInputs*i + 8),(i+1,nPointInputs*i + 12)),
par(i,nPoints,(nPoints+1+i,1+nPointInputs*i))):
buildStringDamp(nPoints,modelType))~si.bus(nPoints):
si.bus(nPoints):ba.selectn(nPoints,outPoint);
process = hit:ba.selectoutn(nPoints,inPoint):model<:_,_;
|
133c2bcc6989619a9029c02c643b80acf8788806b79ba191f5f919c642757fe4 | Rickr922/Faust-FDS | stringDampedInterp.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
nPoints = 10;
//modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
modelType = 0;
k = 1/ma.SR;
c = 344;
h = c*k;
s0 = 500;
//----------------------------------Equations--------------------------------//
nPointInputs = inputs(stringDampMidPoint);
spaceDep = (nPointInputs-1)/2; //n° of spatial side points needed by the update eq
C1 = 1+(2*s0*k*k/h);
C2 = (2*s0*k*k/h)-1;
lambda = c*k/h;
stringDampMidPoint(i, uSide_l, uSide_r) = equation
with
{
fIn = linInterpolForce(i,inPoint,forceModel);
equation = u //u_(l-1)=uSide_l,u_(l+1)=uSide_r
letrec
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*(uSide_l+uSide_r)/C1 + fIn;
};
};
stringDampFreePointL(i, uSide_l, uSide_r) = equation
with
{
fIn = linInterpolForce(i,inPoint,forceModel);
equation = u
letrec //u_(l-1)=uSide_l,u_(l+1)=uSide_r
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide_r/C1 + fIn;
};
};
stringDampFreePointR(i, uSide_l, uSide_r) = equation
with
{
fIn = linInterpolForce(i,inPoint,forceModel);
equation = u
letrec //u_(l-1)=uSide_l,u_(l+1)=uSide_r
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide_l/C1 + fIn;
};
};
fixedPoint(i, uSide_l, uSide_r) = 0;
buildStringDamp(nPoints,modelType) = par(i, nPoints, stringDampMidPoint(i));
/*
//modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
(si.bus(2*spaceDep)<:(stringDampMidPoint(0), stringDampFreePointL(0):select2(modelType==1))),
par(i, nPoints-2, stringDampMidPoint(i+1)),
(si.bus(2*spaceDep)<:(stringDampMidPoint(nPoints-1), stringDampFreePointR(nPoints-1):select2(modelType==2)));*/
//Nota che non mi servono i fixed points perchè nelle connessioni
// vuote entra 0!! Praticamente è come se avessi dei virtual boundaries
//----------------------------------Controls---------------------------------//
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,0.01);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
//----------------------------------Force---------------------------------//
forceModel = hit;
linInterpolForce(i,inPoint,force) = force*select2(
i==int(inPoint), select2(i==int(inPoint+1),0,fraction),(1-fraction))
with
{
fraction = ma.frac(inPoint);
};
//----------------------------------Out Points-------------------------------//
linInterpolOut(outPoint) = par(i,nPoints,_*select2(
i==int(outPoint), select2(i==int(outPoint+1),0,fraction),(1-fraction))):>_
with
{
fraction = ma.frac(outPoint);
};
//----------------------------------Build Model-------------------------------//
model = (route(nPoints,nPoints*spaceDep*2,
par(i,nPoints,
par(j, spaceDep,
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep)),
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep) +
2*spaceDep^2+spaceDep)))):
buildStringDamp(nPoints,modelType))~
(si.bus(nPoints)):
si.bus(nPoints):linInterpolOut(outPoint);
process = model<:_,_;
//process = buildStringDamp(nPoints,modelType);
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/oldRoute/stringDamped/stringDampedInterp.dsp | faust | --------------------------------Model Settings-----------------------------//
modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
----------------------------------Equations--------------------------------//
n° of spatial side points needed by the update eq
u_(l-1)=uSide_l,u_(l+1)=uSide_r
u_(l-1)=uSide_l,u_(l+1)=uSide_r
u_(l-1)=uSide_l,u_(l+1)=uSide_r
//modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
(si.bus(2*spaceDep)<:(stringDampMidPoint(0), stringDampFreePointL(0):select2(modelType==1))),
par(i, nPoints-2, stringDampMidPoint(i+1)),
(si.bus(2*spaceDep)<:(stringDampMidPoint(nPoints-1), stringDampFreePointR(nPoints-1):select2(modelType==2)));
Nota che non mi servono i fixed points perchè nelle connessioni
vuote entra 0!! Praticamente è come se avessi dei virtual boundaries
----------------------------------Controls---------------------------------//
----------------------------------Force---------------------------------//
----------------------------------Out Points-------------------------------//
----------------------------------Build Model-------------------------------//
process = buildStringDamp(nPoints,modelType); | import("stdfaust.lib");
nPoints = 10;
modelType = 0;
k = 1/ma.SR;
c = 344;
h = c*k;
s0 = 500;
nPointInputs = inputs(stringDampMidPoint);
C1 = 1+(2*s0*k*k/h);
C2 = (2*s0*k*k/h)-1;
lambda = c*k/h;
stringDampMidPoint(i, uSide_l, uSide_r) = equation
with
{
fIn = linInterpolForce(i,inPoint,forceModel);
letrec
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*(uSide_l+uSide_r)/C1 + fIn;
};
};
stringDampFreePointL(i, uSide_l, uSide_r) = equation
with
{
fIn = linInterpolForce(i,inPoint,forceModel);
equation = u
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide_r/C1 + fIn;
};
};
stringDampFreePointR(i, uSide_l, uSide_r) = equation
with
{
fIn = linInterpolForce(i,inPoint,forceModel);
equation = u
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide_l/C1 + fIn;
};
};
fixedPoint(i, uSide_l, uSide_r) = 0;
buildStringDamp(nPoints,modelType) = par(i, nPoints, stringDampMidPoint(i));
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,0.01);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
forceModel = hit;
linInterpolForce(i,inPoint,force) = force*select2(
i==int(inPoint), select2(i==int(inPoint+1),0,fraction),(1-fraction))
with
{
fraction = ma.frac(inPoint);
};
linInterpolOut(outPoint) = par(i,nPoints,_*select2(
i==int(outPoint), select2(i==int(outPoint+1),0,fraction),(1-fraction))):>_
with
{
fraction = ma.frac(outPoint);
};
model = (route(nPoints,nPoints*spaceDep*2,
par(i,nPoints,
par(j, spaceDep,
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep)),
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep) +
2*spaceDep^2+spaceDep)))):
buildStringDamp(nPoints,modelType))~
(si.bus(nPoints)):
si.bus(nPoints):linInterpolOut(outPoint);
process = model<:_,_;
|
cab1e3808e628129e605abe42a7a446f5b538ac6db1d23add3ec54c6c20c6efc | Rickr922/Faust-FDS | stiffStringDampInterp.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
nPoints = 30;
//modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
modelType = 0;
k = 1/ma.SR;
//Stability condition
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
T = 150; // Tension [N]
//T = hslider("Tension",150,10,1000,0.1);
radius = 3.5560e-04; // Radius (0.016 gauge) [m]
rho = 8.05*10^3; // Density [kg/m^3];
Area = ma.PI*radius^2; // Area of string section
I = (ma.PI*radius^4)/ 4; // Moment of Inertia
L = 1; // String length [m]
Emod = 174e4; // Young modulus [Pa]
K = sqrt(Emod*I/rho/Area); // Stiffness parameter
c = sqrt(T/rho/Area); // Wave speed
sigma1 = 0.01; // Frequency dependent damping
sigma0 = 0.0005;
//----------------------------------Equations--------------------------------//
nPointInputs = inputs(midPointEq);
spaceDep = (nPointInputs-1)/2; //n° of spatial side points needed by the update eq
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
midPointEq(i, uSide_ll, uSide_l, uSide_r, uSide_rr) = equation
with
{
fIn = linInterpolForce(i,inPoint,forceModel);
equation = u
letrec //u_(l-1)=uSide_l,u_(l+1)=uSide_r
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
};
//NOT WORKING
freePointEqL(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
freePointEqR(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
fixedPoint(i, uSide_ll, uSide_l, uSide_r, uSide_rr) = 0;
buildStringDamp(nPoints,modelType) = par(i, nPoints, midPointEq(i));
//----------------------------------Controls---------------------------------//
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,0.01);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
//----------------------------------Force---------------------------------//
forceModel = hit;
linInterpolForce(i,inPoint,force) = force*select2(
i==int(inPoint), select2(i==int(inPoint+1),0,fraction),(1-fraction))
with
{
fraction = ma.frac(inPoint);
};
//NOT WORKING
raisedCosine(0) = 0;
raisedCosine(n) = 0.5*(1+cos(ma.PI*(n-inPoint)/0.1));
//----------------------------------Out Points-------------------------------//
linInterpolOut(outPoint) = par(i,nPoints,_*select2(
i==int(outPoint), select2(i==int(outPoint+1),0,fraction),(1-fraction))):>_
with
{
fraction = ma.frac(outPoint);
};
//----------------------------------Build Model-------------------------------//
model = (route(nPoints,nPoints*spaceDep*2,
par(i,nPoints,
par(j, spaceDep,
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep)),
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep) +
2*spaceDep^2+spaceDep)))):
buildStringDamp(nPoints,modelType))~
(si.bus(nPoints)):
si.bus(nPoints):linInterpolOut(outPoint);
process = model<:_,_;
//process = buildStringDamp(nPoints,modelType);
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/oldRoute/stiffStringDamp/stiffStringDampInterp.dsp | faust | --------------------------------Model Settings-----------------------------//
modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
Stability condition
Tension [N]
T = hslider("Tension",150,10,1000,0.1);
Radius (0.016 gauge) [m]
Density [kg/m^3];
Area of string section
Moment of Inertia
String length [m]
Young modulus [Pa]
Stiffness parameter
Wave speed
Frequency dependent damping
----------------------------------Equations--------------------------------//
n° of spatial side points needed by the update eq
u_(l-1)=uSide_l,u_(l+1)=uSide_r
NOT WORKING
----------------------------------Controls---------------------------------//
----------------------------------Force---------------------------------//
NOT WORKING
----------------------------------Out Points-------------------------------//
----------------------------------Build Model-------------------------------//
process = buildStringDamp(nPoints,modelType); | import("stdfaust.lib");
nPoints = 30;
modelType = 0;
k = 1/ma.SR;
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
sigma0 = 0.0005;
nPointInputs = inputs(midPointEq);
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
midPointEq(i, uSide_ll, uSide_l, uSide_r, uSide_rr) = equation
with
{
fIn = linInterpolForce(i,inPoint,forceModel);
equation = u
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
};
freePointEqL(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
freePointEqR(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
fixedPoint(i, uSide_ll, uSide_l, uSide_r, uSide_rr) = 0;
buildStringDamp(nPoints,modelType) = par(i, nPoints, midPointEq(i));
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,0.01);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
forceModel = hit;
linInterpolForce(i,inPoint,force) = force*select2(
i==int(inPoint), select2(i==int(inPoint+1),0,fraction),(1-fraction))
with
{
fraction = ma.frac(inPoint);
};
raisedCosine(0) = 0;
raisedCosine(n) = 0.5*(1+cos(ma.PI*(n-inPoint)/0.1));
linInterpolOut(outPoint) = par(i,nPoints,_*select2(
i==int(outPoint), select2(i==int(outPoint+1),0,fraction),(1-fraction))):>_
with
{
fraction = ma.frac(outPoint);
};
model = (route(nPoints,nPoints*spaceDep*2,
par(i,nPoints,
par(j, spaceDep,
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep)),
(i+1, 2*spaceDep*i + (2*spaceDep-1)*j - 2*(spaceDep^2-spaceDep) +
2*spaceDep^2+spaceDep)))):
buildStringDamp(nPoints,modelType))~
(si.bus(nPoints)):
si.bus(nPoints):linInterpolOut(outPoint);
process = model<:_,_;
|
9975779116049fd4044e1062cfebf3ff8604d73e12d890a9007c2b4f63ecdc10 | Rickr922/Faust-FDS | stiffStringDampAuto.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
nPoints = 80;
//modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
modelType = 0;
k = 1/ma.SR;
//Stability condition
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
//T = 150; // Tension [N]
T = hslider("Tension",150,10,1000,0.1);
radius = 3.5560e-04; // Radius (0.016 gauge) [m]
rho = 8.05*10^3; // Density [kg/m^3];
Area = ma.PI*radius^2; // Area of string section
I = (ma.PI*radius^4)/ 4; // Moment of Inertia
L = 1; // String length [m]
Emod = 174e6; // Young modulus [Pa]
K = sqrt(Emod*I/rho/Area); // Stiffness parameter
c = sqrt(T/rho/Area); // Wave speed
sigma1 = 0.01; // Frequency dependent damping
sigma0 = 0.0005;
//----------------------------------Equations--------------------------------//
nPointInputs = inputs(midPointEq);
nSidePoints = nPointInputs-1; //twice the number of side points (left + right)
spaceDep = nSidePoints/2; //n° of spatial side points needed by the update eq
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
midPointEq(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u //u_(l-1)=uSide_l,u_(l+1)=uSide_r
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
//NOT WORKING
freePointEqL(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
freePointEqR(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
fixedPoint(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = 0;
buildStringDamp(nPoints,modelType) = par(i, nPoints, midPointEq);
/*
//modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
par(i,nSidePoints,
(si.bus(nPointInputs)<:(midPointEq, freePointEqL:select2(modelType==1)))),
par(i, nPoints-nSidePoints, midPointEq),
par(i,nSidePoints,
(si.bus(nPointInputs)<:(midPointEq, freePointEqR:select2(modelType==2))));
//par(i, nPoints, midPointEq);*/
//----------------------------------Controls---------------------------------//
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,1);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,1);
//----------------------------------Build Model-------------------------------//
model =
(route(2*nPoints,nPoints*nSidePoints+nPoints,
par(i,nPoints,
par(j, spaceDep,
(i+1, nPointInputs*i + nSidePoints*j - nPointInputs*(spaceDep-1)),
(i+1, nPointInputs*i + nSidePoints*j - nPointInputs*(spaceDep-1) +
2*spaceDep^2+nPointInputs))),
par(i,nPoints,(nPoints+1+i,1+nPointInputs*i))):
buildStringDamp(nPoints,modelType))~
si.bus(nPoints):
si.bus(nPoints):ba.selectn(nPoints,outPoint);
//(si.bus(nPoints):par(i,nPoints,*select2(stop,1,0))):
process = hit:ba.selectoutn(nPoints,inPoint):model<:_,_;
//process = buildStringDamp(nPoints,modelType);
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/oldRoute/stiffStringDamp/stiffStringDampAuto.dsp | faust | --------------------------------Model Settings-----------------------------//
modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
Stability condition
T = 150; // Tension [N]
Radius (0.016 gauge) [m]
Density [kg/m^3];
Area of string section
Moment of Inertia
String length [m]
Young modulus [Pa]
Stiffness parameter
Wave speed
Frequency dependent damping
----------------------------------Equations--------------------------------//
twice the number of side points (left + right)
n° of spatial side points needed by the update eq
u_(l-1)=uSide_l,u_(l+1)=uSide_r
NOT WORKING
//modelType: 1->free-fixed; 2->fixed-free; else->fixed-fixed
par(i,nSidePoints,
(si.bus(nPointInputs)<:(midPointEq, freePointEqL:select2(modelType==1)))),
par(i, nPoints-nSidePoints, midPointEq),
par(i,nSidePoints,
(si.bus(nPointInputs)<:(midPointEq, freePointEqR:select2(modelType==2))));
//par(i, nPoints, midPointEq);
----------------------------------Controls---------------------------------//
----------------------------------Build Model-------------------------------//
(si.bus(nPoints):par(i,nPoints,*select2(stop,1,0))):
process = buildStringDamp(nPoints,modelType); | import("stdfaust.lib");
nPoints = 80;
modelType = 0;
k = 1/ma.SR;
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
T = hslider("Tension",150,10,1000,0.1);
sigma0 = 0.0005;
nPointInputs = inputs(midPointEq);
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
freePointEqL(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
freePointEqR(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = u
letrec
{
'u = A*u + B*u' + C*(uSide_r+uSide_l) + D*(uSide_r'+uSide_l') + E*(uSide_rr+uSide_ll) + fIn;
};
fixedPoint(fIn, uSide_ll, uSide_l, uSide_r, uSide_rr) = 0;
buildStringDamp(nPoints,modelType) = par(i, nPoints, midPointEq);
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPoint=hslider("input point", floor(nPoints/2),0,nPoints-1,1);
outPoint=hslider("output point",floor(nPoints/2),0,nPoints-1,1);
model =
(route(2*nPoints,nPoints*nSidePoints+nPoints,
par(i,nPoints,
par(j, spaceDep,
(i+1, nPointInputs*i + nSidePoints*j - nPointInputs*(spaceDep-1)),
(i+1, nPointInputs*i + nSidePoints*j - nPointInputs*(spaceDep-1) +
2*spaceDep^2+nPointInputs))),
par(i,nPoints,(nPoints+1+i,1+nPointInputs*i))):
buildStringDamp(nPoints,modelType))~
si.bus(nPoints):
si.bus(nPoints):ba.selectn(nPoints,outPoint);
process = hit:ba.selectoutn(nPoints,inPoint):model<:_,_;
|
065bc398d839f711322dabafee3c8d746e2b74b0a1cfa963e26fa41a6e56c008 | Rickr922/Faust-FDS | string1_D_19.dsp | import("stdfaust.lib");
k = 1/ma.SR;
c = 344;
h = c*k;
lambda = c*k/h;
string1dMidPoint(fIn, uSide_l, uSide_r) = u
letrec
{
'u = 2*u-u'+ lambda*lambda*(uSide_l-2*u+uSide_r) + fIn;
};
updatePoint(fIn, uSide_l, uSide_r) = string1dMidPoint(fIn, uSide_l, uSide_r)<:_,_; //u_(l-1)=uSide_l, u_(l+1)=uSide_r
updatePointOut(fIn, uSide_l, uSide_r) = string1dMidPoint(fIn, uSide_l, uSide_r)<:_,_,_; //u_(l-1)=uSide_l, u_(l+1)=uSide_r
fixedPoint(uSide) = 0;
freePoint(uSide) = u
letrec
{
'u = 2*u-u'+ lambda*lambda*2*(uSide - u);
};
/*
NOTATION: u_n_m
n indicates the number of element (update or fixed point)
m indicates the connection: 1 is left connection, 2 is right connections
Ex: the extreme left point 0 gives out only x02 because it only has a right
connection, a generic element gives xn1, xn2, the extreme right point N
gives out only xN1 because it has only a left connection
*/
//routeOut takes the output and puts it as the last connection
/*routeOut(
u02,
u11,u12,
u21,u22,
u31,u32,
u41,u42,
u51,u52,
u61,u62,uOut,
u71,u72,
u81) = u02,u11,u12,u21,u22,u31,u32,u41,u42,u51,u52,u61,u62,u71,u72,u81,uOut;*/
//routeIn needs to switch all the connections and give them to the proper elements
/*routeIn(u02,u11,u12,u21,u22,u31,u32,u41,u42,u51,u52,u61,u62,u71,u72,u81,fIn) =
u11,
u02,u21,
u12,u31,
u22,u41,
fIn,u32,u51,
u42,u61,
u52,u71,
u62,u81,
u72;*/
hit = button("hit"):ba.impulsify;
model =
(route(37,37,
(1,2),
(2,1),(3,4),
(4,3),(5,6),
(6,5),(7,8),
(8,7),(9,10),
(10,9),(11,12),
(12,11),(13,14),
(14,13),(15,16),
(16,15),(17,19),//out 18 left free for the force in->everything else jumps one place
(18,17),(19,21),
(20,20),(21,23),
(22,22),(23,25),
(24,24),(25,27),
(26,26),(27,29),
(28,28),(29,31),
(30,30),(31,33),
(32,32),(33,35),
(34,34),(35,37),
(36,36),(37,18))://force in
fixedPoint,
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint,
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePointOut(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
fixedPoint :
route(37,37, //routeOut
(1,1),
(2,2),
(3,3),
(4,4),
(5,5),
(6,6),
(7,7),
(8,8),
(9,9),
(10,10),
(11,11),
(12,12),
(13,13),
(14,14),
(15,15),
(16,16),
(17,17),
(18,18),
(19,19),
(20,20),
(21,21),
(22,22),
(23,23),
(24,24),
(25,25),
(26,26),
(27,27),
(28,37),//out signal->routed to last slot
(29,28),
(30,29),
(31,30),
(32,31),
(33,32),
(34,33),
(35,34),
(36,35),
(37,36))
)~par(i, 36, _): par(i, 36,!), par(i, 1, _);
process = hit:model<:_,_;
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/oldRoute/string/string1_D_19.dsp | faust | u_(l-1)=uSide_l, u_(l+1)=uSide_r
u_(l-1)=uSide_l, u_(l+1)=uSide_r
NOTATION: u_n_m
n indicates the number of element (update or fixed point)
m indicates the connection: 1 is left connection, 2 is right connections
Ex: the extreme left point 0 gives out only x02 because it only has a right
connection, a generic element gives xn1, xn2, the extreme right point N
gives out only xN1 because it has only a left connection
routeOut takes the output and puts it as the last connection
routeOut(
u02,
u11,u12,
u21,u22,
u31,u32,
u41,u42,
u51,u52,
u61,u62,uOut,
u71,u72,
u81) = u02,u11,u12,u21,u22,u31,u32,u41,u42,u51,u52,u61,u62,u71,u72,u81,uOut;
routeIn needs to switch all the connections and give them to the proper elements
routeIn(u02,u11,u12,u21,u22,u31,u32,u41,u42,u51,u52,u61,u62,u71,u72,u81,fIn) =
u11,
u02,u21,
u12,u31,
u22,u41,
fIn,u32,u51,
u42,u61,
u52,u71,
u62,u81,
u72;
out 18 left free for the force in->everything else jumps one place
force in
routeOut
out signal->routed to last slot | import("stdfaust.lib");
k = 1/ma.SR;
c = 344;
h = c*k;
lambda = c*k/h;
string1dMidPoint(fIn, uSide_l, uSide_r) = u
letrec
{
'u = 2*u-u'+ lambda*lambda*(uSide_l-2*u+uSide_r) + fIn;
};
fixedPoint(uSide) = 0;
freePoint(uSide) = u
letrec
{
'u = 2*u-u'+ lambda*lambda*2*(uSide - u);
};
hit = button("hit"):ba.impulsify;
model =
(route(37,37,
(1,2),
(2,1),(3,4),
(4,3),(5,6),
(6,5),(7,8),
(8,7),(9,10),
(10,9),(11,12),
(12,11),(13,14),
(14,13),(15,16),
(18,17),(19,21),
(20,20),(21,23),
(22,22),(23,25),
(24,24),(25,27),
(26,26),(27,29),
(28,28),(29,31),
(30,30),(31,33),
(32,32),(33,35),
(34,34),(35,37),
fixedPoint,
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint,
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
updatePointOut(0),
updatePoint(0),
updatePoint(0),
updatePoint(0),
fixedPoint :
(1,1),
(2,2),
(3,3),
(4,4),
(5,5),
(6,6),
(7,7),
(8,8),
(9,9),
(10,10),
(11,11),
(12,12),
(13,13),
(14,14),
(15,15),
(16,16),
(17,17),
(18,18),
(19,19),
(20,20),
(21,21),
(22,22),
(23,23),
(24,24),
(25,25),
(26,26),
(27,27),
(29,28),
(30,29),
(31,30),
(32,31),
(33,32),
(34,33),
(35,34),
(36,35),
(37,36))
)~par(i, 36, _): par(i, 36,!), par(i, 1, _);
process = hit:model<:_,_;
|
6c49356fd8daa259126306f1e71e73be2160a097b47954d4cf8791b493e7cbab | Rickr922/Faust-FDS | 2dWave.dsp | import("stdfaust.lib");
//--------------------------------Model Settings-----------------------------//
nPointsX = 30;
nPointsY = 10;
k = 1/ma.SR;
c = 344;
h = c * k*sqrt(2);
s0 = 500;
//----------------------------------Equations--------------------------------//
nPointInputs = inputs(waveMidPoint);
nDepX = 2;
nDepY = 2;
nDep = nPointInputs-2;
spaceDep = (nPointInputs-2)/2; //n° of spatial side points needed by the update eq
lambda = c*k/h;
waveMidPoint(i,j, uSide_w, uSide_e, uSide_s, uSide_n) = equation
with
{
//fIn = forceModel*(i==inPointX)*(j==inPointY); stairs approx
fIn = linInterpolation2dIn(i,j,inPointX,inPointY,forceModel);
equation = u ///u_(l-1)=uSide_w,u_(l+1)=uSide_e,u_(m-1)=uSide_s,u_(m+1)=uSide_n,
letrec
{
'u = u*2*(1-2*lambda*lambda) - u' + lambda*lambda*(uSide_e+uSide_w+uSide_n+uSide_s) + fIn;
};
};
stringDampFreePointL(i, uSide_l, uSide_r) = equation
with
{
fIn = linInterpolForce(i,inPoint,forceModel);
equation = u
letrec //u_(l-1)=uSide_l,u_(l+1)=uSide_r
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide_r/C1 + fIn;
};
};
stringDampFreePointR(i, uSide_l, uSide_r) = equation
with
{
fIn = linInterpolForce(i,inPoint,forceModel);
equation = u
letrec //u_(l-1)=uSide_l,u_(l+1)=uSide_r
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide_l/C1 + fIn;
};
};
fixedPoint(i, uSide_l, uSide_r) = 0;
buildScheme(pointsX,pointsY) =
par(i, pointsX,
par(j,pointsY, waveMidPoint(i,j)));
//Nota che non mi servono i fixed points perchè nelle connessioni
// vuote entra 0!! Praticamente è come se avessi dei virtual boundaries
//----------------------------------Controls---------------------------------//
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPointX=hslider("input point x", floor(nPointsX/2),0,nPointsX-1,0.01);
inPointY=hslider("input point y", floor(nPointsY/2),0,nPointsY-1,0.01);
outPointX=hslider("output point x",floor(nPointsX/2),0,nPointsX-1,0.01);
outPointY=hslider("output point y",floor(nPointsY/2),0,nPointsY-1,0.01);
//----------------------------------Force---------------------------------//
forceModel = hit;
linInterpolation2dIn(i,j,pointX,pointY,force) =
force*select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY))
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
//----------------------------------Out Points-------------------------------//
linInterpolation2dOut(pointX,pointY) =
par(i,nPointsX,
par(j,nPointsY,_*
select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY)))):>_
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
//----------------------------------Build Model-------------------------------//
model =
(route(nPointsX*nPointsY,nPointsX*nPointsY*nDep,
par(i,nPointsX,
par(j, nPointsY,
(j+1+nPointsY*i,
nDep*(j+nPointsY*i)*(fmod(j+nPointsY*i,nPointsY)!=0)),
(j+1+nPointsY*i,
(nDep*(j+nPointsY*i)+nDepX*2+nDepY+1)*(fmod((j+1)+nPointsY*i,nPointsY)!=0)))),
par(i,nPointsX,
par(j, nPointsY,
(j+1+nPointsY*i,4*(j+nPointsY*i)+2-nDep*nPointsY),
(j+1+nPointsY*i,4*(j+nPointsY*i)+nDep*nPointsY+1)))):
buildScheme(nPointsX,nPointsY))~
si.bus(nPointsX*nPointsY):
si.bus(nPointsX*nPointsY):
linInterpolation2dOut(outPointX,outPointY);
process = model<:_,_;
//process = fmod(0,3)!=0;
//process=_<:par(i,3,par(j,3,_*(i*j)));
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ada5dcf25eceaac3c2b5d13de55f2a37c9e7a34e/oldRoute/2dWave/2dWave.dsp | faust | --------------------------------Model Settings-----------------------------//
----------------------------------Equations--------------------------------//
n° of spatial side points needed by the update eq
fIn = forceModel*(i==inPointX)*(j==inPointY); stairs approx
/u_(l-1)=uSide_w,u_(l+1)=uSide_e,u_(m-1)=uSide_s,u_(m+1)=uSide_n,
u_(l-1)=uSide_l,u_(l+1)=uSide_r
u_(l-1)=uSide_l,u_(l+1)=uSide_r
Nota che non mi servono i fixed points perchè nelle connessioni
vuote entra 0!! Praticamente è come se avessi dei virtual boundaries
----------------------------------Controls---------------------------------//
----------------------------------Force---------------------------------//
----------------------------------Out Points-------------------------------//
----------------------------------Build Model-------------------------------//
process = fmod(0,3)!=0;
process=_<:par(i,3,par(j,3,_*(i*j))); | import("stdfaust.lib");
nPointsX = 30;
nPointsY = 10;
k = 1/ma.SR;
c = 344;
h = c * k*sqrt(2);
s0 = 500;
nPointInputs = inputs(waveMidPoint);
nDepX = 2;
nDepY = 2;
nDep = nPointInputs-2;
lambda = c*k/h;
waveMidPoint(i,j, uSide_w, uSide_e, uSide_s, uSide_n) = equation
with
{
fIn = linInterpolation2dIn(i,j,inPointX,inPointY,forceModel);
letrec
{
'u = u*2*(1-2*lambda*lambda) - u' + lambda*lambda*(uSide_e+uSide_w+uSide_n+uSide_s) + fIn;
};
};
stringDampFreePointL(i, uSide_l, uSide_r) = equation
with
{
fIn = linInterpolForce(i,inPoint,forceModel);
equation = u
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide_r/C1 + fIn;
};
};
stringDampFreePointR(i, uSide_l, uSide_r) = equation
with
{
fIn = linInterpolForce(i,inPoint,forceModel);
equation = u
{
'u = u*2*(1-lambda*lambda)/C1+u'*C2/C1+ lambda*lambda*2*uSide_l/C1 + fIn;
};
};
fixedPoint(i, uSide_l, uSide_r) = 0;
buildScheme(pointsX,pointsY) =
par(i, pointsX,
par(j,pointsY, waveMidPoint(i,j)));
hit = button("hit"):ba.impulsify;
stop = button("Stop");
inPointX=hslider("input point x", floor(nPointsX/2),0,nPointsX-1,0.01);
inPointY=hslider("input point y", floor(nPointsY/2),0,nPointsY-1,0.01);
outPointX=hslider("output point x",floor(nPointsX/2),0,nPointsX-1,0.01);
outPointY=hslider("output point y",floor(nPointsY/2),0,nPointsY-1,0.01);
forceModel = hit;
linInterpolation2dIn(i,j,pointX,pointY,force) =
force*select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY))
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
linInterpolation2dOut(pointX,pointY) =
par(i,nPointsX,
par(j,nPointsY,_*
select2((i==intX) & (j==intY),
select2((i==(intX+1)) & (j==intY),
select2((i==intX) & (j==(intY+1)),
select2((i==(intX+1)) & (j==(intY+1)),
0,
fractionX*fractionY),
(1-fractionX)*fractionY),
fractionX*(1-fractionY)),
(1-fractionX)*(1-fractionY)))):>_
with
{
fractionX = ma.frac(pointX);
fractionY = ma.frac(pointY);
intX = int(pointX);
intY = int(pointY);
};
model =
(route(nPointsX*nPointsY,nPointsX*nPointsY*nDep,
par(i,nPointsX,
par(j, nPointsY,
(j+1+nPointsY*i,
nDep*(j+nPointsY*i)*(fmod(j+nPointsY*i,nPointsY)!=0)),
(j+1+nPointsY*i,
(nDep*(j+nPointsY*i)+nDepX*2+nDepY+1)*(fmod((j+1)+nPointsY*i,nPointsY)!=0)))),
par(i,nPointsX,
par(j, nPointsY,
(j+1+nPointsY*i,4*(j+nPointsY*i)+2-nDep*nPointsY),
(j+1+nPointsY*i,4*(j+nPointsY*i)+nDep*nPointsY+1)))):
buildScheme(nPointsX,nPointsY))~
si.bus(nPointsX*nPointsY):
si.bus(nPointsX*nPointsY):
linInterpolation2dOut(outPointX,outPointY);
process = model<:_,_;
|
d1587ffad8d8b514f7898ce04df6c334ea7ea7d03c8008809b660243a178bb49 | Rickr922/echoplex-sim | tapeDelay.dsp | import("stdfaust.lib");
//Average filter
filterLength = 500;
movingAvg(x) = par(i, filterLength, x@(i)):>_/filterLength;
//Delay handle delay
delayAvg = delMs * (ma.SR/1000) : movingAvg;
delSec = delMs / 1000;
//Measured tape speed= 8ips = 0.203 m/s
//headDist = 0.203 * delSec; //[m] Not used
//creating an angular frequency
pulse(freq) = os.lf_saw(freq) * (ma.PI);
//phasenoise frequency is related to drift freq: i want smooth changes->freq has to be lower for
//low freq drift while noise amplitude has to be higher
delDrift1 = sin(sinArg) * ampliSec * ma.SR //Capstan: Observed amplitude = 0.15 ms
with
{
phaseNoise = (no.noise*5) : fi.lowpass6e(100); //adding noise to phase
freq = 26;
phase = ma.PI * 3/2 + phaseNoise;
sinArg = pulse(freq) + phase;
ampliSec = 0.00015;
};
delDrift2 = sin(sinArg) * ampliSec * ma.SR //Pinch wheel1: Observed amplitude = 0.15 ms
with
{
phaseNoise = (no.noise*7) : fi.lowpass6e(35); //adding noise to phase
freq = 5;
phase = 0 + phaseNoise; //not visible in paper
sinArg = pulse(freq) + phase;
ampliSec = 0.00010 * delSec;
};
delDrift3 = sin(sinArg) * ampliSec * ma.SR //Pinch wheel2: Observed amplitude = 0.75 ms
with
{
phaseNoise = (no.noise*20) : fi.lowpass6e(20); //adding noise to phase
freq = 2.5;
phase = ma.PI * 3/4 + phaseNoise;
sinArg = pulse(freq) + phase;
ampliSec = 0.00075 * delSec;
};
//Noise
delNoise = (no.noise* noiseAmp * ma.SR) : LPfilter
with
{
//Noise is proportional to head separation.
noiseAmp = 0.00075 * delSec;
LPfilter = fi.lowpass3e(70);
};
//0.75 is a factor to make the overall variation level similar to the paper
delayTotal = ((delDrift1 + delDrift2 + delDrift3 + delNoise)*0.75) + delayAvg;
//Variable comb filter
pole = 0.9999;
filterDel = startFactor + ((endFactor-startFactor) * delSec) : int
with
{ //48000 hardcoded SR, for some reason it does not work with ma.SR
firstNotchFreqStart = 7.5; //[Hz]
firstNotchFreqEnd = 2;
startFactor = 48000/(2 * firstNotchFreqStart);
endFactor = 48000/(2 * firstNotchFreqEnd);
};
ffComb(delay, pole) = _<:_, _@delay*pole :> _/2;
delayProcessed = delayTotal : ffComb(filterDel, pole) : int;
//Actual Delay + feedback
delayFunction(n, d, x) = x @ min(n, max(0, d));
feedback(x) = (x : tapeSat + x ~ (delay * repeats)) : filter
with
{
tapeSat = co.limiter_1176_R4_mono;
delay = delayFunction(50000, delayProcessed, x);
filter = fi.lowpass(2,7000);
};
//Nonlinear distortion
//amplifier(g) = ef.cubicnl_nodc(g, 0.1); //Not used
//User params
delMs = hslider("delay(ms)", 300, 1, 1000, 1);
repeats = vslider("feedback[style:knob]", 0.5, 0, 2, 0.01);
//echoLevel = vslider("Echo Volume[style:knob]", 0.5, 0, 1, 0.01); //Not used
/*Process*/
process = feedback(_) <: _, _; | https://raw.githubusercontent.com/Rickr922/echoplex-sim/90933e2bc65710207baacb0118b6b591b753e6e7/tapeDelay.dsp | faust | Average filter
Delay handle delay
Measured tape speed= 8ips = 0.203 m/s
headDist = 0.203 * delSec; //[m] Not used
creating an angular frequency
phasenoise frequency is related to drift freq: i want smooth changes->freq has to be lower for
low freq drift while noise amplitude has to be higher
Capstan: Observed amplitude = 0.15 ms
adding noise to phase
Pinch wheel1: Observed amplitude = 0.15 ms
adding noise to phase
not visible in paper
Pinch wheel2: Observed amplitude = 0.75 ms
adding noise to phase
Noise
Noise is proportional to head separation.
0.75 is a factor to make the overall variation level similar to the paper
Variable comb filter
48000 hardcoded SR, for some reason it does not work with ma.SR
[Hz]
Actual Delay + feedback
Nonlinear distortion
amplifier(g) = ef.cubicnl_nodc(g, 0.1); //Not used
User params
echoLevel = vslider("Echo Volume[style:knob]", 0.5, 0, 1, 0.01); //Not used
Process | import("stdfaust.lib");
filterLength = 500;
movingAvg(x) = par(i, filterLength, x@(i)):>_/filterLength;
delayAvg = delMs * (ma.SR/1000) : movingAvg;
delSec = delMs / 1000;
pulse(freq) = os.lf_saw(freq) * (ma.PI);
with
{
freq = 26;
phase = ma.PI * 3/2 + phaseNoise;
sinArg = pulse(freq) + phase;
ampliSec = 0.00015;
};
with
{
freq = 5;
sinArg = pulse(freq) + phase;
ampliSec = 0.00010 * delSec;
};
with
{
freq = 2.5;
phase = ma.PI * 3/4 + phaseNoise;
sinArg = pulse(freq) + phase;
ampliSec = 0.00075 * delSec;
};
delNoise = (no.noise* noiseAmp * ma.SR) : LPfilter
with
{
noiseAmp = 0.00075 * delSec;
LPfilter = fi.lowpass3e(70);
};
delayTotal = ((delDrift1 + delDrift2 + delDrift3 + delNoise)*0.75) + delayAvg;
pole = 0.9999;
filterDel = startFactor + ((endFactor-startFactor) * delSec) : int
with
firstNotchFreqEnd = 2;
startFactor = 48000/(2 * firstNotchFreqStart);
endFactor = 48000/(2 * firstNotchFreqEnd);
};
ffComb(delay, pole) = _<:_, _@delay*pole :> _/2;
delayProcessed = delayTotal : ffComb(filterDel, pole) : int;
delayFunction(n, d, x) = x @ min(n, max(0, d));
feedback(x) = (x : tapeSat + x ~ (delay * repeats)) : filter
with
{
tapeSat = co.limiter_1176_R4_mono;
delay = delayFunction(50000, delayProcessed, x);
filter = fi.lowpass(2,7000);
};
delMs = hslider("delay(ms)", 300, 1, 1000, 1);
repeats = vslider("feedback[style:knob]", 0.5, 0, 2, 0.01);
process = feedback(_) <: _, _; |
c85dff7c9c897d5ef6b10a88e9d9c7a33b2a948b5de6d3859d4c396552bb5aaa | ossia/score-user-library | gateCompressor.dsp | declare name "gateCompressor";
import("stdfaust.lib");
process =
vgroup("[1]", dm.sawtooth_demo) <:
vgroup("[2]", dm.gate_demo) :
vgroup("[3]", dm.compressor_demo) :>
vgroup("[4]", dm.spectral_level_demo) <:
_,_;
| https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/dynamic/gateCompressor.dsp | faust | declare name "gateCompressor";
import("stdfaust.lib");
process =
vgroup("[1]", dm.sawtooth_demo) <:
vgroup("[2]", dm.gate_demo) :
vgroup("[3]", dm.compressor_demo) :>
vgroup("[4]", dm.spectral_level_demo) <:
_,_;
|
|
b77dd7dd0520fe6a9e15b5a3870946328eb4c2e5db6f7140f2c4273b3bd34cca | ossia/score-user-library | graphicEqLab.dsp | declare name "graphicEqLab";
declare description "Signal generators through a filter bank with spectrum analysis display";
import("stdfaust.lib");
process =
vgroup("[1]",dm.sawtooth_demo) :
vgroup("[2]",dm.filterbank_demo) :
vgroup("[3]",dm.spectral_level_demo) <:
_,_;
| https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/filtering/graphicEqLab.dsp | faust | declare name "graphicEqLab";
declare description "Signal generators through a filter bank with spectrum analysis display";
import("stdfaust.lib");
process =
vgroup("[1]",dm.sawtooth_demo) :
vgroup("[2]",dm.filterbank_demo) :
vgroup("[3]",dm.spectral_level_demo) <:
_,_;
|
|
454215f900b532f0d6275bd99e764fb132222adfffa2d237a396bf7c8a3e2132 | ossia/score-user-library | phaserFlangerLab.dsp | declare name "phaserFlangerLab";
import("stdfaust.lib");
fx_stack =
vgroup("[1]", dm.sawtooth_demo) <:
vgroup("[2]", dm.flanger_demo) :
vgroup("[3]", dm.phaser2_demo);
level_viewer(x,y) = attach(x, vgroup("[4]", dm.spectral_level_demo(x+y))),y;
process = fx_stack : level_viewer;
| https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/phasing/phaserFlangerLab.dsp | faust | declare name "phaserFlangerLab";
import("stdfaust.lib");
fx_stack =
vgroup("[1]", dm.sawtooth_demo) <:
vgroup("[2]", dm.flanger_demo) :
vgroup("[3]", dm.phaser2_demo);
level_viewer(x,y) = attach(x, vgroup("[4]", dm.spectral_level_demo(x+y))),y;
process = fx_stack : level_viewer;
|
|
90d677f72f0c4f6f4c71312e861f424b92c8698e558ada0056bcb80e233da191 | ossia/score-user-library | parametricEqLab.dsp | declare name "parametricEqLab";
declare description "Demonstrate the Parametric Equalizer sections on test signals with spectrum analysis display";
import("stdfaust.lib");
process =
vgroup("[1]", dm.sawtooth_demo) :
vgroup("[2]", dm.parametric_eq_demo) :
vgroup("[3]", dm.mth_octave_spectral_level_demo(2))
<: _,_;
| https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/filtering/parametricEqLab.dsp | faust | declare name "parametricEqLab";
declare description "Demonstrate the Parametric Equalizer sections on test signals with spectrum analysis display";
import("stdfaust.lib");
process =
vgroup("[1]", dm.sawtooth_demo) :
vgroup("[2]", dm.parametric_eq_demo) :
vgroup("[3]", dm.mth_octave_spectral_level_demo(2))
<: _,_;
|
|
977fa5971ab6d23d13b96f16d95104fecf11aa63f82f659e1f0f9931bb1467c6 | ossia/score-user-library | vcfWahLab.dsp | import("stdfaust.lib");
declare description "Demonstrate competing variable-lowpass-filter effects on test signals with spectrum analysis display";
declare name "vcfWahLab";
process =
vgroup("[1]", dm.sawtooth_demo) :
vgroup("[2]", dm.crybaby_demo) :
vgroup("[3]", dm.wah4_demo) :
vgroup("[4]", dm.moog_vcf_demo) :
vgroup("[5]", dm.spectral_level_demo) <:
_,_;
| https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/filtering/vcfWahLab.dsp | faust | import("stdfaust.lib");
declare description "Demonstrate competing variable-lowpass-filter effects on test signals with spectrum analysis display";
declare name "vcfWahLab";
process =
vgroup("[1]", dm.sawtooth_demo) :
vgroup("[2]", dm.crybaby_demo) :
vgroup("[3]", dm.wah4_demo) :
vgroup("[4]", dm.moog_vcf_demo) :
vgroup("[5]", dm.spectral_level_demo) <:
_,_;
|
|
f15a1a7946998163b5f9f5f074af4de6ce132db64a4be0968a0037b85468544e | ossia/score-user-library | demixer.dsp | declare name "demixer";
declare author "SCRIME";
import("stdfaust.lib");
N = 7; // Numbre of speaker pairs
master = hslider("master", 0.5, 0, 1, 0.00001) : ba.lin2LogGain : si.smoo; // master volume slider;
sub = hslider("sub", 0.5, 0, 1, 0.00001) : ba.lin2LogGain : si.smoo; // subwofer volume slider;
left(i) = hslider("[(%i *2) +1]left_%i", 0.5, 0, 1, 0.00001) : ba.lin2LogGain : si.smoo; // left volume slider;
wright(i) = hslider("[(%i *2) +2]wright_%i", 0.5, 0, 1, 0.00001) : ba.lin2LogGain : si.smoo; // wright volume slider;
demixer(n) = *(master), *(master) <: par( j, n, *(left(j)), *(wright(j)) ),
(+ : *(sub) *(0.2));
process = demixer(N);
| https://raw.githubusercontent.com/ossia/score-user-library/1de4c36f179105f1728e72b02e96f68d1c9130c2/Presets/Faust/demixer.dsp | faust | Numbre of speaker pairs
master volume slider;
subwofer volume slider;
left volume slider;
wright volume slider; | declare name "demixer";
declare author "SCRIME";
import("stdfaust.lib");
demixer(n) = *(master), *(master) <: par( j, n, *(left(j)), *(wright(j)) ),
(+ : *(sub) *(0.2));
process = demixer(N);
|
faa0904e8905b3000df2ac8d7f80f07e30ec04d0717cddbc1af6364368d99b2f | ossia/score-user-library | midiDemixer.dsp | declare name "midiDemixer";
declare author "SCRIME";
import("stdfaust.lib");
N = 9; // Numbre of speaker pairs
master = hslider("master", 0, 0, 127, 1) / 127 : ba.lin2LogGain : si.smoo; // master volume slider;
sub = hslider("sub", 0, 0, 127, 1) / 127 : ba.lin2LogGain : si.smoo; // subwofer volume slider;
left(i) = hslider("[(%i *2) +1]left_%i", 0, 0, 127, 1) / 127: ba.lin2LogGain : si.smoo; // left volume slider;
wright(i) = hslider("[(%i *2) +2]wright_%i", 0, 0, 127, 1) / 127 : ba.lin2LogGain : si.smoo; // wright volume slider;
demixer(n) = *(master), *(master) <: par( j, n, *(left(j)), *(wright(j)) ),
(+ : *(sub) *(0.2));
process = demixer(N);
| https://raw.githubusercontent.com/ossia/score-user-library/1de4c36f179105f1728e72b02e96f68d1c9130c2/Presets/Faust/midiDemixer.dsp | faust | Numbre of speaker pairs
master volume slider;
subwofer volume slider;
left volume slider;
wright volume slider; | declare name "midiDemixer";
declare author "SCRIME";
import("stdfaust.lib");
demixer(n) = *(master), *(master) <: par( j, n, *(left(j)), *(wright(j)) ),
(+ : *(sub) *(0.2));
process = demixer(N);
|
ed848e3a651ffcc552f123b5336ea20687f815151a704e0ff9b66f7ff84183f6 | ossia/score-user-library | fractal.dsp | declare name "fractal";
declare author "SCRIME";
V = 5; // number of voisces
import("stdfaust.lib");
import("delays.lib");
import("maths.lib");
transpose (w, x, s, sig) =
fdelay1s(d,sig)*fmin(d/x,1) + fdelay1s(d+w,sig)*(1-fmin(d/x,1))
with {
i = 1 - pow(2, s/12);
d = i : (+ : +(w) : fmod(_,w)) ~ _;
};
fractales(1) = (+:transpose(1097, 461, t):@(d):*(r))~(*(c))
with{
d = vslider("duree1", 0.5, 0, 2, 0.001)*SR;
r = 1-vslider("diminution1", 0.5, 0, 1, 0.01);
t = vslider("transposition1", 0, -40, +40, 0.1);
c = checkbox("recursive");
};
fractales(S) = _<:*(b),((+:transpose(1097, 461, t):@(d):*(r))~*(c)):_,(_<:*(1-(b)),_):(+:fractales(S-1)),_
with{
d = vslider("duree%S", 0.5, 0, 2, 0.001)*SR;
r = 1-vslider("diminution%S", 0.5, 0, 1, 0.01);
t = vslider("transposition%S", 0, -40, +40, 0.1);
c = checkbox("recursive");
b = checkbox("paralelle");
};
process = hgroup("extensions_fractales", _<:*(checkbox("passe")),fractales(V):>_);
| https://raw.githubusercontent.com/ossia/score-user-library/1de4c36f179105f1728e72b02e96f68d1c9130c2/Presets/Faust/fractal.dsp | faust | number of voisces | declare name "fractal";
declare author "SCRIME";
import("stdfaust.lib");
import("delays.lib");
import("maths.lib");
transpose (w, x, s, sig) =
fdelay1s(d,sig)*fmin(d/x,1) + fdelay1s(d+w,sig)*(1-fmin(d/x,1))
with {
i = 1 - pow(2, s/12);
d = i : (+ : +(w) : fmod(_,w)) ~ _;
};
fractales(1) = (+:transpose(1097, 461, t):@(d):*(r))~(*(c))
with{
d = vslider("duree1", 0.5, 0, 2, 0.001)*SR;
r = 1-vslider("diminution1", 0.5, 0, 1, 0.01);
t = vslider("transposition1", 0, -40, +40, 0.1);
c = checkbox("recursive");
};
fractales(S) = _<:*(b),((+:transpose(1097, 461, t):@(d):*(r))~*(c)):_,(_<:*(1-(b)),_):(+:fractales(S-1)),_
with{
d = vslider("duree%S", 0.5, 0, 2, 0.001)*SR;
r = 1-vslider("diminution%S", 0.5, 0, 1, 0.01);
t = vslider("transposition%S", 0, -40, +40, 0.1);
c = checkbox("recursive");
b = checkbox("paralelle");
};
process = hgroup("extensions_fractales", _<:*(checkbox("passe")),fractales(V):>_);
|
10ca197665e3fb55397f5960e282134d6b0bcf4090cc7864ad14a6e22298d4d6 | ossia/score-user-library | midiSpat.dsp | declare name "midiSpat";
declare author "SCRIME";
import("stdfaust.lib");
N = 9; // Numbre of speaker pairs
window = (hslider("window", 0, 0, 127, 1) / 127) * 5; // attack and release time;
master = nentry("master", 0, 0, 127, 1) / 127 : ba.lin2LogGain; // master volume slider;
sub = nentry("sub", 0, 0, 127, 1) / 127 : ba.lin2LogGain; // subwofer volume slider;
left(i) = nentry("[(%i *2) +1]left_%i", 0, 0, 127, 1) / 127: ba.lin2LogGain; // left volume slider;
wright(i) = nentry("[(%i *2) +2]wright_%i", 0, 0, 127, 1) / 127 : ba.lin2LogGain; // wright volume slider;
winMaster = en.asr(window, 1, window, master);
winSub = en.asr(window, 1, window, sub);
winLeft(i) = en.asr(window, 1, window, left(i));
winWright(i) = en.asr(window, 1, window, wright(i));
demixer(n) = *(winMaster), *(winMaster) <: par( j, n, *(winLeft(j)), *(winWright(j)) ),
(+ : *(winSub) *(0.2));
process = demixer(N);
| https://raw.githubusercontent.com/ossia/score-user-library/1de4c36f179105f1728e72b02e96f68d1c9130c2/Presets/Faust/midiSpat.dsp | faust | Numbre of speaker pairs
attack and release time;
master volume slider;
subwofer volume slider;
left volume slider;
wright volume slider; | declare name "midiSpat";
declare author "SCRIME";
import("stdfaust.lib");
winMaster = en.asr(window, 1, window, master);
winSub = en.asr(window, 1, window, sub);
winLeft(i) = en.asr(window, 1, window, left(i));
winWright(i) = en.asr(window, 1, window, wright(i));
demixer(n) = *(winMaster), *(winMaster) <: par( j, n, *(winLeft(j)), *(winWright(j)) ),
(+ : *(winSub) *(0.2));
process = demixer(N);
|
5b563976419961f93e42c9ba1647b4aed2dcd0ec4a2a6b94c0f9494a435ef280 | ossia/score-user-library | fire.dsp | import("stdfaust.lib");
//----------------------------`fire`---------------------------
// fire(is_wet) : produces burning fire sound
//
// #### Usage
//
// ```
// fire(is_wet) : _
// ```
//
// Where:
//
// * `is_wet`: a binary flag/signal adding wet wood
// popping sound
//
// #### Example
//
// ```
// checkbox("wet") : fire : _
// ```
//
//------------------------------------------------------------
sq(x) = x * x;
stretch(ms) = ba.countdown(ma.SR * ms / 1000): >(0);
crackle(dens, rel) = ((no.noise : fi.lowpass(3, 10000)) * 0.77 * os.osc(50 / dens) *
en.arfe(0.001, release, 0, trigger: >(0)
: stretch(sus)))
: fi.highpass(3, 1000)
with {
trigger = no.sparse_noise(dens): abs;
sus = 2 + (trigger: ba.latch(trigger) * 8);
release = rel + (0.3 * (no.noise : abs : ba.latch(trigger)));
};
fire(is_wet) = (is_wet * wet) + (base <: (_, fi.lowpass(3, 1000), fi.highpass(3, 10000)) :> _)
with {
hiss = (no.noise : fi.lowpass(3, 500)) / 5;
hiss2 = 0.8 * (no.noise : fi.highpass(3, 3000) / 8) * sq(no.lfnoise(1000));
wet = (3 * crackle(0.1, 0.05)) + (2 * crackle(0.2, 0.3));
base = hiss + hiss2 + (0.2 * crackle(5, 0.1));
};
process = checkbox("wet"): fire;
| https://raw.githubusercontent.com/ossia/score-user-library/bbc998c0b88ce0c2a71128e42e1fee88591f4bbd/Presets/Faust/gameaudio/fire.dsp | faust | ----------------------------`fire`---------------------------
fire(is_wet) : produces burning fire sound
#### Usage
```
fire(is_wet) : _
```
Where:
* `is_wet`: a binary flag/signal adding wet wood
popping sound
#### Example
```
checkbox("wet") : fire : _
```
------------------------------------------------------------ | import("stdfaust.lib");
sq(x) = x * x;
stretch(ms) = ba.countdown(ma.SR * ms / 1000): >(0);
crackle(dens, rel) = ((no.noise : fi.lowpass(3, 10000)) * 0.77 * os.osc(50 / dens) *
en.arfe(0.001, release, 0, trigger: >(0)
: stretch(sus)))
: fi.highpass(3, 1000)
with {
trigger = no.sparse_noise(dens): abs;
sus = 2 + (trigger: ba.latch(trigger) * 8);
release = rel + (0.3 * (no.noise : abs : ba.latch(trigger)));
};
fire(is_wet) = (is_wet * wet) + (base <: (_, fi.lowpass(3, 1000), fi.highpass(3, 10000)) :> _)
with {
hiss = (no.noise : fi.lowpass(3, 500)) / 5;
hiss2 = 0.8 * (no.noise : fi.highpass(3, 3000) / 8) * sq(no.lfnoise(1000));
wet = (3 * crackle(0.1, 0.05)) + (2 * crackle(0.2, 0.3));
base = hiss + hiss2 + (0.2 * crackle(5, 0.1));
};
process = checkbox("wet"): fire;
|
9c655b5a806e7fc96d48917486b4f70dd65755ea2e49b2329da5f64e60397f08 | ossia/score-user-library | fauSuround.dsp | declare name "faustSuround";
declare author "SCRIME";
import("stdfaust.lib");
import("basics.lib");
import("maths.lib");
Inputs = 1;
Outputs = (-1, 1, // Quadriphonic setup
-1, -1,
1, -1,
1, 1);
halfSize(a) = count(a) * 0.5; // Half the size of a list
xaxe(n) = hslider("x_%n", 0, -1, 1, 0.001):si.smoo;
yaxe(n) = vslider("y_%n", 0, -1, 1, 0.001):si.smoo;
inf(n) = 0 - (1 - vslider("influence_%n", 0.5, 0, 1, 0.001)):si.smoo;
process = par(j, Inputs, fausuround(xaxe(j), yaxe(j), inf(j), Outputs)) :> par(h, halfSize(Outputs), _);
//Definition-------------------------------------------------------------------------------------------------
influence(r, p) = sqrt(max((0, (r*p) + 1))); // Diameter around the speaker inside withch a source can be heard.
fausuround(x, y, disp, coordinates) = _ <: par(i, halfSize(coordinates), // Poccess in parallel the gain for each individual spaekers.
_ *(influence(disp, // Gain as square root of 1 - distance betwen a speeaker and the source, relative to the influence.
hypot(take((i * 2)+1, coordinates) - x, take((1 + i * 2)+1, coordinates) - y)))); // distance betwen 2 points on the cartesian plain. the first will be a speaker and the second a sound source.
| https://raw.githubusercontent.com/ossia/score-user-library/1de4c36f179105f1728e72b02e96f68d1c9130c2/Presets/Faust/fauSuround.dsp | faust | Quadriphonic setup
Half the size of a list
Definition-------------------------------------------------------------------------------------------------
Diameter around the speaker inside withch a source can be heard.
Poccess in parallel the gain for each individual spaekers.
Gain as square root of 1 - distance betwen a speeaker and the source, relative to the influence.
distance betwen 2 points on the cartesian plain. the first will be a speaker and the second a sound source. | declare name "faustSuround";
declare author "SCRIME";
import("stdfaust.lib");
import("basics.lib");
import("maths.lib");
Inputs = 1;
-1, -1,
1, -1,
1, 1);
xaxe(n) = hslider("x_%n", 0, -1, 1, 0.001):si.smoo;
yaxe(n) = vslider("y_%n", 0, -1, 1, 0.001):si.smoo;
inf(n) = 0 - (1 - vslider("influence_%n", 0.5, 0, 1, 0.001)):si.smoo;
process = par(j, Inputs, fausuround(xaxe(j), yaxe(j), inf(j), Outputs)) :> par(h, halfSize(Outputs), _);
|
cd8a0c9a2b862a7fdbde0dd4a10bee0a4d400ddf4567a279496c31a14e4c57da | ossia/score-user-library | granulator.dsp | // FROM FAUST DEMO
// Designed to use the Analog Input for parameter controls.
//
///////////////////////////////////////////////////////////////////////////////////////////////////
//
// ANALOG IN:
// ANALOG 0 : Grain Size
// ANALOG 1 : Speed
// ANALOG 2 : Probability
// (others analog inputs are not used)
//
///////////////////////////////////////////////////////////////////////////////////////////////////
process = vgroup("Granulator", environment {
declare name "Granulator";
declare author "Adapted from sfIter by Christophe Lebreton";
/* =========== DESCRIPTION =============
- The granulator takes very small parts of a sound, called GRAINS, and plays them at a varying speed
- Front = Medium size grains
- Back = short grains
- Left Slow rhythm
- Right = Fast rhythm
- Bottom = Regular occurrences
- Head = Irregular occurrences
*/
import("stdfaust.lib");
process = hgroup("Granulator", *(excitation : ampf));
excitation = noiseburst(gate,P) * (gain);
ampf = an.amp_follower_ud(duree_env,duree_env);
//----------------------- NOISEBURST -------------------------
noiseburst(gate,P) = no.noise : *(gate : trigger(P))
with {
upfront(x) = (x-x') > 0;
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = upfront : release(n) : > (0.0);
};
//-------------------------------------------------------------
P = freq; // fundamental period in samples
freq = hslider("[1]GrainSize[BELA: ANALOG_0]", 200, 5, 2205, 1);
// the frequency gives the white noise band width
Pmax = 4096; // maximum P (for de.delay-line allocation)
// PHASOR_BIN //////////////////////////////
phasor_bin(init) = (+(float(speed)/float(ma.SR)) : fmod(_,1.0)) ~ *(init);
gate = phasor_bin(1) : -(0.001) : pulsar;
gain = 1;
// PULSAR //////////////////////////////
// Pulsar allows to create a more or less random 'pulse'(proba).
pulsar = _ <: ((_<(ratio_env)) : @(100))*(proba>(_,abs(no.noise) : ba.latch));
speed = hslider("[2]Speed[BELA: ANALOG_1]", 10, 1, 20, 0.0001) : fi.lowpass(1,1);
ratio_env = 0.5;
fade = 0.5; // min > 0 to avoid division by 0
proba = hslider("[3]Probability[BELA: ANALOG_2]", 70, 50, 100, 1) * (0.01) : fi.lowpass(1,1);
duree_env = 1/(speed : /(ratio_env*(0.25)*fade));
}.process);
| https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/bela/granulator.dsp | faust | FROM FAUST DEMO
Designed to use the Analog Input for parameter controls.
/////////////////////////////////////////////////////////////////////////////////////////////////
ANALOG IN:
ANALOG 0 : Grain Size
ANALOG 1 : Speed
ANALOG 2 : Probability
(others analog inputs are not used)
/////////////////////////////////////////////////////////////////////////////////////////////////
=========== DESCRIPTION =============
- The granulator takes very small parts of a sound, called GRAINS, and plays them at a varying speed
- Front = Medium size grains
- Back = short grains
- Left Slow rhythm
- Right = Fast rhythm
- Bottom = Regular occurrences
- Head = Irregular occurrences
----------------------- NOISEBURST -------------------------
-------------------------------------------------------------
fundamental period in samples
the frequency gives the white noise band width
maximum P (for de.delay-line allocation)
PHASOR_BIN //////////////////////////////
PULSAR //////////////////////////////
Pulsar allows to create a more or less random 'pulse'(proba).
min > 0 to avoid division by 0 |
process = vgroup("Granulator", environment {
declare name "Granulator";
declare author "Adapted from sfIter by Christophe Lebreton";
import("stdfaust.lib");
process = hgroup("Granulator", *(excitation : ampf));
excitation = noiseburst(gate,P) * (gain);
ampf = an.amp_follower_ud(duree_env,duree_env);
noiseburst(gate,P) = no.noise : *(gate : trigger(P))
with {
upfront(x) = (x-x') > 0;
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = upfront : release(n) : > (0.0);
};
freq = hslider("[1]GrainSize[BELA: ANALOG_0]", 200, 5, 2205, 1);
phasor_bin(init) = (+(float(speed)/float(ma.SR)) : fmod(_,1.0)) ~ *(init);
gate = phasor_bin(1) : -(0.001) : pulsar;
gain = 1;
pulsar = _ <: ((_<(ratio_env)) : @(100))*(proba>(_,abs(no.noise) : ba.latch));
speed = hslider("[2]Speed[BELA: ANALOG_1]", 10, 1, 20, 0.0001) : fi.lowpass(1,1);
ratio_env = 0.5;
proba = hslider("[3]Probability[BELA: ANALOG_2]", 70, 50, 100, 1) * (0.01) : fi.lowpass(1,1);
duree_env = 1/(speed : /(ratio_env*(0.25)*fade));
}.process);
|
490adf00f0010b1377c2976f1e3c0ddc9b820cdb8cc288fce3c5fdc5c6d1b44c | ossia/score-user-library | harmonicOscillator3.dsp | declare name "Harmonic Oscillator v3";
declare author "James Leonard";
declare date "April 2020";
/* ========= DESCRITPION =============
The simplest mass-interaction construct: a harmonic oscillator, built by assembling four elements:
a mass, a fixed point and a spring and a damper interaction.
The resulting model is identical to an mi.osc element (which integrates them together).
- inputs: force impulse
- outputs: oscillator' position.
- controls: none.
*/
import("stdfaust.lib");
import("mi.lib");
in1 = button("Frc Input 1"): ba.impulsify * 0.25; //write a specific force input signal operation here
OutGain = 1;
model = (
mi.mass(1., 0, 0., 0.),
mi.ground(0.),
par(i, nbFrcIn,_):
RoutingMassToLink ,
par(i, nbFrcIn,_):
mi.spring(0.1, 0., 0.),
mi.damper(0.0003, 0., 0.),
par(i, nbOut+nbFrcIn, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
RoutingMassToLink(m0, m1) = /* routed positions */ m1, m0, m1, m0, /* outputs */ m0;
RoutingLinkToMass(l0_f1, l0_f2, l1_f1, l1_f2, p_out1, f_in1) = /* routed forces */ f_in1 + l0_f2 + l1_f2, l0_f1 + l1_f1, /* pass-through */ p_out1;
nbMass = 2;
nbFrcIn = 1;
nbOut = 1;
};
process = in1 : model:*(OutGain);
/*
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# MIMS script file
# Script author: James Leonard
# Assembled harmonic oscillator with M = 1, K = 0.1, Z = 0.0003
@m mass 1. 0. 0.
@g ground 0.
@s spring @g @m 0.1
@d damper @g @m 0.0003
# Add force input to the model
@in1 frcInput @m
# Add position output from the oscillator
@out1 posOutput @m
# end of MIMS script
*/ | https://raw.githubusercontent.com/ossia/score-user-library/8a910e05f713a6d710fe3c1b8cd3e63eee9394b0/Presets/Faust/physicalModeling/mi-faust/harmonicOscillator3.dsp | faust | ========= DESCRITPION =============
The simplest mass-interaction construct: a harmonic oscillator, built by assembling four elements:
a mass, a fixed point and a spring and a damper interaction.
The resulting model is identical to an mi.osc element (which integrates them together).
- inputs: force impulse
- outputs: oscillator' position.
- controls: none.
write a specific force input signal operation here
routed positions
outputs
routed forces
pass-through
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# MIMS script file
# Script author: James Leonard
# Assembled harmonic oscillator with M = 1, K = 0.1, Z = 0.0003
@m mass 1. 0. 0.
@g ground 0.
@s spring @g @m 0.1
@d damper @g @m 0.0003
# Add force input to the model
@in1 frcInput @m
# Add position output from the oscillator
@out1 posOutput @m
# end of MIMS script
| declare name "Harmonic Oscillator v3";
declare author "James Leonard";
declare date "April 2020";
import("stdfaust.lib");
import("mi.lib");
OutGain = 1;
model = (
mi.mass(1., 0, 0., 0.),
mi.ground(0.),
par(i, nbFrcIn,_):
RoutingMassToLink ,
par(i, nbFrcIn,_):
mi.spring(0.1, 0., 0.),
mi.damper(0.0003, 0., 0.),
par(i, nbOut+nbFrcIn, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
nbMass = 2;
nbFrcIn = 1;
nbOut = 1;
};
process = in1 : model:*(OutGain);
|
b22028d22e839e45856fe3ada44d79926e7458aa6c2459b1439a80012b133ddc | ossia/score-user-library | quantizedChords.dsp | /*
MIT License
Copyright (c) 2021 César Chaussinand
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
declare name "quantizedChords";
declare description "Generate chords using the quantizer functions";
declare author "CesarChaussinand";
declare license "MIT";
import("stdfaust.lib");
Nb = 3;
process = synth*gain<:_,_;
synth = freq : chord <: mQuantizer, mQuantizerSmooth, mBypass :> par(i,Nb,os.osc):>_/Nb;
chord = _ <: par(i,Nb,(_*(i+2)/(i+1)));
mQuantizer = par(i,Nb,_:qu.quantize(200,qu.ionian) *(check==0) );
mQuantizerSmooth = par(i,Nb,_:qu.quantizeSmoothed(200,qu.ionian) *(check==1) );
mBypass = par(i,Nb,_*(check==2) );
//freq = hslider("freq",200,200,400,2);
freq = os.osc(rate)*100+300;
rate = 0.15;
gain = vslider("gain", -10, -60, 0, 0.1) : ba.db2linear : si.smoo;
check = nentry("quantization[style:radio{'Normal':0;'Smoothed':1;'Off':2}]",0,0,2,1);
| https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/quantizing/quantizedChords.dsp | faust |
MIT License
Copyright (c) 2021 César Chaussinand
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
freq = hslider("freq",200,200,400,2); |
declare name "quantizedChords";
declare description "Generate chords using the quantizer functions";
declare author "CesarChaussinand";
declare license "MIT";
import("stdfaust.lib");
Nb = 3;
process = synth*gain<:_,_;
synth = freq : chord <: mQuantizer, mQuantizerSmooth, mBypass :> par(i,Nb,os.osc):>_/Nb;
chord = _ <: par(i,Nb,(_*(i+2)/(i+1)));
mQuantizer = par(i,Nb,_:qu.quantize(200,qu.ionian) *(check==0) );
mQuantizerSmooth = par(i,Nb,_:qu.quantizeSmoothed(200,qu.ionian) *(check==1) );
mBypass = par(i,Nb,_*(check==2) );
freq = os.osc(rate)*100+300;
rate = 0.15;
gain = vslider("gain", -10, -60, 0, 0.1) : ba.db2linear : si.smoo;
check = nentry("quantization[style:radio{'Normal':0;'Smoothed':1;'Off':2}]",0,0,2,1);
|
af00f0c8efcff4cbd1b7ac2ecf51cc38b11a36d68688a7472cbb4b0f1576457f | ossia/score-user-library | PianoHammeredString.dsp | import("stdfaust.lib");
//----------------------------------String Settings---------------------------//
/* Data:
Music wire ASTM A 228
https://materials.gelsonluz.com/2020/09/astm-a228-properties-chem-mech-rankings.html
A. Stulov,
Physical modelling of the piano string scale,
Applied Acoustics,
Volume 69, Issue 11,
2008,
Pages 977-984,
ISSN 0003-682X,*/
L = 0.77; //[m]
//nPoints=int(Length/h);
nPoints = 77;
k = 1/ma.SR;
//Stability condition
coeff = c^2*k^2 + 4*sigma1*k;
h = sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
T = 667.1; // Tension [N]
radius = 0.5e-03; // Radius (0.016 gauge) [m]
rho = 7.9*10^3; // Density [kg/m^3];
Area = ma.PI*radius^2; // Area of string section
I = (ma.PI*radius^4)/ 4; // Moment of Inertia
Emod = 200e9; // Young modulus [Pa]
K = sqrt(Emod*I/rho/Area); // Stiffness parameter
c = sqrt(T/rho/Area); // Wave speed
sigma1 = 0.01; // Frequency dependent damping
sigma0 = 0.05; // Frequency independent damping
mass = Area*L*rho;
//----------------------------------Equations--------------------------------//
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
midCoeff = E,C,A,C,E;
midCoeffDel = 0,D,B,D,0;
r = 2;
t = 1;
scheme(points) = par(i,points,midCoeff,midCoeffDel);
//----------------------------------Controls---------------------------------//
play = button("Play"):ba.impulsify;
inPoint = hslider("Input Point", floor(nPoints/2),0,nPoints-1,0.01);
outPoint = hslider("Output Point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
//----------------------------------Force---------------------------------//
/*Hammer stiffness from:
A. Sutlov,
Experimental and theoretical studies of piano hammer,
Proceedings of SMAC 03,
pages 175-178*/
KHammer = 30000;
JCoeff = (k^2/den/rho/Area);
KH = 1000;
mH = 0.9;
omega0SqrH = KH/mH;
sigma0H = 14;
alpha = 2.5;
offset = 0.23;
forceScaling = 0.01;
//----------------------------------Process---------------------------------//
gain = 600;
process = (fd.linInterp1D(nPoints,inPoint):>
fd.hammer(JCoeff,omega0SqrH,sigma0H,KHammer,alpha,k,offset,play*forceScaling)<:
fd.linInterp1D(nPoints,inPoint):
fd.model1D(nPoints,r,t,scheme(nPoints)))~si.bus(nPoints):
fd.linInterp1DOut(nPoints,outPoint)*gain<:_,_;
| https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/physicalModeling/fds/PianoHammeredString.dsp | faust | ----------------------------------String Settings---------------------------//
Data:
Music wire ASTM A 228
https://materials.gelsonluz.com/2020/09/astm-a228-properties-chem-mech-rankings.html
A. Stulov,
Physical modelling of the piano string scale,
Applied Acoustics,
Volume 69, Issue 11,
2008,
Pages 977-984,
ISSN 0003-682X,
[m]
nPoints=int(Length/h);
Stability condition
Tension [N]
Radius (0.016 gauge) [m]
Density [kg/m^3];
Area of string section
Moment of Inertia
Young modulus [Pa]
Stiffness parameter
Wave speed
Frequency dependent damping
Frequency independent damping
----------------------------------Equations--------------------------------//
----------------------------------Controls---------------------------------//
----------------------------------Force---------------------------------//
Hammer stiffness from:
A. Sutlov,
Experimental and theoretical studies of piano hammer,
Proceedings of SMAC 03,
pages 175-178
----------------------------------Process---------------------------------// | import("stdfaust.lib");
nPoints = 77;
k = 1/ma.SR;
coeff = c^2*k^2 + 4*sigma1*k;
h = sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
mass = Area*L*rho;
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2+6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2-4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = K^2*k^2/den/h^4;
midCoeff = E,C,A,C,E;
midCoeffDel = 0,D,B,D,0;
r = 2;
t = 1;
scheme(points) = par(i,points,midCoeff,midCoeffDel);
play = button("Play"):ba.impulsify;
inPoint = hslider("Input Point", floor(nPoints/2),0,nPoints-1,0.01);
outPoint = hslider("Output Point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
KHammer = 30000;
JCoeff = (k^2/den/rho/Area);
KH = 1000;
mH = 0.9;
omega0SqrH = KH/mH;
sigma0H = 14;
alpha = 2.5;
offset = 0.23;
forceScaling = 0.01;
gain = 600;
process = (fd.linInterp1D(nPoints,inPoint):>
fd.hammer(JCoeff,omega0SqrH,sigma0H,KHammer,alpha,k,offset,play*forceScaling)<:
fd.linInterp1D(nPoints,inPoint):
fd.model1D(nPoints,r,t,scheme(nPoints)))~si.bus(nPoints):
fd.linInterp1DOut(nPoints,outPoint)*gain<:_,_;
|
0d0911d57f115df7e712b79f6ce3fa28b5e83506ae483f11a6616e9a3270fdf8 | ossia/score-user-library | nlOsc.dsp | declare name "Non Linear Oscillator";
declare author "James Leonard";
declare date "April 2020";
/* ========= DESCRITPION =============
A non-linear oscillator (containing a cubic stiffness term, making pitch amplitude dependant)
- inputs: force impulse
- outputs: oscillator position.
- controls: value of the non-linear stiffness component.
Note: we are using the nlSpringDamperClipped interaction that defines an upper bound for stiffness.
This can save from numerical divergence when large displacements cause very large reaction forces.
*/
import("stdfaust.lib");
in1 = button("Hammer Input Force"): ba.impulsify* -0.1;
OutGain = 1;
nlK = hslider("non-linear stiffness", 0.005, ma.MIN, 0.1, 0.0001);
model = (
mi.mass(1., 0, 0., 0.),
mi.ground(0.),
mi.mass(0.3, 0, 1., 1.),
mi.ground(1.),
par(i, nbFrcIn,_):
RoutingMassToLink ,
par(i, nbFrcIn,_):
mi.nlSpringDamperClipped(0.03, nlK, 0.8, 0.0002, 0., 0.),
mi.springDamper(0.0001, 0.05, 1., 1.),
mi.collision(0.1, 0.001, 0, 0., 1.),
par(i, nbOut+nbFrcIn, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
RoutingMassToLink(m0, m1, m2, m3) = /* routed positions */ m1, m0, m3, m2, m0, m2, /* outputs */ m0;
RoutingLinkToMass(l0_f1, l0_f2, l1_f1, l1_f2, l2_f1, l2_f2, p_out1, f_in1) = /* routed forces */ l0_f2 + l2_f1, l0_f1, f_in1 + l1_f2 + l2_f2, l1_f1, /* pass-through */ p_out1;
nbMass = 4;
nbFrcIn = 1;
nbOut = 1;
};
process = in1 : model:*(OutGain);
/*
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# MIMS script file
# Script author: James Leonard
@nlK param 0.005
# Build a non-linear harmonic oscillator
@m mass 1. 0. 0.
@g ground 0.
@nl nlSpringDamper @g @m 0.03 nlK 0.8 0.0002
# A slow moving oscillator placed above the other
# serving as a hammer
@ham mass 0.3 1. 0.
@g2 ground 1.
@sp springDamper @g2 @ham 0.0001 0.05
# Add force input to the hammer
@in1 frcInput @ham
@c contact @m @ham 0.1 0.001
# Add position output from the oscillator
@out1 posOutput @m
# @out2 posOutput @ham
# end of MIMS script
*/ | https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/physicalModeling/mi-faust/nlOsc.dsp | faust | ========= DESCRITPION =============
A non-linear oscillator (containing a cubic stiffness term, making pitch amplitude dependant)
- inputs: force impulse
- outputs: oscillator position.
- controls: value of the non-linear stiffness component.
Note: we are using the nlSpringDamperClipped interaction that defines an upper bound for stiffness.
This can save from numerical divergence when large displacements cause very large reaction forces.
routed positions
outputs
routed forces
pass-through
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# MIMS script file
# Script author: James Leonard
@nlK param 0.005
# Build a non-linear harmonic oscillator
@m mass 1. 0. 0.
@g ground 0.
@nl nlSpringDamper @g @m 0.03 nlK 0.8 0.0002
# A slow moving oscillator placed above the other
# serving as a hammer
@ham mass 0.3 1. 0.
@g2 ground 1.
@sp springDamper @g2 @ham 0.0001 0.05
# Add force input to the hammer
@in1 frcInput @ham
@c contact @m @ham 0.1 0.001
# Add position output from the oscillator
@out1 posOutput @m
# @out2 posOutput @ham
# end of MIMS script
| declare name "Non Linear Oscillator";
declare author "James Leonard";
declare date "April 2020";
import("stdfaust.lib");
in1 = button("Hammer Input Force"): ba.impulsify* -0.1;
OutGain = 1;
nlK = hslider("non-linear stiffness", 0.005, ma.MIN, 0.1, 0.0001);
model = (
mi.mass(1., 0, 0., 0.),
mi.ground(0.),
mi.mass(0.3, 0, 1., 1.),
mi.ground(1.),
par(i, nbFrcIn,_):
RoutingMassToLink ,
par(i, nbFrcIn,_):
mi.nlSpringDamperClipped(0.03, nlK, 0.8, 0.0002, 0., 0.),
mi.springDamper(0.0001, 0.05, 1., 1.),
mi.collision(0.1, 0.001, 0, 0., 1.),
par(i, nbOut+nbFrcIn, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
nbMass = 4;
nbFrcIn = 1;
nbOut = 1;
};
process = in1 : model:*(OutGain);
|
694411a20e9cbc5ab2e3142d827301ff7c4ba90e890366a2f1a2803e55f1859d | ossia/score-user-library | elecGuitar.dsp | //################################### elecGuitar.dsp #####################################
// Faust instruments specifically designed for `faust2smartkeyb` where an electric
// guitar physical model is controlled using an isomorphic keyboard. Rock on!
//
// ## `SmartKeyboard` Use Strategy
//
// we want to create an isomorphic keyboard where each keyboard is monophonic and
// implements a "string". Keyboards should be one fourth apart from each other
// (more or less like on a guitar). We want to be able to slide between keyboards
// (strum) to trigger a new note (voice) and we want new fingers on a keyboard to
// "steal" the pitch from the previous finger (sort of hammer on).
//
// ## Compilation Instructions
//
// This Faust code will compile fine with any of the standard Faust targets. However
// it was specifically designed to be used with `faust2smartkeyb`. For best results,
// we recommend to use the following parameters to compile it:
//
// ```
// faust2smartkeyb [-ios/-android] -effect elecGuitarEffecr.dsp elecGuitar.dsp
// ```
//
// ## Version/Licence
//
// Version 0.0, Feb. 2017
// Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017:
// https://ccrma.stanford.edu/~rmichon
// MIT Licence: https://opensource.org/licenses/MIT
//########################################################################################
// Interface with 6 monophonic keyboards one fourth apart from each other
declare interface "SmartKeyboard{
'Number of Keyboards':'6',
'Max Keyboard Polyphony':'1',
'Keyboard 0 - Number of Keys':'13',
'Keyboard 1 - Number of Keys':'13',
'Keyboard 2 - Number of Keys':'13',
'Keyboard 3 - Number of Keys':'13',
'Keyboard 4 - Number of Keys':'13',
'Keyboard 5 - Number of Keys':'13',
'Keyboard 0 - Lowest Key':'72',
'Keyboard 1 - Lowest Key':'67',
'Keyboard 2 - Lowest Key':'62',
'Keyboard 3 - Lowest Key':'57',
'Keyboard 4 - Lowest Key':'52',
'Keyboard 5 - Lowest Key':'47',
'Rounding Mode':'2'
}";
import("stdfaust.lib");
// standard parameters
f = hslider("freq",300,50,2000,0.01);
bend = hslider("bend[midi:pitchwheel]",1,0,10,0.01) : si.polySmooth(gate,0.999,1);
gain = hslider("gain",1,0,1,0.01);
s = hslider("sustain[midi:ctrl 64]",0,0,1,1); // for sustain pedal
t = button("gate");
// mapping params
gate = t+s : min(1);
freq = f*bend : max(50); // min freq is 50 Hz
stringLength = freq : pm.f2l;
pluckPosition = 0.8;
mute = gate : si.polySmooth(gate,0.999,1);
process = pm.elecGuitar(stringLength,pluckPosition,mute,gain,gate) <: _,_;
| https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/smartKeyboard/elecGuitar.dsp | faust | ################################### elecGuitar.dsp #####################################
Faust instruments specifically designed for `faust2smartkeyb` where an electric
guitar physical model is controlled using an isomorphic keyboard. Rock on!
## `SmartKeyboard` Use Strategy
we want to create an isomorphic keyboard where each keyboard is monophonic and
implements a "string". Keyboards should be one fourth apart from each other
(more or less like on a guitar). We want to be able to slide between keyboards
(strum) to trigger a new note (voice) and we want new fingers on a keyboard to
"steal" the pitch from the previous finger (sort of hammer on).
## Compilation Instructions
This Faust code will compile fine with any of the standard Faust targets. However
it was specifically designed to be used with `faust2smartkeyb`. For best results,
we recommend to use the following parameters to compile it:
```
faust2smartkeyb [-ios/-android] -effect elecGuitarEffecr.dsp elecGuitar.dsp
```
## Version/Licence
Version 0.0, Feb. 2017
Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017:
https://ccrma.stanford.edu/~rmichon
MIT Licence: https://opensource.org/licenses/MIT
########################################################################################
Interface with 6 monophonic keyboards one fourth apart from each other
standard parameters
for sustain pedal
mapping params
min freq is 50 Hz |
declare interface "SmartKeyboard{
'Number of Keyboards':'6',
'Max Keyboard Polyphony':'1',
'Keyboard 0 - Number of Keys':'13',
'Keyboard 1 - Number of Keys':'13',
'Keyboard 2 - Number of Keys':'13',
'Keyboard 3 - Number of Keys':'13',
'Keyboard 4 - Number of Keys':'13',
'Keyboard 5 - Number of Keys':'13',
'Keyboard 0 - Lowest Key':'72',
'Keyboard 1 - Lowest Key':'67',
'Keyboard 2 - Lowest Key':'62',
'Keyboard 3 - Lowest Key':'57',
'Keyboard 4 - Lowest Key':'52',
'Keyboard 5 - Lowest Key':'47',
'Rounding Mode':'2'
}";
import("stdfaust.lib");
f = hslider("freq",300,50,2000,0.01);
bend = hslider("bend[midi:pitchwheel]",1,0,10,0.01) : si.polySmooth(gate,0.999,1);
gain = hslider("gain",1,0,1,0.01);
t = button("gate");
gate = t+s : min(1);
stringLength = freq : pm.f2l;
pluckPosition = 0.8;
mute = gate : si.polySmooth(gate,0.999,1);
process = pm.elecGuitar(stringLength,pluckPosition,mute,gain,gate) <: _,_;
|
6b1aa249eab37ec7186a754d730467ae145de945ba0b8214a0f3da1fdf21009d | ossia/score-user-library | violin2.dsp | //############################### violin2.dsp ##################################
// Faust instrument specifically designed for `faust2smartkeyb` where a
// complete violin physical model can be played using the touch sceen
// interface. Bowing is carried out by constantly moving a finger on the
// y axis of a key.
//
// ## `SmartKeyboard` Use Strategy
//
// 4 keyboards are used to control the pitch of the 4 bowed strings. Strings
// are connected to the virtual bow when they are touched.
//
// ## Compilation Instructions
//
// This Faust code will compile fine with any of the standard Faust targets.
// However it was specifically designed to be used with `faust2smartkeyb`. For
// best results, we recommend to use the following parameters to compile it:
//
// ```
// faust2smartkeyb [-ios/-android] -effect reverb.dsp violin.dsp
// ```
//
// ## Version/Licence
//
// Version 0.0, Aug. 2017
// Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017
// MIT Licence: https://opensource.org/licenses/MIT
//##############################################################################
declare interface "SmartKeyboard{
'Number of Keyboards':'4',
'Max Keyboard Polyphony':'0',
'Rounding Mode':'2',
'Send Fingers Count':'1',
'Keyboard 0 - Number of Keys':'12',
'Keyboard 1 - Number of Keys':'12',
'Keyboard 2 - Number of Keys':'12',
'Keyboard 3 - Number of Keys':'12',
'Keyboard 0 - Lowest Key':'55',
'Keyboard 1 - Lowest Key':'62',
'Keyboard 2 - Lowest Key':'69',
'Keyboard 3 - Lowest Key':'76',
'Keyboard 0 - Send Keyboard Freq':'1',
'Keyboard 1 - Send Keyboard Freq':'1',
'Keyboard 2 - Send Keyboard Freq':'1',
'Keyboard 3 - Send Keyboard Freq':'1',
'Keyboard 0 - Send Y':'1',
'Keyboard 1 - Send Y':'1',
'Keyboard 2 - Send Y':'1',
'Keyboard 3 - Send Y':'1'
}";
import("stdfaust.lib");
// SMARTKEYBOARD PARAMS
kbfreq(0) = hslider("kb0freq",220,20,10000,0.01);
kbbend(0) = hslider("kb0bend",1,ma.EPSILON,10,0.01);
kbfreq(1) = hslider("kb1freq",330,20,10000,0.01);
kbbend(1) = hslider("kb1bend",1,ma.EPSILON,10,0.01);
kbfreq(2) = hslider("kb2freq",440,20,10000,0.01);
kbbend(2) = hslider("kb2bend",1,ma.EPSILON,10,0.01);
kbfreq(3) = hslider("kb3freq",550,20,10000,0.01);
kbbend(3) = hslider("kb3bend",1,ma.EPSILON,10,0.01);
kbfingers(0) = hslider("kb0fingers",0,0,10,1) : int;
kbfingers(1) = hslider("kb1fingers",0,0,10,1) : int;
kbfingers(2) = hslider("kb2fingers",0,0,10,1) : int;
kbfingers(3) = hslider("kb3fingers",0,0,10,1) : int;
y = hslider("y",0,0,1,1) : si.smoo;
// MODEL PARAMETERS
// strings lengths
sl(i) = kbfreq(i)*kbbend(i) : pm.f2l : si.smoo;
// string active only if fingers are touching the keyboard
as(i) = kbfingers(i)>0;
// retrieving finger displacement on screen (dirt simple)
bowVel = y-y' : abs : *(3000) : min(1) : si.smoo;
// bow position is constant but could be ontrolled by an external interface
bowPos = 0.7;
bowPress = 0.5;
// ASSEMBLING MODELS
// essentially 4 parallel violin strings
model = par(i,4,pm.violinModel(sl(i),bowPress,bowVel*as(i),bowPos)) :> _;
process = model <: _,_;
| https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/smartKeyboard/violin2.dsp | faust | ############################### violin2.dsp ##################################
Faust instrument specifically designed for `faust2smartkeyb` where a
complete violin physical model can be played using the touch sceen
interface. Bowing is carried out by constantly moving a finger on the
y axis of a key.
## `SmartKeyboard` Use Strategy
4 keyboards are used to control the pitch of the 4 bowed strings. Strings
are connected to the virtual bow when they are touched.
## Compilation Instructions
This Faust code will compile fine with any of the standard Faust targets.
However it was specifically designed to be used with `faust2smartkeyb`. For
best results, we recommend to use the following parameters to compile it:
```
faust2smartkeyb [-ios/-android] -effect reverb.dsp violin.dsp
```
## Version/Licence
Version 0.0, Aug. 2017
Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017
MIT Licence: https://opensource.org/licenses/MIT
##############################################################################
SMARTKEYBOARD PARAMS
MODEL PARAMETERS
strings lengths
string active only if fingers are touching the keyboard
retrieving finger displacement on screen (dirt simple)
bow position is constant but could be ontrolled by an external interface
ASSEMBLING MODELS
essentially 4 parallel violin strings |
declare interface "SmartKeyboard{
'Number of Keyboards':'4',
'Max Keyboard Polyphony':'0',
'Rounding Mode':'2',
'Send Fingers Count':'1',
'Keyboard 0 - Number of Keys':'12',
'Keyboard 1 - Number of Keys':'12',
'Keyboard 2 - Number of Keys':'12',
'Keyboard 3 - Number of Keys':'12',
'Keyboard 0 - Lowest Key':'55',
'Keyboard 1 - Lowest Key':'62',
'Keyboard 2 - Lowest Key':'69',
'Keyboard 3 - Lowest Key':'76',
'Keyboard 0 - Send Keyboard Freq':'1',
'Keyboard 1 - Send Keyboard Freq':'1',
'Keyboard 2 - Send Keyboard Freq':'1',
'Keyboard 3 - Send Keyboard Freq':'1',
'Keyboard 0 - Send Y':'1',
'Keyboard 1 - Send Y':'1',
'Keyboard 2 - Send Y':'1',
'Keyboard 3 - Send Y':'1'
}";
import("stdfaust.lib");
kbfreq(0) = hslider("kb0freq",220,20,10000,0.01);
kbbend(0) = hslider("kb0bend",1,ma.EPSILON,10,0.01);
kbfreq(1) = hslider("kb1freq",330,20,10000,0.01);
kbbend(1) = hslider("kb1bend",1,ma.EPSILON,10,0.01);
kbfreq(2) = hslider("kb2freq",440,20,10000,0.01);
kbbend(2) = hslider("kb2bend",1,ma.EPSILON,10,0.01);
kbfreq(3) = hslider("kb3freq",550,20,10000,0.01);
kbbend(3) = hslider("kb3bend",1,ma.EPSILON,10,0.01);
kbfingers(0) = hslider("kb0fingers",0,0,10,1) : int;
kbfingers(1) = hslider("kb1fingers",0,0,10,1) : int;
kbfingers(2) = hslider("kb2fingers",0,0,10,1) : int;
kbfingers(3) = hslider("kb3fingers",0,0,10,1) : int;
y = hslider("y",0,0,1,1) : si.smoo;
sl(i) = kbfreq(i)*kbbend(i) : pm.f2l : si.smoo;
as(i) = kbfingers(i)>0;
bowVel = y-y' : abs : *(3000) : min(1) : si.smoo;
bowPos = 0.7;
bowPress = 0.5;
model = par(i,4,pm.violinModel(sl(i),bowPress,bowVel*as(i),bowPos)) :> _;
process = model <: _,_;
|
9ccbcc948b86e035868d7f3daed3c76078e901c738cd86c65e59c8bd23ae8cc8 | ossia/score-user-library | violin.dsp | //############################### violin.dsp ###################################
// Faust instrument specifically designed for `faust2smartkeyb` where a
// complete violin physical model can be played using the touch sceen
// interface. While the 4 virtual strings can be bowed using a control
// surface on the screen, it could be easily substituted with an external
// interface.
//
// ## `SmartKeyboard` Use Strategy
//
// 4 keyboards are used to control the pitch of the 4 bowed strings. Strings
// are connected to the virtual bow when they are touched. A pad created from
// a keybaord with a single key can be used to control the bow velocity and
// pressure on the selected strings.
//
// ## Compilation Instructions
//
// This Faust code will compile fine with any of the standard Faust targets.
// However it was specifically designed to be used with `faust2smartkeyb`. For
// best results, we recommend to use the following parameters to compile it:
//
// ```
// faust2smartkeyb [-ios/-android] -effect reverb.dsp violin.dsp
// ```
//
// ## Version/Licence
//
// Version 0.0, Aug. 2017
// Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017
// MIT Licence: https://opensource.org/licenses/MIT
//##############################################################################
declare interface "SmartKeyboard{
'Number of Keyboards':'5',
'Max Keyboard Polyphony':'0',
'Rounding Mode':'2',
'Send Fingers Count':'1',
'Keyboard 0 - Number of Keys':'19',
'Keyboard 1 - Number of Keys':'19',
'Keyboard 2 - Number of Keys':'19',
'Keyboard 3 - Number of Keys':'19',
'Keyboard 4 - Number of Keys':'1',
'Keyboard 0 - Lowest Key':'55',
'Keyboard 1 - Lowest Key':'62',
'Keyboard 2 - Lowest Key':'69',
'Keyboard 3 - Lowest Key':'76',
'Keyboard 0 - Send Keyboard Freq':'1',
'Keyboard 1 - Send Keyboard Freq':'1',
'Keyboard 2 - Send Keyboard Freq':'1',
'Keyboard 3 - Send Keyboard Freq':'1',
'Keyboard 4 - Send Freq':'0',
'Keyboard 4 - Send Key X':'1',
'Keyboard 4 - Send Key Y':'1',
'Keyboard 4 - Key 0 - Label':'Bow',
'Keyboard 4 - Static Mode':'1'
}";
import("stdfaust.lib");
// SMARTKEYBOARD PARAMS
kbfreq(0) = hslider("kb0freq",220,20,10000,0.01);
kbbend(0) = hslider("kb0bend",1,ma.EPSILON,10,0.01);
kbfreq(1) = hslider("kb1freq",330,20,10000,0.01);
kbbend(1) = hslider("kb1bend",1,ma.EPSILON,10,0.01);
kbfreq(2) = hslider("kb2freq",440,20,10000,0.01);
kbbend(2) = hslider("kb2bend",1,ma.EPSILON,10,0.01);
kbfreq(3) = hslider("kb3freq",550,20,10000,0.01);
kbbend(3) = hslider("kb3bend",1,ma.EPSILON,10,0.01);
kb4k0x = hslider("kb4k0x",0,0,1,1) : si.smoo;
kb4k0y = hslider("kb4k0y",0,0,1,1) : si.smoo;
kbfingers(0) = hslider("kb0fingers",0,0,10,1) : int;
kbfingers(1) = hslider("kb1fingers",0,0,10,1) : int;
kbfingers(2) = hslider("kb2fingers",0,0,10,1) : int;
kbfingers(3) = hslider("kb3fingers",0,0,10,1) : int;
// MODEL PARAMETERS
// strings lengths
sl(i) = kbfreq(i)*kbbend(i) : pm.f2l : si.smoo;
// string active only if fingers are touching the keyboard
as(i) = kbfingers(i)>0;
// bow pressure could also be controlled by an external parameter
bowPress = kb4k0y;
// retrieving finger displacement on screen (dirt simple)
bowVel = kb4k0x-kb4k0x' : abs : *(8000) : min(1) : si.smoo;
// bow position is constant but could be ontrolled by an external interface
bowPos = 0.7;
// ASSEMBLING MODELS
// essentially 4 parallel violin strings
model = par(i,4,pm.violinModel(sl(i),bowPress,bowVel*as(i),bowPos)) :> _;
process = model <: _,_;
| https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/smartKeyboard/violin.dsp | faust | ############################### violin.dsp ###################################
Faust instrument specifically designed for `faust2smartkeyb` where a
complete violin physical model can be played using the touch sceen
interface. While the 4 virtual strings can be bowed using a control
surface on the screen, it could be easily substituted with an external
interface.
## `SmartKeyboard` Use Strategy
4 keyboards are used to control the pitch of the 4 bowed strings. Strings
are connected to the virtual bow when they are touched. A pad created from
a keybaord with a single key can be used to control the bow velocity and
pressure on the selected strings.
## Compilation Instructions
This Faust code will compile fine with any of the standard Faust targets.
However it was specifically designed to be used with `faust2smartkeyb`. For
best results, we recommend to use the following parameters to compile it:
```
faust2smartkeyb [-ios/-android] -effect reverb.dsp violin.dsp
```
## Version/Licence
Version 0.0, Aug. 2017
Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017
MIT Licence: https://opensource.org/licenses/MIT
##############################################################################
SMARTKEYBOARD PARAMS
MODEL PARAMETERS
strings lengths
string active only if fingers are touching the keyboard
bow pressure could also be controlled by an external parameter
retrieving finger displacement on screen (dirt simple)
bow position is constant but could be ontrolled by an external interface
ASSEMBLING MODELS
essentially 4 parallel violin strings |
declare interface "SmartKeyboard{
'Number of Keyboards':'5',
'Max Keyboard Polyphony':'0',
'Rounding Mode':'2',
'Send Fingers Count':'1',
'Keyboard 0 - Number of Keys':'19',
'Keyboard 1 - Number of Keys':'19',
'Keyboard 2 - Number of Keys':'19',
'Keyboard 3 - Number of Keys':'19',
'Keyboard 4 - Number of Keys':'1',
'Keyboard 0 - Lowest Key':'55',
'Keyboard 1 - Lowest Key':'62',
'Keyboard 2 - Lowest Key':'69',
'Keyboard 3 - Lowest Key':'76',
'Keyboard 0 - Send Keyboard Freq':'1',
'Keyboard 1 - Send Keyboard Freq':'1',
'Keyboard 2 - Send Keyboard Freq':'1',
'Keyboard 3 - Send Keyboard Freq':'1',
'Keyboard 4 - Send Freq':'0',
'Keyboard 4 - Send Key X':'1',
'Keyboard 4 - Send Key Y':'1',
'Keyboard 4 - Key 0 - Label':'Bow',
'Keyboard 4 - Static Mode':'1'
}";
import("stdfaust.lib");
kbfreq(0) = hslider("kb0freq",220,20,10000,0.01);
kbbend(0) = hslider("kb0bend",1,ma.EPSILON,10,0.01);
kbfreq(1) = hslider("kb1freq",330,20,10000,0.01);
kbbend(1) = hslider("kb1bend",1,ma.EPSILON,10,0.01);
kbfreq(2) = hslider("kb2freq",440,20,10000,0.01);
kbbend(2) = hslider("kb2bend",1,ma.EPSILON,10,0.01);
kbfreq(3) = hslider("kb3freq",550,20,10000,0.01);
kbbend(3) = hslider("kb3bend",1,ma.EPSILON,10,0.01);
kb4k0x = hslider("kb4k0x",0,0,1,1) : si.smoo;
kb4k0y = hslider("kb4k0y",0,0,1,1) : si.smoo;
kbfingers(0) = hslider("kb0fingers",0,0,10,1) : int;
kbfingers(1) = hslider("kb1fingers",0,0,10,1) : int;
kbfingers(2) = hslider("kb2fingers",0,0,10,1) : int;
kbfingers(3) = hslider("kb3fingers",0,0,10,1) : int;
sl(i) = kbfreq(i)*kbbend(i) : pm.f2l : si.smoo;
as(i) = kbfingers(i)>0;
bowPress = kb4k0y;
bowVel = kb4k0x-kb4k0x' : abs : *(8000) : min(1) : si.smoo;
bowPos = 0.7;
model = par(i,4,pm.violinModel(sl(i),bowPress,bowVel*as(i),bowPos)) :> _;
process = model <: _,_;
|
ce2aef1cbf64a53e78270d50c33c87cffa9ff5d3c1aaf38c3756917cec1e814c | ossia/score-user-library | tinyString.dsp | declare name "Tiny String";
declare author "James Leonard";
declare date "April 2020";
/* ========= DESCRITPION =============
A small string, composed of 8 masses and two fixed points, connected by spring-dampers
- inputs: force impulse on mass 7.
- outputs: position of mass 2.
- controls: none
Note: the model block diagram is starting to get more complex, but it's still readable.
*/
import("stdfaust.lib");
in1 = button("Force Impulse"): ba.impulsify;
OutGain = 0.6;
stiffness = 0.5;
damping = 0.0003;
model = (
mi.ground(0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.ground(0.),
par(i, nbFrcIn,_):
RoutingMassToLink ,
par(i, nbFrcIn,_):
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
par(i, nbOut+nbFrcIn, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
RoutingMassToLink(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9) = /* routed positions */ m0, m1, m1, m2, m2, m3, m3, m4, m4, m5, m5, m6, m6, m7, m7, m8, m8, m0, /* outputs */ m2;
RoutingLinkToMass(l0_f1, l0_f2, l1_f1, l1_f2, l2_f1, l2_f2, l3_f1, l3_f2, l4_f1, l4_f2, l5_f1, l5_f2, l6_f1, l6_f2, l7_f1, l7_f2, l8_f1, l8_f2, p_out1, f_in1) = /* routed forces */ l0_f1 + l8_f2, l0_f2 + l1_f1, l1_f2 + l2_f1, l2_f2 + l3_f1, l3_f2 + l4_f1, l4_f2 + l5_f1, l5_f2 + l6_f1, f_in1 + l6_f2 + l7_f1, l7_f2 + l8_f1, 0, /* pass-through */ p_out1;
nbMass = 10;
nbFrcIn = 1;
nbOut = 1;
};
process = in1 : model:*(OutGain);
/*
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# MIMS script file
# Script author: James Leonard
@stiffness param 0.5
@damping param 0.0003
@g ground 0.
@m1 mass 1. 0. 0.
@m2 mass 1. 0. 0.
@m3 mass 1. 0. 0.
@m4 mass 1. 0. 0.
@m5 mass 1. 0. 0.
@m6 mass 1. 0. 0.
@m7 mass 1. 0. 0.
@m8 mass 1. 0. 0.
@g2 ground 0.
@s1 springDamper @g @m1 stiffness damping
@s2 springDamper @m1 @m2 stiffness damping
@s3 springDamper @m2 @m3 stiffness damping
@s4 springDamper @m3 @m4 stiffness damping
@s5 springDamper @m4 @m5 stiffness damping
@s6 springDamper @m5 @m6 stiffness damping
@s7 springDamper @m6 @m7 stiffness damping
@s8 springDamper @m7 @m8 stiffness damping
@s9 springDamper @m8 @g stiffness damping
# Add force input to the model
@in1 frcInput @m7
# Add position output from the string
@out1 posOutput @m2
# end of MIMS script
*/ | https://raw.githubusercontent.com/ossia/score-user-library/8a910e05f713a6d710fe3c1b8cd3e63eee9394b0/Presets/Faust/physicalModeling/mi-faust/tinyString.dsp | faust | ========= DESCRITPION =============
A small string, composed of 8 masses and two fixed points, connected by spring-dampers
- inputs: force impulse on mass 7.
- outputs: position of mass 2.
- controls: none
Note: the model block diagram is starting to get more complex, but it's still readable.
routed positions
outputs
routed forces
pass-through
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# MIMS script file
# Script author: James Leonard
@stiffness param 0.5
@damping param 0.0003
@g ground 0.
@m1 mass 1. 0. 0.
@m2 mass 1. 0. 0.
@m3 mass 1. 0. 0.
@m4 mass 1. 0. 0.
@m5 mass 1. 0. 0.
@m6 mass 1. 0. 0.
@m7 mass 1. 0. 0.
@m8 mass 1. 0. 0.
@g2 ground 0.
@s1 springDamper @g @m1 stiffness damping
@s2 springDamper @m1 @m2 stiffness damping
@s3 springDamper @m2 @m3 stiffness damping
@s4 springDamper @m3 @m4 stiffness damping
@s5 springDamper @m4 @m5 stiffness damping
@s6 springDamper @m5 @m6 stiffness damping
@s7 springDamper @m6 @m7 stiffness damping
@s8 springDamper @m7 @m8 stiffness damping
@s9 springDamper @m8 @g stiffness damping
# Add force input to the model
@in1 frcInput @m7
# Add position output from the string
@out1 posOutput @m2
# end of MIMS script
| declare name "Tiny String";
declare author "James Leonard";
declare date "April 2020";
import("stdfaust.lib");
in1 = button("Force Impulse"): ba.impulsify;
OutGain = 0.6;
stiffness = 0.5;
damping = 0.0003;
model = (
mi.ground(0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.ground(0.),
par(i, nbFrcIn,_):
RoutingMassToLink ,
par(i, nbFrcIn,_):
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
mi.springDamper(stiffness, damping, 0., 0.),
par(i, nbOut+nbFrcIn, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
nbMass = 10;
nbFrcIn = 1;
nbOut = 1;
};
process = in1 : model:*(OutGain);
|
be85dcf7f6a443170bb676ecd76dbc9eab7b73ec09651e4810172580128a94ee | ossia/score-user-library | insects.dsp | import("stdfaust.lib");
//---------------------------`cricket`-------------------------
// cricket(f1, f2, trig) : produces a cricket chirp,
// the cricket sound based on examples
// from the book "Designing Sound"
// by Andy Farnell
//
// #### Usage
//
// ```
// cricket(f1, f2, trig) : _
// ```
//
// Where:
//
// * ` f1 `: frequency of the first harmonic of the chirp
// * ` f2 `: frequency of the second harmonic of the chirp
// * `trig`: the trigger impulse
//
// #### Examples
//
// ```
// ba.pulse(20000) : cricket(5134, 12342) : _
// ```
// or
// ```
// button("chirp") : ba.impulsify : cricket(5134, 12342, trig1) : _
// ```
//
//------------------------------------------------------------
//--------------------------`critters`------------------------
// critters(freqs) : produces background 'critters' sound,
// based on examples
// from the book "Designing Sound"
// by Andy Farnell
//
// #### Usage
//
// ```
// critters(freqs) : _
// ```
//
// Where:
//
// * `freqs`: a list with 4 frequencies
//
// #### Examples
//
// ```
// critters((2012, 4, 20, 2)) : _
// ```
//
//------------------------------------------------------------
//----------------------------`frog`--------------------------
// frog(l, f, trig) : produces a frog croaking sound,
// based on examples
// from the book "Designing Sound"
// by Andy Farnell
//
// #### Usage
//
// ```
// frog(l, f, trig) : _
// ```
//
// Where:
//
// * ` l `: length of the croak in [ms]
// * ` f `: the frequency of resonance (don't go below ~300Hz)
// * `trig`: the trigger impulse
//
// #### Examples
//
// ```
// button("croak") : ba.impulsify : frog(250, 900) : _
// ```
//
//------------------------------------------------------------
wrap(s) = s - int(s);
normsin(s) = sin(2 * ma.PI * s);
normcos(s) = cos(2 * ma.PI * s);
phasor(f) = os.phasor(1, f);
stretch(ms) = ba.countdown(ma.SR * ms / 1000) : >(0);
pulsetrain(ms, n, trig) = (trig: stretch(ms * n)) * ba.pulse(ma.SR * ms / 1000);
cricket(f1, f2, trig) = s1 : *(44) <: ((aa.clip(0, 1.0): wrap), (aa.clip(1.0, 4.0) : wrap)) :> (+):
normsin : aa.clip(0.0, 1.0) : *(s2) : *(0.3): *(e)
with {
f = 0.8;
sig = phasor(f);
phase = sig : ba.sAndH(trig);
s1 = wrap(sig + (1 - phase));
s2 = os.osc(f1) + os.osc(f2) : *(no.lfnoise(500));
e = trig : stretch(1000 / f);
};
water = no.noise : abs : ba.sAndH(no.sparse_noise(250) : abs : >(0)) :
*(1200) : +(400) : os.osc : fi.resonhp(850, 15, 1) : *(0.008);
hum = no.noise : fi.resonlp(800, 1, 0.08);
critters(freqs) = freqs : prod(i, ba.count(freqs), phasor: normcos):>
fi.resonhp(20, 1, 1) : *(os.osc(0.01)): *(0.025);
frog(l, f, trig) = out
with {
sq(x) = x * x;
src = en.asr(0.0, 1.0, l / 1000, trig);
ch1 = 1.0 / (src : max(0.5): *(-1.0): +(ch2): *(3): sq: *(2): -(1) : wrap *(122): sq: +(1));
ch2 = src : min(0.5);
ch3 = (1 - src) <: ((max(0.9) : *(-1)), min(0.5)) :> *(3) <: ((*(40): +(f)), (*(90): +(2 * f)), (*(240): +(3 * f)));
out = ch3 : vcf(ch1, 5), vcf(ch1, 4), vcf(ch1, 3) : (*(0.45), _, *(0.45)) :> fi.resonhp(10, 1, 1): *(0.5);
vcf(s, res, f) = s : fi.resonbp(f, res, 1): fi.resonlp(1400, 1, 1);
};
process = insects, background : ro.interleave(2, 2) : par(i, 2, sum(j, 2, _))
with {
N = ba.count(channels);
trig_data = ((0.1, 500, 5), (0.15, 300, 3),
(0.05, 250, 6), (0.0921, 320, 4),
(0.093, 250, 3), (0.09, 300, 2), (0.087, 150, 5));
channels = (cricket(5134, 12342),
cricket(3134, 8342),
cricket(8134, 15342),
cricket(6134, 1842),
frog(250, 900),
frog(400, 600),
frog(200, 800));
spat(rng1, rng2, trig) = sp.spat(2, r, d)
with {
r = rng1 : abs : ba.sAndH(trig);
d = rng2 : abs : ba.sAndH(trig);
};
trig(f, ms, n) = no.sparse_noise(f) : abs : >(0) <: (_, pulsetrain(ms, n));
trigsm = trig_data : par(i, N, trig): ro.interleave(2, N);
btrigs = trigsm : (si.bus(N), si.block(N));
trigs = trigsm : (si.block(N), si.bus(N));
spats = (no.multinoise(2 * N), btrigs, (trigs : channels)) : ro.interleave(N, 4): par(i, N, spat);
insects = spats : ro.interleave(2, N) : par(i, 2, sum(j, N, _));
background = water + hum +
critters((2012, 4, 20, 2)) +
critters((2134, 4.279, 20.4, 15.5)) : *(0.4) <: (_, _);
};
| https://raw.githubusercontent.com/ossia/score-user-library/bbc998c0b88ce0c2a71128e42e1fee88591f4bbd/Presets/Faust/gameaudio/insects.dsp | faust | ---------------------------`cricket`-------------------------
cricket(f1, f2, trig) : produces a cricket chirp,
the cricket sound based on examples
from the book "Designing Sound"
by Andy Farnell
#### Usage
```
cricket(f1, f2, trig) : _
```
Where:
* ` f1 `: frequency of the first harmonic of the chirp
* ` f2 `: frequency of the second harmonic of the chirp
* `trig`: the trigger impulse
#### Examples
```
ba.pulse(20000) : cricket(5134, 12342) : _
```
or
```
button("chirp") : ba.impulsify : cricket(5134, 12342, trig1) : _
```
------------------------------------------------------------
--------------------------`critters`------------------------
critters(freqs) : produces background 'critters' sound,
based on examples
from the book "Designing Sound"
by Andy Farnell
#### Usage
```
critters(freqs) : _
```
Where:
* `freqs`: a list with 4 frequencies
#### Examples
```
critters((2012, 4, 20, 2)) : _
```
------------------------------------------------------------
----------------------------`frog`--------------------------
frog(l, f, trig) : produces a frog croaking sound,
based on examples
from the book "Designing Sound"
by Andy Farnell
#### Usage
```
frog(l, f, trig) : _
```
Where:
* ` l `: length of the croak in [ms]
* ` f `: the frequency of resonance (don't go below ~300Hz)
* `trig`: the trigger impulse
#### Examples
```
button("croak") : ba.impulsify : frog(250, 900) : _
```
------------------------------------------------------------ | import("stdfaust.lib");
wrap(s) = s - int(s);
normsin(s) = sin(2 * ma.PI * s);
normcos(s) = cos(2 * ma.PI * s);
phasor(f) = os.phasor(1, f);
stretch(ms) = ba.countdown(ma.SR * ms / 1000) : >(0);
pulsetrain(ms, n, trig) = (trig: stretch(ms * n)) * ba.pulse(ma.SR * ms / 1000);
cricket(f1, f2, trig) = s1 : *(44) <: ((aa.clip(0, 1.0): wrap), (aa.clip(1.0, 4.0) : wrap)) :> (+):
normsin : aa.clip(0.0, 1.0) : *(s2) : *(0.3): *(e)
with {
f = 0.8;
sig = phasor(f);
phase = sig : ba.sAndH(trig);
s1 = wrap(sig + (1 - phase));
s2 = os.osc(f1) + os.osc(f2) : *(no.lfnoise(500));
e = trig : stretch(1000 / f);
};
water = no.noise : abs : ba.sAndH(no.sparse_noise(250) : abs : >(0)) :
*(1200) : +(400) : os.osc : fi.resonhp(850, 15, 1) : *(0.008);
hum = no.noise : fi.resonlp(800, 1, 0.08);
critters(freqs) = freqs : prod(i, ba.count(freqs), phasor: normcos):>
fi.resonhp(20, 1, 1) : *(os.osc(0.01)): *(0.025);
frog(l, f, trig) = out
with {
sq(x) = x * x;
src = en.asr(0.0, 1.0, l / 1000, trig);
ch1 = 1.0 / (src : max(0.5): *(-1.0): +(ch2): *(3): sq: *(2): -(1) : wrap *(122): sq: +(1));
ch2 = src : min(0.5);
ch3 = (1 - src) <: ((max(0.9) : *(-1)), min(0.5)) :> *(3) <: ((*(40): +(f)), (*(90): +(2 * f)), (*(240): +(3 * f)));
out = ch3 : vcf(ch1, 5), vcf(ch1, 4), vcf(ch1, 3) : (*(0.45), _, *(0.45)) :> fi.resonhp(10, 1, 1): *(0.5);
vcf(s, res, f) = s : fi.resonbp(f, res, 1): fi.resonlp(1400, 1, 1);
};
process = insects, background : ro.interleave(2, 2) : par(i, 2, sum(j, 2, _))
with {
N = ba.count(channels);
trig_data = ((0.1, 500, 5), (0.15, 300, 3),
(0.05, 250, 6), (0.0921, 320, 4),
(0.093, 250, 3), (0.09, 300, 2), (0.087, 150, 5));
channels = (cricket(5134, 12342),
cricket(3134, 8342),
cricket(8134, 15342),
cricket(6134, 1842),
frog(250, 900),
frog(400, 600),
frog(200, 800));
spat(rng1, rng2, trig) = sp.spat(2, r, d)
with {
r = rng1 : abs : ba.sAndH(trig);
d = rng2 : abs : ba.sAndH(trig);
};
trig(f, ms, n) = no.sparse_noise(f) : abs : >(0) <: (_, pulsetrain(ms, n));
trigsm = trig_data : par(i, N, trig): ro.interleave(2, N);
btrigs = trigsm : (si.bus(N), si.block(N));
trigs = trigsm : (si.block(N), si.bus(N));
spats = (no.multinoise(2 * N), btrigs, (trigs : channels)) : ro.interleave(N, 4): par(i, N, spat);
insects = spats : ro.interleave(2, N) : par(i, 2, sum(j, N, _));
background = water + hum +
critters((2012, 4, 20, 2)) +
critters((2134, 4.279, 20.4, 15.5)) : *(0.4) <: (_, _);
};
|
c3c5aeade984567e9710de61b5a115fda0d28070953cd3f9cac4dfe9e95e3a46 | ossia/score-user-library | acGuitar.dsp | //############################### acGuitar.dsp #################################
// Faust instrument specifically designed for `faust2smartkeyb` where 6 virtual
// nylon strings can be strummed and plucked using a dedicated keyboard. The
// extra "strumming keyboard" could be easily replaced by an external strumming
// interface while the touch screen could keep being used to change the pitch
// of the strings.
//
// ## `SmartKeyboard` Use Strategy
//
// The first 6 keyboards implement each individual string of the instrument. A
// seventh keybaord is used a strumming/plucking interface. As mentionned
// previously, it could be easily replaced by an external interface.
//
// ## Compilation Instructions
//
// This Faust code will compile fine with any of the standard Faust targets.
// However it was specifically designed to be used with `faust2smartkeyb`. For
// best results, we recommend to use the following parameters to compile it:
//
// ```
// faust2smartkeyb [-ios/-android] -effect reverb.dsp acGuitar.dsp
// ```
//
// ## Version/Licence
//
// Version 0.0, Aug. 2017
// Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017
// MIT Licence: https://opensource.org/licenses/MIT
//##############################################################################
declare interface "SmartKeyboard{
'Number of Keyboards':'7',
'Max Keyboard Polyphony':'0',
'Rounding Mode':'2',
'Keyboard 0 - Number of Keys':'14',
'Keyboard 1 - Number of Keys':'14',
'Keyboard 2 - Number of Keys':'14',
'Keyboard 3 - Number of Keys':'14',
'Keyboard 4 - Number of Keys':'14',
'Keyboard 5 - Number of Keys':'14',
'Keyboard 6 - Number of Keys':'6',
'Keyboard 0 - Lowest Key':'52',
'Keyboard 1 - Lowest Key':'57',
'Keyboard 2 - Lowest Key':'62',
'Keyboard 3 - Lowest Key':'67',
'Keyboard 4 - Lowest Key':'71',
'Keyboard 5 - Lowest Key':'76',
'Keyboard 0 - Send Keyboard Freq':'1',
'Keyboard 1 - Send Keyboard Freq':'1',
'Keyboard 2 - Send Keyboard Freq':'1',
'Keyboard 3 - Send Keyboard Freq':'1',
'Keyboard 4 - Send Keyboard Freq':'1',
'Keyboard 5 - Send Keyboard Freq':'1',
'Keyboard 6 - Piano Keyboard':'0',
'Keyboard 6 - Send Key Status':'1',
'Keyboard 6 - Key 0 - Label':'S0',
'Keyboard 6 - Key 1 - Label':'S1',
'Keyboard 6 - Key 2 - Label':'S2',
'Keyboard 6 - Key 3 - Label':'S3',
'Keyboard 6 - Key 4 - Label':'S4',
'Keyboard 6 - Key 5 - Label':'S5'
}";
import("stdfaust.lib");
// SMARTKEYBOARD PARAMS
kbfreq(0) = hslider("kb0freq",164.8,20,10000,0.01);
kbbend(0) = hslider("kb0bend",1,ma.EPSILON,10,0.01);
kbfreq(1) = hslider("kb1freq",220,20,10000,0.01);
kbbend(1) = hslider("kb1bend",1,ma.EPSILON,10,0.01);
kbfreq(2) = hslider("kb2freq",293.7,20,10000,0.01);
kbbend(2) = hslider("kb2bend",1,ma.EPSILON,10,0.01);
kbfreq(3) = hslider("kb3freq",392,20,10000,0.01);
kbbend(3) = hslider("kb3bend",1,ma.EPSILON,10,0.01);
kbfreq(4) = hslider("kb4freq",493.9,20,10000,0.01);
kbbend(4) = hslider("kb4bend",1,ma.EPSILON,10,0.01);
kbfreq(5) = hslider("kb5freq",659.2,20,10000,0.01);
kbbend(5) = hslider("kb5bend",1,ma.EPSILON,10,0.01);
kb6kstatus(0) = hslider("kb6k0status",0,0,1,1) <: ==(1) | ==(4) : int;
kb6kstatus(1) = hslider("kb6k1status",0,0,1,1) <: ==(1) | ==(4) : int;
kb6kstatus(2) = hslider("kb6k2status",0,0,1,1) <: ==(1) | ==(4) : int;
kb6kstatus(3) = hslider("kb6k3status",0,0,1,1) <: ==(1) | ==(4) : int;
kb6kstatus(4) = hslider("kb6k4status",0,0,1,1) <: ==(1) | ==(4) : int;
kb6kstatus(5) = hslider("kb6k5status",0,0,1,1) <: ==(1) | ==(4) : int;
// MODEL PARAMETERS
// strings length
sl(i) = kbfreq(i)*kbbend(i) : pm.f2l : si.smoo;
// pluck position is controlled by the x axis of the accel
pluckPosition =
hslider("pluckPosition[acc: 1 0 -10 0 10]",0.5,0,1,0.01) : si.smoo;
// ASSEMBLING MODELS
// number of strings
nStrings = 6;
guitar = par(i,nStrings,
kb6kstatus(i) : ba.impulsify : // using "raw" impulses to drive the models
pm.nylonGuitarModel(sl(i),pluckPosition)) :> _;
process = guitar <: _,_;
| https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/smartKeyboard/acGuitar.dsp | faust | ############################### acGuitar.dsp #################################
Faust instrument specifically designed for `faust2smartkeyb` where 6 virtual
nylon strings can be strummed and plucked using a dedicated keyboard. The
extra "strumming keyboard" could be easily replaced by an external strumming
interface while the touch screen could keep being used to change the pitch
of the strings.
## `SmartKeyboard` Use Strategy
The first 6 keyboards implement each individual string of the instrument. A
seventh keybaord is used a strumming/plucking interface. As mentionned
previously, it could be easily replaced by an external interface.
## Compilation Instructions
This Faust code will compile fine with any of the standard Faust targets.
However it was specifically designed to be used with `faust2smartkeyb`. For
best results, we recommend to use the following parameters to compile it:
```
faust2smartkeyb [-ios/-android] -effect reverb.dsp acGuitar.dsp
```
## Version/Licence
Version 0.0, Aug. 2017
Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017
MIT Licence: https://opensource.org/licenses/MIT
##############################################################################
SMARTKEYBOARD PARAMS
MODEL PARAMETERS
strings length
pluck position is controlled by the x axis of the accel
ASSEMBLING MODELS
number of strings
using "raw" impulses to drive the models |
declare interface "SmartKeyboard{
'Number of Keyboards':'7',
'Max Keyboard Polyphony':'0',
'Rounding Mode':'2',
'Keyboard 0 - Number of Keys':'14',
'Keyboard 1 - Number of Keys':'14',
'Keyboard 2 - Number of Keys':'14',
'Keyboard 3 - Number of Keys':'14',
'Keyboard 4 - Number of Keys':'14',
'Keyboard 5 - Number of Keys':'14',
'Keyboard 6 - Number of Keys':'6',
'Keyboard 0 - Lowest Key':'52',
'Keyboard 1 - Lowest Key':'57',
'Keyboard 2 - Lowest Key':'62',
'Keyboard 3 - Lowest Key':'67',
'Keyboard 4 - Lowest Key':'71',
'Keyboard 5 - Lowest Key':'76',
'Keyboard 0 - Send Keyboard Freq':'1',
'Keyboard 1 - Send Keyboard Freq':'1',
'Keyboard 2 - Send Keyboard Freq':'1',
'Keyboard 3 - Send Keyboard Freq':'1',
'Keyboard 4 - Send Keyboard Freq':'1',
'Keyboard 5 - Send Keyboard Freq':'1',
'Keyboard 6 - Piano Keyboard':'0',
'Keyboard 6 - Send Key Status':'1',
'Keyboard 6 - Key 0 - Label':'S0',
'Keyboard 6 - Key 1 - Label':'S1',
'Keyboard 6 - Key 2 - Label':'S2',
'Keyboard 6 - Key 3 - Label':'S3',
'Keyboard 6 - Key 4 - Label':'S4',
'Keyboard 6 - Key 5 - Label':'S5'
}";
import("stdfaust.lib");
kbfreq(0) = hslider("kb0freq",164.8,20,10000,0.01);
kbbend(0) = hslider("kb0bend",1,ma.EPSILON,10,0.01);
kbfreq(1) = hslider("kb1freq",220,20,10000,0.01);
kbbend(1) = hslider("kb1bend",1,ma.EPSILON,10,0.01);
kbfreq(2) = hslider("kb2freq",293.7,20,10000,0.01);
kbbend(2) = hslider("kb2bend",1,ma.EPSILON,10,0.01);
kbfreq(3) = hslider("kb3freq",392,20,10000,0.01);
kbbend(3) = hslider("kb3bend",1,ma.EPSILON,10,0.01);
kbfreq(4) = hslider("kb4freq",493.9,20,10000,0.01);
kbbend(4) = hslider("kb4bend",1,ma.EPSILON,10,0.01);
kbfreq(5) = hslider("kb5freq",659.2,20,10000,0.01);
kbbend(5) = hslider("kb5bend",1,ma.EPSILON,10,0.01);
kb6kstatus(0) = hslider("kb6k0status",0,0,1,1) <: ==(1) | ==(4) : int;
kb6kstatus(1) = hslider("kb6k1status",0,0,1,1) <: ==(1) | ==(4) : int;
kb6kstatus(2) = hslider("kb6k2status",0,0,1,1) <: ==(1) | ==(4) : int;
kb6kstatus(3) = hslider("kb6k3status",0,0,1,1) <: ==(1) | ==(4) : int;
kb6kstatus(4) = hslider("kb6k4status",0,0,1,1) <: ==(1) | ==(4) : int;
kb6kstatus(5) = hslider("kb6k5status",0,0,1,1) <: ==(1) | ==(4) : int;
sl(i) = kbfreq(i)*kbbend(i) : pm.f2l : si.smoo;
pluckPosition =
hslider("pluckPosition[acc: 1 0 -10 0 10]",0.5,0,1,0.01) : si.smoo;
nStrings = 6;
guitar = par(i,nStrings,
pm.nylonGuitarModel(sl(i),pluckPosition)) :> _;
process = guitar <: _,_;
|
c6e97ac267742393adbed36953759f9cdc5d75198d8a528aeafcc790b99bdb20 | ossia/score-user-library | physicalLFO.dsp | declare name "Physical LFO";
declare author "James Leonard";
declare date "April 2020";
/* ========= DESCRITPION =============
You can use physical models for other things than sythesizing "acoustical" sounds!
Here, we use a very floppy string as an LFO generator to modulate a white noise signal.
- inputs: force impulse to excite the string.
- outputs: position of one mass of the string (used to modulate the white noise)
- controls: string stiffness and damping.
Note: when excited, the string first displays strong harmonic content, resulting in complex
modulation patterns that die down as damping tends to return to the fundamental frequency.
*/
import("stdfaust.lib");
gateT = button("Excite String"):ba.impulsify;
in1 = gateT * 0.1;
OutGain = hslider("output gain", 0.01, 0, 0.02, 0.00001);
str_M = 1.0;
str_K = hslider("string stiffness", 0.000001, 0.0000001, 0.00001, 0.0000001);
str_Z = hslider("string damping", 0.0001, 0, 0.002, 0.00001);
model = (
mi.ground(0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.ground(0.),
par(i, nbFrcIn,_):
RoutingMassToLink ,
par(i, nbFrcIn,_):
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
par(i, nbOut+nbFrcIn, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
RoutingMassToLink(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11) = /* routed positions */ m0, m1, m1, m2, m2, m3, m3, m4, m4, m5, m5, m6, m6, m7, m7, m8, m8, m9, m9, m10, m10, m11, /* outputs */ m2;
RoutingLinkToMass(l0_f1, l0_f2, l1_f1, l1_f2, l2_f1, l2_f2, l3_f1, l3_f2, l4_f1, l4_f2, l5_f1, l5_f2, l6_f1, l6_f2, l7_f1, l7_f2, l8_f1, l8_f2, l9_f1, l9_f2, l10_f1, l10_f2, p_out1, f_in1) = /* routed forces */ l0_f1, f_in1 + l0_f2 + l1_f1, l1_f2 + l2_f1, l2_f2 + l3_f1, l3_f2 + l4_f1, l4_f2 + l5_f1, l5_f2 + l6_f1, l6_f2 + l7_f1, l7_f2 + l8_f1, l8_f2 + l9_f1, l9_f2 + l10_f1, l10_f2, /* pass-through */ p_out1;
nbMass = 12;
nbFrcIn = 1;
nbOut = 1;
};
process = in1 : model:*(OutGain)*no.noise;
/*
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
@str_M param 1.0
@str_K param 0.1
@str_Z param 0.001
@str_s0 ground 0.
@str_m0 mass str_M 0. 0.
@str_m1 mass str_M 0. 0.
@str_m2 mass str_M 0. 0.
@str_m3 mass str_M 0. 0.
@str_m4 mass str_M 0. 0.
@str_m5 mass str_M 0. 0.
@str_m6 mass str_M 0. 0.
@str_m7 mass str_M 0. 0.
@str_m8 mass str_M 0. 0.
@str_m9 mass str_M 0. 0.
@str_s1 ground 0.
@str_r0 springDamper @str_s0 @str_m0 str_K str_Z
@str_r1 springDamper @str_m0 @str_m1 str_K str_Z
@str_r2 springDamper @str_m1 @str_m2 str_K str_Z
@str_r3 springDamper @str_m2 @str_m3 str_K str_Z
@str_r4 springDamper @str_m3 @str_m4 str_K str_Z
@str_r5 springDamper @str_m4 @str_m5 str_K str_Z
@str_r6 springDamper @str_m5 @str_m6 str_K str_Z
@str_r7 springDamper @str_m6 @str_m7 str_K str_Z
@str_r8 springDamper @str_m7 @str_m8 str_K str_Z
@str_r9 springDamper @str_m8 @str_m9 str_K str_Z
@str_r10 springDamper @str_m9 @str_s1 str_K str_Z
@in1 frcInput @str_m0
@out1 posOutput @str_m1
*/ | https://raw.githubusercontent.com/ossia/score-user-library/8a910e05f713a6d710fe3c1b8cd3e63eee9394b0/Presets/Faust/physicalModeling/mi-faust/physicalLFO.dsp | faust | ========= DESCRITPION =============
You can use physical models for other things than sythesizing "acoustical" sounds!
Here, we use a very floppy string as an LFO generator to modulate a white noise signal.
- inputs: force impulse to excite the string.
- outputs: position of one mass of the string (used to modulate the white noise)
- controls: string stiffness and damping.
Note: when excited, the string first displays strong harmonic content, resulting in complex
modulation patterns that die down as damping tends to return to the fundamental frequency.
routed positions
outputs
routed forces
pass-through
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
@str_M param 1.0
@str_K param 0.1
@str_Z param 0.001
@str_s0 ground 0.
@str_m0 mass str_M 0. 0.
@str_m1 mass str_M 0. 0.
@str_m2 mass str_M 0. 0.
@str_m3 mass str_M 0. 0.
@str_m4 mass str_M 0. 0.
@str_m5 mass str_M 0. 0.
@str_m6 mass str_M 0. 0.
@str_m7 mass str_M 0. 0.
@str_m8 mass str_M 0. 0.
@str_m9 mass str_M 0. 0.
@str_s1 ground 0.
@str_r0 springDamper @str_s0 @str_m0 str_K str_Z
@str_r1 springDamper @str_m0 @str_m1 str_K str_Z
@str_r2 springDamper @str_m1 @str_m2 str_K str_Z
@str_r3 springDamper @str_m2 @str_m3 str_K str_Z
@str_r4 springDamper @str_m3 @str_m4 str_K str_Z
@str_r5 springDamper @str_m4 @str_m5 str_K str_Z
@str_r6 springDamper @str_m5 @str_m6 str_K str_Z
@str_r7 springDamper @str_m6 @str_m7 str_K str_Z
@str_r8 springDamper @str_m7 @str_m8 str_K str_Z
@str_r9 springDamper @str_m8 @str_m9 str_K str_Z
@str_r10 springDamper @str_m9 @str_s1 str_K str_Z
@in1 frcInput @str_m0
@out1 posOutput @str_m1
| declare name "Physical LFO";
declare author "James Leonard";
declare date "April 2020";
import("stdfaust.lib");
gateT = button("Excite String"):ba.impulsify;
in1 = gateT * 0.1;
OutGain = hslider("output gain", 0.01, 0, 0.02, 0.00001);
str_M = 1.0;
str_K = hslider("string stiffness", 0.000001, 0.0000001, 0.00001, 0.0000001);
str_Z = hslider("string damping", 0.0001, 0, 0.002, 0.00001);
model = (
mi.ground(0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.mass(str_M, 0, 0., 0.),
mi.ground(0.),
par(i, nbFrcIn,_):
RoutingMassToLink ,
par(i, nbFrcIn,_):
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
par(i, nbOut+nbFrcIn, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
nbMass = 12;
nbFrcIn = 1;
nbOut = 1;
};
process = in1 : model:*(OutGain)*no.noise;
|
66d61166d7433f11d764603169aa177fe4ede83a7114dceb0d6b86dffb8dcaff | ossia/score-user-library | simpleSynth_FX_Analog.dsp | import("stdfaust.lib");
///////////////////////////////////////////////////////////////////////////////////////////////////
//
// A very simple subtractive synthesizer with 1 VCO 1 VCF.
// The VCO Waveform is variable between Saw and Square
// The frequency is modulated by an LFO
// The envelope control volum and filter frequency
//
///////////////////////////////////////////////////////////////////////////////////////////////////
// ANALOG IMPLEMENTATION:
//
// ANALOG_0 : waveform (Saw to square)
// ANALOG_1 : Filter Cutoff frequency
// ANALOG_2 : Filter resonance (Q)
// ANALOG_3 : Filter Envelope Modulation
//
// MIDI:
// CC 79 : Filter keyboard tracking (0 to X2, default 1)
//
// Envelope
// CC 73 : Attack
// CC 76 : Decay
// CC 77 : Sustain
// CC 72 : Release
//
// CC 78 : LFO frequency (0.001Hz to 10Hz)
// CC 1 : LFO Amplitude (Modulation)
//
///////////////////////////////////////////////////////////////////////////////////////////////////
//
// HUI //////////////////////////////////////////////////
// Keyboard
midigate = button("gate");
midifreq = nentry("freq[unit:Hz]", 440, 20, 20000, 1);
midigain = nentry("gain", 0.5, 0, 0.5, 0.01);// MIDI KEYBOARD
// pitchwheel
bend = ba.semi2ratio(hslider("bend [midi:pitchwheel]",0,-2,2,0.01));
// VCO
wfFade = hslider("waveform[BELA: ANALOG_0]",0.5,0,1,0.001):si.smoo;
// VCF
res = hslider("resonnance[BELA: ANALOG_2]",0.5,0,1,0.001):si.smoo;
fr = hslider("fc[BELA: ANALOG_1]", 15, 15, 12000, 0.001):si.smoo;
track = hslider("tracking[midi:ctrl 79]", 1, 0, 2, 0.001);
envMod = hslider("envMod[BELA: ANALOG_3]",50,0,100,0.01):si.smoo;
// ENV
att = 0.01 * (hslider("attack[midi:ctrl 73]",0.1,0.1,400,0.001));
dec = 0.01 * (hslider("decay[midi:ctrl 76]",60,0.1,400,0.001));
sust = hslider ("sustain[midi:ctrl 77]",0.2,0,1,0.001);
rel = 0.01 * (hslider("release[midi:ctrl 72]",100,0.1,400,0.001));
// LFO
lfoFreq = hslider("lfoFreq[midi:ctrl 78]",6,0.001,10,0.001):si.smoo;
modwheel = hslider("modwheel[midi:ctrl 1]",0,0,0.5,0.001):si.smoo;
// PROCESS /////////////////////////////////////////////
allfreq = (midifreq * bend) + LFO;
// VCF
cutoff = ((allfreq * track) + fr + (envMod * midigain * env)) : min(ma.SR/8);
// VCO
oscillo(f) = (os.sawtooth(f)*(1-wfFade))+(os.square(f)*wfFade);
// VCA
volume = midigain * env;
// Enveloppe
env = en.adsre(att,dec,sust,rel,midigate);
// LFO
LFO = os.lf_triangle(lfoFreq)*modwheel*10;
// SYNTH ////////////////////////////////////////////////
synth = (oscillo(allfreq) : ve.moog_vcf(res,cutoff)) * volume;
//#################################################################################################//
//##################################### EFFECT SECTION ############################################//
//#################################################################################################//
//
// Simple FX chaine build for a mono synthesizer.
// It controle general volume and pan.
// FX Chaine is:
// Drive
// Flanger
// Reverberation
//
// This version use ANALOG IN to controle some of the parameters.
// Other parameters continue to be available by MIDI or OSC.
//
///////////////////////////////////////////////////////////////////////////////////////////////////
// ANALOG IMPLEMENTATION:
//
// ANALOG_4 : Distortion Drive
// ANALOG_5 : Flanger Dry/Wet
// ANALOG_6 : Reverberation Dry/Wet
// ANALOG_7 : Reverberation Room size
//
// MIDI:
// CC 7 : Volume
// CC 10 : Pan
//
// CC 13 : Flanger Delay
// CC 13 : Flanger Delay
// CC 94 : Flanger Feedback
//
// CC 95 : Reverberation Damp
// CC 90 : Reverberation Stereo Width
//
///////////////////////////////////////////////////////////////////////////////////////////////////
// VOLUME:
volFX = hslider("volume[midi:ctrl 7]",1,0,1,0.001); // Should be 7 according to MIDI CC norm.
// EFFECTS /////////////////////////////////////////////
drive = hslider("drive[BELA: ANALOG_4]",0.3,0,1,0.001);
// Flanger
curdel = hslider("flangDel[midi:ctrl 13]",4,0.001,10,0.001);
fb = hslider("flangFeedback[midi:ctrl 94]",0.7,0,1,0.001);
fldw = hslider("dryWetFlang[BELA: ANALOG_5]",0.5,0,1,0.001);
flanger = efx
with {
fldel = (curdel + (os.lf_triangle(1) * 2)) : min(10);
efx = _ <: _, pf.flanger_mono(10,fldel,1,fb,0) : dry_wet(fldw);
};
// Panoramic:
panno = _ : sp.panner(hslider("pan[midi:ctrl 10]",0.5,0,1,0.001)) : _,_;
// REVERB (from freeverb_demo)
reverb = _,_ <: (*(g)*fixedgain, *(g)*fixedgain :
re.stereo_freeverb(combfeed, allpassfeed, damping, spatSpread)),
*(1-g), *(1-g) :> _,_
with {
scaleroom = 0.28;
offsetroom = 0.7;
allpassfeed = 0.5;
scaledamp = 0.4;
fixedgain = 0.1;
origSR = 44100;
damping = vslider("Damp[midi:ctrl 95]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR;
combfeed = vslider("RoomSize[BELA: ANALOG_7]", 0.7, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom;
spatSpread = vslider("Stereo[midi:ctrl 90]",0.6,0,1,0.01)*46*ma.SR/origSR;
g = vslider("dryWetReverb[BELA: ANALOG_6]", 0.4, 0, 1, 0.001);
// (g = Dry/Wet)
};
// Dry-Wet (from C. LEBRETON)
dry_wet(dw,x,y) = wet*y + dry*x
with {
wet = 0.5*(dw+1.0);
dry = 1.0-wet;
};
// ALL
effect = _ *(volFX) : ef.cubicnl_nodc(drive, 0.1) : flanger : panno : reverb;
// PROCESS /////////////////////////////////////////////
process = synth;
| https://raw.githubusercontent.com/ossia/score-user-library/1de4c36f179105f1728e72b02e96f68d1c9130c2/Presets/Faust/bela/simpleSynth_FX_Analog.dsp | faust | /////////////////////////////////////////////////////////////////////////////////////////////////
A very simple subtractive synthesizer with 1 VCO 1 VCF.
The VCO Waveform is variable between Saw and Square
The frequency is modulated by an LFO
The envelope control volum and filter frequency
/////////////////////////////////////////////////////////////////////////////////////////////////
ANALOG IMPLEMENTATION:
ANALOG_0 : waveform (Saw to square)
ANALOG_1 : Filter Cutoff frequency
ANALOG_2 : Filter resonance (Q)
ANALOG_3 : Filter Envelope Modulation
MIDI:
CC 79 : Filter keyboard tracking (0 to X2, default 1)
Envelope
CC 73 : Attack
CC 76 : Decay
CC 77 : Sustain
CC 72 : Release
CC 78 : LFO frequency (0.001Hz to 10Hz)
CC 1 : LFO Amplitude (Modulation)
/////////////////////////////////////////////////////////////////////////////////////////////////
HUI //////////////////////////////////////////////////
Keyboard
MIDI KEYBOARD
pitchwheel
VCO
VCF
ENV
LFO
PROCESS /////////////////////////////////////////////
VCF
VCO
VCA
Enveloppe
LFO
SYNTH ////////////////////////////////////////////////
#################################################################################################//
##################################### EFFECT SECTION ############################################//
#################################################################################################//
Simple FX chaine build for a mono synthesizer.
It controle general volume and pan.
FX Chaine is:
Drive
Flanger
Reverberation
This version use ANALOG IN to controle some of the parameters.
Other parameters continue to be available by MIDI or OSC.
/////////////////////////////////////////////////////////////////////////////////////////////////
ANALOG IMPLEMENTATION:
ANALOG_4 : Distortion Drive
ANALOG_5 : Flanger Dry/Wet
ANALOG_6 : Reverberation Dry/Wet
ANALOG_7 : Reverberation Room size
MIDI:
CC 7 : Volume
CC 10 : Pan
CC 13 : Flanger Delay
CC 13 : Flanger Delay
CC 94 : Flanger Feedback
CC 95 : Reverberation Damp
CC 90 : Reverberation Stereo Width
/////////////////////////////////////////////////////////////////////////////////////////////////
VOLUME:
Should be 7 according to MIDI CC norm.
EFFECTS /////////////////////////////////////////////
Flanger
Panoramic:
REVERB (from freeverb_demo)
(g = Dry/Wet)
Dry-Wet (from C. LEBRETON)
ALL
PROCESS ///////////////////////////////////////////// | import("stdfaust.lib");
midigate = button("gate");
midifreq = nentry("freq[unit:Hz]", 440, 20, 20000, 1);
bend = ba.semi2ratio(hslider("bend [midi:pitchwheel]",0,-2,2,0.01));
wfFade = hslider("waveform[BELA: ANALOG_0]",0.5,0,1,0.001):si.smoo;
res = hslider("resonnance[BELA: ANALOG_2]",0.5,0,1,0.001):si.smoo;
fr = hslider("fc[BELA: ANALOG_1]", 15, 15, 12000, 0.001):si.smoo;
track = hslider("tracking[midi:ctrl 79]", 1, 0, 2, 0.001);
envMod = hslider("envMod[BELA: ANALOG_3]",50,0,100,0.01):si.smoo;
att = 0.01 * (hslider("attack[midi:ctrl 73]",0.1,0.1,400,0.001));
dec = 0.01 * (hslider("decay[midi:ctrl 76]",60,0.1,400,0.001));
sust = hslider ("sustain[midi:ctrl 77]",0.2,0,1,0.001);
rel = 0.01 * (hslider("release[midi:ctrl 72]",100,0.1,400,0.001));
lfoFreq = hslider("lfoFreq[midi:ctrl 78]",6,0.001,10,0.001):si.smoo;
modwheel = hslider("modwheel[midi:ctrl 1]",0,0,0.5,0.001):si.smoo;
allfreq = (midifreq * bend) + LFO;
cutoff = ((allfreq * track) + fr + (envMod * midigain * env)) : min(ma.SR/8);
oscillo(f) = (os.sawtooth(f)*(1-wfFade))+(os.square(f)*wfFade);
volume = midigain * env;
env = en.adsre(att,dec,sust,rel,midigate);
LFO = os.lf_triangle(lfoFreq)*modwheel*10;
synth = (oscillo(allfreq) : ve.moog_vcf(res,cutoff)) * volume;
drive = hslider("drive[BELA: ANALOG_4]",0.3,0,1,0.001);
curdel = hslider("flangDel[midi:ctrl 13]",4,0.001,10,0.001);
fb = hslider("flangFeedback[midi:ctrl 94]",0.7,0,1,0.001);
fldw = hslider("dryWetFlang[BELA: ANALOG_5]",0.5,0,1,0.001);
flanger = efx
with {
fldel = (curdel + (os.lf_triangle(1) * 2)) : min(10);
efx = _ <: _, pf.flanger_mono(10,fldel,1,fb,0) : dry_wet(fldw);
};
panno = _ : sp.panner(hslider("pan[midi:ctrl 10]",0.5,0,1,0.001)) : _,_;
reverb = _,_ <: (*(g)*fixedgain, *(g)*fixedgain :
re.stereo_freeverb(combfeed, allpassfeed, damping, spatSpread)),
*(1-g), *(1-g) :> _,_
with {
scaleroom = 0.28;
offsetroom = 0.7;
allpassfeed = 0.5;
scaledamp = 0.4;
fixedgain = 0.1;
origSR = 44100;
damping = vslider("Damp[midi:ctrl 95]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR;
combfeed = vslider("RoomSize[BELA: ANALOG_7]", 0.7, 0, 1, 0.025)*scaleroom*origSR/ma.SR + offsetroom;
spatSpread = vslider("Stereo[midi:ctrl 90]",0.6,0,1,0.01)*46*ma.SR/origSR;
g = vslider("dryWetReverb[BELA: ANALOG_6]", 0.4, 0, 1, 0.001);
};
dry_wet(dw,x,y) = wet*y + dry*x
with {
wet = 0.5*(dw+1.0);
dry = 1.0-wet;
};
effect = _ *(volFX) : ef.cubicnl_nodc(drive, 0.1) : flanger : panno : reverb;
process = synth;
|
4160910b0a2bfc699cf64b3ce9b1c8496996865213727a4b1a19e616919fd8fd | ossia/score-user-library | virtualAnalogForBrowser.dsp | import("stdfaust.lib");
// These are now in a separate file ./effects.dsp
// echo = echog(component("echo.dsp")); // ./echo.dsp
// flanger = flg(component("flanger.dsp")); // ./flanger.dsp
// chorus = chg(component("chorus.dsp")); // ./chorus.dsp
// reverb = rg(component("freeverb.dsp"));
process = main <: _,_; // Now separate: : echo : flanger : chorus : reverb;
main = (signal + attach(extInput,amp) : filters : *(ampScaling)) ~ _;
signal = oscs + noise * noiseOff * namp;
ampScaling = envelopeAmp * masterVolume; // masterVolume is redundant but easier to find
oscs = par(i,3,(oscamp(i+1)*osc(i+1))) :> _;
controlSelect(1) = osc1(vrockerred); // ("[0] use as LFO"));
octaveSelect(1) = osc1(vslider("[1] Octave1 [midi:ctrl 23] [style:knob]",1,0,5,1):int); // LO, 32', 16', 8', 4', 2'
// Osc1 detunes like Osc2 and Osc3 (unlike in the Minimoog where it would be an expensive extra knob):
detuneOctaves(1) = osc1(vslider("[2] DeTuning1 [units:Octaves] [midi:ctrl 24] [style:knob]",0.0,-1.0,1.0,0.001));
waveSelect(1) = osc1(vslider("[3] Waveform1 [midi:ctrl 25] [style:knob]",5,0,5,1):int);
amp1Enable = mr1(vslider("[1] amp1Enable [midi:ctrl 12] [style:knob] [color:blue]",1,0,1,1));
oscamp(1) = mr1(vslider("[0] Osc1 Amp [midi:ctrl 26] [style:knob]",0.5,0.0,1.0,0.001)) * amp1Enable;
eei = mr2(vslider("[1] extInputOn [midi:ctrl 13] [style:knob] [color:blue]",0,0,1,1)); // External input = MAIN OUTPUT when "off"
sei = mr2(vslider("[0] Ext Input [midi:ctrl 27] [style: knob]",0,0,1.0,0.001));
extInput(fb,extSig) = fb,extSig : select2(eei) : *(sei) : extClipLED;
extClipLED = _ <: _, (abs : >(0.95) : mr2(vbargraph("[2] Ext Input Clip [style:led]",0,1)):!);
keycLED = attach(mr2(vbargraph("[3] Keyboard Ctl [style:led]",0,1)));
controlSelect(2) = osc2(vrockerred); // ("[0] use as LFO"));
octaveSelect(2) = osc2(vslider("[1] Octave2 [midi:ctrl 28] [style:knob]",1,0,5,1):int); // LO, 32', 16', 8', 4', 2'
detuneOctaves(2) = osc2(vslider("[2] DeTuning2 [units:Octaves] [midi:ctrl 29] [style:knob]",0.41667,-1.0,1.0,0.001));
waveSelect(2) = osc2(vslider("[3] Waveform2 [midi:ctrl 30] [style:knob]",5,0,5,1):int);
amp2Enable = mr3(vslider("[1] amp2Enable [midi:ctrl 14] [style:knob] [color:blue]",1,0,1,1));
oscamp(2) = mr3(vslider("[0] Osc2 Amp [midi:ctrl 31] [style:knob]",0.5,0.0,1.0,0.001)) * amp2Enable;
noise = select2(ntype,no.noise,10.0*no.pink_noise); // pink noise needs some "make-up gain"
namp = mr4(vslider("[0] Noise Amp [midi:ctrl 32] [style: knob]",0.0,0.0,1.0,0.001));
noiseOff = mr4cbg(vslider("[0] noiseEnable [midi:ctrl 15] [style:knob] [color:blue]",0,0,1,1));
ntype = mr4cbg(vslider("[1] White/Pink [midi:ctrl 16] [tooltip: Choose either White or Pink Noise] [style: knob] [color:blue]",1,0,1,1));
controlSelect(3) = osc3(vrockerred); // ("[0] use as LFO"));
octaveSelect(3) = osc3(vslider("[1] Octave3 [midi:ctrl 33] [style:knob]",0,0,5,1):int); // LO, 32', 16', 8', 4', 2'
detuneOctaves(3) = osc3(vslider("[2] DeTuning3 [units:Octaves] [midi:ctrl 34] [style:knob]",0.3,-1.0,1.0,0.001));
waveSelect(3) = osc3(vslider("[3] Waveform3 [midi:ctrl 35] [style:knob]",0,0,5,1):int);
amp3Enable = mr5(vslider("[1] amp3Enable [midi:ctrl 17] [style:knob] [color:blue]",0,0,1,1));
oscamp(3) = mr5(vslider("[0] Osc3 Amp [midi:ctrl 36] [style:knob]",0.5,0.0,1.0,0.001)) * amp3Enable;
waveforms(i) = (tri(i), bent(i), saw(i), sq(i), ptm(i), ptn(i));
// compute oscillator frequency scale factor, staying in lg(Hz) as much as possible:
modWheelShift = 1.5*modWheel; // Manual says 0 to 1.5 octaves
modulationCenterShift = 0; // Leave this off until triangle-wave modulation is debugged
modulationShift = select2(oscModEnable, 0.0,
modWheelShift * ( modulationCenterShift + (1.0-modulationCenterShift) * oscNoiseModulation ));
octaveShift(i) = -2+int(octaveSelect(i));
osc3FixedFreq = 369.994; // F# a tritone above middle C
keyFreqGlidedMaybe = select2(osc3Control,osc3FixedFreq,keyFreqGlided);
keyFreqModulatedShifted(3) = keyFreqGlidedMaybe; // osc3 not allowed to FM itself
keyFreqModulatedShifted(i) = keyFreqGlided * pow(2.0, modulationShift); // i=1,2
// When disconnected from the keyboard, Osc3 can detune 3 octaves up or down (Pat video):
detuneBoost(3) = select2(osc3Control,3.0,1.0);
detuneBoost(i) = 1.0; // i=1,2
detuneOctavesFinal(i) = detuneOctaves(i)*detuneBoost(i);
fBase(i) = keyFreqModulatedShifted(i) * pow(2.0, (masterTuneOctaves+octaveShift(i)+detuneOctavesFinal(i)))
: si.smooth(ba.tau2pole(0.016));
fLFOBase(i) = 3.0 * pow(2.0, detuneOctavesFinal(i)); // used when osc3 (only) is in LFO mode
lfoMode(i) = (octaveSelect(i) == 0);
f(i) = select2(lfoMode(i), fBase(i), fLFOBase(i)); // lowest range setting is LFO mode for any osc
// i is 1-based:
osc(i) = ba.selectn(6, int(waveSelect(i)), tri(i), bent(i), saw(i), sq(i), ptm(i), ptn(i));
tri(i) = select2(lfoMode(i),
os.triangle(f(i)),
os.lf_triangle(f(i)));
bent(i) = 0.5*tri(i) + 0.5*saw(i); // from Minimoog manual
saw(i) = select2(lfoMode(i),
os.sawtooth(f(i)),
os.lf_saw(f(i)));
sq(i) = select2(lfoMode(i),
os.square(f(i)),
os.lf_squarewave(f(i)));
ptm(i) = select2(lfoMode(i), // Note: a Duty knob would be better than these two, or in addition
os.pulsetrain(f(i),0.25),
lf_pulsetrain(f(i),0.25));
ptn(i) = select2(lfoMode(i),
os.pulsetrain(f(i),0.125),
lf_pulsetrain(f(i),0.125));
// Soon to appear in oscillators.lib:
lf_pulsetrain(freq,duty) = 2.0*os.lf_pulsetrainpos(freq,duty) - 1.0;
filters = ba.bypass1(bp,vcf); // BYPASS WILL GO AWAY (I think you just open it up all the way to bypass):
bp = 0; // VCF is always on
fcLgHz = vcf1(vslider("[1] Corner Freq [unit:Log2(Hz)]
[tooltip: Corner resonance frequency in Log2(Hertz)]
[style: knob]
[midi:ctrl 74]", // Frequency Cutoff (aka Brightness )
10.6, log(40.0)/log(2), log(20000.0)/log(2), 0.000001)) // 9 octaves (from Minimoog manual)
//p: 40, 30, 80, 0.01))
//p: : ba.pianokey2hz
: si.smooth(ba.tau2pole(0.016));
res = vcf1(vslider("[2] Corner Resonance [midi:ctrl 37] [tooltip: Resonance Q at VCF corner frequency (0 to 1)]
[style: knob]",
0.7, 0, 1, 0.01));
vcfKeyRange = vcf1cbg(vslider("[2] Kbd Ctl [midi:ctrl 38] [tooltip: Keyboard tracking of VCF corner-frequency (0=none, 1=full)]
[style: knob]",
1, 0, 1, 0.001)); // was in mr2
vcfModEnable = vcf1cbg(vslider("[1] Filter Mod. [midi:ctrl 19] [color:red] [style:knob] [tooltip: Filter Modulation => Route Modulation Mix output to VCF frequency]",1,0,1,1));
// Note that VCF has three sources of corner-frequency setting that are added together:
// - Corner Freq knob (40 Hz to 20 kHz)
// - VCF Contour envelope (0 to 4 octaves)
// - Injection 32 of Modulation Mix (0 to 1.5 octaves)
// Manual says maximum vcf sweep spans 0 to 4 octaves:
// Original Knob went to 10, but we're going to 4 so we can say the knob is in "octaves" units:
vcfContourAmountOctaves = vcf1(vslider("[3] Amount of Contour (octaves) [midi:ctrl 39] [style: knob]", 1.2, 0, 4.0, 0.001));
vcfContourOctaves = vcfContourAmountOctaves * envelopeVCF; // in octaves
// We are assuming that the modulation-mix range for the VCF freq is 1.5 octaves like it is for oscs 1 and 2:
vcfModMixModulationOctaves = select2(vcfModEnable, 0, (1.5 * oscNoiseModulation * modWheel)); // octaves
vcfModulationOctaves = vcfModMixModulationOctaves + vcfContourOctaves;
keyFreqLogHzGlided = log(keyFreqGlided)/log(2.0); // FIXME: Start w freqLogHz not freq so we don't need exp(log()) here
keyShiftOctaves = keyFreqLogHzGlided - log(261.625565)/log(2.0); // FIXME: ARBITRARILY centering on middle C - check device
vcfKeyShiftOctaves = vcfKeyRange * keyShiftOctaves;
modulatedFcLgHz = fcLgHz + vcfModulationOctaves + vcfKeyShiftOctaves;
fc = min((0.5*ma.SR), pow(2.0,modulatedFcLgHz));
vcf = ve.moog_vcf_2bn(res,fc);
// Attack, Decay, and Sustain ranges are set according to the Minimoog manual:
attT60VCF = 0.001 * vcf2(vslider("[0] AttackF [midi:ctrl 40] [tooltip: Attack Time] [unit:ms] [style: knob]",1400,10,10000,1));
decT60VCF = 0.001 * vcf2(vslider("[0] DecayF [midi:ctrl 41] [tooltip: Decay-to-Sustain Time] [unit:ms] [style: knob]",10,10,10000,1));
susLvlVCF = 0.01 * vcf2(vslider("[0] SustainF [midi:ctrl 42] [tooltip: Sustain level as percent of max] [style: knob]",80,0,100,0.1));
decayButton = wg(vslider("Decay [midi:ctrl 20] [tooltip:Envelope Release either Decay value or 0][style:knob]",1,0,1,1):int); // was Staccato
legatoButton = wg(vslider("GlideEnable [midi:ctrl 65] [tooltip: Glide from note to note][style:knob]",1,0,1,1)); // was Legato
relT60VCF = select2(decayButton,0.010,decT60VCF);
envelopeVCF = en.adsre(attT60VCF,decT60VCF,susLvlVCF,relT60VCF,gate);
// --- Smart Keyboard interface ---
declare interface "SmartKeyboard{
'Number of Keyboards':'2',
'Keyboard 0 - Number of Keys':'13',
'Keyboard 1 - Number of Keys':'13',
'Keyboard 0 - Lowest Key':'72',
'Keyboard 1 - Lowest Key':'60'
}";
// --- functions ---
// Signal controls:
keyDownHold = gg(vslider("[0] gateHold [tooltip: lock sustain pedal on (hold gate set at 1)][style:knob]",0,0,1,1));
keyDown = gg(button("[1] gate [tooltip: The gate signal is 1 during a
note and 0 otherwise. For MIDI, NoteOn occurs when the gate
transitions from 0 to 1, and NoteOff is an event corresponding
to the gate transition from 1 to 0. The name of this Faust
button must be 'gate'.]"));
sustain = gg(button("[1] sustain [midi:ctrl 64]
[tooltip: extends the gate (keeps it set to 1)]")); // MIDI only (see smartkeyb doc)
gate = keyDown + keyDownHold + sustain : min(1);
attT60 = 0.001 * ng(vslider("[0] AttackA [midi:ctrl 43] [tooltip: Attack Time] [unit:ms] [style: knob]",2,0,5000,0.1));
decT60 = 0.001 * ng(vslider("[0] DecayA [midi:ctrl 44] [tooltip: Decay-to-Sustain Time] [unit:ms] [style: knob]",10,0,10000,0.1));
susLvl = 0.01 * ng(vslider("[0] SustainA [midi:ctrl 45] [tooltip: Sustain level as percent of max] [style: knob]",80,0,100,0.1));
relT60 = select2(decayButton,0.010,decT60); // right?
envelopeAmpNoAM = en.adsre(attT60,decT60,susLvl,relT60,gate);
AMDepth = 0.5;
envelopeAmp = select2(oscModEnable, envelopeAmpNoAM,
envelopeAmpNoAM * (1.0 + AMDepth*modWheel * 0.5 * (1.0+oscNoiseModulation)));
// Signal Parameters
ampL = volg(vslider("[1] gain [style:knob] [tooltip: Amplitude]",0.2,0,1.0,0.001));
amp = ampL : si.smoo; // envelopeAmp is multiplied once on entire signal sum
//elecGuitar.dsp values used:
bend = wg(ba.semi2ratio(hslider("[0] bend [style:knob] [midi:pitchwheel]",0,-2,2,0.01))) : si.polySmooth(gate,0.999,1);
//Previous guess:
modWheel = wg(vslider("[1] mod [midi:ctrl 1] [style:knob] [tooltip: PitchModulation amplitude in octaves]",
0,0,1.0,0.01)) : si.polySmooth(gate,0.999,1);
//p: MIDI requires frequency in Hz, not piano-keys as we had before
// Frequency Range is 0.1 Hz to 20 kHz according to the Minimoog manual:
// MIDI REQUIRES THE FOLLOWING PARAMETER TO BE NAMED 'freq':
keyFreqBent = bend * kg(hslider("[2] freq [unit:Hz] [style:knob]",220,0.1,20000,0.1));
masterVolume = vg(vslider("MasterVolume [style:knob] [midi:ctrl 7] [tooltip: master volume, MIDI controlled]",
0.7,0,1,0.001))
: si.smooth(ba.tau2pole(0.16));
masterTuneOctaves = dg(vslider("[0] Tune [midi:ctrl 47] [unit:Octaves] [style:knob]
[tooltip: Frequency-shift up or down for all oscillators in Octaves]", 0.0,-1.0,1.0,0.001));
// Oscillator Modulation HrockerRed => apply Modulation Mix output osc1&2 pitches
glide = gmmg(vslider("[0] Glide [midi:ctrl 5] [unit:sec/octave] [style:knob] [scale:log]
[tooltip: Portamento (frequency-glide) in seconds per octave]",
0.008,0.001,1.0,0.001));
legatoPole = select2(legatoButton,0.5,ba.tau2pole(glide*exp(1.0f)/2.0f)); // convert 1/e to 1/2 by slowing down exp
keyFreqGlided = keyFreqBent : si.smooth(legatoPole);
mmix = gmmg(vslider("[1] Mod. Mix [midi:ctrl 48] [style:knob] [tooltip: Modulation Mix: Osc3 (0) to Noise (1)]",
0.0,0.0,1.0,0.001));
oscNoiseModulation = (mmix * noise) + ((1.0-mmix) * osc(3)); // noise amplitude and off-switch ignored here
oscModEnable = dsg(vslider("[0] Osc. Mod. [midi:ctrl 22] [color:red] [style:knob] [tooltip:Oscillator Modulation adds Modulation Mix output to osc1&2 frequencies",1,0,1,1)); // any offset?
osc3Control = dsg(vslider("[1] Osc. 3 Ctl [midi:ctrl 9] [color:red] [style:knob] [tooltip:Oscillator 3 frequency tracks the keyboard if on, else not",0,0,1,1):int);
// This layout loosely follows the MiniMoog-V
// Arturia-only features are labeled
// Original versions also added where different
// Need vrocker and hrocker toggle switches in Faust!
// Need orange and blue color choices
// Orange => Connect modulation sources to their destinations
// Blue => Turn audio sources On and Off
// - and later -
// White => Turn performance features On and Off
// Black => Select between modulation sources
// Julius Smith for Analog Devices 3/1/2017
vrocker(x) = checkbox("%%x [style:vrocker]");
hrocker(x) = checkbox("%%x [style:hrocker]");
vrockerblue(x) = checkbox("%x [style:vrocker] [color:blue]");
vrockerblue(x) = checkbox("%x [style:vrocker] [color:blue]");
// USAGE: vrockerorange("[0] ModulationEnable");
hrockerblue(x) = checkbox("%%x [style:hrocker] [color:blue]");
vrockerred(x) = checkbox("%%x [style:vrocker] [color:red]");
hrockerred(x) = checkbox("%%x [style:hrocker] [color:red]");
declare designer "Robert A. Moog";
mmg(x) = hgroup("",x); // Minimoog + Effects
synthg(x) = mmg(vgroup("[0] Minimoog",x));
fxg(x) = mmg(hgroup("[1] Effects",x));
mg(x) = synthg(hgroup("[0]",x));
cg(x) = mg(vgroup("[0] Controllers",x)); // Formerly named "Modules" but "Minimoog" group-title is enough
vg(x) = cg(hgroup("[0] Master Volume", x));
dg(x) = cg(hgroup("[1] Oscillator Tuning & Switching", x));
// Tune knob = master tune
dsg(x) = dg(vgroup("[1] Switches", x));
// Oscillator Modulation HrockerRed => apply Modulation Mix output to osc1&2 pitches
// [MOVED here from osc3 group] Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3
gmmg(x) = cg(hgroup("[2] Glide and ModMix", x));
// Glide knob [0:10] = portamento speed
// Modulation Mix knob [0:10] (between Osc3 and Noise) = mix of noise and osc3 modulating osc1&2 pitch and/or VCF freq
og(x) = mg(vgroup("[1] Oscillator Bank", x));
osc1(x) = og(hgroup("[1] Oscillator 1", x));
// UNUSED Control switch (for alignment) - Could put Oscillator Modulation switch there
// Range rotary switch: LO (slow pulses or rhythm), 32', 16', 8', 4', 2'
// Frequency <something> switch: LED to right
// Waveform rotary switch: tri, impulse/bent-triangle, saw, pulseWide, pulseMed, pulseNarrow
osc2(x) = og(hgroup("[2] Oscillator 2", x));
// UNUSED (originall) or Osc 2 Control VrockerRed
// Range rotary switch: LO, 32', 16', 8', 4', 2'
// Detuning knob: -7 to 7 [NO SWITCH]
// Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow
osc3(x) = og(hgroup("[3] Oscillator 3", x));
// Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3
// Range rotary switch: LO, 32', 16', 8', 4', 2'
// Detuning knob: -7 to 7 [NO SWITCH]
// Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow
mixg(x) = mg(vgroup("[2] Mixer", x));
// Each row 5 slots to maintain alignment and include red rockers joining VCF area:
mr1(x) = mixg(hgroup("[0] Osc1", x)); // mixer row 1 =
// Osc1 Volume and Osc1 HrockerBlue & _ & _ & Filter Modulation HrockerRed
// Filter Modulation => Modulation Mix output to VCF freq
mr2(x) = mixg(hgroup("[1] Ext In, KeyCtl", x)); // row 2 = Ext In HrockerBlue and Vol and Overload LED and Keyboard Ctl HrockerRed 1
mr3(x) = mixg(hgroup("[2] Osc2", x)); // = Osc2 Volume and Osc2 HrockerBlue and Keyboard Ctl HrockerRed 2
// Keyboard Control Modulation 1&2 => 0, 1/3, 2/3, all of Keyboard Control Signal ("gate?") applied to VCF freq
mr4(x) = mixg(hgroup("[3] Noise", x)); // = Noise HrockerBlue and Volume and Noise Type VrockerBlue
mr4cbg(x) = mr4(vgroup("[1]", x)); // = Noise Off and White/Pink selection
// two rockers
mr5(x) = mixg(hgroup("[4] Osc3", x)); // Osc3 Volume and Osc3 HrockerBlue
modg(x) = mg(vgroup("[3] Modifiers", x));
vcfg(x) = modg(vgroup("[0] Filter", x));
vcf1(x) = vcfg(hgroup("[0] [tooltip:freq, Q, ContourScale]", x));
vcf1cbg(x) = vcf1(vgroup("[0] [tooltip:two checkboxes]", x));
// Filter Modulation switch
// VCF Off switch
// Corner Frequency knob
// Filter Emphasis knob
// Amount of Contour knob
vcf2(x) = vcfg(hgroup("[1] Filter Contour [tooltip:AttFilt, DecFilt, Sustain Level for Filter Contour]", x));
// Attack Time knob
// Decay Time knob
// Sustain Level knob
ng(x) = modg(hgroup("[1] Loudness Contour", x));
// Attack Time knob
// Decay Time knob
// Sustain Level knob
echog(x) = fxg(hgroup("[4] Echo",x));
ekg(x) = echog(vgroup("[0] Knobs",x));
esg(x) = echog(vgroup("[1] Switches",x));
flg(x) = fxg(hgroup("[5] Flanger",x));
flkg(x) = flg(vgroup("[0] Knobs",x));
flsg(x) = flg(vgroup("[1] Switches",x));
chg(x) = fxg(hgroup("[6] Chorus",x));
ckg(x) = chg(vgroup("[0] Knobs",x));
csg(x) = chg(vgroup("[1] Switches",x));
rg(x) = fxg(hgroup("[7] Reverb",x));
rkg(x) = rg(vgroup("[0] Knobs",x));
rsg(x) = rg(vgroup("[1] Switches",x));
outg(x) = fxg(vgroup("[8] Output", x));
volg(x) = outg(hgroup("[0] Volume Main Output", x));
// Volume knob [0-10]
// Unison switch (Arturia) or Output connect/disconnect switch (original)
// When set, all voices are stacked and instrument is in mono mode
tunerg(x) = outg(hgroup("[1] A-440 Switch", x));
vdtpolyg(x) = outg(hgroup("[2] Voice Detune / Poly", x));
// Voice Detune knob [0-10] (Arturia) or
// Polyphonic switch [red LED below] (Arturia)
// When set, instrument is in polyphonic mode with one oscillator per key
clipg(x) = fxg(vgroup("[9] Soft Clip", x));
// Soft Clipping switch [red LED above]
kg(x) = synthg(hgroup("[1] Keyboard Group", x)); // Keyboard was 3 1/2 octaves
ws(x) = kg(vgroup("[0] Wheels and Switches", x));
s1g(x) = ws(hgroup("[0] Jacks and Rockers", x));
jg(x) = s1g(vgroup("[0] MiniJacks",x));
gdlg(x) = s1g(vgroup("[1] Glide/Decay/Legato Enables",x)); // Arturia
// Glide Hrocker (see original Button version below)
// Decay Hrocker (see original Button version below) => Sets Release (R) of ADSR to either 0 or Decay (R)
// Legato Hrocker (not in original)
s2g(x) = ws(hgroup("[1] [tooltip:Wheels+]", x));
bg(x) = s2g(vgroup("[0] [tooltip:Bend Enable and Range]", x));
wg(x) = s2g(hgroup("[1] [tooltip:Bend and Mod Wheels]", x));
// Using Glide/Decay/Legato enables above following Arturia:
// dg(x) = s2g(hgroup("[2] Glide and Decay momentary pushbuttons", x));
// Glide Button injects portamento as set by Glide knob
// Decay Button uses decay of Loudness Contour (else 0)
keys(x) = kg(hgroup("[1] [tooltip:Keys]", x));
gg(x) = keys(hgroup("[0] [tooltip: Gates]",x));
// leave slot 1 open for sustain (below)
| https://raw.githubusercontent.com/ossia/score-user-library/37914d4137032863dd00ac816da849fdf082dfa4/Presets/Faust/SAM/virtualAnalog/virtualAnalogForBrowser.dsp | faust | These are now in a separate file ./effects.dsp
echo = echog(component("echo.dsp")); // ./echo.dsp
flanger = flg(component("flanger.dsp")); // ./flanger.dsp
chorus = chg(component("chorus.dsp")); // ./chorus.dsp
reverb = rg(component("freeverb.dsp"));
Now separate: : echo : flanger : chorus : reverb;
masterVolume is redundant but easier to find
("[0] use as LFO"));
LO, 32', 16', 8', 4', 2'
Osc1 detunes like Osc2 and Osc3 (unlike in the Minimoog where it would be an expensive extra knob):
External input = MAIN OUTPUT when "off"
("[0] use as LFO"));
LO, 32', 16', 8', 4', 2'
pink noise needs some "make-up gain"
("[0] use as LFO"));
LO, 32', 16', 8', 4', 2'
compute oscillator frequency scale factor, staying in lg(Hz) as much as possible:
Manual says 0 to 1.5 octaves
Leave this off until triangle-wave modulation is debugged
F# a tritone above middle C
osc3 not allowed to FM itself
i=1,2
When disconnected from the keyboard, Osc3 can detune 3 octaves up or down (Pat video):
i=1,2
used when osc3 (only) is in LFO mode
lowest range setting is LFO mode for any osc
i is 1-based:
from Minimoog manual
Note: a Duty knob would be better than these two, or in addition
Soon to appear in oscillators.lib:
BYPASS WILL GO AWAY (I think you just open it up all the way to bypass):
VCF is always on
Frequency Cutoff (aka Brightness )
9 octaves (from Minimoog manual)
p: 40, 30, 80, 0.01))
p: : ba.pianokey2hz
was in mr2
Note that VCF has three sources of corner-frequency setting that are added together:
- Corner Freq knob (40 Hz to 20 kHz)
- VCF Contour envelope (0 to 4 octaves)
- Injection 32 of Modulation Mix (0 to 1.5 octaves)
Manual says maximum vcf sweep spans 0 to 4 octaves:
Original Knob went to 10, but we're going to 4 so we can say the knob is in "octaves" units:
in octaves
We are assuming that the modulation-mix range for the VCF freq is 1.5 octaves like it is for oscs 1 and 2:
octaves
FIXME: Start w freqLogHz not freq so we don't need exp(log()) here
FIXME: ARBITRARILY centering on middle C - check device
Attack, Decay, and Sustain ranges are set according to the Minimoog manual:
was Staccato
was Legato
--- Smart Keyboard interface ---
--- functions ---
Signal controls:
MIDI only (see smartkeyb doc)
right?
Signal Parameters
envelopeAmp is multiplied once on entire signal sum
elecGuitar.dsp values used:
Previous guess:
p: MIDI requires frequency in Hz, not piano-keys as we had before
Frequency Range is 0.1 Hz to 20 kHz according to the Minimoog manual:
MIDI REQUIRES THE FOLLOWING PARAMETER TO BE NAMED 'freq':
Oscillator Modulation HrockerRed => apply Modulation Mix output osc1&2 pitches
convert 1/e to 1/2 by slowing down exp
noise amplitude and off-switch ignored here
any offset?
This layout loosely follows the MiniMoog-V
Arturia-only features are labeled
Original versions also added where different
Need vrocker and hrocker toggle switches in Faust!
Need orange and blue color choices
Orange => Connect modulation sources to their destinations
Blue => Turn audio sources On and Off
- and later -
White => Turn performance features On and Off
Black => Select between modulation sources
Julius Smith for Analog Devices 3/1/2017
USAGE: vrockerorange("[0] ModulationEnable");
Minimoog + Effects
Formerly named "Modules" but "Minimoog" group-title is enough
Tune knob = master tune
Oscillator Modulation HrockerRed => apply Modulation Mix output to osc1&2 pitches
[MOVED here from osc3 group] Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3
Glide knob [0:10] = portamento speed
Modulation Mix knob [0:10] (between Osc3 and Noise) = mix of noise and osc3 modulating osc1&2 pitch and/or VCF freq
UNUSED Control switch (for alignment) - Could put Oscillator Modulation switch there
Range rotary switch: LO (slow pulses or rhythm), 32', 16', 8', 4', 2'
Frequency <something> switch: LED to right
Waveform rotary switch: tri, impulse/bent-triangle, saw, pulseWide, pulseMed, pulseNarrow
UNUSED (originall) or Osc 2 Control VrockerRed
Range rotary switch: LO, 32', 16', 8', 4', 2'
Detuning knob: -7 to 7 [NO SWITCH]
Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow
Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3
Range rotary switch: LO, 32', 16', 8', 4', 2'
Detuning knob: -7 to 7 [NO SWITCH]
Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow
Each row 5 slots to maintain alignment and include red rockers joining VCF area:
mixer row 1 =
Osc1 Volume and Osc1 HrockerBlue & _ & _ & Filter Modulation HrockerRed
Filter Modulation => Modulation Mix output to VCF freq
row 2 = Ext In HrockerBlue and Vol and Overload LED and Keyboard Ctl HrockerRed 1
= Osc2 Volume and Osc2 HrockerBlue and Keyboard Ctl HrockerRed 2
Keyboard Control Modulation 1&2 => 0, 1/3, 2/3, all of Keyboard Control Signal ("gate?") applied to VCF freq
= Noise HrockerBlue and Volume and Noise Type VrockerBlue
= Noise Off and White/Pink selection
two rockers
Osc3 Volume and Osc3 HrockerBlue
Filter Modulation switch
VCF Off switch
Corner Frequency knob
Filter Emphasis knob
Amount of Contour knob
Attack Time knob
Decay Time knob
Sustain Level knob
Attack Time knob
Decay Time knob
Sustain Level knob
Volume knob [0-10]
Unison switch (Arturia) or Output connect/disconnect switch (original)
When set, all voices are stacked and instrument is in mono mode
Voice Detune knob [0-10] (Arturia) or
Polyphonic switch [red LED below] (Arturia)
When set, instrument is in polyphonic mode with one oscillator per key
Soft Clipping switch [red LED above]
Keyboard was 3 1/2 octaves
Arturia
Glide Hrocker (see original Button version below)
Decay Hrocker (see original Button version below) => Sets Release (R) of ADSR to either 0 or Decay (R)
Legato Hrocker (not in original)
Using Glide/Decay/Legato enables above following Arturia:
dg(x) = s2g(hgroup("[2] Glide and Decay momentary pushbuttons", x));
Glide Button injects portamento as set by Glide knob
Decay Button uses decay of Loudness Contour (else 0)
leave slot 1 open for sustain (below) | import("stdfaust.lib");
main = (signal + attach(extInput,amp) : filters : *(ampScaling)) ~ _;
signal = oscs + noise * noiseOff * namp;
oscs = par(i,3,(oscamp(i+1)*osc(i+1))) :> _;
detuneOctaves(1) = osc1(vslider("[2] DeTuning1 [units:Octaves] [midi:ctrl 24] [style:knob]",0.0,-1.0,1.0,0.001));
waveSelect(1) = osc1(vslider("[3] Waveform1 [midi:ctrl 25] [style:knob]",5,0,5,1):int);
amp1Enable = mr1(vslider("[1] amp1Enable [midi:ctrl 12] [style:knob] [color:blue]",1,0,1,1));
oscamp(1) = mr1(vslider("[0] Osc1 Amp [midi:ctrl 26] [style:knob]",0.5,0.0,1.0,0.001)) * amp1Enable;
sei = mr2(vslider("[0] Ext Input [midi:ctrl 27] [style: knob]",0,0,1.0,0.001));
extInput(fb,extSig) = fb,extSig : select2(eei) : *(sei) : extClipLED;
extClipLED = _ <: _, (abs : >(0.95) : mr2(vbargraph("[2] Ext Input Clip [style:led]",0,1)):!);
keycLED = attach(mr2(vbargraph("[3] Keyboard Ctl [style:led]",0,1)));
detuneOctaves(2) = osc2(vslider("[2] DeTuning2 [units:Octaves] [midi:ctrl 29] [style:knob]",0.41667,-1.0,1.0,0.001));
waveSelect(2) = osc2(vslider("[3] Waveform2 [midi:ctrl 30] [style:knob]",5,0,5,1):int);
amp2Enable = mr3(vslider("[1] amp2Enable [midi:ctrl 14] [style:knob] [color:blue]",1,0,1,1));
oscamp(2) = mr3(vslider("[0] Osc2 Amp [midi:ctrl 31] [style:knob]",0.5,0.0,1.0,0.001)) * amp2Enable;
namp = mr4(vslider("[0] Noise Amp [midi:ctrl 32] [style: knob]",0.0,0.0,1.0,0.001));
noiseOff = mr4cbg(vslider("[0] noiseEnable [midi:ctrl 15] [style:knob] [color:blue]",0,0,1,1));
ntype = mr4cbg(vslider("[1] White/Pink [midi:ctrl 16] [tooltip: Choose either White or Pink Noise] [style: knob] [color:blue]",1,0,1,1));
detuneOctaves(3) = osc3(vslider("[2] DeTuning3 [units:Octaves] [midi:ctrl 34] [style:knob]",0.3,-1.0,1.0,0.001));
waveSelect(3) = osc3(vslider("[3] Waveform3 [midi:ctrl 35] [style:knob]",0,0,5,1):int);
amp3Enable = mr5(vslider("[1] amp3Enable [midi:ctrl 17] [style:knob] [color:blue]",0,0,1,1));
oscamp(3) = mr5(vslider("[0] Osc3 Amp [midi:ctrl 36] [style:knob]",0.5,0.0,1.0,0.001)) * amp3Enable;
waveforms(i) = (tri(i), bent(i), saw(i), sq(i), ptm(i), ptn(i));
modulationShift = select2(oscModEnable, 0.0,
modWheelShift * ( modulationCenterShift + (1.0-modulationCenterShift) * oscNoiseModulation ));
octaveShift(i) = -2+int(octaveSelect(i));
keyFreqGlidedMaybe = select2(osc3Control,osc3FixedFreq,keyFreqGlided);
detuneBoost(3) = select2(osc3Control,3.0,1.0);
detuneOctavesFinal(i) = detuneOctaves(i)*detuneBoost(i);
fBase(i) = keyFreqModulatedShifted(i) * pow(2.0, (masterTuneOctaves+octaveShift(i)+detuneOctavesFinal(i)))
: si.smooth(ba.tau2pole(0.016));
lfoMode(i) = (octaveSelect(i) == 0);
osc(i) = ba.selectn(6, int(waveSelect(i)), tri(i), bent(i), saw(i), sq(i), ptm(i), ptn(i));
tri(i) = select2(lfoMode(i),
os.triangle(f(i)),
os.lf_triangle(f(i)));
saw(i) = select2(lfoMode(i),
os.sawtooth(f(i)),
os.lf_saw(f(i)));
sq(i) = select2(lfoMode(i),
os.square(f(i)),
os.lf_squarewave(f(i)));
os.pulsetrain(f(i),0.25),
lf_pulsetrain(f(i),0.25));
ptn(i) = select2(lfoMode(i),
os.pulsetrain(f(i),0.125),
lf_pulsetrain(f(i),0.125));
lf_pulsetrain(freq,duty) = 2.0*os.lf_pulsetrainpos(freq,duty) - 1.0;
fcLgHz = vcf1(vslider("[1] Corner Freq [unit:Log2(Hz)]
[tooltip: Corner resonance frequency in Log2(Hertz)]
[style: knob]
: si.smooth(ba.tau2pole(0.016));
res = vcf1(vslider("[2] Corner Resonance [midi:ctrl 37] [tooltip: Resonance Q at VCF corner frequency (0 to 1)]
[style: knob]",
0.7, 0, 1, 0.01));
vcfKeyRange = vcf1cbg(vslider("[2] Kbd Ctl [midi:ctrl 38] [tooltip: Keyboard tracking of VCF corner-frequency (0=none, 1=full)]
[style: knob]",
vcfModEnable = vcf1cbg(vslider("[1] Filter Mod. [midi:ctrl 19] [color:red] [style:knob] [tooltip: Filter Modulation => Route Modulation Mix output to VCF frequency]",1,0,1,1));
vcfContourAmountOctaves = vcf1(vslider("[3] Amount of Contour (octaves) [midi:ctrl 39] [style: knob]", 1.2, 0, 4.0, 0.001));
vcfModulationOctaves = vcfModMixModulationOctaves + vcfContourOctaves;
vcfKeyShiftOctaves = vcfKeyRange * keyShiftOctaves;
modulatedFcLgHz = fcLgHz + vcfModulationOctaves + vcfKeyShiftOctaves;
fc = min((0.5*ma.SR), pow(2.0,modulatedFcLgHz));
vcf = ve.moog_vcf_2bn(res,fc);
attT60VCF = 0.001 * vcf2(vslider("[0] AttackF [midi:ctrl 40] [tooltip: Attack Time] [unit:ms] [style: knob]",1400,10,10000,1));
decT60VCF = 0.001 * vcf2(vslider("[0] DecayF [midi:ctrl 41] [tooltip: Decay-to-Sustain Time] [unit:ms] [style: knob]",10,10,10000,1));
susLvlVCF = 0.01 * vcf2(vslider("[0] SustainF [midi:ctrl 42] [tooltip: Sustain level as percent of max] [style: knob]",80,0,100,0.1));
relT60VCF = select2(decayButton,0.010,decT60VCF);
envelopeVCF = en.adsre(attT60VCF,decT60VCF,susLvlVCF,relT60VCF,gate);
declare interface "SmartKeyboard{
'Number of Keyboards':'2',
'Keyboard 0 - Number of Keys':'13',
'Keyboard 1 - Number of Keys':'13',
'Keyboard 0 - Lowest Key':'72',
'Keyboard 1 - Lowest Key':'60'
}";
keyDownHold = gg(vslider("[0] gateHold [tooltip: lock sustain pedal on (hold gate set at 1)][style:knob]",0,0,1,1));
keyDown = gg(button("[1] gate [tooltip: The gate signal is 1 during a
note and 0 otherwise. For MIDI, NoteOn occurs when the gate
transitions from 0 to 1, and NoteOff is an event corresponding
to the gate transition from 1 to 0. The name of this Faust
button must be 'gate'.]"));
sustain = gg(button("[1] sustain [midi:ctrl 64]
gate = keyDown + keyDownHold + sustain : min(1);
attT60 = 0.001 * ng(vslider("[0] AttackA [midi:ctrl 43] [tooltip: Attack Time] [unit:ms] [style: knob]",2,0,5000,0.1));
decT60 = 0.001 * ng(vslider("[0] DecayA [midi:ctrl 44] [tooltip: Decay-to-Sustain Time] [unit:ms] [style: knob]",10,0,10000,0.1));
susLvl = 0.01 * ng(vslider("[0] SustainA [midi:ctrl 45] [tooltip: Sustain level as percent of max] [style: knob]",80,0,100,0.1));
envelopeAmpNoAM = en.adsre(attT60,decT60,susLvl,relT60,gate);
AMDepth = 0.5;
envelopeAmp = select2(oscModEnable, envelopeAmpNoAM,
envelopeAmpNoAM * (1.0 + AMDepth*modWheel * 0.5 * (1.0+oscNoiseModulation)));
ampL = volg(vslider("[1] gain [style:knob] [tooltip: Amplitude]",0.2,0,1.0,0.001));
bend = wg(ba.semi2ratio(hslider("[0] bend [style:knob] [midi:pitchwheel]",0,-2,2,0.01))) : si.polySmooth(gate,0.999,1);
modWheel = wg(vslider("[1] mod [midi:ctrl 1] [style:knob] [tooltip: PitchModulation amplitude in octaves]",
0,0,1.0,0.01)) : si.polySmooth(gate,0.999,1);
keyFreqBent = bend * kg(hslider("[2] freq [unit:Hz] [style:knob]",220,0.1,20000,0.1));
masterVolume = vg(vslider("MasterVolume [style:knob] [midi:ctrl 7] [tooltip: master volume, MIDI controlled]",
0.7,0,1,0.001))
: si.smooth(ba.tau2pole(0.16));
masterTuneOctaves = dg(vslider("[0] Tune [midi:ctrl 47] [unit:Octaves] [style:knob]
[tooltip: Frequency-shift up or down for all oscillators in Octaves]", 0.0,-1.0,1.0,0.001));
glide = gmmg(vslider("[0] Glide [midi:ctrl 5] [unit:sec/octave] [style:knob] [scale:log]
[tooltip: Portamento (frequency-glide) in seconds per octave]",
0.008,0.001,1.0,0.001));
keyFreqGlided = keyFreqBent : si.smooth(legatoPole);
mmix = gmmg(vslider("[1] Mod. Mix [midi:ctrl 48] [style:knob] [tooltip: Modulation Mix: Osc3 (0) to Noise (1)]",
0.0,0.0,1.0,0.001));
osc3Control = dsg(vslider("[1] Osc. 3 Ctl [midi:ctrl 9] [color:red] [style:knob] [tooltip:Oscillator 3 frequency tracks the keyboard if on, else not",0,0,1,1):int);
vrocker(x) = checkbox("%%x [style:vrocker]");
hrocker(x) = checkbox("%%x [style:hrocker]");
vrockerblue(x) = checkbox("%x [style:vrocker] [color:blue]");
vrockerblue(x) = checkbox("%x [style:vrocker] [color:blue]");
hrockerblue(x) = checkbox("%%x [style:hrocker] [color:blue]");
vrockerred(x) = checkbox("%%x [style:vrocker] [color:red]");
hrockerred(x) = checkbox("%%x [style:hrocker] [color:red]");
declare designer "Robert A. Moog";
synthg(x) = mmg(vgroup("[0] Minimoog",x));
fxg(x) = mmg(hgroup("[1] Effects",x));
mg(x) = synthg(hgroup("[0]",x));
vg(x) = cg(hgroup("[0] Master Volume", x));
dg(x) = cg(hgroup("[1] Oscillator Tuning & Switching", x));
dsg(x) = dg(vgroup("[1] Switches", x));
gmmg(x) = cg(hgroup("[2] Glide and ModMix", x));
og(x) = mg(vgroup("[1] Oscillator Bank", x));
osc1(x) = og(hgroup("[1] Oscillator 1", x));
osc2(x) = og(hgroup("[2] Oscillator 2", x));
osc3(x) = og(hgroup("[3] Oscillator 3", x));
mixg(x) = mg(vgroup("[2] Mixer", x));
modg(x) = mg(vgroup("[3] Modifiers", x));
vcfg(x) = modg(vgroup("[0] Filter", x));
vcf1(x) = vcfg(hgroup("[0] [tooltip:freq, Q, ContourScale]", x));
vcf1cbg(x) = vcf1(vgroup("[0] [tooltip:two checkboxes]", x));
vcf2(x) = vcfg(hgroup("[1] Filter Contour [tooltip:AttFilt, DecFilt, Sustain Level for Filter Contour]", x));
ng(x) = modg(hgroup("[1] Loudness Contour", x));
echog(x) = fxg(hgroup("[4] Echo",x));
ekg(x) = echog(vgroup("[0] Knobs",x));
esg(x) = echog(vgroup("[1] Switches",x));
flg(x) = fxg(hgroup("[5] Flanger",x));
flkg(x) = flg(vgroup("[0] Knobs",x));
flsg(x) = flg(vgroup("[1] Switches",x));
chg(x) = fxg(hgroup("[6] Chorus",x));
ckg(x) = chg(vgroup("[0] Knobs",x));
csg(x) = chg(vgroup("[1] Switches",x));
rg(x) = fxg(hgroup("[7] Reverb",x));
rkg(x) = rg(vgroup("[0] Knobs",x));
rsg(x) = rg(vgroup("[1] Switches",x));
outg(x) = fxg(vgroup("[8] Output", x));
volg(x) = outg(hgroup("[0] Volume Main Output", x));
tunerg(x) = outg(hgroup("[1] A-440 Switch", x));
vdtpolyg(x) = outg(hgroup("[2] Voice Detune / Poly", x));
clipg(x) = fxg(vgroup("[9] Soft Clip", x));
ws(x) = kg(vgroup("[0] Wheels and Switches", x));
s1g(x) = ws(hgroup("[0] Jacks and Rockers", x));
jg(x) = s1g(vgroup("[0] MiniJacks",x));
s2g(x) = ws(hgroup("[1] [tooltip:Wheels+]", x));
bg(x) = s2g(vgroup("[0] [tooltip:Bend Enable and Range]", x));
wg(x) = s2g(hgroup("[1] [tooltip:Bend and Mod Wheels]", x));
keys(x) = kg(hgroup("[1] [tooltip:Keys]", x));
gg(x) = keys(hgroup("[0] [tooltip: Gates]",x));
|
e5ea5094b36e7a06c3bbd166f92050cff9cf5dbdbb61c19a1412517980f2783e | ossia/score-user-library | triangleMesh.dsp | declare name "Plucked Triangle";
declare author "James Leonard";
declare date "April 2020";
/* ========= DESCRITPION =============
A triangular mesh (fixed at its corners) excited by a plucking mass
- inputs: pluck position
- outputs: two listening points on the triangle
- controls: triangle mesh stiffness, damping and air friction.
*/
import("stdfaust.lib");
in1 = hslider("Pluck Position", 0, -1, 1, 0.001):si.smoo;
OutGain = 30;
t_M = 1;
t_K = hslider("Mesh Stiffness", 0.1, 0.001, 0.3, 0.0001);
t_Z = hslider("Mesh Damping", 0.001, 0.00001, 0.003, 0.00001);
t_Zo = hslider("Air Friction", 0.00005, 0.00, 0.0001, 0.000001);
model = (
mi.ground(0),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.ground(0),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.ground(0),
mi.posInput(0.):
RoutingMassToLink :
mi.nlPluck(0.5, 0.03, 0.001, 0., 0.),
mi.springDamper(t_K, t_Z, 0, 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0, 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0, 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0),
par(i, nbOut, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
RoutingMassToLink(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29, m30, m31, m32, m33, m34, m35, m36, m37, m38, m39, m40, m41, m42, m43, m44, m45, m46, m47, m48, m49, m50, m51, m52, m53, m54, m55) = /* routed positions */ m55, m37, m0, m1, m1, m2, m2, m3, m3, m4, m4, m5, m5, m6, m6, m7, m7, m8, m8, m9, m10, m11, m11, m12, m12, m13, m13, m14, m14, m15, m15, m16, m16, m17, m17, m18, m19, m20, m20, m21, m21, m22, m22, m23, m23, m24, m24, m25, m25, m26, m27, m28, m28, m29, m29, m30, m30, m31, m31, m32, m32, m33, m34, m35, m35, m36, m36, m37, m37, m38, m38, m39, m40, m41, m41, m42, m42, m43, m43, m44, m45, m46, m46, m47, m47, m48, m49, m50, m50, m51, m52, m53, m0, m10, m1, m11, m2, m12, m3, m13, m4, m14, m5, m15, m6, m16, m7, m17, m8, m18, m10, m19, m11, m20, m12, m21, m13, m22, m14, m23, m15, m24, m16, m25, m17, m26, m19, m27, m20, m28, m21, m29, m22, m30, m23, m31, m24, m32, m25, m33, m27, m34, m28, m35, m29, m36, m30, m37, m31, m38, m32, m39, m34, m40, m35, m41, m36, m42, m37, m43, m38, m44, m40, m45, m41, m46, m42, m47, m43, m48, m45, m49, m46, m50, m47, m51, m49, m52, m50, m53, m52, m54, m1, m10, m2, m11, m3, m12, m4, m13, m5, m14, m6, m15, m7, m16, m8, m17, m9, m18, m11, m19, m12, m20, m13, m21, m14, m22, m15, m23, m16, m24, m17, m25, m18, m26, m20, m27, m21, m28, m22, m29, m23, m30, m24, m31, m25, m32, m26, m33, m28, m34, m29, m35, m30, m36, m31, m37, m32, m38, m33, m39, m35, m40, m36, m41, m37, m42, m38, m43, m39, m44, m41, m45, m42, m46, m43, m47, m44, m48, m46, m49, m47, m50, m48, m51, m50, m52, m51, m53, m53, m54, /* outputs */ m41;
RoutingLinkToMass(l0_f1, l0_f2, l1_f1, l1_f2, l2_f1, l2_f2, l3_f1, l3_f2, l4_f1, l4_f2, l5_f1, l5_f2, l6_f1, l6_f2, l7_f1, l7_f2, l8_f1, l8_f2, l9_f1, l9_f2, l10_f1, l10_f2, l11_f1, l11_f2, l12_f1, l12_f2, l13_f1, l13_f2, l14_f1, l14_f2, l15_f1, l15_f2, l16_f1, l16_f2, l17_f1, l17_f2, l18_f1, l18_f2, l19_f1, l19_f2, l20_f1, l20_f2, l21_f1, l21_f2, l22_f1, l22_f2, l23_f1, l23_f2, l24_f1, l24_f2, l25_f1, l25_f2, l26_f1, l26_f2, l27_f1, l27_f2, l28_f1, l28_f2, l29_f1, l29_f2, l30_f1, l30_f2, l31_f1, l31_f2, l32_f1, l32_f2, l33_f1, l33_f2, l34_f1, l34_f2, l35_f1, l35_f2, l36_f1, l36_f2, l37_f1, l37_f2, l38_f1, l38_f2, l39_f1, l39_f2, l40_f1, l40_f2, l41_f1, l41_f2, l42_f1, l42_f2, l43_f1, l43_f2, l44_f1, l44_f2, l45_f1, l45_f2, l46_f1, l46_f2, l47_f1, l47_f2, l48_f1, l48_f2, l49_f1, l49_f2, l50_f1, l50_f2, l51_f1, l51_f2, l52_f1, l52_f2, l53_f1, l53_f2, l54_f1, l54_f2, l55_f1, l55_f2, l56_f1, l56_f2, l57_f1, l57_f2, l58_f1, l58_f2, l59_f1, l59_f2, l60_f1, l60_f2, l61_f1, l61_f2, l62_f1, l62_f2, l63_f1, l63_f2, l64_f1, l64_f2, l65_f1, l65_f2, l66_f1, l66_f2, l67_f1, l67_f2, l68_f1, l68_f2, l69_f1, l69_f2, l70_f1, l70_f2, l71_f1, l71_f2, l72_f1, l72_f2, l73_f1, l73_f2, l74_f1, l74_f2, l75_f1, l75_f2, l76_f1, l76_f2, l77_f1, l77_f2, l78_f1, l78_f2, l79_f1, l79_f2, l80_f1, l80_f2, l81_f1, l81_f2, l82_f1, l82_f2, l83_f1, l83_f2, l84_f1, l84_f2, l85_f1, l85_f2, l86_f1, l86_f2, l87_f1, l87_f2, l88_f1, l88_f2, l89_f1, l89_f2, l90_f1, l90_f2, l91_f1, l91_f2, l92_f1, l92_f2, l93_f1, l93_f2, l94_f1, l94_f2, l95_f1, l95_f2, l96_f1, l96_f2, l97_f1, l97_f2, l98_f1, l98_f2, l99_f1, l99_f2, l100_f1, l100_f2, l101_f1, l101_f2, l102_f1, l102_f2, l103_f1, l103_f2, l104_f1, l104_f2, l105_f1, l105_f2, l106_f1, l106_f2, l107_f1, l107_f2, l108_f1, l108_f2, l109_f1, l109_f2, l110_f1, l110_f2, l111_f1, l111_f2, l112_f1, l112_f2, l113_f1, l113_f2, l114_f1, l114_f2, l115_f1, l115_f2, l116_f1, l116_f2, l117_f1, l117_f2, l118_f1, l118_f2, l119_f1, l119_f2, l120_f1, l120_f2, l121_f1, l121_f2, l122_f1, l122_f2, l123_f1, l123_f2, l124_f1, l124_f2, l125_f1, l125_f2, l126_f1, l126_f2, l127_f1, l127_f2, l128_f1, l128_f2, l129_f1, l129_f2, l130_f1, l130_f2, l131_f1, l131_f2, l132_f1, l132_f2, l133_f1, l133_f2, l134_f1, l134_f2, l135_f1, l135_f2, p_out1) = /* routed forces */ l1_f1 + l46_f1, l1_f2 + l2_f1 + l47_f1 + l91_f1, l2_f2 + l3_f1 + l48_f1 + l92_f1, l3_f2 + l4_f1 + l49_f1 + l93_f1, l4_f2 + l5_f1 + l50_f1 + l94_f1, l5_f2 + l6_f1 + l51_f1 + l95_f1, l6_f2 + l7_f1 + l52_f1 + l96_f1, l7_f2 + l8_f1 + l53_f1 + l97_f1, l8_f2 + l9_f1 + l54_f1 + l98_f1, l9_f2 + l99_f1, l10_f1 + l46_f2 + l55_f1 + l91_f2, l10_f2 + l11_f1 + l47_f2 + l56_f1 + l92_f2 + l100_f1, l11_f2 + l12_f1 + l48_f2 + l57_f1 + l93_f2 + l101_f1, l12_f2 + l13_f1 + l49_f2 + l58_f1 + l94_f2 + l102_f1, l13_f2 + l14_f1 + l50_f2 + l59_f1 + l95_f2 + l103_f1, l14_f2 + l15_f1 + l51_f2 + l60_f1 + l96_f2 + l104_f1, l15_f2 + l16_f1 + l52_f2 + l61_f1 + l97_f2 + l105_f1, l16_f2 + l17_f1 + l53_f2 + l62_f1 + l98_f2 + l106_f1, l17_f2 + l54_f2 + l99_f2 + l107_f1, l18_f1 + l55_f2 + l63_f1 + l100_f2, l18_f2 + l19_f1 + l56_f2 + l64_f1 + l101_f2 + l108_f1, l19_f2 + l20_f1 + l57_f2 + l65_f1 + l102_f2 + l109_f1, l20_f2 + l21_f1 + l58_f2 + l66_f1 + l103_f2 + l110_f1, l21_f2 + l22_f1 + l59_f2 + l67_f1 + l104_f2 + l111_f1, l22_f2 + l23_f1 + l60_f2 + l68_f1 + l105_f2 + l112_f1, l23_f2 + l24_f1 + l61_f2 + l69_f1 + l106_f2 + l113_f1, l24_f2 + l62_f2 + l107_f2 + l114_f1, l25_f1 + l63_f2 + l70_f1 + l108_f2, l25_f2 + l26_f1 + l64_f2 + l71_f1 + l109_f2 + l115_f1, l26_f2 + l27_f1 + l65_f2 + l72_f1 + l110_f2 + l116_f1, l27_f2 + l28_f1 + l66_f2 + l73_f1 + l111_f2 + l117_f1, l28_f2 + l29_f1 + l67_f2 + l74_f1 + l112_f2 + l118_f1, l29_f2 + l30_f1 + l68_f2 + l75_f1 + l113_f2 + l119_f1, l30_f2 + l69_f2 + l114_f2 + l120_f1, l31_f1 + l70_f2 + l76_f1 + l115_f2, l31_f2 + l32_f1 + l71_f2 + l77_f1 + l116_f2 + l121_f1, l32_f2 + l33_f1 + l72_f2 + l78_f1 + l117_f2 + l122_f1, l0_f2 + l33_f2 + l34_f1 + l73_f2 + l79_f1 + l118_f2 + l123_f1, l34_f2 + l35_f1 + l74_f2 + l80_f1 + l119_f2 + l124_f1, l35_f2 + l75_f2 + l120_f2 + l125_f1, l36_f1 + l76_f2 + l81_f1 + l121_f2, l36_f2 + l37_f1 + l77_f2 + l82_f1 + l122_f2 + l126_f1, l37_f2 + l38_f1 + l78_f2 + l83_f1 + l123_f2 + l127_f1, l38_f2 + l39_f1 + l79_f2 + l84_f1 + l124_f2 + l128_f1, l39_f2 + l80_f2 + l125_f2 + l129_f1, l40_f1 + l81_f2 + l85_f1 + l126_f2, l40_f2 + l41_f1 + l82_f2 + l86_f1 + l127_f2 + l130_f1, l41_f2 + l42_f1 + l83_f2 + l87_f1 + l128_f2 + l131_f1, l42_f2 + l84_f2 + l129_f2 + l132_f1, l43_f1 + l85_f2 + l88_f1 + l130_f2, l43_f2 + l44_f1 + l86_f2 + l89_f1 + l131_f2 + l133_f1, l44_f2 + l87_f2 + l132_f2 + l134_f1, l45_f1 + l88_f2 + l90_f1 + l133_f2, l45_f2 + l89_f2 + l134_f2 + l135_f1, l90_f2 + l135_f2, l0_f1, /* pass-through */ p_out1;
nbMass = 56;
nbOut = 1;
};
process = in1 : model:*(OutGain);
/*
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# A plucked triangular mesh model (fixed at corners)
# Script author: James Leonard
@t_M param 1
@t_K param 0.1
@t_Z param 0.001
@t_Zo param 0.00005
@in1 posInput 0.
@pl nlPluck @in1 @t_m4_3 0.5 0.03 0.001
@t_m0_0 ground 0
@t_m0_1 osc t_M 0 t_Zo 0. 0.
@t_m0_2 osc t_M 0 t_Zo 0. 0.
@t_m0_3 osc t_M 0 t_Zo 0. 0.
@t_m0_4 osc t_M 0 t_Zo 0. 0.
@t_m0_5 osc t_M 0 t_Zo 0. 0.
@t_m0_6 osc t_M 0 t_Zo 0. 0.
@t_m0_7 osc t_M 0 t_Zo 0. 0.
@t_m0_8 osc t_M 0 t_Zo 0. 0.
@t_m0_9 ground 0
@t_m1_0 osc t_M 0 t_Zo 0. 0.
@t_m1_1 osc t_M 0 t_Zo 0. 0.
@t_m1_2 osc t_M 0 t_Zo 0. 0.
@t_m1_3 osc t_M 0 t_Zo 0. 0.
@t_m1_4 osc t_M 0 t_Zo 0. 0.
@t_m1_5 osc t_M 0 t_Zo 0. 0.
@t_m1_6 osc t_M 0 t_Zo 0. 0.
@t_m1_7 osc t_M 0 t_Zo 0. 0.
@t_m1_8 osc t_M 0 t_Zo 0. 0.
@t_m2_0 osc t_M 0 t_Zo 0. 0.
@t_m2_1 osc t_M 0 t_Zo 0. 0.
@t_m2_2 osc t_M 0 t_Zo 0. 0.
@t_m2_3 osc t_M 0 t_Zo 0. 0.
@t_m2_4 osc t_M 0 t_Zo 0. 0.
@t_m2_5 osc t_M 0 t_Zo 0. 0.
@t_m2_6 osc t_M 0 t_Zo 0. 0.
@t_m2_7 osc t_M 0 t_Zo 0. 0.
@t_m3_0 osc t_M 0 t_Zo 0. 0.
@t_m3_1 osc t_M 0 t_Zo 0. 0.
@t_m3_2 osc t_M 0 t_Zo 0. 0.
@t_m3_3 osc t_M 0 t_Zo 0. 0.
@t_m3_4 osc t_M 0 t_Zo 0. 0.
@t_m3_5 osc t_M 0 t_Zo 0. 0.
@t_m3_6 osc t_M 0 t_Zo 0. 0.
@t_m4_0 osc t_M 0 t_Zo 0. 0.
@t_m4_1 osc t_M 0 t_Zo 0. 0.
@t_m4_2 osc t_M 0 t_Zo 0. 0.
@t_m4_3 osc t_M 0 t_Zo 0. 0.
@t_m4_4 osc t_M 0 t_Zo 0. 0.
@t_m4_5 osc t_M 0 t_Zo 0. 0.
@t_m5_0 osc t_M 0 t_Zo 0. 0.
@t_m5_1 osc t_M 0 t_Zo 0. 0.
@t_m5_2 osc t_M 0 t_Zo 0. 0.
@t_m5_3 osc t_M 0 t_Zo 0. 0.
@t_m5_4 osc t_M 0 t_Zo 0. 0.
@t_m6_0 osc t_M 0 t_Zo 0. 0.
@t_m6_1 osc t_M 0 t_Zo 0. 0.
@t_m6_2 osc t_M 0 t_Zo 0. 0.
@t_m6_3 osc t_M 0 t_Zo 0. 0.
@t_m7_0 osc t_M 0 t_Zo 0. 0.
@t_m7_1 osc t_M 0 t_Zo 0. 0.
@t_m7_2 osc t_M 0 t_Zo 0. 0.
@t_m8_0 osc t_M 0 t_Zo 0. 0.
@t_m8_1 osc t_M 0 t_Zo 0. 0.
@t_m9_0 ground 0
@t_r0 springDamper @t_m0_0 @t_m0_1 t_K t_Z
@t_r1 springDamper @t_m0_1 @t_m0_2 t_K t_Z
@t_r2 springDamper @t_m0_2 @t_m0_3 t_K t_Z
@t_r3 springDamper @t_m0_3 @t_m0_4 t_K t_Z
@t_r4 springDamper @t_m0_4 @t_m0_5 t_K t_Z
@t_r5 springDamper @t_m0_5 @t_m0_6 t_K t_Z
@t_r6 springDamper @t_m0_6 @t_m0_7 t_K t_Z
@t_r7 springDamper @t_m0_7 @t_m0_8 t_K t_Z
@t_r8 springDamper @t_m0_8 @t_m0_9 t_K t_Z
@t_r9 springDamper @t_m1_0 @t_m1_1 t_K t_Z
@t_r10 springDamper @t_m1_1 @t_m1_2 t_K t_Z
@t_r11 springDamper @t_m1_2 @t_m1_3 t_K t_Z
@t_r12 springDamper @t_m1_3 @t_m1_4 t_K t_Z
@t_r13 springDamper @t_m1_4 @t_m1_5 t_K t_Z
@t_r14 springDamper @t_m1_5 @t_m1_6 t_K t_Z
@t_r15 springDamper @t_m1_6 @t_m1_7 t_K t_Z
@t_r16 springDamper @t_m1_7 @t_m1_8 t_K t_Z
@t_r17 springDamper @t_m2_0 @t_m2_1 t_K t_Z
@t_r18 springDamper @t_m2_1 @t_m2_2 t_K t_Z
@t_r19 springDamper @t_m2_2 @t_m2_3 t_K t_Z
@t_r20 springDamper @t_m2_3 @t_m2_4 t_K t_Z
@t_r21 springDamper @t_m2_4 @t_m2_5 t_K t_Z
@t_r22 springDamper @t_m2_5 @t_m2_6 t_K t_Z
@t_r23 springDamper @t_m2_6 @t_m2_7 t_K t_Z
@t_r24 springDamper @t_m3_0 @t_m3_1 t_K t_Z
@t_r25 springDamper @t_m3_1 @t_m3_2 t_K t_Z
@t_r26 springDamper @t_m3_2 @t_m3_3 t_K t_Z
@t_r27 springDamper @t_m3_3 @t_m3_4 t_K t_Z
@t_r28 springDamper @t_m3_4 @t_m3_5 t_K t_Z
@t_r29 springDamper @t_m3_5 @t_m3_6 t_K t_Z
@t_r30 springDamper @t_m4_0 @t_m4_1 t_K t_Z
@t_r31 springDamper @t_m4_1 @t_m4_2 t_K t_Z
@t_r32 springDamper @t_m4_2 @t_m4_3 t_K t_Z
@t_r33 springDamper @t_m4_3 @t_m4_4 t_K t_Z
@t_r34 springDamper @t_m4_4 @t_m4_5 t_K t_Z
@t_r35 springDamper @t_m5_0 @t_m5_1 t_K t_Z
@t_r36 springDamper @t_m5_1 @t_m5_2 t_K t_Z
@t_r37 springDamper @t_m5_2 @t_m5_3 t_K t_Z
@t_r38 springDamper @t_m5_3 @t_m5_4 t_K t_Z
@t_r39 springDamper @t_m6_0 @t_m6_1 t_K t_Z
@t_r40 springDamper @t_m6_1 @t_m6_2 t_K t_Z
@t_r41 springDamper @t_m6_2 @t_m6_3 t_K t_Z
@t_r42 springDamper @t_m7_0 @t_m7_1 t_K t_Z
@t_r43 springDamper @t_m7_1 @t_m7_2 t_K t_Z
@t_r44 springDamper @t_m8_0 @t_m8_1 t_K t_Z
@t_r45 springDamper @t_m0_0 @t_m1_0 t_K t_Z
@t_r46 springDamper @t_m0_1 @t_m1_1 t_K t_Z
@t_r47 springDamper @t_m0_2 @t_m1_2 t_K t_Z
@t_r48 springDamper @t_m0_3 @t_m1_3 t_K t_Z
@t_r49 springDamper @t_m0_4 @t_m1_4 t_K t_Z
@t_r50 springDamper @t_m0_5 @t_m1_5 t_K t_Z
@t_r51 springDamper @t_m0_6 @t_m1_6 t_K t_Z
@t_r52 springDamper @t_m0_7 @t_m1_7 t_K t_Z
@t_r53 springDamper @t_m0_8 @t_m1_8 t_K t_Z
@t_r54 springDamper @t_m1_0 @t_m2_0 t_K t_Z
@t_r55 springDamper @t_m1_1 @t_m2_1 t_K t_Z
@t_r56 springDamper @t_m1_2 @t_m2_2 t_K t_Z
@t_r57 springDamper @t_m1_3 @t_m2_3 t_K t_Z
@t_r58 springDamper @t_m1_4 @t_m2_4 t_K t_Z
@t_r59 springDamper @t_m1_5 @t_m2_5 t_K t_Z
@t_r60 springDamper @t_m1_6 @t_m2_6 t_K t_Z
@t_r61 springDamper @t_m1_7 @t_m2_7 t_K t_Z
@t_r62 springDamper @t_m2_0 @t_m3_0 t_K t_Z
@t_r63 springDamper @t_m2_1 @t_m3_1 t_K t_Z
@t_r64 springDamper @t_m2_2 @t_m3_2 t_K t_Z
@t_r65 springDamper @t_m2_3 @t_m3_3 t_K t_Z
@t_r66 springDamper @t_m2_4 @t_m3_4 t_K t_Z
@t_r67 springDamper @t_m2_5 @t_m3_5 t_K t_Z
@t_r68 springDamper @t_m2_6 @t_m3_6 t_K t_Z
@t_r69 springDamper @t_m3_0 @t_m4_0 t_K t_Z
@t_r70 springDamper @t_m3_1 @t_m4_1 t_K t_Z
@t_r71 springDamper @t_m3_2 @t_m4_2 t_K t_Z
@t_r72 springDamper @t_m3_3 @t_m4_3 t_K t_Z
@t_r73 springDamper @t_m3_4 @t_m4_4 t_K t_Z
@t_r74 springDamper @t_m3_5 @t_m4_5 t_K t_Z
@t_r75 springDamper @t_m4_0 @t_m5_0 t_K t_Z
@t_r76 springDamper @t_m4_1 @t_m5_1 t_K t_Z
@t_r77 springDamper @t_m4_2 @t_m5_2 t_K t_Z
@t_r78 springDamper @t_m4_3 @t_m5_3 t_K t_Z
@t_r79 springDamper @t_m4_4 @t_m5_4 t_K t_Z
@t_r80 springDamper @t_m5_0 @t_m6_0 t_K t_Z
@t_r81 springDamper @t_m5_1 @t_m6_1 t_K t_Z
@t_r82 springDamper @t_m5_2 @t_m6_2 t_K t_Z
@t_r83 springDamper @t_m5_3 @t_m6_3 t_K t_Z
@t_r84 springDamper @t_m6_0 @t_m7_0 t_K t_Z
@t_r85 springDamper @t_m6_1 @t_m7_1 t_K t_Z
@t_r86 springDamper @t_m6_2 @t_m7_2 t_K t_Z
@t_r87 springDamper @t_m7_0 @t_m8_0 t_K t_Z
@t_r88 springDamper @t_m7_1 @t_m8_1 t_K t_Z
@t_r89 springDamper @t_m8_0 @t_m9_0 t_K t_Z
@t_r90 springDamper @t_m0_1 @t_m1_0 t_K t_Z
@t_r91 springDamper @t_m0_2 @t_m1_1 t_K t_Z
@t_r92 springDamper @t_m0_3 @t_m1_2 t_K t_Z
@t_r93 springDamper @t_m0_4 @t_m1_3 t_K t_Z
@t_r94 springDamper @t_m0_5 @t_m1_4 t_K t_Z
@t_r95 springDamper @t_m0_6 @t_m1_5 t_K t_Z
@t_r96 springDamper @t_m0_7 @t_m1_6 t_K t_Z
@t_r97 springDamper @t_m0_8 @t_m1_7 t_K t_Z
@t_r98 springDamper @t_m0_9 @t_m1_8 t_K t_Z
@t_r99 springDamper @t_m1_1 @t_m2_0 t_K t_Z
@t_r100 springDamper @t_m1_2 @t_m2_1 t_K t_Z
@t_r101 springDamper @t_m1_3 @t_m2_2 t_K t_Z
@t_r102 springDamper @t_m1_4 @t_m2_3 t_K t_Z
@t_r103 springDamper @t_m1_5 @t_m2_4 t_K t_Z
@t_r104 springDamper @t_m1_6 @t_m2_5 t_K t_Z
@t_r105 springDamper @t_m1_7 @t_m2_6 t_K t_Z
@t_r106 springDamper @t_m1_8 @t_m2_7 t_K t_Z
@t_r107 springDamper @t_m2_1 @t_m3_0 t_K t_Z
@t_r108 springDamper @t_m2_2 @t_m3_1 t_K t_Z
@t_r109 springDamper @t_m2_3 @t_m3_2 t_K t_Z
@t_r110 springDamper @t_m2_4 @t_m3_3 t_K t_Z
@t_r111 springDamper @t_m2_5 @t_m3_4 t_K t_Z
@t_r112 springDamper @t_m2_6 @t_m3_5 t_K t_Z
@t_r113 springDamper @t_m2_7 @t_m3_6 t_K t_Z
@t_r114 springDamper @t_m3_1 @t_m4_0 t_K t_Z
@t_r115 springDamper @t_m3_2 @t_m4_1 t_K t_Z
@t_r116 springDamper @t_m3_3 @t_m4_2 t_K t_Z
@t_r117 springDamper @t_m3_4 @t_m4_3 t_K t_Z
@t_r118 springDamper @t_m3_5 @t_m4_4 t_K t_Z
@t_r119 springDamper @t_m3_6 @t_m4_5 t_K t_Z
@t_r120 springDamper @t_m4_1 @t_m5_0 t_K t_Z
@t_r121 springDamper @t_m4_2 @t_m5_1 t_K t_Z
@t_r122 springDamper @t_m4_3 @t_m5_2 t_K t_Z
@t_r123 springDamper @t_m4_4 @t_m5_3 t_K t_Z
@t_r124 springDamper @t_m4_5 @t_m5_4 t_K t_Z
@t_r125 springDamper @t_m5_1 @t_m6_0 t_K t_Z
@t_r126 springDamper @t_m5_2 @t_m6_1 t_K t_Z
@t_r127 springDamper @t_m5_3 @t_m6_2 t_K t_Z
@t_r128 springDamper @t_m5_4 @t_m6_3 t_K t_Z
@t_r129 springDamper @t_m6_1 @t_m7_0 t_K t_Z
@t_r130 springDamper @t_m6_2 @t_m7_1 t_K t_Z
@t_r131 springDamper @t_m6_3 @t_m7_2 t_K t_Z
@t_r132 springDamper @t_m7_1 @t_m8_0 t_K t_Z
@t_r133 springDamper @t_m7_2 @t_m8_1 t_K t_Z
@t_r134 springDamper @t_m8_1 @t_m9_0 t_K t_Z
@out1 posOutput @t_m5_1
*/ | https://raw.githubusercontent.com/ossia/score-user-library/8a910e05f713a6d710fe3c1b8cd3e63eee9394b0/Presets/Faust/physicalModeling/mi-faust/triangleMesh.dsp | faust | ========= DESCRITPION =============
A triangular mesh (fixed at its corners) excited by a plucking mass
- inputs: pluck position
- outputs: two listening points on the triangle
- controls: triangle mesh stiffness, damping and air friction.
routed positions
outputs
routed forces
pass-through
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# A plucked triangular mesh model (fixed at corners)
# Script author: James Leonard
@t_M param 1
@t_K param 0.1
@t_Z param 0.001
@t_Zo param 0.00005
@in1 posInput 0.
@pl nlPluck @in1 @t_m4_3 0.5 0.03 0.001
@t_m0_0 ground 0
@t_m0_1 osc t_M 0 t_Zo 0. 0.
@t_m0_2 osc t_M 0 t_Zo 0. 0.
@t_m0_3 osc t_M 0 t_Zo 0. 0.
@t_m0_4 osc t_M 0 t_Zo 0. 0.
@t_m0_5 osc t_M 0 t_Zo 0. 0.
@t_m0_6 osc t_M 0 t_Zo 0. 0.
@t_m0_7 osc t_M 0 t_Zo 0. 0.
@t_m0_8 osc t_M 0 t_Zo 0. 0.
@t_m0_9 ground 0
@t_m1_0 osc t_M 0 t_Zo 0. 0.
@t_m1_1 osc t_M 0 t_Zo 0. 0.
@t_m1_2 osc t_M 0 t_Zo 0. 0.
@t_m1_3 osc t_M 0 t_Zo 0. 0.
@t_m1_4 osc t_M 0 t_Zo 0. 0.
@t_m1_5 osc t_M 0 t_Zo 0. 0.
@t_m1_6 osc t_M 0 t_Zo 0. 0.
@t_m1_7 osc t_M 0 t_Zo 0. 0.
@t_m1_8 osc t_M 0 t_Zo 0. 0.
@t_m2_0 osc t_M 0 t_Zo 0. 0.
@t_m2_1 osc t_M 0 t_Zo 0. 0.
@t_m2_2 osc t_M 0 t_Zo 0. 0.
@t_m2_3 osc t_M 0 t_Zo 0. 0.
@t_m2_4 osc t_M 0 t_Zo 0. 0.
@t_m2_5 osc t_M 0 t_Zo 0. 0.
@t_m2_6 osc t_M 0 t_Zo 0. 0.
@t_m2_7 osc t_M 0 t_Zo 0. 0.
@t_m3_0 osc t_M 0 t_Zo 0. 0.
@t_m3_1 osc t_M 0 t_Zo 0. 0.
@t_m3_2 osc t_M 0 t_Zo 0. 0.
@t_m3_3 osc t_M 0 t_Zo 0. 0.
@t_m3_4 osc t_M 0 t_Zo 0. 0.
@t_m3_5 osc t_M 0 t_Zo 0. 0.
@t_m3_6 osc t_M 0 t_Zo 0. 0.
@t_m4_0 osc t_M 0 t_Zo 0. 0.
@t_m4_1 osc t_M 0 t_Zo 0. 0.
@t_m4_2 osc t_M 0 t_Zo 0. 0.
@t_m4_3 osc t_M 0 t_Zo 0. 0.
@t_m4_4 osc t_M 0 t_Zo 0. 0.
@t_m4_5 osc t_M 0 t_Zo 0. 0.
@t_m5_0 osc t_M 0 t_Zo 0. 0.
@t_m5_1 osc t_M 0 t_Zo 0. 0.
@t_m5_2 osc t_M 0 t_Zo 0. 0.
@t_m5_3 osc t_M 0 t_Zo 0. 0.
@t_m5_4 osc t_M 0 t_Zo 0. 0.
@t_m6_0 osc t_M 0 t_Zo 0. 0.
@t_m6_1 osc t_M 0 t_Zo 0. 0.
@t_m6_2 osc t_M 0 t_Zo 0. 0.
@t_m6_3 osc t_M 0 t_Zo 0. 0.
@t_m7_0 osc t_M 0 t_Zo 0. 0.
@t_m7_1 osc t_M 0 t_Zo 0. 0.
@t_m7_2 osc t_M 0 t_Zo 0. 0.
@t_m8_0 osc t_M 0 t_Zo 0. 0.
@t_m8_1 osc t_M 0 t_Zo 0. 0.
@t_m9_0 ground 0
@t_r0 springDamper @t_m0_0 @t_m0_1 t_K t_Z
@t_r1 springDamper @t_m0_1 @t_m0_2 t_K t_Z
@t_r2 springDamper @t_m0_2 @t_m0_3 t_K t_Z
@t_r3 springDamper @t_m0_3 @t_m0_4 t_K t_Z
@t_r4 springDamper @t_m0_4 @t_m0_5 t_K t_Z
@t_r5 springDamper @t_m0_5 @t_m0_6 t_K t_Z
@t_r6 springDamper @t_m0_6 @t_m0_7 t_K t_Z
@t_r7 springDamper @t_m0_7 @t_m0_8 t_K t_Z
@t_r8 springDamper @t_m0_8 @t_m0_9 t_K t_Z
@t_r9 springDamper @t_m1_0 @t_m1_1 t_K t_Z
@t_r10 springDamper @t_m1_1 @t_m1_2 t_K t_Z
@t_r11 springDamper @t_m1_2 @t_m1_3 t_K t_Z
@t_r12 springDamper @t_m1_3 @t_m1_4 t_K t_Z
@t_r13 springDamper @t_m1_4 @t_m1_5 t_K t_Z
@t_r14 springDamper @t_m1_5 @t_m1_6 t_K t_Z
@t_r15 springDamper @t_m1_6 @t_m1_7 t_K t_Z
@t_r16 springDamper @t_m1_7 @t_m1_8 t_K t_Z
@t_r17 springDamper @t_m2_0 @t_m2_1 t_K t_Z
@t_r18 springDamper @t_m2_1 @t_m2_2 t_K t_Z
@t_r19 springDamper @t_m2_2 @t_m2_3 t_K t_Z
@t_r20 springDamper @t_m2_3 @t_m2_4 t_K t_Z
@t_r21 springDamper @t_m2_4 @t_m2_5 t_K t_Z
@t_r22 springDamper @t_m2_5 @t_m2_6 t_K t_Z
@t_r23 springDamper @t_m2_6 @t_m2_7 t_K t_Z
@t_r24 springDamper @t_m3_0 @t_m3_1 t_K t_Z
@t_r25 springDamper @t_m3_1 @t_m3_2 t_K t_Z
@t_r26 springDamper @t_m3_2 @t_m3_3 t_K t_Z
@t_r27 springDamper @t_m3_3 @t_m3_4 t_K t_Z
@t_r28 springDamper @t_m3_4 @t_m3_5 t_K t_Z
@t_r29 springDamper @t_m3_5 @t_m3_6 t_K t_Z
@t_r30 springDamper @t_m4_0 @t_m4_1 t_K t_Z
@t_r31 springDamper @t_m4_1 @t_m4_2 t_K t_Z
@t_r32 springDamper @t_m4_2 @t_m4_3 t_K t_Z
@t_r33 springDamper @t_m4_3 @t_m4_4 t_K t_Z
@t_r34 springDamper @t_m4_4 @t_m4_5 t_K t_Z
@t_r35 springDamper @t_m5_0 @t_m5_1 t_K t_Z
@t_r36 springDamper @t_m5_1 @t_m5_2 t_K t_Z
@t_r37 springDamper @t_m5_2 @t_m5_3 t_K t_Z
@t_r38 springDamper @t_m5_3 @t_m5_4 t_K t_Z
@t_r39 springDamper @t_m6_0 @t_m6_1 t_K t_Z
@t_r40 springDamper @t_m6_1 @t_m6_2 t_K t_Z
@t_r41 springDamper @t_m6_2 @t_m6_3 t_K t_Z
@t_r42 springDamper @t_m7_0 @t_m7_1 t_K t_Z
@t_r43 springDamper @t_m7_1 @t_m7_2 t_K t_Z
@t_r44 springDamper @t_m8_0 @t_m8_1 t_K t_Z
@t_r45 springDamper @t_m0_0 @t_m1_0 t_K t_Z
@t_r46 springDamper @t_m0_1 @t_m1_1 t_K t_Z
@t_r47 springDamper @t_m0_2 @t_m1_2 t_K t_Z
@t_r48 springDamper @t_m0_3 @t_m1_3 t_K t_Z
@t_r49 springDamper @t_m0_4 @t_m1_4 t_K t_Z
@t_r50 springDamper @t_m0_5 @t_m1_5 t_K t_Z
@t_r51 springDamper @t_m0_6 @t_m1_6 t_K t_Z
@t_r52 springDamper @t_m0_7 @t_m1_7 t_K t_Z
@t_r53 springDamper @t_m0_8 @t_m1_8 t_K t_Z
@t_r54 springDamper @t_m1_0 @t_m2_0 t_K t_Z
@t_r55 springDamper @t_m1_1 @t_m2_1 t_K t_Z
@t_r56 springDamper @t_m1_2 @t_m2_2 t_K t_Z
@t_r57 springDamper @t_m1_3 @t_m2_3 t_K t_Z
@t_r58 springDamper @t_m1_4 @t_m2_4 t_K t_Z
@t_r59 springDamper @t_m1_5 @t_m2_5 t_K t_Z
@t_r60 springDamper @t_m1_6 @t_m2_6 t_K t_Z
@t_r61 springDamper @t_m1_7 @t_m2_7 t_K t_Z
@t_r62 springDamper @t_m2_0 @t_m3_0 t_K t_Z
@t_r63 springDamper @t_m2_1 @t_m3_1 t_K t_Z
@t_r64 springDamper @t_m2_2 @t_m3_2 t_K t_Z
@t_r65 springDamper @t_m2_3 @t_m3_3 t_K t_Z
@t_r66 springDamper @t_m2_4 @t_m3_4 t_K t_Z
@t_r67 springDamper @t_m2_5 @t_m3_5 t_K t_Z
@t_r68 springDamper @t_m2_6 @t_m3_6 t_K t_Z
@t_r69 springDamper @t_m3_0 @t_m4_0 t_K t_Z
@t_r70 springDamper @t_m3_1 @t_m4_1 t_K t_Z
@t_r71 springDamper @t_m3_2 @t_m4_2 t_K t_Z
@t_r72 springDamper @t_m3_3 @t_m4_3 t_K t_Z
@t_r73 springDamper @t_m3_4 @t_m4_4 t_K t_Z
@t_r74 springDamper @t_m3_5 @t_m4_5 t_K t_Z
@t_r75 springDamper @t_m4_0 @t_m5_0 t_K t_Z
@t_r76 springDamper @t_m4_1 @t_m5_1 t_K t_Z
@t_r77 springDamper @t_m4_2 @t_m5_2 t_K t_Z
@t_r78 springDamper @t_m4_3 @t_m5_3 t_K t_Z
@t_r79 springDamper @t_m4_4 @t_m5_4 t_K t_Z
@t_r80 springDamper @t_m5_0 @t_m6_0 t_K t_Z
@t_r81 springDamper @t_m5_1 @t_m6_1 t_K t_Z
@t_r82 springDamper @t_m5_2 @t_m6_2 t_K t_Z
@t_r83 springDamper @t_m5_3 @t_m6_3 t_K t_Z
@t_r84 springDamper @t_m6_0 @t_m7_0 t_K t_Z
@t_r85 springDamper @t_m6_1 @t_m7_1 t_K t_Z
@t_r86 springDamper @t_m6_2 @t_m7_2 t_K t_Z
@t_r87 springDamper @t_m7_0 @t_m8_0 t_K t_Z
@t_r88 springDamper @t_m7_1 @t_m8_1 t_K t_Z
@t_r89 springDamper @t_m8_0 @t_m9_0 t_K t_Z
@t_r90 springDamper @t_m0_1 @t_m1_0 t_K t_Z
@t_r91 springDamper @t_m0_2 @t_m1_1 t_K t_Z
@t_r92 springDamper @t_m0_3 @t_m1_2 t_K t_Z
@t_r93 springDamper @t_m0_4 @t_m1_3 t_K t_Z
@t_r94 springDamper @t_m0_5 @t_m1_4 t_K t_Z
@t_r95 springDamper @t_m0_6 @t_m1_5 t_K t_Z
@t_r96 springDamper @t_m0_7 @t_m1_6 t_K t_Z
@t_r97 springDamper @t_m0_8 @t_m1_7 t_K t_Z
@t_r98 springDamper @t_m0_9 @t_m1_8 t_K t_Z
@t_r99 springDamper @t_m1_1 @t_m2_0 t_K t_Z
@t_r100 springDamper @t_m1_2 @t_m2_1 t_K t_Z
@t_r101 springDamper @t_m1_3 @t_m2_2 t_K t_Z
@t_r102 springDamper @t_m1_4 @t_m2_3 t_K t_Z
@t_r103 springDamper @t_m1_5 @t_m2_4 t_K t_Z
@t_r104 springDamper @t_m1_6 @t_m2_5 t_K t_Z
@t_r105 springDamper @t_m1_7 @t_m2_6 t_K t_Z
@t_r106 springDamper @t_m1_8 @t_m2_7 t_K t_Z
@t_r107 springDamper @t_m2_1 @t_m3_0 t_K t_Z
@t_r108 springDamper @t_m2_2 @t_m3_1 t_K t_Z
@t_r109 springDamper @t_m2_3 @t_m3_2 t_K t_Z
@t_r110 springDamper @t_m2_4 @t_m3_3 t_K t_Z
@t_r111 springDamper @t_m2_5 @t_m3_4 t_K t_Z
@t_r112 springDamper @t_m2_6 @t_m3_5 t_K t_Z
@t_r113 springDamper @t_m2_7 @t_m3_6 t_K t_Z
@t_r114 springDamper @t_m3_1 @t_m4_0 t_K t_Z
@t_r115 springDamper @t_m3_2 @t_m4_1 t_K t_Z
@t_r116 springDamper @t_m3_3 @t_m4_2 t_K t_Z
@t_r117 springDamper @t_m3_4 @t_m4_3 t_K t_Z
@t_r118 springDamper @t_m3_5 @t_m4_4 t_K t_Z
@t_r119 springDamper @t_m3_6 @t_m4_5 t_K t_Z
@t_r120 springDamper @t_m4_1 @t_m5_0 t_K t_Z
@t_r121 springDamper @t_m4_2 @t_m5_1 t_K t_Z
@t_r122 springDamper @t_m4_3 @t_m5_2 t_K t_Z
@t_r123 springDamper @t_m4_4 @t_m5_3 t_K t_Z
@t_r124 springDamper @t_m4_5 @t_m5_4 t_K t_Z
@t_r125 springDamper @t_m5_1 @t_m6_0 t_K t_Z
@t_r126 springDamper @t_m5_2 @t_m6_1 t_K t_Z
@t_r127 springDamper @t_m5_3 @t_m6_2 t_K t_Z
@t_r128 springDamper @t_m5_4 @t_m6_3 t_K t_Z
@t_r129 springDamper @t_m6_1 @t_m7_0 t_K t_Z
@t_r130 springDamper @t_m6_2 @t_m7_1 t_K t_Z
@t_r131 springDamper @t_m6_3 @t_m7_2 t_K t_Z
@t_r132 springDamper @t_m7_1 @t_m8_0 t_K t_Z
@t_r133 springDamper @t_m7_2 @t_m8_1 t_K t_Z
@t_r134 springDamper @t_m8_1 @t_m9_0 t_K t_Z
@out1 posOutput @t_m5_1
| declare name "Plucked Triangle";
declare author "James Leonard";
declare date "April 2020";
import("stdfaust.lib");
in1 = hslider("Pluck Position", 0, -1, 1, 0.001):si.smoo;
OutGain = 30;
t_M = 1;
t_K = hslider("Mesh Stiffness", 0.1, 0.001, 0.3, 0.0001);
t_Z = hslider("Mesh Damping", 0.001, 0.00001, 0.003, 0.00001);
t_Zo = hslider("Air Friction", 0.00005, 0.00, 0.0001, 0.000001);
model = (
mi.ground(0),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.ground(0),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.ground(0),
mi.posInput(0.):
RoutingMassToLink :
mi.nlPluck(0.5, 0.03, 0.001, 0., 0.),
mi.springDamper(t_K, t_Z, 0, 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0, 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0, 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0),
par(i, nbOut, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
nbMass = 56;
nbOut = 1;
};
process = in1 : model:*(OutGain);
|
86d2d7af1600888f8c733aee85927aa6aee8c6c7a8e7a3517bcf09c3baf55af9 | ossia/score-user-library | bowedString.dsp | declare name "Bowed String";
declare author "James Leonard";
declare date "April 2020";
/* ========= DESCRITPION =============
A simple bowed string model
- inputs: bow position (move it slowly to yield self-sustained oscillations!).
- outputs: two listening points on the string.
- controls: bow pressure and string stiffness.
*/
import("stdfaust.lib");
in1 = hslider("Bow Position", 0, -1, 1, 0.001):si.smoo:si.smoo:si.smoo; // nice and smooth position signal
OutGain = 150.;
low_M = 1.0;
low_K = hslider("String Stiffness",0.3,0.001,0.7,0.0001) : si.smoo;
low_Z = 0.001;
nlZ = hslider("Bow Pressure",0.3,0.001,0.5,0.0001) : si.smoo;
nlscale = 0.00005;
model = (
mi.ground(0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.ground(0.),
mi.posInput(1.):
RoutingMassToLink :
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.nlBow(nlZ, nlscale, 0, 1., 0.),
par(i, nbOut, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
RoutingMassToLink(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29, m30, m31, m32, m33, m34, m35, m36, m37, m38, m39, m40, m41, m42, m43, m44, m45, m46, m47, m48, m49, m50, m51, m52, m53, m54, m55, m56, m57, m58, m59, m60, m61, m62, m63, m64, m65, m66, m67, m68, m69, m70, m71, m72, m73, m74, m75, m76, m77, m78, m79, m80, m81, m82, m83, m84, m85, m86, m87, m88, m89, m90, m91, m92, m93, m94, m95, m96, m97, m98, m99, m100, m101, m102, m103, m104, m105, m106, m107, m108, m109, m110, m111, m112, m113, m114, m115, m116, m117, m118, m119, m120, m121, m122, m123, m124, m125, m126, m127, m128, m129, m130, m131, m132, m133, m134, m135, m136, m137, m138, m139, m140, m141, m142, m143, m144, m145, m146, m147, m148, m149, m150, m151, m152) = /* routed positions */ m0, m1, m1, m2, m2, m3, m3, m4, m4, m5, m5, m6, m6, m7, m7, m8, m8, m9, m9, m10, m10, m11, m11, m12, m12, m13, m13, m14, m14, m15, m15, m16, m16, m17, m17, m18, m18, m19, m19, m20, m20, m21, m21, m22, m22, m23, m23, m24, m24, m25, m25, m26, m26, m27, m27, m28, m28, m29, m29, m30, m30, m31, m31, m32, m32, m33, m33, m34, m34, m35, m35, m36, m36, m37, m37, m38, m38, m39, m39, m40, m40, m41, m41, m42, m42, m43, m43, m44, m44, m45, m45, m46, m46, m47, m47, m48, m48, m49, m49, m50, m50, m51, m51, m52, m52, m53, m53, m54, m54, m55, m55, m56, m56, m57, m57, m58, m58, m59, m59, m60, m60, m61, m61, m62, m62, m63, m63, m64, m64, m65, m65, m66, m66, m67, m67, m68, m68, m69, m69, m70, m70, m71, m71, m72, m72, m73, m73, m74, m74, m75, m75, m76, m76, m77, m77, m78, m78, m79, m79, m80, m80, m81, m81, m82, m82, m83, m83, m84, m84, m85, m85, m86, m86, m87, m87, m88, m88, m89, m89, m90, m90, m91, m91, m92, m92, m93, m93, m94, m94, m95, m95, m96, m96, m97, m97, m98, m98, m99, m99, m100, m100, m101, m101, m102, m102, m103, m103, m104, m104, m105, m105, m106, m106, m107, m107, m108, m108, m109, m109, m110, m110, m111, m111, m112, m112, m113, m113, m114, m114, m115, m115, m116, m116, m117, m117, m118, m118, m119, m119, m120, m120, m121, m121, m122, m122, m123, m123, m124, m124, m125, m125, m126, m126, m127, m127, m128, m128, m129, m129, m130, m130, m131, m131, m132, m132, m133, m133, m134, m134, m135, m135, m136, m136, m137, m137, m138, m138, m139, m139, m140, m140, m141, m141, m142, m142, m143, m143, m144, m144, m145, m145, m146, m146, m147, m147, m148, m148, m149, m149, m150, m150, m151, m152, m144, /* outputs */ m31, m41;
RoutingLinkToMass(l0_f1, l0_f2, l1_f1, l1_f2, l2_f1, l2_f2, l3_f1, l3_f2, l4_f1, l4_f2, l5_f1, l5_f2, l6_f1, l6_f2, l7_f1, l7_f2, l8_f1, l8_f2, l9_f1, l9_f2, l10_f1, l10_f2, l11_f1, l11_f2, l12_f1, l12_f2, l13_f1, l13_f2, l14_f1, l14_f2, l15_f1, l15_f2, l16_f1, l16_f2, l17_f1, l17_f2, l18_f1, l18_f2, l19_f1, l19_f2, l20_f1, l20_f2, l21_f1, l21_f2, l22_f1, l22_f2, l23_f1, l23_f2, l24_f1, l24_f2, l25_f1, l25_f2, l26_f1, l26_f2, l27_f1, l27_f2, l28_f1, l28_f2, l29_f1, l29_f2, l30_f1, l30_f2, l31_f1, l31_f2, l32_f1, l32_f2, l33_f1, l33_f2, l34_f1, l34_f2, l35_f1, l35_f2, l36_f1, l36_f2, l37_f1, l37_f2, l38_f1, l38_f2, l39_f1, l39_f2, l40_f1, l40_f2, l41_f1, l41_f2, l42_f1, l42_f2, l43_f1, l43_f2, l44_f1, l44_f2, l45_f1, l45_f2, l46_f1, l46_f2, l47_f1, l47_f2, l48_f1, l48_f2, l49_f1, l49_f2, l50_f1, l50_f2, l51_f1, l51_f2, l52_f1, l52_f2, l53_f1, l53_f2, l54_f1, l54_f2, l55_f1, l55_f2, l56_f1, l56_f2, l57_f1, l57_f2, l58_f1, l58_f2, l59_f1, l59_f2, l60_f1, l60_f2, l61_f1, l61_f2, l62_f1, l62_f2, l63_f1, l63_f2, l64_f1, l64_f2, l65_f1, l65_f2, l66_f1, l66_f2, l67_f1, l67_f2, l68_f1, l68_f2, l69_f1, l69_f2, l70_f1, l70_f2, l71_f1, l71_f2, l72_f1, l72_f2, l73_f1, l73_f2, l74_f1, l74_f2, l75_f1, l75_f2, l76_f1, l76_f2, l77_f1, l77_f2, l78_f1, l78_f2, l79_f1, l79_f2, l80_f1, l80_f2, l81_f1, l81_f2, l82_f1, l82_f2, l83_f1, l83_f2, l84_f1, l84_f2, l85_f1, l85_f2, l86_f1, l86_f2, l87_f1, l87_f2, l88_f1, l88_f2, l89_f1, l89_f2, l90_f1, l90_f2, l91_f1, l91_f2, l92_f1, l92_f2, l93_f1, l93_f2, l94_f1, l94_f2, l95_f1, l95_f2, l96_f1, l96_f2, l97_f1, l97_f2, l98_f1, l98_f2, l99_f1, l99_f2, l100_f1, l100_f2, l101_f1, l101_f2, l102_f1, l102_f2, l103_f1, l103_f2, l104_f1, l104_f2, l105_f1, l105_f2, l106_f1, l106_f2, l107_f1, l107_f2, l108_f1, l108_f2, l109_f1, l109_f2, l110_f1, l110_f2, l111_f1, l111_f2, l112_f1, l112_f2, l113_f1, l113_f2, l114_f1, l114_f2, l115_f1, l115_f2, l116_f1, l116_f2, l117_f1, l117_f2, l118_f1, l118_f2, l119_f1, l119_f2, l120_f1, l120_f2, l121_f1, l121_f2, l122_f1, l122_f2, l123_f1, l123_f2, l124_f1, l124_f2, l125_f1, l125_f2, l126_f1, l126_f2, l127_f1, l127_f2, l128_f1, l128_f2, l129_f1, l129_f2, l130_f1, l130_f2, l131_f1, l131_f2, l132_f1, l132_f2, l133_f1, l133_f2, l134_f1, l134_f2, l135_f1, l135_f2, l136_f1, l136_f2, l137_f1, l137_f2, l138_f1, l138_f2, l139_f1, l139_f2, l140_f1, l140_f2, l141_f1, l141_f2, l142_f1, l142_f2, l143_f1, l143_f2, l144_f1, l144_f2, l145_f1, l145_f2, l146_f1, l146_f2, l147_f1, l147_f2, l148_f1, l148_f2, l149_f1, l149_f2, l150_f1, l150_f2, l151_f1, l151_f2, p_out1, p_out2) = /* routed forces */ l0_f1, l0_f2 + l1_f1, l1_f2 + l2_f1, l2_f2 + l3_f1, l3_f2 + l4_f1, l4_f2 + l5_f1, l5_f2 + l6_f1, l6_f2 + l7_f1, l7_f2 + l8_f1, l8_f2 + l9_f1, l9_f2 + l10_f1, l10_f2 + l11_f1, l11_f2 + l12_f1, l12_f2 + l13_f1, l13_f2 + l14_f1, l14_f2 + l15_f1, l15_f2 + l16_f1, l16_f2 + l17_f1, l17_f2 + l18_f1, l18_f2 + l19_f1, l19_f2 + l20_f1, l20_f2 + l21_f1, l21_f2 + l22_f1, l22_f2 + l23_f1, l23_f2 + l24_f1, l24_f2 + l25_f1, l25_f2 + l26_f1, l26_f2 + l27_f1, l27_f2 + l28_f1, l28_f2 + l29_f1, l29_f2 + l30_f1, l30_f2 + l31_f1, l31_f2 + l32_f1, l32_f2 + l33_f1, l33_f2 + l34_f1, l34_f2 + l35_f1, l35_f2 + l36_f1, l36_f2 + l37_f1, l37_f2 + l38_f1, l38_f2 + l39_f1, l39_f2 + l40_f1, l40_f2 + l41_f1, l41_f2 + l42_f1, l42_f2 + l43_f1, l43_f2 + l44_f1, l44_f2 + l45_f1, l45_f2 + l46_f1, l46_f2 + l47_f1, l47_f2 + l48_f1, l48_f2 + l49_f1, l49_f2 + l50_f1, l50_f2 + l51_f1, l51_f2 + l52_f1, l52_f2 + l53_f1, l53_f2 + l54_f1, l54_f2 + l55_f1, l55_f2 + l56_f1, l56_f2 + l57_f1, l57_f2 + l58_f1, l58_f2 + l59_f1, l59_f2 + l60_f1, l60_f2 + l61_f1, l61_f2 + l62_f1, l62_f2 + l63_f1, l63_f2 + l64_f1, l64_f2 + l65_f1, l65_f2 + l66_f1, l66_f2 + l67_f1, l67_f2 + l68_f1, l68_f2 + l69_f1, l69_f2 + l70_f1, l70_f2 + l71_f1, l71_f2 + l72_f1, l72_f2 + l73_f1, l73_f2 + l74_f1, l74_f2 + l75_f1, l75_f2 + l76_f1, l76_f2 + l77_f1, l77_f2 + l78_f1, l78_f2 + l79_f1, l79_f2 + l80_f1, l80_f2 + l81_f1, l81_f2 + l82_f1, l82_f2 + l83_f1, l83_f2 + l84_f1, l84_f2 + l85_f1, l85_f2 + l86_f1, l86_f2 + l87_f1, l87_f2 + l88_f1, l88_f2 + l89_f1, l89_f2 + l90_f1, l90_f2 + l91_f1, l91_f2 + l92_f1, l92_f2 + l93_f1, l93_f2 + l94_f1, l94_f2 + l95_f1, l95_f2 + l96_f1, l96_f2 + l97_f1, l97_f2 + l98_f1, l98_f2 + l99_f1, l99_f2 + l100_f1, l100_f2 + l101_f1, l101_f2 + l102_f1, l102_f2 + l103_f1, l103_f2 + l104_f1, l104_f2 + l105_f1, l105_f2 + l106_f1, l106_f2 + l107_f1, l107_f2 + l108_f1, l108_f2 + l109_f1, l109_f2 + l110_f1, l110_f2 + l111_f1, l111_f2 + l112_f1, l112_f2 + l113_f1, l113_f2 + l114_f1, l114_f2 + l115_f1, l115_f2 + l116_f1, l116_f2 + l117_f1, l117_f2 + l118_f1, l118_f2 + l119_f1, l119_f2 + l120_f1, l120_f2 + l121_f1, l121_f2 + l122_f1, l122_f2 + l123_f1, l123_f2 + l124_f1, l124_f2 + l125_f1, l125_f2 + l126_f1, l126_f2 + l127_f1, l127_f2 + l128_f1, l128_f2 + l129_f1, l129_f2 + l130_f1, l130_f2 + l131_f1, l131_f2 + l132_f1, l132_f2 + l133_f1, l133_f2 + l134_f1, l134_f2 + l135_f1, l135_f2 + l136_f1, l136_f2 + l137_f1, l137_f2 + l138_f1, l138_f2 + l139_f1, l139_f2 + l140_f1, l140_f2 + l141_f1, l141_f2 + l142_f1, l142_f2 + l143_f1, l143_f2 + l144_f1 + l151_f2, l144_f2 + l145_f1, l145_f2 + l146_f1, l146_f2 + l147_f1, l147_f2 + l148_f1, l148_f2 + l149_f1, l149_f2 + l150_f1, l150_f2, l151_f1, /* pass-through */ p_out1, p_out2;
nbMass = 153;
nbOut = 2;
};
process = in1 : model:*(OutGain), *(OutGain);
/*
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
@low_M param 1.0
@low_K param 0.3
@low_Z param 0.001
@nlZ param 0.08
@nlscale param 0.00005
@low_s0 ground 0.
@low_m0 mass low_M 0. 0.
@low_m1 mass low_M 0. 0.
@low_m2 mass low_M 0. 0.
@low_m3 mass low_M 0. 0.
@low_m4 mass low_M 0. 0.
@low_m5 mass low_M 0. 0.
@low_m6 mass low_M 0. 0.
@low_m7 mass low_M 0. 0.
@low_m8 mass low_M 0. 0.
@low_m9 mass low_M 0. 0.
@low_m10 mass low_M 0. 0.
@low_m11 mass low_M 0. 0.
@low_m12 mass low_M 0. 0.
@low_m13 mass low_M 0. 0.
@low_m14 mass low_M 0. 0.
@low_m15 mass low_M 0. 0.
@low_m16 mass low_M 0. 0.
@low_m17 mass low_M 0. 0.
@low_m18 mass low_M 0. 0.
@low_m19 mass low_M 0. 0.
@low_m20 mass low_M 0. 0.
@low_m21 mass low_M 0. 0.
@low_m22 mass low_M 0. 0.
@low_m23 mass low_M 0. 0.
@low_m24 mass low_M 0. 0.
@low_m25 mass low_M 0. 0.
@low_m26 mass low_M 0. 0.
@low_m27 mass low_M 0. 0.
@low_m28 mass low_M 0. 0.
@low_m29 mass low_M 0. 0.
@low_m30 mass low_M 0. 0.
@low_m31 mass low_M 0. 0.
@low_m32 mass low_M 0. 0.
@low_m33 mass low_M 0. 0.
@low_m34 mass low_M 0. 0.
@low_m35 mass low_M 0. 0.
@low_m36 mass low_M 0. 0.
@low_m37 mass low_M 0. 0.
@low_m38 mass low_M 0. 0.
@low_m39 mass low_M 0. 0.
@low_m40 mass low_M 0. 0.
@low_m41 mass low_M 0. 0.
@low_m42 mass low_M 0. 0.
@low_m43 mass low_M 0. 0.
@low_m44 mass low_M 0. 0.
@low_m45 mass low_M 0. 0.
@low_m46 mass low_M 0. 0.
@low_m47 mass low_M 0. 0.
@low_m48 mass low_M 0. 0.
@low_m49 mass low_M 0. 0.
@low_m50 mass low_M 0. 0.
@low_m51 mass low_M 0. 0.
@low_m52 mass low_M 0. 0.
@low_m53 mass low_M 0. 0.
@low_m54 mass low_M 0. 0.
@low_m55 mass low_M 0. 0.
@low_m56 mass low_M 0. 0.
@low_m57 mass low_M 0. 0.
@low_m58 mass low_M 0. 0.
@low_m59 mass low_M 0. 0.
@low_m60 mass low_M 0. 0.
@low_m61 mass low_M 0. 0.
@low_m62 mass low_M 0. 0.
@low_m63 mass low_M 0. 0.
@low_m64 mass low_M 0. 0.
@low_m65 mass low_M 0. 0.
@low_m66 mass low_M 0. 0.
@low_m67 mass low_M 0. 0.
@low_m68 mass low_M 0. 0.
@low_m69 mass low_M 0. 0.
@low_m70 mass low_M 0. 0.
@low_m71 mass low_M 0. 0.
@low_m72 mass low_M 0. 0.
@low_m73 mass low_M 0. 0.
@low_m74 mass low_M 0. 0.
@low_m75 mass low_M 0. 0.
@low_m76 mass low_M 0. 0.
@low_m77 mass low_M 0. 0.
@low_m78 mass low_M 0. 0.
@low_m79 mass low_M 0. 0.
@low_m80 mass low_M 0. 0.
@low_m81 mass low_M 0. 0.
@low_m82 mass low_M 0. 0.
@low_m83 mass low_M 0. 0.
@low_m84 mass low_M 0. 0.
@low_m85 mass low_M 0. 0.
@low_m86 mass low_M 0. 0.
@low_m87 mass low_M 0. 0.
@low_m88 mass low_M 0. 0.
@low_m89 mass low_M 0. 0.
@low_m90 mass low_M 0. 0.
@low_m91 mass low_M 0. 0.
@low_m92 mass low_M 0. 0.
@low_m93 mass low_M 0. 0.
@low_m94 mass low_M 0. 0.
@low_m95 mass low_M 0. 0.
@low_m96 mass low_M 0. 0.
@low_m97 mass low_M 0. 0.
@low_m98 mass low_M 0. 0.
@low_m99 mass low_M 0. 0.
@low_m100 mass low_M 0. 0.
@low_m101 mass low_M 0. 0.
@low_m102 mass low_M 0. 0.
@low_m103 mass low_M 0. 0.
@low_m104 mass low_M 0. 0.
@low_m105 mass low_M 0. 0.
@low_m106 mass low_M 0. 0.
@low_m107 mass low_M 0. 0.
@low_m108 mass low_M 0. 0.
@low_m109 mass low_M 0. 0.
@low_m110 mass low_M 0. 0.
@low_m111 mass low_M 0. 0.
@low_m112 mass low_M 0. 0.
@low_m113 mass low_M 0. 0.
@low_m114 mass low_M 0. 0.
@low_m115 mass low_M 0. 0.
@low_m116 mass low_M 0. 0.
@low_m117 mass low_M 0. 0.
@low_m118 mass low_M 0. 0.
@low_m119 mass low_M 0. 0.
@low_m120 mass low_M 0. 0.
@low_m121 mass low_M 0. 0.
@low_m122 mass low_M 0. 0.
@low_m123 mass low_M 0. 0.
@low_m124 mass low_M 0. 0.
@low_m125 mass low_M 0. 0.
@low_m126 mass low_M 0. 0.
@low_m127 mass low_M 0. 0.
@low_m128 mass low_M 0. 0.
@low_m129 mass low_M 0. 0.
@low_m130 mass low_M 0. 0.
@low_m131 mass low_M 0. 0.
@low_m132 mass low_M 0. 0.
@low_m133 mass low_M 0. 0.
@low_m134 mass low_M 0. 0.
@low_m135 mass low_M 0. 0.
@low_m136 mass low_M 0. 0.
@low_m137 mass low_M 0. 0.
@low_m138 mass low_M 0. 0.
@low_m139 mass low_M 0. 0.
@low_m140 mass low_M 0. 0.
@low_m141 mass low_M 0. 0.
@low_m142 mass low_M 0. 0.
@low_m143 mass low_M 0. 0.
@low_m144 mass low_M 0. 0.
@low_m145 mass low_M 0. 0.
@low_m146 mass low_M 0. 0.
@low_m147 mass low_M 0. 0.
@low_m148 mass low_M 0. 0.
@low_m149 mass low_M 0. 0.
@low_s1 ground 0.
@low_r0 springDamper @low_s0 @low_m0 low_K low_Z
@low_r1 springDamper @low_m0 @low_m1 low_K low_Z
@low_r2 springDamper @low_m1 @low_m2 low_K low_Z
@low_r3 springDamper @low_m2 @low_m3 low_K low_Z
@low_r4 springDamper @low_m3 @low_m4 low_K low_Z
@low_r5 springDamper @low_m4 @low_m5 low_K low_Z
@low_r6 springDamper @low_m5 @low_m6 low_K low_Z
@low_r7 springDamper @low_m6 @low_m7 low_K low_Z
@low_r8 springDamper @low_m7 @low_m8 low_K low_Z
@low_r9 springDamper @low_m8 @low_m9 low_K low_Z
@low_r10 springDamper @low_m9 @low_m10 low_K low_Z
@low_r11 springDamper @low_m10 @low_m11 low_K low_Z
@low_r12 springDamper @low_m11 @low_m12 low_K low_Z
@low_r13 springDamper @low_m12 @low_m13 low_K low_Z
@low_r14 springDamper @low_m13 @low_m14 low_K low_Z
@low_r15 springDamper @low_m14 @low_m15 low_K low_Z
@low_r16 springDamper @low_m15 @low_m16 low_K low_Z
@low_r17 springDamper @low_m16 @low_m17 low_K low_Z
@low_r18 springDamper @low_m17 @low_m18 low_K low_Z
@low_r19 springDamper @low_m18 @low_m19 low_K low_Z
@low_r20 springDamper @low_m19 @low_m20 low_K low_Z
@low_r21 springDamper @low_m20 @low_m21 low_K low_Z
@low_r22 springDamper @low_m21 @low_m22 low_K low_Z
@low_r23 springDamper @low_m22 @low_m23 low_K low_Z
@low_r24 springDamper @low_m23 @low_m24 low_K low_Z
@low_r25 springDamper @low_m24 @low_m25 low_K low_Z
@low_r26 springDamper @low_m25 @low_m26 low_K low_Z
@low_r27 springDamper @low_m26 @low_m27 low_K low_Z
@low_r28 springDamper @low_m27 @low_m28 low_K low_Z
@low_r29 springDamper @low_m28 @low_m29 low_K low_Z
@low_r30 springDamper @low_m29 @low_m30 low_K low_Z
@low_r31 springDamper @low_m30 @low_m31 low_K low_Z
@low_r32 springDamper @low_m31 @low_m32 low_K low_Z
@low_r33 springDamper @low_m32 @low_m33 low_K low_Z
@low_r34 springDamper @low_m33 @low_m34 low_K low_Z
@low_r35 springDamper @low_m34 @low_m35 low_K low_Z
@low_r36 springDamper @low_m35 @low_m36 low_K low_Z
@low_r37 springDamper @low_m36 @low_m37 low_K low_Z
@low_r38 springDamper @low_m37 @low_m38 low_K low_Z
@low_r39 springDamper @low_m38 @low_m39 low_K low_Z
@low_r40 springDamper @low_m39 @low_m40 low_K low_Z
@low_r41 springDamper @low_m40 @low_m41 low_K low_Z
@low_r42 springDamper @low_m41 @low_m42 low_K low_Z
@low_r43 springDamper @low_m42 @low_m43 low_K low_Z
@low_r44 springDamper @low_m43 @low_m44 low_K low_Z
@low_r45 springDamper @low_m44 @low_m45 low_K low_Z
@low_r46 springDamper @low_m45 @low_m46 low_K low_Z
@low_r47 springDamper @low_m46 @low_m47 low_K low_Z
@low_r48 springDamper @low_m47 @low_m48 low_K low_Z
@low_r49 springDamper @low_m48 @low_m49 low_K low_Z
@low_r50 springDamper @low_m49 @low_m50 low_K low_Z
@low_r51 springDamper @low_m50 @low_m51 low_K low_Z
@low_r52 springDamper @low_m51 @low_m52 low_K low_Z
@low_r53 springDamper @low_m52 @low_m53 low_K low_Z
@low_r54 springDamper @low_m53 @low_m54 low_K low_Z
@low_r55 springDamper @low_m54 @low_m55 low_K low_Z
@low_r56 springDamper @low_m55 @low_m56 low_K low_Z
@low_r57 springDamper @low_m56 @low_m57 low_K low_Z
@low_r58 springDamper @low_m57 @low_m58 low_K low_Z
@low_r59 springDamper @low_m58 @low_m59 low_K low_Z
@low_r60 springDamper @low_m59 @low_m60 low_K low_Z
@low_r61 springDamper @low_m60 @low_m61 low_K low_Z
@low_r62 springDamper @low_m61 @low_m62 low_K low_Z
@low_r63 springDamper @low_m62 @low_m63 low_K low_Z
@low_r64 springDamper @low_m63 @low_m64 low_K low_Z
@low_r65 springDamper @low_m64 @low_m65 low_K low_Z
@low_r66 springDamper @low_m65 @low_m66 low_K low_Z
@low_r67 springDamper @low_m66 @low_m67 low_K low_Z
@low_r68 springDamper @low_m67 @low_m68 low_K low_Z
@low_r69 springDamper @low_m68 @low_m69 low_K low_Z
@low_r70 springDamper @low_m69 @low_m70 low_K low_Z
@low_r71 springDamper @low_m70 @low_m71 low_K low_Z
@low_r72 springDamper @low_m71 @low_m72 low_K low_Z
@low_r73 springDamper @low_m72 @low_m73 low_K low_Z
@low_r74 springDamper @low_m73 @low_m74 low_K low_Z
@low_r75 springDamper @low_m74 @low_m75 low_K low_Z
@low_r76 springDamper @low_m75 @low_m76 low_K low_Z
@low_r77 springDamper @low_m76 @low_m77 low_K low_Z
@low_r78 springDamper @low_m77 @low_m78 low_K low_Z
@low_r79 springDamper @low_m78 @low_m79 low_K low_Z
@low_r80 springDamper @low_m79 @low_m80 low_K low_Z
@low_r81 springDamper @low_m80 @low_m81 low_K low_Z
@low_r82 springDamper @low_m81 @low_m82 low_K low_Z
@low_r83 springDamper @low_m82 @low_m83 low_K low_Z
@low_r84 springDamper @low_m83 @low_m84 low_K low_Z
@low_r85 springDamper @low_m84 @low_m85 low_K low_Z
@low_r86 springDamper @low_m85 @low_m86 low_K low_Z
@low_r87 springDamper @low_m86 @low_m87 low_K low_Z
@low_r88 springDamper @low_m87 @low_m88 low_K low_Z
@low_r89 springDamper @low_m88 @low_m89 low_K low_Z
@low_r90 springDamper @low_m89 @low_m90 low_K low_Z
@low_r91 springDamper @low_m90 @low_m91 low_K low_Z
@low_r92 springDamper @low_m91 @low_m92 low_K low_Z
@low_r93 springDamper @low_m92 @low_m93 low_K low_Z
@low_r94 springDamper @low_m93 @low_m94 low_K low_Z
@low_r95 springDamper @low_m94 @low_m95 low_K low_Z
@low_r96 springDamper @low_m95 @low_m96 low_K low_Z
@low_r97 springDamper @low_m96 @low_m97 low_K low_Z
@low_r98 springDamper @low_m97 @low_m98 low_K low_Z
@low_r99 springDamper @low_m98 @low_m99 low_K low_Z
@low_r100 springDamper @low_m99 @low_m100 low_K low_Z
@low_r101 springDamper @low_m100 @low_m101 low_K low_Z
@low_r102 springDamper @low_m101 @low_m102 low_K low_Z
@low_r103 springDamper @low_m102 @low_m103 low_K low_Z
@low_r104 springDamper @low_m103 @low_m104 low_K low_Z
@low_r105 springDamper @low_m104 @low_m105 low_K low_Z
@low_r106 springDamper @low_m105 @low_m106 low_K low_Z
@low_r107 springDamper @low_m106 @low_m107 low_K low_Z
@low_r108 springDamper @low_m107 @low_m108 low_K low_Z
@low_r109 springDamper @low_m108 @low_m109 low_K low_Z
@low_r110 springDamper @low_m109 @low_m110 low_K low_Z
@low_r111 springDamper @low_m110 @low_m111 low_K low_Z
@low_r112 springDamper @low_m111 @low_m112 low_K low_Z
@low_r113 springDamper @low_m112 @low_m113 low_K low_Z
@low_r114 springDamper @low_m113 @low_m114 low_K low_Z
@low_r115 springDamper @low_m114 @low_m115 low_K low_Z
@low_r116 springDamper @low_m115 @low_m116 low_K low_Z
@low_r117 springDamper @low_m116 @low_m117 low_K low_Z
@low_r118 springDamper @low_m117 @low_m118 low_K low_Z
@low_r119 springDamper @low_m118 @low_m119 low_K low_Z
@low_r120 springDamper @low_m119 @low_m120 low_K low_Z
@low_r121 springDamper @low_m120 @low_m121 low_K low_Z
@low_r122 springDamper @low_m121 @low_m122 low_K low_Z
@low_r123 springDamper @low_m122 @low_m123 low_K low_Z
@low_r124 springDamper @low_m123 @low_m124 low_K low_Z
@low_r125 springDamper @low_m124 @low_m125 low_K low_Z
@low_r126 springDamper @low_m125 @low_m126 low_K low_Z
@low_r127 springDamper @low_m126 @low_m127 low_K low_Z
@low_r128 springDamper @low_m127 @low_m128 low_K low_Z
@low_r129 springDamper @low_m128 @low_m129 low_K low_Z
@low_r130 springDamper @low_m129 @low_m130 low_K low_Z
@low_r131 springDamper @low_m130 @low_m131 low_K low_Z
@low_r132 springDamper @low_m131 @low_m132 low_K low_Z
@low_r133 springDamper @low_m132 @low_m133 low_K low_Z
@low_r134 springDamper @low_m133 @low_m134 low_K low_Z
@low_r135 springDamper @low_m134 @low_m135 low_K low_Z
@low_r136 springDamper @low_m135 @low_m136 low_K low_Z
@low_r137 springDamper @low_m136 @low_m137 low_K low_Z
@low_r138 springDamper @low_m137 @low_m138 low_K low_Z
@low_r139 springDamper @low_m138 @low_m139 low_K low_Z
@low_r140 springDamper @low_m139 @low_m140 low_K low_Z
@low_r141 springDamper @low_m140 @low_m141 low_K low_Z
@low_r142 springDamper @low_m141 @low_m142 low_K low_Z
@low_r143 springDamper @low_m142 @low_m143 low_K low_Z
@low_r144 springDamper @low_m143 @low_m144 low_K low_Z
@low_r145 springDamper @low_m144 @low_m145 low_K low_Z
@low_r146 springDamper @low_m145 @low_m146 low_K low_Z
@low_r147 springDamper @low_m146 @low_m147 low_K low_Z
@low_r148 springDamper @low_m147 @low_m148 low_K low_Z
@low_r149 springDamper @low_m148 @low_m149 low_K low_Z
@low_r150 springDamper @low_m149 @low_s1 low_K low_Z
@in1 posInput 1.
@out1 posOutput @low_m30
@out2 posOutput @low_m40
@nlb0 nlBow @in1 @low_m143 nlZ nlscale
*/ | https://raw.githubusercontent.com/ossia/score-user-library/8a910e05f713a6d710fe3c1b8cd3e63eee9394b0/Presets/Faust/physicalModeling/mi-faust/bowedString.dsp | faust | ========= DESCRITPION =============
A simple bowed string model
- inputs: bow position (move it slowly to yield self-sustained oscillations!).
- outputs: two listening points on the string.
- controls: bow pressure and string stiffness.
nice and smooth position signal
routed positions
outputs
routed forces
pass-through
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
@low_M param 1.0
@low_K param 0.3
@low_Z param 0.001
@nlZ param 0.08
@nlscale param 0.00005
@low_s0 ground 0.
@low_m0 mass low_M 0. 0.
@low_m1 mass low_M 0. 0.
@low_m2 mass low_M 0. 0.
@low_m3 mass low_M 0. 0.
@low_m4 mass low_M 0. 0.
@low_m5 mass low_M 0. 0.
@low_m6 mass low_M 0. 0.
@low_m7 mass low_M 0. 0.
@low_m8 mass low_M 0. 0.
@low_m9 mass low_M 0. 0.
@low_m10 mass low_M 0. 0.
@low_m11 mass low_M 0. 0.
@low_m12 mass low_M 0. 0.
@low_m13 mass low_M 0. 0.
@low_m14 mass low_M 0. 0.
@low_m15 mass low_M 0. 0.
@low_m16 mass low_M 0. 0.
@low_m17 mass low_M 0. 0.
@low_m18 mass low_M 0. 0.
@low_m19 mass low_M 0. 0.
@low_m20 mass low_M 0. 0.
@low_m21 mass low_M 0. 0.
@low_m22 mass low_M 0. 0.
@low_m23 mass low_M 0. 0.
@low_m24 mass low_M 0. 0.
@low_m25 mass low_M 0. 0.
@low_m26 mass low_M 0. 0.
@low_m27 mass low_M 0. 0.
@low_m28 mass low_M 0. 0.
@low_m29 mass low_M 0. 0.
@low_m30 mass low_M 0. 0.
@low_m31 mass low_M 0. 0.
@low_m32 mass low_M 0. 0.
@low_m33 mass low_M 0. 0.
@low_m34 mass low_M 0. 0.
@low_m35 mass low_M 0. 0.
@low_m36 mass low_M 0. 0.
@low_m37 mass low_M 0. 0.
@low_m38 mass low_M 0. 0.
@low_m39 mass low_M 0. 0.
@low_m40 mass low_M 0. 0.
@low_m41 mass low_M 0. 0.
@low_m42 mass low_M 0. 0.
@low_m43 mass low_M 0. 0.
@low_m44 mass low_M 0. 0.
@low_m45 mass low_M 0. 0.
@low_m46 mass low_M 0. 0.
@low_m47 mass low_M 0. 0.
@low_m48 mass low_M 0. 0.
@low_m49 mass low_M 0. 0.
@low_m50 mass low_M 0. 0.
@low_m51 mass low_M 0. 0.
@low_m52 mass low_M 0. 0.
@low_m53 mass low_M 0. 0.
@low_m54 mass low_M 0. 0.
@low_m55 mass low_M 0. 0.
@low_m56 mass low_M 0. 0.
@low_m57 mass low_M 0. 0.
@low_m58 mass low_M 0. 0.
@low_m59 mass low_M 0. 0.
@low_m60 mass low_M 0. 0.
@low_m61 mass low_M 0. 0.
@low_m62 mass low_M 0. 0.
@low_m63 mass low_M 0. 0.
@low_m64 mass low_M 0. 0.
@low_m65 mass low_M 0. 0.
@low_m66 mass low_M 0. 0.
@low_m67 mass low_M 0. 0.
@low_m68 mass low_M 0. 0.
@low_m69 mass low_M 0. 0.
@low_m70 mass low_M 0. 0.
@low_m71 mass low_M 0. 0.
@low_m72 mass low_M 0. 0.
@low_m73 mass low_M 0. 0.
@low_m74 mass low_M 0. 0.
@low_m75 mass low_M 0. 0.
@low_m76 mass low_M 0. 0.
@low_m77 mass low_M 0. 0.
@low_m78 mass low_M 0. 0.
@low_m79 mass low_M 0. 0.
@low_m80 mass low_M 0. 0.
@low_m81 mass low_M 0. 0.
@low_m82 mass low_M 0. 0.
@low_m83 mass low_M 0. 0.
@low_m84 mass low_M 0. 0.
@low_m85 mass low_M 0. 0.
@low_m86 mass low_M 0. 0.
@low_m87 mass low_M 0. 0.
@low_m88 mass low_M 0. 0.
@low_m89 mass low_M 0. 0.
@low_m90 mass low_M 0. 0.
@low_m91 mass low_M 0. 0.
@low_m92 mass low_M 0. 0.
@low_m93 mass low_M 0. 0.
@low_m94 mass low_M 0. 0.
@low_m95 mass low_M 0. 0.
@low_m96 mass low_M 0. 0.
@low_m97 mass low_M 0. 0.
@low_m98 mass low_M 0. 0.
@low_m99 mass low_M 0. 0.
@low_m100 mass low_M 0. 0.
@low_m101 mass low_M 0. 0.
@low_m102 mass low_M 0. 0.
@low_m103 mass low_M 0. 0.
@low_m104 mass low_M 0. 0.
@low_m105 mass low_M 0. 0.
@low_m106 mass low_M 0. 0.
@low_m107 mass low_M 0. 0.
@low_m108 mass low_M 0. 0.
@low_m109 mass low_M 0. 0.
@low_m110 mass low_M 0. 0.
@low_m111 mass low_M 0. 0.
@low_m112 mass low_M 0. 0.
@low_m113 mass low_M 0. 0.
@low_m114 mass low_M 0. 0.
@low_m115 mass low_M 0. 0.
@low_m116 mass low_M 0. 0.
@low_m117 mass low_M 0. 0.
@low_m118 mass low_M 0. 0.
@low_m119 mass low_M 0. 0.
@low_m120 mass low_M 0. 0.
@low_m121 mass low_M 0. 0.
@low_m122 mass low_M 0. 0.
@low_m123 mass low_M 0. 0.
@low_m124 mass low_M 0. 0.
@low_m125 mass low_M 0. 0.
@low_m126 mass low_M 0. 0.
@low_m127 mass low_M 0. 0.
@low_m128 mass low_M 0. 0.
@low_m129 mass low_M 0. 0.
@low_m130 mass low_M 0. 0.
@low_m131 mass low_M 0. 0.
@low_m132 mass low_M 0. 0.
@low_m133 mass low_M 0. 0.
@low_m134 mass low_M 0. 0.
@low_m135 mass low_M 0. 0.
@low_m136 mass low_M 0. 0.
@low_m137 mass low_M 0. 0.
@low_m138 mass low_M 0. 0.
@low_m139 mass low_M 0. 0.
@low_m140 mass low_M 0. 0.
@low_m141 mass low_M 0. 0.
@low_m142 mass low_M 0. 0.
@low_m143 mass low_M 0. 0.
@low_m144 mass low_M 0. 0.
@low_m145 mass low_M 0. 0.
@low_m146 mass low_M 0. 0.
@low_m147 mass low_M 0. 0.
@low_m148 mass low_M 0. 0.
@low_m149 mass low_M 0. 0.
@low_s1 ground 0.
@low_r0 springDamper @low_s0 @low_m0 low_K low_Z
@low_r1 springDamper @low_m0 @low_m1 low_K low_Z
@low_r2 springDamper @low_m1 @low_m2 low_K low_Z
@low_r3 springDamper @low_m2 @low_m3 low_K low_Z
@low_r4 springDamper @low_m3 @low_m4 low_K low_Z
@low_r5 springDamper @low_m4 @low_m5 low_K low_Z
@low_r6 springDamper @low_m5 @low_m6 low_K low_Z
@low_r7 springDamper @low_m6 @low_m7 low_K low_Z
@low_r8 springDamper @low_m7 @low_m8 low_K low_Z
@low_r9 springDamper @low_m8 @low_m9 low_K low_Z
@low_r10 springDamper @low_m9 @low_m10 low_K low_Z
@low_r11 springDamper @low_m10 @low_m11 low_K low_Z
@low_r12 springDamper @low_m11 @low_m12 low_K low_Z
@low_r13 springDamper @low_m12 @low_m13 low_K low_Z
@low_r14 springDamper @low_m13 @low_m14 low_K low_Z
@low_r15 springDamper @low_m14 @low_m15 low_K low_Z
@low_r16 springDamper @low_m15 @low_m16 low_K low_Z
@low_r17 springDamper @low_m16 @low_m17 low_K low_Z
@low_r18 springDamper @low_m17 @low_m18 low_K low_Z
@low_r19 springDamper @low_m18 @low_m19 low_K low_Z
@low_r20 springDamper @low_m19 @low_m20 low_K low_Z
@low_r21 springDamper @low_m20 @low_m21 low_K low_Z
@low_r22 springDamper @low_m21 @low_m22 low_K low_Z
@low_r23 springDamper @low_m22 @low_m23 low_K low_Z
@low_r24 springDamper @low_m23 @low_m24 low_K low_Z
@low_r25 springDamper @low_m24 @low_m25 low_K low_Z
@low_r26 springDamper @low_m25 @low_m26 low_K low_Z
@low_r27 springDamper @low_m26 @low_m27 low_K low_Z
@low_r28 springDamper @low_m27 @low_m28 low_K low_Z
@low_r29 springDamper @low_m28 @low_m29 low_K low_Z
@low_r30 springDamper @low_m29 @low_m30 low_K low_Z
@low_r31 springDamper @low_m30 @low_m31 low_K low_Z
@low_r32 springDamper @low_m31 @low_m32 low_K low_Z
@low_r33 springDamper @low_m32 @low_m33 low_K low_Z
@low_r34 springDamper @low_m33 @low_m34 low_K low_Z
@low_r35 springDamper @low_m34 @low_m35 low_K low_Z
@low_r36 springDamper @low_m35 @low_m36 low_K low_Z
@low_r37 springDamper @low_m36 @low_m37 low_K low_Z
@low_r38 springDamper @low_m37 @low_m38 low_K low_Z
@low_r39 springDamper @low_m38 @low_m39 low_K low_Z
@low_r40 springDamper @low_m39 @low_m40 low_K low_Z
@low_r41 springDamper @low_m40 @low_m41 low_K low_Z
@low_r42 springDamper @low_m41 @low_m42 low_K low_Z
@low_r43 springDamper @low_m42 @low_m43 low_K low_Z
@low_r44 springDamper @low_m43 @low_m44 low_K low_Z
@low_r45 springDamper @low_m44 @low_m45 low_K low_Z
@low_r46 springDamper @low_m45 @low_m46 low_K low_Z
@low_r47 springDamper @low_m46 @low_m47 low_K low_Z
@low_r48 springDamper @low_m47 @low_m48 low_K low_Z
@low_r49 springDamper @low_m48 @low_m49 low_K low_Z
@low_r50 springDamper @low_m49 @low_m50 low_K low_Z
@low_r51 springDamper @low_m50 @low_m51 low_K low_Z
@low_r52 springDamper @low_m51 @low_m52 low_K low_Z
@low_r53 springDamper @low_m52 @low_m53 low_K low_Z
@low_r54 springDamper @low_m53 @low_m54 low_K low_Z
@low_r55 springDamper @low_m54 @low_m55 low_K low_Z
@low_r56 springDamper @low_m55 @low_m56 low_K low_Z
@low_r57 springDamper @low_m56 @low_m57 low_K low_Z
@low_r58 springDamper @low_m57 @low_m58 low_K low_Z
@low_r59 springDamper @low_m58 @low_m59 low_K low_Z
@low_r60 springDamper @low_m59 @low_m60 low_K low_Z
@low_r61 springDamper @low_m60 @low_m61 low_K low_Z
@low_r62 springDamper @low_m61 @low_m62 low_K low_Z
@low_r63 springDamper @low_m62 @low_m63 low_K low_Z
@low_r64 springDamper @low_m63 @low_m64 low_K low_Z
@low_r65 springDamper @low_m64 @low_m65 low_K low_Z
@low_r66 springDamper @low_m65 @low_m66 low_K low_Z
@low_r67 springDamper @low_m66 @low_m67 low_K low_Z
@low_r68 springDamper @low_m67 @low_m68 low_K low_Z
@low_r69 springDamper @low_m68 @low_m69 low_K low_Z
@low_r70 springDamper @low_m69 @low_m70 low_K low_Z
@low_r71 springDamper @low_m70 @low_m71 low_K low_Z
@low_r72 springDamper @low_m71 @low_m72 low_K low_Z
@low_r73 springDamper @low_m72 @low_m73 low_K low_Z
@low_r74 springDamper @low_m73 @low_m74 low_K low_Z
@low_r75 springDamper @low_m74 @low_m75 low_K low_Z
@low_r76 springDamper @low_m75 @low_m76 low_K low_Z
@low_r77 springDamper @low_m76 @low_m77 low_K low_Z
@low_r78 springDamper @low_m77 @low_m78 low_K low_Z
@low_r79 springDamper @low_m78 @low_m79 low_K low_Z
@low_r80 springDamper @low_m79 @low_m80 low_K low_Z
@low_r81 springDamper @low_m80 @low_m81 low_K low_Z
@low_r82 springDamper @low_m81 @low_m82 low_K low_Z
@low_r83 springDamper @low_m82 @low_m83 low_K low_Z
@low_r84 springDamper @low_m83 @low_m84 low_K low_Z
@low_r85 springDamper @low_m84 @low_m85 low_K low_Z
@low_r86 springDamper @low_m85 @low_m86 low_K low_Z
@low_r87 springDamper @low_m86 @low_m87 low_K low_Z
@low_r88 springDamper @low_m87 @low_m88 low_K low_Z
@low_r89 springDamper @low_m88 @low_m89 low_K low_Z
@low_r90 springDamper @low_m89 @low_m90 low_K low_Z
@low_r91 springDamper @low_m90 @low_m91 low_K low_Z
@low_r92 springDamper @low_m91 @low_m92 low_K low_Z
@low_r93 springDamper @low_m92 @low_m93 low_K low_Z
@low_r94 springDamper @low_m93 @low_m94 low_K low_Z
@low_r95 springDamper @low_m94 @low_m95 low_K low_Z
@low_r96 springDamper @low_m95 @low_m96 low_K low_Z
@low_r97 springDamper @low_m96 @low_m97 low_K low_Z
@low_r98 springDamper @low_m97 @low_m98 low_K low_Z
@low_r99 springDamper @low_m98 @low_m99 low_K low_Z
@low_r100 springDamper @low_m99 @low_m100 low_K low_Z
@low_r101 springDamper @low_m100 @low_m101 low_K low_Z
@low_r102 springDamper @low_m101 @low_m102 low_K low_Z
@low_r103 springDamper @low_m102 @low_m103 low_K low_Z
@low_r104 springDamper @low_m103 @low_m104 low_K low_Z
@low_r105 springDamper @low_m104 @low_m105 low_K low_Z
@low_r106 springDamper @low_m105 @low_m106 low_K low_Z
@low_r107 springDamper @low_m106 @low_m107 low_K low_Z
@low_r108 springDamper @low_m107 @low_m108 low_K low_Z
@low_r109 springDamper @low_m108 @low_m109 low_K low_Z
@low_r110 springDamper @low_m109 @low_m110 low_K low_Z
@low_r111 springDamper @low_m110 @low_m111 low_K low_Z
@low_r112 springDamper @low_m111 @low_m112 low_K low_Z
@low_r113 springDamper @low_m112 @low_m113 low_K low_Z
@low_r114 springDamper @low_m113 @low_m114 low_K low_Z
@low_r115 springDamper @low_m114 @low_m115 low_K low_Z
@low_r116 springDamper @low_m115 @low_m116 low_K low_Z
@low_r117 springDamper @low_m116 @low_m117 low_K low_Z
@low_r118 springDamper @low_m117 @low_m118 low_K low_Z
@low_r119 springDamper @low_m118 @low_m119 low_K low_Z
@low_r120 springDamper @low_m119 @low_m120 low_K low_Z
@low_r121 springDamper @low_m120 @low_m121 low_K low_Z
@low_r122 springDamper @low_m121 @low_m122 low_K low_Z
@low_r123 springDamper @low_m122 @low_m123 low_K low_Z
@low_r124 springDamper @low_m123 @low_m124 low_K low_Z
@low_r125 springDamper @low_m124 @low_m125 low_K low_Z
@low_r126 springDamper @low_m125 @low_m126 low_K low_Z
@low_r127 springDamper @low_m126 @low_m127 low_K low_Z
@low_r128 springDamper @low_m127 @low_m128 low_K low_Z
@low_r129 springDamper @low_m128 @low_m129 low_K low_Z
@low_r130 springDamper @low_m129 @low_m130 low_K low_Z
@low_r131 springDamper @low_m130 @low_m131 low_K low_Z
@low_r132 springDamper @low_m131 @low_m132 low_K low_Z
@low_r133 springDamper @low_m132 @low_m133 low_K low_Z
@low_r134 springDamper @low_m133 @low_m134 low_K low_Z
@low_r135 springDamper @low_m134 @low_m135 low_K low_Z
@low_r136 springDamper @low_m135 @low_m136 low_K low_Z
@low_r137 springDamper @low_m136 @low_m137 low_K low_Z
@low_r138 springDamper @low_m137 @low_m138 low_K low_Z
@low_r139 springDamper @low_m138 @low_m139 low_K low_Z
@low_r140 springDamper @low_m139 @low_m140 low_K low_Z
@low_r141 springDamper @low_m140 @low_m141 low_K low_Z
@low_r142 springDamper @low_m141 @low_m142 low_K low_Z
@low_r143 springDamper @low_m142 @low_m143 low_K low_Z
@low_r144 springDamper @low_m143 @low_m144 low_K low_Z
@low_r145 springDamper @low_m144 @low_m145 low_K low_Z
@low_r146 springDamper @low_m145 @low_m146 low_K low_Z
@low_r147 springDamper @low_m146 @low_m147 low_K low_Z
@low_r148 springDamper @low_m147 @low_m148 low_K low_Z
@low_r149 springDamper @low_m148 @low_m149 low_K low_Z
@low_r150 springDamper @low_m149 @low_s1 low_K low_Z
@in1 posInput 1.
@out1 posOutput @low_m30
@out2 posOutput @low_m40
@nlb0 nlBow @in1 @low_m143 nlZ nlscale
| declare name "Bowed String";
declare author "James Leonard";
declare date "April 2020";
import("stdfaust.lib");
OutGain = 150.;
low_M = 1.0;
low_K = hslider("String Stiffness",0.3,0.001,0.7,0.0001) : si.smoo;
low_Z = 0.001;
nlZ = hslider("Bow Pressure",0.3,0.001,0.5,0.0001) : si.smoo;
nlscale = 0.00005;
model = (
mi.ground(0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.mass(low_M, 0, 0., 0.),
mi.ground(0.),
mi.posInput(1.):
RoutingMassToLink :
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.springDamper(low_K, low_Z, 0., 0.),
mi.nlBow(nlZ, nlscale, 0, 1., 0.),
par(i, nbOut, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
nbMass = 153;
nbOut = 2;
};
process = in1 : model:*(OutGain), *(OutGain);
|
0b108952da6a5f5fc1d48725662ca1ae630aefa17cf8304e2baa66507aa59ce5 | ossia/score-user-library | pluckedString.dsp | declare name "Plucked String";
declare author "James Leonard";
declare date "April 2020";
/* ========= DESCRITPION =============
A plucked string with a few controls.
- inputs: pick position.
- outputs: two listening points on the string.
- controls: pick stiffness and damping, string stiffness, damping and air friction.
Note: the model block diagram is starting to look like a piece of modern art.
*/
import("stdfaust.lib");
in1 = hslider("Pick position", 0, -1, 1, 0.001):si.smoo;
OutGain = 5;
str_M = 1.0;
str_K = hslider("string stiffness", 0.7, 0.001, 0.7, 0.001):si.smoo;
str_Z = hslider("string internal damping", 0.0009, 0.00, 0.01, 0.00001):si.smoo;
str_Zo = hslider("string air friction", 0.00005, 0.00, 0.0002, 0.00001):si.smoo;
nlK = hslider("pick stiffness", 0.5, 0., 0.8, 0.001);
nlscale = 0.05;
pZ = hslider("pick damping", 0.04, 0., 0.1, 0.001);
model = (
mi.ground(0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.ground(0.),
mi.posInput(0.):
RoutingMassToLink :
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.nlPluck(nlK, nlscale, pZ, 0., 0.),
par(i, nbOut, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
RoutingMassToLink(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29, m30, m31, m32, m33, m34, m35, m36, m37, m38, m39, m40, m41, m42, m43, m44, m45, m46, m47, m48, m49, m50, m51, m52, m53, m54, m55, m56, m57, m58, m59, m60, m61, m62, m63, m64, m65, m66, m67, m68, m69, m70, m71, m72, m73, m74, m75, m76, m77, m78, m79, m80, m81, m82, m83, m84, m85, m86, m87, m88, m89, m90, m91, m92, m93, m94, m95, m96, m97, m98, m99, m100, m101, m102, m103, m104, m105, m106, m107, m108, m109, m110, m111, m112, m113, m114, m115, m116, m117, m118, m119, m120, m121, m122, m123, m124, m125, m126, m127, m128, m129, m130, m131, m132, m133, m134, m135, m136, m137, m138, m139, m140, m141, m142, m143, m144, m145, m146, m147, m148, m149, m150, m151, m152) = /* routed positions */ m0, m1, m1, m2, m2, m3, m3, m4, m4, m5, m5, m6, m6, m7, m7, m8, m8, m9, m9, m10, m10, m11, m11, m12, m12, m13, m13, m14, m14, m15, m15, m16, m16, m17, m17, m18, m18, m19, m19, m20, m20, m21, m21, m22, m22, m23, m23, m24, m24, m25, m25, m26, m26, m27, m27, m28, m28, m29, m29, m30, m30, m31, m31, m32, m32, m33, m33, m34, m34, m35, m35, m36, m36, m37, m37, m38, m38, m39, m39, m40, m40, m41, m41, m42, m42, m43, m43, m44, m44, m45, m45, m46, m46, m47, m47, m48, m48, m49, m49, m50, m50, m51, m51, m52, m52, m53, m53, m54, m54, m55, m55, m56, m56, m57, m57, m58, m58, m59, m59, m60, m60, m61, m61, m62, m62, m63, m63, m64, m64, m65, m65, m66, m66, m67, m67, m68, m68, m69, m69, m70, m70, m71, m71, m72, m72, m73, m73, m74, m74, m75, m75, m76, m76, m77, m77, m78, m78, m79, m79, m80, m80, m81, m81, m82, m82, m83, m83, m84, m84, m85, m85, m86, m86, m87, m87, m88, m88, m89, m89, m90, m90, m91, m91, m92, m92, m93, m93, m94, m94, m95, m95, m96, m96, m97, m97, m98, m98, m99, m99, m100, m100, m101, m101, m102, m102, m103, m103, m104, m104, m105, m105, m106, m106, m107, m107, m108, m108, m109, m109, m110, m110, m111, m111, m112, m112, m113, m113, m114, m114, m115, m115, m116, m116, m117, m117, m118, m118, m119, m119, m120, m120, m121, m121, m122, m122, m123, m123, m124, m124, m125, m125, m126, m126, m127, m127, m128, m128, m129, m129, m130, m130, m131, m131, m132, m132, m133, m133, m134, m134, m135, m135, m136, m136, m137, m137, m138, m138, m139, m139, m140, m140, m141, m141, m142, m142, m143, m143, m144, m144, m145, m145, m146, m146, m147, m147, m148, m148, m149, m149, m150, m150, m151, m152, m141, /* outputs */ m21, m11;
RoutingLinkToMass(l0_f1, l0_f2, l1_f1, l1_f2, l2_f1, l2_f2, l3_f1, l3_f2, l4_f1, l4_f2, l5_f1, l5_f2, l6_f1, l6_f2, l7_f1, l7_f2, l8_f1, l8_f2, l9_f1, l9_f2, l10_f1, l10_f2, l11_f1, l11_f2, l12_f1, l12_f2, l13_f1, l13_f2, l14_f1, l14_f2, l15_f1, l15_f2, l16_f1, l16_f2, l17_f1, l17_f2, l18_f1, l18_f2, l19_f1, l19_f2, l20_f1, l20_f2, l21_f1, l21_f2, l22_f1, l22_f2, l23_f1, l23_f2, l24_f1, l24_f2, l25_f1, l25_f2, l26_f1, l26_f2, l27_f1, l27_f2, l28_f1, l28_f2, l29_f1, l29_f2, l30_f1, l30_f2, l31_f1, l31_f2, l32_f1, l32_f2, l33_f1, l33_f2, l34_f1, l34_f2, l35_f1, l35_f2, l36_f1, l36_f2, l37_f1, l37_f2, l38_f1, l38_f2, l39_f1, l39_f2, l40_f1, l40_f2, l41_f1, l41_f2, l42_f1, l42_f2, l43_f1, l43_f2, l44_f1, l44_f2, l45_f1, l45_f2, l46_f1, l46_f2, l47_f1, l47_f2, l48_f1, l48_f2, l49_f1, l49_f2, l50_f1, l50_f2, l51_f1, l51_f2, l52_f1, l52_f2, l53_f1, l53_f2, l54_f1, l54_f2, l55_f1, l55_f2, l56_f1, l56_f2, l57_f1, l57_f2, l58_f1, l58_f2, l59_f1, l59_f2, l60_f1, l60_f2, l61_f1, l61_f2, l62_f1, l62_f2, l63_f1, l63_f2, l64_f1, l64_f2, l65_f1, l65_f2, l66_f1, l66_f2, l67_f1, l67_f2, l68_f1, l68_f2, l69_f1, l69_f2, l70_f1, l70_f2, l71_f1, l71_f2, l72_f1, l72_f2, l73_f1, l73_f2, l74_f1, l74_f2, l75_f1, l75_f2, l76_f1, l76_f2, l77_f1, l77_f2, l78_f1, l78_f2, l79_f1, l79_f2, l80_f1, l80_f2, l81_f1, l81_f2, l82_f1, l82_f2, l83_f1, l83_f2, l84_f1, l84_f2, l85_f1, l85_f2, l86_f1, l86_f2, l87_f1, l87_f2, l88_f1, l88_f2, l89_f1, l89_f2, l90_f1, l90_f2, l91_f1, l91_f2, l92_f1, l92_f2, l93_f1, l93_f2, l94_f1, l94_f2, l95_f1, l95_f2, l96_f1, l96_f2, l97_f1, l97_f2, l98_f1, l98_f2, l99_f1, l99_f2, l100_f1, l100_f2, l101_f1, l101_f2, l102_f1, l102_f2, l103_f1, l103_f2, l104_f1, l104_f2, l105_f1, l105_f2, l106_f1, l106_f2, l107_f1, l107_f2, l108_f1, l108_f2, l109_f1, l109_f2, l110_f1, l110_f2, l111_f1, l111_f2, l112_f1, l112_f2, l113_f1, l113_f2, l114_f1, l114_f2, l115_f1, l115_f2, l116_f1, l116_f2, l117_f1, l117_f2, l118_f1, l118_f2, l119_f1, l119_f2, l120_f1, l120_f2, l121_f1, l121_f2, l122_f1, l122_f2, l123_f1, l123_f2, l124_f1, l124_f2, l125_f1, l125_f2, l126_f1, l126_f2, l127_f1, l127_f2, l128_f1, l128_f2, l129_f1, l129_f2, l130_f1, l130_f2, l131_f1, l131_f2, l132_f1, l132_f2, l133_f1, l133_f2, l134_f1, l134_f2, l135_f1, l135_f2, l136_f1, l136_f2, l137_f1, l137_f2, l138_f1, l138_f2, l139_f1, l139_f2, l140_f1, l140_f2, l141_f1, l141_f2, l142_f1, l142_f2, l143_f1, l143_f2, l144_f1, l144_f2, l145_f1, l145_f2, l146_f1, l146_f2, l147_f1, l147_f2, l148_f1, l148_f2, l149_f1, l149_f2, l150_f1, l150_f2, l151_f1, l151_f2, p_out1, p_out2) = /* routed forces */ l0_f1, l0_f2 + l1_f1, l1_f2 + l2_f1, l2_f2 + l3_f1, l3_f2 + l4_f1, l4_f2 + l5_f1, l5_f2 + l6_f1, l6_f2 + l7_f1, l7_f2 + l8_f1, l8_f2 + l9_f1, l9_f2 + l10_f1, l10_f2 + l11_f1, l11_f2 + l12_f1, l12_f2 + l13_f1, l13_f2 + l14_f1, l14_f2 + l15_f1, l15_f2 + l16_f1, l16_f2 + l17_f1, l17_f2 + l18_f1, l18_f2 + l19_f1, l19_f2 + l20_f1, l20_f2 + l21_f1, l21_f2 + l22_f1, l22_f2 + l23_f1, l23_f2 + l24_f1, l24_f2 + l25_f1, l25_f2 + l26_f1, l26_f2 + l27_f1, l27_f2 + l28_f1, l28_f2 + l29_f1, l29_f2 + l30_f1, l30_f2 + l31_f1, l31_f2 + l32_f1, l32_f2 + l33_f1, l33_f2 + l34_f1, l34_f2 + l35_f1, l35_f2 + l36_f1, l36_f2 + l37_f1, l37_f2 + l38_f1, l38_f2 + l39_f1, l39_f2 + l40_f1, l40_f2 + l41_f1, l41_f2 + l42_f1, l42_f2 + l43_f1, l43_f2 + l44_f1, l44_f2 + l45_f1, l45_f2 + l46_f1, l46_f2 + l47_f1, l47_f2 + l48_f1, l48_f2 + l49_f1, l49_f2 + l50_f1, l50_f2 + l51_f1, l51_f2 + l52_f1, l52_f2 + l53_f1, l53_f2 + l54_f1, l54_f2 + l55_f1, l55_f2 + l56_f1, l56_f2 + l57_f1, l57_f2 + l58_f1, l58_f2 + l59_f1, l59_f2 + l60_f1, l60_f2 + l61_f1, l61_f2 + l62_f1, l62_f2 + l63_f1, l63_f2 + l64_f1, l64_f2 + l65_f1, l65_f2 + l66_f1, l66_f2 + l67_f1, l67_f2 + l68_f1, l68_f2 + l69_f1, l69_f2 + l70_f1, l70_f2 + l71_f1, l71_f2 + l72_f1, l72_f2 + l73_f1, l73_f2 + l74_f1, l74_f2 + l75_f1, l75_f2 + l76_f1, l76_f2 + l77_f1, l77_f2 + l78_f1, l78_f2 + l79_f1, l79_f2 + l80_f1, l80_f2 + l81_f1, l81_f2 + l82_f1, l82_f2 + l83_f1, l83_f2 + l84_f1, l84_f2 + l85_f1, l85_f2 + l86_f1, l86_f2 + l87_f1, l87_f2 + l88_f1, l88_f2 + l89_f1, l89_f2 + l90_f1, l90_f2 + l91_f1, l91_f2 + l92_f1, l92_f2 + l93_f1, l93_f2 + l94_f1, l94_f2 + l95_f1, l95_f2 + l96_f1, l96_f2 + l97_f1, l97_f2 + l98_f1, l98_f2 + l99_f1, l99_f2 + l100_f1, l100_f2 + l101_f1, l101_f2 + l102_f1, l102_f2 + l103_f1, l103_f2 + l104_f1, l104_f2 + l105_f1, l105_f2 + l106_f1, l106_f2 + l107_f1, l107_f2 + l108_f1, l108_f2 + l109_f1, l109_f2 + l110_f1, l110_f2 + l111_f1, l111_f2 + l112_f1, l112_f2 + l113_f1, l113_f2 + l114_f1, l114_f2 + l115_f1, l115_f2 + l116_f1, l116_f2 + l117_f1, l117_f2 + l118_f1, l118_f2 + l119_f1, l119_f2 + l120_f1, l120_f2 + l121_f1, l121_f2 + l122_f1, l122_f2 + l123_f1, l123_f2 + l124_f1, l124_f2 + l125_f1, l125_f2 + l126_f1, l126_f2 + l127_f1, l127_f2 + l128_f1, l128_f2 + l129_f1, l129_f2 + l130_f1, l130_f2 + l131_f1, l131_f2 + l132_f1, l132_f2 + l133_f1, l133_f2 + l134_f1, l134_f2 + l135_f1, l135_f2 + l136_f1, l136_f2 + l137_f1, l137_f2 + l138_f1, l138_f2 + l139_f1, l139_f2 + l140_f1, l140_f2 + l141_f1 + l151_f2, l141_f2 + l142_f1, l142_f2 + l143_f1, l143_f2 + l144_f1, l144_f2 + l145_f1, l145_f2 + l146_f1, l146_f2 + l147_f1, l147_f2 + l148_f1, l148_f2 + l149_f1, l149_f2 + l150_f1, l150_f2, l151_f1, /* pass-through */ p_out1, p_out2;
nbMass = 153;
nbOut = 2;
};
process = in1 : model:*(OutGain), *(OutGain);
/*
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# Plucked string model
# Script author : James Leonard
@nlK param 0.8
@nlscale param 0.005
@pZ param 0.001
@str_M param 1
@str_K param 0.5
@str_Z param 0.001
@str_Zo param 0.00005
@str_s0 ground 0.
@str_m0 osc str_M 0 str_Zo 0. 0.
@str_m1 osc str_M 0 str_Zo 0. 0.
@str_m2 osc str_M 0 str_Zo 0. 0.
@str_m3 osc str_M 0 str_Zo 0. 0.
@str_m4 osc str_M 0 str_Zo 0. 0.
@str_m5 osc str_M 0 str_Zo 0. 0.
@str_m6 osc str_M 0 str_Zo 0. 0.
@str_m7 osc str_M 0 str_Zo 0. 0.
@str_m8 osc str_M 0 str_Zo 0. 0.
@str_m9 osc str_M 0 str_Zo 0. 0.
@str_m10 osc str_M 0 str_Zo 0. 0.
@str_m11 osc str_M 0 str_Zo 0. 0.
@str_m12 osc str_M 0 str_Zo 0. 0.
@str_m13 osc str_M 0 str_Zo 0. 0.
@str_m14 osc str_M 0 str_Zo 0. 0.
@str_m15 osc str_M 0 str_Zo 0. 0.
@str_m16 osc str_M 0 str_Zo 0. 0.
@str_m17 osc str_M 0 str_Zo 0. 0.
@str_m18 osc str_M 0 str_Zo 0. 0.
@str_m19 osc str_M 0 str_Zo 0. 0.
@str_m20 osc str_M 0 str_Zo 0. 0.
@str_m21 osc str_M 0 str_Zo 0. 0.
@str_m22 osc str_M 0 str_Zo 0. 0.
@str_m23 osc str_M 0 str_Zo 0. 0.
@str_m24 osc str_M 0 str_Zo 0. 0.
@str_m25 osc str_M 0 str_Zo 0. 0.
@str_m26 osc str_M 0 str_Zo 0. 0.
@str_m27 osc str_M 0 str_Zo 0. 0.
@str_m28 osc str_M 0 str_Zo 0. 0.
@str_m29 osc str_M 0 str_Zo 0. 0.
@str_m30 osc str_M 0 str_Zo 0. 0.
@str_m31 osc str_M 0 str_Zo 0. 0.
@str_m32 osc str_M 0 str_Zo 0. 0.
@str_m33 osc str_M 0 str_Zo 0. 0.
@str_m34 osc str_M 0 str_Zo 0. 0.
@str_m35 osc str_M 0 str_Zo 0. 0.
@str_m36 osc str_M 0 str_Zo 0. 0.
@str_m37 osc str_M 0 str_Zo 0. 0.
@str_m38 osc str_M 0 str_Zo 0. 0.
@str_m39 osc str_M 0 str_Zo 0. 0.
@str_m40 osc str_M 0 str_Zo 0. 0.
@str_m41 osc str_M 0 str_Zo 0. 0.
@str_m42 osc str_M 0 str_Zo 0. 0.
@str_m43 osc str_M 0 str_Zo 0. 0.
@str_m44 osc str_M 0 str_Zo 0. 0.
@str_m45 osc str_M 0 str_Zo 0. 0.
@str_m46 osc str_M 0 str_Zo 0. 0.
@str_m47 osc str_M 0 str_Zo 0. 0.
@str_m48 osc str_M 0 str_Zo 0. 0.
@str_m49 osc str_M 0 str_Zo 0. 0.
@str_m50 osc str_M 0 str_Zo 0. 0.
@str_m51 osc str_M 0 str_Zo 0. 0.
@str_m52 osc str_M 0 str_Zo 0. 0.
@str_m53 osc str_M 0 str_Zo 0. 0.
@str_m54 osc str_M 0 str_Zo 0. 0.
@str_m55 osc str_M 0 str_Zo 0. 0.
@str_m56 osc str_M 0 str_Zo 0. 0.
@str_m57 osc str_M 0 str_Zo 0. 0.
@str_m58 osc str_M 0 str_Zo 0. 0.
@str_m59 osc str_M 0 str_Zo 0. 0.
@str_m60 osc str_M 0 str_Zo 0. 0.
@str_m61 osc str_M 0 str_Zo 0. 0.
@str_m62 osc str_M 0 str_Zo 0. 0.
@str_m63 osc str_M 0 str_Zo 0. 0.
@str_m64 osc str_M 0 str_Zo 0. 0.
@str_m65 osc str_M 0 str_Zo 0. 0.
@str_m66 osc str_M 0 str_Zo 0. 0.
@str_m67 osc str_M 0 str_Zo 0. 0.
@str_m68 osc str_M 0 str_Zo 0. 0.
@str_m69 osc str_M 0 str_Zo 0. 0.
@str_m70 osc str_M 0 str_Zo 0. 0.
@str_m71 osc str_M 0 str_Zo 0. 0.
@str_m72 osc str_M 0 str_Zo 0. 0.
@str_m73 osc str_M 0 str_Zo 0. 0.
@str_m74 osc str_M 0 str_Zo 0. 0.
@str_m75 osc str_M 0 str_Zo 0. 0.
@str_m76 osc str_M 0 str_Zo 0. 0.
@str_m77 osc str_M 0 str_Zo 0. 0.
@str_m78 osc str_M 0 str_Zo 0. 0.
@str_m79 osc str_M 0 str_Zo 0. 0.
@str_m80 osc str_M 0 str_Zo 0. 0.
@str_m81 osc str_M 0 str_Zo 0. 0.
@str_m82 osc str_M 0 str_Zo 0. 0.
@str_m83 osc str_M 0 str_Zo 0. 0.
@str_m84 osc str_M 0 str_Zo 0. 0.
@str_m85 osc str_M 0 str_Zo 0. 0.
@str_m86 osc str_M 0 str_Zo 0. 0.
@str_m87 osc str_M 0 str_Zo 0. 0.
@str_m88 osc str_M 0 str_Zo 0. 0.
@str_m89 osc str_M 0 str_Zo 0. 0.
@str_m90 osc str_M 0 str_Zo 0. 0.
@str_m91 osc str_M 0 str_Zo 0. 0.
@str_m92 osc str_M 0 str_Zo 0. 0.
@str_m93 osc str_M 0 str_Zo 0. 0.
@str_m94 osc str_M 0 str_Zo 0. 0.
@str_m95 osc str_M 0 str_Zo 0. 0.
@str_m96 osc str_M 0 str_Zo 0. 0.
@str_m97 osc str_M 0 str_Zo 0. 0.
@str_m98 osc str_M 0 str_Zo 0. 0.
@str_m99 osc str_M 0 str_Zo 0. 0.
@str_m100 osc str_M 0 str_Zo 0. 0.
@str_m101 osc str_M 0 str_Zo 0. 0.
@str_m102 osc str_M 0 str_Zo 0. 0.
@str_m103 osc str_M 0 str_Zo 0. 0.
@str_m104 osc str_M 0 str_Zo 0. 0.
@str_m105 osc str_M 0 str_Zo 0. 0.
@str_m106 osc str_M 0 str_Zo 0. 0.
@str_m107 osc str_M 0 str_Zo 0. 0.
@str_m108 osc str_M 0 str_Zo 0. 0.
@str_m109 osc str_M 0 str_Zo 0. 0.
@str_m110 osc str_M 0 str_Zo 0. 0.
@str_m111 osc str_M 0 str_Zo 0. 0.
@str_m112 osc str_M 0 str_Zo 0. 0.
@str_m113 osc str_M 0 str_Zo 0. 0.
@str_m114 osc str_M 0 str_Zo 0. 0.
@str_m115 osc str_M 0 str_Zo 0. 0.
@str_m116 osc str_M 0 str_Zo 0. 0.
@str_m117 osc str_M 0 str_Zo 0. 0.
@str_m118 osc str_M 0 str_Zo 0. 0.
@str_m119 osc str_M 0 str_Zo 0. 0.
@str_m120 osc str_M 0 str_Zo 0. 0.
@str_m121 osc str_M 0 str_Zo 0. 0.
@str_m122 osc str_M 0 str_Zo 0. 0.
@str_m123 osc str_M 0 str_Zo 0. 0.
@str_m124 osc str_M 0 str_Zo 0. 0.
@str_m125 osc str_M 0 str_Zo 0. 0.
@str_m126 osc str_M 0 str_Zo 0. 0.
@str_m127 osc str_M 0 str_Zo 0. 0.
@str_m128 osc str_M 0 str_Zo 0. 0.
@str_m129 osc str_M 0 str_Zo 0. 0.
@str_m130 osc str_M 0 str_Zo 0. 0.
@str_m131 osc str_M 0 str_Zo 0. 0.
@str_m132 osc str_M 0 str_Zo 0. 0.
@str_m133 osc str_M 0 str_Zo 0. 0.
@str_m134 osc str_M 0 str_Zo 0. 0.
@str_m135 osc str_M 0 str_Zo 0. 0.
@str_m136 osc str_M 0 str_Zo 0. 0.
@str_m137 osc str_M 0 str_Zo 0. 0.
@str_m138 osc str_M 0 str_Zo 0. 0.
@str_m139 osc str_M 0 str_Zo 0. 0.
@str_m140 osc str_M 0 str_Zo 0. 0.
@str_m141 osc str_M 0 str_Zo 0. 0.
@str_m142 osc str_M 0 str_Zo 0. 0.
@str_m143 osc str_M 0 str_Zo 0. 0.
@str_m144 osc str_M 0 str_Zo 0. 0.
@str_m145 osc str_M 0 str_Zo 0. 0.
@str_m146 osc str_M 0 str_Zo 0. 0.
@str_m147 osc str_M 0 str_Zo 0. 0.
@str_m148 osc str_M 0 str_Zo 0. 0.
@str_m149 osc str_M 0 str_Zo 0. 0.
@str_s1 ground 0.
@str_r0 springDamper @str_s0 @str_m0 str_K str_Z
@str_r1 springDamper @str_m0 @str_m1 str_K str_Z
@str_r2 springDamper @str_m1 @str_m2 str_K str_Z
@str_r3 springDamper @str_m2 @str_m3 str_K str_Z
@str_r4 springDamper @str_m3 @str_m4 str_K str_Z
@str_r5 springDamper @str_m4 @str_m5 str_K str_Z
@str_r6 springDamper @str_m5 @str_m6 str_K str_Z
@str_r7 springDamper @str_m6 @str_m7 str_K str_Z
@str_r8 springDamper @str_m7 @str_m8 str_K str_Z
@str_r9 springDamper @str_m8 @str_m9 str_K str_Z
@str_r10 springDamper @str_m9 @str_m10 str_K str_Z
@str_r11 springDamper @str_m10 @str_m11 str_K str_Z
@str_r12 springDamper @str_m11 @str_m12 str_K str_Z
@str_r13 springDamper @str_m12 @str_m13 str_K str_Z
@str_r14 springDamper @str_m13 @str_m14 str_K str_Z
@str_r15 springDamper @str_m14 @str_m15 str_K str_Z
@str_r16 springDamper @str_m15 @str_m16 str_K str_Z
@str_r17 springDamper @str_m16 @str_m17 str_K str_Z
@str_r18 springDamper @str_m17 @str_m18 str_K str_Z
@str_r19 springDamper @str_m18 @str_m19 str_K str_Z
@str_r20 springDamper @str_m19 @str_m20 str_K str_Z
@str_r21 springDamper @str_m20 @str_m21 str_K str_Z
@str_r22 springDamper @str_m21 @str_m22 str_K str_Z
@str_r23 springDamper @str_m22 @str_m23 str_K str_Z
@str_r24 springDamper @str_m23 @str_m24 str_K str_Z
@str_r25 springDamper @str_m24 @str_m25 str_K str_Z
@str_r26 springDamper @str_m25 @str_m26 str_K str_Z
@str_r27 springDamper @str_m26 @str_m27 str_K str_Z
@str_r28 springDamper @str_m27 @str_m28 str_K str_Z
@str_r29 springDamper @str_m28 @str_m29 str_K str_Z
@str_r30 springDamper @str_m29 @str_m30 str_K str_Z
@str_r31 springDamper @str_m30 @str_m31 str_K str_Z
@str_r32 springDamper @str_m31 @str_m32 str_K str_Z
@str_r33 springDamper @str_m32 @str_m33 str_K str_Z
@str_r34 springDamper @str_m33 @str_m34 str_K str_Z
@str_r35 springDamper @str_m34 @str_m35 str_K str_Z
@str_r36 springDamper @str_m35 @str_m36 str_K str_Z
@str_r37 springDamper @str_m36 @str_m37 str_K str_Z
@str_r38 springDamper @str_m37 @str_m38 str_K str_Z
@str_r39 springDamper @str_m38 @str_m39 str_K str_Z
@str_r40 springDamper @str_m39 @str_m40 str_K str_Z
@str_r41 springDamper @str_m40 @str_m41 str_K str_Z
@str_r42 springDamper @str_m41 @str_m42 str_K str_Z
@str_r43 springDamper @str_m42 @str_m43 str_K str_Z
@str_r44 springDamper @str_m43 @str_m44 str_K str_Z
@str_r45 springDamper @str_m44 @str_m45 str_K str_Z
@str_r46 springDamper @str_m45 @str_m46 str_K str_Z
@str_r47 springDamper @str_m46 @str_m47 str_K str_Z
@str_r48 springDamper @str_m47 @str_m48 str_K str_Z
@str_r49 springDamper @str_m48 @str_m49 str_K str_Z
@str_r50 springDamper @str_m49 @str_m50 str_K str_Z
@str_r51 springDamper @str_m50 @str_m51 str_K str_Z
@str_r52 springDamper @str_m51 @str_m52 str_K str_Z
@str_r53 springDamper @str_m52 @str_m53 str_K str_Z
@str_r54 springDamper @str_m53 @str_m54 str_K str_Z
@str_r55 springDamper @str_m54 @str_m55 str_K str_Z
@str_r56 springDamper @str_m55 @str_m56 str_K str_Z
@str_r57 springDamper @str_m56 @str_m57 str_K str_Z
@str_r58 springDamper @str_m57 @str_m58 str_K str_Z
@str_r59 springDamper @str_m58 @str_m59 str_K str_Z
@str_r60 springDamper @str_m59 @str_m60 str_K str_Z
@str_r61 springDamper @str_m60 @str_m61 str_K str_Z
@str_r62 springDamper @str_m61 @str_m62 str_K str_Z
@str_r63 springDamper @str_m62 @str_m63 str_K str_Z
@str_r64 springDamper @str_m63 @str_m64 str_K str_Z
@str_r65 springDamper @str_m64 @str_m65 str_K str_Z
@str_r66 springDamper @str_m65 @str_m66 str_K str_Z
@str_r67 springDamper @str_m66 @str_m67 str_K str_Z
@str_r68 springDamper @str_m67 @str_m68 str_K str_Z
@str_r69 springDamper @str_m68 @str_m69 str_K str_Z
@str_r70 springDamper @str_m69 @str_m70 str_K str_Z
@str_r71 springDamper @str_m70 @str_m71 str_K str_Z
@str_r72 springDamper @str_m71 @str_m72 str_K str_Z
@str_r73 springDamper @str_m72 @str_m73 str_K str_Z
@str_r74 springDamper @str_m73 @str_m74 str_K str_Z
@str_r75 springDamper @str_m74 @str_m75 str_K str_Z
@str_r76 springDamper @str_m75 @str_m76 str_K str_Z
@str_r77 springDamper @str_m76 @str_m77 str_K str_Z
@str_r78 springDamper @str_m77 @str_m78 str_K str_Z
@str_r79 springDamper @str_m78 @str_m79 str_K str_Z
@str_r80 springDamper @str_m79 @str_m80 str_K str_Z
@str_r81 springDamper @str_m80 @str_m81 str_K str_Z
@str_r82 springDamper @str_m81 @str_m82 str_K str_Z
@str_r83 springDamper @str_m82 @str_m83 str_K str_Z
@str_r84 springDamper @str_m83 @str_m84 str_K str_Z
@str_r85 springDamper @str_m84 @str_m85 str_K str_Z
@str_r86 springDamper @str_m85 @str_m86 str_K str_Z
@str_r87 springDamper @str_m86 @str_m87 str_K str_Z
@str_r88 springDamper @str_m87 @str_m88 str_K str_Z
@str_r89 springDamper @str_m88 @str_m89 str_K str_Z
@str_r90 springDamper @str_m89 @str_m90 str_K str_Z
@str_r91 springDamper @str_m90 @str_m91 str_K str_Z
@str_r92 springDamper @str_m91 @str_m92 str_K str_Z
@str_r93 springDamper @str_m92 @str_m93 str_K str_Z
@str_r94 springDamper @str_m93 @str_m94 str_K str_Z
@str_r95 springDamper @str_m94 @str_m95 str_K str_Z
@str_r96 springDamper @str_m95 @str_m96 str_K str_Z
@str_r97 springDamper @str_m96 @str_m97 str_K str_Z
@str_r98 springDamper @str_m97 @str_m98 str_K str_Z
@str_r99 springDamper @str_m98 @str_m99 str_K str_Z
@str_r100 springDamper @str_m99 @str_m100 str_K str_Z
@str_r101 springDamper @str_m100 @str_m101 str_K str_Z
@str_r102 springDamper @str_m101 @str_m102 str_K str_Z
@str_r103 springDamper @str_m102 @str_m103 str_K str_Z
@str_r104 springDamper @str_m103 @str_m104 str_K str_Z
@str_r105 springDamper @str_m104 @str_m105 str_K str_Z
@str_r106 springDamper @str_m105 @str_m106 str_K str_Z
@str_r107 springDamper @str_m106 @str_m107 str_K str_Z
@str_r108 springDamper @str_m107 @str_m108 str_K str_Z
@str_r109 springDamper @str_m108 @str_m109 str_K str_Z
@str_r110 springDamper @str_m109 @str_m110 str_K str_Z
@str_r111 springDamper @str_m110 @str_m111 str_K str_Z
@str_r112 springDamper @str_m111 @str_m112 str_K str_Z
@str_r113 springDamper @str_m112 @str_m113 str_K str_Z
@str_r114 springDamper @str_m113 @str_m114 str_K str_Z
@str_r115 springDamper @str_m114 @str_m115 str_K str_Z
@str_r116 springDamper @str_m115 @str_m116 str_K str_Z
@str_r117 springDamper @str_m116 @str_m117 str_K str_Z
@str_r118 springDamper @str_m117 @str_m118 str_K str_Z
@str_r119 springDamper @str_m118 @str_m119 str_K str_Z
@str_r120 springDamper @str_m119 @str_m120 str_K str_Z
@str_r121 springDamper @str_m120 @str_m121 str_K str_Z
@str_r122 springDamper @str_m121 @str_m122 str_K str_Z
@str_r123 springDamper @str_m122 @str_m123 str_K str_Z
@str_r124 springDamper @str_m123 @str_m124 str_K str_Z
@str_r125 springDamper @str_m124 @str_m125 str_K str_Z
@str_r126 springDamper @str_m125 @str_m126 str_K str_Z
@str_r127 springDamper @str_m126 @str_m127 str_K str_Z
@str_r128 springDamper @str_m127 @str_m128 str_K str_Z
@str_r129 springDamper @str_m128 @str_m129 str_K str_Z
@str_r130 springDamper @str_m129 @str_m130 str_K str_Z
@str_r131 springDamper @str_m130 @str_m131 str_K str_Z
@str_r132 springDamper @str_m131 @str_m132 str_K str_Z
@str_r133 springDamper @str_m132 @str_m133 str_K str_Z
@str_r134 springDamper @str_m133 @str_m134 str_K str_Z
@str_r135 springDamper @str_m134 @str_m135 str_K str_Z
@str_r136 springDamper @str_m135 @str_m136 str_K str_Z
@str_r137 springDamper @str_m136 @str_m137 str_K str_Z
@str_r138 springDamper @str_m137 @str_m138 str_K str_Z
@str_r139 springDamper @str_m138 @str_m139 str_K str_Z
@str_r140 springDamper @str_m139 @str_m140 str_K str_Z
@str_r141 springDamper @str_m140 @str_m141 str_K str_Z
@str_r142 springDamper @str_m141 @str_m142 str_K str_Z
@str_r143 springDamper @str_m142 @str_m143 str_K str_Z
@str_r144 springDamper @str_m143 @str_m144 str_K str_Z
@str_r145 springDamper @str_m144 @str_m145 str_K str_Z
@str_r146 springDamper @str_m145 @str_m146 str_K str_Z
@str_r147 springDamper @str_m146 @str_m147 str_K str_Z
@str_r148 springDamper @str_m147 @str_m148 str_K str_Z
@str_r149 springDamper @str_m148 @str_m149 str_K str_Z
@str_r150 springDamper @str_m149 @str_s1 str_K str_Z
@in1 posInput 0.
@out1 posOutput @str_m20
@out2 posOutput @str_m10
@nlp0 nlPluck @in1 @str_m140 nlK nlscale pZ
*/
| https://raw.githubusercontent.com/ossia/score-user-library/8a910e05f713a6d710fe3c1b8cd3e63eee9394b0/Presets/Faust/physicalModeling/mi-faust/pluckedString.dsp | faust | ========= DESCRITPION =============
A plucked string with a few controls.
- inputs: pick position.
- outputs: two listening points on the string.
- controls: pick stiffness and damping, string stiffness, damping and air friction.
Note: the model block diagram is starting to look like a piece of modern art.
routed positions
outputs
routed forces
pass-through
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# Plucked string model
# Script author : James Leonard
@nlK param 0.8
@nlscale param 0.005
@pZ param 0.001
@str_M param 1
@str_K param 0.5
@str_Z param 0.001
@str_Zo param 0.00005
@str_s0 ground 0.
@str_m0 osc str_M 0 str_Zo 0. 0.
@str_m1 osc str_M 0 str_Zo 0. 0.
@str_m2 osc str_M 0 str_Zo 0. 0.
@str_m3 osc str_M 0 str_Zo 0. 0.
@str_m4 osc str_M 0 str_Zo 0. 0.
@str_m5 osc str_M 0 str_Zo 0. 0.
@str_m6 osc str_M 0 str_Zo 0. 0.
@str_m7 osc str_M 0 str_Zo 0. 0.
@str_m8 osc str_M 0 str_Zo 0. 0.
@str_m9 osc str_M 0 str_Zo 0. 0.
@str_m10 osc str_M 0 str_Zo 0. 0.
@str_m11 osc str_M 0 str_Zo 0. 0.
@str_m12 osc str_M 0 str_Zo 0. 0.
@str_m13 osc str_M 0 str_Zo 0. 0.
@str_m14 osc str_M 0 str_Zo 0. 0.
@str_m15 osc str_M 0 str_Zo 0. 0.
@str_m16 osc str_M 0 str_Zo 0. 0.
@str_m17 osc str_M 0 str_Zo 0. 0.
@str_m18 osc str_M 0 str_Zo 0. 0.
@str_m19 osc str_M 0 str_Zo 0. 0.
@str_m20 osc str_M 0 str_Zo 0. 0.
@str_m21 osc str_M 0 str_Zo 0. 0.
@str_m22 osc str_M 0 str_Zo 0. 0.
@str_m23 osc str_M 0 str_Zo 0. 0.
@str_m24 osc str_M 0 str_Zo 0. 0.
@str_m25 osc str_M 0 str_Zo 0. 0.
@str_m26 osc str_M 0 str_Zo 0. 0.
@str_m27 osc str_M 0 str_Zo 0. 0.
@str_m28 osc str_M 0 str_Zo 0. 0.
@str_m29 osc str_M 0 str_Zo 0. 0.
@str_m30 osc str_M 0 str_Zo 0. 0.
@str_m31 osc str_M 0 str_Zo 0. 0.
@str_m32 osc str_M 0 str_Zo 0. 0.
@str_m33 osc str_M 0 str_Zo 0. 0.
@str_m34 osc str_M 0 str_Zo 0. 0.
@str_m35 osc str_M 0 str_Zo 0. 0.
@str_m36 osc str_M 0 str_Zo 0. 0.
@str_m37 osc str_M 0 str_Zo 0. 0.
@str_m38 osc str_M 0 str_Zo 0. 0.
@str_m39 osc str_M 0 str_Zo 0. 0.
@str_m40 osc str_M 0 str_Zo 0. 0.
@str_m41 osc str_M 0 str_Zo 0. 0.
@str_m42 osc str_M 0 str_Zo 0. 0.
@str_m43 osc str_M 0 str_Zo 0. 0.
@str_m44 osc str_M 0 str_Zo 0. 0.
@str_m45 osc str_M 0 str_Zo 0. 0.
@str_m46 osc str_M 0 str_Zo 0. 0.
@str_m47 osc str_M 0 str_Zo 0. 0.
@str_m48 osc str_M 0 str_Zo 0. 0.
@str_m49 osc str_M 0 str_Zo 0. 0.
@str_m50 osc str_M 0 str_Zo 0. 0.
@str_m51 osc str_M 0 str_Zo 0. 0.
@str_m52 osc str_M 0 str_Zo 0. 0.
@str_m53 osc str_M 0 str_Zo 0. 0.
@str_m54 osc str_M 0 str_Zo 0. 0.
@str_m55 osc str_M 0 str_Zo 0. 0.
@str_m56 osc str_M 0 str_Zo 0. 0.
@str_m57 osc str_M 0 str_Zo 0. 0.
@str_m58 osc str_M 0 str_Zo 0. 0.
@str_m59 osc str_M 0 str_Zo 0. 0.
@str_m60 osc str_M 0 str_Zo 0. 0.
@str_m61 osc str_M 0 str_Zo 0. 0.
@str_m62 osc str_M 0 str_Zo 0. 0.
@str_m63 osc str_M 0 str_Zo 0. 0.
@str_m64 osc str_M 0 str_Zo 0. 0.
@str_m65 osc str_M 0 str_Zo 0. 0.
@str_m66 osc str_M 0 str_Zo 0. 0.
@str_m67 osc str_M 0 str_Zo 0. 0.
@str_m68 osc str_M 0 str_Zo 0. 0.
@str_m69 osc str_M 0 str_Zo 0. 0.
@str_m70 osc str_M 0 str_Zo 0. 0.
@str_m71 osc str_M 0 str_Zo 0. 0.
@str_m72 osc str_M 0 str_Zo 0. 0.
@str_m73 osc str_M 0 str_Zo 0. 0.
@str_m74 osc str_M 0 str_Zo 0. 0.
@str_m75 osc str_M 0 str_Zo 0. 0.
@str_m76 osc str_M 0 str_Zo 0. 0.
@str_m77 osc str_M 0 str_Zo 0. 0.
@str_m78 osc str_M 0 str_Zo 0. 0.
@str_m79 osc str_M 0 str_Zo 0. 0.
@str_m80 osc str_M 0 str_Zo 0. 0.
@str_m81 osc str_M 0 str_Zo 0. 0.
@str_m82 osc str_M 0 str_Zo 0. 0.
@str_m83 osc str_M 0 str_Zo 0. 0.
@str_m84 osc str_M 0 str_Zo 0. 0.
@str_m85 osc str_M 0 str_Zo 0. 0.
@str_m86 osc str_M 0 str_Zo 0. 0.
@str_m87 osc str_M 0 str_Zo 0. 0.
@str_m88 osc str_M 0 str_Zo 0. 0.
@str_m89 osc str_M 0 str_Zo 0. 0.
@str_m90 osc str_M 0 str_Zo 0. 0.
@str_m91 osc str_M 0 str_Zo 0. 0.
@str_m92 osc str_M 0 str_Zo 0. 0.
@str_m93 osc str_M 0 str_Zo 0. 0.
@str_m94 osc str_M 0 str_Zo 0. 0.
@str_m95 osc str_M 0 str_Zo 0. 0.
@str_m96 osc str_M 0 str_Zo 0. 0.
@str_m97 osc str_M 0 str_Zo 0. 0.
@str_m98 osc str_M 0 str_Zo 0. 0.
@str_m99 osc str_M 0 str_Zo 0. 0.
@str_m100 osc str_M 0 str_Zo 0. 0.
@str_m101 osc str_M 0 str_Zo 0. 0.
@str_m102 osc str_M 0 str_Zo 0. 0.
@str_m103 osc str_M 0 str_Zo 0. 0.
@str_m104 osc str_M 0 str_Zo 0. 0.
@str_m105 osc str_M 0 str_Zo 0. 0.
@str_m106 osc str_M 0 str_Zo 0. 0.
@str_m107 osc str_M 0 str_Zo 0. 0.
@str_m108 osc str_M 0 str_Zo 0. 0.
@str_m109 osc str_M 0 str_Zo 0. 0.
@str_m110 osc str_M 0 str_Zo 0. 0.
@str_m111 osc str_M 0 str_Zo 0. 0.
@str_m112 osc str_M 0 str_Zo 0. 0.
@str_m113 osc str_M 0 str_Zo 0. 0.
@str_m114 osc str_M 0 str_Zo 0. 0.
@str_m115 osc str_M 0 str_Zo 0. 0.
@str_m116 osc str_M 0 str_Zo 0. 0.
@str_m117 osc str_M 0 str_Zo 0. 0.
@str_m118 osc str_M 0 str_Zo 0. 0.
@str_m119 osc str_M 0 str_Zo 0. 0.
@str_m120 osc str_M 0 str_Zo 0. 0.
@str_m121 osc str_M 0 str_Zo 0. 0.
@str_m122 osc str_M 0 str_Zo 0. 0.
@str_m123 osc str_M 0 str_Zo 0. 0.
@str_m124 osc str_M 0 str_Zo 0. 0.
@str_m125 osc str_M 0 str_Zo 0. 0.
@str_m126 osc str_M 0 str_Zo 0. 0.
@str_m127 osc str_M 0 str_Zo 0. 0.
@str_m128 osc str_M 0 str_Zo 0. 0.
@str_m129 osc str_M 0 str_Zo 0. 0.
@str_m130 osc str_M 0 str_Zo 0. 0.
@str_m131 osc str_M 0 str_Zo 0. 0.
@str_m132 osc str_M 0 str_Zo 0. 0.
@str_m133 osc str_M 0 str_Zo 0. 0.
@str_m134 osc str_M 0 str_Zo 0. 0.
@str_m135 osc str_M 0 str_Zo 0. 0.
@str_m136 osc str_M 0 str_Zo 0. 0.
@str_m137 osc str_M 0 str_Zo 0. 0.
@str_m138 osc str_M 0 str_Zo 0. 0.
@str_m139 osc str_M 0 str_Zo 0. 0.
@str_m140 osc str_M 0 str_Zo 0. 0.
@str_m141 osc str_M 0 str_Zo 0. 0.
@str_m142 osc str_M 0 str_Zo 0. 0.
@str_m143 osc str_M 0 str_Zo 0. 0.
@str_m144 osc str_M 0 str_Zo 0. 0.
@str_m145 osc str_M 0 str_Zo 0. 0.
@str_m146 osc str_M 0 str_Zo 0. 0.
@str_m147 osc str_M 0 str_Zo 0. 0.
@str_m148 osc str_M 0 str_Zo 0. 0.
@str_m149 osc str_M 0 str_Zo 0. 0.
@str_s1 ground 0.
@str_r0 springDamper @str_s0 @str_m0 str_K str_Z
@str_r1 springDamper @str_m0 @str_m1 str_K str_Z
@str_r2 springDamper @str_m1 @str_m2 str_K str_Z
@str_r3 springDamper @str_m2 @str_m3 str_K str_Z
@str_r4 springDamper @str_m3 @str_m4 str_K str_Z
@str_r5 springDamper @str_m4 @str_m5 str_K str_Z
@str_r6 springDamper @str_m5 @str_m6 str_K str_Z
@str_r7 springDamper @str_m6 @str_m7 str_K str_Z
@str_r8 springDamper @str_m7 @str_m8 str_K str_Z
@str_r9 springDamper @str_m8 @str_m9 str_K str_Z
@str_r10 springDamper @str_m9 @str_m10 str_K str_Z
@str_r11 springDamper @str_m10 @str_m11 str_K str_Z
@str_r12 springDamper @str_m11 @str_m12 str_K str_Z
@str_r13 springDamper @str_m12 @str_m13 str_K str_Z
@str_r14 springDamper @str_m13 @str_m14 str_K str_Z
@str_r15 springDamper @str_m14 @str_m15 str_K str_Z
@str_r16 springDamper @str_m15 @str_m16 str_K str_Z
@str_r17 springDamper @str_m16 @str_m17 str_K str_Z
@str_r18 springDamper @str_m17 @str_m18 str_K str_Z
@str_r19 springDamper @str_m18 @str_m19 str_K str_Z
@str_r20 springDamper @str_m19 @str_m20 str_K str_Z
@str_r21 springDamper @str_m20 @str_m21 str_K str_Z
@str_r22 springDamper @str_m21 @str_m22 str_K str_Z
@str_r23 springDamper @str_m22 @str_m23 str_K str_Z
@str_r24 springDamper @str_m23 @str_m24 str_K str_Z
@str_r25 springDamper @str_m24 @str_m25 str_K str_Z
@str_r26 springDamper @str_m25 @str_m26 str_K str_Z
@str_r27 springDamper @str_m26 @str_m27 str_K str_Z
@str_r28 springDamper @str_m27 @str_m28 str_K str_Z
@str_r29 springDamper @str_m28 @str_m29 str_K str_Z
@str_r30 springDamper @str_m29 @str_m30 str_K str_Z
@str_r31 springDamper @str_m30 @str_m31 str_K str_Z
@str_r32 springDamper @str_m31 @str_m32 str_K str_Z
@str_r33 springDamper @str_m32 @str_m33 str_K str_Z
@str_r34 springDamper @str_m33 @str_m34 str_K str_Z
@str_r35 springDamper @str_m34 @str_m35 str_K str_Z
@str_r36 springDamper @str_m35 @str_m36 str_K str_Z
@str_r37 springDamper @str_m36 @str_m37 str_K str_Z
@str_r38 springDamper @str_m37 @str_m38 str_K str_Z
@str_r39 springDamper @str_m38 @str_m39 str_K str_Z
@str_r40 springDamper @str_m39 @str_m40 str_K str_Z
@str_r41 springDamper @str_m40 @str_m41 str_K str_Z
@str_r42 springDamper @str_m41 @str_m42 str_K str_Z
@str_r43 springDamper @str_m42 @str_m43 str_K str_Z
@str_r44 springDamper @str_m43 @str_m44 str_K str_Z
@str_r45 springDamper @str_m44 @str_m45 str_K str_Z
@str_r46 springDamper @str_m45 @str_m46 str_K str_Z
@str_r47 springDamper @str_m46 @str_m47 str_K str_Z
@str_r48 springDamper @str_m47 @str_m48 str_K str_Z
@str_r49 springDamper @str_m48 @str_m49 str_K str_Z
@str_r50 springDamper @str_m49 @str_m50 str_K str_Z
@str_r51 springDamper @str_m50 @str_m51 str_K str_Z
@str_r52 springDamper @str_m51 @str_m52 str_K str_Z
@str_r53 springDamper @str_m52 @str_m53 str_K str_Z
@str_r54 springDamper @str_m53 @str_m54 str_K str_Z
@str_r55 springDamper @str_m54 @str_m55 str_K str_Z
@str_r56 springDamper @str_m55 @str_m56 str_K str_Z
@str_r57 springDamper @str_m56 @str_m57 str_K str_Z
@str_r58 springDamper @str_m57 @str_m58 str_K str_Z
@str_r59 springDamper @str_m58 @str_m59 str_K str_Z
@str_r60 springDamper @str_m59 @str_m60 str_K str_Z
@str_r61 springDamper @str_m60 @str_m61 str_K str_Z
@str_r62 springDamper @str_m61 @str_m62 str_K str_Z
@str_r63 springDamper @str_m62 @str_m63 str_K str_Z
@str_r64 springDamper @str_m63 @str_m64 str_K str_Z
@str_r65 springDamper @str_m64 @str_m65 str_K str_Z
@str_r66 springDamper @str_m65 @str_m66 str_K str_Z
@str_r67 springDamper @str_m66 @str_m67 str_K str_Z
@str_r68 springDamper @str_m67 @str_m68 str_K str_Z
@str_r69 springDamper @str_m68 @str_m69 str_K str_Z
@str_r70 springDamper @str_m69 @str_m70 str_K str_Z
@str_r71 springDamper @str_m70 @str_m71 str_K str_Z
@str_r72 springDamper @str_m71 @str_m72 str_K str_Z
@str_r73 springDamper @str_m72 @str_m73 str_K str_Z
@str_r74 springDamper @str_m73 @str_m74 str_K str_Z
@str_r75 springDamper @str_m74 @str_m75 str_K str_Z
@str_r76 springDamper @str_m75 @str_m76 str_K str_Z
@str_r77 springDamper @str_m76 @str_m77 str_K str_Z
@str_r78 springDamper @str_m77 @str_m78 str_K str_Z
@str_r79 springDamper @str_m78 @str_m79 str_K str_Z
@str_r80 springDamper @str_m79 @str_m80 str_K str_Z
@str_r81 springDamper @str_m80 @str_m81 str_K str_Z
@str_r82 springDamper @str_m81 @str_m82 str_K str_Z
@str_r83 springDamper @str_m82 @str_m83 str_K str_Z
@str_r84 springDamper @str_m83 @str_m84 str_K str_Z
@str_r85 springDamper @str_m84 @str_m85 str_K str_Z
@str_r86 springDamper @str_m85 @str_m86 str_K str_Z
@str_r87 springDamper @str_m86 @str_m87 str_K str_Z
@str_r88 springDamper @str_m87 @str_m88 str_K str_Z
@str_r89 springDamper @str_m88 @str_m89 str_K str_Z
@str_r90 springDamper @str_m89 @str_m90 str_K str_Z
@str_r91 springDamper @str_m90 @str_m91 str_K str_Z
@str_r92 springDamper @str_m91 @str_m92 str_K str_Z
@str_r93 springDamper @str_m92 @str_m93 str_K str_Z
@str_r94 springDamper @str_m93 @str_m94 str_K str_Z
@str_r95 springDamper @str_m94 @str_m95 str_K str_Z
@str_r96 springDamper @str_m95 @str_m96 str_K str_Z
@str_r97 springDamper @str_m96 @str_m97 str_K str_Z
@str_r98 springDamper @str_m97 @str_m98 str_K str_Z
@str_r99 springDamper @str_m98 @str_m99 str_K str_Z
@str_r100 springDamper @str_m99 @str_m100 str_K str_Z
@str_r101 springDamper @str_m100 @str_m101 str_K str_Z
@str_r102 springDamper @str_m101 @str_m102 str_K str_Z
@str_r103 springDamper @str_m102 @str_m103 str_K str_Z
@str_r104 springDamper @str_m103 @str_m104 str_K str_Z
@str_r105 springDamper @str_m104 @str_m105 str_K str_Z
@str_r106 springDamper @str_m105 @str_m106 str_K str_Z
@str_r107 springDamper @str_m106 @str_m107 str_K str_Z
@str_r108 springDamper @str_m107 @str_m108 str_K str_Z
@str_r109 springDamper @str_m108 @str_m109 str_K str_Z
@str_r110 springDamper @str_m109 @str_m110 str_K str_Z
@str_r111 springDamper @str_m110 @str_m111 str_K str_Z
@str_r112 springDamper @str_m111 @str_m112 str_K str_Z
@str_r113 springDamper @str_m112 @str_m113 str_K str_Z
@str_r114 springDamper @str_m113 @str_m114 str_K str_Z
@str_r115 springDamper @str_m114 @str_m115 str_K str_Z
@str_r116 springDamper @str_m115 @str_m116 str_K str_Z
@str_r117 springDamper @str_m116 @str_m117 str_K str_Z
@str_r118 springDamper @str_m117 @str_m118 str_K str_Z
@str_r119 springDamper @str_m118 @str_m119 str_K str_Z
@str_r120 springDamper @str_m119 @str_m120 str_K str_Z
@str_r121 springDamper @str_m120 @str_m121 str_K str_Z
@str_r122 springDamper @str_m121 @str_m122 str_K str_Z
@str_r123 springDamper @str_m122 @str_m123 str_K str_Z
@str_r124 springDamper @str_m123 @str_m124 str_K str_Z
@str_r125 springDamper @str_m124 @str_m125 str_K str_Z
@str_r126 springDamper @str_m125 @str_m126 str_K str_Z
@str_r127 springDamper @str_m126 @str_m127 str_K str_Z
@str_r128 springDamper @str_m127 @str_m128 str_K str_Z
@str_r129 springDamper @str_m128 @str_m129 str_K str_Z
@str_r130 springDamper @str_m129 @str_m130 str_K str_Z
@str_r131 springDamper @str_m130 @str_m131 str_K str_Z
@str_r132 springDamper @str_m131 @str_m132 str_K str_Z
@str_r133 springDamper @str_m132 @str_m133 str_K str_Z
@str_r134 springDamper @str_m133 @str_m134 str_K str_Z
@str_r135 springDamper @str_m134 @str_m135 str_K str_Z
@str_r136 springDamper @str_m135 @str_m136 str_K str_Z
@str_r137 springDamper @str_m136 @str_m137 str_K str_Z
@str_r138 springDamper @str_m137 @str_m138 str_K str_Z
@str_r139 springDamper @str_m138 @str_m139 str_K str_Z
@str_r140 springDamper @str_m139 @str_m140 str_K str_Z
@str_r141 springDamper @str_m140 @str_m141 str_K str_Z
@str_r142 springDamper @str_m141 @str_m142 str_K str_Z
@str_r143 springDamper @str_m142 @str_m143 str_K str_Z
@str_r144 springDamper @str_m143 @str_m144 str_K str_Z
@str_r145 springDamper @str_m144 @str_m145 str_K str_Z
@str_r146 springDamper @str_m145 @str_m146 str_K str_Z
@str_r147 springDamper @str_m146 @str_m147 str_K str_Z
@str_r148 springDamper @str_m147 @str_m148 str_K str_Z
@str_r149 springDamper @str_m148 @str_m149 str_K str_Z
@str_r150 springDamper @str_m149 @str_s1 str_K str_Z
@in1 posInput 0.
@out1 posOutput @str_m20
@out2 posOutput @str_m10
@nlp0 nlPluck @in1 @str_m140 nlK nlscale pZ
| declare name "Plucked String";
declare author "James Leonard";
declare date "April 2020";
import("stdfaust.lib");
in1 = hslider("Pick position", 0, -1, 1, 0.001):si.smoo;
OutGain = 5;
str_M = 1.0;
str_K = hslider("string stiffness", 0.7, 0.001, 0.7, 0.001):si.smoo;
str_Z = hslider("string internal damping", 0.0009, 0.00, 0.01, 0.00001):si.smoo;
str_Zo = hslider("string air friction", 0.00005, 0.00, 0.0002, 0.00001):si.smoo;
nlK = hslider("pick stiffness", 0.5, 0., 0.8, 0.001);
nlscale = 0.05;
pZ = hslider("pick damping", 0.04, 0., 0.1, 0.001);
model = (
mi.ground(0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.oscil(str_M, 0, str_Zo, 0, 0., 0.),
mi.ground(0.),
mi.posInput(0.):
RoutingMassToLink :
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.springDamper(str_K, str_Z, 0., 0.),
mi.nlPluck(nlK, nlscale, pZ, 0., 0.),
par(i, nbOut, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
nbMass = 153;
nbOut = 2;
};
process = in1 : model:*(OutGain), *(OutGain);
|
61b86e7b3df27e86aac8ffad33a505d9a9bd7cae9ee07ca81130d2616d470477 | ossia/score-user-library | construction.dsp | declare name "Strange Physical Construction";
declare author "James Leonard";
declare date "April 2020";
/* ========= DESCRITPION =============
A triangle mesh (fixed corners) struck by a hammer, connected (through a slightly non-linear spring)
to a resonant square mesh (fixed corners).
- inputs: Force impulse applied to the hammer
- outputs: one listening point on the triangle, another on the resonnant mesh.
- controls: triangle stiffness and daming, square mesh stiffness and damping, hammer force impulse scaling.
Note: the block diagram of the model will give you nightmares.
*/
import("stdfaust.lib");
in1 = button("Force Impulse"): ba.impulsify * hslider("Force Scaling", 0.5, 0.01, 0.9, 0.001) * -1;
OutGain = 1;
t_M = 1;
t_K = hslider("Triangle Stiffness", 0.1, 0.001, 0.2, 0.0001);
t_Z = hslider("Triangle Damping", 0.0001, 0.00, 0.0008, 0.000001);
t_Zo = 0.00005;
me_M = 1;
me_K = hslider("Mesh Stiffness", 0.1, 0.001, 0.2, 0.0001);
me_Z = hslider("Mesh Damping", 0.0001, 0.00, 0.0008, 0.000001);
me_Zo = 0.00005;
model = (
mi.mass(0.3, 0, 1., 1.),
mi.ground(1.),
mi.ground(0),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.ground(0),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.ground(0),
mi.ground(0),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.ground(0),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.ground(0),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.ground(0),
par(i, nbFrcIn,_):
RoutingMassToLink ,
par(i, nbFrcIn,_):
mi.springDamper(0.0001, 0.05, 1., 1.),
mi.nlCollisionClipped(0.0, 0.01, 0.5, 0.001, 0, 0., 1.),
mi.nlSpringDamperClipped(0.01, 0.01, 0.2, 0., 0., 0.),
mi.springDamper(t_K, t_Z, 0, 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0, 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0, 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0),
mi.springDamper(me_K, me_Z, 0, 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0, 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0),
mi.springDamper(me_K, me_Z, 0, 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0, 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0),
par(i, nbOut+nbFrcIn, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
RoutingMassToLink(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29, m30, m31, m32, m33, m34, m35, m36, m37, m38, m39, m40, m41, m42, m43, m44, m45, m46, m47, m48, m49, m50, m51, m52, m53, m54, m55, m56, m57, m58, m59, m60, m61, m62, m63, m64, m65, m66, m67, m68, m69, m70, m71, m72, m73, m74, m75, m76, m77, m78, m79, m80, m81, m82, m83, m84, m85, m86, m87, m88, m89, m90, m91, m92, m93, m94, m95, m96, m97, m98, m99, m100, m101, m102, m103, m104, m105, m106, m107, m108, m109, m110, m111, m112, m113, m114, m115, m116, m117, m118, m119, m120, m121, m122, m123, m124, m125, m126, m127, m128, m129, m130, m131, m132, m133, m134, m135, m136, m137, m138, m139, m140, m141, m142, m143, m144, m145, m146, m147, m148, m149, m150, m151, m152, m153, m154, m155, m156) = /* routed positions */ m1, m0, m39, m0, m49, m94, m2, m3, m3, m4, m4, m5, m5, m6, m6, m7, m7, m8, m8, m9, m9, m10, m10, m11, m12, m13, m13, m14, m14, m15, m15, m16, m16, m17, m17, m18, m18, m19, m19, m20, m21, m22, m22, m23, m23, m24, m24, m25, m25, m26, m26, m27, m27, m28, m29, m30, m30, m31, m31, m32, m32, m33, m33, m34, m34, m35, m36, m37, m37, m38, m38, m39, m39, m40, m40, m41, m42, m43, m43, m44, m44, m45, m45, m46, m47, m48, m48, m49, m49, m50, m51, m52, m52, m53, m54, m55, m2, m12, m3, m13, m4, m14, m5, m15, m6, m16, m7, m17, m8, m18, m9, m19, m10, m20, m12, m21, m13, m22, m14, m23, m15, m24, m16, m25, m17, m26, m18, m27, m19, m28, m21, m29, m22, m30, m23, m31, m24, m32, m25, m33, m26, m34, m27, m35, m29, m36, m30, m37, m31, m38, m32, m39, m33, m40, m34, m41, m36, m42, m37, m43, m38, m44, m39, m45, m40, m46, m42, m47, m43, m48, m44, m49, m45, m50, m47, m51, m48, m52, m49, m53, m51, m54, m52, m55, m54, m56, m3, m12, m4, m13, m5, m14, m6, m15, m7, m16, m8, m17, m9, m18, m10, m19, m11, m20, m13, m21, m14, m22, m15, m23, m16, m24, m17, m25, m18, m26, m19, m27, m20, m28, m22, m29, m23, m30, m24, m31, m25, m32, m26, m33, m27, m34, m28, m35, m30, m36, m31, m37, m32, m38, m33, m39, m34, m40, m35, m41, m37, m42, m38, m43, m39, m44, m40, m45, m41, m46, m43, m47, m44, m48, m45, m49, m46, m50, m48, m51, m49, m52, m50, m53, m52, m54, m53, m55, m55, m56, m57, m58, m58, m59, m59, m60, m60, m61, m61, m62, m62, m63, m63, m64, m64, m65, m65, m66, m67, m68, m68, m69, m69, m70, m70, m71, m71, m72, m72, m73, m73, m74, m74, m75, m75, m76, m77, m78, m78, m79, m79, m80, m80, m81, m81, m82, m82, m83, m83, m84, m84, m85, m85, m86, m87, m88, m88, m89, m89, m90, m90, m91, m91, m92, m92, m93, m93, m94, m94, m95, m95, m96, m97, m98, m98, m99, m99, m100, m100, m101, m101, m102, m102, m103, m103, m104, m104, m105, m105, m106, m107, m108, m108, m109, m109, m110, m110, m111, m111, m112, m112, m113, m113, m114, m114, m115, m115, m116, m117, m118, m118, m119, m119, m120, m120, m121, m121, m122, m122, m123, m123, m124, m124, m125, m125, m126, m127, m128, m128, m129, m129, m130, m130, m131, m131, m132, m132, m133, m133, m134, m134, m135, m135, m136, m137, m138, m138, m139, m139, m140, m140, m141, m141, m142, m142, m143, m143, m144, m144, m145, m145, m146, m147, m148, m148, m149, m149, m150, m150, m151, m151, m152, m152, m153, m153, m154, m154, m155, m155, m156, m57, m67, m58, m68, m59, m69, m60, m70, m61, m71, m62, m72, m63, m73, m64, m74, m65, m75, m66, m76, m67, m77, m68, m78, m69, m79, m70, m80, m71, m81, m72, m82, m73, m83, m74, m84, m75, m85, m76, m86, m77, m87, m78, m88, m79, m89, m80, m90, m81, m91, m82, m92, m83, m93, m84, m94, m85, m95, m86, m96, m87, m97, m88, m98, m89, m99, m90, m100, m91, m101, m92, m102, m93, m103, m94, m104, m95, m105, m96, m106, m97, m107, m98, m108, m99, m109, m100, m110, m101, m111, m102, m112, m103, m113, m104, m114, m105, m115, m106, m116, m107, m117, m108, m118, m109, m119, m110, m120, m111, m121, m112, m122, m113, m123, m114, m124, m115, m125, m116, m126, m117, m127, m118, m128, m119, m129, m120, m130, m121, m131, m122, m132, m123, m133, m124, m134, m125, m135, m126, m136, m127, m137, m128, m138, m129, m139, m130, m140, m131, m141, m132, m142, m133, m143, m134, m144, m135, m145, m136, m146, m137, m147, m138, m148, m139, m149, m140, m150, m141, m151, m142, m152, m143, m153, m144, m154, m145, m155, m146, m156, /* outputs */ m112, m22;
RoutingLinkToMass(l0_f1, l0_f2, l1_f1, l1_f2, l2_f1, l2_f2, l3_f1, l3_f2, l4_f1, l4_f2, l5_f1, l5_f2, l6_f1, l6_f2, l7_f1, l7_f2, l8_f1, l8_f2, l9_f1, l9_f2, l10_f1, l10_f2, l11_f1, l11_f2, l12_f1, l12_f2, l13_f1, l13_f2, l14_f1, l14_f2, l15_f1, l15_f2, l16_f1, l16_f2, l17_f1, l17_f2, l18_f1, l18_f2, l19_f1, l19_f2, l20_f1, l20_f2, l21_f1, l21_f2, l22_f1, l22_f2, l23_f1, l23_f2, l24_f1, l24_f2, l25_f1, l25_f2, l26_f1, l26_f2, l27_f1, l27_f2, l28_f1, l28_f2, l29_f1, l29_f2, l30_f1, l30_f2, l31_f1, l31_f2, l32_f1, l32_f2, l33_f1, l33_f2, l34_f1, l34_f2, l35_f1, l35_f2, l36_f1, l36_f2, l37_f1, l37_f2, l38_f1, l38_f2, l39_f1, l39_f2, l40_f1, l40_f2, l41_f1, l41_f2, l42_f1, l42_f2, l43_f1, l43_f2, l44_f1, l44_f2, l45_f1, l45_f2, l46_f1, l46_f2, l47_f1, l47_f2, l48_f1, l48_f2, l49_f1, l49_f2, l50_f1, l50_f2, l51_f1, l51_f2, l52_f1, l52_f2, l53_f1, l53_f2, l54_f1, l54_f2, l55_f1, l55_f2, l56_f1, l56_f2, l57_f1, l57_f2, l58_f1, l58_f2, l59_f1, l59_f2, l60_f1, l60_f2, l61_f1, l61_f2, l62_f1, l62_f2, l63_f1, l63_f2, l64_f1, l64_f2, l65_f1, l65_f2, l66_f1, l66_f2, l67_f1, l67_f2, l68_f1, l68_f2, l69_f1, l69_f2, l70_f1, l70_f2, l71_f1, l71_f2, l72_f1, l72_f2, l73_f1, l73_f2, l74_f1, l74_f2, l75_f1, l75_f2, l76_f1, l76_f2, l77_f1, l77_f2, l78_f1, l78_f2, l79_f1, l79_f2, l80_f1, l80_f2, l81_f1, l81_f2, l82_f1, l82_f2, l83_f1, l83_f2, l84_f1, l84_f2, l85_f1, l85_f2, l86_f1, l86_f2, l87_f1, l87_f2, l88_f1, l88_f2, l89_f1, l89_f2, l90_f1, l90_f2, l91_f1, l91_f2, l92_f1, l92_f2, l93_f1, l93_f2, l94_f1, l94_f2, l95_f1, l95_f2, l96_f1, l96_f2, l97_f1, l97_f2, l98_f1, l98_f2, l99_f1, l99_f2, l100_f1, l100_f2, l101_f1, l101_f2, l102_f1, l102_f2, l103_f1, l103_f2, l104_f1, l104_f2, l105_f1, l105_f2, l106_f1, l106_f2, l107_f1, l107_f2, l108_f1, l108_f2, l109_f1, l109_f2, l110_f1, l110_f2, l111_f1, l111_f2, l112_f1, l112_f2, l113_f1, l113_f2, l114_f1, l114_f2, l115_f1, l115_f2, l116_f1, l116_f2, l117_f1, l117_f2, l118_f1, l118_f2, l119_f1, l119_f2, l120_f1, l120_f2, l121_f1, l121_f2, l122_f1, l122_f2, l123_f1, l123_f2, l124_f1, l124_f2, l125_f1, l125_f2, l126_f1, l126_f2, l127_f1, l127_f2, l128_f1, l128_f2, l129_f1, l129_f2, l130_f1, l130_f2, l131_f1, l131_f2, l132_f1, l132_f2, l133_f1, l133_f2, l134_f1, l134_f2, l135_f1, l135_f2, l136_f1, l136_f2, l137_f1, l137_f2, l138_f1, l138_f2, l139_f1, l139_f2, l140_f1, l140_f2, l141_f1, l141_f2, l142_f1, l142_f2, l143_f1, l143_f2, l144_f1, l144_f2, l145_f1, l145_f2, l146_f1, l146_f2, l147_f1, l147_f2, l148_f1, l148_f2, l149_f1, l149_f2, l150_f1, l150_f2, l151_f1, l151_f2, l152_f1, l152_f2, l153_f1, l153_f2, l154_f1, l154_f2, l155_f1, l155_f2, l156_f1, l156_f2, l157_f1, l157_f2, l158_f1, l158_f2, l159_f1, l159_f2, l160_f1, l160_f2, l161_f1, l161_f2, l162_f1, l162_f2, l163_f1, l163_f2, l164_f1, l164_f2, l165_f1, l165_f2, l166_f1, l166_f2, l167_f1, l167_f2, l168_f1, l168_f2, l169_f1, l169_f2, l170_f1, l170_f2, l171_f1, l171_f2, l172_f1, l172_f2, l173_f1, l173_f2, l174_f1, l174_f2, l175_f1, l175_f2, l176_f1, l176_f2, l177_f1, l177_f2, l178_f1, l178_f2, l179_f1, l179_f2, l180_f1, l180_f2, l181_f1, l181_f2, l182_f1, l182_f2, l183_f1, l183_f2, l184_f1, l184_f2, l185_f1, l185_f2, l186_f1, l186_f2, l187_f1, l187_f2, l188_f1, l188_f2, l189_f1, l189_f2, l190_f1, l190_f2, l191_f1, l191_f2, l192_f1, l192_f2, l193_f1, l193_f2, l194_f1, l194_f2, l195_f1, l195_f2, l196_f1, l196_f2, l197_f1, l197_f2, l198_f1, l198_f2, l199_f1, l199_f2, l200_f1, l200_f2, l201_f1, l201_f2, l202_f1, l202_f2, l203_f1, l203_f2, l204_f1, l204_f2, l205_f1, l205_f2, l206_f1, l206_f2, l207_f1, l207_f2, l208_f1, l208_f2, l209_f1, l209_f2, l210_f1, l210_f2, l211_f1, l211_f2, l212_f1, l212_f2, l213_f1, l213_f2, l214_f1, l214_f2, l215_f1, l215_f2, l216_f1, l216_f2, l217_f1, l217_f2, l218_f1, l218_f2, l219_f1, l219_f2, l220_f1, l220_f2, l221_f1, l221_f2, l222_f1, l222_f2, l223_f1, l223_f2, l224_f1, l224_f2, l225_f1, l225_f2, l226_f1, l226_f2, l227_f1, l227_f2, l228_f1, l228_f2, l229_f1, l229_f2, l230_f1, l230_f2, l231_f1, l231_f2, l232_f1, l232_f2, l233_f1, l233_f2, l234_f1, l234_f2, l235_f1, l235_f2, l236_f1, l236_f2, l237_f1, l237_f2, l238_f1, l238_f2, l239_f1, l239_f2, l240_f1, l240_f2, l241_f1, l241_f2, l242_f1, l242_f2, l243_f1, l243_f2, l244_f1, l244_f2, l245_f1, l245_f2, l246_f1, l246_f2, l247_f1, l247_f2, l248_f1, l248_f2, l249_f1, l249_f2, l250_f1, l250_f2, l251_f1, l251_f2, l252_f1, l252_f2, l253_f1, l253_f2, l254_f1, l254_f2, l255_f1, l255_f2, l256_f1, l256_f2, l257_f1, l257_f2, l258_f1, l258_f2, l259_f1, l259_f2, l260_f1, l260_f2, l261_f1, l261_f2, l262_f1, l262_f2, l263_f1, l263_f2, l264_f1, l264_f2, l265_f1, l265_f2, l266_f1, l266_f2, l267_f1, l267_f2, l268_f1, l268_f2, l269_f1, l269_f2, l270_f1, l270_f2, l271_f1, l271_f2, l272_f1, l272_f2, l273_f1, l273_f2, l274_f1, l274_f2, l275_f1, l275_f2, l276_f1, l276_f2, l277_f1, l277_f2, l278_f1, l278_f2, l279_f1, l279_f2, l280_f1, l280_f2, l281_f1, l281_f2, l282_f1, l282_f2, l283_f1, l283_f2, l284_f1, l284_f2, l285_f1, l285_f2, l286_f1, l286_f2, l287_f1, l287_f2, l288_f1, l288_f2, l289_f1, l289_f2, l290_f1, l290_f2, l291_f1, l291_f2, l292_f1, l292_f2, l293_f1, l293_f2, l294_f1, l294_f2, l295_f1, l295_f2, l296_f1, l296_f2, l297_f1, l297_f2, l298_f1, l298_f2, l299_f1, l299_f2, l300_f1, l300_f2, l301_f1, l301_f2, l302_f1, l302_f2, l303_f1, l303_f2, l304_f1, l304_f2, l305_f1, l305_f2, l306_f1, l306_f2, l307_f1, l307_f2, l308_f1, l308_f2, l309_f1, l309_f2, l310_f1, l310_f2, l311_f1, l311_f2, l312_f1, l312_f2, l313_f1, l313_f2, l314_f1, l314_f2, l315_f1, l315_f2, l316_f1, l316_f2, l317_f1, l317_f2, p_out1, p_out2, f_in1) = /* routed forces */ f_in1 + l0_f2 + l1_f2, l0_f1, l3_f1 + l48_f1, l3_f2 + l4_f1 + l49_f1 + l93_f1, l4_f2 + l5_f1 + l50_f1 + l94_f1, l5_f2 + l6_f1 + l51_f1 + l95_f1, l6_f2 + l7_f1 + l52_f1 + l96_f1, l7_f2 + l8_f1 + l53_f1 + l97_f1, l8_f2 + l9_f1 + l54_f1 + l98_f1, l9_f2 + l10_f1 + l55_f1 + l99_f1, l10_f2 + l11_f1 + l56_f1 + l100_f1, l11_f2 + l101_f1, l12_f1 + l48_f2 + l57_f1 + l93_f2, l12_f2 + l13_f1 + l49_f2 + l58_f1 + l94_f2 + l102_f1, l13_f2 + l14_f1 + l50_f2 + l59_f1 + l95_f2 + l103_f1, l14_f2 + l15_f1 + l51_f2 + l60_f1 + l96_f2 + l104_f1, l15_f2 + l16_f1 + l52_f2 + l61_f1 + l97_f2 + l105_f1, l16_f2 + l17_f1 + l53_f2 + l62_f1 + l98_f2 + l106_f1, l17_f2 + l18_f1 + l54_f2 + l63_f1 + l99_f2 + l107_f1, l18_f2 + l19_f1 + l55_f2 + l64_f1 + l100_f2 + l108_f1, l19_f2 + l56_f2 + l101_f2 + l109_f1, l20_f1 + l57_f2 + l65_f1 + l102_f2, l20_f2 + l21_f1 + l58_f2 + l66_f1 + l103_f2 + l110_f1, l21_f2 + l22_f1 + l59_f2 + l67_f1 + l104_f2 + l111_f1, l22_f2 + l23_f1 + l60_f2 + l68_f1 + l105_f2 + l112_f1, l23_f2 + l24_f1 + l61_f2 + l69_f1 + l106_f2 + l113_f1, l24_f2 + l25_f1 + l62_f2 + l70_f1 + l107_f2 + l114_f1, l25_f2 + l26_f1 + l63_f2 + l71_f1 + l108_f2 + l115_f1, l26_f2 + l64_f2 + l109_f2 + l116_f1, l27_f1 + l65_f2 + l72_f1 + l110_f2, l27_f2 + l28_f1 + l66_f2 + l73_f1 + l111_f2 + l117_f1, l28_f2 + l29_f1 + l67_f2 + l74_f1 + l112_f2 + l118_f1, l29_f2 + l30_f1 + l68_f2 + l75_f1 + l113_f2 + l119_f1, l30_f2 + l31_f1 + l69_f2 + l76_f1 + l114_f2 + l120_f1, l31_f2 + l32_f1 + l70_f2 + l77_f1 + l115_f2 + l121_f1, l32_f2 + l71_f2 + l116_f2 + l122_f1, l33_f1 + l72_f2 + l78_f1 + l117_f2, l33_f2 + l34_f1 + l73_f2 + l79_f1 + l118_f2 + l123_f1, l34_f2 + l35_f1 + l74_f2 + l80_f1 + l119_f2 + l124_f1, l1_f1 + l35_f2 + l36_f1 + l75_f2 + l81_f1 + l120_f2 + l125_f1, l36_f2 + l37_f1 + l76_f2 + l82_f1 + l121_f2 + l126_f1, l37_f2 + l77_f2 + l122_f2 + l127_f1, l38_f1 + l78_f2 + l83_f1 + l123_f2, l38_f2 + l39_f1 + l79_f2 + l84_f1 + l124_f2 + l128_f1, l39_f2 + l40_f1 + l80_f2 + l85_f1 + l125_f2 + l129_f1, l40_f2 + l41_f1 + l81_f2 + l86_f1 + l126_f2 + l130_f1, l41_f2 + l82_f2 + l127_f2 + l131_f1, l42_f1 + l83_f2 + l87_f1 + l128_f2, l42_f2 + l43_f1 + l84_f2 + l88_f1 + l129_f2 + l132_f1, l2_f1 + l43_f2 + l44_f1 + l85_f2 + l89_f1 + l130_f2 + l133_f1, l44_f2 + l86_f2 + l131_f2 + l134_f1, l45_f1 + l87_f2 + l90_f1 + l132_f2, l45_f2 + l46_f1 + l88_f2 + l91_f1 + l133_f2 + l135_f1, l46_f2 + l89_f2 + l134_f2 + l136_f1, l47_f1 + l90_f2 + l92_f1 + l135_f2, l47_f2 + l91_f2 + l136_f2 + l137_f1, l92_f2 + l137_f2, l138_f1 + l228_f1, l138_f2 + l139_f1 + l229_f1, l139_f2 + l140_f1 + l230_f1, l140_f2 + l141_f1 + l231_f1, l141_f2 + l142_f1 + l232_f1, l142_f2 + l143_f1 + l233_f1, l143_f2 + l144_f1 + l234_f1, l144_f2 + l145_f1 + l235_f1, l145_f2 + l146_f1 + l236_f1, l146_f2 + l237_f1, l147_f1 + l228_f2 + l238_f1, l147_f2 + l148_f1 + l229_f2 + l239_f1, l148_f2 + l149_f1 + l230_f2 + l240_f1, l149_f2 + l150_f1 + l231_f2 + l241_f1, l150_f2 + l151_f1 + l232_f2 + l242_f1, l151_f2 + l152_f1 + l233_f2 + l243_f1, l152_f2 + l153_f1 + l234_f2 + l244_f1, l153_f2 + l154_f1 + l235_f2 + l245_f1, l154_f2 + l155_f1 + l236_f2 + l246_f1, l155_f2 + l237_f2 + l247_f1, l156_f1 + l238_f2 + l248_f1, l156_f2 + l157_f1 + l239_f2 + l249_f1, l157_f2 + l158_f1 + l240_f2 + l250_f1, l158_f2 + l159_f1 + l241_f2 + l251_f1, l159_f2 + l160_f1 + l242_f2 + l252_f1, l160_f2 + l161_f1 + l243_f2 + l253_f1, l161_f2 + l162_f1 + l244_f2 + l254_f1, l162_f2 + l163_f1 + l245_f2 + l255_f1, l163_f2 + l164_f1 + l246_f2 + l256_f1, l164_f2 + l247_f2 + l257_f1, l165_f1 + l248_f2 + l258_f1, l165_f2 + l166_f1 + l249_f2 + l259_f1, l166_f2 + l167_f1 + l250_f2 + l260_f1, l167_f2 + l168_f1 + l251_f2 + l261_f1, l168_f2 + l169_f1 + l252_f2 + l262_f1, l169_f2 + l170_f1 + l253_f2 + l263_f1, l170_f2 + l171_f1 + l254_f2 + l264_f1, l2_f2 + l171_f2 + l172_f1 + l255_f2 + l265_f1, l172_f2 + l173_f1 + l256_f2 + l266_f1, l173_f2 + l257_f2 + l267_f1, l174_f1 + l258_f2 + l268_f1, l174_f2 + l175_f1 + l259_f2 + l269_f1, l175_f2 + l176_f1 + l260_f2 + l270_f1, l176_f2 + l177_f1 + l261_f2 + l271_f1, l177_f2 + l178_f1 + l262_f2 + l272_f1, l178_f2 + l179_f1 + l263_f2 + l273_f1, l179_f2 + l180_f1 + l264_f2 + l274_f1, l180_f2 + l181_f1 + l265_f2 + l275_f1, l181_f2 + l182_f1 + l266_f2 + l276_f1, l182_f2 + l267_f2 + l277_f1, l183_f1 + l268_f2 + l278_f1, l183_f2 + l184_f1 + l269_f2 + l279_f1, l184_f2 + l185_f1 + l270_f2 + l280_f1, l185_f2 + l186_f1 + l271_f2 + l281_f1, l186_f2 + l187_f1 + l272_f2 + l282_f1, l187_f2 + l188_f1 + l273_f2 + l283_f1, l188_f2 + l189_f1 + l274_f2 + l284_f1, l189_f2 + l190_f1 + l275_f2 + l285_f1, l190_f2 + l191_f1 + l276_f2 + l286_f1, l191_f2 + l277_f2 + l287_f1, l192_f1 + l278_f2 + l288_f1, l192_f2 + l193_f1 + l279_f2 + l289_f1, l193_f2 + l194_f1 + l280_f2 + l290_f1, l194_f2 + l195_f1 + l281_f2 + l291_f1, l195_f2 + l196_f1 + l282_f2 + l292_f1, l196_f2 + l197_f1 + l283_f2 + l293_f1, l197_f2 + l198_f1 + l284_f2 + l294_f1, l198_f2 + l199_f1 + l285_f2 + l295_f1, l199_f2 + l200_f1 + l286_f2 + l296_f1, l200_f2 + l287_f2 + l297_f1, l201_f1 + l288_f2 + l298_f1, l201_f2 + l202_f1 + l289_f2 + l299_f1, l202_f2 + l203_f1 + l290_f2 + l300_f1, l203_f2 + l204_f1 + l291_f2 + l301_f1, l204_f2 + l205_f1 + l292_f2 + l302_f1, l205_f2 + l206_f1 + l293_f2 + l303_f1, l206_f2 + l207_f1 + l294_f2 + l304_f1, l207_f2 + l208_f1 + l295_f2 + l305_f1, l208_f2 + l209_f1 + l296_f2 + l306_f1, l209_f2 + l297_f2 + l307_f1, l210_f1 + l298_f2 + l308_f1, l210_f2 + l211_f1 + l299_f2 + l309_f1, l211_f2 + l212_f1 + l300_f2 + l310_f1, l212_f2 + l213_f1 + l301_f2 + l311_f1, l213_f2 + l214_f1 + l302_f2 + l312_f1, l214_f2 + l215_f1 + l303_f2 + l313_f1, l215_f2 + l216_f1 + l304_f2 + l314_f1, l216_f2 + l217_f1 + l305_f2 + l315_f1, l217_f2 + l218_f1 + l306_f2 + l316_f1, l218_f2 + l307_f2 + l317_f1, l219_f1 + l308_f2, l219_f2 + l220_f1 + l309_f2, l220_f2 + l221_f1 + l310_f2, l221_f2 + l222_f1 + l311_f2, l222_f2 + l223_f1 + l312_f2, l223_f2 + l224_f1 + l313_f2, l224_f2 + l225_f1 + l314_f2, l225_f2 + l226_f1 + l315_f2, l226_f2 + l227_f1 + l316_f2, l227_f2 + l317_f2, /* pass-through */ p_out1, p_out2;
nbMass = 157;
nbFrcIn = 1;
nbOut = 2;
};
process = in1 : model:*(OutGain), *(OutGain);
/*
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# A plucked triangular mesh model (fixed at corners)
# Script author: James Leonard
# A slow moving oscillator placed above the other
# serving as a hammer
@ham mass 0.3 1. 0.
@g ground 1.
@sp springDamper @g @ham 0.0001 0.05
# Add force input to the hammer
@in1 frcInput @ham
@c nlContact @t_m4_3 @ham 0. 0.01 0.5 0.001
@nls nlSpringDamper @t_m6_2 @me_m3_7 0.01 0.01 0.2 0.
@t_M param 1
@t_K param 0.1
@t_Z param 0.001
@t_Zo param 0.00005
@t_m0_0 ground 0
@t_m0_1 osc t_M 0 t_Zo 0. 0.
@t_m0_2 osc t_M 0 t_Zo 0. 0.
@t_m0_3 osc t_M 0 t_Zo 0. 0.
@t_m0_4 osc t_M 0 t_Zo 0. 0.
@t_m0_5 osc t_M 0 t_Zo 0. 0.
@t_m0_6 osc t_M 0 t_Zo 0. 0.
@t_m0_7 osc t_M 0 t_Zo 0. 0.
@t_m0_8 osc t_M 0 t_Zo 0. 0.
@t_m0_9 ground 0
@t_m1_0 osc t_M 0 t_Zo 0. 0.
@t_m1_1 osc t_M 0 t_Zo 0. 0.
@t_m1_2 osc t_M 0 t_Zo 0. 0.
@t_m1_3 osc t_M 0 t_Zo 0. 0.
@t_m1_4 osc t_M 0 t_Zo 0. 0.
@t_m1_5 osc t_M 0 t_Zo 0. 0.
@t_m1_6 osc t_M 0 t_Zo 0. 0.
@t_m1_7 osc t_M 0 t_Zo 0. 0.
@t_m1_8 osc t_M 0 t_Zo 0. 0.
@t_m2_0 osc t_M 0 t_Zo 0. 0.
@t_m2_1 osc t_M 0 t_Zo 0. 0.
@t_m2_2 osc t_M 0 t_Zo 0. 0.
@t_m2_3 osc t_M 0 t_Zo 0. 0.
@t_m2_4 osc t_M 0 t_Zo 0. 0.
@t_m2_5 osc t_M 0 t_Zo 0. 0.
@t_m2_6 osc t_M 0 t_Zo 0. 0.
@t_m2_7 osc t_M 0 t_Zo 0. 0.
@t_m3_0 osc t_M 0 t_Zo 0. 0.
@t_m3_1 osc t_M 0 t_Zo 0. 0.
@t_m3_2 osc t_M 0 t_Zo 0. 0.
@t_m3_3 osc t_M 0 t_Zo 0. 0.
@t_m3_4 osc t_M 0 t_Zo 0. 0.
@t_m3_5 osc t_M 0 t_Zo 0. 0.
@t_m3_6 osc t_M 0 t_Zo 0. 0.
@t_m4_0 osc t_M 0 t_Zo 0. 0.
@t_m4_1 osc t_M 0 t_Zo 0. 0.
@t_m4_2 osc t_M 0 t_Zo 0. 0.
@t_m4_3 osc t_M 0 t_Zo 0. 0.
@t_m4_4 osc t_M 0 t_Zo 0. 0.
@t_m4_5 osc t_M 0 t_Zo 0. 0.
@t_m5_0 osc t_M 0 t_Zo 0. 0.
@t_m5_1 osc t_M 0 t_Zo 0. 0.
@t_m5_2 osc t_M 0 t_Zo 0. 0.
@t_m5_3 osc t_M 0 t_Zo 0. 0.
@t_m5_4 osc t_M 0 t_Zo 0. 0.
@t_m6_0 osc t_M 0 t_Zo 0. 0.
@t_m6_1 osc t_M 0 t_Zo 0. 0.
@t_m6_2 osc t_M 0 t_Zo 0. 0.
@t_m6_3 osc t_M 0 t_Zo 0. 0.
@t_m7_0 osc t_M 0 t_Zo 0. 0.
@t_m7_1 osc t_M 0 t_Zo 0. 0.
@t_m7_2 osc t_M 0 t_Zo 0. 0.
@t_m8_0 osc t_M 0 t_Zo 0. 0.
@t_m8_1 osc t_M 0 t_Zo 0. 0.
@t_m9_0 ground 0
@t_r0 springDamper @t_m0_0 @t_m0_1 t_K t_Z
@t_r1 springDamper @t_m0_1 @t_m0_2 t_K t_Z
@t_r2 springDamper @t_m0_2 @t_m0_3 t_K t_Z
@t_r3 springDamper @t_m0_3 @t_m0_4 t_K t_Z
@t_r4 springDamper @t_m0_4 @t_m0_5 t_K t_Z
@t_r5 springDamper @t_m0_5 @t_m0_6 t_K t_Z
@t_r6 springDamper @t_m0_6 @t_m0_7 t_K t_Z
@t_r7 springDamper @t_m0_7 @t_m0_8 t_K t_Z
@t_r8 springDamper @t_m0_8 @t_m0_9 t_K t_Z
@t_r9 springDamper @t_m1_0 @t_m1_1 t_K t_Z
@t_r10 springDamper @t_m1_1 @t_m1_2 t_K t_Z
@t_r11 springDamper @t_m1_2 @t_m1_3 t_K t_Z
@t_r12 springDamper @t_m1_3 @t_m1_4 t_K t_Z
@t_r13 springDamper @t_m1_4 @t_m1_5 t_K t_Z
@t_r14 springDamper @t_m1_5 @t_m1_6 t_K t_Z
@t_r15 springDamper @t_m1_6 @t_m1_7 t_K t_Z
@t_r16 springDamper @t_m1_7 @t_m1_8 t_K t_Z
@t_r17 springDamper @t_m2_0 @t_m2_1 t_K t_Z
@t_r18 springDamper @t_m2_1 @t_m2_2 t_K t_Z
@t_r19 springDamper @t_m2_2 @t_m2_3 t_K t_Z
@t_r20 springDamper @t_m2_3 @t_m2_4 t_K t_Z
@t_r21 springDamper @t_m2_4 @t_m2_5 t_K t_Z
@t_r22 springDamper @t_m2_5 @t_m2_6 t_K t_Z
@t_r23 springDamper @t_m2_6 @t_m2_7 t_K t_Z
@t_r24 springDamper @t_m3_0 @t_m3_1 t_K t_Z
@t_r25 springDamper @t_m3_1 @t_m3_2 t_K t_Z
@t_r26 springDamper @t_m3_2 @t_m3_3 t_K t_Z
@t_r27 springDamper @t_m3_3 @t_m3_4 t_K t_Z
@t_r28 springDamper @t_m3_4 @t_m3_5 t_K t_Z
@t_r29 springDamper @t_m3_5 @t_m3_6 t_K t_Z
@t_r30 springDamper @t_m4_0 @t_m4_1 t_K t_Z
@t_r31 springDamper @t_m4_1 @t_m4_2 t_K t_Z
@t_r32 springDamper @t_m4_2 @t_m4_3 t_K t_Z
@t_r33 springDamper @t_m4_3 @t_m4_4 t_K t_Z
@t_r34 springDamper @t_m4_4 @t_m4_5 t_K t_Z
@t_r35 springDamper @t_m5_0 @t_m5_1 t_K t_Z
@t_r36 springDamper @t_m5_1 @t_m5_2 t_K t_Z
@t_r37 springDamper @t_m5_2 @t_m5_3 t_K t_Z
@t_r38 springDamper @t_m5_3 @t_m5_4 t_K t_Z
@t_r39 springDamper @t_m6_0 @t_m6_1 t_K t_Z
@t_r40 springDamper @t_m6_1 @t_m6_2 t_K t_Z
@t_r41 springDamper @t_m6_2 @t_m6_3 t_K t_Z
@t_r42 springDamper @t_m7_0 @t_m7_1 t_K t_Z
@t_r43 springDamper @t_m7_1 @t_m7_2 t_K t_Z
@t_r44 springDamper @t_m8_0 @t_m8_1 t_K t_Z
@t_r45 springDamper @t_m0_0 @t_m1_0 t_K t_Z
@t_r46 springDamper @t_m0_1 @t_m1_1 t_K t_Z
@t_r47 springDamper @t_m0_2 @t_m1_2 t_K t_Z
@t_r48 springDamper @t_m0_3 @t_m1_3 t_K t_Z
@t_r49 springDamper @t_m0_4 @t_m1_4 t_K t_Z
@t_r50 springDamper @t_m0_5 @t_m1_5 t_K t_Z
@t_r51 springDamper @t_m0_6 @t_m1_6 t_K t_Z
@t_r52 springDamper @t_m0_7 @t_m1_7 t_K t_Z
@t_r53 springDamper @t_m0_8 @t_m1_8 t_K t_Z
@t_r54 springDamper @t_m1_0 @t_m2_0 t_K t_Z
@t_r55 springDamper @t_m1_1 @t_m2_1 t_K t_Z
@t_r56 springDamper @t_m1_2 @t_m2_2 t_K t_Z
@t_r57 springDamper @t_m1_3 @t_m2_3 t_K t_Z
@t_r58 springDamper @t_m1_4 @t_m2_4 t_K t_Z
@t_r59 springDamper @t_m1_5 @t_m2_5 t_K t_Z
@t_r60 springDamper @t_m1_6 @t_m2_6 t_K t_Z
@t_r61 springDamper @t_m1_7 @t_m2_7 t_K t_Z
@t_r62 springDamper @t_m2_0 @t_m3_0 t_K t_Z
@t_r63 springDamper @t_m2_1 @t_m3_1 t_K t_Z
@t_r64 springDamper @t_m2_2 @t_m3_2 t_K t_Z
@t_r65 springDamper @t_m2_3 @t_m3_3 t_K t_Z
@t_r66 springDamper @t_m2_4 @t_m3_4 t_K t_Z
@t_r67 springDamper @t_m2_5 @t_m3_5 t_K t_Z
@t_r68 springDamper @t_m2_6 @t_m3_6 t_K t_Z
@t_r69 springDamper @t_m3_0 @t_m4_0 t_K t_Z
@t_r70 springDamper @t_m3_1 @t_m4_1 t_K t_Z
@t_r71 springDamper @t_m3_2 @t_m4_2 t_K t_Z
@t_r72 springDamper @t_m3_3 @t_m4_3 t_K t_Z
@t_r73 springDamper @t_m3_4 @t_m4_4 t_K t_Z
@t_r74 springDamper @t_m3_5 @t_m4_5 t_K t_Z
@t_r75 springDamper @t_m4_0 @t_m5_0 t_K t_Z
@t_r76 springDamper @t_m4_1 @t_m5_1 t_K t_Z
@t_r77 springDamper @t_m4_2 @t_m5_2 t_K t_Z
@t_r78 springDamper @t_m4_3 @t_m5_3 t_K t_Z
@t_r79 springDamper @t_m4_4 @t_m5_4 t_K t_Z
@t_r80 springDamper @t_m5_0 @t_m6_0 t_K t_Z
@t_r81 springDamper @t_m5_1 @t_m6_1 t_K t_Z
@t_r82 springDamper @t_m5_2 @t_m6_2 t_K t_Z
@t_r83 springDamper @t_m5_3 @t_m6_3 t_K t_Z
@t_r84 springDamper @t_m6_0 @t_m7_0 t_K t_Z
@t_r85 springDamper @t_m6_1 @t_m7_1 t_K t_Z
@t_r86 springDamper @t_m6_2 @t_m7_2 t_K t_Z
@t_r87 springDamper @t_m7_0 @t_m8_0 t_K t_Z
@t_r88 springDamper @t_m7_1 @t_m8_1 t_K t_Z
@t_r89 springDamper @t_m8_0 @t_m9_0 t_K t_Z
@t_r90 springDamper @t_m0_1 @t_m1_0 t_K t_Z
@t_r91 springDamper @t_m0_2 @t_m1_1 t_K t_Z
@t_r92 springDamper @t_m0_3 @t_m1_2 t_K t_Z
@t_r93 springDamper @t_m0_4 @t_m1_3 t_K t_Z
@t_r94 springDamper @t_m0_5 @t_m1_4 t_K t_Z
@t_r95 springDamper @t_m0_6 @t_m1_5 t_K t_Z
@t_r96 springDamper @t_m0_7 @t_m1_6 t_K t_Z
@t_r97 springDamper @t_m0_8 @t_m1_7 t_K t_Z
@t_r98 springDamper @t_m0_9 @t_m1_8 t_K t_Z
@t_r99 springDamper @t_m1_1 @t_m2_0 t_K t_Z
@t_r100 springDamper @t_m1_2 @t_m2_1 t_K t_Z
@t_r101 springDamper @t_m1_3 @t_m2_2 t_K t_Z
@t_r102 springDamper @t_m1_4 @t_m2_3 t_K t_Z
@t_r103 springDamper @t_m1_5 @t_m2_4 t_K t_Z
@t_r104 springDamper @t_m1_6 @t_m2_5 t_K t_Z
@t_r105 springDamper @t_m1_7 @t_m2_6 t_K t_Z
@t_r106 springDamper @t_m1_8 @t_m2_7 t_K t_Z
@t_r107 springDamper @t_m2_1 @t_m3_0 t_K t_Z
@t_r108 springDamper @t_m2_2 @t_m3_1 t_K t_Z
@t_r109 springDamper @t_m2_3 @t_m3_2 t_K t_Z
@t_r110 springDamper @t_m2_4 @t_m3_3 t_K t_Z
@t_r111 springDamper @t_m2_5 @t_m3_4 t_K t_Z
@t_r112 springDamper @t_m2_6 @t_m3_5 t_K t_Z
@t_r113 springDamper @t_m2_7 @t_m3_6 t_K t_Z
@t_r114 springDamper @t_m3_1 @t_m4_0 t_K t_Z
@t_r115 springDamper @t_m3_2 @t_m4_1 t_K t_Z
@t_r116 springDamper @t_m3_3 @t_m4_2 t_K t_Z
@t_r117 springDamper @t_m3_4 @t_m4_3 t_K t_Z
@t_r118 springDamper @t_m3_5 @t_m4_4 t_K t_Z
@t_r119 springDamper @t_m3_6 @t_m4_5 t_K t_Z
@t_r120 springDamper @t_m4_1 @t_m5_0 t_K t_Z
@t_r121 springDamper @t_m4_2 @t_m5_1 t_K t_Z
@t_r122 springDamper @t_m4_3 @t_m5_2 t_K t_Z
@t_r123 springDamper @t_m4_4 @t_m5_3 t_K t_Z
@t_r124 springDamper @t_m4_5 @t_m5_4 t_K t_Z
@t_r125 springDamper @t_m5_1 @t_m6_0 t_K t_Z
@t_r126 springDamper @t_m5_2 @t_m6_1 t_K t_Z
@t_r127 springDamper @t_m5_3 @t_m6_2 t_K t_Z
@t_r128 springDamper @t_m5_4 @t_m6_3 t_K t_Z
@t_r129 springDamper @t_m6_1 @t_m7_0 t_K t_Z
@t_r130 springDamper @t_m6_2 @t_m7_1 t_K t_Z
@t_r131 springDamper @t_m6_3 @t_m7_2 t_K t_Z
@t_r132 springDamper @t_m7_1 @t_m8_0 t_K t_Z
@t_r133 springDamper @t_m7_2 @t_m8_1 t_K t_Z
@t_r134 springDamper @t_m8_1 @t_m9_0 t_K t_Z
@me_M param 1
@me_K param 0.1
@me_Z param 0.001
@me_Zo param 0.00005
@me_m0_0 ground 0
@me_m0_1 osc me_M 0 me_Zo 0. 0.
@me_m0_2 osc me_M 0 me_Zo 0. 0.
@me_m0_3 osc me_M 0 me_Zo 0. 0.
@me_m0_4 osc me_M 0 me_Zo 0. 0.
@me_m0_5 osc me_M 0 me_Zo 0. 0.
@me_m0_6 osc me_M 0 me_Zo 0. 0.
@me_m0_7 osc me_M 0 me_Zo 0. 0.
@me_m0_8 osc me_M 0 me_Zo 0. 0.
@me_m0_9 ground 0
@me_m1_0 osc me_M 0 me_Zo 0. 0.
@me_m1_1 osc me_M 0 me_Zo 0. 0.
@me_m1_2 osc me_M 0 me_Zo 0. 0.
@me_m1_3 osc me_M 0 me_Zo 0. 0.
@me_m1_4 osc me_M 0 me_Zo 0. 0.
@me_m1_5 osc me_M 0 me_Zo 0. 0.
@me_m1_6 osc me_M 0 me_Zo 0. 0.
@me_m1_7 osc me_M 0 me_Zo 0. 0.
@me_m1_8 osc me_M 0 me_Zo 0. 0.
@me_m1_9 osc me_M 0 me_Zo 0. 0.
@me_m2_0 osc me_M 0 me_Zo 0. 0.
@me_m2_1 osc me_M 0 me_Zo 0. 0.
@me_m2_2 osc me_M 0 me_Zo 0. 0.
@me_m2_3 osc me_M 0 me_Zo 0. 0.
@me_m2_4 osc me_M 0 me_Zo 0. 0.
@me_m2_5 osc me_M 0 me_Zo 0. 0.
@me_m2_6 osc me_M 0 me_Zo 0. 0.
@me_m2_7 osc me_M 0 me_Zo 0. 0.
@me_m2_8 osc me_M 0 me_Zo 0. 0.
@me_m2_9 osc me_M 0 me_Zo 0. 0.
@me_m3_0 osc me_M 0 me_Zo 0. 0.
@me_m3_1 osc me_M 0 me_Zo 0. 0.
@me_m3_2 osc me_M 0 me_Zo 0. 0.
@me_m3_3 osc me_M 0 me_Zo 0. 0.
@me_m3_4 osc me_M 0 me_Zo 0. 0.
@me_m3_5 osc me_M 0 me_Zo 0. 0.
@me_m3_6 osc me_M 0 me_Zo 0. 0.
@me_m3_7 osc me_M 0 me_Zo 0. 0.
@me_m3_8 osc me_M 0 me_Zo 0. 0.
@me_m3_9 osc me_M 0 me_Zo 0. 0.
@me_m4_0 osc me_M 0 me_Zo 0. 0.
@me_m4_1 osc me_M 0 me_Zo 0. 0.
@me_m4_2 osc me_M 0 me_Zo 0. 0.
@me_m4_3 osc me_M 0 me_Zo 0. 0.
@me_m4_4 osc me_M 0 me_Zo 0. 0.
@me_m4_5 osc me_M 0 me_Zo 0. 0.
@me_m4_6 osc me_M 0 me_Zo 0. 0.
@me_m4_7 osc me_M 0 me_Zo 0. 0.
@me_m4_8 osc me_M 0 me_Zo 0. 0.
@me_m4_9 osc me_M 0 me_Zo 0. 0.
@me_m5_0 osc me_M 0 me_Zo 0. 0.
@me_m5_1 osc me_M 0 me_Zo 0. 0.
@me_m5_2 osc me_M 0 me_Zo 0. 0.
@me_m5_3 osc me_M 0 me_Zo 0. 0.
@me_m5_4 osc me_M 0 me_Zo 0. 0.
@me_m5_5 osc me_M 0 me_Zo 0. 0.
@me_m5_6 osc me_M 0 me_Zo 0. 0.
@me_m5_7 osc me_M 0 me_Zo 0. 0.
@me_m5_8 osc me_M 0 me_Zo 0. 0.
@me_m5_9 osc me_M 0 me_Zo 0. 0.
@me_m6_0 osc me_M 0 me_Zo 0. 0.
@me_m6_1 osc me_M 0 me_Zo 0. 0.
@me_m6_2 osc me_M 0 me_Zo 0. 0.
@me_m6_3 osc me_M 0 me_Zo 0. 0.
@me_m6_4 osc me_M 0 me_Zo 0. 0.
@me_m6_5 osc me_M 0 me_Zo 0. 0.
@me_m6_6 osc me_M 0 me_Zo 0. 0.
@me_m6_7 osc me_M 0 me_Zo 0. 0.
@me_m6_8 osc me_M 0 me_Zo 0. 0.
@me_m6_9 osc me_M 0 me_Zo 0. 0.
@me_m7_0 osc me_M 0 me_Zo 0. 0.
@me_m7_1 osc me_M 0 me_Zo 0. 0.
@me_m7_2 osc me_M 0 me_Zo 0. 0.
@me_m7_3 osc me_M 0 me_Zo 0. 0.
@me_m7_4 osc me_M 0 me_Zo 0. 0.
@me_m7_5 osc me_M 0 me_Zo 0. 0.
@me_m7_6 osc me_M 0 me_Zo 0. 0.
@me_m7_7 osc me_M 0 me_Zo 0. 0.
@me_m7_8 osc me_M 0 me_Zo 0. 0.
@me_m7_9 osc me_M 0 me_Zo 0. 0.
@me_m8_0 osc me_M 0 me_Zo 0. 0.
@me_m8_1 osc me_M 0 me_Zo 0. 0.
@me_m8_2 osc me_M 0 me_Zo 0. 0.
@me_m8_3 osc me_M 0 me_Zo 0. 0.
@me_m8_4 osc me_M 0 me_Zo 0. 0.
@me_m8_5 osc me_M 0 me_Zo 0. 0.
@me_m8_6 osc me_M 0 me_Zo 0. 0.
@me_m8_7 osc me_M 0 me_Zo 0. 0.
@me_m8_8 osc me_M 0 me_Zo 0. 0.
@me_m8_9 osc me_M 0 me_Zo 0. 0.
@me_m9_0 ground 0
@me_m9_1 osc me_M 0 me_Zo 0. 0.
@me_m9_2 osc me_M 0 me_Zo 0. 0.
@me_m9_3 osc me_M 0 me_Zo 0. 0.
@me_m9_4 osc me_M 0 me_Zo 0. 0.
@me_m9_5 osc me_M 0 me_Zo 0. 0.
@me_m9_6 osc me_M 0 me_Zo 0. 0.
@me_m9_7 osc me_M 0 me_Zo 0. 0.
@me_m9_8 osc me_M 0 me_Zo 0. 0.
@me_m9_9 ground 0
@me_r0 springDamper @me_m0_0 @me_m0_1 me_K me_Z
@me_r1 springDamper @me_m0_1 @me_m0_2 me_K me_Z
@me_r2 springDamper @me_m0_2 @me_m0_3 me_K me_Z
@me_r3 springDamper @me_m0_3 @me_m0_4 me_K me_Z
@me_r4 springDamper @me_m0_4 @me_m0_5 me_K me_Z
@me_r5 springDamper @me_m0_5 @me_m0_6 me_K me_Z
@me_r6 springDamper @me_m0_6 @me_m0_7 me_K me_Z
@me_r7 springDamper @me_m0_7 @me_m0_8 me_K me_Z
@me_r8 springDamper @me_m0_8 @me_m0_9 me_K me_Z
@me_r9 springDamper @me_m1_0 @me_m1_1 me_K me_Z
@me_r10 springDamper @me_m1_1 @me_m1_2 me_K me_Z
@me_r11 springDamper @me_m1_2 @me_m1_3 me_K me_Z
@me_r12 springDamper @me_m1_3 @me_m1_4 me_K me_Z
@me_r13 springDamper @me_m1_4 @me_m1_5 me_K me_Z
@me_r14 springDamper @me_m1_5 @me_m1_6 me_K me_Z
@me_r15 springDamper @me_m1_6 @me_m1_7 me_K me_Z
@me_r16 springDamper @me_m1_7 @me_m1_8 me_K me_Z
@me_r17 springDamper @me_m1_8 @me_m1_9 me_K me_Z
@me_r18 springDamper @me_m2_0 @me_m2_1 me_K me_Z
@me_r19 springDamper @me_m2_1 @me_m2_2 me_K me_Z
@me_r20 springDamper @me_m2_2 @me_m2_3 me_K me_Z
@me_r21 springDamper @me_m2_3 @me_m2_4 me_K me_Z
@me_r22 springDamper @me_m2_4 @me_m2_5 me_K me_Z
@me_r23 springDamper @me_m2_5 @me_m2_6 me_K me_Z
@me_r24 springDamper @me_m2_6 @me_m2_7 me_K me_Z
@me_r25 springDamper @me_m2_7 @me_m2_8 me_K me_Z
@me_r26 springDamper @me_m2_8 @me_m2_9 me_K me_Z
@me_r27 springDamper @me_m3_0 @me_m3_1 me_K me_Z
@me_r28 springDamper @me_m3_1 @me_m3_2 me_K me_Z
@me_r29 springDamper @me_m3_2 @me_m3_3 me_K me_Z
@me_r30 springDamper @me_m3_3 @me_m3_4 me_K me_Z
@me_r31 springDamper @me_m3_4 @me_m3_5 me_K me_Z
@me_r32 springDamper @me_m3_5 @me_m3_6 me_K me_Z
@me_r33 springDamper @me_m3_6 @me_m3_7 me_K me_Z
@me_r34 springDamper @me_m3_7 @me_m3_8 me_K me_Z
@me_r35 springDamper @me_m3_8 @me_m3_9 me_K me_Z
@me_r36 springDamper @me_m4_0 @me_m4_1 me_K me_Z
@me_r37 springDamper @me_m4_1 @me_m4_2 me_K me_Z
@me_r38 springDamper @me_m4_2 @me_m4_3 me_K me_Z
@me_r39 springDamper @me_m4_3 @me_m4_4 me_K me_Z
@me_r40 springDamper @me_m4_4 @me_m4_5 me_K me_Z
@me_r41 springDamper @me_m4_5 @me_m4_6 me_K me_Z
@me_r42 springDamper @me_m4_6 @me_m4_7 me_K me_Z
@me_r43 springDamper @me_m4_7 @me_m4_8 me_K me_Z
@me_r44 springDamper @me_m4_8 @me_m4_9 me_K me_Z
@me_r45 springDamper @me_m5_0 @me_m5_1 me_K me_Z
@me_r46 springDamper @me_m5_1 @me_m5_2 me_K me_Z
@me_r47 springDamper @me_m5_2 @me_m5_3 me_K me_Z
@me_r48 springDamper @me_m5_3 @me_m5_4 me_K me_Z
@me_r49 springDamper @me_m5_4 @me_m5_5 me_K me_Z
@me_r50 springDamper @me_m5_5 @me_m5_6 me_K me_Z
@me_r51 springDamper @me_m5_6 @me_m5_7 me_K me_Z
@me_r52 springDamper @me_m5_7 @me_m5_8 me_K me_Z
@me_r53 springDamper @me_m5_8 @me_m5_9 me_K me_Z
@me_r54 springDamper @me_m6_0 @me_m6_1 me_K me_Z
@me_r55 springDamper @me_m6_1 @me_m6_2 me_K me_Z
@me_r56 springDamper @me_m6_2 @me_m6_3 me_K me_Z
@me_r57 springDamper @me_m6_3 @me_m6_4 me_K me_Z
@me_r58 springDamper @me_m6_4 @me_m6_5 me_K me_Z
@me_r59 springDamper @me_m6_5 @me_m6_6 me_K me_Z
@me_r60 springDamper @me_m6_6 @me_m6_7 me_K me_Z
@me_r61 springDamper @me_m6_7 @me_m6_8 me_K me_Z
@me_r62 springDamper @me_m6_8 @me_m6_9 me_K me_Z
@me_r63 springDamper @me_m7_0 @me_m7_1 me_K me_Z
@me_r64 springDamper @me_m7_1 @me_m7_2 me_K me_Z
@me_r65 springDamper @me_m7_2 @me_m7_3 me_K me_Z
@me_r66 springDamper @me_m7_3 @me_m7_4 me_K me_Z
@me_r67 springDamper @me_m7_4 @me_m7_5 me_K me_Z
@me_r68 springDamper @me_m7_5 @me_m7_6 me_K me_Z
@me_r69 springDamper @me_m7_6 @me_m7_7 me_K me_Z
@me_r70 springDamper @me_m7_7 @me_m7_8 me_K me_Z
@me_r71 springDamper @me_m7_8 @me_m7_9 me_K me_Z
@me_r72 springDamper @me_m8_0 @me_m8_1 me_K me_Z
@me_r73 springDamper @me_m8_1 @me_m8_2 me_K me_Z
@me_r74 springDamper @me_m8_2 @me_m8_3 me_K me_Z
@me_r75 springDamper @me_m8_3 @me_m8_4 me_K me_Z
@me_r76 springDamper @me_m8_4 @me_m8_5 me_K me_Z
@me_r77 springDamper @me_m8_5 @me_m8_6 me_K me_Z
@me_r78 springDamper @me_m8_6 @me_m8_7 me_K me_Z
@me_r79 springDamper @me_m8_7 @me_m8_8 me_K me_Z
@me_r80 springDamper @me_m8_8 @me_m8_9 me_K me_Z
@me_r81 springDamper @me_m9_0 @me_m9_1 me_K me_Z
@me_r82 springDamper @me_m9_1 @me_m9_2 me_K me_Z
@me_r83 springDamper @me_m9_2 @me_m9_3 me_K me_Z
@me_r84 springDamper @me_m9_3 @me_m9_4 me_K me_Z
@me_r85 springDamper @me_m9_4 @me_m9_5 me_K me_Z
@me_r86 springDamper @me_m9_5 @me_m9_6 me_K me_Z
@me_r87 springDamper @me_m9_6 @me_m9_7 me_K me_Z
@me_r88 springDamper @me_m9_7 @me_m9_8 me_K me_Z
@me_r89 springDamper @me_m9_8 @me_m9_9 me_K me_Z
@me_r90 springDamper @me_m0_0 @me_m1_0 me_K me_Z
@me_r91 springDamper @me_m0_1 @me_m1_1 me_K me_Z
@me_r92 springDamper @me_m0_2 @me_m1_2 me_K me_Z
@me_r93 springDamper @me_m0_3 @me_m1_3 me_K me_Z
@me_r94 springDamper @me_m0_4 @me_m1_4 me_K me_Z
@me_r95 springDamper @me_m0_5 @me_m1_5 me_K me_Z
@me_r96 springDamper @me_m0_6 @me_m1_6 me_K me_Z
@me_r97 springDamper @me_m0_7 @me_m1_7 me_K me_Z
@me_r98 springDamper @me_m0_8 @me_m1_8 me_K me_Z
@me_r99 springDamper @me_m0_9 @me_m1_9 me_K me_Z
@me_r100 springDamper @me_m1_0 @me_m2_0 me_K me_Z
@me_r101 springDamper @me_m1_1 @me_m2_1 me_K me_Z
@me_r102 springDamper @me_m1_2 @me_m2_2 me_K me_Z
@me_r103 springDamper @me_m1_3 @me_m2_3 me_K me_Z
@me_r104 springDamper @me_m1_4 @me_m2_4 me_K me_Z
@me_r105 springDamper @me_m1_5 @me_m2_5 me_K me_Z
@me_r106 springDamper @me_m1_6 @me_m2_6 me_K me_Z
@me_r107 springDamper @me_m1_7 @me_m2_7 me_K me_Z
@me_r108 springDamper @me_m1_8 @me_m2_8 me_K me_Z
@me_r109 springDamper @me_m1_9 @me_m2_9 me_K me_Z
@me_r110 springDamper @me_m2_0 @me_m3_0 me_K me_Z
@me_r111 springDamper @me_m2_1 @me_m3_1 me_K me_Z
@me_r112 springDamper @me_m2_2 @me_m3_2 me_K me_Z
@me_r113 springDamper @me_m2_3 @me_m3_3 me_K me_Z
@me_r114 springDamper @me_m2_4 @me_m3_4 me_K me_Z
@me_r115 springDamper @me_m2_5 @me_m3_5 me_K me_Z
@me_r116 springDamper @me_m2_6 @me_m3_6 me_K me_Z
@me_r117 springDamper @me_m2_7 @me_m3_7 me_K me_Z
@me_r118 springDamper @me_m2_8 @me_m3_8 me_K me_Z
@me_r119 springDamper @me_m2_9 @me_m3_9 me_K me_Z
@me_r120 springDamper @me_m3_0 @me_m4_0 me_K me_Z
@me_r121 springDamper @me_m3_1 @me_m4_1 me_K me_Z
@me_r122 springDamper @me_m3_2 @me_m4_2 me_K me_Z
@me_r123 springDamper @me_m3_3 @me_m4_3 me_K me_Z
@me_r124 springDamper @me_m3_4 @me_m4_4 me_K me_Z
@me_r125 springDamper @me_m3_5 @me_m4_5 me_K me_Z
@me_r126 springDamper @me_m3_6 @me_m4_6 me_K me_Z
@me_r127 springDamper @me_m3_7 @me_m4_7 me_K me_Z
@me_r128 springDamper @me_m3_8 @me_m4_8 me_K me_Z
@me_r129 springDamper @me_m3_9 @me_m4_9 me_K me_Z
@me_r130 springDamper @me_m4_0 @me_m5_0 me_K me_Z
@me_r131 springDamper @me_m4_1 @me_m5_1 me_K me_Z
@me_r132 springDamper @me_m4_2 @me_m5_2 me_K me_Z
@me_r133 springDamper @me_m4_3 @me_m5_3 me_K me_Z
@me_r134 springDamper @me_m4_4 @me_m5_4 me_K me_Z
@me_r135 springDamper @me_m4_5 @me_m5_5 me_K me_Z
@me_r136 springDamper @me_m4_6 @me_m5_6 me_K me_Z
@me_r137 springDamper @me_m4_7 @me_m5_7 me_K me_Z
@me_r138 springDamper @me_m4_8 @me_m5_8 me_K me_Z
@me_r139 springDamper @me_m4_9 @me_m5_9 me_K me_Z
@me_r140 springDamper @me_m5_0 @me_m6_0 me_K me_Z
@me_r141 springDamper @me_m5_1 @me_m6_1 me_K me_Z
@me_r142 springDamper @me_m5_2 @me_m6_2 me_K me_Z
@me_r143 springDamper @me_m5_3 @me_m6_3 me_K me_Z
@me_r144 springDamper @me_m5_4 @me_m6_4 me_K me_Z
@me_r145 springDamper @me_m5_5 @me_m6_5 me_K me_Z
@me_r146 springDamper @me_m5_6 @me_m6_6 me_K me_Z
@me_r147 springDamper @me_m5_7 @me_m6_7 me_K me_Z
@me_r148 springDamper @me_m5_8 @me_m6_8 me_K me_Z
@me_r149 springDamper @me_m5_9 @me_m6_9 me_K me_Z
@me_r150 springDamper @me_m6_0 @me_m7_0 me_K me_Z
@me_r151 springDamper @me_m6_1 @me_m7_1 me_K me_Z
@me_r152 springDamper @me_m6_2 @me_m7_2 me_K me_Z
@me_r153 springDamper @me_m6_3 @me_m7_3 me_K me_Z
@me_r154 springDamper @me_m6_4 @me_m7_4 me_K me_Z
@me_r155 springDamper @me_m6_5 @me_m7_5 me_K me_Z
@me_r156 springDamper @me_m6_6 @me_m7_6 me_K me_Z
@me_r157 springDamper @me_m6_7 @me_m7_7 me_K me_Z
@me_r158 springDamper @me_m6_8 @me_m7_8 me_K me_Z
@me_r159 springDamper @me_m6_9 @me_m7_9 me_K me_Z
@me_r160 springDamper @me_m7_0 @me_m8_0 me_K me_Z
@me_r161 springDamper @me_m7_1 @me_m8_1 me_K me_Z
@me_r162 springDamper @me_m7_2 @me_m8_2 me_K me_Z
@me_r163 springDamper @me_m7_3 @me_m8_3 me_K me_Z
@me_r164 springDamper @me_m7_4 @me_m8_4 me_K me_Z
@me_r165 springDamper @me_m7_5 @me_m8_5 me_K me_Z
@me_r166 springDamper @me_m7_6 @me_m8_6 me_K me_Z
@me_r167 springDamper @me_m7_7 @me_m8_7 me_K me_Z
@me_r168 springDamper @me_m7_8 @me_m8_8 me_K me_Z
@me_r169 springDamper @me_m7_9 @me_m8_9 me_K me_Z
@me_r170 springDamper @me_m8_0 @me_m9_0 me_K me_Z
@me_r171 springDamper @me_m8_1 @me_m9_1 me_K me_Z
@me_r172 springDamper @me_m8_2 @me_m9_2 me_K me_Z
@me_r173 springDamper @me_m8_3 @me_m9_3 me_K me_Z
@me_r174 springDamper @me_m8_4 @me_m9_4 me_K me_Z
@me_r175 springDamper @me_m8_5 @me_m9_5 me_K me_Z
@me_r176 springDamper @me_m8_6 @me_m9_6 me_K me_Z
@me_r177 springDamper @me_m8_7 @me_m9_7 me_K me_Z
@me_r178 springDamper @me_m8_8 @me_m9_8 me_K me_Z
@me_r179 springDamper @me_m8_9 @me_m9_9 me_K me_Z
@out1 posOutput @me_m5_5
@out2 posOutput @t_m2_1
*/ | https://raw.githubusercontent.com/ossia/score-user-library/8a910e05f713a6d710fe3c1b8cd3e63eee9394b0/Presets/Faust/physicalModeling/mi-faust/construction.dsp | faust | ========= DESCRITPION =============
A triangle mesh (fixed corners) struck by a hammer, connected (through a slightly non-linear spring)
to a resonant square mesh (fixed corners).
- inputs: Force impulse applied to the hammer
- outputs: one listening point on the triangle, another on the resonnant mesh.
- controls: triangle stiffness and daming, square mesh stiffness and damping, hammer force impulse scaling.
Note: the block diagram of the model will give you nightmares.
routed positions
outputs
routed forces
pass-through
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# A plucked triangular mesh model (fixed at corners)
# Script author: James Leonard
# A slow moving oscillator placed above the other
# serving as a hammer
@ham mass 0.3 1. 0.
@g ground 1.
@sp springDamper @g @ham 0.0001 0.05
# Add force input to the hammer
@in1 frcInput @ham
@c nlContact @t_m4_3 @ham 0. 0.01 0.5 0.001
@nls nlSpringDamper @t_m6_2 @me_m3_7 0.01 0.01 0.2 0.
@t_M param 1
@t_K param 0.1
@t_Z param 0.001
@t_Zo param 0.00005
@t_m0_0 ground 0
@t_m0_1 osc t_M 0 t_Zo 0. 0.
@t_m0_2 osc t_M 0 t_Zo 0. 0.
@t_m0_3 osc t_M 0 t_Zo 0. 0.
@t_m0_4 osc t_M 0 t_Zo 0. 0.
@t_m0_5 osc t_M 0 t_Zo 0. 0.
@t_m0_6 osc t_M 0 t_Zo 0. 0.
@t_m0_7 osc t_M 0 t_Zo 0. 0.
@t_m0_8 osc t_M 0 t_Zo 0. 0.
@t_m0_9 ground 0
@t_m1_0 osc t_M 0 t_Zo 0. 0.
@t_m1_1 osc t_M 0 t_Zo 0. 0.
@t_m1_2 osc t_M 0 t_Zo 0. 0.
@t_m1_3 osc t_M 0 t_Zo 0. 0.
@t_m1_4 osc t_M 0 t_Zo 0. 0.
@t_m1_5 osc t_M 0 t_Zo 0. 0.
@t_m1_6 osc t_M 0 t_Zo 0. 0.
@t_m1_7 osc t_M 0 t_Zo 0. 0.
@t_m1_8 osc t_M 0 t_Zo 0. 0.
@t_m2_0 osc t_M 0 t_Zo 0. 0.
@t_m2_1 osc t_M 0 t_Zo 0. 0.
@t_m2_2 osc t_M 0 t_Zo 0. 0.
@t_m2_3 osc t_M 0 t_Zo 0. 0.
@t_m2_4 osc t_M 0 t_Zo 0. 0.
@t_m2_5 osc t_M 0 t_Zo 0. 0.
@t_m2_6 osc t_M 0 t_Zo 0. 0.
@t_m2_7 osc t_M 0 t_Zo 0. 0.
@t_m3_0 osc t_M 0 t_Zo 0. 0.
@t_m3_1 osc t_M 0 t_Zo 0. 0.
@t_m3_2 osc t_M 0 t_Zo 0. 0.
@t_m3_3 osc t_M 0 t_Zo 0. 0.
@t_m3_4 osc t_M 0 t_Zo 0. 0.
@t_m3_5 osc t_M 0 t_Zo 0. 0.
@t_m3_6 osc t_M 0 t_Zo 0. 0.
@t_m4_0 osc t_M 0 t_Zo 0. 0.
@t_m4_1 osc t_M 0 t_Zo 0. 0.
@t_m4_2 osc t_M 0 t_Zo 0. 0.
@t_m4_3 osc t_M 0 t_Zo 0. 0.
@t_m4_4 osc t_M 0 t_Zo 0. 0.
@t_m4_5 osc t_M 0 t_Zo 0. 0.
@t_m5_0 osc t_M 0 t_Zo 0. 0.
@t_m5_1 osc t_M 0 t_Zo 0. 0.
@t_m5_2 osc t_M 0 t_Zo 0. 0.
@t_m5_3 osc t_M 0 t_Zo 0. 0.
@t_m5_4 osc t_M 0 t_Zo 0. 0.
@t_m6_0 osc t_M 0 t_Zo 0. 0.
@t_m6_1 osc t_M 0 t_Zo 0. 0.
@t_m6_2 osc t_M 0 t_Zo 0. 0.
@t_m6_3 osc t_M 0 t_Zo 0. 0.
@t_m7_0 osc t_M 0 t_Zo 0. 0.
@t_m7_1 osc t_M 0 t_Zo 0. 0.
@t_m7_2 osc t_M 0 t_Zo 0. 0.
@t_m8_0 osc t_M 0 t_Zo 0. 0.
@t_m8_1 osc t_M 0 t_Zo 0. 0.
@t_m9_0 ground 0
@t_r0 springDamper @t_m0_0 @t_m0_1 t_K t_Z
@t_r1 springDamper @t_m0_1 @t_m0_2 t_K t_Z
@t_r2 springDamper @t_m0_2 @t_m0_3 t_K t_Z
@t_r3 springDamper @t_m0_3 @t_m0_4 t_K t_Z
@t_r4 springDamper @t_m0_4 @t_m0_5 t_K t_Z
@t_r5 springDamper @t_m0_5 @t_m0_6 t_K t_Z
@t_r6 springDamper @t_m0_6 @t_m0_7 t_K t_Z
@t_r7 springDamper @t_m0_7 @t_m0_8 t_K t_Z
@t_r8 springDamper @t_m0_8 @t_m0_9 t_K t_Z
@t_r9 springDamper @t_m1_0 @t_m1_1 t_K t_Z
@t_r10 springDamper @t_m1_1 @t_m1_2 t_K t_Z
@t_r11 springDamper @t_m1_2 @t_m1_3 t_K t_Z
@t_r12 springDamper @t_m1_3 @t_m1_4 t_K t_Z
@t_r13 springDamper @t_m1_4 @t_m1_5 t_K t_Z
@t_r14 springDamper @t_m1_5 @t_m1_6 t_K t_Z
@t_r15 springDamper @t_m1_6 @t_m1_7 t_K t_Z
@t_r16 springDamper @t_m1_7 @t_m1_8 t_K t_Z
@t_r17 springDamper @t_m2_0 @t_m2_1 t_K t_Z
@t_r18 springDamper @t_m2_1 @t_m2_2 t_K t_Z
@t_r19 springDamper @t_m2_2 @t_m2_3 t_K t_Z
@t_r20 springDamper @t_m2_3 @t_m2_4 t_K t_Z
@t_r21 springDamper @t_m2_4 @t_m2_5 t_K t_Z
@t_r22 springDamper @t_m2_5 @t_m2_6 t_K t_Z
@t_r23 springDamper @t_m2_6 @t_m2_7 t_K t_Z
@t_r24 springDamper @t_m3_0 @t_m3_1 t_K t_Z
@t_r25 springDamper @t_m3_1 @t_m3_2 t_K t_Z
@t_r26 springDamper @t_m3_2 @t_m3_3 t_K t_Z
@t_r27 springDamper @t_m3_3 @t_m3_4 t_K t_Z
@t_r28 springDamper @t_m3_4 @t_m3_5 t_K t_Z
@t_r29 springDamper @t_m3_5 @t_m3_6 t_K t_Z
@t_r30 springDamper @t_m4_0 @t_m4_1 t_K t_Z
@t_r31 springDamper @t_m4_1 @t_m4_2 t_K t_Z
@t_r32 springDamper @t_m4_2 @t_m4_3 t_K t_Z
@t_r33 springDamper @t_m4_3 @t_m4_4 t_K t_Z
@t_r34 springDamper @t_m4_4 @t_m4_5 t_K t_Z
@t_r35 springDamper @t_m5_0 @t_m5_1 t_K t_Z
@t_r36 springDamper @t_m5_1 @t_m5_2 t_K t_Z
@t_r37 springDamper @t_m5_2 @t_m5_3 t_K t_Z
@t_r38 springDamper @t_m5_3 @t_m5_4 t_K t_Z
@t_r39 springDamper @t_m6_0 @t_m6_1 t_K t_Z
@t_r40 springDamper @t_m6_1 @t_m6_2 t_K t_Z
@t_r41 springDamper @t_m6_2 @t_m6_3 t_K t_Z
@t_r42 springDamper @t_m7_0 @t_m7_1 t_K t_Z
@t_r43 springDamper @t_m7_1 @t_m7_2 t_K t_Z
@t_r44 springDamper @t_m8_0 @t_m8_1 t_K t_Z
@t_r45 springDamper @t_m0_0 @t_m1_0 t_K t_Z
@t_r46 springDamper @t_m0_1 @t_m1_1 t_K t_Z
@t_r47 springDamper @t_m0_2 @t_m1_2 t_K t_Z
@t_r48 springDamper @t_m0_3 @t_m1_3 t_K t_Z
@t_r49 springDamper @t_m0_4 @t_m1_4 t_K t_Z
@t_r50 springDamper @t_m0_5 @t_m1_5 t_K t_Z
@t_r51 springDamper @t_m0_6 @t_m1_6 t_K t_Z
@t_r52 springDamper @t_m0_7 @t_m1_7 t_K t_Z
@t_r53 springDamper @t_m0_8 @t_m1_8 t_K t_Z
@t_r54 springDamper @t_m1_0 @t_m2_0 t_K t_Z
@t_r55 springDamper @t_m1_1 @t_m2_1 t_K t_Z
@t_r56 springDamper @t_m1_2 @t_m2_2 t_K t_Z
@t_r57 springDamper @t_m1_3 @t_m2_3 t_K t_Z
@t_r58 springDamper @t_m1_4 @t_m2_4 t_K t_Z
@t_r59 springDamper @t_m1_5 @t_m2_5 t_K t_Z
@t_r60 springDamper @t_m1_6 @t_m2_6 t_K t_Z
@t_r61 springDamper @t_m1_7 @t_m2_7 t_K t_Z
@t_r62 springDamper @t_m2_0 @t_m3_0 t_K t_Z
@t_r63 springDamper @t_m2_1 @t_m3_1 t_K t_Z
@t_r64 springDamper @t_m2_2 @t_m3_2 t_K t_Z
@t_r65 springDamper @t_m2_3 @t_m3_3 t_K t_Z
@t_r66 springDamper @t_m2_4 @t_m3_4 t_K t_Z
@t_r67 springDamper @t_m2_5 @t_m3_5 t_K t_Z
@t_r68 springDamper @t_m2_6 @t_m3_6 t_K t_Z
@t_r69 springDamper @t_m3_0 @t_m4_0 t_K t_Z
@t_r70 springDamper @t_m3_1 @t_m4_1 t_K t_Z
@t_r71 springDamper @t_m3_2 @t_m4_2 t_K t_Z
@t_r72 springDamper @t_m3_3 @t_m4_3 t_K t_Z
@t_r73 springDamper @t_m3_4 @t_m4_4 t_K t_Z
@t_r74 springDamper @t_m3_5 @t_m4_5 t_K t_Z
@t_r75 springDamper @t_m4_0 @t_m5_0 t_K t_Z
@t_r76 springDamper @t_m4_1 @t_m5_1 t_K t_Z
@t_r77 springDamper @t_m4_2 @t_m5_2 t_K t_Z
@t_r78 springDamper @t_m4_3 @t_m5_3 t_K t_Z
@t_r79 springDamper @t_m4_4 @t_m5_4 t_K t_Z
@t_r80 springDamper @t_m5_0 @t_m6_0 t_K t_Z
@t_r81 springDamper @t_m5_1 @t_m6_1 t_K t_Z
@t_r82 springDamper @t_m5_2 @t_m6_2 t_K t_Z
@t_r83 springDamper @t_m5_3 @t_m6_3 t_K t_Z
@t_r84 springDamper @t_m6_0 @t_m7_0 t_K t_Z
@t_r85 springDamper @t_m6_1 @t_m7_1 t_K t_Z
@t_r86 springDamper @t_m6_2 @t_m7_2 t_K t_Z
@t_r87 springDamper @t_m7_0 @t_m8_0 t_K t_Z
@t_r88 springDamper @t_m7_1 @t_m8_1 t_K t_Z
@t_r89 springDamper @t_m8_0 @t_m9_0 t_K t_Z
@t_r90 springDamper @t_m0_1 @t_m1_0 t_K t_Z
@t_r91 springDamper @t_m0_2 @t_m1_1 t_K t_Z
@t_r92 springDamper @t_m0_3 @t_m1_2 t_K t_Z
@t_r93 springDamper @t_m0_4 @t_m1_3 t_K t_Z
@t_r94 springDamper @t_m0_5 @t_m1_4 t_K t_Z
@t_r95 springDamper @t_m0_6 @t_m1_5 t_K t_Z
@t_r96 springDamper @t_m0_7 @t_m1_6 t_K t_Z
@t_r97 springDamper @t_m0_8 @t_m1_7 t_K t_Z
@t_r98 springDamper @t_m0_9 @t_m1_8 t_K t_Z
@t_r99 springDamper @t_m1_1 @t_m2_0 t_K t_Z
@t_r100 springDamper @t_m1_2 @t_m2_1 t_K t_Z
@t_r101 springDamper @t_m1_3 @t_m2_2 t_K t_Z
@t_r102 springDamper @t_m1_4 @t_m2_3 t_K t_Z
@t_r103 springDamper @t_m1_5 @t_m2_4 t_K t_Z
@t_r104 springDamper @t_m1_6 @t_m2_5 t_K t_Z
@t_r105 springDamper @t_m1_7 @t_m2_6 t_K t_Z
@t_r106 springDamper @t_m1_8 @t_m2_7 t_K t_Z
@t_r107 springDamper @t_m2_1 @t_m3_0 t_K t_Z
@t_r108 springDamper @t_m2_2 @t_m3_1 t_K t_Z
@t_r109 springDamper @t_m2_3 @t_m3_2 t_K t_Z
@t_r110 springDamper @t_m2_4 @t_m3_3 t_K t_Z
@t_r111 springDamper @t_m2_5 @t_m3_4 t_K t_Z
@t_r112 springDamper @t_m2_6 @t_m3_5 t_K t_Z
@t_r113 springDamper @t_m2_7 @t_m3_6 t_K t_Z
@t_r114 springDamper @t_m3_1 @t_m4_0 t_K t_Z
@t_r115 springDamper @t_m3_2 @t_m4_1 t_K t_Z
@t_r116 springDamper @t_m3_3 @t_m4_2 t_K t_Z
@t_r117 springDamper @t_m3_4 @t_m4_3 t_K t_Z
@t_r118 springDamper @t_m3_5 @t_m4_4 t_K t_Z
@t_r119 springDamper @t_m3_6 @t_m4_5 t_K t_Z
@t_r120 springDamper @t_m4_1 @t_m5_0 t_K t_Z
@t_r121 springDamper @t_m4_2 @t_m5_1 t_K t_Z
@t_r122 springDamper @t_m4_3 @t_m5_2 t_K t_Z
@t_r123 springDamper @t_m4_4 @t_m5_3 t_K t_Z
@t_r124 springDamper @t_m4_5 @t_m5_4 t_K t_Z
@t_r125 springDamper @t_m5_1 @t_m6_0 t_K t_Z
@t_r126 springDamper @t_m5_2 @t_m6_1 t_K t_Z
@t_r127 springDamper @t_m5_3 @t_m6_2 t_K t_Z
@t_r128 springDamper @t_m5_4 @t_m6_3 t_K t_Z
@t_r129 springDamper @t_m6_1 @t_m7_0 t_K t_Z
@t_r130 springDamper @t_m6_2 @t_m7_1 t_K t_Z
@t_r131 springDamper @t_m6_3 @t_m7_2 t_K t_Z
@t_r132 springDamper @t_m7_1 @t_m8_0 t_K t_Z
@t_r133 springDamper @t_m7_2 @t_m8_1 t_K t_Z
@t_r134 springDamper @t_m8_1 @t_m9_0 t_K t_Z
@me_M param 1
@me_K param 0.1
@me_Z param 0.001
@me_Zo param 0.00005
@me_m0_0 ground 0
@me_m0_1 osc me_M 0 me_Zo 0. 0.
@me_m0_2 osc me_M 0 me_Zo 0. 0.
@me_m0_3 osc me_M 0 me_Zo 0. 0.
@me_m0_4 osc me_M 0 me_Zo 0. 0.
@me_m0_5 osc me_M 0 me_Zo 0. 0.
@me_m0_6 osc me_M 0 me_Zo 0. 0.
@me_m0_7 osc me_M 0 me_Zo 0. 0.
@me_m0_8 osc me_M 0 me_Zo 0. 0.
@me_m0_9 ground 0
@me_m1_0 osc me_M 0 me_Zo 0. 0.
@me_m1_1 osc me_M 0 me_Zo 0. 0.
@me_m1_2 osc me_M 0 me_Zo 0. 0.
@me_m1_3 osc me_M 0 me_Zo 0. 0.
@me_m1_4 osc me_M 0 me_Zo 0. 0.
@me_m1_5 osc me_M 0 me_Zo 0. 0.
@me_m1_6 osc me_M 0 me_Zo 0. 0.
@me_m1_7 osc me_M 0 me_Zo 0. 0.
@me_m1_8 osc me_M 0 me_Zo 0. 0.
@me_m1_9 osc me_M 0 me_Zo 0. 0.
@me_m2_0 osc me_M 0 me_Zo 0. 0.
@me_m2_1 osc me_M 0 me_Zo 0. 0.
@me_m2_2 osc me_M 0 me_Zo 0. 0.
@me_m2_3 osc me_M 0 me_Zo 0. 0.
@me_m2_4 osc me_M 0 me_Zo 0. 0.
@me_m2_5 osc me_M 0 me_Zo 0. 0.
@me_m2_6 osc me_M 0 me_Zo 0. 0.
@me_m2_7 osc me_M 0 me_Zo 0. 0.
@me_m2_8 osc me_M 0 me_Zo 0. 0.
@me_m2_9 osc me_M 0 me_Zo 0. 0.
@me_m3_0 osc me_M 0 me_Zo 0. 0.
@me_m3_1 osc me_M 0 me_Zo 0. 0.
@me_m3_2 osc me_M 0 me_Zo 0. 0.
@me_m3_3 osc me_M 0 me_Zo 0. 0.
@me_m3_4 osc me_M 0 me_Zo 0. 0.
@me_m3_5 osc me_M 0 me_Zo 0. 0.
@me_m3_6 osc me_M 0 me_Zo 0. 0.
@me_m3_7 osc me_M 0 me_Zo 0. 0.
@me_m3_8 osc me_M 0 me_Zo 0. 0.
@me_m3_9 osc me_M 0 me_Zo 0. 0.
@me_m4_0 osc me_M 0 me_Zo 0. 0.
@me_m4_1 osc me_M 0 me_Zo 0. 0.
@me_m4_2 osc me_M 0 me_Zo 0. 0.
@me_m4_3 osc me_M 0 me_Zo 0. 0.
@me_m4_4 osc me_M 0 me_Zo 0. 0.
@me_m4_5 osc me_M 0 me_Zo 0. 0.
@me_m4_6 osc me_M 0 me_Zo 0. 0.
@me_m4_7 osc me_M 0 me_Zo 0. 0.
@me_m4_8 osc me_M 0 me_Zo 0. 0.
@me_m4_9 osc me_M 0 me_Zo 0. 0.
@me_m5_0 osc me_M 0 me_Zo 0. 0.
@me_m5_1 osc me_M 0 me_Zo 0. 0.
@me_m5_2 osc me_M 0 me_Zo 0. 0.
@me_m5_3 osc me_M 0 me_Zo 0. 0.
@me_m5_4 osc me_M 0 me_Zo 0. 0.
@me_m5_5 osc me_M 0 me_Zo 0. 0.
@me_m5_6 osc me_M 0 me_Zo 0. 0.
@me_m5_7 osc me_M 0 me_Zo 0. 0.
@me_m5_8 osc me_M 0 me_Zo 0. 0.
@me_m5_9 osc me_M 0 me_Zo 0. 0.
@me_m6_0 osc me_M 0 me_Zo 0. 0.
@me_m6_1 osc me_M 0 me_Zo 0. 0.
@me_m6_2 osc me_M 0 me_Zo 0. 0.
@me_m6_3 osc me_M 0 me_Zo 0. 0.
@me_m6_4 osc me_M 0 me_Zo 0. 0.
@me_m6_5 osc me_M 0 me_Zo 0. 0.
@me_m6_6 osc me_M 0 me_Zo 0. 0.
@me_m6_7 osc me_M 0 me_Zo 0. 0.
@me_m6_8 osc me_M 0 me_Zo 0. 0.
@me_m6_9 osc me_M 0 me_Zo 0. 0.
@me_m7_0 osc me_M 0 me_Zo 0. 0.
@me_m7_1 osc me_M 0 me_Zo 0. 0.
@me_m7_2 osc me_M 0 me_Zo 0. 0.
@me_m7_3 osc me_M 0 me_Zo 0. 0.
@me_m7_4 osc me_M 0 me_Zo 0. 0.
@me_m7_5 osc me_M 0 me_Zo 0. 0.
@me_m7_6 osc me_M 0 me_Zo 0. 0.
@me_m7_7 osc me_M 0 me_Zo 0. 0.
@me_m7_8 osc me_M 0 me_Zo 0. 0.
@me_m7_9 osc me_M 0 me_Zo 0. 0.
@me_m8_0 osc me_M 0 me_Zo 0. 0.
@me_m8_1 osc me_M 0 me_Zo 0. 0.
@me_m8_2 osc me_M 0 me_Zo 0. 0.
@me_m8_3 osc me_M 0 me_Zo 0. 0.
@me_m8_4 osc me_M 0 me_Zo 0. 0.
@me_m8_5 osc me_M 0 me_Zo 0. 0.
@me_m8_6 osc me_M 0 me_Zo 0. 0.
@me_m8_7 osc me_M 0 me_Zo 0. 0.
@me_m8_8 osc me_M 0 me_Zo 0. 0.
@me_m8_9 osc me_M 0 me_Zo 0. 0.
@me_m9_0 ground 0
@me_m9_1 osc me_M 0 me_Zo 0. 0.
@me_m9_2 osc me_M 0 me_Zo 0. 0.
@me_m9_3 osc me_M 0 me_Zo 0. 0.
@me_m9_4 osc me_M 0 me_Zo 0. 0.
@me_m9_5 osc me_M 0 me_Zo 0. 0.
@me_m9_6 osc me_M 0 me_Zo 0. 0.
@me_m9_7 osc me_M 0 me_Zo 0. 0.
@me_m9_8 osc me_M 0 me_Zo 0. 0.
@me_m9_9 ground 0
@me_r0 springDamper @me_m0_0 @me_m0_1 me_K me_Z
@me_r1 springDamper @me_m0_1 @me_m0_2 me_K me_Z
@me_r2 springDamper @me_m0_2 @me_m0_3 me_K me_Z
@me_r3 springDamper @me_m0_3 @me_m0_4 me_K me_Z
@me_r4 springDamper @me_m0_4 @me_m0_5 me_K me_Z
@me_r5 springDamper @me_m0_5 @me_m0_6 me_K me_Z
@me_r6 springDamper @me_m0_6 @me_m0_7 me_K me_Z
@me_r7 springDamper @me_m0_7 @me_m0_8 me_K me_Z
@me_r8 springDamper @me_m0_8 @me_m0_9 me_K me_Z
@me_r9 springDamper @me_m1_0 @me_m1_1 me_K me_Z
@me_r10 springDamper @me_m1_1 @me_m1_2 me_K me_Z
@me_r11 springDamper @me_m1_2 @me_m1_3 me_K me_Z
@me_r12 springDamper @me_m1_3 @me_m1_4 me_K me_Z
@me_r13 springDamper @me_m1_4 @me_m1_5 me_K me_Z
@me_r14 springDamper @me_m1_5 @me_m1_6 me_K me_Z
@me_r15 springDamper @me_m1_6 @me_m1_7 me_K me_Z
@me_r16 springDamper @me_m1_7 @me_m1_8 me_K me_Z
@me_r17 springDamper @me_m1_8 @me_m1_9 me_K me_Z
@me_r18 springDamper @me_m2_0 @me_m2_1 me_K me_Z
@me_r19 springDamper @me_m2_1 @me_m2_2 me_K me_Z
@me_r20 springDamper @me_m2_2 @me_m2_3 me_K me_Z
@me_r21 springDamper @me_m2_3 @me_m2_4 me_K me_Z
@me_r22 springDamper @me_m2_4 @me_m2_5 me_K me_Z
@me_r23 springDamper @me_m2_5 @me_m2_6 me_K me_Z
@me_r24 springDamper @me_m2_6 @me_m2_7 me_K me_Z
@me_r25 springDamper @me_m2_7 @me_m2_8 me_K me_Z
@me_r26 springDamper @me_m2_8 @me_m2_9 me_K me_Z
@me_r27 springDamper @me_m3_0 @me_m3_1 me_K me_Z
@me_r28 springDamper @me_m3_1 @me_m3_2 me_K me_Z
@me_r29 springDamper @me_m3_2 @me_m3_3 me_K me_Z
@me_r30 springDamper @me_m3_3 @me_m3_4 me_K me_Z
@me_r31 springDamper @me_m3_4 @me_m3_5 me_K me_Z
@me_r32 springDamper @me_m3_5 @me_m3_6 me_K me_Z
@me_r33 springDamper @me_m3_6 @me_m3_7 me_K me_Z
@me_r34 springDamper @me_m3_7 @me_m3_8 me_K me_Z
@me_r35 springDamper @me_m3_8 @me_m3_9 me_K me_Z
@me_r36 springDamper @me_m4_0 @me_m4_1 me_K me_Z
@me_r37 springDamper @me_m4_1 @me_m4_2 me_K me_Z
@me_r38 springDamper @me_m4_2 @me_m4_3 me_K me_Z
@me_r39 springDamper @me_m4_3 @me_m4_4 me_K me_Z
@me_r40 springDamper @me_m4_4 @me_m4_5 me_K me_Z
@me_r41 springDamper @me_m4_5 @me_m4_6 me_K me_Z
@me_r42 springDamper @me_m4_6 @me_m4_7 me_K me_Z
@me_r43 springDamper @me_m4_7 @me_m4_8 me_K me_Z
@me_r44 springDamper @me_m4_8 @me_m4_9 me_K me_Z
@me_r45 springDamper @me_m5_0 @me_m5_1 me_K me_Z
@me_r46 springDamper @me_m5_1 @me_m5_2 me_K me_Z
@me_r47 springDamper @me_m5_2 @me_m5_3 me_K me_Z
@me_r48 springDamper @me_m5_3 @me_m5_4 me_K me_Z
@me_r49 springDamper @me_m5_4 @me_m5_5 me_K me_Z
@me_r50 springDamper @me_m5_5 @me_m5_6 me_K me_Z
@me_r51 springDamper @me_m5_6 @me_m5_7 me_K me_Z
@me_r52 springDamper @me_m5_7 @me_m5_8 me_K me_Z
@me_r53 springDamper @me_m5_8 @me_m5_9 me_K me_Z
@me_r54 springDamper @me_m6_0 @me_m6_1 me_K me_Z
@me_r55 springDamper @me_m6_1 @me_m6_2 me_K me_Z
@me_r56 springDamper @me_m6_2 @me_m6_3 me_K me_Z
@me_r57 springDamper @me_m6_3 @me_m6_4 me_K me_Z
@me_r58 springDamper @me_m6_4 @me_m6_5 me_K me_Z
@me_r59 springDamper @me_m6_5 @me_m6_6 me_K me_Z
@me_r60 springDamper @me_m6_6 @me_m6_7 me_K me_Z
@me_r61 springDamper @me_m6_7 @me_m6_8 me_K me_Z
@me_r62 springDamper @me_m6_8 @me_m6_9 me_K me_Z
@me_r63 springDamper @me_m7_0 @me_m7_1 me_K me_Z
@me_r64 springDamper @me_m7_1 @me_m7_2 me_K me_Z
@me_r65 springDamper @me_m7_2 @me_m7_3 me_K me_Z
@me_r66 springDamper @me_m7_3 @me_m7_4 me_K me_Z
@me_r67 springDamper @me_m7_4 @me_m7_5 me_K me_Z
@me_r68 springDamper @me_m7_5 @me_m7_6 me_K me_Z
@me_r69 springDamper @me_m7_6 @me_m7_7 me_K me_Z
@me_r70 springDamper @me_m7_7 @me_m7_8 me_K me_Z
@me_r71 springDamper @me_m7_8 @me_m7_9 me_K me_Z
@me_r72 springDamper @me_m8_0 @me_m8_1 me_K me_Z
@me_r73 springDamper @me_m8_1 @me_m8_2 me_K me_Z
@me_r74 springDamper @me_m8_2 @me_m8_3 me_K me_Z
@me_r75 springDamper @me_m8_3 @me_m8_4 me_K me_Z
@me_r76 springDamper @me_m8_4 @me_m8_5 me_K me_Z
@me_r77 springDamper @me_m8_5 @me_m8_6 me_K me_Z
@me_r78 springDamper @me_m8_6 @me_m8_7 me_K me_Z
@me_r79 springDamper @me_m8_7 @me_m8_8 me_K me_Z
@me_r80 springDamper @me_m8_8 @me_m8_9 me_K me_Z
@me_r81 springDamper @me_m9_0 @me_m9_1 me_K me_Z
@me_r82 springDamper @me_m9_1 @me_m9_2 me_K me_Z
@me_r83 springDamper @me_m9_2 @me_m9_3 me_K me_Z
@me_r84 springDamper @me_m9_3 @me_m9_4 me_K me_Z
@me_r85 springDamper @me_m9_4 @me_m9_5 me_K me_Z
@me_r86 springDamper @me_m9_5 @me_m9_6 me_K me_Z
@me_r87 springDamper @me_m9_6 @me_m9_7 me_K me_Z
@me_r88 springDamper @me_m9_7 @me_m9_8 me_K me_Z
@me_r89 springDamper @me_m9_8 @me_m9_9 me_K me_Z
@me_r90 springDamper @me_m0_0 @me_m1_0 me_K me_Z
@me_r91 springDamper @me_m0_1 @me_m1_1 me_K me_Z
@me_r92 springDamper @me_m0_2 @me_m1_2 me_K me_Z
@me_r93 springDamper @me_m0_3 @me_m1_3 me_K me_Z
@me_r94 springDamper @me_m0_4 @me_m1_4 me_K me_Z
@me_r95 springDamper @me_m0_5 @me_m1_5 me_K me_Z
@me_r96 springDamper @me_m0_6 @me_m1_6 me_K me_Z
@me_r97 springDamper @me_m0_7 @me_m1_7 me_K me_Z
@me_r98 springDamper @me_m0_8 @me_m1_8 me_K me_Z
@me_r99 springDamper @me_m0_9 @me_m1_9 me_K me_Z
@me_r100 springDamper @me_m1_0 @me_m2_0 me_K me_Z
@me_r101 springDamper @me_m1_1 @me_m2_1 me_K me_Z
@me_r102 springDamper @me_m1_2 @me_m2_2 me_K me_Z
@me_r103 springDamper @me_m1_3 @me_m2_3 me_K me_Z
@me_r104 springDamper @me_m1_4 @me_m2_4 me_K me_Z
@me_r105 springDamper @me_m1_5 @me_m2_5 me_K me_Z
@me_r106 springDamper @me_m1_6 @me_m2_6 me_K me_Z
@me_r107 springDamper @me_m1_7 @me_m2_7 me_K me_Z
@me_r108 springDamper @me_m1_8 @me_m2_8 me_K me_Z
@me_r109 springDamper @me_m1_9 @me_m2_9 me_K me_Z
@me_r110 springDamper @me_m2_0 @me_m3_0 me_K me_Z
@me_r111 springDamper @me_m2_1 @me_m3_1 me_K me_Z
@me_r112 springDamper @me_m2_2 @me_m3_2 me_K me_Z
@me_r113 springDamper @me_m2_3 @me_m3_3 me_K me_Z
@me_r114 springDamper @me_m2_4 @me_m3_4 me_K me_Z
@me_r115 springDamper @me_m2_5 @me_m3_5 me_K me_Z
@me_r116 springDamper @me_m2_6 @me_m3_6 me_K me_Z
@me_r117 springDamper @me_m2_7 @me_m3_7 me_K me_Z
@me_r118 springDamper @me_m2_8 @me_m3_8 me_K me_Z
@me_r119 springDamper @me_m2_9 @me_m3_9 me_K me_Z
@me_r120 springDamper @me_m3_0 @me_m4_0 me_K me_Z
@me_r121 springDamper @me_m3_1 @me_m4_1 me_K me_Z
@me_r122 springDamper @me_m3_2 @me_m4_2 me_K me_Z
@me_r123 springDamper @me_m3_3 @me_m4_3 me_K me_Z
@me_r124 springDamper @me_m3_4 @me_m4_4 me_K me_Z
@me_r125 springDamper @me_m3_5 @me_m4_5 me_K me_Z
@me_r126 springDamper @me_m3_6 @me_m4_6 me_K me_Z
@me_r127 springDamper @me_m3_7 @me_m4_7 me_K me_Z
@me_r128 springDamper @me_m3_8 @me_m4_8 me_K me_Z
@me_r129 springDamper @me_m3_9 @me_m4_9 me_K me_Z
@me_r130 springDamper @me_m4_0 @me_m5_0 me_K me_Z
@me_r131 springDamper @me_m4_1 @me_m5_1 me_K me_Z
@me_r132 springDamper @me_m4_2 @me_m5_2 me_K me_Z
@me_r133 springDamper @me_m4_3 @me_m5_3 me_K me_Z
@me_r134 springDamper @me_m4_4 @me_m5_4 me_K me_Z
@me_r135 springDamper @me_m4_5 @me_m5_5 me_K me_Z
@me_r136 springDamper @me_m4_6 @me_m5_6 me_K me_Z
@me_r137 springDamper @me_m4_7 @me_m5_7 me_K me_Z
@me_r138 springDamper @me_m4_8 @me_m5_8 me_K me_Z
@me_r139 springDamper @me_m4_9 @me_m5_9 me_K me_Z
@me_r140 springDamper @me_m5_0 @me_m6_0 me_K me_Z
@me_r141 springDamper @me_m5_1 @me_m6_1 me_K me_Z
@me_r142 springDamper @me_m5_2 @me_m6_2 me_K me_Z
@me_r143 springDamper @me_m5_3 @me_m6_3 me_K me_Z
@me_r144 springDamper @me_m5_4 @me_m6_4 me_K me_Z
@me_r145 springDamper @me_m5_5 @me_m6_5 me_K me_Z
@me_r146 springDamper @me_m5_6 @me_m6_6 me_K me_Z
@me_r147 springDamper @me_m5_7 @me_m6_7 me_K me_Z
@me_r148 springDamper @me_m5_8 @me_m6_8 me_K me_Z
@me_r149 springDamper @me_m5_9 @me_m6_9 me_K me_Z
@me_r150 springDamper @me_m6_0 @me_m7_0 me_K me_Z
@me_r151 springDamper @me_m6_1 @me_m7_1 me_K me_Z
@me_r152 springDamper @me_m6_2 @me_m7_2 me_K me_Z
@me_r153 springDamper @me_m6_3 @me_m7_3 me_K me_Z
@me_r154 springDamper @me_m6_4 @me_m7_4 me_K me_Z
@me_r155 springDamper @me_m6_5 @me_m7_5 me_K me_Z
@me_r156 springDamper @me_m6_6 @me_m7_6 me_K me_Z
@me_r157 springDamper @me_m6_7 @me_m7_7 me_K me_Z
@me_r158 springDamper @me_m6_8 @me_m7_8 me_K me_Z
@me_r159 springDamper @me_m6_9 @me_m7_9 me_K me_Z
@me_r160 springDamper @me_m7_0 @me_m8_0 me_K me_Z
@me_r161 springDamper @me_m7_1 @me_m8_1 me_K me_Z
@me_r162 springDamper @me_m7_2 @me_m8_2 me_K me_Z
@me_r163 springDamper @me_m7_3 @me_m8_3 me_K me_Z
@me_r164 springDamper @me_m7_4 @me_m8_4 me_K me_Z
@me_r165 springDamper @me_m7_5 @me_m8_5 me_K me_Z
@me_r166 springDamper @me_m7_6 @me_m8_6 me_K me_Z
@me_r167 springDamper @me_m7_7 @me_m8_7 me_K me_Z
@me_r168 springDamper @me_m7_8 @me_m8_8 me_K me_Z
@me_r169 springDamper @me_m7_9 @me_m8_9 me_K me_Z
@me_r170 springDamper @me_m8_0 @me_m9_0 me_K me_Z
@me_r171 springDamper @me_m8_1 @me_m9_1 me_K me_Z
@me_r172 springDamper @me_m8_2 @me_m9_2 me_K me_Z
@me_r173 springDamper @me_m8_3 @me_m9_3 me_K me_Z
@me_r174 springDamper @me_m8_4 @me_m9_4 me_K me_Z
@me_r175 springDamper @me_m8_5 @me_m9_5 me_K me_Z
@me_r176 springDamper @me_m8_6 @me_m9_6 me_K me_Z
@me_r177 springDamper @me_m8_7 @me_m9_7 me_K me_Z
@me_r178 springDamper @me_m8_8 @me_m9_8 me_K me_Z
@me_r179 springDamper @me_m8_9 @me_m9_9 me_K me_Z
@out1 posOutput @me_m5_5
@out2 posOutput @t_m2_1
| declare name "Strange Physical Construction";
declare author "James Leonard";
declare date "April 2020";
import("stdfaust.lib");
in1 = button("Force Impulse"): ba.impulsify * hslider("Force Scaling", 0.5, 0.01, 0.9, 0.001) * -1;
OutGain = 1;
t_M = 1;
t_K = hslider("Triangle Stiffness", 0.1, 0.001, 0.2, 0.0001);
t_Z = hslider("Triangle Damping", 0.0001, 0.00, 0.0008, 0.000001);
t_Zo = 0.00005;
me_M = 1;
me_K = hslider("Mesh Stiffness", 0.1, 0.001, 0.2, 0.0001);
me_Z = hslider("Mesh Damping", 0.0001, 0.00, 0.0008, 0.000001);
me_Zo = 0.00005;
model = (
mi.mass(0.3, 0, 1., 1.),
mi.ground(1.),
mi.ground(0),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.ground(0),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.oscil(t_M, 0, t_Zo, 0, 0., 0.),
mi.ground(0),
mi.ground(0),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.ground(0),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.ground(0),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.oscil(me_M, 0, me_Zo, 0, 0., 0.),
mi.ground(0),
par(i, nbFrcIn,_):
RoutingMassToLink ,
par(i, nbFrcIn,_):
mi.springDamper(0.0001, 0.05, 1., 1.),
mi.nlCollisionClipped(0.0, 0.01, 0.5, 0.001, 0, 0., 1.),
mi.nlSpringDamperClipped(0.01, 0.01, 0.2, 0., 0., 0.),
mi.springDamper(t_K, t_Z, 0, 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0, 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0, 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0.),
mi.springDamper(t_K, t_Z, 0., 0),
mi.springDamper(me_K, me_Z, 0, 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0, 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0),
mi.springDamper(me_K, me_Z, 0, 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0, 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0.),
mi.springDamper(me_K, me_Z, 0., 0),
par(i, nbOut+nbFrcIn, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
nbMass = 157;
nbFrcIn = 1;
nbOut = 2;
};
process = in1 : model:*(OutGain), *(OutGain);
|
d141e9c3563da97793056fdf52f1cf12b17bbad32b0a66cabc9692fff86564d4 | CesarChaussinand/GramoCollection | rythmesBranches.dsp | declare name "Rythmes branchés";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = bell*0.2, (clap*0.6:fx), hihat*0.3, kick*gate :> _ : ef.cubicnl(0,0);
bell = bEnv*(os.square(800)+os.square(540)) : fi.resonbp(850,4.25,0.1);
bEnv = bTrig:en.ar(0.001,0.2);
bTrig = (clock!=clock')*ba.selectn(16,clock, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 );
kick = kEnv*os.osc(100*kEnv) : ef.cubicnl(0.1,0);
kEnv = kTrig:en.ar(0.001,0.2);
kTrig = (clock!=clock')*ba.selectn(16,clock, 1,0,0,0, 1,0,0,0, 1,0,0,0, 1,0,1,0 );
clap = cEnv * no.noise:fi.resonbp(1000,5,0.8);
cEnv = cTrig:en.ar(0.01,0.1);
cTrig = (clock!=clock')*ba.selectn(16,clock, 0,0,0,0, 1,0,0,0, 0,0,0,0, 1,0,0,1 );
fx = ef.echo(0.11,0.11,fdbk);
hihat = hhEnv*no.noise:fi.resonbp(hhFreq,3,0.8);
hhEnv = hhTrig:en.ar(0.001,0.02);
hhTrig = (clock!=clock')*ba.selectn(16,clock, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1 );
clock = os.phasor(16,time):int;
time = hslider("time[knob:2]", 0.5,0.25,0.8,0.01):si.smoo;
hhFreq = hslider("fréquence hihat[acc:1 0 -9 0 9]",7000,2000,15000,1):si.smoo;
gate = checkbox("gate[switch:1]");
fdbk = hslider("feedback de l'écho[acc:0 0 -9 0 0])",0.1,0,0.8,0.01);
| https://raw.githubusercontent.com/CesarChaussinand/GramoCollection/58f63f2fdb1fe4d01b4e0416d3a0c14639a347f2/rythmesBranches.dsp | faust | declare name "Rythmes branchés";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = bell*0.2, (clap*0.6:fx), hihat*0.3, kick*gate :> _ : ef.cubicnl(0,0);
bell = bEnv*(os.square(800)+os.square(540)) : fi.resonbp(850,4.25,0.1);
bEnv = bTrig:en.ar(0.001,0.2);
bTrig = (clock!=clock')*ba.selectn(16,clock, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 );
kick = kEnv*os.osc(100*kEnv) : ef.cubicnl(0.1,0);
kEnv = kTrig:en.ar(0.001,0.2);
kTrig = (clock!=clock')*ba.selectn(16,clock, 1,0,0,0, 1,0,0,0, 1,0,0,0, 1,0,1,0 );
clap = cEnv * no.noise:fi.resonbp(1000,5,0.8);
cEnv = cTrig:en.ar(0.01,0.1);
cTrig = (clock!=clock')*ba.selectn(16,clock, 0,0,0,0, 1,0,0,0, 0,0,0,0, 1,0,0,1 );
fx = ef.echo(0.11,0.11,fdbk);
hihat = hhEnv*no.noise:fi.resonbp(hhFreq,3,0.8);
hhEnv = hhTrig:en.ar(0.001,0.02);
hhTrig = (clock!=clock')*ba.selectn(16,clock, 1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1 );
clock = os.phasor(16,time):int;
time = hslider("time[knob:2]", 0.5,0.25,0.8,0.01):si.smoo;
hhFreq = hslider("fréquence hihat[acc:1 0 -9 0 9]",7000,2000,15000,1):si.smoo;
gate = checkbox("gate[switch:1]");
fdbk = hslider("feedback de l'écho[acc:0 0 -9 0 0])",0.1,0,0.8,0.01);
|
|
39bd9f6c0b406f85cf9519c5fa14016ff15bff45f73287f0c9cb9b2c98ed0c29 | CesarChaussinand/GramoCollection | rythmesChaloupes.dsp | declare name "Rythmes chaloupés";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = bell1*0.2*b1vol, bell2*0.2*b2vol, shaker*0.1*gate, tom1*0.3, tom2*0.3 :> _ : ef.cubicnl(0,0);
bell1 = env*(os.square(800)+os.square(540)) : fi.resonbp(850,4.25,0.1) with {
env = trig:en.ar(0.001,0.2);
trig = (clock!=clock')*ba.selectn(12,clock, 1,0,0, 0,0,0, 0,1,0, 1,0,0 );
};
bell2 = env * (os.square(800*Index)+os.square(540*Index)) : fi.resonbp(850*Index,4.25,0.1) with {
env = trig:en.ar(0.01,0.1);
trig = (clock!=clock')*ba.selectn(12,clock, 0,0,0 ,1,0,0, 0,0,0, 0,0,1 );
Index = 1.5;
};
tom1 = env*os.osc(100+env*50) : ef.cubicnl(0.1,0) with {
env = trig:en.ar(0.01,0.3);
trig = (clock!=clock')*ba.selectn(12,clock, 1,0,0, 0,0,1, 1,0,0, 0,0,0 );
};
tom2 = env*os.osc(50+env*50) : ef.cubicnl(0.1,0) with {
env = trig:en.ar(0.01,0.3);
trig = (clock!=clock')*ba.selectn(12,clock, 0,0,0, 1,0,0, 0,1,0, 1,0,0 );
};
shaker = env*no.noise:fi.resonbp(7000,2,0.4) with{
env = trig:en.ar(0.05,0.05);
trig = (clock!=clock')*ba.selectn(12,clock, 1,1,1, 1,1,1, 1,1,1, 1,1,1 );
};
clock = os.phasor(12,time):int;
time = hslider("time[knob:2]", 0.5,0.3,0.7,0.01):si.smoo;
gate = checkbox("gate[switch:1]");
b1vol = hslider("volume de la cloche n°1[acc:0 0 -9 0 9]",0.1,0,1,0.01);
b2vol = hslider("volume de la cloche n°2[acc:1 0 -9 0 9]",0.1,0,1,0.01);
| https://raw.githubusercontent.com/CesarChaussinand/GramoCollection/58f63f2fdb1fe4d01b4e0416d3a0c14639a347f2/rythmesChaloupes.dsp | faust | declare name "Rythmes chaloupés";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = bell1*0.2*b1vol, bell2*0.2*b2vol, shaker*0.1*gate, tom1*0.3, tom2*0.3 :> _ : ef.cubicnl(0,0);
bell1 = env*(os.square(800)+os.square(540)) : fi.resonbp(850,4.25,0.1) with {
env = trig:en.ar(0.001,0.2);
trig = (clock!=clock')*ba.selectn(12,clock, 1,0,0, 0,0,0, 0,1,0, 1,0,0 );
};
bell2 = env * (os.square(800*Index)+os.square(540*Index)) : fi.resonbp(850*Index,4.25,0.1) with {
env = trig:en.ar(0.01,0.1);
trig = (clock!=clock')*ba.selectn(12,clock, 0,0,0 ,1,0,0, 0,0,0, 0,0,1 );
Index = 1.5;
};
tom1 = env*os.osc(100+env*50) : ef.cubicnl(0.1,0) with {
env = trig:en.ar(0.01,0.3);
trig = (clock!=clock')*ba.selectn(12,clock, 1,0,0, 0,0,1, 1,0,0, 0,0,0 );
};
tom2 = env*os.osc(50+env*50) : ef.cubicnl(0.1,0) with {
env = trig:en.ar(0.01,0.3);
trig = (clock!=clock')*ba.selectn(12,clock, 0,0,0, 1,0,0, 0,1,0, 1,0,0 );
};
shaker = env*no.noise:fi.resonbp(7000,2,0.4) with{
env = trig:en.ar(0.05,0.05);
trig = (clock!=clock')*ba.selectn(12,clock, 1,1,1, 1,1,1, 1,1,1, 1,1,1 );
};
clock = os.phasor(12,time):int;
time = hslider("time[knob:2]", 0.5,0.3,0.7,0.01):si.smoo;
gate = checkbox("gate[switch:1]");
b1vol = hslider("volume de la cloche n°1[acc:0 0 -9 0 9]",0.1,0,1,0.01);
b2vol = hslider("volume de la cloche n°2[acc:1 0 -9 0 9]",0.1,0,1,0.01);
|
|
07c64558be35b1b81c03b8367b38a36a72ef537aafa104a4b95d573463b35a24 | alainbonardi/enecho | eCheapNoise.dsp | //--------------------------------------------------------------------------------------//
//----------------------------------------enecho----------------------------------------//
//
//-----------------------FAUST CODE FOR THE PRESERVATION OF EN ECHO---------------------//
//-----------------FOR SOPRANO AND LIVE ELECTRONICS BY PHILIPPE MANOOURY----------------//
//
//----------------------------------BY ALAIN BONARDI - 2022-----------------------------//
//---------------------CICM - MUSIDANSE LABORATORY - PARIS 8 UNIVERSITY-----------------//
//--------------------------------------------------------------------------------------//
//
declare author "Alain Bonardi";
declare licence "GPL-2.0";
declare name "eCheapNoise";
//
import("stdfaust.lib");
noiseTabNsamp = 512;
delMaxNsamp = 65536;
player(f0, mySamp, mySampNum) = thisPlayer with {
//f0 is the playing frequency
//mySamp the array of samples
//mySampNum the number of samples
zeroToOnePhase = os.phasor(1, f0) : ma.decimal;
myIndex = zeroToOnePhase * float(mySampNum);
i1 = int(myIndex);
i2 = (i1+1) % int(mySampNum);
d = ma.decimal(myIndex);
s1 = (mySamp, i1) : (+(1), _, _) : rdtable;
s2 = (mySamp, i2) : (+(1), _, _) : rdtable;
thisPlayer = s1 + d * (s2 - s1);
};
freq = hslider("freq", 10, 0.001, 10000, 0.001);
f1 = freq * 0.29999;
f2 = freq * 0.22321;
f3 = freq * 0.25361;
f4 = freq * 0.24344;
p1 = player(f1, noiseTab, noiseTabNsamp) <: (_, _);
p2 = player(f2, noiseTab, noiseTabNsamp) <: (_, _);
p3 = player(f3, noiseTab, noiseTabNsamp) <: (_, _);
p4 = player(f4, noiseTab, noiseTabNsamp) <: (_, _);
split = (_ <: (_, _));
split4 = (split, split, split, split);
per1(a, b, c, d, e, f, g, h) = (b, c, d, e, f, g, h, a);
per2(a, b, c, d, e, f, g, h) = (a, c, b, d, e, g, f, h);
per3(a, b, c, d, e, f, g, h) = (a, e, b, f, c, g, d, h);
interlace2(n) = si.bus(2*n) <: par(i, n, (ba.selector(i, 2*n), ba.selector(i+n, 2*n)));
envBlock = (p1, p2, p3, p4) : per1 : (*, *, *, *) : split4 : per2 : (+, -, +, -) : split4 : per3 : (+, -, +, -) ;
del1 = de.fdelay(delMaxNsamp, 0);
del2 = de.fdelay(delMaxNsamp, 25 * ma.SR / 1000.0);
del3 = de.fdelay(delMaxNsamp, 17.7 * ma.SR / 1000.0);
del4 = de.fdelay(delMaxNsamp, 9.3 * ma.SR / 1000.0);
process = (_ <: (del1, del2, del3, del4)), envBlock : interlace2(4) : (*, *, *, *) :> _;
noiseTab = waveform {
-0.006256104,-0.044067383,-0.076202393,-0.101959229,-0.120666504,-0.131958008,-0.135681152,-0.131866455,-0.120605469,-0.102600098,
-0.078186035,-0.048309326,-0.013824463,0.024353027,0.065002441,0.107147217,0.149658203,0.191436768,0.231414795,0.268737793,
0.302520752,0.331970215,0.356750488,0.376251221,0.390289307,0.398742676,0.401763916,0.399475098,0.392242432,0.380554199,
0.364898682,0.346038818,0.324554443,0.301239014,0.276824951,0.252044678,0.227630615,0.204193115,0.182373047,0.162689209,
0.145599365,0.131408691,0.120422363,0.112762451,0.10848999,0.107574463,0.110015869,0.115447998,0.123748779,0.13458252,
0.147583008,0.162353516,0.178497314,0.195587158,0.213195801,0.230865479,0.248168945,0.264862061,0.280303955,0.294372559,
0.306610107,0.316894531,0.324890137,0.330352783,0.333221436,0.333343506,0.330657959,0.325073242,0.316741943,0.30569458,
0.291870117,0.275726318,0.257171631,0.236633301,0.214416504,0.190734863,0.166107178,0.14074707,0.115264893,0.090026855,
0.065490723,0.042236328,0.020629883,0.00112915,-0.015777588,-0.029754639,-0.040435791,-0.047515869,-0.05078125,-0.050079346,
-0.045349121,-0.036529541,-0.023803711,-0.007293701,0.012664795,0.035766602,0.06161499,0.089691162,0.119476318,0.15032959,
0.181732178,0.21295166,0.243530273,0.272705078,0.300018311,0.325012207,0.347137451,0.366088867,0.381561279,0.3934021,
0.401397705,0.405609131,0.406097412,0.403076172,0.396636963,0.387176514,0.375,0.360412598,0.343963623,0.325927734,
0.306640625,0.286621094,0.266113281,0.245361328,0.22467041,0.20413208,0.183898926,0.163970947,0.144378662,0.125061035,
0.105926514,0.086700439,0.067443848,0.047851563,0.027862549,0.007324219,-0.01373291,-0.035461426,-0.057739258,-0.080444336,
-0.103363037,-0.126220703,-0.148651123,-0.170318604,-0.190643311,-0.209106445,-0.225189209,-0.23828125,-0.24786377,-0.253417969,
-0.254425049,-0.250518799,-0.241485596,-0.226989746,-0.20703125,-0.18170166,-0.1512146,-0.115905762,-0.076324463,-0.03302002,
0.013092041,0.061309814,0.110626221,0.160064697,0.208587646,0.255157471,0.298797607,0.338592529,0.373626709,0.403198242,
0.426849365,0.443939209,0.454315186,0.457855225,0.454650879,0.444976807,0.429260254,0.408050537,0.382080078,0.352203369,
0.319274902,0.284240723,0.248046875,0.211608887,0.175872803,0.141601563,0.109527588,0.080169678,0.054046631,0.031341553,
0.012145996,-0.003479004,-0.015838623,-0.025268555,-0.032226563,-0.03729248,-0.041137695,-0.044281006,-0.047576904,-0.051605225,
-0.056945801,-0.064086914,-0.073394775,-0.085144043,-0.099365234,-0.115997314,-0.134735107,-0.155181885,-0.176696777,-0.198577881,
-0.219970703,-0.239929199,-0.257476807,-0.271636963,-0.281433105,-0.286010742,-0.284423828,-0.276275635,-0.260955811,-0.238311768,
-0.208251953,-0.171081543,-0.127288818,-0.077545166,-0.022918701,0.035430908,0.096191406,0.157806396,0.218536377,0.276916504,
0.331115723,0.379516602,0.420654297,0.453125,0.475799561,0.487792969,0.488464355,0.477539063,0.454986572,0.421295166,
0.37713623,0.323577881,0.261871338,0.193756104,0.121002197,0.045623779,-0.030303955,-0.104614258,-0.175201416,-0.239990234,
-0.297119141,-0.344848633,-0.381835938,-0.406890869,-0.419311523,-0.418701172,-0.405029297,-0.378692627,-0.340606689,-0.291656494,
-0.23348999,-0.167816162,-0.096588135,-0.021942139,0.05380249,0.128448486,0.199645996,0.265411377,0.323638916,0.372650146,
0.410888672,0.437347412,0.451263428,0.452178955,0.440155029,0.415618896,0.379272461,0.332366943,0.276275635,0.21270752,
0.143676758,0.071044922,-0.002716064,-0.075775146,-0.145843506,-0.210968018,-0.269348145,-0.319366455,-0.359771729,-0.389587402,
-0.408081055,-0.41506958,-0.410522461,-0.394958496,-0.369018555,-0.33380127,-0.290588379,-0.240905762,-0.186401367,-0.128875732,
-0.070129395,-0.011962891,0.04385376,0.095825195,0.142425537,0.1824646,0.215087891,0.239501953,0.255310059,0.262481689,
0.261138916,0.25177002,0.235107422,0.211975098,0.183532715,0.151031494,0.115783691,0.079162598,0.042449951,0.007049561,
-0.025848389,-0.055236816,-0.080108643,-0.099884033,-0.113922119,-0.12197876,-0.124023438,-0.120117188,-0.110687256,-0.096313477,
-0.077636719,-0.055389404,-0.030639648,-0.004241943,0.022705078,0.049316406,0.074645996,0.097869873,0.118103027,0.134918213,
0.147766113,0.15625,0.160369873,0.160003662,0.155334473,0.14654541,0.134124756,0.118499756,0.100250244,0.079956055,
0.058197021,0.035644531,0.0128479,-0.009674072,-0.031402588,-0.052032471,-0.07119751,-0.088745117,-0.104492188,-0.118499756,
-0.130645752,-0.141265869,-0.150360107,-0.158172607,-0.164886475,-0.17074585,-0.17590332,-0.180511475,-0.184661865,-0.188293457,
-0.191558838,-0.194152832,-0.195983887,-0.196716309,-0.196228027,-0.193939209,-0.18963623,-0.182891846,-0.173309326,-0.160644531,
-0.144470215,-0.124725342,-0.101257324,-0.074066162,-0.043273926,-0.009063721,0.028045654,0.067718506,0.109283447,0.152038574,
0.19519043,0.237854004,0.279144287,0.31817627,0.354003906,0.385925293,0.412994385,0.434692383,0.450408936,0.45980835,
0.462615967,0.458831787,0.448547363,0.432128906,0.410003662,0.3828125,0.351348877,0.316497803,0.27923584,0.240570068,
0.201599121,0.163330078,0.126831055,0.09286499,0.062408447,0.03604126,0.014404297,-0.002227783,-0.01373291,-0.020080566,
-0.021484375,-0.018280029,-0.011138916,-0.000518799,0.012481689,0.02722168,0.042633057,0.057800293,0.071746826,0.083526611,
0.092407227,0.097503662,0.098327637,0.094390869,0.085418701,0.071258545,0.052062988,0.028015137,-0.000549316,-0.033111572,
-0.068847656,-0.107208252,-0.147247314,-0.188171387,-0.229003906,-0.268981934,-0.307281494,-0.343139648,-0.376068115,-0.405395508,
-0.430877686,-0.452270508,-0.469482422,-0.482574463,-0.491790771,-0.497467041,-0.5,-0.49987793,-0.497741699,-0.494140625,
-0.489654541,-0.484863281,-0.480316162,-0.476287842,-0.473266602,-0.471374512,-0.470672607,-0.471160889,-0.472625732,-0.474731445,
-0.476989746,-0.478912354,-0.479888916,-0.479217529,-0.476226807,-0.470153809,-0.460418701,-0.446350098,-0.427490234,-0.403442383,
-0.373962402,-0.339019775,-0.298583984,-0.253082275,-0.202850342,-0.148681641,-0.091217041,-0.03137207,0.029602051,0.090759277,
0.150817871,0.208618164,0.262878418,0.312438965,0.356323242,0.393432617,0.423065186,0.444671631,0.457702637,0.462005615,
0.457580566,0.444702148,0.423858643,0.3956604,0.360992432,0.320861816,0.276489258,0.229064941,0.179992676,0.130554199,
0.08215332,0.03616333 }; | https://raw.githubusercontent.com/alainbonardi/enecho/afc94af2c59d25e42b32d003236fc3af4e65d5d0/faustCodes/eCheapNoise.dsp | faust | --------------------------------------------------------------------------------------//
----------------------------------------enecho----------------------------------------//
-----------------------FAUST CODE FOR THE PRESERVATION OF EN ECHO---------------------//
-----------------FOR SOPRANO AND LIVE ELECTRONICS BY PHILIPPE MANOOURY----------------//
----------------------------------BY ALAIN BONARDI - 2022-----------------------------//
---------------------CICM - MUSIDANSE LABORATORY - PARIS 8 UNIVERSITY-----------------//
--------------------------------------------------------------------------------------//
f0 is the playing frequency
mySamp the array of samples
mySampNum the number of samples | declare author "Alain Bonardi";
declare licence "GPL-2.0";
declare name "eCheapNoise";
import("stdfaust.lib");
noiseTabNsamp = 512;
delMaxNsamp = 65536;
player(f0, mySamp, mySampNum) = thisPlayer with {
zeroToOnePhase = os.phasor(1, f0) : ma.decimal;
myIndex = zeroToOnePhase * float(mySampNum);
i1 = int(myIndex);
i2 = (i1+1) % int(mySampNum);
d = ma.decimal(myIndex);
s1 = (mySamp, i1) : (+(1), _, _) : rdtable;
s2 = (mySamp, i2) : (+(1), _, _) : rdtable;
thisPlayer = s1 + d * (s2 - s1);
};
freq = hslider("freq", 10, 0.001, 10000, 0.001);
f1 = freq * 0.29999;
f2 = freq * 0.22321;
f3 = freq * 0.25361;
f4 = freq * 0.24344;
p1 = player(f1, noiseTab, noiseTabNsamp) <: (_, _);
p2 = player(f2, noiseTab, noiseTabNsamp) <: (_, _);
p3 = player(f3, noiseTab, noiseTabNsamp) <: (_, _);
p4 = player(f4, noiseTab, noiseTabNsamp) <: (_, _);
split = (_ <: (_, _));
split4 = (split, split, split, split);
per1(a, b, c, d, e, f, g, h) = (b, c, d, e, f, g, h, a);
per2(a, b, c, d, e, f, g, h) = (a, c, b, d, e, g, f, h);
per3(a, b, c, d, e, f, g, h) = (a, e, b, f, c, g, d, h);
interlace2(n) = si.bus(2*n) <: par(i, n, (ba.selector(i, 2*n), ba.selector(i+n, 2*n)));
envBlock = (p1, p2, p3, p4) : per1 : (*, *, *, *) : split4 : per2 : (+, -, +, -) : split4 : per3 : (+, -, +, -) ;
del1 = de.fdelay(delMaxNsamp, 0);
del2 = de.fdelay(delMaxNsamp, 25 * ma.SR / 1000.0);
del3 = de.fdelay(delMaxNsamp, 17.7 * ma.SR / 1000.0);
del4 = de.fdelay(delMaxNsamp, 9.3 * ma.SR / 1000.0);
process = (_ <: (del1, del2, del3, del4)), envBlock : interlace2(4) : (*, *, *, *) :> _;
noiseTab = waveform {
-0.006256104,-0.044067383,-0.076202393,-0.101959229,-0.120666504,-0.131958008,-0.135681152,-0.131866455,-0.120605469,-0.102600098,
-0.078186035,-0.048309326,-0.013824463,0.024353027,0.065002441,0.107147217,0.149658203,0.191436768,0.231414795,0.268737793,
0.302520752,0.331970215,0.356750488,0.376251221,0.390289307,0.398742676,0.401763916,0.399475098,0.392242432,0.380554199,
0.364898682,0.346038818,0.324554443,0.301239014,0.276824951,0.252044678,0.227630615,0.204193115,0.182373047,0.162689209,
0.145599365,0.131408691,0.120422363,0.112762451,0.10848999,0.107574463,0.110015869,0.115447998,0.123748779,0.13458252,
0.147583008,0.162353516,0.178497314,0.195587158,0.213195801,0.230865479,0.248168945,0.264862061,0.280303955,0.294372559,
0.306610107,0.316894531,0.324890137,0.330352783,0.333221436,0.333343506,0.330657959,0.325073242,0.316741943,0.30569458,
0.291870117,0.275726318,0.257171631,0.236633301,0.214416504,0.190734863,0.166107178,0.14074707,0.115264893,0.090026855,
0.065490723,0.042236328,0.020629883,0.00112915,-0.015777588,-0.029754639,-0.040435791,-0.047515869,-0.05078125,-0.050079346,
-0.045349121,-0.036529541,-0.023803711,-0.007293701,0.012664795,0.035766602,0.06161499,0.089691162,0.119476318,0.15032959,
0.181732178,0.21295166,0.243530273,0.272705078,0.300018311,0.325012207,0.347137451,0.366088867,0.381561279,0.3934021,
0.401397705,0.405609131,0.406097412,0.403076172,0.396636963,0.387176514,0.375,0.360412598,0.343963623,0.325927734,
0.306640625,0.286621094,0.266113281,0.245361328,0.22467041,0.20413208,0.183898926,0.163970947,0.144378662,0.125061035,
0.105926514,0.086700439,0.067443848,0.047851563,0.027862549,0.007324219,-0.01373291,-0.035461426,-0.057739258,-0.080444336,
-0.103363037,-0.126220703,-0.148651123,-0.170318604,-0.190643311,-0.209106445,-0.225189209,-0.23828125,-0.24786377,-0.253417969,
-0.254425049,-0.250518799,-0.241485596,-0.226989746,-0.20703125,-0.18170166,-0.1512146,-0.115905762,-0.076324463,-0.03302002,
0.013092041,0.061309814,0.110626221,0.160064697,0.208587646,0.255157471,0.298797607,0.338592529,0.373626709,0.403198242,
0.426849365,0.443939209,0.454315186,0.457855225,0.454650879,0.444976807,0.429260254,0.408050537,0.382080078,0.352203369,
0.319274902,0.284240723,0.248046875,0.211608887,0.175872803,0.141601563,0.109527588,0.080169678,0.054046631,0.031341553,
0.012145996,-0.003479004,-0.015838623,-0.025268555,-0.032226563,-0.03729248,-0.041137695,-0.044281006,-0.047576904,-0.051605225,
-0.056945801,-0.064086914,-0.073394775,-0.085144043,-0.099365234,-0.115997314,-0.134735107,-0.155181885,-0.176696777,-0.198577881,
-0.219970703,-0.239929199,-0.257476807,-0.271636963,-0.281433105,-0.286010742,-0.284423828,-0.276275635,-0.260955811,-0.238311768,
-0.208251953,-0.171081543,-0.127288818,-0.077545166,-0.022918701,0.035430908,0.096191406,0.157806396,0.218536377,0.276916504,
0.331115723,0.379516602,0.420654297,0.453125,0.475799561,0.487792969,0.488464355,0.477539063,0.454986572,0.421295166,
0.37713623,0.323577881,0.261871338,0.193756104,0.121002197,0.045623779,-0.030303955,-0.104614258,-0.175201416,-0.239990234,
-0.297119141,-0.344848633,-0.381835938,-0.406890869,-0.419311523,-0.418701172,-0.405029297,-0.378692627,-0.340606689,-0.291656494,
-0.23348999,-0.167816162,-0.096588135,-0.021942139,0.05380249,0.128448486,0.199645996,0.265411377,0.323638916,0.372650146,
0.410888672,0.437347412,0.451263428,0.452178955,0.440155029,0.415618896,0.379272461,0.332366943,0.276275635,0.21270752,
0.143676758,0.071044922,-0.002716064,-0.075775146,-0.145843506,-0.210968018,-0.269348145,-0.319366455,-0.359771729,-0.389587402,
-0.408081055,-0.41506958,-0.410522461,-0.394958496,-0.369018555,-0.33380127,-0.290588379,-0.240905762,-0.186401367,-0.128875732,
-0.070129395,-0.011962891,0.04385376,0.095825195,0.142425537,0.1824646,0.215087891,0.239501953,0.255310059,0.262481689,
0.261138916,0.25177002,0.235107422,0.211975098,0.183532715,0.151031494,0.115783691,0.079162598,0.042449951,0.007049561,
-0.025848389,-0.055236816,-0.080108643,-0.099884033,-0.113922119,-0.12197876,-0.124023438,-0.120117188,-0.110687256,-0.096313477,
-0.077636719,-0.055389404,-0.030639648,-0.004241943,0.022705078,0.049316406,0.074645996,0.097869873,0.118103027,0.134918213,
0.147766113,0.15625,0.160369873,0.160003662,0.155334473,0.14654541,0.134124756,0.118499756,0.100250244,0.079956055,
0.058197021,0.035644531,0.0128479,-0.009674072,-0.031402588,-0.052032471,-0.07119751,-0.088745117,-0.104492188,-0.118499756,
-0.130645752,-0.141265869,-0.150360107,-0.158172607,-0.164886475,-0.17074585,-0.17590332,-0.180511475,-0.184661865,-0.188293457,
-0.191558838,-0.194152832,-0.195983887,-0.196716309,-0.196228027,-0.193939209,-0.18963623,-0.182891846,-0.173309326,-0.160644531,
-0.144470215,-0.124725342,-0.101257324,-0.074066162,-0.043273926,-0.009063721,0.028045654,0.067718506,0.109283447,0.152038574,
0.19519043,0.237854004,0.279144287,0.31817627,0.354003906,0.385925293,0.412994385,0.434692383,0.450408936,0.45980835,
0.462615967,0.458831787,0.448547363,0.432128906,0.410003662,0.3828125,0.351348877,0.316497803,0.27923584,0.240570068,
0.201599121,0.163330078,0.126831055,0.09286499,0.062408447,0.03604126,0.014404297,-0.002227783,-0.01373291,-0.020080566,
-0.021484375,-0.018280029,-0.011138916,-0.000518799,0.012481689,0.02722168,0.042633057,0.057800293,0.071746826,0.083526611,
0.092407227,0.097503662,0.098327637,0.094390869,0.085418701,0.071258545,0.052062988,0.028015137,-0.000549316,-0.033111572,
-0.068847656,-0.107208252,-0.147247314,-0.188171387,-0.229003906,-0.268981934,-0.307281494,-0.343139648,-0.376068115,-0.405395508,
-0.430877686,-0.452270508,-0.469482422,-0.482574463,-0.491790771,-0.497467041,-0.5,-0.49987793,-0.497741699,-0.494140625,
-0.489654541,-0.484863281,-0.480316162,-0.476287842,-0.473266602,-0.471374512,-0.470672607,-0.471160889,-0.472625732,-0.474731445,
-0.476989746,-0.478912354,-0.479888916,-0.479217529,-0.476226807,-0.470153809,-0.460418701,-0.446350098,-0.427490234,-0.403442383,
-0.373962402,-0.339019775,-0.298583984,-0.253082275,-0.202850342,-0.148681641,-0.091217041,-0.03137207,0.029602051,0.090759277,
0.150817871,0.208618164,0.262878418,0.312438965,0.356323242,0.393432617,0.423065186,0.444671631,0.457702637,0.462005615,
0.457580566,0.444702148,0.423858643,0.3956604,0.360992432,0.320861816,0.276489258,0.229064941,0.179992676,0.130554199,
0.08215332,0.03616333 }; |
8f26ddf70320415876aa67ab4d911632457c0f67e73c5ddc8354adc5b9e3dcff | jatinchowdhury18/CrossroadsEffects | test_evolve_gen.dsp | import("stdfaust.lib");
unit_delay_b781e2f7 = @(1);
gain_bcdd61d6 = _*1.0;
split_0afcca1b = _ <: (unit_delay_b781e2f7), (gain_bcdd61d6) :> _;
unit_delay_08aaabe4 = @(1);
gain_df56d5f1 = _*1.0;
unit_delay_95a9f64c = @(1);
split_1b3af4fc = _ <: _, (gain_df56d5f1 : unit_delay_95a9f64c) :> _;
gain_1e1ae59f = _*1.0;
gain_5593d5e3 = _*1.0;
split_179bb9d1 = _ <: _, (gain_5593d5e3) :> _;
delay_8437b3b5 = @(2);
unit_delay_3e7973fc = @(1);
split_263152df = _ <: _, (unit_delay_3e7973fc) :> _;
gain_dbc941d5 = _*1.0;
split_8847f360 = _ <: _, (gain_dbc941d5) :> _;
unit_delay_db7c250c = @(1);
split_e68f5db4 = _ <: (split_0afcca1b : unit_delay_08aaabe4 : split_1b3af4fc : gain_1e1ae59f), (split_179bb9d1 : delay_8437b3b5 : split_263152df : split_8847f360 : unit_delay_db7c250c) :> _;
unit_delay_e4607853 = @(1);
gain_83f60106 = _*1.0;
split_d9f6e5c3 = _ <: (unit_delay_e4607853), (gain_83f60106) :> _;
unit_delay_b3e56e9d = @(1);
gain_a2add5b9 = _*1.0;
unit_delay_bf7270df = @(1);
split_071b8d3e = _ <: _, (gain_a2add5b9 : unit_delay_bf7270df) :> _;
gain_1acb0bec = _*1.0;
gain_19a0de10 = _*1.0;
split_847e02c8 = _ <: _, (gain_19a0de10) :> _;
unit_delay_a5fed8fa = @(1);
unit_delay_f55b28f5 = @(1);
split_b7dabbb4 = _ <: _, (unit_delay_f55b28f5) :> _;
gain_5e0880e6 = _*1.0;
split_95cd573d = _ <: _, (gain_5e0880e6) :> _;
unit_delay_31a56c6c = @(1);
split_a563e073 = _ <: (split_d9f6e5c3 : unit_delay_b3e56e9d : split_071b8d3e : gain_1acb0bec), (split_847e02c8 : unit_delay_a5fed8fa : split_b7dabbb4 : split_95cd573d : unit_delay_31a56c6c) :> _;
gain_f5373753 = _*1.0;
split_4e676f4a = _ <: _, (gain_f5373753) :> _;
unit_delay_684727da = @(1);
gain_0fea64bf = _*1.0;
unit_delay_a94ec2ae = @(1);
split_0a2b7362 = _ <: _, (gain_0fea64bf : unit_delay_a94ec2ae) :> _;
gain_010baab6 = _*1.0;
gain_aa62326f = _*1.0;
split_450f379a = _ <: _, (gain_aa62326f) :> _;
unit_delay_0c4236d1 = @(1);
unit_delay_5a3d259d = @(1);
split_5c6ca349 = _ <: _, (unit_delay_5a3d259d) :> _;
gain_c638d171 = _*1.0;
split_198bc188 = _ <: _, (gain_c638d171) :> _;
unit_delay_4e16fbe3 = @(1);
split_fe2ece51 = _ <: (split_4e676f4a : unit_delay_684727da : split_0a2b7362 : gain_010baab6), (split_450f379a : unit_delay_0c4236d1 : split_5c6ca349 : split_198bc188 : unit_delay_4e16fbe3) :> _;
gain_91fb1419 = _*1.0;
unit_delay_4005342d = @(1);
split_72080189 = _ <: _, (gain_91fb1419 : unit_delay_4005342d) :> _;
split_3b0d1c62 = _ <: (split_e68f5db4), (split_a563e073 : split_fe2ece51 : split_72080189) :> _;
process = _,_ : split_3b0d1c62,split_3b0d1c62 : _,_;
| https://raw.githubusercontent.com/jatinchowdhury18/CrossroadsEffects/9a4ece57ce439103369f6c36bc1d74bec9043d64/faust_scripts/test_evolve_gen.dsp | faust | import("stdfaust.lib");
unit_delay_b781e2f7 = @(1);
gain_bcdd61d6 = _*1.0;
split_0afcca1b = _ <: (unit_delay_b781e2f7), (gain_bcdd61d6) :> _;
unit_delay_08aaabe4 = @(1);
gain_df56d5f1 = _*1.0;
unit_delay_95a9f64c = @(1);
split_1b3af4fc = _ <: _, (gain_df56d5f1 : unit_delay_95a9f64c) :> _;
gain_1e1ae59f = _*1.0;
gain_5593d5e3 = _*1.0;
split_179bb9d1 = _ <: _, (gain_5593d5e3) :> _;
delay_8437b3b5 = @(2);
unit_delay_3e7973fc = @(1);
split_263152df = _ <: _, (unit_delay_3e7973fc) :> _;
gain_dbc941d5 = _*1.0;
split_8847f360 = _ <: _, (gain_dbc941d5) :> _;
unit_delay_db7c250c = @(1);
split_e68f5db4 = _ <: (split_0afcca1b : unit_delay_08aaabe4 : split_1b3af4fc : gain_1e1ae59f), (split_179bb9d1 : delay_8437b3b5 : split_263152df : split_8847f360 : unit_delay_db7c250c) :> _;
unit_delay_e4607853 = @(1);
gain_83f60106 = _*1.0;
split_d9f6e5c3 = _ <: (unit_delay_e4607853), (gain_83f60106) :> _;
unit_delay_b3e56e9d = @(1);
gain_a2add5b9 = _*1.0;
unit_delay_bf7270df = @(1);
split_071b8d3e = _ <: _, (gain_a2add5b9 : unit_delay_bf7270df) :> _;
gain_1acb0bec = _*1.0;
gain_19a0de10 = _*1.0;
split_847e02c8 = _ <: _, (gain_19a0de10) :> _;
unit_delay_a5fed8fa = @(1);
unit_delay_f55b28f5 = @(1);
split_b7dabbb4 = _ <: _, (unit_delay_f55b28f5) :> _;
gain_5e0880e6 = _*1.0;
split_95cd573d = _ <: _, (gain_5e0880e6) :> _;
unit_delay_31a56c6c = @(1);
split_a563e073 = _ <: (split_d9f6e5c3 : unit_delay_b3e56e9d : split_071b8d3e : gain_1acb0bec), (split_847e02c8 : unit_delay_a5fed8fa : split_b7dabbb4 : split_95cd573d : unit_delay_31a56c6c) :> _;
gain_f5373753 = _*1.0;
split_4e676f4a = _ <: _, (gain_f5373753) :> _;
unit_delay_684727da = @(1);
gain_0fea64bf = _*1.0;
unit_delay_a94ec2ae = @(1);
split_0a2b7362 = _ <: _, (gain_0fea64bf : unit_delay_a94ec2ae) :> _;
gain_010baab6 = _*1.0;
gain_aa62326f = _*1.0;
split_450f379a = _ <: _, (gain_aa62326f) :> _;
unit_delay_0c4236d1 = @(1);
unit_delay_5a3d259d = @(1);
split_5c6ca349 = _ <: _, (unit_delay_5a3d259d) :> _;
gain_c638d171 = _*1.0;
split_198bc188 = _ <: _, (gain_c638d171) :> _;
unit_delay_4e16fbe3 = @(1);
split_fe2ece51 = _ <: (split_4e676f4a : unit_delay_684727da : split_0a2b7362 : gain_010baab6), (split_450f379a : unit_delay_0c4236d1 : split_5c6ca349 : split_198bc188 : unit_delay_4e16fbe3) :> _;
gain_91fb1419 = _*1.0;
unit_delay_4005342d = @(1);
split_72080189 = _ <: _, (gain_91fb1419 : unit_delay_4005342d) :> _;
split_3b0d1c62 = _ <: (split_e68f5db4), (split_a563e073 : split_fe2ece51 : split_72080189) :> _;
process = _,_ : split_3b0d1c62,split_3b0d1c62 : _,_;
|
|
89b7201adefd9f3b2f9c45ee482a65c1a3bb7729a514429187eb80ec2132301a | jatinchowdhury18/wdf-bakeoff | baxandall.dsp | import("stdfaust.lib");
baxandall(in1) = wd.buildtree(tree)
with {
// Resistors
Pt_plus(i) = wd.resistor(i, 100.0e3 - p_Treble_ui);
Resd(i) = wd.resistor(i, 10.0e3);
Pt_minus(i) = wd.resistor(i, p_Treble_ui);
Rese(i) = wd.resistor(i, 1.0e3);
Rl(i) = wd.resistor_Vout(i, 1.0e6);
Resc(i) = wd.resistor(i, 10.0e3);
Pb_minus(i) = wd.resistor(i, p_Bass_ui);
Resb(i) = wd.resistor(i, 1.0e3);
Pb_plus(i) = wd.resistor(i, 100.0e3 - p_Bass_ui);
Resa(i) = wd.resistor(i, 10.0e3);
// Capacitors
Cd(i) = wd.capacitor(i, 6.4e-9);
Ce(i) = wd.capacitor(i, 64.0e-9);
Cc(i) = wd.capacitor(i, 220.0e-9);
Cb(i) = wd.capacitor(i, 22.0e-9);
Ca(i) = wd.capacitor(i, 1.0e-6);
Vin(i) = wd.resVoltage(i, 1.0, in1);
// UI controls
p_Treble_ui = hslider("Treble", 50, 0, 100, 1)/100 * 100.0e3;
p_Bass_ui = hslider("Bass", 50, 0, 100, 1)/100 * 100.0e3;
//connection tree parts
tree = u_6port : (a, b, c, d, e, f)
with{
a = wd.series : (Cd, (wd.parallel : (Pt_plus, Resd)));
// b = wd.parallel : (Pt_minus, Rese);
b = wd.parallel : (Rl, (wd.series : (Ce, (wd.parallel : (Pt_minus, Rese)))));
c = Resc;
d = wd.series : (Resb, (wd.parallel : (Pb_minus, Cc)));
e = wd.series : (Resa, (wd.parallel : (Pb_plus, Cb)));
f = wd.series : (Vin, Ca);
};
u_6port(i) = wd.u_genericNode(i, sixport_scatter)
with{
sixport_scatter(Ra, Rb, Rc, Rd, Re, Rf) = matrix(6, 6, scatter)
with{
scatter =
case{
(1, 1) => -2 * ((Rb + Rc) * Rd + (Rb + Rc + Rd) * Re + (Rb + Rc + Rd) * Rf) * Ra / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf) + 1;
(1, 2) => -2 * (Rc * Rd + (Rc + Rd) * Re + Rc * Rf) * Ra / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(1, 3) => 2 * (Rb * Rd + Rb * Re + (Rb + Rd) * Rf) * Ra / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(1, 4) => -2 * (Rb * Re - Rc * Rf) * Ra / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(1, 5) => 2 * (Rb * Rd + (Rb + Rc + Rd) * Rf) * Ra / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(1, 6) => -2 * (Rc * Rd + (Rb + Rc + Rd) * Re) * Ra / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(2, 1) => -2 * (Rc * Rd + (Rc + Rd) * Re + Rc * Rf) * Rb / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(2, 2) => -2 * ((Ra + Rc) * Rd + (Ra + Rc + Rd) * Re + (Ra + Rc + Re) * Rf) * Rb / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf) + 1;
(2, 3) => -2 * (Ra * Rd + Ra * Re + (Ra + Re) * Rf) * Rb / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(2, 4) => 2 * (Ra * Re + (Ra + Rc + Re) * Rf) * Rb / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(2, 5) => -2 * (Ra * Rd - Rc * Rf) * Rb / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(2, 6) => -2 * ((Ra + Rc) * Rd + (Rc + Rd) * Re) * Rb / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(3, 1) => 2 * (Rb * Rd + Rb * Re + (Rb + Rd) * Rf) * Rc / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(3, 2) => -2 * (Ra * Rd + Ra * Re + (Ra + Re) * Rf) * Rc / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(3, 3) => -2 * ((Ra + Rb) * Rd + (Ra + Rb) * Re + (Ra + Rb + Rd + Re) * Rf) * Rc / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf) + 1;
(3, 4) => 2 * ((Ra + Rb) * Re + (Ra + Re) * Rf) * Rc / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(3, 5) => -2 * ((Ra + Rb) * Rd + (Rb + Rd) * Rf) * Rc / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(3, 6) => -2 * (Ra * Rd - Rb * Re) * Rc / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(4, 1) => -2 * (Rb * Re - Rc * Rf) * Rd / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(4, 2) => 2 * (Ra * Re + (Ra + Rc + Re) * Rf) * Rd / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(4, 3) => 2 * ((Ra + Rb) * Re + (Ra + Re) * Rf) * Rd / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(4, 4) => -2 * (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Re + (Ra + Rc + Re) * Rf) * Rd / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf) + 1;
(4, 5) => -2 * (Ra * Rb + (Ra + Rb) * Rc + Rc * Rf) * Rd / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(4, 6) => -2 * (Ra * Rb + (Ra + Rb) * Rc + Rb * Re) * Rd / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(5, 1) => 2 * (Rb * Rd + (Rb + Rc + Rd) * Rf) * Re / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(5, 2) => -2 * (Ra * Rd - Rc * Rf) * Re / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(5, 3) => -2 * ((Ra + Rb) * Rd + (Rb + Rd) * Rf) * Re / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(5, 4) => -2 * (Ra * Rb + (Ra + Rb) * Rc + Rc * Rf) * Re / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(5, 5) => -2 * (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd + (Rb + Rc + Rd) * Rf) * Re / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf) + 1;
(5, 6) => -2 * (Ra * Rb + (Ra + Rb) * Rc + Ra * Rd) * Re / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(6, 1) => -2 * (Rc * Rd + (Rb + Rc + Rd) * Re) * Rf / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(6, 2) => -2 * ((Ra + Rc) * Rd + (Rc + Rd) * Re) * Rf / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(6, 3) => -2 * (Ra * Rd - Rb * Re) * Rf / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(6, 4) => -2 * (Ra * Rb + (Ra + Rb) * Rc + Rb * Re) * Rf / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(6, 5) => -2 * (Ra * Rb + (Ra + Rb) * Rc + Ra * Rd) * Rf / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(6, 6) => -2 * (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf) + 1;
(i, j) => 10;
};
matrix(M,N,f) = si.bus(N) <: ro.interleave(N,M) : par(n,N, par(m,M,*(f(m+1,n+1)))) :> si.bus(M);
};
};
};
// process = no.pink_noise <: baxandall , baxandall;
process = baxandall;
| https://raw.githubusercontent.com/jatinchowdhury18/wdf-bakeoff/6b44a28c66d6b4f20cdd8aed9593f562200e7c2c/src/faust_wdf/baxandall.dsp | faust | Resistors
Capacitors
UI controls
connection tree parts
b = wd.parallel : (Pt_minus, Rese);
process = no.pink_noise <: baxandall , baxandall; | import("stdfaust.lib");
baxandall(in1) = wd.buildtree(tree)
with {
Pt_plus(i) = wd.resistor(i, 100.0e3 - p_Treble_ui);
Resd(i) = wd.resistor(i, 10.0e3);
Pt_minus(i) = wd.resistor(i, p_Treble_ui);
Rese(i) = wd.resistor(i, 1.0e3);
Rl(i) = wd.resistor_Vout(i, 1.0e6);
Resc(i) = wd.resistor(i, 10.0e3);
Pb_minus(i) = wd.resistor(i, p_Bass_ui);
Resb(i) = wd.resistor(i, 1.0e3);
Pb_plus(i) = wd.resistor(i, 100.0e3 - p_Bass_ui);
Resa(i) = wd.resistor(i, 10.0e3);
Cd(i) = wd.capacitor(i, 6.4e-9);
Ce(i) = wd.capacitor(i, 64.0e-9);
Cc(i) = wd.capacitor(i, 220.0e-9);
Cb(i) = wd.capacitor(i, 22.0e-9);
Ca(i) = wd.capacitor(i, 1.0e-6);
Vin(i) = wd.resVoltage(i, 1.0, in1);
p_Treble_ui = hslider("Treble", 50, 0, 100, 1)/100 * 100.0e3;
p_Bass_ui = hslider("Bass", 50, 0, 100, 1)/100 * 100.0e3;
tree = u_6port : (a, b, c, d, e, f)
with{
a = wd.series : (Cd, (wd.parallel : (Pt_plus, Resd)));
b = wd.parallel : (Rl, (wd.series : (Ce, (wd.parallel : (Pt_minus, Rese)))));
c = Resc;
d = wd.series : (Resb, (wd.parallel : (Pb_minus, Cc)));
e = wd.series : (Resa, (wd.parallel : (Pb_plus, Cb)));
f = wd.series : (Vin, Ca);
};
u_6port(i) = wd.u_genericNode(i, sixport_scatter)
with{
sixport_scatter(Ra, Rb, Rc, Rd, Re, Rf) = matrix(6, 6, scatter)
with{
scatter =
case{
(1, 1) => -2 * ((Rb + Rc) * Rd + (Rb + Rc + Rd) * Re + (Rb + Rc + Rd) * Rf) * Ra / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf) + 1;
(1, 2) => -2 * (Rc * Rd + (Rc + Rd) * Re + Rc * Rf) * Ra / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(1, 3) => 2 * (Rb * Rd + Rb * Re + (Rb + Rd) * Rf) * Ra / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(1, 4) => -2 * (Rb * Re - Rc * Rf) * Ra / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(1, 5) => 2 * (Rb * Rd + (Rb + Rc + Rd) * Rf) * Ra / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(1, 6) => -2 * (Rc * Rd + (Rb + Rc + Rd) * Re) * Ra / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(2, 1) => -2 * (Rc * Rd + (Rc + Rd) * Re + Rc * Rf) * Rb / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(2, 2) => -2 * ((Ra + Rc) * Rd + (Ra + Rc + Rd) * Re + (Ra + Rc + Re) * Rf) * Rb / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf) + 1;
(2, 3) => -2 * (Ra * Rd + Ra * Re + (Ra + Re) * Rf) * Rb / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(2, 4) => 2 * (Ra * Re + (Ra + Rc + Re) * Rf) * Rb / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(2, 5) => -2 * (Ra * Rd - Rc * Rf) * Rb / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(2, 6) => -2 * ((Ra + Rc) * Rd + (Rc + Rd) * Re) * Rb / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(3, 1) => 2 * (Rb * Rd + Rb * Re + (Rb + Rd) * Rf) * Rc / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(3, 2) => -2 * (Ra * Rd + Ra * Re + (Ra + Re) * Rf) * Rc / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(3, 3) => -2 * ((Ra + Rb) * Rd + (Ra + Rb) * Re + (Ra + Rb + Rd + Re) * Rf) * Rc / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf) + 1;
(3, 4) => 2 * ((Ra + Rb) * Re + (Ra + Re) * Rf) * Rc / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(3, 5) => -2 * ((Ra + Rb) * Rd + (Rb + Rd) * Rf) * Rc / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(3, 6) => -2 * (Ra * Rd - Rb * Re) * Rc / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(4, 1) => -2 * (Rb * Re - Rc * Rf) * Rd / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(4, 2) => 2 * (Ra * Re + (Ra + Rc + Re) * Rf) * Rd / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(4, 3) => 2 * ((Ra + Rb) * Re + (Ra + Re) * Rf) * Rd / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(4, 4) => -2 * (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Re + (Ra + Rc + Re) * Rf) * Rd / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf) + 1;
(4, 5) => -2 * (Ra * Rb + (Ra + Rb) * Rc + Rc * Rf) * Rd / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(4, 6) => -2 * (Ra * Rb + (Ra + Rb) * Rc + Rb * Re) * Rd / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(5, 1) => 2 * (Rb * Rd + (Rb + Rc + Rd) * Rf) * Re / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(5, 2) => -2 * (Ra * Rd - Rc * Rf) * Re / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(5, 3) => -2 * ((Ra + Rb) * Rd + (Rb + Rd) * Rf) * Re / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(5, 4) => -2 * (Ra * Rb + (Ra + Rb) * Rc + Rc * Rf) * Re / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(5, 5) => -2 * (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd + (Rb + Rc + Rd) * Rf) * Re / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf) + 1;
(5, 6) => -2 * (Ra * Rb + (Ra + Rb) * Rc + Ra * Rd) * Re / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(6, 1) => -2 * (Rc * Rd + (Rb + Rc + Rd) * Re) * Rf / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(6, 2) => -2 * ((Ra + Rc) * Rd + (Rc + Rd) * Re) * Rf / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(6, 3) => -2 * (Ra * Rd - Rb * Re) * Rf / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(6, 4) => -2 * (Ra * Rb + (Ra + Rb) * Rc + Rb * Re) * Rf / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(6, 5) => -2 * (Ra * Rb + (Ra + Rb) * Rc + Ra * Rd) * Rf / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf);
(6, 6) => -2 * (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf / ((Ra * Rb + (Ra + Rb) * Rc) * Rd + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rb) * Rd) * Re + (Ra * Rb + (Ra + Rb) * Rc + (Ra + Rc) * Rd + (Rb + Rc + Rd) * Re) * Rf) + 1;
(i, j) => 10;
};
matrix(M,N,f) = si.bus(N) <: ro.interleave(N,M) : par(n,N, par(m,M,*(f(m+1,n+1)))) :> si.bus(M);
};
};
};
process = baxandall;
|
483fe550e271ed483aab4131b3cbbca8b66d807f7d56a34b060b46303f20246e | jatinchowdhury18/wdf-bakeoff | pultec.dsp | import("stdfaust.lib");
pultec(in1) = wd.buildtree(tree)
with{
//resistors and potentiometers
p_HB_p(i) = wd.resistor(i, (10.0e4 - p_HB_ui + 1));
p_HB_m(i) = wd.resistor(i, (p_HB_ui + 1));
p_HBQ(i) = wd.resistor(i, (p_HBQ_ui+1));
p_LC(i) = wd.resistor(i, (p_LC_ui +1));
p_HC_p(i) = wd.resistor(i, (1.0e3 - p_HC_ui + 1));
p_HC_m(i) = wd.resistor(i, (p_HC_ui + 1));
p_BL(i) = wd.resistor(i, (p_BL_ui + 1));
r_a(i) = wd.resistor(i, 570);
r_b(i) = wd.resistor(i, 1.0e3);
r_c(i) = wd.resistor(i, 75);
r_d(i) = wd.resistor_Vout(i, 10.0e3);
//capacitors
c_HBF(i) = wd.capacitor(i, cl_HBF_ui(0));
c_HCF(i) = wd.capacitor(i, c_HCF_ui);
c_LF_a(i) = wd.capacitor(i, c_LF_ui(0));
c_LF_b(i) = wd.capacitor(i, c_LF_ui(1));
//inductor
l_HBF(i) = wd.inductor(i, cl_HBF_ui(1));
//voltage input
vin(i) = wd.resVoltage(i, 10, in1);
//connection tree parts
tree = u_6port : (a, b, c, d, e, f)
with{
a = wd.series : (p_HC_m, (wd.parallel : (p_LC, c_LF_a)));
b = wd.series : (p_HC_p, (wd.parallel : (p_HC_m, (wd.series : (c_HCF, r_c)))));
c = r_b;
d = r_d;
e = wd.parallel : (c_LF_b, p_BL);
f = wd.series : ((wd.series : (p_HB_p, (wd.parallel : (vin, r_a)))), (wd.parallel : (p_HB_m, (wd.series : (p_HBQ, (wd.series : (l_HBF, c_HBF)))))));
};
//approximate a potentiometer position as an audio taper (log) resistance (%)
log_pot(slider) = 10^(slider/50) - 1;
//approximate a potentiometer postion as an inverse log resistance (%)
invlog_pot(slider) = (slider+1) : log10*50;
//ui-elements
p_HB_ui = log_pot(hslider("h:PULTEC PROGRAM EQUALIZER/v:[2]HIGH FREQUENCY/h:[0]KNOBS/[0]BOOST[style:knob]", 0, 0, 100, 1))/100 * 10.0e4;
p_HC_ui = invlog_pot(hslider("h:PULTEC PROGRAM EQUALIZER/v:[2]HIGH FREQUENCY/h:[0]KNOBS/[1]ATTEN[style:knob]", 0, 0, 100, 1))/100 * 1.0e3;
p_HBQ_ui = log_pot(hslider("h:PULTEC PROGRAM EQUALIZER/v:[1]BANDWIDTH/ADJUST[style:knob]", 0, 0, 100, 1))/100 * 2.2e3;
p_BL_ui = log_pot(hslider("h:PULTEC PROGRAM EQUALIZER/v:[0]LOW FREQUENCY/h:[0]KNOBS/[0]BOOST[style:knob]", 0, 0, 100, 1))/100 * 10.0e4;
p_LC_ui = log_pot(hslider("h:PULTEC PROGRAM EQUALIZER/v:[0]LOW FREQUENCY/h:[0]KNOBS/[1]ATTEN[style:knob]", 0, 0, 100, 1))/100 * 100.0e1;
cl_HBF_ui =
case{
(0) => (15.0e-9, 15.0e-9, 10.0e-9, 10.0e-9, 6.8e-9, 6.8e-9, 15.0e-9) : ba.selectn(7, switch_HBF); //capacitor switched values
(1) => (175.0e-3, 100.0e-3, 90.0e-3, 65.0e-3, 35.0e-3, 23.0e-3, 19.0e-3) : ba.selectn(7, switch_HBF);//inductor switched values
//(3kHz, 4kHz, 5kHz, 6kHz, 10kHz, 12kHz, 16kHz)
(x) => 5;
}with{
switch_HBF = hslider("h:PULTEC PROGRAM EQUALIZER/v:[2]HIGH FREQUENCY/[1]CPS[style:menu{'3 kHz':0;'4 kHz':1;'5 kHz':2;'6 kHz':3;'10 kHz':4;'12 kHz':5;'16 kHz':6}]", 0, 0, 6, 1);
};
c_LF_ui =
case{
(0) => (100.0e-9, 47.0e-9, 22.0e-9, 15.0e-9) : ba.selectn(4, switch_LF); //capacitor switched values
(1) => (2.2e-6, 1.0e-6, 470.0e-9, 330.0e-9) : ba.selectn(4, switch_LF);//inductor switched values
//(20hz, 30hz, 60hz, 100hz)
(x) => 5;
}with{
switch_LF = hslider("h:PULTEC PROGRAM EQUALIZER/v:[0]LOW FREQUENCY/[1]CPS[style:menu{'20 Hz':0;'30 Hz':1;'60 Hz':2;'100 Hz':3}]", 0, 0, 3, 1);
};
c_HCF_ui = (47.0e-9, 94.0e-9, 197.0e-9) : ba.selectn(3, switch_HCF) //capacitor switched values
//(20hz, 30hz, 60hz, 100hz)
with{
switch_HCF = hslider("h:PULTEC PROGRAM EQUALIZER/v:[3]ATTEN SELECT/HI-CUT F[style:menu{'20':0;'10':1;'5':2}]", 0, 0, 2, 1);
};
u_6port(i) = wd.u_genericNode(i, sixport_scatter)
with{
sixport_scatter(Ra, Rb, Rc, Rd, Re, Rf) = matrix(6, 6, scatter)
with{
scatter =
case{
(1, 1) => ((-Ra)*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf))
+ Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(1, 2) => (2*Ra*((Rc + Re)*Rf + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(1, 3) => (2*Ra*(Rb*Rd + Re*Rf + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(1, 4) => (-1)*((2*Ra*(Rb*(Rc + Re) + Rc*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(1, 5) => (2*Ra*(Rb*Rd - Rc*Rf))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(1, 6) => (-1)*((2*Ra*(Rc*Re + Rb*(Rc + Rd + Re)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(2, 1) => (2*Rb*((Rc + Re)*Rf + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(2, 2) => (Ra*(Rd*Re - Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) - Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf))
+ Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(2, 3) => (-1)*((2*Rb*(Ra*Re + Re*Rf + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(2, 4) => (-2*Ra*Rb*Re + 2*Rb*Rc*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(2, 5) => (2*Rb*(Ra*(Rc + Rd) + Rc*(Rd + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(2, 6) => (-1)*((2*Rb*(Rc*Rd + Ra*(Rc + Rd + Re)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(3, 1) => (2*Rc*(Rb*Rd + Re*Rf + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(3, 2) => (-1)*((2*Rc*(Ra*Re + Re*Rf + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(3, 3) => 1 - (2*Rc*(Rd*Re + Rd*Rf + Re*Rf + Rb*(Rd + Rf) + Ra*(Rb + Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(3, 4) => (-1)*((2*Rc*(Rb*Rf + Ra*(Rb + Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(3, 5) => (-1)*((2*Rc*(Ra*(Rb + Rf) + Rb*(Rd + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(3, 6) => (2*Rc*(Rb*Rd - Ra*Re))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(4, 1) => (-1)*((2*Rd*(Rb*(Rc + Re) + Rc*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(4, 2) => (-2*Ra*Rd*Re + 2*Rc*Rd*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(4, 3) => (-1)*((2*Rd*(Rb*Rf + Ra*(Rb + Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(4, 4) => 1 - (2*Rd*(Rc*(Re + Rf) + Ra*(Rb + Re + Rf) + Rb*(Rc + Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(4, 5) => (-1)*((2*Rd*((Rb + Rc)*Rf + Ra*(Rb + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(4, 6) => (-1)*((2*Rd*((Ra + Rc)*Re + Rb*(Rc + Re)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(5, 1) => (2*Re*(Rb*Rd - Rc*Rf))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(5, 2) => (2*Re*(Ra*(Rc + Rd) + Rc*(Rd + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(5, 3) => (-1)*((2*Re*(Ra*(Rb + Rf) + Rb*(Rd + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(5, 4) => (-1)*((2*Re*((Rb + Rc)*Rf + Ra*(Rb + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(5, 5) => 1 - (2*Re*((Rb + Rc)*(Rd + Rf) + Ra*(Rb + Rc + Rd + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(5, 6) => (2*((Rb + Rc)*Rd + Ra*(Rc + Rd))*Re)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(6, 1) => (-1)*((2*(Rc*Re + Rb*(Rc + Rd + Re))*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(6, 2) => (-1)*((2*(Rc*Rd + Ra*(Rc + Rd + Re))*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(6, 3) => (2*(Rb*Rd - Ra*Re)*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(6, 4) => (-1)*((2*((Ra + Rc)*Re + Rb*(Rc + Re))*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(6, 5) => (2*((Rb + Rc)*Rd + Ra*(Rc + Rd))*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(6, 6) => 1 - (2*(Rc*(Rd + Re) + Ra*(Rc + Rd + Re) + Rb*(Rc + Rd + Re))*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(i, j) => 10;
};
matrix(M,N,f) = si.bus(N) <: ro.interleave(N,M) : par(n,N, par(m,M,*(f(m+1,n+1)))) :> si.bus(M);
};
};
};
process = pultec*200;
// process = no.pink_noise <: pultec*200 , pultec*200;
| https://raw.githubusercontent.com/jatinchowdhury18/wdf-bakeoff/6b44a28c66d6b4f20cdd8aed9593f562200e7c2c/src/faust_wdf/pultec.dsp | faust | resistors and potentiometers
capacitors
inductor
voltage input
connection tree parts
approximate a potentiometer position as an audio taper (log) resistance (%)
approximate a potentiometer postion as an inverse log resistance (%)
ui-elements
capacitor switched values
inductor switched values
(3kHz, 4kHz, 5kHz, 6kHz, 10kHz, 12kHz, 16kHz)
capacitor switched values
inductor switched values
(20hz, 30hz, 60hz, 100hz)
capacitor switched values
(20hz, 30hz, 60hz, 100hz)
process = no.pink_noise <: pultec*200 , pultec*200; | import("stdfaust.lib");
pultec(in1) = wd.buildtree(tree)
with{
p_HB_p(i) = wd.resistor(i, (10.0e4 - p_HB_ui + 1));
p_HB_m(i) = wd.resistor(i, (p_HB_ui + 1));
p_HBQ(i) = wd.resistor(i, (p_HBQ_ui+1));
p_LC(i) = wd.resistor(i, (p_LC_ui +1));
p_HC_p(i) = wd.resistor(i, (1.0e3 - p_HC_ui + 1));
p_HC_m(i) = wd.resistor(i, (p_HC_ui + 1));
p_BL(i) = wd.resistor(i, (p_BL_ui + 1));
r_a(i) = wd.resistor(i, 570);
r_b(i) = wd.resistor(i, 1.0e3);
r_c(i) = wd.resistor(i, 75);
r_d(i) = wd.resistor_Vout(i, 10.0e3);
c_HBF(i) = wd.capacitor(i, cl_HBF_ui(0));
c_HCF(i) = wd.capacitor(i, c_HCF_ui);
c_LF_a(i) = wd.capacitor(i, c_LF_ui(0));
c_LF_b(i) = wd.capacitor(i, c_LF_ui(1));
l_HBF(i) = wd.inductor(i, cl_HBF_ui(1));
vin(i) = wd.resVoltage(i, 10, in1);
tree = u_6port : (a, b, c, d, e, f)
with{
a = wd.series : (p_HC_m, (wd.parallel : (p_LC, c_LF_a)));
b = wd.series : (p_HC_p, (wd.parallel : (p_HC_m, (wd.series : (c_HCF, r_c)))));
c = r_b;
d = r_d;
e = wd.parallel : (c_LF_b, p_BL);
f = wd.series : ((wd.series : (p_HB_p, (wd.parallel : (vin, r_a)))), (wd.parallel : (p_HB_m, (wd.series : (p_HBQ, (wd.series : (l_HBF, c_HBF)))))));
};
log_pot(slider) = 10^(slider/50) - 1;
invlog_pot(slider) = (slider+1) : log10*50;
p_HB_ui = log_pot(hslider("h:PULTEC PROGRAM EQUALIZER/v:[2]HIGH FREQUENCY/h:[0]KNOBS/[0]BOOST[style:knob]", 0, 0, 100, 1))/100 * 10.0e4;
p_HC_ui = invlog_pot(hslider("h:PULTEC PROGRAM EQUALIZER/v:[2]HIGH FREQUENCY/h:[0]KNOBS/[1]ATTEN[style:knob]", 0, 0, 100, 1))/100 * 1.0e3;
p_HBQ_ui = log_pot(hslider("h:PULTEC PROGRAM EQUALIZER/v:[1]BANDWIDTH/ADJUST[style:knob]", 0, 0, 100, 1))/100 * 2.2e3;
p_BL_ui = log_pot(hslider("h:PULTEC PROGRAM EQUALIZER/v:[0]LOW FREQUENCY/h:[0]KNOBS/[0]BOOST[style:knob]", 0, 0, 100, 1))/100 * 10.0e4;
p_LC_ui = log_pot(hslider("h:PULTEC PROGRAM EQUALIZER/v:[0]LOW FREQUENCY/h:[0]KNOBS/[1]ATTEN[style:knob]", 0, 0, 100, 1))/100 * 100.0e1;
cl_HBF_ui =
case{
(x) => 5;
}with{
switch_HBF = hslider("h:PULTEC PROGRAM EQUALIZER/v:[2]HIGH FREQUENCY/[1]CPS[style:menu{'3 kHz':0;'4 kHz':1;'5 kHz':2;'6 kHz':3;'10 kHz':4;'12 kHz':5;'16 kHz':6}]", 0, 0, 6, 1);
};
c_LF_ui =
case{
(x) => 5;
}with{
switch_LF = hslider("h:PULTEC PROGRAM EQUALIZER/v:[0]LOW FREQUENCY/[1]CPS[style:menu{'20 Hz':0;'30 Hz':1;'60 Hz':2;'100 Hz':3}]", 0, 0, 3, 1);
};
with{
switch_HCF = hslider("h:PULTEC PROGRAM EQUALIZER/v:[3]ATTEN SELECT/HI-CUT F[style:menu{'20':0;'10':1;'5':2}]", 0, 0, 2, 1);
};
u_6port(i) = wd.u_genericNode(i, sixport_scatter)
with{
sixport_scatter(Ra, Rb, Rc, Rd, Re, Rf) = matrix(6, 6, scatter)
with{
scatter =
case{
(1, 1) => ((-Ra)*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf))
+ Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(1, 2) => (2*Ra*((Rc + Re)*Rf + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(1, 3) => (2*Ra*(Rb*Rd + Re*Rf + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(1, 4) => (-1)*((2*Ra*(Rb*(Rc + Re) + Rc*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(1, 5) => (2*Ra*(Rb*Rd - Rc*Rf))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(1, 6) => (-1)*((2*Ra*(Rc*Re + Rb*(Rc + Rd + Re)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(2, 1) => (2*Rb*((Rc + Re)*Rf + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(2, 2) => (Ra*(Rd*Re - Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) - Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf))
+ Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(2, 3) => (-1)*((2*Rb*(Ra*Re + Re*Rf + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(2, 4) => (-2*Ra*Rb*Re + 2*Rb*Rc*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(2, 5) => (2*Rb*(Ra*(Rc + Rd) + Rc*(Rd + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(2, 6) => (-1)*((2*Rb*(Rc*Rd + Ra*(Rc + Rd + Re)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(3, 1) => (2*Rc*(Rb*Rd + Re*Rf + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(3, 2) => (-1)*((2*Rc*(Ra*Re + Re*Rf + Rd*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(3, 3) => 1 - (2*Rc*(Rd*Re + Rd*Rf + Re*Rf + Rb*(Rd + Rf) + Ra*(Rb + Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(3, 4) => (-1)*((2*Rc*(Rb*Rf + Ra*(Rb + Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(3, 5) => (-1)*((2*Rc*(Ra*(Rb + Rf) + Rb*(Rd + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(3, 6) => (2*Rc*(Rb*Rd - Ra*Re))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(4, 1) => (-1)*((2*Rd*(Rb*(Rc + Re) + Rc*(Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(4, 2) => (-2*Ra*Rd*Re + 2*Rc*Rd*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(4, 3) => (-1)*((2*Rd*(Rb*Rf + Ra*(Rb + Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(4, 4) => 1 - (2*Rd*(Rc*(Re + Rf) + Ra*(Rb + Re + Rf) + Rb*(Rc + Re + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(4, 5) => (-1)*((2*Rd*((Rb + Rc)*Rf + Ra*(Rb + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(4, 6) => (-1)*((2*Rd*((Ra + Rc)*Re + Rb*(Rc + Re)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(5, 1) => (2*Re*(Rb*Rd - Rc*Rf))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(5, 2) => (2*Re*(Ra*(Rc + Rd) + Rc*(Rd + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(5, 3) => (-1)*((2*Re*(Ra*(Rb + Rf) + Rb*(Rd + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(5, 4) => (-1)*((2*Re*((Rb + Rc)*Rf + Ra*(Rb + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(5, 5) => 1 - (2*Re*((Rb + Rc)*(Rd + Rf) + Ra*(Rb + Rc + Rd + Rf)))/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(5, 6) => (2*((Rb + Rc)*Rd + Ra*(Rc + Rd))*Re)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(6, 1) => (-1)*((2*(Rc*Re + Rb*(Rc + Rd + Re))*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(6, 2) => (-1)*((2*(Rc*Rd + Ra*(Rc + Rd + Re))*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(6, 3) => (2*(Rb*Rd - Ra*Re)*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(6, 4) => (-1)*((2*((Ra + Rc)*Re + Rb*(Rc + Re))*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf))));
(6, 5) => (2*((Rb + Rc)*Rd + Ra*(Rc + Rd))*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(6, 6) => 1 - (2*(Rc*(Rd + Re) + Ra*(Rc + Rd + Re) + Rb*(Rc + Rd + Re))*Rf)/(Ra*(Rd*Re + Rb*(Rc + Rd + Re) + Rd*Rf + Re*Rf + Rc*(Re + Rf)) + Rc*(Re*Rf + Rd*(Re + Rf)) + Rb*(Re*Rf + Rc*(Rd + Rf) + Rd*(Re + Rf)));
(i, j) => 10;
};
matrix(M,N,f) = si.bus(N) <: ro.interleave(N,M) : par(n,N, par(m,M,*(f(m+1,n+1)))) :> si.bus(M);
};
};
};
process = pultec*200;
|
8e05403ef025ff676d2643d46009bc7e1504a8585ff387fa09166d4a4432d899 | jatinchowdhury18/wdf-bakeoff | bassman.dsp | import("stdfaust.lib");
bassman(in1) = wd.buildtree(tree)
with {
// Resistors
Res1p(i) = wd.resistor(i, (1.0 - p_High_ui) * 250.0e3);
Res1m(i) = wd.resistor_Vout(i, p_High_ui * 250.0e3);
Res2(i) = wd.resistor_Vout(i, p_Low_ui * 1.0e6);
Res3p(i) = wd.resistor_Vout(i, (1.0 - p_Mid_ui) * 25.0e3);
Res3m(i) = wd.resistor_Vout(i, p_Mid_ui * 25.0e3);
Res4(i) = wd.resistor(i, 56.0e3);
Cap1(i) = wd.capacitor(i, 250.0e-12);
Cap2(i) = wd.capacitor(i, 20.0e-9);
Cap3(i) = wd.capacitor(i, 20.0e-9);
Vin(i) = wd.resVoltage(i, 1.0, in1);
// UI controls
p_High_ui = hslider("High", 0.5, 0, 1, 0.01);
p_Mid_ui = hslider("Mid", 0.5, 0, 1, 0.01);
p_Low_ui = hslider("Low", 0.5, 0, 1, 0.01);
//connection tree parts
tree = u_6port : (a, b, c, d, e, f)
with{
a = wd.series : (Vin, Res3m);
b = wd.series : (Res2, Res3p);
c = wd.series : (Cap1, (wd.series : (Res1p, Res1m)));
d = Cap2;
e = Res4;
f = Cap3;
};
u_6port(i) = wd.u_genericNode(i, sixport_scatter)
with{
sixport_scatter(Ra, Rb, Rc, Rd, Re, Rf) = matrix(6, 6, scatter)
with{
Ga = 1.0 / Ra;
Gb = 1.0 / Rb;
Gc = 1.0 / Rc;
Gd = 1.0 / Rd;
Ge = 1.0 / Re;
Gf = 1.0 / Rf;
scatter =
case{
(1, 1) => 2 * Ra * (-Ga * Gb * Gc * Gd - Ga * Gb * Gc * Ge - Ga * Gb * Gc * Gf - Ga * Gb * Gd * Ge - Ga * Gb * Ge * Gf - Ga * Gc * Gd * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf) + 1;
(1, 2) => 2 * Ra * (Ga * Gb * Gc * Gd + Ga * Gb * Gc * Ge + Ga * Gb * Gc * Gf + Ga * Gb * Gd * Ge) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(1, 3) => 2 * Ra * (Ga * Gb * Gc * Gd + Ga * Gb * Gc * Ge + Ga * Gb * Gc * Gf + Ga * Gc * Gd * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(1, 4) => 2 * Ra * (Ga * Gb * Gd * Ge - Ga * Gc * Gd * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(1, 5) => 2 * Ra * (-Ga * Gb * Gd * Ge - Ga * Gb * Ge * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(1, 6) => 2 * Ra * (-Ga * Gb * Ge * Gf - Ga * Gc * Gd * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(2, 1) => 2 * Rb * (Ga * Gb * Gc * Gd + Ga * Gb * Gc * Ge + Ga * Gb * Gc * Gf + Ga * Gb * Gd * Ge) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(2, 2) => 2 * Rb * (-Ga * Gb * Gc * Gd - Ga * Gb * Gc * Ge - Ga * Gb * Gc * Gf - Ga * Gb * Gd * Ge - Ga * Gb * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gc * Ge * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf) + 1;
(2, 3) => 2 * Rb * (-Ga * Gb * Gc * Gd - Ga * Gb * Gc * Ge - Ga * Gb * Gc * Gf - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(2, 4) => 2 * Rb * (-Ga * Gb * Gd * Ge - Ga * Gb * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(2, 5) => 2 * Rb * (Ga * Gb * Gd * Ge - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(2, 6) => 2 * Rb * (-Ga * Gb * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gc * Ge * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(3, 1) => 2 * Rc * (Ga * Gb * Gc * Gd + Ga * Gb * Gc * Ge + Ga * Gb * Gc * Gf + Ga * Gc * Gd * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(3, 2) => 2 * Rc * (-Ga * Gb * Gc * Gd - Ga * Gb * Gc * Ge - Ga * Gb * Gc * Gf - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(3, 3) => 2 * Rc * (-Ga * Gb * Gc * Gd - Ga * Gb * Gc * Ge - Ga * Gb * Gc * Gf - Ga * Gc * Gd * Ge - Ga * Gc * Gd * Gf - Gb * Gc * Gd * Ge - Gb * Gc * Ge * Gf - Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf) + 1;
(3, 4) => 2 * Rc * (Ga * Gc * Gd * Ge + Ga * Gc * Gd * Gf + Gb * Gc * Gd * Ge + Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(3, 5) => 2 * Rc * (-Ga * Gc * Gd * Ge - Gb * Gc * Gd * Ge - Gb * Gc * Ge * Gf - Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(3, 6) => 2 * Rc * (Ga * Gc * Gd * Gf - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(4, 1) => 2 * Rd * (Ga * Gb * Gd * Ge - Ga * Gc * Gd * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(4, 2) => 2 * Rd * (-Ga * Gb * Gd * Ge - Ga * Gb * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(4, 3) => 2 * Rd * (Ga * Gc * Gd * Ge + Ga * Gc * Gd * Gf + Gb * Gc * Gd * Ge + Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(4, 4) => 2 * Rd * (-Ga * Gb * Gd * Ge - Ga * Gb * Gd * Gf - Ga * Gc * Gd * Ge - Ga * Gc * Gd * Gf - Gb * Gc * Gd * Ge - Gb * Gc * Gd * Gf - Gb * Gd * Ge * Gf - Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf) + 1;
(4, 5) => 2 * Rd * (Ga * Gb * Gd * Ge + Ga * Gc * Gd * Ge + Gb * Gc * Gd * Ge + Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(4, 6) => 2 * Rd * (-Ga * Gb * Gd * Gf - Ga * Gc * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(5, 1) => 2 * Re * (-Ga * Gb * Gd * Ge - Ga * Gb * Ge * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(5, 2) => 2 * Re * (Ga * Gb * Gd * Ge - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(5, 3) => 2 * Re * (-Ga * Gc * Gd * Ge - Gb * Gc * Gd * Ge - Gb * Gc * Ge * Gf - Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(5, 4) => 2 * Re * (Ga * Gb * Gd * Ge + Ga * Gc * Gd * Ge + Gb * Gc * Gd * Ge + Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(5, 5) => 2 * Re * (-Ga * Gb * Gd * Ge - Ga * Gb * Ge * Gf - Ga * Gc * Gd * Ge - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf - Gb * Gc * Gd * Ge - Gb * Gc * Ge * Gf - Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf) + 1;
(5, 6) => 2 * Re * (-Ga * Gb * Ge * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(6, 1) => 2 * Rf * (-Ga * Gb * Ge * Gf - Ga * Gc * Gd * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(6, 2) => 2 * Rf * (-Ga * Gb * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gc * Ge * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(6, 3) => 2 * Rf * (Ga * Gc * Gd * Gf - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(6, 4) => 2 * Rf * (-Ga * Gb * Gd * Gf - Ga * Gc * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(6, 5) => 2 * Rf * (-Ga * Gb * Ge * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(6, 6) => 2 * Rf * (-Ga * Gb * Gd * Gf - Ga * Gb * Ge * Gf - Ga * Gc * Gd * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf - Gb * Gc * Gd * Gf - Gb * Gc * Ge * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf) + 1;
(i, j) => 10;
};
matrix(M,N,f) = si.bus(N) <: ro.interleave(N,M) : par(n,N, par(m,M,*(f(m+1,n+1)))) :> si.bus(M);
};
};
};
bassman_out = bassman :> _;
// process = no.pink_noise <: bassman_out, bassman_out;
process = bassman_out;
| https://raw.githubusercontent.com/jatinchowdhury18/wdf-bakeoff/6b44a28c66d6b4f20cdd8aed9593f562200e7c2c/src/faust_wdf/bassman.dsp | faust | Resistors
UI controls
connection tree parts
process = no.pink_noise <: bassman_out, bassman_out; | import("stdfaust.lib");
bassman(in1) = wd.buildtree(tree)
with {
Res1p(i) = wd.resistor(i, (1.0 - p_High_ui) * 250.0e3);
Res1m(i) = wd.resistor_Vout(i, p_High_ui * 250.0e3);
Res2(i) = wd.resistor_Vout(i, p_Low_ui * 1.0e6);
Res3p(i) = wd.resistor_Vout(i, (1.0 - p_Mid_ui) * 25.0e3);
Res3m(i) = wd.resistor_Vout(i, p_Mid_ui * 25.0e3);
Res4(i) = wd.resistor(i, 56.0e3);
Cap1(i) = wd.capacitor(i, 250.0e-12);
Cap2(i) = wd.capacitor(i, 20.0e-9);
Cap3(i) = wd.capacitor(i, 20.0e-9);
Vin(i) = wd.resVoltage(i, 1.0, in1);
p_High_ui = hslider("High", 0.5, 0, 1, 0.01);
p_Mid_ui = hslider("Mid", 0.5, 0, 1, 0.01);
p_Low_ui = hslider("Low", 0.5, 0, 1, 0.01);
tree = u_6port : (a, b, c, d, e, f)
with{
a = wd.series : (Vin, Res3m);
b = wd.series : (Res2, Res3p);
c = wd.series : (Cap1, (wd.series : (Res1p, Res1m)));
d = Cap2;
e = Res4;
f = Cap3;
};
u_6port(i) = wd.u_genericNode(i, sixport_scatter)
with{
sixport_scatter(Ra, Rb, Rc, Rd, Re, Rf) = matrix(6, 6, scatter)
with{
Ga = 1.0 / Ra;
Gb = 1.0 / Rb;
Gc = 1.0 / Rc;
Gd = 1.0 / Rd;
Ge = 1.0 / Re;
Gf = 1.0 / Rf;
scatter =
case{
(1, 1) => 2 * Ra * (-Ga * Gb * Gc * Gd - Ga * Gb * Gc * Ge - Ga * Gb * Gc * Gf - Ga * Gb * Gd * Ge - Ga * Gb * Ge * Gf - Ga * Gc * Gd * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf) + 1;
(1, 2) => 2 * Ra * (Ga * Gb * Gc * Gd + Ga * Gb * Gc * Ge + Ga * Gb * Gc * Gf + Ga * Gb * Gd * Ge) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(1, 3) => 2 * Ra * (Ga * Gb * Gc * Gd + Ga * Gb * Gc * Ge + Ga * Gb * Gc * Gf + Ga * Gc * Gd * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(1, 4) => 2 * Ra * (Ga * Gb * Gd * Ge - Ga * Gc * Gd * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(1, 5) => 2 * Ra * (-Ga * Gb * Gd * Ge - Ga * Gb * Ge * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(1, 6) => 2 * Ra * (-Ga * Gb * Ge * Gf - Ga * Gc * Gd * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(2, 1) => 2 * Rb * (Ga * Gb * Gc * Gd + Ga * Gb * Gc * Ge + Ga * Gb * Gc * Gf + Ga * Gb * Gd * Ge) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(2, 2) => 2 * Rb * (-Ga * Gb * Gc * Gd - Ga * Gb * Gc * Ge - Ga * Gb * Gc * Gf - Ga * Gb * Gd * Ge - Ga * Gb * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gc * Ge * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf) + 1;
(2, 3) => 2 * Rb * (-Ga * Gb * Gc * Gd - Ga * Gb * Gc * Ge - Ga * Gb * Gc * Gf - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(2, 4) => 2 * Rb * (-Ga * Gb * Gd * Ge - Ga * Gb * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(2, 5) => 2 * Rb * (Ga * Gb * Gd * Ge - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(2, 6) => 2 * Rb * (-Ga * Gb * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gc * Ge * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(3, 1) => 2 * Rc * (Ga * Gb * Gc * Gd + Ga * Gb * Gc * Ge + Ga * Gb * Gc * Gf + Ga * Gc * Gd * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(3, 2) => 2 * Rc * (-Ga * Gb * Gc * Gd - Ga * Gb * Gc * Ge - Ga * Gb * Gc * Gf - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(3, 3) => 2 * Rc * (-Ga * Gb * Gc * Gd - Ga * Gb * Gc * Ge - Ga * Gb * Gc * Gf - Ga * Gc * Gd * Ge - Ga * Gc * Gd * Gf - Gb * Gc * Gd * Ge - Gb * Gc * Ge * Gf - Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf) + 1;
(3, 4) => 2 * Rc * (Ga * Gc * Gd * Ge + Ga * Gc * Gd * Gf + Gb * Gc * Gd * Ge + Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(3, 5) => 2 * Rc * (-Ga * Gc * Gd * Ge - Gb * Gc * Gd * Ge - Gb * Gc * Ge * Gf - Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(3, 6) => 2 * Rc * (Ga * Gc * Gd * Gf - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(4, 1) => 2 * Rd * (Ga * Gb * Gd * Ge - Ga * Gc * Gd * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(4, 2) => 2 * Rd * (-Ga * Gb * Gd * Ge - Ga * Gb * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(4, 3) => 2 * Rd * (Ga * Gc * Gd * Ge + Ga * Gc * Gd * Gf + Gb * Gc * Gd * Ge + Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(4, 4) => 2 * Rd * (-Ga * Gb * Gd * Ge - Ga * Gb * Gd * Gf - Ga * Gc * Gd * Ge - Ga * Gc * Gd * Gf - Gb * Gc * Gd * Ge - Gb * Gc * Gd * Gf - Gb * Gd * Ge * Gf - Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf) + 1;
(4, 5) => 2 * Rd * (Ga * Gb * Gd * Ge + Ga * Gc * Gd * Ge + Gb * Gc * Gd * Ge + Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(4, 6) => 2 * Rd * (-Ga * Gb * Gd * Gf - Ga * Gc * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(5, 1) => 2 * Re * (-Ga * Gb * Gd * Ge - Ga * Gb * Ge * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(5, 2) => 2 * Re * (Ga * Gb * Gd * Ge - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(5, 3) => 2 * Re * (-Ga * Gc * Gd * Ge - Gb * Gc * Gd * Ge - Gb * Gc * Ge * Gf - Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(5, 4) => 2 * Re * (Ga * Gb * Gd * Ge + Ga * Gc * Gd * Ge + Gb * Gc * Gd * Ge + Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(5, 5) => 2 * Re * (-Ga * Gb * Gd * Ge - Ga * Gb * Ge * Gf - Ga * Gc * Gd * Ge - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf - Gb * Gc * Gd * Ge - Gb * Gc * Ge * Gf - Gc * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf) + 1;
(5, 6) => 2 * Re * (-Ga * Gb * Ge * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(6, 1) => 2 * Rf * (-Ga * Gb * Ge * Gf - Ga * Gc * Gd * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(6, 2) => 2 * Rf * (-Ga * Gb * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gc * Ge * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(6, 3) => 2 * Rf * (Ga * Gc * Gd * Gf - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(6, 4) => 2 * Rf * (-Ga * Gb * Gd * Gf - Ga * Gc * Gd * Gf - Gb * Gc * Gd * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(6, 5) => 2 * Rf * (-Ga * Gb * Ge * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf - Gb * Gc * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf);
(6, 6) => 2 * Rf * (-Ga * Gb * Gd * Gf - Ga * Gb * Ge * Gf - Ga * Gc * Gd * Gf - Ga * Gc * Ge * Gf - Ga * Gd * Ge * Gf - Gb * Gc * Gd * Gf - Gb * Gc * Ge * Gf - Gb * Gd * Ge * Gf) / (Ga * Gb * Gd + Ga * Gb * Ge + Ga * Gb * Gf + Ga * Gc * Gd + Ga * Gc * Ge + Ga * Gc * Gf + Ga * Gd * Ge + Ga * Gd * Gf + Gb * Gc * Gd + Gb * Gc * Ge + Gb * Gc * Gf + Gb * Gd * Ge + Gb * Ge * Gf + Gc * Gd * Gf + Gc * Ge * Gf + Gd * Ge * Gf) + 1;
(i, j) => 10;
};
matrix(M,N,f) = si.bus(N) <: ro.interleave(N,M) : par(n,N, par(m,M,*(f(m+1,n+1)))) :> si.bus(M);
};
};
};
bassman_out = bassman :> _;
process = bassman_out;
|
5f5a3868e933f758baff22786b200fbe8800c3d46d7234389e2864b6889f3151 | HolyCityAudio/ESP32 | flangerOSC.dsp | import("stdfaust.lib");
flaDelay = vslider("[03]Delay", 156, 5, 1000, 1) : si.smoo;
flaLFORate = vslider("[04]Rate", 0.25, 0, 3, 0.01) : si.smoo;
flaLFOWidth = vslider("[05]Width", 0.5, 0, 1.0, 0.01) : si.smoo;
flaDepth = vslider("[06]Depth", 0.95, 0, 1.0, 0.01) : si.smoo;
flaFeedback = 0; // vslider("[07]FlgFbk", 0.8, 0, 0.97, 0.01) : si.smoo;
echoDelay = vslider("[08]EchoDelay", 0.20, 0, 1.0, 0.01) : si.smooth(0.9995);
echoLevel = vslider("[09]EchoLvl", 0.8, 0, 1.0, 0.01) : si.smoo;
echoFeedback = vslider("[10]EchoFbk", 0.3, 0, 0.97, 0.01) : si.smoo;
// can't get lowpass filter to fit on ESP32
// echoLPF = vslider("[11]rotary38", 10000, 1000, 15000, 0.1) : si.smoo;
flaLFO = os.lf_triangle(flaLFORate);
flaLFO2 = os.lf_triangle(flaLFORate/2);
flaMod = flaLFOWidth * (flaLFO/2) ;
flaMod2 = flaLFOWidth * (flaLFO2/2) ;
flanger(x, mod) = pf.flanger_mono(512, flaDelay * (1 + (x * mod)), flaDepth, flaFeedback, 1);
flange(lfo) = hgroup("Flange", flanger(1, lfo));
//
// line below is basic echo with Feedback
// fbkEcho = ( +: de.fdelay(ba.sec2samp(1), ba.sec2samp(echoDelay)) : flange ) ~ *(echoFeedback);
// can't get the lowpass filter in there on the ESP32 so far
// fbkEcho = ( +: fi.lowpass(1,echoLPF) : de.delay(ba.sec2samp(1), ba.sec2samp(echoDelay))) ~ (flange : *(echoFeedback));
fbkEcho = ( + : de.delay(ba.sec2samp(1), ba.sec2samp(echoDelay)) : flange(flaMod)) ~ (flange(flaMod2) : *(echoFeedback));
echoOut = _ <: _,fbkEcho * echoLevel : +;
//=============================================
process = hgroup("Echo flanger", _,_: + : echoOut <: _,_); | https://raw.githubusercontent.com/HolyCityAudio/ESP32/9fd8916dc158c4ed3690e4e6ba2b98014f283b80/faust/flangerOSC/main/flangerOSC.dsp | faust | vslider("[07]FlgFbk", 0.8, 0, 0.97, 0.01) : si.smoo;
can't get lowpass filter to fit on ESP32
echoLPF = vslider("[11]rotary38", 10000, 1000, 15000, 0.1) : si.smoo;
line below is basic echo with Feedback
fbkEcho = ( +: de.fdelay(ba.sec2samp(1), ba.sec2samp(echoDelay)) : flange ) ~ *(echoFeedback);
can't get the lowpass filter in there on the ESP32 so far
fbkEcho = ( +: fi.lowpass(1,echoLPF) : de.delay(ba.sec2samp(1), ba.sec2samp(echoDelay))) ~ (flange : *(echoFeedback));
============================================= | import("stdfaust.lib");
flaDelay = vslider("[03]Delay", 156, 5, 1000, 1) : si.smoo;
flaLFORate = vslider("[04]Rate", 0.25, 0, 3, 0.01) : si.smoo;
flaLFOWidth = vslider("[05]Width", 0.5, 0, 1.0, 0.01) : si.smoo;
flaDepth = vslider("[06]Depth", 0.95, 0, 1.0, 0.01) : si.smoo;
echoDelay = vslider("[08]EchoDelay", 0.20, 0, 1.0, 0.01) : si.smooth(0.9995);
echoLevel = vslider("[09]EchoLvl", 0.8, 0, 1.0, 0.01) : si.smoo;
echoFeedback = vslider("[10]EchoFbk", 0.3, 0, 0.97, 0.01) : si.smoo;
flaLFO = os.lf_triangle(flaLFORate);
flaLFO2 = os.lf_triangle(flaLFORate/2);
flaMod = flaLFOWidth * (flaLFO/2) ;
flaMod2 = flaLFOWidth * (flaLFO2/2) ;
flanger(x, mod) = pf.flanger_mono(512, flaDelay * (1 + (x * mod)), flaDepth, flaFeedback, 1);
flange(lfo) = hgroup("Flange", flanger(1, lfo));
fbkEcho = ( + : de.delay(ba.sec2samp(1), ba.sec2samp(echoDelay)) : flange(flaMod)) ~ (flange(flaMod2) : *(echoFeedback));
echoOut = _ <: _,fbkEcho * echoLevel : +;
process = hgroup("Echo flanger", _,_: + : echoOut <: _,_); |
095f40116ba629e79c1f1390d7a1dbb30bc5153f60cf0150326d40ea480ab151 | HolyCityAudio/Plugins | jpreverb.dsp | declare name "JPverbRaw";
declare version "1.1";
declare author "Julian Parker, bug fixes by Till Bovermann";
declare license "GPL2+";
declare copyright "(c) Julian Parker 2013";
import("stdfaust.lib");
allpass_stretched(maxdel,N,a) = (+ <: de.fdelay1a(maxdel,N-1),*(a)) ~ *(-a) : mem, _ : + ;
// using exteral function to access list of prime numbers is slightly faster than an inline approach (as of 428bf3b)
prime_delays = ffunction(int primes (int),<jprev.h>,"primes");
// prime_delays(x) = (waveform {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667}, int(x))
// : rdtable;
// gi = 1.618;
size = hslider("v:[01]Mix/h:/[02]size[style:knob]",1.0, 0.5,3.0,0.01);
T60 = hslider("v:[01]Mix/h:/[03]t60[style:knob]",1.0,0.1,60.0,0.1);
damping = hslider("v:[01]Mix/h:/[04]damp[style:knob]",0.0,0.0,0.999,0.0001);
wet = hslider("v:[01]Mix/h:/[04]wet[style:knob]",0.5,0.0,1.0,0.01);
early_diff = hslider("v:[01]Mix/h:/[01]earlyDiff[style:knob]", 0.707, 0.0 ,0.99,0.001);
low = hslider("v:[02]EQ/h:/h:[00]level/[00]lowX[style:knob]",0.5,0.0,1.0,0.01);
mid = hslider("v:[02]EQ/h:/h:[00]level/[01]midX[style:knob]",0.5,0.0,1.0,0.01);
high = hslider("v:[02]EQ/h:/h:[00]level/[02]high[style:knob]X",0.5,0.0,1.0,0.01);
low_cutoff = hslider("v:[02]EQ/h:/h:[01]Xover/[03]lowBand[style:knob]",500,100.0,6000.0,0.1);
high_cutoff = hslider("v:[02]EQ/h:/h:[01]Xover/[04]highBand[style:knob]",2000,1000.0,10000.0,0.1);
depth = 50*hslider("v:[03]Mod/h:/[00]mDepth[style:knob]",0.1,0.0,1.0,0.001);
freq = hslider("v:[03]Mod/h:/[01]mFreq[style:knob]",2.0,0.0,10.0,0.01);
calib = 1.7; // Calibration constant given by T60 in seconds when fb = 0.5
total_length = calib*0.1*(size*5/4 -1/4);
fb = 10^(-3/((T60)/(total_length)));
smooth_init(s,default) = *(1.0 - s) : + ~ (+(default*init(1)):*(s))
with
{
init(value) = value - value';
};
diffuser(angle,g,scale1,scale2) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm))
: (( si.bus(4) :> si.bus(2) :rotator(angle) : (
de.fdelay1a(8192, prime_delays(size*scale1):smooth_init(0.9999,prime_delays(size*scale1)) -1 ),
de.fdelay1a(8192, prime_delays(size*scale2):smooth_init(0.9999,prime_delays(size*scale2)) -1 )
) )~par(i,2,*(-s_norm)))
: par(i,2,mem:*(c_norm)) )
,
par(i,2,*(s_norm)))
:> si.bus(2)
with
{
rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2)
with{
c = cos(angle);
s = sin(angle);
};
c_norm = cos(g);
s_norm = sin(g);
};
reverb = ( ( si.bus(4) :> (de.fdelay4(512, depth + depth*os.oscrs(freq) +5 ),de.fdelay4(512, depth + depth*os.oscrc(freq)+ 5 ) )
: par(i,2,si.smooth(damping)) : diffuser(ma.PI/4,early_diff,55,240) :diffuser(ma.PI/4,early_diff,215,85):diffuser(ma.PI/4,early_diff,115,190):diffuser(ma.PI/4,early_diff,175,145)
) ~(
seq(i,5,diffuser(ma.PI/4,0.707,10+30*i,110 + 30*i) ): par(i,2,de.fdelay4(512, depth + (-1^i)*depth*os.oscrc(freq)+5):de.fdelay1a(8192,(prime_delays(size*(54+150*i)):smooth_init(0.995,prime_delays(size*(54+150*i)))) -1 )) :
seq(i,5,diffuser(ma.PI/4,0.707,125+30*i, 25+30*i) ): par(i,2,de.fdelay4(8192, depth + (-1^i)*depth*os.oscrs(freq) + 5) : de.fdelay1a(8192,(prime_delays(size*(134-100*i)):smooth_init(0.995,prime_delays(size*(134-100*i)))) -1 )) :
par(i,2, fi.filterbank(5,(low_cutoff,high_cutoff) ):(_*(high),_*(mid),_*(low)) :> _ ):
par(i,2,*(fb))
));
//Alesis Style 2-channel
// with wet control
process = (_,_) <: ((reverb:par(i,2,_*(wet))), par(i,2,_*(1-wet))) :> (_,_);
// without wet control
// process = (_,_) : reverb : (_,_);
| https://raw.githubusercontent.com/HolyCityAudio/Plugins/db4b649005ce49c12665578e04cf1957f87b58eb/ParkerReverb/jpreverb.dsp | faust | using exteral function to access list of prime numbers is slightly faster than an inline approach (as of 428bf3b)
prime_delays(x) = (waveform {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667}, int(x))
: rdtable;
gi = 1.618;
Calibration constant given by T60 in seconds when fb = 0.5
Alesis Style 2-channel
with wet control
without wet control
process = (_,_) : reverb : (_,_); | declare name "JPverbRaw";
declare version "1.1";
declare author "Julian Parker, bug fixes by Till Bovermann";
declare license "GPL2+";
declare copyright "(c) Julian Parker 2013";
import("stdfaust.lib");
allpass_stretched(maxdel,N,a) = (+ <: de.fdelay1a(maxdel,N-1),*(a)) ~ *(-a) : mem, _ : + ;
prime_delays = ffunction(int primes (int),<jprev.h>,"primes");
size = hslider("v:[01]Mix/h:/[02]size[style:knob]",1.0, 0.5,3.0,0.01);
T60 = hslider("v:[01]Mix/h:/[03]t60[style:knob]",1.0,0.1,60.0,0.1);
damping = hslider("v:[01]Mix/h:/[04]damp[style:knob]",0.0,0.0,0.999,0.0001);
wet = hslider("v:[01]Mix/h:/[04]wet[style:knob]",0.5,0.0,1.0,0.01);
early_diff = hslider("v:[01]Mix/h:/[01]earlyDiff[style:knob]", 0.707, 0.0 ,0.99,0.001);
low = hslider("v:[02]EQ/h:/h:[00]level/[00]lowX[style:knob]",0.5,0.0,1.0,0.01);
mid = hslider("v:[02]EQ/h:/h:[00]level/[01]midX[style:knob]",0.5,0.0,1.0,0.01);
high = hslider("v:[02]EQ/h:/h:[00]level/[02]high[style:knob]X",0.5,0.0,1.0,0.01);
low_cutoff = hslider("v:[02]EQ/h:/h:[01]Xover/[03]lowBand[style:knob]",500,100.0,6000.0,0.1);
high_cutoff = hslider("v:[02]EQ/h:/h:[01]Xover/[04]highBand[style:knob]",2000,1000.0,10000.0,0.1);
depth = 50*hslider("v:[03]Mod/h:/[00]mDepth[style:knob]",0.1,0.0,1.0,0.001);
freq = hslider("v:[03]Mod/h:/[01]mFreq[style:knob]",2.0,0.0,10.0,0.01);
total_length = calib*0.1*(size*5/4 -1/4);
fb = 10^(-3/((T60)/(total_length)));
smooth_init(s,default) = *(1.0 - s) : + ~ (+(default*init(1)):*(s))
with
{
init(value) = value - value';
};
diffuser(angle,g,scale1,scale2) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm))
: (( si.bus(4) :> si.bus(2) :rotator(angle) : (
de.fdelay1a(8192, prime_delays(size*scale1):smooth_init(0.9999,prime_delays(size*scale1)) -1 ),
de.fdelay1a(8192, prime_delays(size*scale2):smooth_init(0.9999,prime_delays(size*scale2)) -1 )
) )~par(i,2,*(-s_norm)))
: par(i,2,mem:*(c_norm)) )
,
par(i,2,*(s_norm)))
:> si.bus(2)
with
{
rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2)
with{
c = cos(angle);
s = sin(angle);
};
c_norm = cos(g);
s_norm = sin(g);
};
reverb = ( ( si.bus(4) :> (de.fdelay4(512, depth + depth*os.oscrs(freq) +5 ),de.fdelay4(512, depth + depth*os.oscrc(freq)+ 5 ) )
: par(i,2,si.smooth(damping)) : diffuser(ma.PI/4,early_diff,55,240) :diffuser(ma.PI/4,early_diff,215,85):diffuser(ma.PI/4,early_diff,115,190):diffuser(ma.PI/4,early_diff,175,145)
) ~(
seq(i,5,diffuser(ma.PI/4,0.707,10+30*i,110 + 30*i) ): par(i,2,de.fdelay4(512, depth + (-1^i)*depth*os.oscrc(freq)+5):de.fdelay1a(8192,(prime_delays(size*(54+150*i)):smooth_init(0.995,prime_delays(size*(54+150*i)))) -1 )) :
seq(i,5,diffuser(ma.PI/4,0.707,125+30*i, 25+30*i) ): par(i,2,de.fdelay4(8192, depth + (-1^i)*depth*os.oscrs(freq) + 5) : de.fdelay1a(8192,(prime_delays(size*(134-100*i)):smooth_init(0.995,prime_delays(size*(134-100*i)))) -1 )) :
par(i,2, fi.filterbank(5,(low_cutoff,high_cutoff) ):(_*(high),_*(mid),_*(low)) :> _ ):
par(i,2,*(fb))
));
process = (_,_) <: ((reverb:par(i,2,_*(wet))), par(i,2,_*(1-wet))) :> (_,_);
|
7b92ed7c899345c72a993ffdff11acaa5a82bb339f98fec1f87e79c8617daeba | SKyzZz/test | noise.dsp | import("stdfaust.lib");
process = no.noise * hslider("Volume", 0.5, 0, 1, 0.01);
| https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/webaudio/noise.dsp | faust | import("stdfaust.lib");
process = no.noise * hslider("Volume", 0.5, 0, 1, 0.01);
|
|
a6c0bf2f5ef7e888fa8f0ba9ff09647491afdb19323407185d2edf9409fbc86e | SKyzZz/test | organ.dsp | // Simple Organ
import("stdfaust.lib");
// MIDI keyon-keyoff
midigate = button ("gate");
// MIDI keyon key
midifreq = hslider("freq[unit:Hz]", 440, 20, 20000, 1);
// MIDI keyon velocity
midigain = hslider("gain", 0.5, 0, 10, 0.01);
// Implementation
phasor(f) = f/ma.SR : (+,1.0:fmod) ~ _ ;
osc(f) = phasor(f) * 6.28318530718 : sin;
timbre(freq) = osc(freq) + 0.5 * osc(2.0*freq) + 0.25 * osc(3.0*freq);
envelop(gate, gain) = gate * gain : smooth(0.9995)
with {
smooth(c) = * (1-c) : + ~ * (c);
};
voice(gate, gain, freq) = envelop(gate, gain) * timbre(freq);
// Main
process = voice(midigate, midigain, midifreq) * hslider("volume", 0.5, 0, 1, 0.01);
| https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/webaudio/organ.dsp | faust | Simple Organ
MIDI keyon-keyoff
MIDI keyon key
MIDI keyon velocity
Implementation
Main | import("stdfaust.lib");
midigate = button ("gate");
midifreq = hslider("freq[unit:Hz]", 440, 20, 20000, 1);
midigain = hslider("gain", 0.5, 0, 10, 0.01);
phasor(f) = f/ma.SR : (+,1.0:fmod) ~ _ ;
osc(f) = phasor(f) * 6.28318530718 : sin;
timbre(freq) = osc(freq) + 0.5 * osc(2.0*freq) + 0.25 * osc(3.0*freq);
envelop(gate, gain) = gate * gain : smooth(0.9995)
with {
smooth(c) = * (1-c) : + ~ * (c);
};
voice(gate, gain, freq) = envelop(gate, gain) * timbre(freq);
process = voice(midigate, midigain, midifreq) * hslider("volume", 0.5, 0, 1, 0.01);
|
467de4169c7c0e40e5d3ae275777c838ca03fa40c14f7a6b64576abc5d9779db | lupu2022/LotusRiver | select.dsp | import("stdfaust.lib");
process(a, b, s) = (s != 0) * a + (s == 0)*b;
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1a3dbd15f0c83f4307deb24ee4d28a31d3bd1192/fs/zz/select.dsp | faust | import("stdfaust.lib");
process(a, b, s) = (s != 0) * a + (s == 0)*b;
|
|
235f9235c1ffb59c4c9a3d3f283c93deeb3822ac2c363a20e6139562ff164a7a | lupu2022/LotusRiver | tick.dsp | import("stdfaust.lib");
process = (ba.time == 0) * 1.0;
| https://raw.githubusercontent.com/lupu2022/LotusRiver/95162806cd18c083e90803cb45b00325d4d494c3/fs/zz/tick.dsp | faust | import("stdfaust.lib");
process = (ba.time == 0) * 1.0;
|
|
b30cda9abccf05a3088166a15e7c736366cc16a4746dee1129b8c550c9a1717f | lupu2022/LotusRiver | OsSquareF.dsp | import("stdfaust.lib");
process = os.square;
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/OsSquareF.dsp | faust | import("stdfaust.lib");
process = os.square;
|
|
3947eb281f683ee27bc88033e33e055ab6ed14dce4298c1d31cc005d83953be6 | lupu2022/LotusRiver | OsOscF.dsp | import("stdfaust.lib");
process = os.osc;
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/OsOscF.dsp | faust | import("stdfaust.lib");
process = os.osc;
|
|
14639647ad7e28a2d7174fea0c4c9da88cd941d25c950868ff3a686bfa33162c | lupu2022/LotusRiver | OsSawtoothF.dsp | import("stdfaust.lib");
process = os.sawtooth;
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/OsSawtoothF.dsp | faust | import("stdfaust.lib");
process = os.sawtooth;
|
|
244532099bd5b77d235ed9848a7a7d7ce3f692419adfa20368da3689374c4283 | lupu2022/LotusRiver | OsTriangleF.dsp | import("stdfaust.lib");
process = os.triangle;
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/OsTriangleF.dsp | faust | import("stdfaust.lib");
process = os.triangle;
|
|
5c9b3d7a7886448e9a0cfc413020d5c08574e9ca221e0ad659ee713f54388d2c | lupu2022/LotusRiver | FiZero.dsp | import("stdfaust.lib");
z = nentry("z", 0, 0, 1.0, 0.1);
process = fi.zero(z);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiZero.dsp | faust | import("stdfaust.lib");
z = nentry("z", 0, 0, 1.0, 0.1);
process = fi.zero(z);
|
|
99821d07657815f27ef503786e5e8dd7b30aab93583e93118458a31aac758336 | lupu2022/LotusRiver | FiPole.dsp | import("stdfaust.lib");
p = nentry("p", 0, 0, 1.0, 0.1);
process = fi.pole(p);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiPole.dsp | faust | import("stdfaust.lib");
p = nentry("p", 0, 0, 1.0, 0.1);
process = fi.pole(p);
|
|
b54cd3da56b0266999a5cd9fc6189a1eab2015f11e60c917810ceee444cf4908 | lupu2022/LotusRiver | DeDelay.dsp | import("stdfaust.lib");
d = nentry("d", 0, 0, 1.0, 0.1);
process = de.delay(8192, d);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/DeDelay.dsp | faust | import("stdfaust.lib");
d = nentry("d", 0, 0, 1.0, 0.1);
process = de.delay(8192, d);
|
|
2c0f9657eb3b5ae494ff084b2d5289ce1f16f1584151fcc939955a8d8121c24a | lupu2022/LotusRiver | DeFdelay.dsp | import("stdfaust.lib");
d = nentry("d", 0, 0, 1.0, 0.1);
process = de.fdelay(8192, d);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/DeFdelay.dsp | faust | import("stdfaust.lib");
d = nentry("d", 0, 0, 1.0, 0.1);
process = de.fdelay(8192, d);
|
|
cbb4f9904c03ea5b1b6233164728c0191b8c8b5ec52984b2627e5a73edb58354 | lupu2022/LotusRiver | switch.dsp | import("stdfaust.lib");
process(a, b, s) = (mode != 0) * a + (mode == 0) * b
with {
mode = p ~ _ with {
p(x) = (s == 0) * x + (s != 0) * (1 - x);
};
};
| https://raw.githubusercontent.com/lupu2022/LotusRiver/235f7735eebbf49b698f85effb7c61d16a7a2ac5/fs/zz/switch.dsp | faust | import("stdfaust.lib");
process(a, b, s) = (mode != 0) * a + (mode == 0) * b
with {
mode = p ~ _ with {
p(x) = (s == 0) * x + (s != 0) * (1 - x);
};
};
|
|
9aa61f717736e667287e7ecbf0bfebf99c11781f138c23a7980dc55a9d772f6c | lupu2022/LotusRiver | FiBandpass6e.dsp | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.bandpass6e(fc);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiBandpass6e.dsp | faust | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.bandpass6e(fc);
|
|
90d0458aab9344d7f234ce74e3d5d942ad6f0bd066411a59a696042610095dfe | lupu2022/LotusRiver | FiLowpass.dsp | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.lowpass(2, fc);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiLowpass.dsp | faust | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.lowpass(2, fc);
|
|
dc4e2b488cb76d42881d64fc9f1a0760f62c1ab30b5421d7283774627069be7a | lupu2022/LotusRiver | OsTriangle.dsp | import("stdfaust.lib");
freq = nentry("freq", 0, 0, 1.0, 0.1);
process = os.triangle(freq);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/OsTriangle.dsp | faust | import("stdfaust.lib");
freq = nentry("freq", 0, 0, 1.0, 0.1);
process = os.triangle(freq);
|
|
51192de6ea29fb541993b70ea1f7bb05d92c625c8a44d7ac6d402c008184ca78 | lupu2022/LotusRiver | FiHighpass6e.dsp | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.highpass6e(fc);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiHighpass6e.dsp | faust | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.highpass6e(fc);
|
|
b30335927fe3a6be0bbfc21e9f67c141a49df789778400e3b483e36f57513575 | lupu2022/LotusRiver | OsOsc.dsp | import("stdfaust.lib");
freq = nentry("freq", 0, 0, 1.0, 0.1);
process = os.osc(freq);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/OsOsc.dsp | faust | import("stdfaust.lib");
freq = nentry("freq", 0, 0, 1.0, 0.1);
process = os.osc(freq);
|
|
10c3c3b61410baa8cf09b4104a09e529f3c54abc89a9d9ad9792f5ab8e2d2efb | lupu2022/LotusRiver | FiDcblockerat.dsp | import("stdfaust.lib");
fb = nentry("fb", 0, 0, 1.0, 0.1);
process = fi.dcblockerat(fb);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiDcblockerat.dsp | faust | import("stdfaust.lib");
fb = nentry("fb", 0, 0, 1.0, 0.1);
process = fi.dcblockerat(fb);
|
|
3fe10c9a37f498d3c92780bbe37f06618b1490c4c66a9c33c9dbea22610a7e8b | lupu2022/LotusRiver | BaPulse.dsp | import("stdfaust.lib");
length = nentry("length", 0, 0, 1.0, 0.1);
process = ba.pulse(length);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/BaPulse.dsp | faust | import("stdfaust.lib");
length = nentry("length", 0, 0, 1.0, 0.1);
process = ba.pulse(length);
|
|
5241ba28c1330ece3dac10987c27968507452e092eaea0934793b6b76c0921b0 | lupu2022/LotusRiver | FiLowpass6e.dsp | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.lowpass6e(fc);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiLowpass6e.dsp | faust | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.lowpass6e(fc);
|
|
8fb7df9eb8926c5464358d5d5c36692951e2c8e5a4b214eaf56dbd67da702a60 | lupu2022/LotusRiver | FiHighpass3e.dsp | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.highpass3e(fc);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiHighpass3e.dsp | faust | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.highpass3e(fc);
|
|
4fe0458a998b99e894324c21454a566ff76533137ede7b9d3d5d26cf81131858 | lupu2022/LotusRiver | FiLowpass3e.dsp | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.lowpass3e(fc);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiLowpass3e.dsp | faust | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.lowpass3e(fc);
|
|
56ae7230463db78a6605f3dd44b094f39923206c201150830621313a4c9b5ab9 | lupu2022/LotusRiver | BaBeat.dsp | import("stdfaust.lib");
bpm = nentry("bpm", 0, 0, 1.0, 0.1);
process = ba.beat(bpm);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/BaBeat.dsp | faust | import("stdfaust.lib");
bpm = nentry("bpm", 0, 0, 1.0, 0.1);
process = ba.beat(bpm);
|
|
6630ac99a524670898c9a9755d6ef032e89afc88ea1a60356c33965fc5905914 | lupu2022/LotusRiver | OsSquare.dsp | import("stdfaust.lib");
freq = nentry("freq", 0, 0, 1.0, 0.1);
process = os.square(freq);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/OsSquare.dsp | faust | import("stdfaust.lib");
freq = nentry("freq", 0, 0, 1.0, 0.1);
process = os.square(freq);
|
|
9b065353af6f1741ff6c010be1479d261398a9514a98fee0cf970b9404cd5eff | lupu2022/LotusRiver | FiHighpass.dsp | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.highpass(2, fc);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiHighpass.dsp | faust | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
process = fi.highpass(2, fc);
|
|
fbc0540667a12e6fc273a192a4862e43642dc56dac892359ad5c8413d149f331 | lupu2022/LotusRiver | BaBitcrusher.dsp | import("stdfaust.lib");
nbits = nentry("nbits", 0, 0, 1.0, 0.1);
process = ba.bitcrusher(nbits);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/BaBitcrusher.dsp | faust | import("stdfaust.lib");
nbits = nentry("nbits", 0, 0, 1.0, 0.1);
process = ba.bitcrusher(nbits);
|
|
2e7fe9bfb8085911fe120af4da9e4a21d1d0e1a3bacd4b6b28b9dc06ecefe7b6 | lupu2022/LotusRiver | OsSawtooth.dsp | import("stdfaust.lib");
freq = nentry("freq", 0, 0, 1.0, 0.1);
process = os.sawtooth(freq);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/OsSawtooth.dsp | faust | import("stdfaust.lib");
freq = nentry("freq", 0, 0, 1.0, 0.1);
process = os.sawtooth(freq);
|
|
0887db472607e14e37e19c61cae0e5c8cc0c0dd5af10cc36b9acb1524dff9b94 | lupu2022/LotusRiver | FiHighpassLR4.dsp | import("stdfaust.lib");
cf = nentry("cf", 0, 0, 1.0, 0.1);
process = fi.highpassLR4(cf);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiHighpassLR4.dsp | faust | import("stdfaust.lib");
cf = nentry("cf", 0, 0, 1.0, 0.1);
process = fi.highpassLR4(cf);
|
|
3eea8c358f3efd5300752abac5f621034cb664640a9903a8e473bdb4a515d8c6 | lupu2022/LotusRiver | FiLowpassLR4.dsp | import("stdfaust.lib");
cf = nentry("cf", 0, 0, 1.0, 0.1);
process = fi.lowpassLR4(cf);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiLowpassLR4.dsp | faust | import("stdfaust.lib");
cf = nentry("cf", 0, 0, 1.0, 0.1);
process = fi.lowpassLR4(cf);
|
|
8aa02b395209460256351918274ea3070b0513564bb8361e0917179516ea32b1 | lupu2022/LotusRiver | noise.dsp | import("stdfaust.lib");
freq = nentry("freq", 0.1, 0, 10000, 0.01);
process = os.osc(freq) * 0.6;
| https://raw.githubusercontent.com/lupu2022/LotusRiver/0b1b200e9ba200a6c545d18896b8b347b130e935/examples/assets/noise.dsp | faust | import("stdfaust.lib");
freq = nentry("freq", 0.1, 0, 10000, 0.01);
process = os.osc(freq) * 0.6;
|
|
a8bdc0c51b988e9dc26c1a8492e6c170f45620605391a85dd39e7d4782947af8 | lupu2022/LotusRiver | port.dsp | import("stdfaust.lib");
cx = nentry("cx", 0.1, 0, 1, 0.01);
cy = 1.0 - cx;
process(x) = (*(cy), cx*x : +) ~ _;
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/zz/port.dsp | faust | import("stdfaust.lib");
cx = nentry("cx", 0.1, 0, 1, 0.01);
cy = 1.0 - cx;
process(x) = (*(cy), cx*x : +) ~ _;
|
|
db8fce7cb7d7dd151f0fa729cec4223959b1edb04893b3645b6876d1aa4f1975 | lupu2022/LotusRiver | metro.dsp | import("stdfaust.lib");
bpm = nentry("bpm", 0.1, 0, 10000, 0.01);
process = ba.beat( bpm * 60.0 );
| https://raw.githubusercontent.com/lupu2022/LotusRiver/b322bf01d9f390cd83c6d22a04de894aedfd8bf9/fs/zz/metro.dsp | faust | import("stdfaust.lib");
bpm = nentry("bpm", 0.1, 0, 10000, 0.01);
process = ba.beat( bpm * 60.0 );
|
|
8ba13137c5f886fec08de99e4bcb8e0c3069b1a6fb85c03b5e30ab8086f3c854 | lupu2022/LotusRiver | BaPulsen.dsp | import("stdfaust.lib");
length = nentry("length", 0, 0, 1.0, 0.1);
period = nentry("period", 0, 0, 1.0, 0.1);
process = ba.pulsen(length, period);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/BaPulsen.dsp | faust | import("stdfaust.lib");
length = nentry("length", 0, 0, 1.0, 0.1);
period = nentry("period", 0, 0, 1.0, 0.1);
process = ba.pulsen(length, period);
|
|
9c53ed7b002461e636fd5809ba23e567e7c5d7469b8c41ebae52648be7dced44 | lupu2022/LotusRiver | FiBandpass.dsp | import("stdfaust.lib");
fl = nentry("fl", 0, 0, 1.0, 0.1);
fu = nentry("fu", 0, 0, 1.0, 0.1);
process = fi.bandpass(2, fl, fu);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiBandpass.dsp | faust | import("stdfaust.lib");
fl = nentry("fl", 0, 0, 1.0, 0.1);
fu = nentry("fu", 0, 0, 1.0, 0.1);
process = fi.bandpass(2, fl, fu);
|
|
38867aa63073b625042502df857f4a730dc9ac5a84559f12efeeca0e24b05006 | lupu2022/LotusRiver | EnAre.dsp | import("stdfaust.lib");
attack = nentry("attack", 0, 0, 1.0, 0.1);
release = nentry("release", 0, 0, 1.0, 0.1);
process = en.are(attack, release);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/EnAre.dsp | faust | import("stdfaust.lib");
attack = nentry("attack", 0, 0, 1.0, 0.1);
release = nentry("release", 0, 0, 1.0, 0.1);
process = en.are(attack, release);
|
|
a767b2f931033216e6ba40f811182c89d1bff14f2bb7ddf201d45a3f668c659c | lupu2022/LotusRiver | FiResonhp.dsp | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
q = nentry("q", 0, 0, 1.0, 0.1);
gain = nentry("gain", 0, 0, 1.0, 0.1);
process = fi.resonhp(fc, q, gain);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiResonhp.dsp | faust | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
q = nentry("q", 0, 0, 1.0, 0.1);
gain = nentry("gain", 0, 0, 1.0, 0.1);
process = fi.resonhp(fc, q, gain);
|
|
e37366403851da1a47cefd00e4487ee16af8e50ef0550e5e49ee38ef1d56e81a | lupu2022/LotusRiver | FiResonlp.dsp | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
q = nentry("q", 0, 0, 1.0, 0.1);
gain = nentry("gain", 0, 0, 1.0, 0.1);
process = fi.resonlp(fc, q, gain);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiResonlp.dsp | faust | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
q = nentry("q", 0, 0, 1.0, 0.1);
gain = nentry("gain", 0, 0, 1.0, 0.1);
process = fi.resonlp(fc, q, gain);
|
|
2d69129a812303e6126de074f98afc8f13cb8650680cac1bd9e126d73ff53ea5 | lupu2022/LotusRiver | FiResonbp.dsp | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
q = nentry("q", 0, 0, 1.0, 0.1);
gain = nentry("gain", 0, 0, 1.0, 0.1);
process = fi.resonbp(fc, q, gain);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/FiResonbp.dsp | faust | import("stdfaust.lib");
fc = nentry("fc", 0, 0, 1.0, 0.1);
q = nentry("q", 0, 0, 1.0, 0.1);
gain = nentry("gain", 0, 0, 1.0, 0.1);
process = fi.resonbp(fc, q, gain);
|
|
7a1b0edced2c2c084875dbeb2da4a3fdd03733a3d80cbfa9b616248ef8c429ca | lupu2022/LotusRiver | butbp.dsp | import("stdfaust.lib");
bw = nentry("bw", 0.1, 0, 10000, 0.01);
process(x,fc) = x:fi.bandpass(1, fc - bw / 2, fc + bw /2 );
| https://raw.githubusercontent.com/lupu2022/LotusRiver/ecb36e94c58e560de353a45f032b14a4fa246db1/examples/assets/butbp.dsp | faust | import("stdfaust.lib");
bw = nentry("bw", 0.1, 0, 10000, 0.01);
process(x,fc) = x:fi.bandpass(1, fc - bw / 2, fc + bw /2 );
|
|
8d78863eabe584080bcbf269038a4b3d2d56595900c2658cbb8f2b8a4483c64a | lupu2022/LotusRiver | tport.dsp | import("stdfaust.lib");
cx = nentry("cx", 0.1, 0, 1, 0.01);
cy = 1.0 - cx;
with_trig(t, x) = _ * t + (1.0 - t) * x;
process(t, x) = (*(cy), x*cx : +) ~ with_trig(tt, x)
with {
tt = t == 0;
};
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/zz/tport.dsp | faust | import("stdfaust.lib");
cx = nentry("cx", 0.1, 0, 1, 0.01);
cy = 1.0 - cx;
with_trig(t, x) = _ * t + (1.0 - t) * x;
process(t, x) = (*(cy), x*cx : +) ~ with_trig(tt, x)
with {
tt = t == 0;
};
|
|
440e01ee85fbaa42f860541929a39a55d1823a7dc0189c3bafc529cb3cea3293 | lupu2022/LotusRiver | EnAdsr.dsp | import("stdfaust.lib");
attack = nentry("attack", 0, 0, 1.0, 0.1);
decay = nentry("decay", 0, 0, 1.0, 0.1);
sustain = nentry("sustain", 0, 0, 1.0, 0.1);
release = nentry("release", 0, 0, 1.0, 0.1);
process = en.adsr(attack, decay, sustain, release);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/EnAdsr.dsp | faust | import("stdfaust.lib");
attack = nentry("attack", 0, 0, 1.0, 0.1);
decay = nentry("decay", 0, 0, 1.0, 0.1);
sustain = nentry("sustain", 0, 0, 1.0, 0.1);
release = nentry("release", 0, 0, 1.0, 0.1);
process = en.adsr(attack, decay, sustain, release);
|
|
30250d64b58a63ea7fdeceecf0848a2193c5d129041d1464a90dce37559e6343 | lupu2022/LotusRiver | ReMonoFreeverb.dsp | import("stdfaust.lib");
fb1 = nentry("fb1", 0, 0, 1.0, 0.1);
fb2 = nentry("fb2", 0, 0, 1.0, 0.1);
damp = nentry("damp", 0, 0, 1.0, 0.1);
spread = nentry("spread", 0, 0, 1.0, 0.1);
process = re.mono_freeverb(fb1, fb2, damp, spread);
| https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/auto/ReMonoFreeverb.dsp | faust | import("stdfaust.lib");
fb1 = nentry("fb1", 0, 0, 1.0, 0.1);
fb2 = nentry("fb2", 0, 0, 1.0, 0.1);
damp = nentry("damp", 0, 0, 1.0, 0.1);
spread = nentry("spread", 0, 0, 1.0, 0.1);
process = re.mono_freeverb(fb1, fb2, damp, spread);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.