_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
|
---|---|---|---|---|---|---|---|
555fab74565a2b39ef5b3c4c62fd9a6d40178cc855b22b31a52b77dd516fe74f
|
maximalexanian/guitarix-vst
|
gxdistortion.dsp
|
declare id "gxdistortion";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
F = 300; //nentry("split_low_freq", 250, 20, 600, 10);
F1 = 1200; //nentry("split_middle_freq", 650, 600, 1250, 10);
F2 = 3200; //nentry("split_high_freq", 1250, 1250, 12000, 10);
/**********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
***********************************************************************/
//------------------------------ ba.count and ba.take --------------------------------------
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
//------------------------------ low/high-passfilters --------------------------------------
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
S = (O-parity)/2; // current section number
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
//------------------------------ an.analyzer --------------------------------------
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
/**********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completly to > 0.9.27
***********************************************************************/
//----------distortion---------
/* 2 exp() because of valve.vt */
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1.0 - lp2tm1(x) * 1.02 - 1.0 : clip(-1.0,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
vt = valve.vt(dist, q) : ma.neg : valve.vt(dist, q) : ma.neg with
{
q_p = 0.9;
dist_p = 1.7;
q = -q_p*-q_p*-q_p;
dist = pow(10,dist_p);
};
//-distortion
distdrive(drive) = wet_dry_mix(wet_dry, _: distortion) with {
//drive = vslider("drive", 0.35, 0, 1, 0.01);
//h = (2.0): ba.db2linear; //1,2589412
//l = (4.0): ba.db2linear; //1,584893192
//mh = (4.0): ba.db2linear; //1,584893192
//ml = (2.5): ba.db2linear; //1,333521432
distortion1 = _:ef.cubicnl(0.45*drive,0.0): *(1.2589412); // l
distortion2 = _:ef.cubicnl(0.4*drive,0.0) : *(1.584893192); // h
distortion3 = _:ef.cubicnl(1.0*drive,0.0) : *(1.584893192); //ml
distortion4 = _:ef.cubicnl(0.6*drive,0.0) : *(1.333521432); //mh
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
wet_dry = (drive - 0.5) * 2;
};
clipit = min(0.7) : max(-0.7) ;
gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
wetdry = vslider("wet_dry[name:wet/dry]", 100, 0, 100, 1) : /(100);
drive = vslider("drive", 0.35, 0, 1, 0.01) : smoothi(0.999);
dist(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry):distdrive(drive)):>_
with{
dry = 1 - wetdry;
};
dist1(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry) <: (clipit: ef.cubicnl(drive,0.0) : * (0.5)),distdrive(drive) :>_):>_
with{
dry = 1 - wetdry;
};
/* 4 exp() because of val */
dist2(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry) :val :distdrive(drive)):>_
with{
dry = 1 - wetdry;
};
dist4(drive,wetdry) =_<:(*(dry): gx_drive(drive)),
(*(wetdry) : val <:
(ef.cubicnl(drive,0.0) : * (0.5)),distdrive(drive) :>_):>_
with{
dry = 1 - wetdry;
};
process = distdrive;
|
https://raw.githubusercontent.com/maximalexanian/guitarix-vst/83fd0cbec9588fb2ef47d80f7c6cb0775bfb9f89/guitarix/src/faust/gxdistortion.dsp
|
faust
|
nentry("split_low_freq", 250, 20, 600, 10);
nentry("split_middle_freq", 650, 600, 1250, 10);
nentry("split_high_freq", 1250, 1250, 12000, 10);
*********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
**********************************************************************
------------------------------ ba.count and ba.take --------------------------------------
------------------------------ low/high-passfilters --------------------------------------
bilinear-transform scale-factor
bilinear-transform scale-factor
current section number
------------------------------ an.analyzer --------------------------------------
*********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completly to > 0.9.27
**********************************************************************
----------distortion---------
2 exp() because of valve.vt
-distortion
drive = vslider("drive", 0.35, 0, 1, 0.01);
h = (2.0): ba.db2linear; //1,2589412
l = (4.0): ba.db2linear; //1,584893192
mh = (4.0): ba.db2linear; //1,584893192
ml = (2.5): ba.db2linear; //1,333521432
l
h
ml
mh
4 exp() because of val
|
declare id "gxdistortion";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1.0 - lp2tm1(x) * 1.02 - 1.0 : clip(-1.0,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
vt = valve.vt(dist, q) : ma.neg : valve.vt(dist, q) : ma.neg with
{
q_p = 0.9;
dist_p = 1.7;
q = -q_p*-q_p*-q_p;
dist = pow(10,dist_p);
};
distdrive(drive) = wet_dry_mix(wet_dry, _: distortion) with {
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
wet_dry = (drive - 0.5) * 2;
};
clipit = min(0.7) : max(-0.7) ;
gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
wetdry = vslider("wet_dry[name:wet/dry]", 100, 0, 100, 1) : /(100);
drive = vslider("drive", 0.35, 0, 1, 0.01) : smoothi(0.999);
dist(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry):distdrive(drive)):>_
with{
dry = 1 - wetdry;
};
dist1(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry) <: (clipit: ef.cubicnl(drive,0.0) : * (0.5)),distdrive(drive) :>_):>_
with{
dry = 1 - wetdry;
};
dist2(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry) :val :distdrive(drive)):>_
with{
dry = 1 - wetdry;
};
dist4(drive,wetdry) =_<:(*(dry): gx_drive(drive)),
(*(wetdry) : val <:
(ef.cubicnl(drive,0.0) : * (0.5)),distdrive(drive) :>_):>_
with{
dry = 1 - wetdry;
};
process = distdrive;
|
0ac2a6e810ec0374dd84559c22625c2bded6432ad1823d9dfaa5349f3c52f7aa
|
SimplyOnMyWay/harp-model
|
McLiagString_04.02.23.dsp
|
import("stdfaust.lib");
process = en.asrfe(attT60,susLvl,relT60,finLvl,gate) with { //excitation : bodyMode1 : bodyMode2 : bodyMode3 <: _,_ with { //: McLiagString <: _,_ with {
attT60 = 0.6;
susLvl = 0.75;
relT60 = 0.1;
finLvl = 0.0;
gate = button("g");
excitation = g : en.are(a,r) * no.noise : envFR with {
a = 0.02;//0.0005;
d = 0.01;
s = 0.5;
r = 0.05;//0.04;
g = 1 - (1@50);//(1-(1@500)) + 0.5*(1@750-(1@1700)); //
fb1 = 1.0;
fb2 = 1.0;
damp = 0.5;
spread = 1;
envFR = fi.iir(bcoeffs,acoeffs) with {
bcoeffs = 1.0038,-0.16283,0.0062466,-0.10801,-0.24058,-0.029842,-0.121,-0.16796,-0.15775,-0.20561,0.0077204;
acoeffs = -1.3267,0.61699,-0.75244,0.5751,-0.2797,0.497,-0.45368,0.3945,-0.22875,0.0441;
};
};
bodyMode1 = fi.tf21(b0,b1,b2,a1,a2) with {
b0 = 1;
b1 = -1.9786;//-1.9583;
b2 = 0.97882;//0.95958;
a1 = -1.9986; //1.9983;
a2 = 0.99869; //0.99915;
};
bodyMode2 = fi.tf21(b0,b1,b2,a1,a2) with {
b0 = 1;
b1 = -1.989; //-1.7944;
b2 = 0.98912; //0.8077;
a1 = -1.999; //-1.9937;
a2 = 0.99908; //0.99715;
};
bodyMode3 = fi.tf21(b0,b1,b2,a1,a2) with {
b0 = 1;
b1 = -1.9848;//-1.9537;
b2 = 0.98515;//0.95903;
a1 = -1.9987;//-1.9936;
a2 = 0.99908;//0.99858;
};
McLiagString(pluck) = (pluck + dline) ~ (loopGain : loopFilter) with {
dline = de.delay(n,d) with {
n = 2048;
d = ma.SR/f;
f = 264*2;
};
// ### direct-form (I?) IIR filter implementation ###
loopFilter = fi.iir(Bcoeff,Acoeff) with {
Bcoeff = 0.99002,0.53323,-0.059946,0.47646,0.6579,0.41096,0.10609,0.25464,0.1224,0.1032,0.23355,0.1154,0.027333,0.24254,0.11144,0.13616,0.29518,0.22837,0.20541,0.1811,0.23351,0.25601,0.18682,0.1572,0.12634,0.1038,0.10661,0.083271,0.077115,0.020829,0.01552;
// note av[0] = 1 is assumed by Faust!/
Acoeff = 0.52874,-0.064736,0.48365,0.65922,0.40633,0.10369,0.25905,0.11832,0.10181,0.23729,0.11339,0.026769,0.24361,0.11236,0.13613,0.29448,0.22862,0.20701,0.17915,0.23339,0.2578,0.18605,0.15629,0.1266,0.10381,0.10485,0.084,0.0772,0.019029,0.016185;
};
loopGain(x) = 0.999 * x;
};
};
|
https://raw.githubusercontent.com/SimplyOnMyWay/harp-model/794c56b19a82a4b1301f3a83c2baf7f43224fe21/faust_code/McLiagString_04.02.23.dsp
|
faust
|
excitation : bodyMode1 : bodyMode2 : bodyMode3 <: _,_ with { //: McLiagString <: _,_ with {
0.0005;
0.04;
(1-(1@500)) + 0.5*(1@750-(1@1700)); //
-1.9583;
0.95958;
1.9983;
0.99915;
-1.7944;
0.8077;
-1.9937;
0.99715;
-1.9537;
0.95903;
-1.9936;
0.99858;
### direct-form (I?) IIR filter implementation ###
note av[0] = 1 is assumed by Faust!/
|
import("stdfaust.lib");
attT60 = 0.6;
susLvl = 0.75;
relT60 = 0.1;
finLvl = 0.0;
gate = button("g");
excitation = g : en.are(a,r) * no.noise : envFR with {
d = 0.01;
s = 0.5;
fb1 = 1.0;
fb2 = 1.0;
damp = 0.5;
spread = 1;
envFR = fi.iir(bcoeffs,acoeffs) with {
bcoeffs = 1.0038,-0.16283,0.0062466,-0.10801,-0.24058,-0.029842,-0.121,-0.16796,-0.15775,-0.20561,0.0077204;
acoeffs = -1.3267,0.61699,-0.75244,0.5751,-0.2797,0.497,-0.45368,0.3945,-0.22875,0.0441;
};
};
bodyMode1 = fi.tf21(b0,b1,b2,a1,a2) with {
b0 = 1;
};
bodyMode2 = fi.tf21(b0,b1,b2,a1,a2) with {
b0 = 1;
};
bodyMode3 = fi.tf21(b0,b1,b2,a1,a2) with {
b0 = 1;
};
McLiagString(pluck) = (pluck + dline) ~ (loopGain : loopFilter) with {
dline = de.delay(n,d) with {
n = 2048;
d = ma.SR/f;
f = 264*2;
};
loopFilter = fi.iir(Bcoeff,Acoeff) with {
Bcoeff = 0.99002,0.53323,-0.059946,0.47646,0.6579,0.41096,0.10609,0.25464,0.1224,0.1032,0.23355,0.1154,0.027333,0.24254,0.11144,0.13616,0.29518,0.22837,0.20541,0.1811,0.23351,0.25601,0.18682,0.1572,0.12634,0.1038,0.10661,0.083271,0.077115,0.020829,0.01552;
Acoeff = 0.52874,-0.064736,0.48365,0.65922,0.40633,0.10369,0.25905,0.11832,0.10181,0.23729,0.11339,0.026769,0.24361,0.11236,0.13613,0.29448,0.22862,0.20701,0.17915,0.23339,0.2578,0.18605,0.15629,0.1266,0.10381,0.10485,0.084,0.0772,0.019029,0.016185;
};
loopGain(x) = 0.999 * x;
};
};
|
e599ad07ad71bb78dffca89477cd7ce4f44668381f4b5d059ba19ccf8c491d33
|
afalaize/faust
|
drums.dsp
|
//##################################### drums.dsp ########################################
// Faust instrument specifically designed for `faust2smartkeyb` where 3 drums can
// be controlled using pads. The X/Y postion of fingers is detected on each key
// and use to control the strike postion on the virtual membrane.
//
// ## `SmartKeyboard` Use Strategy
//
// The drum physical model used here is implemented to be generic so that its
// fundamental frequency can be changed for each voice. `SamrtKeyboard` is used
// in polyphonic mode so each new strike on the interface corresponds to a new
// new voice.
//
// ## 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 drums.dsp
// ```
//
// ## Version/Licence
//
// Version 0.0, Feb. 2017
// Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017
// MIT Licence: https://opensource.org/licenses/MIT
//########################################################################################
// Interface with 2 keyboards of 2 and 1 keys (3 pads)
// Static mode is used so that keys don't change color when touched
// Note labels are hidden
// Piano Keyboard mode is deactivated so all the keys look the same
declare interface "SmartKeyboard{
'Number of Keyboards':'2',
'Keyboard 0 - Number of Keys':'2',
'Keyboard 1 - Number of Keys':'1',
'Keyboard 0 - Static Mode':'1',
'Keyboard 1 - Static Mode':'1',
'Keyboard 0 - Send X':'1',
'Keyboard 0 - Send Y':'1',
'Keyboard 1 - Send X':'1',
'Keyboard 1 - Send Y':'1',
'Keyboard 0 - Piano Keyboard':'0',
'Keyboard 1 - Piano Keyboard':'0',
'Keyboard 0 - Key 0 - Label':'High',
'Keyboard 0 - Key 1 - Label':'Mid',
'Keyboard 1 - Key 0 - Label':'Low'
}";
import("stdfaust.lib");
// standard parameters
gate = button("gate");
x = hslider("x",1,0,1,0.001);
y = hslider("y",1,0,1,0.001);
keyboard = hslider("keyboard",0,0,1,1) : int;
key = hslider("key",0,0,1,1) : int;
// drum modal physical model
drum = excitation <: par(i,N,mode(i,baseFreq,t60Scaler)) :> *(outGain)
with{
// number of modes
N = 20;
// angle
theta = 0;
// resonance duration
t60Scaler = 1;
// frequency of the lowest drum
bFreq = 60;
// output gain (should be changed in function of the number of drums and modes)
outGain = 0.1;
// excitation position
exPos = min((x*2-1 : abs),(y*2-1 : abs));
// retrieving pad number (0-2)
j = 2-(keyboard*2+key);
// drum root freq is computed in function of pad number
baseFreq = bFreq*(j+1);
// computing the gain of each filter
inGains(i) = cos((i+1)*theta)/float(i+1);
// computing each modes, why is this done like this, cus it sounds goooood...
mode(i,baseFreq,t60) = *(inGains(i)) : modeFilter(baseFreq+(200*i),(N-i)*t60*0.03)*(1/(i+1))
with{
// biquad taking freq and t60 as arguments
modeFilter(f,t60) = fi.tf2(b0,b1,b2,a1,a2)
with{
b0 = 1;
b1 = 0;
b2 = -1;
w = 2*ma.PI*f/ma.SR;
r = pow(0.001,1/float(t60*ma.SR));
a1 = -2*r*cos(w);
a2 = r^2;
};
};
// excitation: filtered noise burst. filters change in function of x/y position
excitation = noiseburst : fi.highpass(2,40+exPos*500) : fi.lowpass(2,500+exPos*15000)
with{
// noise excitation
noiseburst = no.noise : *(gate : ba.impulsify : trigger(P))
with {
P = ma.SR/300;
diffgtz(x) = x != x';
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = diffgtz : release(n) : > (0.0);
};
};
};
process = drum <: _,_;
|
https://raw.githubusercontent.com/afalaize/faust/8f9f5fe3aa167eaeecc15a99d4da984ac2797be3/examples/smartKeyboard/drums.dsp
|
faust
|
##################################### drums.dsp ########################################
Faust instrument specifically designed for `faust2smartkeyb` where 3 drums can
be controlled using pads. The X/Y postion of fingers is detected on each key
and use to control the strike postion on the virtual membrane.
## `SmartKeyboard` Use Strategy
The drum physical model used here is implemented to be generic so that its
fundamental frequency can be changed for each voice. `SamrtKeyboard` is used
in polyphonic mode so each new strike on the interface corresponds to a new
new voice.
## 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 drums.dsp
```
## Version/Licence
Version 0.0, Feb. 2017
Copyright Romain Michon CCRMA (Stanford University)/GRAME 2017
MIT Licence: https://opensource.org/licenses/MIT
########################################################################################
Interface with 2 keyboards of 2 and 1 keys (3 pads)
Static mode is used so that keys don't change color when touched
Note labels are hidden
Piano Keyboard mode is deactivated so all the keys look the same
standard parameters
drum modal physical model
number of modes
angle
resonance duration
frequency of the lowest drum
output gain (should be changed in function of the number of drums and modes)
excitation position
retrieving pad number (0-2)
drum root freq is computed in function of pad number
computing the gain of each filter
computing each modes, why is this done like this, cus it sounds goooood...
biquad taking freq and t60 as arguments
excitation: filtered noise burst. filters change in function of x/y position
noise excitation
|
declare interface "SmartKeyboard{
'Number of Keyboards':'2',
'Keyboard 0 - Number of Keys':'2',
'Keyboard 1 - Number of Keys':'1',
'Keyboard 0 - Static Mode':'1',
'Keyboard 1 - Static Mode':'1',
'Keyboard 0 - Send X':'1',
'Keyboard 0 - Send Y':'1',
'Keyboard 1 - Send X':'1',
'Keyboard 1 - Send Y':'1',
'Keyboard 0 - Piano Keyboard':'0',
'Keyboard 1 - Piano Keyboard':'0',
'Keyboard 0 - Key 0 - Label':'High',
'Keyboard 0 - Key 1 - Label':'Mid',
'Keyboard 1 - Key 0 - Label':'Low'
}";
import("stdfaust.lib");
gate = button("gate");
x = hslider("x",1,0,1,0.001);
y = hslider("y",1,0,1,0.001);
keyboard = hslider("keyboard",0,0,1,1) : int;
key = hslider("key",0,0,1,1) : int;
drum = excitation <: par(i,N,mode(i,baseFreq,t60Scaler)) :> *(outGain)
with{
N = 20;
theta = 0;
t60Scaler = 1;
bFreq = 60;
outGain = 0.1;
exPos = min((x*2-1 : abs),(y*2-1 : abs));
j = 2-(keyboard*2+key);
baseFreq = bFreq*(j+1);
inGains(i) = cos((i+1)*theta)/float(i+1);
mode(i,baseFreq,t60) = *(inGains(i)) : modeFilter(baseFreq+(200*i),(N-i)*t60*0.03)*(1/(i+1))
with{
modeFilter(f,t60) = fi.tf2(b0,b1,b2,a1,a2)
with{
b0 = 1;
b1 = 0;
b2 = -1;
w = 2*ma.PI*f/ma.SR;
r = pow(0.001,1/float(t60*ma.SR));
a1 = -2*r*cos(w);
a2 = r^2;
};
};
excitation = noiseburst : fi.highpass(2,40+exPos*500) : fi.lowpass(2,500+exPos*15000)
with{
noiseburst = no.noise : *(gate : ba.impulsify : trigger(P))
with {
P = ma.SR/300;
diffgtz(x) = x != x';
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = diffgtz : release(n) : > (0.0);
};
};
};
process = drum <: _,_;
|
1f45961032e96e45630f16454098943d18b200730950ba273d6f40c1482cb070
|
sadko4u/tamgamp.lv2
|
amp_dist.dsp
|
/*
* Simulation of Guitarix amplifier chain
*
* Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
* Copyright (C) 2011 Pete Shorthose <http://guitarix.org/>
* This file is part of tamgamp.lv2 <https://github.com/sadko4u/tamgamp.lv2>.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
declare id "amp_dist";
declare version "0.01";
declare author "Hermann Meyer";
declare license "BSD";
declare copyright "(C) Hermann Meyer 2008";
import("stdfaust.lib");
import("amp_sim.lib");
F = 300; //nentry("split_low_freq", 250, 20, 600, 10);
F1 = 1200; //nentry("split_middle_freq", 650, 600, 1250, 10);
F2 = 3200; //nentry("split_high_freq", 1250, 1250, 12000, 10);
/**********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
***********************************************************************/
//------------------------------ ba.count and ba.take --------------------------------------
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
//------------------------------ low/high-passfilters --------------------------------------
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
S = (O-parity)/2; // current section number
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
//------------------------------ an.analyzer --------------------------------------
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
/**********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completly to > 0.9.27
***********************************************************************/
//----------distortion---------
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1.0 - lp2tm1(x) * 1.02 - 1.0 : clip(-1.0,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
vt = valve.vt(dist, q) : ma.neg : valve.vt(dist, q) : ma.neg with
{
q_p = 0.9;
dist_p = 1.7;
q = -q_p*-q_p*-q_p;
dist = pow(10,dist_p);
};
//-distortion
distdrive(drive) = wet_dry_mix(wet_dry, _: distortion)
with {
//h = (2.0): ba.db2linear; //1,2589412
//l = (4.0): ba.db2linear; //1,584893192
//mh = (4.0): ba.db2linear; //1,584893192
//ml = (2.5): ba.db2linear; //1,333521432
distortion1 = _:ef.cubicnl(0.45*drive,0.0): *(1.2589412); // l
distortion2 = _:ef.cubicnl(0.4*drive,0.0) : *(1.584893192); // h
distortion3 = _:ef.cubicnl(1.0*drive,0.0) : *(1.584893192); // ml
distortion4 = _:ef.cubicnl(0.6*drive,0.0) : *(1.333521432); // mh
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
wet_dry = (drive - 0.5) * 2;
};
clipit = min(0.7) : max(-0.7) ;
wetdry = vslider("wet_dry", 100, 0, 100, 1) : /(100);
drive = vslider("drive", 0.35, 0, 1, 0.01) : si.smooth(0.999);
dist(drive) = distdrive(drive) ;
dist1(drive) = _<: (clipit: ef.cubicnl(drive,0.0) : * (0.5)), distdrive(drive) :>_ ;
dist2(drive) = val : distdrive(drive) ;
dist4(drive) = val <: (ef.cubicnl(drive,0.0) : * (0.5)), distdrive(drive) :>_ ;
process = distdrive;
|
https://raw.githubusercontent.com/sadko4u/tamgamp.lv2/426da74142fcb6b7687a35b2b1dda3392e171b92/src/faust/amp_dist.dsp
|
faust
|
* Simulation of Guitarix amplifier chain
*
* Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
* Copyright (C) 2011 Pete Shorthose <http://guitarix.org/>
* This file is part of tamgamp.lv2 <https://github.com/sadko4u/tamgamp.lv2>.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
nentry("split_low_freq", 250, 20, 600, 10);
nentry("split_middle_freq", 650, 600, 1250, 10);
nentry("split_high_freq", 1250, 1250, 12000, 10);
*********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
**********************************************************************
------------------------------ ba.count and ba.take --------------------------------------
------------------------------ low/high-passfilters --------------------------------------
bilinear-transform scale-factor
bilinear-transform scale-factor
current section number
------------------------------ an.analyzer --------------------------------------
*********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completly to > 0.9.27
**********************************************************************
----------distortion---------
-distortion
h = (2.0): ba.db2linear; //1,2589412
l = (4.0): ba.db2linear; //1,584893192
mh = (4.0): ba.db2linear; //1,584893192
ml = (2.5): ba.db2linear; //1,333521432
l
h
ml
mh
|
declare id "amp_dist";
declare version "0.01";
declare author "Hermann Meyer";
declare license "BSD";
declare copyright "(C) Hermann Meyer 2008";
import("stdfaust.lib");
import("amp_sim.lib");
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1.0 - lp2tm1(x) * 1.02 - 1.0 : clip(-1.0,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
vt = valve.vt(dist, q) : ma.neg : valve.vt(dist, q) : ma.neg with
{
q_p = 0.9;
dist_p = 1.7;
q = -q_p*-q_p*-q_p;
dist = pow(10,dist_p);
};
distdrive(drive) = wet_dry_mix(wet_dry, _: distortion)
with {
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
wet_dry = (drive - 0.5) * 2;
};
clipit = min(0.7) : max(-0.7) ;
wetdry = vslider("wet_dry", 100, 0, 100, 1) : /(100);
drive = vslider("drive", 0.35, 0, 1, 0.01) : si.smooth(0.999);
dist(drive) = distdrive(drive) ;
dist1(drive) = _<: (clipit: ef.cubicnl(drive,0.0) : * (0.5)), distdrive(drive) :>_ ;
dist2(drive) = val : distdrive(drive) ;
dist4(drive) = val <: (ef.cubicnl(drive,0.0) : * (0.5)), distdrive(drive) :>_ ;
process = distdrive;
|
23836ba71761d6709ccb796b9d494e9e0beb484350fa75a9592b66d1ee6702f9
|
sadko4u/tamgamp.lv2
|
tonestack.dsp
|
/*
* Simulation of Guitarix tonestack chain
*
* Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
* Copyright (C) 2011 Pete Shorthose <http://guitarix.org/>
* This file is part of tamgamp.lv2 <https://github.com/sadko4u/tamgamp.lv2>.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
//tonestack ba.selector
declare id "tonestack";
import("stdfaust.lib");
/****************************************************************
** Equalisation 3 bands
** C1
** IN >---------||---------
** | |
** | | R4 | | R1 Treble
** | | | |<------< Out
** | | | |
** | C2 |
** |-------||--------|------
** | | |
** | | | |
** | | |<---- R2 Bass
** | | |
** | |
** | C3 | |
** --------||------>| | R3 Middle
** | |
** |
** _|_
** -
*/
/****************************************************************
** Guitar tone stacks
** values from CAPS plugin tonestack (based on work from D.T. Yeh)
*/
ts = environment {
k = *(1e3);
M = *(1e6);
nF = *(1e-9);
pF = *(1e-12);
/*
* Exact imlementation of 59 Bassman 5F6-A.
* Different bassmans have more complicated schematics
*/
bassman = environment { /* Fender 59 Bassman 5F6-A */
R1 = 250:k;
R2 = 1:M;
R3 = 25:k;
R4 = 56:k;
C1 = 250:pF;
C2 = 20:nF;
C3 = 20:nF;
};
/*
* The schematic of next generation (Mark-II and higher) differs
*/
mesa = environment { /* Mesa/Boogie Mark */
R1 = 250:k;
R2 = 250:k;
R3 = 10:k;
R4 = 100:k;
C1 = 250:pF;
C2 = 100:nF;
C3 = 47:nF;
};
/*
* Exact implementation of Mesa/Boogie Rectifier Solo tone stack
*/
mesa_rect_solo = environment { /* Mesa/Boogie Rectifier Solo */
R1 = 220:k;
R2 = 1:M;
R3 = 25:k;
R4 = 47:k;
C1 = 500:pF;
C2 = 20:nF;
C3 = 20:nF;
};
/*
* Exact implementation of Mesa/Boogie VTwin tone stack
*/
mesa_vtwin = environment { /* Mesa/Boogie VTwin */
R1 = 200:k;
R2 = 1:M;
R3 = 25:k;
R4 = 33:k;
C1 = 500:pF;
C2 = 22:nF;
C3 = 22:nF;
};
/*
* Does not match schematics: R3 is a 10k resistor, not potentiometer,
* same with the 250k R2
*/
twin = environment { /* 69 Twin Reverb AA270 */
R1 = 250:k;
R2 = 250:k;
R3 = 10:k;
R4 = 100:k;
C1 = 120:pF;
C2 = 100:nF;
C3 = 47:nF;
};
princeton = environment { /* 64 Princeton AA1164 */
R1 = 250:k;
R2 = 250:k;
R3 = 4.8:k;
R4 = 100:k;
C1 = 250:pF;
C2 = 100:nF;
C3 = 47:nF;
};
/* Marshall */
jcm800 = environment { /* 59/81 JCM-800 Lead 100 2203 */
R1 = 220:k;
R2 = 1:M;
R3 = 22:k;
R4 = 33:k;
C1 = 470:pF;
C2 = 22:nF;
C3 = 22:nF;
};
/* 90 JCM-900 Master 2100: same as JCM-800 */
jcm2000 = environment { /* 81 2000 Lead */
R1 = 250:k;
R2 = 1:M;
R3 = 25:k;
R4 = 56:k; /* a 10 k fixed + 100 k pot in series actually */
C1 = 500:pF;
C2 = 22:nF;
C3 = 22:nF;
};
jtm45 = environment { /* JTM 45 */
R1 = 250:k;
R2 = 1:M;
R3 = 25:k;
R4 = 33:k;
C1 = 270:pF;
C2 = 22:nF;
C3 = 22:nF;
};
/* parameter order is R1 - R4, C1 - C3 */
mlead = environment { /* 67 Major Lead 200 */
R1 = 250:k;
R2 = 1:M;
R3 = 25:k;
R4 = 33:k;
C1 = 500:pF;
C2 = 22:nF;
C3 = 22:nF;
};
m2199 = environment { /* undated M2199 30W solid state */
R1 = 250:k;
R2 = 250:k;
R3 = 25:k;
R4 = 56:k;
C1 = 250:pF;
C2 = 47:nF;
C3 = 47:nF;
};
/* Vox */
ac30 = environment { /* 59/86 AC-30 */
/* R3 is fixed (circuit differs anyway) */
R1 = 1:M;
R2 = 1:M;
R3 = 10:k;
R4 = 100:k;
C1 = 50:pF;
C2 = 22:nF;
C3 = 22:nF;
};
ac15 = environment { /* VOX AC-15 */
R1 = 220:k;
R2 = 220:k;
R3 = 220:k;
R4 = 100:k;
C1 = 470:pF;
C2 = 100:nF;
C3 = 47:nF;
};
soldano = environment { /* Soldano SLO 100 */
R1 = 250:k;
R2 = 1:M;
R3 = 25:k;
R4 = 47:k;
C1 = 470:pF;
C2 = 20:nF;
C3 = 20:nF;
};
sovtek = environment { /* MIG 100 H*/
R1 = 500:k;
R2 = 1:M;
R3 = 10:k;
R4 = 47:k;
C1 = 470:pF;
C2 = 22:nF;
C3 = 22:nF;
};
peavey = environment { /* c20*/
R1 = 250:k;
R2 = 250:k;
R3 = 20:k;
R4 = 68:k;
C1 = 270:pF;
C2 = 22:nF;
C3 = 22:nF;
};
ibanez = environment { /* gx20 */
R1 = 250:k;
R2 = 250:k;
R3 = 10:k;
R4 = 100:k;
C1 = 270:pF;
C2 = 100:nF;
C3 = 40:nF;
};
roland = environment { /* Cube 60 */
R1 = 250:k;
R2 = 250:k;
R3 = 10:k;
R4 = 41:k;
C1 = 240:pF;
C2 = 33:nF;
C3 = 82:nF;
};
ampeg = environment { /* VL 501 */
R1 = 250:k;
R2 = 1:M;
R3 = 25:k;
R4 = 32:k;
C1 = 470:pF;
C2 = 22:nF;
C3 = 22:nF;
};
ampeg_rev = environment { /* reverbrocket*/
R1 = 250:k;
R2 = 250:k;
R3 = 10:k;
R4 = 100:k;
C1 = 100:pF;
C2 = 100:nF;
C3 = 47:nF;
};
bogner = environment { /* Triple Giant Preamp */
R1 = 250:k;
R2 = 1:M;
R3 = 33:k;
R4 = 51:k;
C1 = 220:pF;
C2 = 15:nF;
C3 = 47:nF;
};
groove = environment { /* Trio Preamp */
R1 = 220:k;
R2 = 1:M;
R3 = 22:k;
R4 = 68:k;
C1 = 470:pF;
C2 = 22:nF;
C3 = 22:nF;
};
crunch = environment { /* Hughes&Kettner */
R1 = 220:k;
R2 = 220:k;
R3 = 10:k;
R4 = 100:k;
C1 = 220:pF;
C2 = 47:nF;
C3 = 47:nF;
};
fender_blues = environment { /* Fender blues junior */
R1 = 250:k;
R2 = 250:k;
R3 = 25:k;
R4 = 100:k;
C1 = 250:pF;
C2 = 22:nF;
C3 = 22:nF;
};
fender_default = environment { /* Fender */
R1 = 250:k;
R2 = 250:k;
R3 = 10:k;
R4 = 100:k;
C1 = 250:pF;
C2 = 100:nF;
C3 = 47:nF;
};
fender_deville = environment { /* Fender Hot Rod */
R1 = 250:k;
R2 = 250:k;
R3 = 25:k;
R4 = 130:k;
C1 = 250:pF;
C2 = 100:nF;
C3 = 22:nF;
};
gibsen = environment { /* gs12 reverbrocket */
R1 = 1:M;
R2 = 1:M;
R3 = 94:k; // 47k fixed
R4 = 270:k;
C1 = 25:pF;
C2 = 60:nF;
C3 = 20:nF;
};
engl = environment { /* engl */
R1 = 250:k;
R2 = 1:M;
R3 = 20:k;
R4 = 100:k;
C1 = 600:pF;
C2 = 47:nF;
C3 = 47:nF;
};
};
t = vslider(".ts.treble", 0.5, 0, 1, 0.01);
m = vslider(".ts.middle", 0.5, 0, 1, 0.01);
l = vslider(".ts.bass", 0.5, 0, 1, 0.01) : (_-1)*3.4 : exp;
tonestack = 1/A0*fi.iir((B0,B1,B2,B3),(A1/A0,A2/A0,A3/A0)) with {
C1 = tse.C1;
C2 = tse.C2;
C3 = tse.C3;
R1 = tse.R1;
R2 = tse.R2;
R3 = tse.R3;
R4 = tse.R4;
b1 = t*C1*R1 + m*C3*R3 + l*(C1*R2 + C2*R2) + (C1*R3 + C2*R3);
b2 = t*(C1*C2*R1*R4 + C1*C3*R1*R4) - m*m*(C1*C3*R3*R3 + C2*C3*R3*R3)
+ m*(C1*C3*R1*R3 + C1*C3*R3*R3 + C2*C3*R3*R3)
+ l*(C1*C2*R1*R2 + C1*C2*R2*R4 + C1*C3*R2*R4)
+ l*m*(C1*C3*R2*R3 + C2*C3*R2*R3)
+ (C1*C2*R1*R3 + C1*C2*R3*R4 + C1*C3*R3*R4);
b3 = l*m*(C1*C2*C3*R1*R2*R3 + C1*C2*C3*R2*R3*R4)
- m*m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
+ m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
+ t*C1*C2*C3*R1*R3*R4 - t*m*C1*C2*C3*R1*R3*R4
+ t*l*C1*C2*C3*R1*R2*R4;
a0 = 1;
a1 = (C1*R1 + C1*R3 + C2*R3 + C2*R4 + C3*R4)
+ m*C3*R3 + l*(C1*R2 + C2*R2);
a2 = m*(C1*C3*R1*R3 - C2*C3*R3*R4 + C1*C3*R3*R3 + C2*C3*R3*R3)
+ l*m*(C1*C3*R2*R3 + C2*C3*R2*R3)
- m*m*(C1*C3*R3*R3 + C2*C3*R3*R3)
+ l*(C1*C2*R2*R4 + C1*C2*R1*R2 + C1*C3*R2*R4 + C2*C3*R2*R4)
+ (C1*C2*R1*R4 + C1*C3*R1*R4 + C1*C2*R3*R4 + C1*C2*R1*R3 + C1*C3*R3*R4 + C2*C3*R3*R4);
a3 = l*m*(C1*C2*C3*R1*R2*R3 + C1*C2*C3*R2*R3*R4)
- m*m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
+ m*(C1*C2*C3*R3*R3*R4 + C1*C2*C3*R1*R3*R3 - C1*C2*C3*R1*R3*R4)
+ l*C1*C2*C3*R1*R2*R4
+ C1*C2*C3*R1*R3*R4;
c = 2*float(ma.SR);
B0 = -b1*c - b2*pow(c,2) - b3*pow(c,3);
B1 = -b1*c + b2*pow(c,2) + 3*b3*pow(c,3);
B2 = b1*c + b2*pow(c,2) - 3*b3*pow(c,3);
B3 = b1*c - b2*pow(c,2) + b3*pow(c,3);
A0 = -a0 - a1*c - a2*pow(c,2) - a3*pow(c,3);
A1 = -3*a0 - a1*c + a2*pow(c,2) + 3*a3*pow(c,3);
A2 = -3*a0 + a1*c + a2*pow(c,2) - 3*a3*pow(c,3);
A3 = -a0 + a1*c - a2*pow(c,2) + a3*pow(c,3);
};
tse = ts.bassman;
process = tonestack;
|
https://raw.githubusercontent.com/sadko4u/tamgamp.lv2/426da74142fcb6b7687a35b2b1dda3392e171b92/src/faust/tonestack.dsp
|
faust
|
* Simulation of Guitarix tonestack chain
*
* Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
* Copyright (C) 2011 Pete Shorthose <http://guitarix.org/>
* This file is part of tamgamp.lv2 <https://github.com/sadko4u/tamgamp.lv2>.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
tonestack ba.selector
***************************************************************
** Equalisation 3 bands
** C1
** IN >---------||---------
** | |
** | | R4 | | R1 Treble
** | | | |<------< Out
** | | | |
** | C2 |
** |-------||--------|------
** | | |
** | | | |
** | | |<---- R2 Bass
** | | |
** | |
** | C3 | |
** --------||------>| | R3 Middle
** | |
** |
** _|_
** -
***************************************************************
** Guitar tone stacks
** values from CAPS plugin tonestack (based on work from D.T. Yeh)
* Exact imlementation of 59 Bassman 5F6-A.
* Different bassmans have more complicated schematics
Fender 59 Bassman 5F6-A
* The schematic of next generation (Mark-II and higher) differs
Mesa/Boogie Mark
* Exact implementation of Mesa/Boogie Rectifier Solo tone stack
Mesa/Boogie Rectifier Solo
* Exact implementation of Mesa/Boogie VTwin tone stack
Mesa/Boogie VTwin
* Does not match schematics: R3 is a 10k resistor, not potentiometer,
* same with the 250k R2
69 Twin Reverb AA270
64 Princeton AA1164
Marshall
59/81 JCM-800 Lead 100 2203
90 JCM-900 Master 2100: same as JCM-800
81 2000 Lead
a 10 k fixed + 100 k pot in series actually
JTM 45
parameter order is R1 - R4, C1 - C3
67 Major Lead 200
undated M2199 30W solid state
Vox
59/86 AC-30
R3 is fixed (circuit differs anyway)
VOX AC-15
Soldano SLO 100
MIG 100 H
c20
gx20
Cube 60
VL 501
reverbrocket
Triple Giant Preamp
Trio Preamp
Hughes&Kettner
Fender blues junior
Fender
Fender Hot Rod
gs12 reverbrocket
47k fixed
engl
|
declare id "tonestack";
import("stdfaust.lib");
ts = environment {
k = *(1e3);
M = *(1e6);
nF = *(1e-9);
pF = *(1e-12);
R1 = 250:k;
R2 = 1:M;
R3 = 25:k;
R4 = 56:k;
C1 = 250:pF;
C2 = 20:nF;
C3 = 20:nF;
};
R1 = 250:k;
R2 = 250:k;
R3 = 10:k;
R4 = 100:k;
C1 = 250:pF;
C2 = 100:nF;
C3 = 47:nF;
};
R1 = 220:k;
R2 = 1:M;
R3 = 25:k;
R4 = 47:k;
C1 = 500:pF;
C2 = 20:nF;
C3 = 20:nF;
};
R1 = 200:k;
R2 = 1:M;
R3 = 25:k;
R4 = 33:k;
C1 = 500:pF;
C2 = 22:nF;
C3 = 22:nF;
};
R1 = 250:k;
R2 = 250:k;
R3 = 10:k;
R4 = 100:k;
C1 = 120:pF;
C2 = 100:nF;
C3 = 47:nF;
};
R1 = 250:k;
R2 = 250:k;
R3 = 4.8:k;
R4 = 100:k;
C1 = 250:pF;
C2 = 100:nF;
C3 = 47:nF;
};
R1 = 220:k;
R2 = 1:M;
R3 = 22:k;
R4 = 33:k;
C1 = 470:pF;
C2 = 22:nF;
C3 = 22:nF;
};
R1 = 250:k;
R2 = 1:M;
R3 = 25:k;
C1 = 500:pF;
C2 = 22:nF;
C3 = 22:nF;
};
R1 = 250:k;
R2 = 1:M;
R3 = 25:k;
R4 = 33:k;
C1 = 270:pF;
C2 = 22:nF;
C3 = 22:nF;
};
R1 = 250:k;
R2 = 1:M;
R3 = 25:k;
R4 = 33:k;
C1 = 500:pF;
C2 = 22:nF;
C3 = 22:nF;
};
R1 = 250:k;
R2 = 250:k;
R3 = 25:k;
R4 = 56:k;
C1 = 250:pF;
C2 = 47:nF;
C3 = 47:nF;
};
R1 = 1:M;
R2 = 1:M;
R3 = 10:k;
R4 = 100:k;
C1 = 50:pF;
C2 = 22:nF;
C3 = 22:nF;
};
R1 = 220:k;
R2 = 220:k;
R3 = 220:k;
R4 = 100:k;
C1 = 470:pF;
C2 = 100:nF;
C3 = 47:nF;
};
R1 = 250:k;
R2 = 1:M;
R3 = 25:k;
R4 = 47:k;
C1 = 470:pF;
C2 = 20:nF;
C3 = 20:nF;
};
R1 = 500:k;
R2 = 1:M;
R3 = 10:k;
R4 = 47:k;
C1 = 470:pF;
C2 = 22:nF;
C3 = 22:nF;
};
R1 = 250:k;
R2 = 250:k;
R3 = 20:k;
R4 = 68:k;
C1 = 270:pF;
C2 = 22:nF;
C3 = 22:nF;
};
R1 = 250:k;
R2 = 250:k;
R3 = 10:k;
R4 = 100:k;
C1 = 270:pF;
C2 = 100:nF;
C3 = 40:nF;
};
R1 = 250:k;
R2 = 250:k;
R3 = 10:k;
R4 = 41:k;
C1 = 240:pF;
C2 = 33:nF;
C3 = 82:nF;
};
R1 = 250:k;
R2 = 1:M;
R3 = 25:k;
R4 = 32:k;
C1 = 470:pF;
C2 = 22:nF;
C3 = 22:nF;
};
R1 = 250:k;
R2 = 250:k;
R3 = 10:k;
R4 = 100:k;
C1 = 100:pF;
C2 = 100:nF;
C3 = 47:nF;
};
R1 = 250:k;
R2 = 1:M;
R3 = 33:k;
R4 = 51:k;
C1 = 220:pF;
C2 = 15:nF;
C3 = 47:nF;
};
R1 = 220:k;
R2 = 1:M;
R3 = 22:k;
R4 = 68:k;
C1 = 470:pF;
C2 = 22:nF;
C3 = 22:nF;
};
R1 = 220:k;
R2 = 220:k;
R3 = 10:k;
R4 = 100:k;
C1 = 220:pF;
C2 = 47:nF;
C3 = 47:nF;
};
R1 = 250:k;
R2 = 250:k;
R3 = 25:k;
R4 = 100:k;
C1 = 250:pF;
C2 = 22:nF;
C3 = 22:nF;
};
R1 = 250:k;
R2 = 250:k;
R3 = 10:k;
R4 = 100:k;
C1 = 250:pF;
C2 = 100:nF;
C3 = 47:nF;
};
R1 = 250:k;
R2 = 250:k;
R3 = 25:k;
R4 = 130:k;
C1 = 250:pF;
C2 = 100:nF;
C3 = 22:nF;
};
R1 = 1:M;
R2 = 1:M;
R4 = 270:k;
C1 = 25:pF;
C2 = 60:nF;
C3 = 20:nF;
};
R1 = 250:k;
R2 = 1:M;
R3 = 20:k;
R4 = 100:k;
C1 = 600:pF;
C2 = 47:nF;
C3 = 47:nF;
};
};
t = vslider(".ts.treble", 0.5, 0, 1, 0.01);
m = vslider(".ts.middle", 0.5, 0, 1, 0.01);
l = vslider(".ts.bass", 0.5, 0, 1, 0.01) : (_-1)*3.4 : exp;
tonestack = 1/A0*fi.iir((B0,B1,B2,B3),(A1/A0,A2/A0,A3/A0)) with {
C1 = tse.C1;
C2 = tse.C2;
C3 = tse.C3;
R1 = tse.R1;
R2 = tse.R2;
R3 = tse.R3;
R4 = tse.R4;
b1 = t*C1*R1 + m*C3*R3 + l*(C1*R2 + C2*R2) + (C1*R3 + C2*R3);
b2 = t*(C1*C2*R1*R4 + C1*C3*R1*R4) - m*m*(C1*C3*R3*R3 + C2*C3*R3*R3)
+ m*(C1*C3*R1*R3 + C1*C3*R3*R3 + C2*C3*R3*R3)
+ l*(C1*C2*R1*R2 + C1*C2*R2*R4 + C1*C3*R2*R4)
+ l*m*(C1*C3*R2*R3 + C2*C3*R2*R3)
+ (C1*C2*R1*R3 + C1*C2*R3*R4 + C1*C3*R3*R4);
b3 = l*m*(C1*C2*C3*R1*R2*R3 + C1*C2*C3*R2*R3*R4)
- m*m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
+ m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
+ t*C1*C2*C3*R1*R3*R4 - t*m*C1*C2*C3*R1*R3*R4
+ t*l*C1*C2*C3*R1*R2*R4;
a0 = 1;
a1 = (C1*R1 + C1*R3 + C2*R3 + C2*R4 + C3*R4)
+ m*C3*R3 + l*(C1*R2 + C2*R2);
a2 = m*(C1*C3*R1*R3 - C2*C3*R3*R4 + C1*C3*R3*R3 + C2*C3*R3*R3)
+ l*m*(C1*C3*R2*R3 + C2*C3*R2*R3)
- m*m*(C1*C3*R3*R3 + C2*C3*R3*R3)
+ l*(C1*C2*R2*R4 + C1*C2*R1*R2 + C1*C3*R2*R4 + C2*C3*R2*R4)
+ (C1*C2*R1*R4 + C1*C3*R1*R4 + C1*C2*R3*R4 + C1*C2*R1*R3 + C1*C3*R3*R4 + C2*C3*R3*R4);
a3 = l*m*(C1*C2*C3*R1*R2*R3 + C1*C2*C3*R2*R3*R4)
- m*m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
+ m*(C1*C2*C3*R3*R3*R4 + C1*C2*C3*R1*R3*R3 - C1*C2*C3*R1*R3*R4)
+ l*C1*C2*C3*R1*R2*R4
+ C1*C2*C3*R1*R3*R4;
c = 2*float(ma.SR);
B0 = -b1*c - b2*pow(c,2) - b3*pow(c,3);
B1 = -b1*c + b2*pow(c,2) + 3*b3*pow(c,3);
B2 = b1*c + b2*pow(c,2) - 3*b3*pow(c,3);
B3 = b1*c - b2*pow(c,2) + b3*pow(c,3);
A0 = -a0 - a1*c - a2*pow(c,2) - a3*pow(c,3);
A1 = -3*a0 - a1*c + a2*pow(c,2) + 3*a3*pow(c,3);
A2 = -3*a0 + a1*c + a2*pow(c,2) - 3*a3*pow(c,3);
A3 = -a0 + a1*c - a2*pow(c,2) + a3*pow(c,3);
};
tse = ts.bassman;
process = tonestack;
|
1db21accf256f55ced114b4ba1acf00c0aa23a516f7e83328bded9f8840bb2e1
|
mengqimusic/bfw
|
Blippoo.dsp
|
declare name "Blippoo";
declare version "0.1";
declare author "Meng Qi";
declare license "BSD";
declare copyright "(c)Meng Qi 2022";
declare date "2022-09-15";
import("stdfaust.lib");
// ▄▀▀█▄▄ ▄▀▀▀▀▄ ▄▀▀█▀▄ ▄▀▀▄▀▀▀▄ ▄▀▀▄▀▀▀▄ ▄▀▀▀▀▄ ▄▀▀▀▀▄
// ▐ ▄▀ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █
// █▄▄▄▀ ▐ █ ▐ █ ▐ ▐ █▀▀▀▀ ▐ █▀▀▀▀ █ █ █ █
// █ █ █ █ █ █ ▀▄ ▄▀ ▀▄ ▄▀
// ▄▀▄▄▄▀ ▄▀▄▄▄▄▄▄▀ ▄▀▀▀▀▀▄ ▄▀ ▄▀ ▀▀▀▀ ▀▀▀▀
// █ ▐ █ █ █ █ █
// ▐ ▐ ▐ ▐ ▐ ▐
// ▄▀▀▀█▄ ▄▀▀▀▀▄ ▄▀▀▄▀▀▀▄
// █ ▄▀ ▀▄ █ █ █ █ █
// ▐ █▄▄▄▄ █ █ ▐ █▀▀█▀
// █ ▐ ▀▄ ▄▀ ▄▀ █
// █ ▀▀▀▀ █ █
// █ ▐ ▐
// ▐
// ▄▀▀▄ ▄▀▀▄ ▄▀▀█▀▄ ▄▀▀▄ ▀▄ ▄▀▀▀▀▄ ▄▀▀█▀▄ ▄▀▀█▄▄▄▄
// █ █ ▐ █ █ █ █ █ █ █ █ █ █ █ █ ▐ ▄▀ ▐
// ▐ █ █ ▐ █ ▐ ▐ █ ▀█ █ ▀▄▄ ▐ █ ▐ █▄▄▄▄▄
// █ ▄ █ █ █ █ █ █ █ █ █ ▌
// ▀▄▀ ▀▄ ▄▀ ▄▀▀▀▀▀▄ ▄▀ █ ▐▀▄▄▄▄▀ ▐ ▄▀▀▀▀▀▄ ▄▀▄▄▄▄
// ▀ █ █ █ ▐ ▐ █ █ █ ▐
// ▐ ▐ ▐ ▐ ▐ ▐
//-----------------------------------------------
// Parameters
//-----------------------------------------------
rateA = hslider("rateA", 25.31, -50, 127, 0.01); // bottom C ⬇ C# ⬆ / -10
rateB = hslider("rateB", -15.5, -50, 127, 0.01); // top C ⬇ C# ⬆ / -11.84
source0 = hslider("source0", 1, 0, 2, 1); // left octave toggle
source1 = hslider("source1", 1, 0, 2, 1); // right octave toggle
r_to_rateA = hslider("r_to_rateA", .5082, 0, 1, 0.001) : si.smoo; // bottom D ⬇ D# ⬆
r_to_rateB = hslider("r_to_rateB", .5791, 0, 1, 0.001) : si.smoo; // top D ⬇ D# ⬆
sh_to_rateA = hslider("sh_to_rateA", .2659, 0, 1, 0.001) : si.smoo; // bottom G ⬇ F# ⬆
sh_to_rateB = hslider("sh_to_rateB", .5791, 0, 1, 0.001) : si.smoo; // top G ⬇ F# ⬆
peak1 = hslider("peak1", 37.52, -20, 135, 0.01) : si.smoo; // bottom B ⬇ A# ⬆
peak2 = hslider("peak2", 72.8, -20, 135, 0.01) : si.smoo; // top B ⬇ A# ⬆
r_to_peak1 = hslider("r_to_peak1", .3723, 0, 1, 0.001) : si.smoo; // bottom A ⬇ G# ⬆
r_to_peak2 = hslider("r_to_peak2", .5732, 0, 1, 0.001) : si.smoo; // top A ⬇ G# ⬆
sh_sp_peaks = hslider("sh_sp_peaks", .2518, 0, 1, 0.001) : si.smoo; // top E ⬇ F ⬆
gain = hslider("gain", 1, 0, 1, 0.01) : si.smoo; // volume slider
Q = hslider("Q", 31, 1, 200, 0.1); // fixed
sh_source_mix = hslider("sh_source_mix", 0, 0, 1, 0.01); // decay slider
mix = hslider("mix", 1, 0, 1, 0.01) : si.smoo; // mix slider
amp_follower_decay = 0.;
mod_depth = hslider("mod_depth", 100, 10, 200, 1);
a3_freq = hslider("a3_freq", 440, 300, 600, 0.01);
// in normal mode, bottom E / F are used for selecting the speed of parameter ⬇ ⬆
// mode buttons for tap tempo of each osc, hold together then release for keyboard mode, in keyboard mode they are used for octave ⬇ ⬆
// bottom keyboard cycle between 2 osc, top keyboard cycles between 2 filter
// source toggle switch external input source
//-----------------------------------------------
// Functions
//-----------------------------------------------
mtof(note) = a3_freq * pow(2., (note - 69) / 12);
sr(in, cl, data_source) = // 一个带有 8 步循环,16 步正反相循环和持续不停输入模式的移位寄存器
(_ <: _, in, (_ * -1) : ba.selectn(3, data_source)
: ba.latch(cl''''''')
<: _, ba.latch(cl'''''')
<: _, _, !, ba.latch(cl''''')
<: _, _, _, !, !, ba.latch(cl'''')
<: _, _, _, _, !, !, !, ba.latch(cl''')
<: _, _, _, _, _, !, !, !, !, ba.latch(cl'')
<: _, _, _, _, _, _, !, !, !, !, !, ba.latch(cl')
<: _, _, _, _, _, _, _, !, !, !, !, !, !, ba.latch(cl)
: ro.cross(8)) ~*(1);
one_peak(cutoff, Q) = fi.tf2np(b0,b1,b2,a1,a2)
with {
K = tan(ma.PI * cutoff / ma.SR);
norm = 1 / (1 + K / Q + K * K);
b0 = K / Q * norm;
b1 = 0;
b2 = -b0;
a1 = 2 * (K * K - 1) * norm;
a2 = (1 - K / Q + K * K) * norm;
};
blippoo(in_l, in_r) =
(
(
(
(
(
(rateA + _ * r_to_rateA * mod_depth + _ * sh_to_rateA * mod_depth : mtof : ma.SR * 0.5, _ : min),
(rateB + _ * r_to_rateB * mod_depth + _ * sh_to_rateB * mod_depth : mtof : ma.SR * 0.5, _ : min),
_
: os.lf_triangle, os.lf_triangle, _
<: _ > 0, _ > 0, !, source0, (_ > 0, _ > 0 : ro.cross(2)), !, source1, _ > 0, (_ * (1 - sh_source_mix), _ * sh_source_mix :> _), (_ > _ : _), !
: sr, sr, ba.latch, _
: _, _, _, !, !, !, !, !, _, _, _, !, !, !, !, !, _, _ // last 3-bits from sr, last 3 bits from sr, SH, Comparator
: par(i, 3, (_ <: attach(_, _ : an.amp_follower(amp_follower_decay) : hbargraph("srA_bit_out_%i", 0, 1)))),
par(i, 3, (_ <: attach(_, _ : an.amp_follower(amp_follower_decay) : hbargraph("srB_bit_out_%i", 0, 1)))),
_, _
: (_ * 0.572, _ * 0.286, _ * 0.143, _ * 0.572, _ * 0.286, _ * 0.143 : ro.interleave(3,2) :> _, _), (_ <: _, _, _), _
: _, _, _, _, _, _ // runglerA, runglerB, SH, SH, SH, Comparator
: _, ro.cross(2), _, _, _ // runglerA, SH, runglerB, SH, SH, Comparator
) ~*(1) // runglerA recursed
: ro.cross(2), _, _, _, _ // SH, runglerA, runglerB, SH, SH, Comparator
) ~*(1) // SH recursed
: !, _, _, _, _, _ // runglerA, runglerB, SH, SH, Comparator
: ro.cross(2), _, _, _ // runglerB, runglerA, SH, SH, Comparator
) ~*(1) // runglerB recursed
: ro.crossNM(2,1), _, _ // SH, runglerA, runglerB, SH, Comparator
) ~*(1) // SH recursed
: !, _, _, _, _ // runglerA, runglerB, SH, Comparator
<: _, _, !, !, _, _, _, _ // runglerA, runglerB, runglerA, runglerB, SH, Comparator
: (_, _ :> _ * 0.5), _, _, _, _ // (runglerA + runglerB) * 0.5, runglerA, runglerB, SH, Comparator
) ~*(1) // (runglerA + runglerB) * 0.5 recursed
: !, _, _, _, _ // runglerA, runglerB, SH, Comparator
: _, _, (_ <: _, _), (_ <: _, _) // runglerA, runglerB, SH, SH, Comparator, Comparator
: _, (_, _ : ro.cross(2)), _, _, _ // runglerA, SH, runglerB, SH, Comparator, Comparator
: _, _, ro.crossNM(2,1), _ // runglerA, SH, Comparator, runglerB, SH, Comparator
: (_ * r_to_peak1 * mod_depth + _ * -1 * sh_sp_peaks * mod_depth + peak1 : mtof : 10., _ : max : ma.SR / 2, _ : min), Q, (_ * mix, in_l * (1 - mix) :> _),
(_ * r_to_peak2 * mod_depth + _ * 1 * sh_sp_peaks * mod_depth + peak2 : mtof : 10., _ : max : ma.SR / 2, _ : min), Q, (_ * mix, in_r * (1 - mix) :> _)
: one_peak, one_peak
: fi.dcblocker, fi.dcblocker
: _ * gain, _ * gain
: ef.cubicnl(0.8, 0), ef.cubicnl(0.8, 0)
;
//-----------------------------------------------
// Process
//-----------------------------------------------
process = _, _ : blippoo;
/* Thank you Rob!
_ /)
mo / )
|/)\)
/\_
\__|=
( )
__)(__
_____/ \\_____
| ||
| _ ___ _ ||
| | \ | | \ ||
| | | | | | ||
| |_/ | |_/ ||
| | \ | | ||
| | \ | | ||
| | \. _|_. | . ||
| ||
* | * ** * ** |** **
\)).\..//.,(//,,..,,\||(,,.,\\,.((/*/
|
https://raw.githubusercontent.com/mengqimusic/bfw/2b47c95dda9152e6314edc81fab17037c6d7ca91/Blippoo.dsp
|
faust
|
▄▀▀█▄▄ ▄▀▀▀▀▄ ▄▀▀█▀▄ ▄▀▀▄▀▀▀▄ ▄▀▀▄▀▀▀▄ ▄▀▀▀▀▄ ▄▀▀▀▀▄
▐ ▄▀ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █
█▄▄▄▀ ▐ █ ▐ █ ▐ ▐ █▀▀▀▀ ▐ █▀▀▀▀ █ █ █ █
█ █ █ █ █ █ ▀▄ ▄▀ ▀▄ ▄▀
▄▀▄▄▄▀ ▄▀▄▄▄▄▄▄▀ ▄▀▀▀▀▀▄ ▄▀ ▄▀ ▀▀▀▀ ▀▀▀▀
█ ▐ █ █ █ █ █
▐ ▐ ▐ ▐ ▐ ▐
▄▀▀▀█▄ ▄▀▀▀▀▄ ▄▀▀▄▀▀▀▄
█ ▄▀ ▀▄ █ █ █ █ █
▐ █▄▄▄▄ █ █ ▐ █▀▀█▀
█ ▐ ▀▄ ▄▀ ▄▀ █
█ ▀▀▀▀ █ █
█ ▐ ▐
▐
▄▀▀▄ ▄▀▀▄ ▄▀▀█▀▄ ▄▀▀▄ ▀▄ ▄▀▀▀▀▄ ▄▀▀█▀▄ ▄▀▀█▄▄▄▄
█ █ ▐ █ █ █ █ █ █ █ █ █ █ █ █ ▐ ▄▀ ▐
▐ █ █ ▐ █ ▐ ▐ █ ▀█ █ ▀▄▄ ▐ █ ▐ █▄▄▄▄▄
█ ▄ █ █ █ █ █ █ █ █ █ ▌
▀▄▀ ▀▄ ▄▀ ▄▀▀▀▀▀▄ ▄▀ █ ▐▀▄▄▄▄▀ ▐ ▄▀▀▀▀▀▄ ▄▀▄▄▄▄
▀ █ █ █ ▐ ▐ █ █ █ ▐
▐ ▐ ▐ ▐ ▐ ▐
-----------------------------------------------
Parameters
-----------------------------------------------
bottom C ⬇ C# ⬆ / -10
top C ⬇ C# ⬆ / -11.84
left octave toggle
right octave toggle
bottom D ⬇ D# ⬆
top D ⬇ D# ⬆
bottom G ⬇ F# ⬆
top G ⬇ F# ⬆
bottom B ⬇ A# ⬆
top B ⬇ A# ⬆
bottom A ⬇ G# ⬆
top A ⬇ G# ⬆
top E ⬇ F ⬆
volume slider
fixed
decay slider
mix slider
in normal mode, bottom E / F are used for selecting the speed of parameter ⬇ ⬆
mode buttons for tap tempo of each osc, hold together then release for keyboard mode, in keyboard mode they are used for octave ⬇ ⬆
bottom keyboard cycle between 2 osc, top keyboard cycles between 2 filter
source toggle switch external input source
-----------------------------------------------
Functions
-----------------------------------------------
一个带有 8 步循环,16 步正反相循环和持续不停输入模式的移位寄存器
last 3-bits from sr, last 3 bits from sr, SH, Comparator
runglerA, runglerB, SH, SH, SH, Comparator
runglerA, SH, runglerB, SH, SH, Comparator
runglerA recursed
SH, runglerA, runglerB, SH, SH, Comparator
SH recursed
runglerA, runglerB, SH, SH, Comparator
runglerB, runglerA, SH, SH, Comparator
runglerB recursed
SH, runglerA, runglerB, SH, Comparator
SH recursed
runglerA, runglerB, SH, Comparator
runglerA, runglerB, runglerA, runglerB, SH, Comparator
(runglerA + runglerB) * 0.5, runglerA, runglerB, SH, Comparator
(runglerA + runglerB) * 0.5 recursed
runglerA, runglerB, SH, Comparator
runglerA, runglerB, SH, SH, Comparator, Comparator
runglerA, SH, runglerB, SH, Comparator, Comparator
runglerA, SH, Comparator, runglerB, SH, Comparator
-----------------------------------------------
Process
-----------------------------------------------
Thank you Rob!
_ /)
mo / )
|/)\)
/\_
\__|=
( )
__)(__
_____/ \\_____
| ||
| _ ___ _ ||
| | \ | | \ ||
| | | | | | ||
| |_/ | |_/ ||
| | \ | | ||
| | \ | | ||
| | \. _|_. | . ||
| ||
* | * ** * ** |** **
\)).\..//.,(//,,..,,\||(,,.,\\,.((/
|
declare name "Blippoo";
declare version "0.1";
declare author "Meng Qi";
declare license "BSD";
declare copyright "(c)Meng Qi 2022";
declare date "2022-09-15";
import("stdfaust.lib");
amp_follower_decay = 0.;
mod_depth = hslider("mod_depth", 100, 10, 200, 1);
a3_freq = hslider("a3_freq", 440, 300, 600, 0.01);
mtof(note) = a3_freq * pow(2., (note - 69) / 12);
(_ <: _, in, (_ * -1) : ba.selectn(3, data_source)
: ba.latch(cl''''''')
<: _, ba.latch(cl'''''')
<: _, _, !, ba.latch(cl''''')
<: _, _, _, !, !, ba.latch(cl'''')
<: _, _, _, _, !, !, !, ba.latch(cl''')
<: _, _, _, _, _, !, !, !, !, ba.latch(cl'')
<: _, _, _, _, _, _, !, !, !, !, !, ba.latch(cl')
<: _, _, _, _, _, _, _, !, !, !, !, !, !, ba.latch(cl)
: ro.cross(8)) ~*(1);
one_peak(cutoff, Q) = fi.tf2np(b0,b1,b2,a1,a2)
with {
K = tan(ma.PI * cutoff / ma.SR);
norm = 1 / (1 + K / Q + K * K);
b0 = K / Q * norm;
b1 = 0;
b2 = -b0;
a1 = 2 * (K * K - 1) * norm;
a2 = (1 - K / Q + K * K) * norm;
};
blippoo(in_l, in_r) =
(
(
(
(
(
(rateA + _ * r_to_rateA * mod_depth + _ * sh_to_rateA * mod_depth : mtof : ma.SR * 0.5, _ : min),
(rateB + _ * r_to_rateB * mod_depth + _ * sh_to_rateB * mod_depth : mtof : ma.SR * 0.5, _ : min),
_
: os.lf_triangle, os.lf_triangle, _
<: _ > 0, _ > 0, !, source0, (_ > 0, _ > 0 : ro.cross(2)), !, source1, _ > 0, (_ * (1 - sh_source_mix), _ * sh_source_mix :> _), (_ > _ : _), !
: sr, sr, ba.latch, _
: par(i, 3, (_ <: attach(_, _ : an.amp_follower(amp_follower_decay) : hbargraph("srA_bit_out_%i", 0, 1)))),
par(i, 3, (_ <: attach(_, _ : an.amp_follower(amp_follower_decay) : hbargraph("srB_bit_out_%i", 0, 1)))),
_, _
: (_ * 0.572, _ * 0.286, _ * 0.143, _ * 0.572, _ * 0.286, _ * 0.143 : ro.interleave(3,2) :> _, _), (_ <: _, _, _), _
: (_ * r_to_peak1 * mod_depth + _ * -1 * sh_sp_peaks * mod_depth + peak1 : mtof : 10., _ : max : ma.SR / 2, _ : min), Q, (_ * mix, in_l * (1 - mix) :> _),
(_ * r_to_peak2 * mod_depth + _ * 1 * sh_sp_peaks * mod_depth + peak2 : mtof : 10., _ : max : ma.SR / 2, _ : min), Q, (_ * mix, in_r * (1 - mix) :> _)
: one_peak, one_peak
: fi.dcblocker, fi.dcblocker
: _ * gain, _ * gain
: ef.cubicnl(0.8, 0), ef.cubicnl(0.8, 0)
;
process = _, _ : blippoo;
|
36691566d2dca217a117311ba2d0088577831ca477c4b7067a2e6a5217b82c61
|
francescoganassin/FaustDSP-synths
|
ganassynth3.dsp
|
declare type = “MIDISynth”
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",no.noise,os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave))
with{
wave = nentry("[0]Waveform",3,0,3,1);
freq = hslider("[1]freq",440,50,2000,0.01);
};
subtractive = waveGenerator : hgroup("[1]Filter",fi.resonlp(resFreq,q,1))
with{
ctFreq = hslider("[0]Cutoff Frequency[style:knob]",2000,50,10000,0.1);
q = hslider("[1]Q[style:knob]",5,1,30,0.1);
lfoFreq = hslider("[2]LFO Frequency[style:knob]",10,0.1,20,0.01);
lfoDepth = hslider("[3]LFO Depth[style:knob]",500,1,10000,1);
resFreq = os.osc(lfoFreq)*lfoDepth + ctFreq : max(30);
};
envelope = hgroup("[2]Envelope",en.adsr(attack,decay,sustain,release,gate)*gain*0.3)
with{
attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("Subtractive Synthesizer",subtractive*envelope);
|
https://raw.githubusercontent.com/francescoganassin/FaustDSP-synths/ef9eb3da660f4d53e631a12b7e4f63944c57f61c/ganassynth3.dsp
|
faust
|
declare type = “MIDISynth”
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",no.noise,os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave))
with{
wave = nentry("[0]Waveform",3,0,3,1);
freq = hslider("[1]freq",440,50,2000,0.01);
};
subtractive = waveGenerator : hgroup("[1]Filter",fi.resonlp(resFreq,q,1))
with{
ctFreq = hslider("[0]Cutoff Frequency[style:knob]",2000,50,10000,0.1);
q = hslider("[1]Q[style:knob]",5,1,30,0.1);
lfoFreq = hslider("[2]LFO Frequency[style:knob]",10,0.1,20,0.01);
lfoDepth = hslider("[3]LFO Depth[style:knob]",500,1,10000,1);
resFreq = os.osc(lfoFreq)*lfoDepth + ctFreq : max(30);
};
envelope = hgroup("[2]Envelope",en.adsr(attack,decay,sustain,release,gate)*gain*0.3)
with{
attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("Subtractive Synthesizer",subtractive*envelope);
|
|
04d4a41d398b130ae9d86a187217bb02107bb0c57b13ac6486681dd46466006b
|
francescoganassin/FaustDSP-synths
|
ganassfilter.dsp
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",no.noise,os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave))
with{
wave = nentry("[0]Waveform",3,0,3,1);
freq = vslider("[1]freq[style:knob]",440,40,2000,0.01);
};
subtractive = waveGenerator : hgroup("[i]Filters",filters);
filters = seq(i,3,someFilter(i))
with{
someFilter(i) = hgroup("[%j]Peak EQ (%j)",fi.peak_eq(lvlfx*lfo,peakfreq,40))
with{
j = i+1;
lvlfx = vslider("[0]Level FX",0,-10,10,0.01);
peakfreq = hslider("[1]Peak[style:knob]",(j^2)*200,0,4000,1);
bandwidth = hslider("[2]Bandwidth[style:knob]",40,20,200,1);
lfoFreq = hslider("[3]LFO Freq[style:knob]",5,0.1,10,0.01);
lfoDepth = hslider("[4]LFO Dpth[style:knob]",5,1,10,0.1);
lfo = os.osc(lfoFreq)*lfoDepth;
};
};
envelope = hgroup("[2]Envelope",en.adsr(attack,decay,sustain,release,gate)*gain*0.3)
with{
attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("Sub Synth w Filters",subtractive*envelope);
|
https://raw.githubusercontent.com/francescoganassin/FaustDSP-synths/ef9eb3da660f4d53e631a12b7e4f63944c57f61c/ganassfilter.dsp
|
faust
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",no.noise,os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave))
with{
wave = nentry("[0]Waveform",3,0,3,1);
freq = vslider("[1]freq[style:knob]",440,40,2000,0.01);
};
subtractive = waveGenerator : hgroup("[i]Filters",filters);
filters = seq(i,3,someFilter(i))
with{
someFilter(i) = hgroup("[%j]Peak EQ (%j)",fi.peak_eq(lvlfx*lfo,peakfreq,40))
with{
j = i+1;
lvlfx = vslider("[0]Level FX",0,-10,10,0.01);
peakfreq = hslider("[1]Peak[style:knob]",(j^2)*200,0,4000,1);
bandwidth = hslider("[2]Bandwidth[style:knob]",40,20,200,1);
lfoFreq = hslider("[3]LFO Freq[style:knob]",5,0.1,10,0.01);
lfoDepth = hslider("[4]LFO Dpth[style:knob]",5,1,10,0.1);
lfo = os.osc(lfoFreq)*lfoDepth;
};
};
envelope = hgroup("[2]Envelope",en.adsr(attack,decay,sustain,release,gate)*gain*0.3)
with{
attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("Sub Synth w Filters",subtractive*envelope);
|
|
766c2b36168134860b20e066f97230cd6a13f72dea0c8046a8ab02287f569a1d
|
francescoganassin/FaustDSP-synths
|
ganassynth2.dsp
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",no.noise,os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave))
with{
wave = nentry("[0]Waveform",3,0,3,1);
freq = hslider("[1]freq",440,50,2000,0.01);
};
filters = seq(i,2,someFilter(i))
with{
someFilter(i) = hgroup("[2]Peak eq %i",fi.peak_eq(Lfx,fx,band))
with{
lfoFreq = hslider("[2]LFO Frequency %i [style:knob]",10,0.1,20,0.01);
lfoDepth = hslider("[3]LFO Depth %i [style:knob]",500,1,10000,1);
freq = hslider("[1]PeakFreq %i [style:knob]", 440,50,2000,0.01);
Lfx = hslider("[4]PeakAmplitude(DB) %i [style:knob]", 0,-10,10,0.1);
fx = os.osc(lfoFreq)*lfoDepth + freq;
//fx = freq;
band = hslider("[5]PeakBand(Hz) %i [style:knob]", 500,1,10000,1);
};
};
envelope = hgroup("[3]Envelope",en.adsr(attack,decay,sustain,release,gate)*gain*0.3)
with{
attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
//gate = 1;
};
process = (waveGenerator : filters) * envelope;
|
https://raw.githubusercontent.com/francescoganassin/FaustDSP-synths/ef9eb3da660f4d53e631a12b7e4f63944c57f61c/ganassynth2.dsp
|
faust
|
fx = freq;
gate = 1;
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",no.noise,os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave))
with{
wave = nentry("[0]Waveform",3,0,3,1);
freq = hslider("[1]freq",440,50,2000,0.01);
};
filters = seq(i,2,someFilter(i))
with{
someFilter(i) = hgroup("[2]Peak eq %i",fi.peak_eq(Lfx,fx,band))
with{
lfoFreq = hslider("[2]LFO Frequency %i [style:knob]",10,0.1,20,0.01);
lfoDepth = hslider("[3]LFO Depth %i [style:knob]",500,1,10000,1);
freq = hslider("[1]PeakFreq %i [style:knob]", 440,50,2000,0.01);
Lfx = hslider("[4]PeakAmplitude(DB) %i [style:knob]", 0,-10,10,0.1);
fx = os.osc(lfoFreq)*lfoDepth + freq;
band = hslider("[5]PeakBand(Hz) %i [style:knob]", 500,1,10000,1);
};
};
envelope = hgroup("[3]Envelope",en.adsr(attack,decay,sustain,release,gate)*gain*0.3)
with{
attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
};
process = (waveGenerator : filters) * envelope;
|
2db9eee13c0cec3cdafafea698f7435fb871c05ad2869a618b94260d5dc37454
|
francescoganassin/FaustDSP-synths
|
scandinavian.dsp
|
import("stdfaust.lib");
freq = vslider("freq[style:knob]",440,400,500,1);
mod = os.osc(freq/2);
dxOsc(freq,mod,index) = os.triangle(freq+mod*index)+os.triangle(freq*2)+(os.triangle(freq*4)/7)+(os.sawtooth(freq/2)/9) ;
timbre = vgroup("[0]Modulation", dxOsc(freq,index1) : dxOsc(freq,index2) : dxOsc(freq,index2) : dxOsc(freq,index3))
with{
index1 = hslider("Mod 1",500,0,500,0.1);
index2 = hslider("Mod 2",2,0,10,0.1);
index3 = hslider("Mod 3",40,0,100,0.1);
};
sound = timbre : vgroup("[i]Filters",filters);
filters = seq(i,2,someFilter(i))
with{
someFilter(i) = hgroup("[%j]Peak EQ %j",fi.peak_eq(lvlfx*lfo,peakfreq,bandwidth))
with{
j = i+1;
lvlfx = hslider("[0]Level FX",4,0,5,0.01);
peakfreq = hslider("[1]Peak[style:knob]",(j^2)*10,10,100,1);
bandwidth = hslider("[2]Bandwidth[style:knob]",100,20,200,1);
lfoFreq = hslider("[3]LFO Freq[style:knob]",((i+2)^2)*1,0,100,0.01);
lfoDepth = hslider("[4]LFO Dpth[style:knob]",3,1,5,0.1);
lfo = os.osc(lfoFreq)*lfoDepth;
};
};
envelope = hgroup("[1]Envelope",en.adsr(attack,decay,sustain,release,gate)*gain)
with{
attack = hslider("[0]Attack[style:knob]",0,0,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("scandinavian",envelope*sound)<:_,_:dm.zita_rev1 ;
|
https://raw.githubusercontent.com/francescoganassin/FaustDSP-synths/ef9eb3da660f4d53e631a12b7e4f63944c57f61c/scandinavian.dsp
|
faust
|
import("stdfaust.lib");
freq = vslider("freq[style:knob]",440,400,500,1);
mod = os.osc(freq/2);
dxOsc(freq,mod,index) = os.triangle(freq+mod*index)+os.triangle(freq*2)+(os.triangle(freq*4)/7)+(os.sawtooth(freq/2)/9) ;
timbre = vgroup("[0]Modulation", dxOsc(freq,index1) : dxOsc(freq,index2) : dxOsc(freq,index2) : dxOsc(freq,index3))
with{
index1 = hslider("Mod 1",500,0,500,0.1);
index2 = hslider("Mod 2",2,0,10,0.1);
index3 = hslider("Mod 3",40,0,100,0.1);
};
sound = timbre : vgroup("[i]Filters",filters);
filters = seq(i,2,someFilter(i))
with{
someFilter(i) = hgroup("[%j]Peak EQ %j",fi.peak_eq(lvlfx*lfo,peakfreq,bandwidth))
with{
j = i+1;
lvlfx = hslider("[0]Level FX",4,0,5,0.01);
peakfreq = hslider("[1]Peak[style:knob]",(j^2)*10,10,100,1);
bandwidth = hslider("[2]Bandwidth[style:knob]",100,20,200,1);
lfoFreq = hslider("[3]LFO Freq[style:knob]",((i+2)^2)*1,0,100,0.01);
lfoDepth = hslider("[4]LFO Dpth[style:knob]",3,1,5,0.1);
lfo = os.osc(lfoFreq)*lfoDepth;
};
};
envelope = hgroup("[1]Envelope",en.adsr(attack,decay,sustain,release,gate)*gain)
with{
attack = hslider("[0]Attack[style:knob]",0,0,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("scandinavian",envelope*sound)<:_,_:dm.zita_rev1 ;
|
|
f1b23b1c501ff1661535c141ffb1fed2eaa3168be1cf411e4d6ad016edfbe030
|
francescoganassin/FaustDSP-synths
|
ganassx7.dsp
|
import("stdfaust.lib");
freq = vslider("freq[style:knob]",440,400,500,1);
mod = os.osc(freq/2);
dxOsc(freq,mod,index) = os.osc(freq+mod*index);
timbre = hgroup("[0]Modulation", dxOsc(freq,index1) : dxOsc(freq,index1) : dxOsc(freq,index2) : dxOsc(freq,index3))
with{
index1 = vslider("Mod Index1",10,0,500,0.1);
index2 = vslider("Mod Index2",10,0,500,0.1);
index3 = vslider("Mod Index3",10,0,500,0.1);
};
sound = timbre : hgroup("[i]Filters",filters);
filters = seq(i,4,someFilter(i))
with{
someFilter(i) = vgroup("[%j]Peak EQ (%j)",fi.peak_eq(lvlfx*lfo,peakfreq,40))
with{
j = i+1;
lvlfx = vslider("[0]Level FX",0,0,10,0.01);
peakfreq = hslider("[1]Peak[style:knob]",(j^2)*200,0,4000,1);
bandwidth = hslider("[2]Bandwidth[style:knob]",40,20,200,1);
lfoFreq = hslider("[3]LFO Freq[style:knob]",5,0.1,10,0.01);
lfoDepth = hslider("[4]LFO Dpth[style:knob]",5,1,10,0.1);
lfo = os.osc(lfoFreq)*lfoDepth;
};
};
envelope = vgroup("[1]Envelope",en.adsr(attack,decay,sustain,release,gate)*gain)
with{
attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
};
process = hgroup("DX7 _ patch 1 1 2 3",envelope*sound) <:_,_:dm.zita_rev1;
|
https://raw.githubusercontent.com/francescoganassin/FaustDSP-synths/ef9eb3da660f4d53e631a12b7e4f63944c57f61c/ganassx7.dsp
|
faust
|
import("stdfaust.lib");
freq = vslider("freq[style:knob]",440,400,500,1);
mod = os.osc(freq/2);
dxOsc(freq,mod,index) = os.osc(freq+mod*index);
timbre = hgroup("[0]Modulation", dxOsc(freq,index1) : dxOsc(freq,index1) : dxOsc(freq,index2) : dxOsc(freq,index3))
with{
index1 = vslider("Mod Index1",10,0,500,0.1);
index2 = vslider("Mod Index2",10,0,500,0.1);
index3 = vslider("Mod Index3",10,0,500,0.1);
};
sound = timbre : hgroup("[i]Filters",filters);
filters = seq(i,4,someFilter(i))
with{
someFilter(i) = vgroup("[%j]Peak EQ (%j)",fi.peak_eq(lvlfx*lfo,peakfreq,40))
with{
j = i+1;
lvlfx = vslider("[0]Level FX",0,0,10,0.01);
peakfreq = hslider("[1]Peak[style:knob]",(j^2)*200,0,4000,1);
bandwidth = hslider("[2]Bandwidth[style:knob]",40,20,200,1);
lfoFreq = hslider("[3]LFO Freq[style:knob]",5,0.1,10,0.01);
lfoDepth = hslider("[4]LFO Dpth[style:knob]",5,1,10,0.1);
lfo = os.osc(lfoFreq)*lfoDepth;
};
};
envelope = vgroup("[1]Envelope",en.adsr(attack,decay,sustain,release,gate)*gain)
with{
attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
};
process = hgroup("DX7 _ patch 1 1 2 3",envelope*sound) <:_,_:dm.zita_rev1;
|
|
ed812d8ab8350787b1757104b71d52ebd0e455a874a3159d283255e611cddf3c
|
francescoganassin/FaustDSP-synths
|
ganassample.dsp
|
import("stdfaust.lib");
looper(detune) = rwtable(tablesize,0.0,recIndex,_,readIndex)
with{
record = button("Sample") : int;
readSpeed = hslider("Read Speed[style:knob]",1,0.001,10,0.01);
tablesize = 48000;
recIndex = +(1)~*(record) : %(tablesize);
readIndex = readSpeed*(detune+1)/float(ma.SR) : (+ : ma.decimal) ~ _ : *(float(tablesize)) : int;
};
polyLooper = hgroup("Looper",_ <: par(i,nVoices,looper(detune*i)) :> _,_)
with{
nVoices = 10;
detune = hslider("Detune[style:knob]",0.01,0,1,0.01);
};
efx = ba.bypass1(_,vcf)
with{
mvcf_group(x) = hgroup("MOOG VCF",x);
cb_group(x) = mvcf_group(hgroup("[0]",x));
freq = mvcf_group(hslider("[1] Corner Freq [unit:PK] [style:knob]",
25, 1, 88, 0.01) : ba.pianokey2hz) : si.smoo;
res = mvcf_group(hslider("[2] Corner Reso [style:knob]", 0, -1, 1, 0.01));
outgain = mvcf_group(hslider("[3] VCF Out [unit:dB] [style:knob]", 5, -60, 20, 0.1)) : ba.db2linear : si.smoo;
vcfbq = _ <: select2(_, ve.moog_vcf_2b(res,freq), ve.moog_vcf_2bn(res,freq));
vcfarch = _ <: select2(_, ve.moog_vcf(res^4,freq), vcfbq);
vcf = vcfarch : *(outgain);
};
dist = ba.bypass1(_, ef.cubicnl_nodc(drive:si.smoo,offset:si.smoo))
with{
cnl_group(x) = hgroup("Soft Dist", x);
drive = cnl_group(hslider("[1] Drive [style:knob]",
0, 0, 1, 0.01));
offset = cnl_group(hslider("[2] Destroy [style:knob]",
0, 0, 1, 0.01));
};
Nightmare = dm.zita_light :> efx : dist;
process = hgroup("Ghostify",polyLooper:Nightmare)<:_,_;
|
https://raw.githubusercontent.com/francescoganassin/FaustDSP-synths/ef9eb3da660f4d53e631a12b7e4f63944c57f61c/ganassample.dsp
|
faust
|
import("stdfaust.lib");
looper(detune) = rwtable(tablesize,0.0,recIndex,_,readIndex)
with{
record = button("Sample") : int;
readSpeed = hslider("Read Speed[style:knob]",1,0.001,10,0.01);
tablesize = 48000;
recIndex = +(1)~*(record) : %(tablesize);
readIndex = readSpeed*(detune+1)/float(ma.SR) : (+ : ma.decimal) ~ _ : *(float(tablesize)) : int;
};
polyLooper = hgroup("Looper",_ <: par(i,nVoices,looper(detune*i)) :> _,_)
with{
nVoices = 10;
detune = hslider("Detune[style:knob]",0.01,0,1,0.01);
};
efx = ba.bypass1(_,vcf)
with{
mvcf_group(x) = hgroup("MOOG VCF",x);
cb_group(x) = mvcf_group(hgroup("[0]",x));
freq = mvcf_group(hslider("[1] Corner Freq [unit:PK] [style:knob]",
25, 1, 88, 0.01) : ba.pianokey2hz) : si.smoo;
res = mvcf_group(hslider("[2] Corner Reso [style:knob]", 0, -1, 1, 0.01));
outgain = mvcf_group(hslider("[3] VCF Out [unit:dB] [style:knob]", 5, -60, 20, 0.1)) : ba.db2linear : si.smoo;
vcfbq = _ <: select2(_, ve.moog_vcf_2b(res,freq), ve.moog_vcf_2bn(res,freq));
vcfarch = _ <: select2(_, ve.moog_vcf(res^4,freq), vcfbq);
vcf = vcfarch : *(outgain);
};
dist = ba.bypass1(_, ef.cubicnl_nodc(drive:si.smoo,offset:si.smoo))
with{
cnl_group(x) = hgroup("Soft Dist", x);
drive = cnl_group(hslider("[1] Drive [style:knob]",
0, 0, 1, 0.01));
offset = cnl_group(hslider("[2] Destroy [style:knob]",
0, 0, 1, 0.01));
};
Nightmare = dm.zita_light :> efx : dist;
process = hgroup("Ghostify",polyLooper:Nightmare)<:_,_;
|
|
fd50c50590b6f25cc121ff8c1f409f89c62bfddf00f18a09187029fba3f88bbe
|
olilarkin/Tambura
|
Tambura.dsp
|
declare name "Tambura";
declare description "Pseudo physical model of an Indian Tambura/Tanpura";
declare author "Oli Larkin ([email protected])";
declare copyright "Oliver Larkin";
declare version "1.0";
declare licence "GPL";
//TODO
// - pitch env doesn't get triggered by autoplucker
// - autoplucker fixed to 4 strings
import("stdfaust.lib");
line (value, time) = state~(_,_):!,_
with {
state (t, c) = nt, ba.if (nt <= 0, value, c+(value - c) / nt)
with {
nt = ba.if( value != value', samples, t-1);
samples = time*ma.SR/1000.0;
};
};
dtmax = 4096;
//tunings of the four strings, ratios of f0
ratios(0) = 1.5;
ratios(1) = 2.;
ratios(2) = 2.01;
ratios(3) = 1.;
NStrings = 4;
sm = si.smooth(ba.tau2pole(0.05)); //50 ms smoothing
//ratios(i) = hslider("/h:main/ratio%1i [style:knob]", 1., 0.1, 2., 0.001);
pluck(i) = button("/h:trigger/pluck%1i"); // buttons for manual plucking
pluckrate = hslider("/h:trigger/auto pluck rate [style:knob][unit:hz]", 0.1, 0.0, 0.5, 0.001); // automatic plucking rate (Hz)
enableautoplucker = checkbox("/h:trigger/enable auto pluck"); // enable automatic plucking
f0 = hslider("/h:main/[1]sa [style:knob]", 36, 24, 72, 1) : sm : ba.midikey2hz; // the base pitch of the drone
t60 = hslider("/h:main/[2]decay_time [style:knob][unit:s]", 10, 0, 100, 0.1) : sm; // how long the strings decay
damp = 1. - hslider("/h:main/[3]high_freq_loss [style:knob]", 0, 0, 1., 0.01) : sm; // string brightness
fdetune = hslider("/h:main/[4]harmonic_motion [style:knob][scale:exp]", 0.001, 0., 1, 0.0001) : *(0.2) : sm; // controls the detuning of parallel waveguides that mimics harmonic motion of the tambura
coupling = hslider("/h:main/[5]sympathetic_coupling [style:knob]", 0.1, 0., 1., 0.0001) : sm; // level of sympathetic coupling between strings
jw = hslider("/h:main/[6]jawari [style:knob]", 0, 0, 1, 0.001) : *(0.1) : sm; // creates the buzzing / jawari effect
spread = hslider("/h:main/[7]string_spread [style:knob]", 1., 0., 1., 0.01) : sm; // stereo spread of strings
tscale = hslider("/h:main/[8]tune_scale [style:knob]", 1, 0.9, 1.1, 0.001); //
descale = hslider("/h:main/[9]decay_scale [style:knob]", 1, 0.1, 1., 0.001); //
//dascale = hslider("/h:main/[10]damp_scale [style:knob]", 1, 0.5, 2, 0.01); //
ptype = hslider("/h:pick/[1]material [style:knob]", 0.13, 0.0, 1., 0.01) : sm; // crossfades between pink noise and DC excitation
pattack = hslider("/h:pick/[2]attack_time [style:knob][scale:exp]", 0.07, 0, 0.5, 0.01); // attack time of pluck envelope, 0 to 0.5 times f0 wavelength
ptime = hslider("/h:pick/[3]decay_time [style:knob]", 1., 1, 100., 0.01); // decay time (1 to 10 times f0 wavelength)
ppos = hslider("/h:pick/[4]position [style:knob]", 0.25, 0.01, 0.5, 0.01); // pick position (ratio of f0 wavelength)
pbend = hslider("/h:pick/[5]bend_depth [style:knob][unit:st]", 3, 0., 12., 0.01); // pick bend depth in semitones
pbendtime = hslider("/h:pick/[6]bend_time [style:knob][unit:ms]", 10., 1, 200., 1); // pick bend time (1 to 200 ms)
vol = hslider("volume [unit:dB]", 0, -36, +4, 0.1) : ba.db2linear : sm; // master volume
// s = string index
// c = comb filter index (of 9 comb filters in risset string)
tambura(NStrings) = ( couplingmatrix(NStrings), par(s, NStrings, excitation(s)) : ro.interleave(NStrings, 2) : par(s, NStrings, string(s, pluck(s))) ) // string itself with excitation + fbk as input
~ par(s, NStrings, (!,_)) // feedback only the right waveguide
: par(s, NStrings, (+:pan(s)) // add left/right waveguides and pan
) :> _,_ //stereo output
with {
couplingmatrix(NStrings) =
par(s, NStrings, *(coupling) : couplingfilter) // coupling filters
<: par(s, NStrings, unsel(NStrings, s) :> _ ) // unsel makes sure the feedback is disconnected
with {
unsel(NStrings,s) = par(j, NStrings, U(s,j))
with {
U(s,s)=!;
U(s,j)=_;
};
//couplingfilter = component("bridgeIR.dsp");
couplingfilter = fi.highshelf(1,-100,5000) : fi.peak_eq(14, 2500, 400) : fi.peak_eq(20, 7500, 650); // EQ to simulate bridge response
};
//pan(s) = _ <: *(1-v), *(v)
pan(s) = _ <: *((1-v) : sqrt), *((v) : sqrt)
with {
spreadScale = (1/(NStrings-1));
v = 0.5 + ((spreadScale * s) - 0.5) * spread;
};
// excitation(s) = _;
excitation(s, trig) = input * ampenv : pickposfilter
with {
wl = (ma.SR/(f0 * ratios(s))); // wavelength of f0 in samples
dur = (ptime * wl) / (ma.SR/1000.); // duration of the pluck in ms
ampenv = trig * line(1. - trig, dur) : si.lag_ud(wl * pattack * (1/ma.SR), 0.005);
amprand = abs(no.noise) : ba.latch(trig) *(0.25) + (0.75);
posrand = abs(no.noise) : ba.latch(trig) *(0.2);
input = 1., no.pink_noise : si.interpolate(ptype); // crossfade between DC and pink noise excitation source
pickposfilter = fi.ffcombfilter(dtmax, ((ppos + posrand) * wl), -1); // simulation of different pluck positions
};
string(s, trig) = _, _ <: +, !,_ : rissetstring(_, s, 1., 1., 1.), rissetstring(_, s, tscale, descale, 1.) // dual risset strings for decoupled feedback
with {
rissetstring(x, s, ts, des, das) = _ <: par(c, 9, stringloop(x, s, c, ts, das)) :> _ : fi.dcblocker *(0.01); // 9 detuned delay line resonators in parallel
stringloop(x, s, c, ts, des, das) = (+ : delay) ~ ((dampingfilter : nlfm) * fbk) // waveguide string with damping filter and non linear apf for jawari effect
with {
//delay = de.fdelay1a(dtmax, dtsamples, x); // allpass interpolation has better HF response
delay = de.fdelaylti(2, dtmax, dtsamples, x); // lagrange interpolation glitches less with pitch envelope
pitchenv = trig * line(1. - trig, pbendtime) <: * : *(pbend);
thisf0 = ba.pianokey2hz( ba.hz2pianokey((f0 * ratios(s)) + ((c-4) * fdetune) + pitchenv) ) * ts;
dtsamples = (ma.SR/thisf0) - 2;
fbk = pow(0.001, 1.0/(thisf0*(t60 * descale)));
dampingfilter(x) = (h0 * x' + h1*(x+x''))
with {
d = das * damp;
h0 = (1. + d)/2;
h1 = (1. - d)/4;
};
nlfm(x) = x <: fi.allpassnn(1,(par(i,1,jw * ma.PI * x)));
};
};
};
autoplucker= phasor(pluckrate) <: <(0.25), >(0.25) & <(0.5), >(0.5) & <(0.75), >(0.75) & <(1) : par(s, NStrings, *(enableautoplucker))
with {
phasor(freq) = (freq/float(ma.SR) : (+ : ma.decimal) ~ _);
};
process = (par(s, NStrings, pluck(s)), autoplucker) :> tambura(NStrings) : *(vol), *(vol);
|
https://raw.githubusercontent.com/olilarkin/Tambura/7bb4c735d78324aa56d6512732133f7066444935/Tambura.dsp
|
faust
|
TODO
- pitch env doesn't get triggered by autoplucker
- autoplucker fixed to 4 strings
tunings of the four strings, ratios of f0
50 ms smoothing
ratios(i) = hslider("/h:main/ratio%1i [style:knob]", 1., 0.1, 2., 0.001);
buttons for manual plucking
automatic plucking rate (Hz)
enable automatic plucking
the base pitch of the drone
how long the strings decay
string brightness
controls the detuning of parallel waveguides that mimics harmonic motion of the tambura
level of sympathetic coupling between strings
creates the buzzing / jawari effect
stereo spread of strings
dascale = hslider("/h:main/[10]damp_scale [style:knob]", 1, 0.5, 2, 0.01); //
crossfades between pink noise and DC excitation
attack time of pluck envelope, 0 to 0.5 times f0 wavelength
decay time (1 to 10 times f0 wavelength)
pick position (ratio of f0 wavelength)
pick bend depth in semitones
pick bend time (1 to 200 ms)
master volume
s = string index
c = comb filter index (of 9 comb filters in risset string)
string itself with excitation + fbk as input
feedback only the right waveguide
add left/right waveguides and pan
stereo output
coupling filters
unsel makes sure the feedback is disconnected
couplingfilter = component("bridgeIR.dsp");
EQ to simulate bridge response
pan(s) = _ <: *(1-v), *(v)
excitation(s) = _;
wavelength of f0 in samples
duration of the pluck in ms
crossfade between DC and pink noise excitation source
simulation of different pluck positions
dual risset strings for decoupled feedback
9 detuned delay line resonators in parallel
waveguide string with damping filter and non linear apf for jawari effect
delay = de.fdelay1a(dtmax, dtsamples, x); // allpass interpolation has better HF response
lagrange interpolation glitches less with pitch envelope
|
declare name "Tambura";
declare description "Pseudo physical model of an Indian Tambura/Tanpura";
declare author "Oli Larkin ([email protected])";
declare copyright "Oliver Larkin";
declare version "1.0";
declare licence "GPL";
import("stdfaust.lib");
line (value, time) = state~(_,_):!,_
with {
state (t, c) = nt, ba.if (nt <= 0, value, c+(value - c) / nt)
with {
nt = ba.if( value != value', samples, t-1);
samples = time*ma.SR/1000.0;
};
};
dtmax = 4096;
ratios(0) = 1.5;
ratios(1) = 2.;
ratios(2) = 2.01;
ratios(3) = 1.;
NStrings = 4;
with {
couplingmatrix(NStrings) =
with {
unsel(NStrings,s) = par(j, NStrings, U(s,j))
with {
U(s,s)=!;
U(s,j)=_;
};
};
pan(s) = _ <: *((1-v) : sqrt), *((v) : sqrt)
with {
spreadScale = (1/(NStrings-1));
v = 0.5 + ((spreadScale * s) - 0.5) * spread;
};
excitation(s, trig) = input * ampenv : pickposfilter
with {
ampenv = trig * line(1. - trig, dur) : si.lag_ud(wl * pattack * (1/ma.SR), 0.005);
amprand = abs(no.noise) : ba.latch(trig) *(0.25) + (0.75);
posrand = abs(no.noise) : ba.latch(trig) *(0.2);
};
with {
with {
pitchenv = trig * line(1. - trig, pbendtime) <: * : *(pbend);
thisf0 = ba.pianokey2hz( ba.hz2pianokey((f0 * ratios(s)) + ((c-4) * fdetune) + pitchenv) ) * ts;
dtsamples = (ma.SR/thisf0) - 2;
fbk = pow(0.001, 1.0/(thisf0*(t60 * descale)));
dampingfilter(x) = (h0 * x' + h1*(x+x''))
with {
d = das * damp;
h0 = (1. + d)/2;
h1 = (1. - d)/4;
};
nlfm(x) = x <: fi.allpassnn(1,(par(i,1,jw * ma.PI * x)));
};
};
};
autoplucker= phasor(pluckrate) <: <(0.25), >(0.25) & <(0.5), >(0.5) & <(0.75), >(0.75) & <(1) : par(s, NStrings, *(enableautoplucker))
with {
phasor(freq) = (freq/float(ma.SR) : (+ : ma.decimal) ~ _);
};
process = (par(s, NStrings, pluck(s)), autoplucker) :> tambura(NStrings) : *(vol), *(vol);
|
65bc51fda05427dbeab059daa09088c64be2579169a1f7fb3506696dbbb5dd83
|
dsuedholt/coupled-fds-faust
|
CoupledFDS.dsp
|
import("stdfaust.lib");
// -------------------------------------------------------------------
// This file demonstrates how to use the Faust FDS library to couple
// multiple Finite Difference Schemes at arbitrary points with rigid
// connections. The overall logic is to define an enviroment like
// coupledSchemes, to be found at the end of the file, which contains
// all individual FDS models constructed by the FDS library as well as
// the coupling information.
//
// `system1D` is then the method that performs the update and coupling
// equations, making use of `forceUpdate` to calculate and route the
// forces after performing the individual update steps of the FDS.
//
// The example in this file demonstrates the coupling of three stiff
// strings over a bridge, but the code was kept as general as possible
// to allow arbitrary couplings.
// -------------------------------------------------------------------
declare name "Coupled Finite Difference Schemes in Faust";
declare version "0.1";
declare author "David Suedholt";
// the samplerate here is hardcoded to calculate nPoints from L at compile time
k = 1.0 / 44100;
// basic stencil parameters
nNeighbors = 2; // R
nTimesteps = 1; // T
// this is fd.model1D without the recursion, so that we can add the forces before going to the next time step
// A coupled system consists of one schemeUpdate per FDS stacked in parallel
schemeUpdate(points,R,T,scheme) = fd.route1D(points,R,T,scheme) : fd.buildScheme1D(points,R,T);
//---------------------------`forceUpdate1D`---------------------------------------
// Given a number of FDS schemes whose individual update equations have already
// been calculated, calculate the force at each coupling point and add it back
// to the affected grid points according to the order of the coupling
// (positive force to the system coupled 'above' the other, negative force to
// the one coupled 'below' the other)
//
// #### Usage
//
// ```
// si.bus(totalPoints) : forceUpdate1D(coupledSchemes) : si.bus(totalPoints);
// ```
//
// Where:
//
// * `coupledSchemes`: An environment containing the information about the schemes
// and their coupling as defined further below
//------------------------------------------------------------------------------
forceUpdate(coupledSchemes) =
inRouting : interp : forcecalc : outRouting
with {
M = coupledSchemes.nSchemes;
nPoints = coupledSchemes.nPoints;
startingPoint = coupledSchemes.startingPoint;
totalPoints = startingPoint(M); // sum of all points because of the definition of startingPoint
h = coupledSchemes.h;
posR = coupledSchemes.posR;
posS = coupledSchemes.posS;
beta = coupledSchemes.beta;
nCouplings = coupledSchemes.nCouplings;
r = coupledSchemes.r;
s = coupledSchemes.s;
// alpha values for the interpolation and spreading operators
alphaR(i) = posR(i) - floor(posR(i));
alphaS(i) = posS(i) - floor(posS(i));
// the force calculation depends on two grid points from each scheme, so four points per force
// this routing attaches these points to the bottom of the scheme so that they can be interpolated and used further
inRouting = route(totalPoints, totalPoints+4*nCouplings,
// simply pass the current scheme through
par(i, totalPoints, (i+1, i+1)),
// attach all relevant points from all couplings
par(i, nCouplings,
// the two points from the 'above' part of the coupling, i.e the r-th scheme
(startingPoint(r(i)) + floor(posR(i)), totalPoints+i*4+1), (startingPoint(r(i)) + floor(posR(i))+1, totalPoints+i*4+2),
// the two points from the 'below' part, i.e. the s-th scheme
(startingPoint(s(i)) + floor(posS(i)), totalPoints+i*4+3), (startingPoint(s(i)) + floor(posS(i))+1, totalPoints+i*4+4)
)
);
// linearly interpolate each pair of grid points, so that we are down to one value per scheme
interp =
// still just passing the scheme through
si.bus(totalPoints),
par(i, nCouplings,
// (1 - alpha) * u_l + (alpha) * u_{l+1}
+(*(1 - alphaR(i)), *(alphaR(i))), +(*(1 - alphaS(i)), *(alphaS(i)))
);
// now for the actual force calculation
forcecalc =
// attach the beta coefficients for all couplings
(si.bus(totalPoints+2*nCouplings), par(i, nCouplings, beta(i))) :
// still just passing the scheme through
si.bus(totalPoints),
// route each coefficient to its interpolated grid point, perform the multiplication
// and add each two grid points belonging to one coupling to obtain the forces
(ro.interleave(2*nCouplings, 2) : par(i, 2*nCouplings, *) : par(i, nCouplings, +) <:
// perform the spreading operation: each force is distributed back to the four grid points it affects
ro.interleave(nCouplings, 4) : par(i, nCouplings,
// the force is added to the two points in the r-th scheme
*((1 - alphaR(i))/h(r(i))),*(alphaR(i)/h(r(i))),
// and subtracted from the ones in the s-th scheme
*((alphaS(i) - 1)/h(s(i))),*((alphaS(i) * -1)/h(s(i))))
);
// finally the calculated forces are routed back to the grid points they affect
outRouting = route(totalPoints+4*nCouplings, totalPoints,
// the original scheme, to which the force is added by the routing
par(i, totalPoints, (i+1, i+1)),
// route the force back to the grid
par(i, nCouplings,
(totalPoints+i*4+1, startingPoint(r(i)) + floor(posR(i))), (totalPoints+i*4+2, startingPoint(r(i)) + floor(posR(i))+1),
(totalPoints+i*4+3, startingPoint(s(i)) + floor(posS(i))), (totalPoints+i*4+4, startingPoint(s(i)) + floor(posS(i))+1)
)
);
};
//---------------------------`system1D`---------------------------------------
// Given a number of FDS schemes stacked in parallel and their coupling points,
// calculate the individual updates and add the coupling forces at each time step.
// Takes as input an external force signal (e.g. excitation) for each point in the
// combined scheme.
//
// #### Usage
//
// ```
// si.bus(totalPoints) : system1D(coupledSchemes) : si.bus(totalPoints);
// ```
//
// Where:
//
// * `coupledSchemes`: An environment containing the information about the schemes
// and their coupling as defined further below
//------------------------------------------------------------------------------
system1D(coupledSchemes) =
(routing : schemes : forceUpdate(coupledSchemes) : norm) ~ si.bus(totalPoints)
with {
M = coupledSchemes.nSchemes;
nPoints = coupledSchemes.nPoints;
startingPoint = coupledSchemes.startingPoint;
totalPoints = startingPoint(M);
schemes = coupledSchemes.schemes;
a = coupledSchemes.a;
// after adding all forces, divide by the supplied factor
norm = par(i, M, par(j, nPoints(i), /(a(i))));
// the inputs are coming as points0, points1, ..., forces0, forces1 ...
// this routing rearranges them to points0, forces0, points1, forces1 ...
routing = route(totalPoints*2, totalPoints*2,
// routing of grid points
par(i, M, par(j, nPoints(i), (startingPoint(i)+j+1, startingPoint(i)*2+j+1))),
// routing of forces
par(i, M, par(j, nPoints(i), (startingPoint(i)+totalPoints+j+1, startingPoint(i)*2+nPoints(i)+j+1)))
);
};
// Coefficients for the FDS of a stiff string with the simply supported boundary condition
// In the simply supported condition, we define the coefficients at the boundary points such that
// u_{-1} = -u_3 and u_{N+1} = -u_{N-3}
simplySupportedScheme(params) = coeffsLeft, midCoeffsDelay, par(i, nPoints-2, midCoeffs, midCoeffsDelay), coeffsRight, midCoeffsDelay
with {
nPoints = params.nPoints;
EI = params.E * params.I;
h = params.h;
rhoA = params.rho * params.Area;
s0 = params.sigma0;
s1 = params.sigma1;
T = params.T;
coeffsLeft = 0,
0,
(-2*T*h^2 - 6*EI - 2*rhoA*s0*h^4/k - 4*rhoA*s1*h^2/k + 2*rhoA*h^4/k^2 + EI) / h^4,
(T*h^2 + 4*EI + 2*rhoA*s1*h^2/k) / h^4,
(-EI) / h^4;
midCoeffs = (-EI) / h^4,
(T*h^2 + 4*EI + 2*rhoA*s1*h^2/k) / h^4,
(-2*T*h^2 - 6*EI - 2*rhoA*s0*h^4/k - 4*rhoA*s1*h^2/k + 2*rhoA*h^4/k^2) / h^4,
(T*h^2 + 4*EI + 2*rhoA*s1*h^2/k) / h^4,
(-EI) / h^4;
coeffsRight = (-EI) / h^4,
(T*h^2 + 4*EI + 2*rhoA*s1*h^2/k) / h^4,
(-2*T*h^2 - 6*EI - 2*rhoA*s0*h^4/k - 4*rhoA*s1*h^2/k + 2*rhoA*h^4/k^2 + EI) / h^4,
0,
0;
midCoeffsDelay = 0,
(-2*rhoA*s1/h^2/k),
(2*rhoA*s0/k + 4*rhoA*s1/h^2/k - rhoA/k^2),
(-2*rhoA*s1/h^2/k),
0;
};
// Coefficients for the FDS of a stiff string with the clamped supported boundary condition
// In the clamped condition, no special treatment for the boundary points is needed, the routing
// just supplies the virtual points as zero
clampedScheme(params) = par(i, nPoints, coeffs, coeffsDelay)
with {
nPoints = params.nPoints;
EI = params.E * params.I;
h = params.h;
rhoA = params.rho * params.Area;
s0 = params.sigma0;
s1 = params.sigma1;
T = params.T;
coeffs = (-EI) / h^4,
(T*h^2 + 4*EI + 2*rhoA*s1*h^2/k) / h^4,
(-2*T*h^2 - 6*EI - 2*rhoA*s0*h^4/k - 4*rhoA*s1*h^2/k + 2*rhoA*h^4/k^2) / h^4,
(T*h^2 + 4*EI + 2*rhoA*s1*h^2/k) / h^4,
(-EI) / h^4;
coeffsDelay = 0,
(-2*rhoA*s1/h^2/k),
(2*rhoA*s0/k + 4*rhoA*s1/h^2/k - rhoA/k^2),
(-2*rhoA*s1/h^2/k),
0;
};
// This is a convenience function to calculate all required parameters based on the "tunable" parameter set further down
calcAllParams(params) = environment {
// keep all parameters from the initial structure
rho = params.rho;
E = params.E;
L = params.L;
f0 = params.f0;
radius = params.radius;
sigma0 = params.sigma0;
sigma1 = params.sigma1;
I = params.I;
Area = params.Area;
T = (2*f0*L)^2 * rho * Area; // Tension based on the desired pitch
// Calculate the minimum grid spacing given by the stability condition
hmin = sqrt(k/2*(T*k/rho/Area + 4*sigma1 + sqrt((T*k/rho/Area + 4*sigma1)^2 + 16*E*I/rho/Area)));
// nPoints is the number of points that are actually updated each time step.
// N = floor(L / hmin) assumes grid points u_0, u_1, ..., u_{N-1}, u_N
// where u_0 = u_N = 0 are fixed boundary points, so we are left with nPoints = N-1 "updatable" points
nPoints = floor(L / hmin) - 1;
// Calculate the actual grid spacing based on the number of points
h = L / (nPoints+1);
};
string1 = environment {
rho = 1200; // Material density
E = 2e9; // Young's modulus
L = 0.65; // Length of the string
radius = 4.6e-4;
f0 = 146.83; // Fundamental frequency, used for tension calculation
sigma0 = 1.38; // Frequency-independent damping coefficient
sigma1 = 1.3e-4; // Frequency-dependent damping coefficient
I = ma.PI * radius^4 / 4; // Moment of Inertia for the strings
Area = ma.PI * radius^2; // Cross-sectional area for the strings
};
string2 = environment {
rho = 1200;
E = 2e9;
L = 0.65;
radius = 4.6e-4;
f0 = 169;
sigma0 = 1.38;
sigma1 = 1.3e-4;
I = ma.PI * radius^4 / 4;
Area = ma.PI * radius^2;
};
string3 = environment {
rho = 1200;
E = 2e9;
L = 0.65;
radius = 4.6e-4;
f0 = 246.94;
sigma0 = 1.38;
sigma1 = 1.3e-4;
I = ma.PI * radius^4 / 4;
Area = ma.PI * radius^2;
};
bridge = environment {
rho = 1500;
E = 3e9;
I = 1.136e-10; // Moment of inertia for the bridge
Area = 2e-5; // cross-sectional area for the bridge
L = 0.16;
radius = 4.6e-4;
sigma0 = 1.343;
sigma1 = 2.59e-3;
f0 = 0; // results in Tension being set to 0
};
params(0) = calcAllParams(string1);
params(1) = calcAllParams(string2);
params(2) = calcAllParams(string3);
params(3) = calcAllParams(bridge);
// Calculation of the beta coefficients needed for force calculation
calcBeta(r, s, posr, poss, ar, as) = (-1)/denom/ar, 1/denom/as
with {
hr = params(r).h;
hs = params(s).h;
alphaR = posr - floor(posr);
alphaS = poss - floor(poss);
jnormsqr = ((1 - alphaR)^2 + alphaR^2) / hr^2;
jnormsqs = ((1 - alphaS)^2 + alphaS^2) / hs^2;
denom = hr * jnormsqr / ar + hs * jnormsqs / as;
};
// Define the coupling of the r-th scheme at position x_r above the s-th scheme at position x_s
// in this case, the three strings (0 - 2) are coupled at x = 10 cm
// to the bridge (3), where they are fixed at 4cm, 8cm and 12 cm
couplings = environment {
nCouplings = 3;
// indices of the coupled systems (coupling r above s)
r(0) = 0;
s(0) = 3;
// positions are in meters
xr(0) = 0.1;
xs(0) = 0.04;
r(1) = 1;
s(1) = 3;
xr(1) = 0.1;
xs(1) = 0.08;
r(2) = 2;
s(2) = 3;
xr(2) = 0.1;
xs(2) = 0.12;
};
// The "master" environment containing all the FDS schemes and the coupling information
coupledSchemes = environment {
nSchemes = 4; // total number of schemes
// Number of points in each scheme
nPoints(i) = params(i).nPoints;
// stack all schemes in parallel using functions from the fd library
schemes = par(i, nSchemes-1, schemeUpdate(params(i).nPoints, nNeighbors, nTimesteps, simplySupportedScheme(params(i)))),
schemeUpdate(params(3).nPoints, nNeighbors, nTimesteps, clampedScheme(params(3)));
// since the points of all schemes are stacked together we need to
// determine where one schemes stops and the next begins
startingPoint(0) = 0;
startingPoint(i) = startingPoint(i-1) + nPoints(i-1);
// the normalization factors; division by a is the last step in every update
a(i) = params(i).rho * params(i).Area / k^2;
// grid spacing is needed for force calculation and spreading operators
h(i) = params(i).h;
// copy over the coupling definitions
nCouplings = couplings.nCouplings;
r = couplings.r;
s = couplings.s;
xr = couplings.xr;
xs = couplings.xs;
// calculate the continuous position in points based on the position in meters
posR(i) = xr(i) / h(r(i));
posS(i) = xs(i) / h(s(i));
// the tuple beta_r, beta_s of coefficients for the force calculation
beta(i) = calcBeta(r(i), s(i), posR(i), posS(i), a(r(i)), a(s(i)));
};
//----------------------------Interface Elements-----------------------------//
play(i) = button("Play%i");
inPoint(i) = hslider("Input Point%i",floor(params(i).nPoints/2),0,params(i).nPoints-1,1);
outPoint(i) = hslider("Output Point%i",floor(params(i).nPoints/2),0,params(i).nPoints-1,0.01):si.smoo;
outSlider = hslider("Select output to listen", 0, 0, coupledSchemes.nSchemes-1, 1);
maxforce = hslider("Maximal Excitation Force", 1, 0.1, 10, 0.1);
//------------------------------Excitation Force-----------------------------//
excdur_sec = 0.005;
excdur_samp = int(excdur_sec * 44100);
excforce(n) = ba.if(n <= excdur_samp, maxforce/2 * (1 - cos(ma.PI * n/excdur_samp)), 0);
// ba.countup will continue to put out the upper limit once it is reached, until triggered again
// so have the limit be one higher and check in excforce if we've exceeded it
forceModel(i) = (ba.countup(excdur_samp+1, 1-(play(i))):excforce)/params(i).h;
//----------------------------------Process---------------------------------//
input = par(i, coupledSchemes.nSchemes, (forceModel(i)/params(i).h)<:fd.linInterp1D(params(i).nPoints, inPoint(i)));
output = par(i, coupledSchemes.nSchemes, fd.linInterp1DOut(params(i).nPoints, outPoint(i)));
outSelect = ba.selectn(coupledSchemes.nSchemes, outSlider);
process = input : system1D(coupledSchemes) : output : outSelect <: _,_;
|
https://raw.githubusercontent.com/dsuedholt/coupled-fds-faust/b6fa83eae2399262185b47512dd9411681146a03/CoupledFDS.dsp
|
faust
|
-------------------------------------------------------------------
This file demonstrates how to use the Faust FDS library to couple
multiple Finite Difference Schemes at arbitrary points with rigid
connections. The overall logic is to define an enviroment like
coupledSchemes, to be found at the end of the file, which contains
all individual FDS models constructed by the FDS library as well as
the coupling information.
`system1D` is then the method that performs the update and coupling
equations, making use of `forceUpdate` to calculate and route the
forces after performing the individual update steps of the FDS.
The example in this file demonstrates the coupling of three stiff
strings over a bridge, but the code was kept as general as possible
to allow arbitrary couplings.
-------------------------------------------------------------------
the samplerate here is hardcoded to calculate nPoints from L at compile time
basic stencil parameters
R
T
this is fd.model1D without the recursion, so that we can add the forces before going to the next time step
A coupled system consists of one schemeUpdate per FDS stacked in parallel
---------------------------`forceUpdate1D`---------------------------------------
Given a number of FDS schemes whose individual update equations have already
been calculated, calculate the force at each coupling point and add it back
to the affected grid points according to the order of the coupling
(positive force to the system coupled 'above' the other, negative force to
the one coupled 'below' the other)
#### Usage
```
si.bus(totalPoints) : forceUpdate1D(coupledSchemes) : si.bus(totalPoints);
```
Where:
* `coupledSchemes`: An environment containing the information about the schemes
and their coupling as defined further below
------------------------------------------------------------------------------
sum of all points because of the definition of startingPoint
alpha values for the interpolation and spreading operators
the force calculation depends on two grid points from each scheme, so four points per force
this routing attaches these points to the bottom of the scheme so that they can be interpolated and used further
simply pass the current scheme through
attach all relevant points from all couplings
the two points from the 'above' part of the coupling, i.e the r-th scheme
the two points from the 'below' part, i.e. the s-th scheme
linearly interpolate each pair of grid points, so that we are down to one value per scheme
still just passing the scheme through
(1 - alpha) * u_l + (alpha) * u_{l+1}
now for the actual force calculation
attach the beta coefficients for all couplings
still just passing the scheme through
route each coefficient to its interpolated grid point, perform the multiplication
and add each two grid points belonging to one coupling to obtain the forces
perform the spreading operation: each force is distributed back to the four grid points it affects
the force is added to the two points in the r-th scheme
and subtracted from the ones in the s-th scheme
finally the calculated forces are routed back to the grid points they affect
the original scheme, to which the force is added by the routing
route the force back to the grid
---------------------------`system1D`---------------------------------------
Given a number of FDS schemes stacked in parallel and their coupling points,
calculate the individual updates and add the coupling forces at each time step.
Takes as input an external force signal (e.g. excitation) for each point in the
combined scheme.
#### Usage
```
si.bus(totalPoints) : system1D(coupledSchemes) : si.bus(totalPoints);
```
Where:
* `coupledSchemes`: An environment containing the information about the schemes
and their coupling as defined further below
------------------------------------------------------------------------------
after adding all forces, divide by the supplied factor
the inputs are coming as points0, points1, ..., forces0, forces1 ...
this routing rearranges them to points0, forces0, points1, forces1 ...
routing of grid points
routing of forces
Coefficients for the FDS of a stiff string with the simply supported boundary condition
In the simply supported condition, we define the coefficients at the boundary points such that
u_{-1} = -u_3 and u_{N+1} = -u_{N-3}
Coefficients for the FDS of a stiff string with the clamped supported boundary condition
In the clamped condition, no special treatment for the boundary points is needed, the routing
just supplies the virtual points as zero
This is a convenience function to calculate all required parameters based on the "tunable" parameter set further down
keep all parameters from the initial structure
Tension based on the desired pitch
Calculate the minimum grid spacing given by the stability condition
nPoints is the number of points that are actually updated each time step.
N = floor(L / hmin) assumes grid points u_0, u_1, ..., u_{N-1}, u_N
where u_0 = u_N = 0 are fixed boundary points, so we are left with nPoints = N-1 "updatable" points
Calculate the actual grid spacing based on the number of points
Material density
Young's modulus
Length of the string
Fundamental frequency, used for tension calculation
Frequency-independent damping coefficient
Frequency-dependent damping coefficient
Moment of Inertia for the strings
Cross-sectional area for the strings
Moment of inertia for the bridge
cross-sectional area for the bridge
results in Tension being set to 0
Calculation of the beta coefficients needed for force calculation
Define the coupling of the r-th scheme at position x_r above the s-th scheme at position x_s
in this case, the three strings (0 - 2) are coupled at x = 10 cm
to the bridge (3), where they are fixed at 4cm, 8cm and 12 cm
indices of the coupled systems (coupling r above s)
positions are in meters
The "master" environment containing all the FDS schemes and the coupling information
total number of schemes
Number of points in each scheme
stack all schemes in parallel using functions from the fd library
since the points of all schemes are stacked together we need to
determine where one schemes stops and the next begins
the normalization factors; division by a is the last step in every update
grid spacing is needed for force calculation and spreading operators
copy over the coupling definitions
calculate the continuous position in points based on the position in meters
the tuple beta_r, beta_s of coefficients for the force calculation
----------------------------Interface Elements-----------------------------//
------------------------------Excitation Force-----------------------------//
ba.countup will continue to put out the upper limit once it is reached, until triggered again
so have the limit be one higher and check in excforce if we've exceeded it
----------------------------------Process---------------------------------//
|
import("stdfaust.lib");
declare name "Coupled Finite Difference Schemes in Faust";
declare version "0.1";
declare author "David Suedholt";
k = 1.0 / 44100;
schemeUpdate(points,R,T,scheme) = fd.route1D(points,R,T,scheme) : fd.buildScheme1D(points,R,T);
forceUpdate(coupledSchemes) =
inRouting : interp : forcecalc : outRouting
with {
M = coupledSchemes.nSchemes;
nPoints = coupledSchemes.nPoints;
startingPoint = coupledSchemes.startingPoint;
h = coupledSchemes.h;
posR = coupledSchemes.posR;
posS = coupledSchemes.posS;
beta = coupledSchemes.beta;
nCouplings = coupledSchemes.nCouplings;
r = coupledSchemes.r;
s = coupledSchemes.s;
alphaR(i) = posR(i) - floor(posR(i));
alphaS(i) = posS(i) - floor(posS(i));
inRouting = route(totalPoints, totalPoints+4*nCouplings,
par(i, totalPoints, (i+1, i+1)),
par(i, nCouplings,
(startingPoint(r(i)) + floor(posR(i)), totalPoints+i*4+1), (startingPoint(r(i)) + floor(posR(i))+1, totalPoints+i*4+2),
(startingPoint(s(i)) + floor(posS(i)), totalPoints+i*4+3), (startingPoint(s(i)) + floor(posS(i))+1, totalPoints+i*4+4)
)
);
interp =
si.bus(totalPoints),
par(i, nCouplings,
+(*(1 - alphaR(i)), *(alphaR(i))), +(*(1 - alphaS(i)), *(alphaS(i)))
);
forcecalc =
(si.bus(totalPoints+2*nCouplings), par(i, nCouplings, beta(i))) :
si.bus(totalPoints),
(ro.interleave(2*nCouplings, 2) : par(i, 2*nCouplings, *) : par(i, nCouplings, +) <:
ro.interleave(nCouplings, 4) : par(i, nCouplings,
*((1 - alphaR(i))/h(r(i))),*(alphaR(i)/h(r(i))),
*((alphaS(i) - 1)/h(s(i))),*((alphaS(i) * -1)/h(s(i))))
);
outRouting = route(totalPoints+4*nCouplings, totalPoints,
par(i, totalPoints, (i+1, i+1)),
par(i, nCouplings,
(totalPoints+i*4+1, startingPoint(r(i)) + floor(posR(i))), (totalPoints+i*4+2, startingPoint(r(i)) + floor(posR(i))+1),
(totalPoints+i*4+3, startingPoint(s(i)) + floor(posS(i))), (totalPoints+i*4+4, startingPoint(s(i)) + floor(posS(i))+1)
)
);
};
system1D(coupledSchemes) =
(routing : schemes : forceUpdate(coupledSchemes) : norm) ~ si.bus(totalPoints)
with {
M = coupledSchemes.nSchemes;
nPoints = coupledSchemes.nPoints;
startingPoint = coupledSchemes.startingPoint;
totalPoints = startingPoint(M);
schemes = coupledSchemes.schemes;
a = coupledSchemes.a;
norm = par(i, M, par(j, nPoints(i), /(a(i))));
routing = route(totalPoints*2, totalPoints*2,
par(i, M, par(j, nPoints(i), (startingPoint(i)+j+1, startingPoint(i)*2+j+1))),
par(i, M, par(j, nPoints(i), (startingPoint(i)+totalPoints+j+1, startingPoint(i)*2+nPoints(i)+j+1)))
);
};
simplySupportedScheme(params) = coeffsLeft, midCoeffsDelay, par(i, nPoints-2, midCoeffs, midCoeffsDelay), coeffsRight, midCoeffsDelay
with {
nPoints = params.nPoints;
EI = params.E * params.I;
h = params.h;
rhoA = params.rho * params.Area;
s0 = params.sigma0;
s1 = params.sigma1;
T = params.T;
coeffsLeft = 0,
0,
(-2*T*h^2 - 6*EI - 2*rhoA*s0*h^4/k - 4*rhoA*s1*h^2/k + 2*rhoA*h^4/k^2 + EI) / h^4,
(T*h^2 + 4*EI + 2*rhoA*s1*h^2/k) / h^4,
(-EI) / h^4;
midCoeffs = (-EI) / h^4,
(T*h^2 + 4*EI + 2*rhoA*s1*h^2/k) / h^4,
(-2*T*h^2 - 6*EI - 2*rhoA*s0*h^4/k - 4*rhoA*s1*h^2/k + 2*rhoA*h^4/k^2) / h^4,
(T*h^2 + 4*EI + 2*rhoA*s1*h^2/k) / h^4,
(-EI) / h^4;
coeffsRight = (-EI) / h^4,
(T*h^2 + 4*EI + 2*rhoA*s1*h^2/k) / h^4,
(-2*T*h^2 - 6*EI - 2*rhoA*s0*h^4/k - 4*rhoA*s1*h^2/k + 2*rhoA*h^4/k^2 + EI) / h^4,
0,
0;
midCoeffsDelay = 0,
(-2*rhoA*s1/h^2/k),
(2*rhoA*s0/k + 4*rhoA*s1/h^2/k - rhoA/k^2),
(-2*rhoA*s1/h^2/k),
0;
};
clampedScheme(params) = par(i, nPoints, coeffs, coeffsDelay)
with {
nPoints = params.nPoints;
EI = params.E * params.I;
h = params.h;
rhoA = params.rho * params.Area;
s0 = params.sigma0;
s1 = params.sigma1;
T = params.T;
coeffs = (-EI) / h^4,
(T*h^2 + 4*EI + 2*rhoA*s1*h^2/k) / h^4,
(-2*T*h^2 - 6*EI - 2*rhoA*s0*h^4/k - 4*rhoA*s1*h^2/k + 2*rhoA*h^4/k^2) / h^4,
(T*h^2 + 4*EI + 2*rhoA*s1*h^2/k) / h^4,
(-EI) / h^4;
coeffsDelay = 0,
(-2*rhoA*s1/h^2/k),
(2*rhoA*s0/k + 4*rhoA*s1/h^2/k - rhoA/k^2),
(-2*rhoA*s1/h^2/k),
0;
};
calcAllParams(params) = environment {
rho = params.rho;
E = params.E;
L = params.L;
f0 = params.f0;
radius = params.radius;
sigma0 = params.sigma0;
sigma1 = params.sigma1;
I = params.I;
Area = params.Area;
hmin = sqrt(k/2*(T*k/rho/Area + 4*sigma1 + sqrt((T*k/rho/Area + 4*sigma1)^2 + 16*E*I/rho/Area)));
nPoints = floor(L / hmin) - 1;
h = L / (nPoints+1);
};
string1 = environment {
radius = 4.6e-4;
};
string2 = environment {
rho = 1200;
E = 2e9;
L = 0.65;
radius = 4.6e-4;
f0 = 169;
sigma0 = 1.38;
sigma1 = 1.3e-4;
I = ma.PI * radius^4 / 4;
Area = ma.PI * radius^2;
};
string3 = environment {
rho = 1200;
E = 2e9;
L = 0.65;
radius = 4.6e-4;
f0 = 246.94;
sigma0 = 1.38;
sigma1 = 1.3e-4;
I = ma.PI * radius^4 / 4;
Area = ma.PI * radius^2;
};
bridge = environment {
rho = 1500;
E = 3e9;
L = 0.16;
radius = 4.6e-4;
sigma0 = 1.343;
sigma1 = 2.59e-3;
};
params(0) = calcAllParams(string1);
params(1) = calcAllParams(string2);
params(2) = calcAllParams(string3);
params(3) = calcAllParams(bridge);
calcBeta(r, s, posr, poss, ar, as) = (-1)/denom/ar, 1/denom/as
with {
hr = params(r).h;
hs = params(s).h;
alphaR = posr - floor(posr);
alphaS = poss - floor(poss);
jnormsqr = ((1 - alphaR)^2 + alphaR^2) / hr^2;
jnormsqs = ((1 - alphaS)^2 + alphaS^2) / hs^2;
denom = hr * jnormsqr / ar + hs * jnormsqs / as;
};
couplings = environment {
nCouplings = 3;
r(0) = 0;
s(0) = 3;
xr(0) = 0.1;
xs(0) = 0.04;
r(1) = 1;
s(1) = 3;
xr(1) = 0.1;
xs(1) = 0.08;
r(2) = 2;
s(2) = 3;
xr(2) = 0.1;
xs(2) = 0.12;
};
coupledSchemes = environment {
nPoints(i) = params(i).nPoints;
schemes = par(i, nSchemes-1, schemeUpdate(params(i).nPoints, nNeighbors, nTimesteps, simplySupportedScheme(params(i)))),
schemeUpdate(params(3).nPoints, nNeighbors, nTimesteps, clampedScheme(params(3)));
startingPoint(0) = 0;
startingPoint(i) = startingPoint(i-1) + nPoints(i-1);
a(i) = params(i).rho * params(i).Area / k^2;
h(i) = params(i).h;
nCouplings = couplings.nCouplings;
r = couplings.r;
s = couplings.s;
xr = couplings.xr;
xs = couplings.xs;
posR(i) = xr(i) / h(r(i));
posS(i) = xs(i) / h(s(i));
beta(i) = calcBeta(r(i), s(i), posR(i), posS(i), a(r(i)), a(s(i)));
};
play(i) = button("Play%i");
inPoint(i) = hslider("Input Point%i",floor(params(i).nPoints/2),0,params(i).nPoints-1,1);
outPoint(i) = hslider("Output Point%i",floor(params(i).nPoints/2),0,params(i).nPoints-1,0.01):si.smoo;
outSlider = hslider("Select output to listen", 0, 0, coupledSchemes.nSchemes-1, 1);
maxforce = hslider("Maximal Excitation Force", 1, 0.1, 10, 0.1);
excdur_sec = 0.005;
excdur_samp = int(excdur_sec * 44100);
excforce(n) = ba.if(n <= excdur_samp, maxforce/2 * (1 - cos(ma.PI * n/excdur_samp)), 0);
forceModel(i) = (ba.countup(excdur_samp+1, 1-(play(i))):excforce)/params(i).h;
input = par(i, coupledSchemes.nSchemes, (forceModel(i)/params(i).h)<:fd.linInterp1D(params(i).nPoints, inPoint(i)));
output = par(i, coupledSchemes.nSchemes, fd.linInterp1DOut(params(i).nPoints, outPoint(i)));
outSelect = ba.selectn(coupledSchemes.nSchemes, outSlider);
process = input : system1D(coupledSchemes) : output : outSelect <: _,_;
|
7ed03d0599ba94b047027ea8194e529f7b82af22acadb7420bc5291164430711
|
sekisushai/ambitools
|
hoa_encoder.dsp
|
declare name "NF-HOA encoder";
declare version "1.1";
declare author "Pierre Lecomte";
declare license "GPL";
declare copyright "(c) Pierre Lecomte 2014-2018";
// Description: This tool creates an HOA scene from N inputs. Each input is encoded as a source in space. Source types are plane or spherical waves.
// References:
//[1] Lecomte, P., & Gauthier, P.-A. (2015). Real-Time 3D Ambisonics using Faust, Processing, Pure Data, And OSC. In 15th International Conference on Digital Audio Effects (DAFx-15). Trondheim, Norway.
// Inputs: N
// Outputs: (M+1)^2
import("stdfaust.lib");
import("nfc.lib");
import("ymn.lib");
import("gui.lib");
// maximum order for Ambisonics components
M = 5;
// number of inputs (number of sources to encoder)
N = 2;
ins = N;
outs = (M+1)^2;
outsvumeter = vumeter(0,outs);
g(i) = hslider("[%i+1][osc:/gain_%i -20 20][style:knob]Gain %2i",0,-20,20,0.1): ba.db2linear; // gain
r(i) = hslider("[%i+2][osc:/radius_%i 0.5 50][style:knob]Radius %2i", 2, 1, 50, 0.01);// radius
t(i) = hslider("[%i+3][osc:/azimuth_%i 0 360][style:knob]Azimuth %2i", 0, 0, 360, 0.1)*ma.PI/180; // azimuth
d(i) = hslider("[%i+4][osc:/elevation_%i -90 90][style:knob]Elevation %2i", 0, -90, 90, 0.1)*ma.PI/180; // elevation
spherical(i) = hgroup("[%i+5]Spherical Wave",checkbox("Yes"));
// Spherical restitution speaker layout radius r2 is needeed to stabilize near-field filters, see [1]
r2(i) = nentry("[~]Speaker Radius %2i", 1.07, 0.5, 10, 0.01); // louspeaker radius
r22(i) = r2(i) + (1-spherical(i))*(r(i)-r2(i)); // r2 is transformed to r when shperical(i) = 0 ==> spherical/plane wave selection;
source(i) = hgroup("Source %2i",_*g(i)*r22(i)/r(i)<:par(m,M+1,nf(m,r(i),r22(i))<:par(i,2*m+1,_)):>yvec((M+1)^2,t(i),d(i)));
//process = hgroup("",vgroup("Parameters",par(i,N,_<:selecteur(i))):>si.bus((M+1)^2):vgroup("[~]Outputs",outsvumeter));
process = hgroup("",vgroup("Parameters",par(i,N,_<:source(i))):>si.bus((M+1)^2):vgroup("[~]Outputs",outsvumeter));
|
https://raw.githubusercontent.com/sekisushai/ambitools/2d21b7cc7cfe9bc35d91d51ec05bf9250372f0ce/Faust/src/hoa_encoder.dsp
|
faust
|
Description: This tool creates an HOA scene from N inputs. Each input is encoded as a source in space. Source types are plane or spherical waves.
References:
[1] Lecomte, P., & Gauthier, P.-A. (2015). Real-Time 3D Ambisonics using Faust, Processing, Pure Data, And OSC. In 15th International Conference on Digital Audio Effects (DAFx-15). Trondheim, Norway.
Inputs: N
Outputs: (M+1)^2
maximum order for Ambisonics components
number of inputs (number of sources to encoder)
gain
radius
azimuth
elevation
Spherical restitution speaker layout radius r2 is needeed to stabilize near-field filters, see [1]
louspeaker radius
r2 is transformed to r when shperical(i) = 0 ==> spherical/plane wave selection;
process = hgroup("",vgroup("Parameters",par(i,N,_<:selecteur(i))):>si.bus((M+1)^2):vgroup("[~]Outputs",outsvumeter));
|
declare name "NF-HOA encoder";
declare version "1.1";
declare author "Pierre Lecomte";
declare license "GPL";
declare copyright "(c) Pierre Lecomte 2014-2018";
import("stdfaust.lib");
import("nfc.lib");
import("ymn.lib");
import("gui.lib");
M = 5;
N = 2;
ins = N;
outs = (M+1)^2;
outsvumeter = vumeter(0,outs);
spherical(i) = hgroup("[%i+5]Spherical Wave",checkbox("Yes"));
source(i) = hgroup("Source %2i",_*g(i)*r22(i)/r(i)<:par(m,M+1,nf(m,r(i),r22(i))<:par(i,2*m+1,_)):>yvec((M+1)^2,t(i),d(i)));
process = hgroup("",vgroup("Parameters",par(i,N,_<:source(i))):>si.bus((M+1)^2):vgroup("[~]Outputs",outsvumeter));
|
58fcf0141ee36c35c332c322852aaa63392a65783bfbc8928fbaafbe55581cfc
|
sekisushai/ambitools
|
hoa_converter_fuma_to_acn_sn3d.dsp
|
declare name "HOA Converter : FuMa to ACN SN3D";
declare version "1.0";
declare author "Pierre Lecomte";
declare license "GPL";
declare copyright "(c) Pierre Lecomte 2016";
import("stdfaust.lib");
import("gui.lib");
//Description : this tool converts HOA signals defined with a convention 1 to HOA signals defined with convention 2. Proposed conventions are ACN N3D, ACN SN3D, FuMa. For ACN to FuMa, the ordering change is as in [1]
//[1] https://en.wikipedia.org/wiki/Ambisonic_data_exchange_formats
// Input ACN: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// Output FuMa: 0 3 1 2 6 7 5 8 4 12 13 11 14 10 15 9 : W XYZ RSTUV KLMNOPQ
// Input FuMa: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 : W XYZ RSTUV KLMNOPQ
// Output ACN: 0 2 3 1 6 8 4 5 7 15 13 11 9 10 12 14
// Maximum required order (M = 3 for FuMa).
M = 3;
// Number of inputs
ins = (M+1)^2;
outs = ins;
// FuMa Input
conversion(3,2) = par(i,M+1,FuMaACN(i)):par(m,M+1,par(n,2*m+1,_*(1/sqrt(2*m+1)))); // FuMa to ACN_SN3D : FuMa to ACN_N3D to ACN_SN3D
FuMaACN(0) = _*sqrt(2);
FuMaACN(1) = (ro.cross(2),_):(_,ro.cross(2)):
(_*sqrt(3),_*sqrt(3),_*sqrt(3));
FuMaACN(2) = ro.cross(5):(_,ro.cross(2),_,_):(_,_,ro.cross(3)):
(_*(sqrt(15)/2),_*(sqrt(15)/2),_*sqrt(5),_*(sqrt(15)/2),_*(sqrt(15)/2));
FuMaACN(3) = ro.cross(7):(_,ro.cross(2),ro.cross(2),_,_):(_,_,ro.cross(2),_,_,_):(_,_,_,ro.cross(4)):
(_*sqrt(35/8),_*(sqrt(35)/3),_*sqrt(224/45),_*sqrt(7),_*sqrt(224/45),_*(sqrt(35)/3),_*sqrt(35/8));
FuMaACN(m) = par(i,2*m+1,!:0); // normally they shouldn't be FuMa components for M>3
process = si.bus(ins):hgroup("[1]FuMa",par(i,M+1,meterm(i))):conversion(3,2):hgroup("[2]ACN SN3D",par(i,M+1,meterm(i)));
|
https://raw.githubusercontent.com/sekisushai/ambitools/2d21b7cc7cfe9bc35d91d51ec05bf9250372f0ce/Faust/src/hoa_converter_fuma_to_acn_sn3d.dsp
|
faust
|
Description : this tool converts HOA signals defined with a convention 1 to HOA signals defined with convention 2. Proposed conventions are ACN N3D, ACN SN3D, FuMa. For ACN to FuMa, the ordering change is as in [1]
[1] https://en.wikipedia.org/wiki/Ambisonic_data_exchange_formats
Input ACN: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Output FuMa: 0 3 1 2 6 7 5 8 4 12 13 11 14 10 15 9 : W XYZ RSTUV KLMNOPQ
Input FuMa: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 : W XYZ RSTUV KLMNOPQ
Output ACN: 0 2 3 1 6 8 4 5 7 15 13 11 9 10 12 14
Maximum required order (M = 3 for FuMa).
Number of inputs
FuMa Input
FuMa to ACN_SN3D : FuMa to ACN_N3D to ACN_SN3D
normally they shouldn't be FuMa components for M>3
|
declare name "HOA Converter : FuMa to ACN SN3D";
declare version "1.0";
declare author "Pierre Lecomte";
declare license "GPL";
declare copyright "(c) Pierre Lecomte 2016";
import("stdfaust.lib");
import("gui.lib");
M = 3;
ins = (M+1)^2;
outs = ins;
FuMaACN(0) = _*sqrt(2);
FuMaACN(1) = (ro.cross(2),_):(_,ro.cross(2)):
(_*sqrt(3),_*sqrt(3),_*sqrt(3));
FuMaACN(2) = ro.cross(5):(_,ro.cross(2),_,_):(_,_,ro.cross(3)):
(_*(sqrt(15)/2),_*(sqrt(15)/2),_*sqrt(5),_*(sqrt(15)/2),_*(sqrt(15)/2));
FuMaACN(3) = ro.cross(7):(_,ro.cross(2),ro.cross(2),_,_):(_,_,ro.cross(2),_,_,_):(_,_,_,ro.cross(4)):
(_*sqrt(35/8),_*(sqrt(35)/3),_*sqrt(224/45),_*sqrt(7),_*sqrt(224/45),_*(sqrt(35)/3),_*sqrt(35/8));
process = si.bus(ins):hgroup("[1]FuMa",par(i,M+1,meterm(i))):conversion(3,2):hgroup("[2]ACN SN3D",par(i,M+1,meterm(i)));
|
5d65547e001ae95e54f8e767be96d1cf5a1b0d252dc9c30668b90d114d2ad996
|
sekisushai/ambitools
|
hoa_beamforming_hypercardioid_to_hoa.dsp
|
declare name "HOA Beamforming Hypercardioid To HOA";
declare version "1.0";
declare author "Pierre Lecomte";
declare license "GPL";
declare copyright "(c) Pierre Lecomte 2016";
// Description: This tool applies a hypercardioid beampattern to the HOA scene to enhances some directions according to the chosen beampattern. See [1] for more details. The proposed beampattern are regular hypercardioid as described in [2]. The more high the order of the beampattern the more selective is the directionnal filtering.
// Inputs: (M+1)^2
// Outputs: (M+1)^2 + (M1+1)^2 where M1 is the hypercardioid order.
// References:
// [1] P. Lecomte, P.-A. Gauthier, C. Langrenne, A. Berry, and A. Garcia, “Filtrage directionnel dans un scène sonore 3D par une utilisation conjointe de Beamforming et d’Ambisonie d’ordre elevés,” in CFA / VISHNO 2016, 2016, pp. 169–175.
// [2] J. Meyer and G. Elko, “A highly scalable spherical microphone array based on an orthonormal decomposition of the soundfield,” in IEEE International Conference on Acoustics, Speech, and Signal Processing, 2002, vol. 2, pp. 1781–1784.
// CAUTION : this code could take long time to compile for higher order M. It is normal in regards of the size of the matrix involved ((M+1)^2*(M+1)^2*(M1+1)^2).
import("stdfaust.lib");
import("ymn.lib");
import("cijk.lib");
import("gui.lib");
// Maximum order of original HOA scene
M = 3;
// Maximum order of hyppercardioid beampattern (implemented up to order M1=3, but very CPU consuming when M1=3 is chosen)
M1 = 2;
ins = (M+1)^2;
outs = (M+M1+1)^2; //ins // Should be (M+M1+1)^2 to avoid loosing some information after filtering.
// VU-Meters activation (choose between vumeteron or off)
insvumeter = insvumeteroff;
outsvumeter = outsvumeteroff;
insvumeteron = par(i,M+1,meterm(i));
insvumeteroff= par(i,ins,_);
outsvumeteron = par(i,int(sqrt(outs)),meterm(i));
outsvumeteroff = par(i,outs,_);
t = hslider("Azimuth[style:knob]", 0, 0, 360, 0.1)*ma.PI/180;
d = hslider("Elevation[style:knob]", 0, -90, 90, 0.1)*ma.PI/180;
order(s) = hslider("Order[style:knob]",0,0,M1,0.0001)<:select2(s,int,_); // Order of the beampattern used for filtering, order=0 is a bypass.
crossfade(i,x) = par(j,i,_*(1-abs(x-j):max(0))):>_; // linear crossfade between order.
step = checkbox("Int/Float");
norm(m) = 1/sqrt(2*m+1);
// ORDER 0
hypercoeff(0,0) = 1;
// ORDER 1
hypercoeff(1,0) = 0.24993;
hypercoeff(1,1) = 0.433017;
// ORDER 2
hypercoeff(2,0) = 0.11112;
hypercoeff(2,1) = 0.19245;
hypercoeff(2,2) = 0.248448;
// ORDER 3
hypercoeff(3,0) = 0.0625128;
hypercoeff(3,1) = 0.108241;
hypercoeff(3,2) = 0.139751;
hypercoeff(3,3) = 0.165365;
hypercoeff(x1,x2) = 0;
g(beam,m) = hypercoeff(beam,m)*norm(m);
gvec(beam,M) = par(m,M+1,par(n,2*m+1,g(beam,m)));
// TERM i,j OF THE FILTER MATRIX
mat(beam,i,j) = gvec(beam,beam):par(k,(beam+1)^2,_*Cijk(i,j,k)):yvec((beam+1)^2,t,d):>_;
// A ROW OF THE MATRIX
row(beam,i) = par(j,ins,mat(beam,i,j));
// in = number of inputs
// out = number of output
matrix(beam,in,out) = par(i,in,_)<: par(i,out,buswg(row(beam,i)):>_);
//process=bus(ins)<:par(i,M1+1,par(j,ins,_*(i==order))):bus(ins),par(i,M1,matrix(i+1,ins,outs)):>bus(outs);
process = si.bus(ins):hgroup("[1]Inputs",insvumeter)
<:hgroup("[3]Parameters",par(i,M1+1,matrix(i,ins,outs)):ro.interleave(int(outs),int(M1+1)):par(i,outs,crossfade(M1+1,order(step))))
:hgroup("[2]Outputs",outsvumeter);
|
https://raw.githubusercontent.com/sekisushai/ambitools/2d21b7cc7cfe9bc35d91d51ec05bf9250372f0ce/Faust/src/hoa_beamforming_hypercardioid_to_hoa.dsp
|
faust
|
Description: This tool applies a hypercardioid beampattern to the HOA scene to enhances some directions according to the chosen beampattern. See [1] for more details. The proposed beampattern are regular hypercardioid as described in [2]. The more high the order of the beampattern the more selective is the directionnal filtering.
Inputs: (M+1)^2
Outputs: (M+1)^2 + (M1+1)^2 where M1 is the hypercardioid order.
References:
[1] P. Lecomte, P.-A. Gauthier, C. Langrenne, A. Berry, and A. Garcia, “Filtrage directionnel dans un scène sonore 3D par une utilisation conjointe de Beamforming et d’Ambisonie d’ordre elevés,” in CFA / VISHNO 2016, 2016, pp. 169–175.
[2] J. Meyer and G. Elko, “A highly scalable spherical microphone array based on an orthonormal decomposition of the soundfield,” in IEEE International Conference on Acoustics, Speech, and Signal Processing, 2002, vol. 2, pp. 1781–1784.
CAUTION : this code could take long time to compile for higher order M. It is normal in regards of the size of the matrix involved ((M+1)^2*(M+1)^2*(M1+1)^2).
Maximum order of original HOA scene
Maximum order of hyppercardioid beampattern (implemented up to order M1=3, but very CPU consuming when M1=3 is chosen)
ins // Should be (M+M1+1)^2 to avoid loosing some information after filtering.
VU-Meters activation (choose between vumeteron or off)
Order of the beampattern used for filtering, order=0 is a bypass.
linear crossfade between order.
ORDER 0
ORDER 1
ORDER 2
ORDER 3
TERM i,j OF THE FILTER MATRIX
A ROW OF THE MATRIX
in = number of inputs
out = number of output
process=bus(ins)<:par(i,M1+1,par(j,ins,_*(i==order))):bus(ins),par(i,M1,matrix(i+1,ins,outs)):>bus(outs);
|
declare name "HOA Beamforming Hypercardioid To HOA";
declare version "1.0";
declare author "Pierre Lecomte";
declare license "GPL";
declare copyright "(c) Pierre Lecomte 2016";
import("stdfaust.lib");
import("ymn.lib");
import("cijk.lib");
import("gui.lib");
M = 3;
M1 = 2;
ins = (M+1)^2;
insvumeter = insvumeteroff;
outsvumeter = outsvumeteroff;
insvumeteron = par(i,M+1,meterm(i));
insvumeteroff= par(i,ins,_);
outsvumeteron = par(i,int(sqrt(outs)),meterm(i));
outsvumeteroff = par(i,outs,_);
t = hslider("Azimuth[style:knob]", 0, 0, 360, 0.1)*ma.PI/180;
d = hslider("Elevation[style:knob]", 0, -90, 90, 0.1)*ma.PI/180;
step = checkbox("Int/Float");
norm(m) = 1/sqrt(2*m+1);
hypercoeff(0,0) = 1;
hypercoeff(1,0) = 0.24993;
hypercoeff(1,1) = 0.433017;
hypercoeff(2,0) = 0.11112;
hypercoeff(2,1) = 0.19245;
hypercoeff(2,2) = 0.248448;
hypercoeff(3,0) = 0.0625128;
hypercoeff(3,1) = 0.108241;
hypercoeff(3,2) = 0.139751;
hypercoeff(3,3) = 0.165365;
hypercoeff(x1,x2) = 0;
g(beam,m) = hypercoeff(beam,m)*norm(m);
gvec(beam,M) = par(m,M+1,par(n,2*m+1,g(beam,m)));
mat(beam,i,j) = gvec(beam,beam):par(k,(beam+1)^2,_*Cijk(i,j,k)):yvec((beam+1)^2,t,d):>_;
row(beam,i) = par(j,ins,mat(beam,i,j));
matrix(beam,in,out) = par(i,in,_)<: par(i,out,buswg(row(beam,i)):>_);
process = si.bus(ins):hgroup("[1]Inputs",insvumeter)
<:hgroup("[3]Parameters",par(i,M1+1,matrix(i,ins,outs)):ro.interleave(int(outs),int(M1+1)):par(i,outs,crossfade(M1+1,order(step))))
:hgroup("[2]Outputs",outsvumeter);
|
be60095c332f2046e05a1b6b9eecb981b2d1b89a2e55db0505560e4e586d0e81
|
sekisushai/ambitools
|
hoa_converter.dsp
|
declare name "HOA Converter : Convention 1 to Convention 2";
declare version "1.0";
declare author "Pierre Lecomte";
declare license "GPL";
declare copyright "(c) Pierre Lecomte 2016";
import("stdfaust.lib");
import("gui.lib");
//Description : this tool converts HOA signals defined with a convention 1 to HOA signals defined with convention 2. Proposed conventions are ACN N3D, ACN SN3D, FuMa. For ACN to FuMa, the ordering change is as in [1]
//[1] https://en.wikipedia.org/wiki/Ambisonic_data_exchange_formats
// Input ACN: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// Output FuMa: 0 3 1 2 6 7 5 8 4 12 13 11 14 10 15 9 : W XYZ RSTUV KLMNOPQ
// Input FuMa: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 : W XYZ RSTUV KLMNOPQ
// Output ACN: 0 2 3 1 6 8 4 5 7 15 13 11 9 10 12 14
// Maximum required order (M = 3 for FuMa).
M = 4;
// Number of inputs
ins = (M+1)^2;
outs = ins;
inconv = rint(hslider("[0]Input[style:knob] (1-ACN_N3D,2-ACN_SN3D, 3-FuMa)",1,1,3,1));
outconv = rint(hslider("[0]Output[style:knob] (1-ACN_N3D,2-ACN_SN3D, 3-FuMa)",1,1,3,1));
uniq = int(3*inconv + outconv - 4);
// ACN_N3D Input
conversion(1,1) = si.bus(ins); // ACN_N3D to ACN_N3D
conversion(1,2) = par(m,M+1,par(n,2*m+1,_*(1/sqrt(2*m+1)))); // ACN_N3D to ACN_SN3D
conversion(1,3) = par(i,M+1,ACNFuMa(i)); // ACN_N3D to FuMa
// ACN_SN3D Input
conversion(2,1) = par(m,M+1,par(n,2*m+1,_*sqrt(2*m+1))); // ACN_SN3D to ACN_N3D
conversion(2,2) = conversion(1,1); // ACN_SN3D to ACN_SN3D
conversion(2,3) = par(m,M+1,par(n,2*m+1,_*sqrt(2*m+1))):par(i,M+1,ACNFuMa(i)); // ACN_SN3D to FuMa : ACN_SN3D to ACN_N3D to FuMa
// FuMa Input
conversion(3,1) = par(i,M+1,FuMaACN(i)); // FuMa to ACN_N3D
conversion(3,2) = par(i,M+1,FuMaACN(i)):par(m,M+1,par(n,2*m+1,_*(1/sqrt(2*m+1)))); // FuMa to ACN_SN3D : FuMa to ACN_N3D to ACN_SN3D
conversion(3,3) = conversion(1,1); // FuMa to FuMa
ACNFuMa(0) = _*(1/sqrt(2));
ACNFuMa(1) = ro.cross(3):(_,ro.cross(2)):
(_*(1/sqrt(3)),_*(1/sqrt(3)),_*(1/sqrt(3)));
ACNFuMa(2) = (ro.cross(3),_,_):(_,ro.cross(3),_):(_,_,ro.cross(2),_):(_,_,_,ro.cross(2)):
(_*(1/sqrt(5)),_*(2/sqrt(15)),_*(2/sqrt(15)),_*(2/sqrt(15)),_*(2/sqrt(15)));
ACNFuMa(3) = (ro.cross(4),_,_,_):(_,ro.cross(4),_,_):(_,_,ro.cross(3),_,_):(_,_,_,ro.cross(3),_):(_,_,_,_,ro.cross(2),_):(_,_,_,_,_,ro.cross(2)):
(_*(1/sqrt(7)),_*sqrt(45/224),_*sqrt(45/224),_*(3/sqrt(35)),_*(3/sqrt(35)),_*sqrt(8/35),_*sqrt(8/35));
ACNFuMa(m) = par(i,2*m+1,!:0);
FuMaACN(0) = _*sqrt(2);
FuMaACN(1) = (ro.cross(2),_):(_,ro.cross(2)):
(_*sqrt(3),_*sqrt(3),_*sqrt(3));
FuMaACN(2) = ro.cross(5):(_,ro.cross(2),_,_):(_,_,ro.cross(3)):
(_*(sqrt(15)/2),_*(sqrt(15)/2),_*sqrt(5),_*(sqrt(15)/2),_*(sqrt(15)/2));
FuMaACN(3) = ro.cross(7):(_,ro.cross(2),ro.cross(2),_,_):(_,_,ro.cross(2),_,_,_):(_,_,_,ro.cross(4)):
(_*sqrt(35/8),_*(sqrt(35)/3),_*sqrt(224/45),_*sqrt(7),_*sqrt(224/45),_*(sqrt(35)/3),_*sqrt(35/8));
FuMaACN(m) = par(i,2*m+1,!:0); // normally they shouldn't be FuMa components for M>3
process = si.bus(ins):hgroup("[1]Inputs",par(i,M+1,meterm(i)))<:par(i,3,par(j,3,conversion(i+1,j+1))):ro.interleave(int(ins),9):par(i,outs,ba.selectn(9,uniq)):hgroup("[2]Outputs",par(i,M+1,meterm(i)));
//process=par(i,M+1,ACNFuMa(i)):par(i,M+1,FuMaACN(i)); // If the routing is correct, shouldn't have any effects :
|
https://raw.githubusercontent.com/sekisushai/ambitools/2d21b7cc7cfe9bc35d91d51ec05bf9250372f0ce/Faust/src/hoa_converter.dsp
|
faust
|
Description : this tool converts HOA signals defined with a convention 1 to HOA signals defined with convention 2. Proposed conventions are ACN N3D, ACN SN3D, FuMa. For ACN to FuMa, the ordering change is as in [1]
[1] https://en.wikipedia.org/wiki/Ambisonic_data_exchange_formats
Input ACN: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Output FuMa: 0 3 1 2 6 7 5 8 4 12 13 11 14 10 15 9 : W XYZ RSTUV KLMNOPQ
Input FuMa: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 : W XYZ RSTUV KLMNOPQ
Output ACN: 0 2 3 1 6 8 4 5 7 15 13 11 9 10 12 14
Maximum required order (M = 3 for FuMa).
Number of inputs
ACN_N3D Input
ACN_N3D to ACN_N3D
ACN_N3D to ACN_SN3D
ACN_N3D to FuMa
ACN_SN3D Input
ACN_SN3D to ACN_N3D
ACN_SN3D to ACN_SN3D
ACN_SN3D to FuMa : ACN_SN3D to ACN_N3D to FuMa
FuMa Input
FuMa to ACN_N3D
FuMa to ACN_SN3D : FuMa to ACN_N3D to ACN_SN3D
FuMa to FuMa
normally they shouldn't be FuMa components for M>3
process=par(i,M+1,ACNFuMa(i)):par(i,M+1,FuMaACN(i)); // If the routing is correct, shouldn't have any effects :
|
declare name "HOA Converter : Convention 1 to Convention 2";
declare version "1.0";
declare author "Pierre Lecomte";
declare license "GPL";
declare copyright "(c) Pierre Lecomte 2016";
import("stdfaust.lib");
import("gui.lib");
M = 4;
ins = (M+1)^2;
outs = ins;
inconv = rint(hslider("[0]Input[style:knob] (1-ACN_N3D,2-ACN_SN3D, 3-FuMa)",1,1,3,1));
outconv = rint(hslider("[0]Output[style:knob] (1-ACN_N3D,2-ACN_SN3D, 3-FuMa)",1,1,3,1));
uniq = int(3*inconv + outconv - 4);
ACNFuMa(0) = _*(1/sqrt(2));
ACNFuMa(1) = ro.cross(3):(_,ro.cross(2)):
(_*(1/sqrt(3)),_*(1/sqrt(3)),_*(1/sqrt(3)));
ACNFuMa(2) = (ro.cross(3),_,_):(_,ro.cross(3),_):(_,_,ro.cross(2),_):(_,_,_,ro.cross(2)):
(_*(1/sqrt(5)),_*(2/sqrt(15)),_*(2/sqrt(15)),_*(2/sqrt(15)),_*(2/sqrt(15)));
ACNFuMa(3) = (ro.cross(4),_,_,_):(_,ro.cross(4),_,_):(_,_,ro.cross(3),_,_):(_,_,_,ro.cross(3),_):(_,_,_,_,ro.cross(2),_):(_,_,_,_,_,ro.cross(2)):
(_*(1/sqrt(7)),_*sqrt(45/224),_*sqrt(45/224),_*(3/sqrt(35)),_*(3/sqrt(35)),_*sqrt(8/35),_*sqrt(8/35));
ACNFuMa(m) = par(i,2*m+1,!:0);
FuMaACN(0) = _*sqrt(2);
FuMaACN(1) = (ro.cross(2),_):(_,ro.cross(2)):
(_*sqrt(3),_*sqrt(3),_*sqrt(3));
FuMaACN(2) = ro.cross(5):(_,ro.cross(2),_,_):(_,_,ro.cross(3)):
(_*(sqrt(15)/2),_*(sqrt(15)/2),_*sqrt(5),_*(sqrt(15)/2),_*(sqrt(15)/2));
FuMaACN(3) = ro.cross(7):(_,ro.cross(2),ro.cross(2),_,_):(_,_,ro.cross(2),_,_,_):(_,_,_,ro.cross(4)):
(_*sqrt(35/8),_*(sqrt(35)/3),_*sqrt(224/45),_*sqrt(7),_*sqrt(224/45),_*(sqrt(35)/3),_*sqrt(35/8));
process = si.bus(ins):hgroup("[1]Inputs",par(i,M+1,meterm(i)))<:par(i,3,par(j,3,conversion(i+1,j+1))):ro.interleave(int(ins),9):par(i,outs,ba.selectn(9,uniq)):hgroup("[2]Outputs",par(i,M+1,meterm(i)));
|
832683b808cafad4348988da6a44108654ab16f22f940c7e346bf06ba192b18a
|
sekisushai/ambitools
|
hoa_rotator.dsp
|
declare name "HOA Rotator";
declare version "1.0";
declare author "Pierre Lecomte";
declare license "GPL";
declare copyright "(c) Pierre Lecomte 2016";
import("stdfaust.lib");
import("ymn.lib");
// Description: This tool rotates the HOA scene around the x-axis (roll angle), y-axis (pitch angle), and z-axis (yaw angle). Driven with OSC from head-tracking, (for example with andOSC application for Android with andOSC.pd patch provided with ambitools), this tool can compensate the head rotations. See [2] for the matrix definition. Implentation according to [1] with corrections.
// References:
//[1] J. Ivanic and K. Ruedenberg, “Rotation matrices for real spherical harmonics. Direct determination by recursion,” J. Phys. Chem., vol. 100, no. 15, pp. 6342–6347, 1996.
// In TABLE 2 of this paper, from the corrections, the formulaes for the term V(l,m,m') should be taken from the original paper...
// Inputs: (M+1)^2
// Outputs: (M+1)^2
// Sliders
yaw = hslider("Yaw[osc:/yaw 0 360]", 0, 0, 360, 0.01)*ma.PI/180; // Slider with yaw rotation angle
pitch = hslider("Pitch[osc:/picth 0 360]", 0, 0, 360, 0.01)*ma.PI/180; // Slider with pitch rotation angle
roll = hslider("Roll[osc:/roll 0 360]", 0, 0, 360, 0.01)*ma.PI/180; // Slider with roll rotation angle
// Maximum required order
M = 4;
ins = (M+1)^2;
// Zero-th order
rot(0,m,n) = 1;
// First order rotation matrix (n1, n2)
rot(1,-1,-1) = cos(roll)*cos(yaw) - sin(pitch)*sin(roll)*sin(yaw);
rot(1,-1,0) = -1*cos(pitch)*sin(roll);
rot(1,-1,1) = cos(yaw)*sin(pitch)*sin(roll) + cos(roll)*sin(yaw);
rot(1,0,-1) = cos(yaw)*sin(roll) + cos(roll)*sin(pitch)*sin(yaw);
rot(1,0,0) = cos(pitch)*cos(roll);
rot(1,0,1) = -1*cos(roll)*cos(yaw)*sin(pitch) + sin(roll)*sin(yaw);
rot(1,1,-1) = -1*cos(pitch)*sin(yaw);
rot(1,1,0) = sin(pitch);
rot(1,1,1) = cos(pitch)*cos(yaw);
rot(1,m,n) = 0; // other cases for 1st order.
// Recurrence computation for higher-orders
denom(m,n2) = case{
(1) => (m+n2)*(m-n2);
(0) => 2*m*(2*m-1);
}(abs(n2)<m);
u(m,n1,n2) = sqrt((m+n1)*(m-n1)/denom(m,n2));
v(m,n1,n2) = 1/2*sqrt((1+(n1==0))*(m+abs(n1)-1)*(m+abs(n1))/denom(m,n2))*(1-2*(n1==0));
w(m,n1,n2) = -1/2*sqrt((m-abs(n1)-1)*(m-abs(n1))/denom(m,n2))*(1-(n1==0));
//U(m,n1,n2) = ba.if(n1==0,P(0,m,0,n2),P(0,m,n1,n2));
U(m,0,n2) = P(0,m,0,n2);
U(m,n1,n2) = P(0,m,n1,n2);
V(m,n1,n2) = case{
(1,0,0) =>P(1,m,1,n2)+P(-1,m,-1,n2);
(0,1,0) =>P(1,m,n1-1,n2)*sqrt(1+(n1==1))-P(-1,m,-n1+1,n2)*(1-(n1==1));
(0,0,1) =>P(1,m,n1+1,n2)*(1-(n1==-1))+P(-1,m,-n1-1,n2)*sqrt(1+(n1==-1)); // sqrt(1+(n1==1)) is right, in the correction of the paper it's sqrt(1-(n1==1))
}(n1==0,n1>0,n1<0);
W(m,n1,n2) = case{
(1,0,0) => 0; // Shouldn't be defined but covers some pattern matching cases.
(0,1,0) => P(1,m,n1+1,n2)+P(-1,m,-n1-1,n2);
(0,0,1) => P(1,m,n1-1,n2)-P(-1,m,-n1+1,n2);
}(n1==0,n1>0,n1<0);
P(i,m,mu,n2) = case{
(1,0,0) => rot(1,i,0)*rot(m-1,mu,n2);
(0,1,0) => rot(1,i,1)*rot(m-1,mu,m-1)-rot(1,i,-1)*rot(m-1,mu,-m+1);
(0,0,1) => rot(1,i,1)*rot(m-1,mu,-m+1)+rot(1,i,-1)*rot(m-1,mu,m-1);
}(abs(n2)<m,n2==m,n2==-m);
// Other cases
rot(m,n1,n2) = u(m,n1,n2)*U(m,n1,n2)+v(m,n1,n2)*V(m,n1,n2)+w(m,n1,n2)*W(m,n1,n2);
// Main-matrix row
row(M,i) = par(m,M+1,
par(j,2*m+1,term
with{
term =
case{
(0) => 0;
(1) => rot(m,int(i-m^2)-m,j-m);
}((i >= m^2) & (i< (m+1)^2));
}
)
);
// Matrix multiplication
// n = number of inputs
// m = number of outputs
matrix(n,m) = par(i,n,_) <: par(i,m,buswg(row(M,i)):>_);
process = matrix(ins,ins);
//process=rot(2,1,1);
|
https://raw.githubusercontent.com/sekisushai/ambitools/2d21b7cc7cfe9bc35d91d51ec05bf9250372f0ce/Faust/src/hoa_rotator.dsp
|
faust
|
Description: This tool rotates the HOA scene around the x-axis (roll angle), y-axis (pitch angle), and z-axis (yaw angle). Driven with OSC from head-tracking, (for example with andOSC application for Android with andOSC.pd patch provided with ambitools), this tool can compensate the head rotations. See [2] for the matrix definition. Implentation according to [1] with corrections.
References:
[1] J. Ivanic and K. Ruedenberg, “Rotation matrices for real spherical harmonics. Direct determination by recursion,” J. Phys. Chem., vol. 100, no. 15, pp. 6342–6347, 1996.
In TABLE 2 of this paper, from the corrections, the formulaes for the term V(l,m,m') should be taken from the original paper...
Inputs: (M+1)^2
Outputs: (M+1)^2
Sliders
Slider with yaw rotation angle
Slider with pitch rotation angle
Slider with roll rotation angle
Maximum required order
Zero-th order
First order rotation matrix (n1, n2)
other cases for 1st order.
Recurrence computation for higher-orders
U(m,n1,n2) = ba.if(n1==0,P(0,m,0,n2),P(0,m,n1,n2));
sqrt(1+(n1==1)) is right, in the correction of the paper it's sqrt(1-(n1==1))
Shouldn't be defined but covers some pattern matching cases.
Other cases
Main-matrix row
Matrix multiplication
n = number of inputs
m = number of outputs
process=rot(2,1,1);
|
declare name "HOA Rotator";
declare version "1.0";
declare author "Pierre Lecomte";
declare license "GPL";
declare copyright "(c) Pierre Lecomte 2016";
import("stdfaust.lib");
import("ymn.lib");
M = 4;
ins = (M+1)^2;
rot(0,m,n) = 1;
rot(1,-1,-1) = cos(roll)*cos(yaw) - sin(pitch)*sin(roll)*sin(yaw);
rot(1,-1,0) = -1*cos(pitch)*sin(roll);
rot(1,-1,1) = cos(yaw)*sin(pitch)*sin(roll) + cos(roll)*sin(yaw);
rot(1,0,-1) = cos(yaw)*sin(roll) + cos(roll)*sin(pitch)*sin(yaw);
rot(1,0,0) = cos(pitch)*cos(roll);
rot(1,0,1) = -1*cos(roll)*cos(yaw)*sin(pitch) + sin(roll)*sin(yaw);
rot(1,1,-1) = -1*cos(pitch)*sin(yaw);
rot(1,1,0) = sin(pitch);
rot(1,1,1) = cos(pitch)*cos(yaw);
denom(m,n2) = case{
(1) => (m+n2)*(m-n2);
(0) => 2*m*(2*m-1);
}(abs(n2)<m);
u(m,n1,n2) = sqrt((m+n1)*(m-n1)/denom(m,n2));
v(m,n1,n2) = 1/2*sqrt((1+(n1==0))*(m+abs(n1)-1)*(m+abs(n1))/denom(m,n2))*(1-2*(n1==0));
w(m,n1,n2) = -1/2*sqrt((m-abs(n1)-1)*(m-abs(n1))/denom(m,n2))*(1-(n1==0));
U(m,0,n2) = P(0,m,0,n2);
U(m,n1,n2) = P(0,m,n1,n2);
V(m,n1,n2) = case{
(1,0,0) =>P(1,m,1,n2)+P(-1,m,-1,n2);
(0,1,0) =>P(1,m,n1-1,n2)*sqrt(1+(n1==1))-P(-1,m,-n1+1,n2)*(1-(n1==1));
}(n1==0,n1>0,n1<0);
W(m,n1,n2) = case{
(0,1,0) => P(1,m,n1+1,n2)+P(-1,m,-n1-1,n2);
(0,0,1) => P(1,m,n1-1,n2)-P(-1,m,-n1+1,n2);
}(n1==0,n1>0,n1<0);
P(i,m,mu,n2) = case{
(1,0,0) => rot(1,i,0)*rot(m-1,mu,n2);
(0,1,0) => rot(1,i,1)*rot(m-1,mu,m-1)-rot(1,i,-1)*rot(m-1,mu,-m+1);
(0,0,1) => rot(1,i,1)*rot(m-1,mu,-m+1)+rot(1,i,-1)*rot(m-1,mu,m-1);
}(abs(n2)<m,n2==m,n2==-m);
rot(m,n1,n2) = u(m,n1,n2)*U(m,n1,n2)+v(m,n1,n2)*V(m,n1,n2)+w(m,n1,n2)*W(m,n1,n2);
row(M,i) = par(m,M+1,
par(j,2*m+1,term
with{
term =
case{
(0) => 0;
(1) => rot(m,int(i-m^2)-m,j-m);
}((i >= m^2) & (i< (m+1)^2));
}
)
);
matrix(n,m) = par(i,n,_) <: par(i,m,buswg(row(M,i)):>_);
process = matrix(ins,ins);
|
317dbd91f3adf92a3cb355cd8d9da331f657a8f0040ee10d7f23db852cfb871b
|
sekisushai/ambitools
|
hoa_decoder_lebedev50_binaural.dsp
|
declare name "Binaural decoder";
declare version "1.0";
declare author "Pierre Lecomte";
declare license "GPL)";
declare copyright "(c) Pierre Lecomte 2015";
// Description: Binaural decoder for a virtual 50-node Lebedev grid [1]. HRTFs of a Neumann KU-100 from [2].
// References:
//[1] Lecomte, P., Gauthier, P.-A., Langrenne, C., Garcia, A., & Berry, A. (2015). On the use of a Lebedev grid for Ambisonics. In Audio Engineering Society Convention 139. New York.
//[2] B. Bernschütz, “A spherical far field hrir/hrtf compilation of the neumann ku 100,” in Proceedings of the 40th Italian (AIA) Annual Conference on Acoustics and the 39th German Annual Conference on Acoustics (DAGA) Conference on Acoustics, 2013, p. 29.
// Inputs: (M+1)^2
// Outputs: 2
import("stdfaust.lib");
import("gui.lib");
M = 5;
// WARNING: very CPU consuming if taking order up to 5 (36 linear convolution involved, prefer solution like jconvolver...)
// Filter bank
mix(0) = par(i,(M+1)^2,h(i,0)):>_*volout;
mix(1) = par(i,(M+1)^2,h(i,1)):>_*volout;
// Gains
volin = vslider("[1]Inputs Gain[unit:dB][osc:/levelin -10 10]", 0, -10, 10, 0.1) : ba.db2linear : si.smooth(0.999);
volout = vslider("[2]Outputs Gain[unit:dB][osc:/levelout -10 10]", 0, -10, 10, 0.1) : ba.db2linear : si.smooth(0.999);
process = hgroup("Inputs",par(i,(M+1)^2,_*volin):par(i,M+1,metermute(i))<:(mix(0),mix(1))):vgroup("Outputs",hgroup("Left",hmeter),hgroup("Right",hmeter));
h(0,0) = fi.fir((2.51182*10^-5, 1.23708*10^-4, -1.7378*10^-4, 9.68384*10^-4, 5.9949*10^-4, 7.67728*10^-4, 1.41179*10^-4, 1.86342*10^-3, 2.49571*10^-4, 1.15892*10^-3, 5.08795*10^-4, 3.63026*10^-3, 5.65104*10^-2, 4.93423*10^-2, 4.49074*10^-2, 6.47491*10^-2, 5.96065*10^-2, 7.34951*10^-2, 3.45148*10^-2, 5.57725*10^-2, 6.59684*10^-2, 5.78092*10^-2, 9.68951*10^-2, 2.12609*10^-2, -1.5415*10^-2, 3.17463*10^-2, 5.28391*10^-2, 3.06246*10^-2, -1.14164*10^-2, 8.70641*10^-3, 2.66261*10^-2, 1.13663*10^-2, 5.70825*10^-3, 2.3002*10^-2, 2.00236*10^-2, 4.46807*10^-3, 1.41227*10^-2, 7.9812*10^-3, 6.93019*10^-3, 1.15891*10^-2, 6.4973*10^-3, 5.69457*10^-3, 7.43299*10^-3, 2.88578*10^-3, 7.92482*10^-3, 1.50058*10^-2, 2.50454*10^-3, -2.96739*10^-3, 3.06785*10^-3, 1.75234*10^-3, 8.6377*10^-4, 3.66525*10^-3, 2.8834*10^-3, 3.25793*10^-3, 3.05273*10^-3, 1.24616*10^-3, 1.21185*10^-3, 5.00282*10^-3, 3.61293*10^-3, 3.12119*10^-3, 4.22506*10^-3, 3.57753*10^-3, 6.80407*10^-3, 6.23851*10^-3, 4.2153*10^-3, 2.74035*10^-3, 2.30892*10^-3, 3.42846*10^-3, 2.25593*10^-3, 1.4647*10^-3, 1.85049*10^-3, 3.21075*10^-3, 5.23563*10^-3, 3.08689*10^-3, 2.91291*10^-3, 6.37431*10^-3, 4.19458*10^-3, 8.28477*10^-4, 2.4405*10^-3, 4.19052*10^-3, 2.43653*10^-3, -1.06944*10^-3, 5.63692*10^-4, 1.57017*10^-3, -3.11911*10^-4, 1.67995*10^-3, 5.17576*10^-3, 3.70831*10^-3, -1.41242*10^-3, -1.34669*10^-3, 4.13299*10^-4, -1.48382*10^-3, -2.49697*10^-3, 2.3955*10^-5, 2.14615*10^-3, 2.72945*10^-3, 5.4874*10^-4, -5.44865*10^-4, 5.84702*10^-4, 6.12825*10^-4, 5.06834*10^-4, 8.77276*10^-4, 1.54024*10^-3, 1.85348*10^-3, 1.20654*10^-3, 1.40592*10^-3, 1.36699*10^-3, 1.2923*10^-3, 9.43651*10^-4, 8.34515*10^-4, 9.81663*10^-4, 6.76256*10^-4, 5.0102*10^-4, 5.33584*10^-4, 5.47366*10^-4, 4.53824*10^-4, 3.416*10^-4, 2.58553*10^-4, 1.68725*10^-4, 1.64044*10^-4, 1.06546*10^-4, 4.25413*10^-5, 1.87179*10^-5, 2.09787*10^-5, 5.71261*10^-6, 5.08139*10^-6, 2.06253*10^-6, 0));
h(1,0) = fi.fir((3.39551*10^-5, 1.5469*10^-4, -3.15062*10^-4, 1.22991*10^-3, 5.86903*10^-4, 1.14689*10^-3, -4.14599*10^-4, 1.94177*10^-3, -1.67329*10^-4, 1.81104*10^-3, -1.17791*10^-3, 5.45812*10^-3, 9.05515*10^-2, 7.71319*10^-2, 6.08862*10^-2, 7.81434*10^-2, 6.36584*10^-2, 8.89548*10^-2, 2.93457*10^-2, 2.14629*10^-2, 4.13412*10^-2, 5.06357*10^-2, 5.85082*10^-2, -3.46875*10^-2, -4.27948*10^-2, -6.03285*10^-4, -9.5142*10^-3, -1.60175*10^-2, -3.94065*10^-2, -3.90074*10^-2, -1.25257*10^-2, -5.21665*10^-3, -1.93807*10^-2, -3.57626*10^-2, -2.6437*10^-2, -1.80915*10^-2, -2.39676*10^-2, -2.69667*10^-2, -2.52633*10^-2, -1.5369*10^-2, -8.62273*10^-3, -2.03737*10^-2, -2.21845*10^-2, -1.88738*10^-2, -1.60792*10^-2, -8.87528*10^-3, -1.16756*10^-2, -1.61942*10^-2, -1.66062*10^-2, -1.28559*10^-2, -1.51194*10^-2, -1.59132*10^-2, -9.58195*10^-3, -6.87643*10^-3, -7.66095*10^-3, -1.00582*10^-2, -1.04416*10^-2, -4.54199*10^-3, -3.77104*10^-3, -4.75476*10^-3, -2.79511*10^-3, -4.74844*10^-3, -4.44703*10^-3, -2.46014*10^-3, -1.70561*10^-3, -2.43748*10^-3, -2.1747*10^-3, -1.57916*10^-3, -3.01046*10^-3, -2.3879*10^-3, -1.02903*10^-3, 1.03767*10^-4, 1.61521*10^-3, 4.6795*10^-4, -1.84981*10^-3, -1.89912*10^-3, -9.29744*10^-4, 1.77653*10^-3, 2.78163*10^-3, 5.87931*10^-4, 2.36486*10^-5, -1.17495*10^-3, 3.31327*10^-4, 3.00031*10^-3, 1.04984*10^-3, 8.84337*10^-4, 1.36716*10^-3, 1.33451*10^-3, 4.59752*10^-4, 2.64467*10^-4, 6.79848*10^-5, -1.38672*10^-4, 1.08099*10^-3, 1.6778*10^-3, 2.14314*10^-3, 1.36595*10^-3, 6.23519*10^-4, 8.13006*10^-4, 9.22271*10^-4, 4.56141*10^-4, 7.05385*10^-4, 7.09739*10^-4, 4.32368*10^-4, 4.7704*10^-4, 4.69697*10^-4, 5.36059*10^-5, -3.5653*10^-4, 4.19816*10^-4, -8.74662*10^-6, -2.73034*10^-4, -2.69357*10^-4, -3.14307*10^-4, -2.72806*10^-4, -2.50633*10^-4, 1.17965*10^-5, -1.25622*10^-4, -9.1399*10^-5, -1.37362*10^-4, -1.63854*10^-4, -1.1129*10^-5, -3.1175*10^-5, -4.81323*10^-5, -6.52305*10^-5, -3.8802*10^-5, -8.31851*10^-6, -2.56393*10^-6, -1.86561*10^-6, 0));
h(2,0) = fi.fir((4.45788*10^-6, 2.85198*10^-5, 1.58404*10^-4, -1.9245*10^-4, 4.94618*10^-4, 3.1507*10^-4, -1.60361*10^-4, -9.70589*10^-4, 1.65835*10^-3, -1.81327*10^-4, -4.38717*10^-4, -3.62721*10^-4, -4.89909*10^-3, 8.68029*10^-4, 5.03397*10^-4, -1.58698*10^-2, -9.2683*10^-3, 3.25354*10^-2, -1.49073*10^-2, -3.71117*10^-2, 1.21098*10^-2, 1.97594*10^-2, -5.7804*10^-3, -3.21277*10^-3, 5.76228*10^-3, -1.15485*10^-2, 5.79697*10^-3, -4.36148*10^-3, 2.16851*10^-2, 2.15763*10^-2, -2.00181*10^-2, -1.61655*10^-2, 8.64831*10^-3, 3.76608*10^-3, -1.37585*10^-2, 1.64669*10^-2, 5.34294*10^-4, -1.93136*10^-2, -3.92637*10^-3, 3.01503*10^-3, 5.31059*10^-3, 7.0971*10^-3, 2.85895*10^-3, -4.32563*10^-3, 2.23295*10^-3, 2.14275*10^-3, 1.30772*10^-3, 9.18714*10^-3, 4.21731*10^-3, -1.61133*10^-3, 1.62146*10^-3, 7.79086*10^-4, 2.79092*10^-3, 5.6766*10^-3, 2.43588*10^-3, -2.94729*10^-4, -3.50462*10^-3, -1.23749*10^-3, 9.95482*10^-4, 7.91254*10^-4, 8.95198*10^-4, -1.13341*10^-3, 1.66911*10^-3, 3.37181*10^-5, -2.71694*10^-3, -1.77024*10^-3, -1.53815*10^-3, -2.60887*10^-3, -4.65625*10^-3, -3.36985*10^-3, -7.35849*10^-4, -1.91902*10^-3, -2.39256*10^-3, -1.13852*10^-3, -3.15111*10^-4, 2.59004*10^-4, -4.10988*10^-5, 2.85455*10^-4, 2.06802*10^-3, 1.60799*10^-3, 3.83377*10^-4, -7.37536*10^-4, -6.08302*10^-4, 7.21582*10^-4, 8.9328*10^-4, 3.68326*10^-3, 3.27138*10^-3, 1.69945*10^-3, 3.75801*10^-3, 4.36899*10^-3, 1.9519*10^-3, -5.44478*10^-6, 1.19739*10^-3, 2.29129*10^-3, 1.28729*10^-3, -1.04971*10^-3, -1.21329*10^-3, 3.24763*10^-4, 5.11494*10^-5, -1.47963*10^-3, -1.55276*10^-3, -1.3151*10^-3, -6.22009*10^-4, -9.64667*10^-4, -1.49514*10^-3, -1.26437*10^-3, -6.41907*10^-4, -2.60407*10^-4, -1.27535*10^-3, -1.079*10^-3, -3.83553*10^-4, -3.88626*10^-4, -5.42304*10^-4, -5.50354*10^-4, -7.58938*10^-5, -6.57488*10^-5, 9.50248*10^-7, 7.74527*10^-5, 5.80835*10^-5, 9.08167*10^-5, 9.94261*10^-5, 8.00668*10^-5, 2.43757*10^-5, 8.79674*10^-6, 8.88365*10^-6, 8.46417*10^-6, 2.40821*10^-6, 0));
h(3,0) = fi.fir((9.93628*10^-6, 2.49699*10^-5, 1.3874*10^-4, -1.77736*10^-4, 6.9471*10^-4, -3.62084*10^-4, 5.34434*10^-4, -1.10817*10^-3, 1.48817*10^-3, -1.31485*10^-3, 2.01002*10^-3, -3.03202*10^-3, -7.21718*10^-3, 6.18924*10^-3, -5.30958*10^-3, 2.5992*10^-3, 2.53457*10^-3, 2.11909*10^-2, 1.74746*10^-2, -1.16911*10^-2, 7.02438*10^-4, -1.20184*10^-2, 9.40654*10^-5, 1.94897*10^-3, -2.54585*10^-2, -6.98871*10^-4, 3.066*10^-2, -3.15638*10^-4, -3.91701*10^-2, 9.67744*10^-3, 3.62823*10^-2, -1.73412*10^-2, -3.01367*10^-2, 6.00683*10^-3, 5.36729*10^-3, -1.00647*10^-2, 3.41282*10^-3, 1.15935*10^-3, 1.73416*10^-5, 4.83835*10^-3, -7.65874*10^-3, -3.03209*10^-3, 8.14256*10^-3, 3.36909*10^-3, 5.03769*10^-3, 6.81093*10^-3, -2.48879*10^-3, -2.99686*10^-3, 5.71347*10^-3, 5.34772*10^-3, -4.98921*10^-4, 1.17636*10^-3, 1.2247*10^-3, 1.66342*10^-3, 3.59199*10^-3, 8.81705*10^-4, 2.88332*10^-3, 2.06635*10^-3, -5.50486*10^-4, -5.02175*10^-4, -1.49053*10^-3, -2.55876*10^-4, 7.08839*10^-4, 1.46986*10^-3, 1.13331*10^-3, 1.0312*10^-3, -1.03439*10^-3, -1.93403*10^-3, -4.52416*10^-5, -1.71475*10^-3, -3.12195*10^-3, -1.98432*10^-3, -1.63132*10^-3, -1.52868*10^-3, -1.21188*10^-3, -3.23087*10^-4, -1.90084*10^-3, -2.99123*10^-3, -1.46794*10^-3, -8.30328*10^-4, -8.29761*10^-4, -3.0592*10^-3, -2.00404*10^-3, 6.95453*10^-4, 3.67688*10^-4, 1.54417*10^-3, 5.27862*10^-3, 3.37025*10^-3, -1.42103*10^-3, -1.03026*10^-3, 1.40369*10^-3, 5.62856*10^-4, -2.01638*10^-3, -1.35489*10^-3, 6.82534*10^-4, 3.17138*10^-3, 1.95891*10^-3, -1.26004*10^-3, -1.70268*10^-3, -1.03889*10^-3, -1.24353*10^-3, -1.24685*10^-3, -7.11991*10^-4, -4.46193*10^-4, -8.88254*10^-4, -6.54569*10^-4, -5.18168*10^-4, -5.63891*10^-4, -8.39627*10^-4, -5.41095*10^-4, -2.0805*10^-4, -9.82972*10^-5, -2.90241*10^-4, -4.28973*10^-4, -1.03579*10^-4, 1.84012*10^-4, 1.84563*10^-4, 3.85491*10^-5, -9.84852*10^-6, 3.92966*10^-5, 1.05639*10^-4, 1.01833*10^-4, 3.88276*10^-5, 8.03417*10^-6, -6.97166*10^-6, 1.70273*10^-6, 2.45331*10^-6, 0));
h(4,0) = fi.fir((1.46221*10^-5, 2.00167*10^-5, 2.02228*10^-4, -5.06998*10^-4, 8.48566*10^-4, -9.19794*10^-4, 1.28861*10^-3, -2.35191*10^-3, 2.47242*10^-3, -2.51081*10^-3, 3.89043*10^-3, -6.7548*10^-3, -1.42655*10^-2, 1.20915*10^-2, -7.36941*10^-3, 1.03427*10^-2, 3.09089*10^-3, 2.74497*10^-2, 3.16732*10^-2, -1.79474*10^-2, -1.23166*10^-2, -2.23719*10^-2, -8.51016*10^-3, -1.0793*10^-2, -1.49272*10^-2, 6.91979*10^-3, 3.41252*10^-3, -3.96492*10^-3, -1.01439*10^-2, -5.08919*10^-3, 1.05234*10^-2, 7.32389*10^-3, -1.92986*10^-3, -2.74518*10^-3, -5.44477*10^-3, 7.32402*10^-3, 1.02309*10^-2, 2.91413*10^-3, 5.3044*10^-3, 5.35601*10^-3, 9.22673*10^-5, -2.41033*10^-3, 1.31455*10^-3, -2.1753*10^-3, 2.08879*10^-4, 4.44323*10^-3, -1.0344*10^-3, -3.04542*10^-3, 1.96889*10^-3, 7.98082*10^-3, 1.60511*10^-3, -1.91281*10^-3, 1.10736*10^-3, -2.80679*10^-3, -3.85064*10^-3, -1.50426*10^-3, 1.63393*10^-3, 5.05196*10^-4, 1.31157*10^-4, 1.47938*10^-3, -3.43024*10^-4, 1.60801*10^-3, 2.05137*10^-3, -5.8659*10^-5, -1.90039*10^-3, -1.10453*10^-3, 8.71167*10^-5, 2.62382*10^-3, 1.47127*10^-3, -2.75591*10^-3, -1.15775*10^-3, -7.69724*10^-4, -1.36039*10^-3, -7.82908*10^-4, 1.16141*10^-3, 1.31188*10^-3, -1.45515*10^-3, -1.14088*10^-5, 4.7882*10^-4, -7.15635*10^-4, -4.8162*10^-4, -1.72614*10^-3, -6.21192*10^-5, 1.29144*10^-3, -1.12739*10^-3, -3.34905*10^-4, 1.90242*10^-3, 8.62519*10^-4, -1.66752*10^-3, -1.27253*10^-3, -1.72844*10^-3, -1.53058*10^-3, 1.48392*10^-4, 6.32642*10^-4, 1.55754*10^-3, 7.61493*10^-5, -4.92681*10^-4, 3.51382*10^-4, 1.83796*10^-4, -6.84209*10^-4, -3.15156*10^-4, 2.54261*10^-4, -4.44158*10^-4, -2.70074*10^-4, 5.07708*10^-4, 3.6701*10^-4, 5.25869*10^-5, 2.04282*10^-4, 1.06553*10^-4, -1.41728*10^-4, 1.45149*10^-4, 8.2866*10^-5, 8.32732*10^-5, 2.27166*10^-4, 8.7317*10^-5, -3.78775*10^-5, 9.09633*10^-5, 3.84705*10^-5, -1.98935*10^-5, 8.21408*10^-6, 3.87224*10^-5, 2.72483*10^-5, -9.02966*10^-6, 2.11859*10^-6, 3.82797*10^-6, 6.18201*10^-6, 2.51378*10^-7, 0));
h(5,0) = fi.fir((1.57811*10^-5, 4.41782*10^-5, 2.31406*10^-4, -2.60758*10^-4, 9.03587*10^-4, 7.02765*10^-4, 3.68557*10^-4, -9.98409*10^-4, 2.52097*10^-3, -2.39278*10^-4, 4.61844*10^-5, -1.62087*10^-4, -1.10732*10^-2, 2.7371*10^-3, 5.96596*10^-3, -2.40448*10^-2, -1.17481*10^-2, 4.51275*10^-2, -1.55188*10^-2, -2.61531*10^-2, 1.67235*10^-2, 1.3603*10^-2, 9.91536*10^-3, 1.60061*10^-3, 1.3329*10^-3, -1.65022*10^-2, -6.43151*10^-4, -5.81921*10^-3, 1.09229*10^-2, 9.98562*10^-3, -9.99544*10^-3, -3.54222*10^-3, 9.14287*10^-3, 4.90455*10^-3, -9.53766*10^-3, 6.01814*10^-3, 4.19719*10^-5, -1.7748*10^-3, 3.86721*10^-3, 4.79459*10^-3, 2.90687*10^-3, -4.31318*10^-4, 3.80235*10^-3, -3.37746*10^-3, -3.13597*10^-3, 1.84624*10^-3, -1.34822*10^-4, 5.54582*10^-4, 3.56967*10^-3, 2.92148*10^-4, -3.51467*10^-3, 1.74319*10^-3, 2.19724*10^-4, -1.43258*10^-3, 2.15198*10^-3, -3.59638*10^-4, -4.76244*10^-3, -2.33638*10^-3, -1.32344*10^-3, -1.42376*10^-3, 1.40545*10^-3, -1.38811*10^-3, -1.74957*10^-3, -4.75105*10^-4, 1.50508*10^-3, 8.84199*10^-5, -4.1918*10^-4, 5.59142*10^-4, -3.77265*10^-3, -4.2904*10^-3, -9.61273*10^-4, 5.89775*10^-4, 6.09699*10^-4, 1.0633*10^-3, 6.47084*10^-4, 2.06941*10^-4, 6.11713*10^-4, 1.1545*10^-3, 1.27111*10^-3, -6.25519*10^-4, -1.93753*10^-3, -3.29212*10^-3, -1.52143*10^-3, 1.45329*10^-3, 2.55904*10^-3, 3.44944*10^-3, 2.62148*10^-3, 1.33959*10^-3, 1.7063*10^-3, 1.67233*10^-3, 5.5143*10^-4, 4.01845*10^-4, 7.19341*10^-4, 6.81816*10^-4, 7.54655*10^-4, 3.01162*10^-3, 3.46972*10^-3, 1.56339*10^-3, 8.42543*10^-4, 3.80719*10^-4, 6.93815*10^-4, 4.66624*10^-4, 6.92291*10^-4, 1.62719*10^-3, 1.133*10^-3, 4.97187*10^-4, 5.06744*10^-4, 5.30096*10^-4, 4.0572*10^-4, 2.01872*10^-4, 2.60275*10^-4, -2.72057*10^-5, -9.1851*10^-5, 3.26233*10^-5, 3.00808*10^-4, 2.03617*10^-4, 5.07898*10^-5, -8.33149*10^-5, -1.03751*10^-5, 7.76086*10^-5, -5.33407*10^-7, -3.06573*10^-5, -1.70851*10^-5, 2.01059*10^-5, 3.98048*10^-6, 3.35889*10^-6, 3.43292*10^-8, 0));
h(6,0) = fi.fir((-3.86616*10^-6, -2.92856*10^-5, 2.57463*10^-4, -2.55296*10^-4, -6.78291*10^-6, -5.84922*10^-4, 1.01332*10^-3, -8.61014*10^-4, 9.46613*10^-4, -1.43681*10^-3, 2.55288*10^-3, -5.67696*10^-3, -4.71336*10^-2, -4.24378*10^-2, -2.01533*10^-2, -2.22634*10^-2, -3.88006*10^-3, -1.15908*10^-2, 3.31593*10^-4, 4.48946*10^-2, 1.8844*10^-3, 1.37521*10^-2, 3.59968*10^-2, -1.28167*10^-2, 1.24978*10^-2, 5.27583*10^-2, 2.34635*10^-2, -2.63881*10^-3, 8.67306*10^-3, 2.4751*10^-2, 5.87393*10^-3, -9.25468*10^-3, 1.18865*10^-2, 1.58006*10^-2, -1.04271*10^-3, -1.14966*10^-2, 9.57015*10^-3, 4.89365*10^-3, -6.55248*10^-3, 7.03939*10^-3, -2.12608*10^-3, -1.04984*10^-2, -3.61629*10^-3, -7.17239*10^-3, -5.23434*10^-3, -2.0962*10^-3, -7.01442*10^-3, -7.31803*10^-3, -4.60171*10^-3, -3.69246*10^-3, -9.09628*10^-3, -3.28774*10^-3, 1.22438*10^-3, -4.19002*10^-3, -5.04437*10^-3, -5.07132*10^-3, -3.11109*10^-3, -1.28336*10^-3, -1.39409*10^-3, -5.34437*10^-4, 1.9439*10^-3, -5.92974*10^-4, -1.41222*10^-3, 2.15115*10^-3, 1.6155*10^-3, 1.10439*10^-3, 5.51147*10^-4, -6.92677*10^-4, -2.69537*10^-3, -8.60682*10^-4, 1.25214*10^-3, 1.17567*10^-3, 6.25862*10^-5, -4.49214*10^-3, -9.97929*10^-4, 2.71718*10^-3, -2.03951*10^-3, -3.55741*10^-3, -1.08387*10^-3, 6.46904*10^-4, -3.55818*10^-4, -1.00778*10^-3, 4.60677*10^-4, 1.43222*10^-3, 7.68707*10^-4, -1.02436*10^-3, -1.92194*10^-3, 1.5598*10^-4, 5.61379*10^-4, -4.09825*10^-4, 3.64663*10^-5, 3.56328*10^-5, 1.15068*10^-3, 8.24869*10^-4, 5.8267*10^-4, -4.83767*10^-4, -1.17138*10^-3, 7.64905*10^-4, 1.21078*10^-3, 4.86777*10^-4, 2.61474*10^-4, 3.07859*10^-4, 2.08667*10^-4, -1.41295*10^-4, 6.09299*10^-5, 1.35904*10^-4, 4.57857*10^-4, 3.37973*10^-4, 2.04718*10^-4, 3.41662*10^-4, 1.00847*10^-4, -8.46021*10^-5, -1.08104*10^-4, -1.27879*10^-4, -1.09223*10^-4, -4.56845*10^-5, -9.0214*10^-5, -1.3188*10^-4, 3.02152*10^-5, 4.86084*10^-5, -4.50631*10^-5, -6.11718*10^-5, -2.83688*10^-5, -8.4151*10^-6, -4.11553*10^-6, -3.53055*10^-6, 8.96305*10^-8, 0));
h(7,0) = fi.fir((4.2463*10^-6, -2.82698*10^-6, 5.23527*10^-5, 2.49726*10^-5, -1.7067*10^-4, -1.7706*10^-4, 2.40886*10^-4, 1.60215*10^-4, -5.28537*10^-4, 2.2609*10^-4, 3.39552*10^-4, 2.7819*10^-4, 2.78137*10^-4, -2.52045*10^-3, -3.72384*10^-4, 7.1841*10^-3, -7.4312*10^-3, -1.10708*10^-2, 9.43312*10^-3, 1.13006*10^-2, -5.36636*10^-3, -4.82279*10^-3, -5.74575*10^-3, -1.60587*10^-3, -8.34246*10^-3, 3.58491*10^-3, 2.4944*10^-2, -1.15642*10^-2, -1.67202*10^-3, 5.18072*10^-4, -1.07983*10^-2, 2.19485*10^-3, 2.35272*10^-2, -3.90009*10^-3, -1.53265*10^-2, 2.15568*10^-2, 3.0387*10^-3, -8.19711*10^-4, 2.183*10^-3, -1.4029*10^-3, -3.91025*10^-3, 1.37613*10^-3, -5.52124*10^-3, -9.85606*10^-3, 2.15494*10^-3, -3.20578*10^-3, -4.54218*10^-3, -1.9447*10^-3, -3.5543*10^-3, -1.64123*10^-3, 4.59555*10^-3, 2.52762*10^-3, -4.02653*10^-3, -1.8522*10^-3, 2.04676*10^-4, 2.88148*10^-3, 3.43243*10^-3, 5.47636*10^-4, 2.75394*10^-3, 2.21665*10^-3, -1.2919*10^-3, 4.00805*10^-4, 2.57166*10^-3, 1.46628*10^-3, 2.72868*10^-5, -1.16132*10^-3, 3.80668*10^-5, 3.61819*10^-3, 2.21192*10^-3, -8.18766*10^-4, 6.62261*10^-4, 1.08661*10^-3, 7.49201*10^-4, -4.81969*10^-5, -4.2257*10^-4, -2.02931*10^-4, 2.06879*10^-5, 6.29365*10^-5, 1.41728*10^-4, -1.46906*10^-3, -2.38707*10^-3, -1.86912*10^-3, -1.11238*10^-3, -1.19961*10^-3, -2.86108*10^-3, 7.00973*10^-4, 1.27749*10^-3, -1.12713*10^-3, -1.14887*10^-3, -4.13161*10^-4, -5.0415*10^-4, -2.00683*10^-3, -3.58722*10^-5, 2.2713*10^-3, 1.24614*10^-3, -1.59644*10^-3, -8.18819*10^-4, 1.43667*10^-3, 7.11437*10^-4, 9.06548*10^-5, 3.20771*10^-4, 5.151*10^-4, 7.0562*10^-4, 2.85357*10^-4, 2.53833*10^-4, 3.44038*10^-4, 3.56086*10^-4, 1.83376*10^-4, 1.0309*10^-4, -9.07505*10^-5, 1.42212*10^-4, 2.47962*10^-4, 5.25912*10^-5, -7.44214*10^-5, -1.31304*10^-4, -1.65695*10^-4, 2.45583*10^-5, 2.84575*10^-6, -9.82888*10^-5, -9.99562*10^-5, -7.66841*10^-6, 5.3135*10^-6, -2.61613*10^-5, -9.6016*10^-6, -6.81842*10^-6, 2.773*10^-6, 4.94959*10^-7, 0));
h(8,0) = fi.fir((-1.68655*10^-5, -7.21153*10^-5, 3.78556*10^-4, -7.01652*10^-4, 1.28073*10^-4, -7.43055*10^-4, 1.35568*10^-3, -2.72118*10^-4, 6.69039*10^-4, -2.1171*10^-3, 2.66075*10^-3, -5.26349*10^-3, -8.64246*10^-2, -7.03236*10^-2, -4.05775*10^-2, -2.6085*10^-2, -1.01035*10^-2, -4.39697*10^-2, 1.08086*10^-2, 5.51774*10^-2, 4.17719*10^-2, -1.44567*10^-2, 2.13921*10^-2, 1.07582*10^-1, 3.87707*10^-2, -5.54456*10^-3, 4.99856*10^-2, 4.09783*10^-2, 4.81083*10^-3, 2.73854*10^-2, 3.64387*10^-2, -3.17886*10^-3, -7.72274*10^-3, 1.81197*10^-2, 1.60415*10^-3, -3.71408*10^-3, -7.00634*10^-3, -1.12762*10^-2, 8.33056*10^-3, -2.80427*10^-3, -2.49734*10^-2, -1.02805*10^-2, 2.14717*10^-4, -1.21152*10^-2, -1.56673*10^-2, -6.13615*10^-3, -9.19539*10^-3, -1.1857*10^-2, -4.06259*10^-3, -3.23696*10^-3, -5.01662*10^-3, -8.23842*10^-3, -1.87769*10^-3, 6.66127*10^-4, -7.61051*10^-3, -7.56122*10^-3, -2.77838*10^-3, -2.46885*10^-3, -4.76789*10^-3, -4.42888*10^-3, -6.30871*10^-4, -1.00798*10^-3, -3.20891*10^-3, -2.00773*10^-3, 1.24406*10^-3, 3.91085*10^-3, 3.65062*10^-3, 5.34785*10^-3, 5.4627*10^-3, 2.41144*10^-3, 1.85354*10^-3, 2.87405*10^-3, 2.07133*10^-3, -2.6133*10^-4, 1.0638*10^-3, 9.85821*10^-4, 8.9492*10^-4, 5.35477*10^-4, -6.03783*10^-4, 7.82042*10^-4, -1.20611*10^-4, -2.37535*10^-3, -2.25807*10^-3, -4.0582*10^-4, -1.75915*10^-3, -1.09401*10^-3, 2.2533*10^-3, -1.34825*10^-3, -4.61702*10^-3, -2.35077*10^-3, -2.49663*10^-4, 3.61728*10^-5, -2.13426*10^-3, -2.67142*10^-3, 7.83896*10^-4, 3.16299*10^-3, 1.16068*10^-3, -1.13754*10^-3, -1.30056*10^-3, -9.18475*10^-4, -4.78309*10^-4, -1.38245*10^-4, -4.1388*10^-4, 1.0279*10^-6, 7.26447*10^-5, -2.33207*10^-4, -2.62141*10^-4, -3.42912*10^-4, -5.39206*10^-4, -3.01184*10^-6, 1.44938*10^-4, -1.69249*10^-4, -1.63111*10^-4, -4.75819*10^-5, -3.09052*10^-4, -2.14425*10^-4, -1.965*10^-6, 4.87482*10^-5, -1.1532*10^-4, -9.03683*10^-5, 4.34695*10^-5, 5.61129*10^-5, 3.83196*10^-5, -3.11789*10^-6, -5.52174*10^-6, -2.11033*10^-6, 1.06705*10^-6, 0));
h(9,0) = fi.fir((-1.60757*10^-5, -4.19701*10^-5, 4.10355*10^-4, -3.34547*10^-4, 1.89441*10^-4, -6.56648*10^-4, 1.66465*10^-3, -1.42845*10^-6, 2.34716*10^-4, -1.96452*10^-3, 2.83126*10^-3, -7.45693*10^-3, -7.13278*10^-2, -5.34188*10^-2, -1.62979*10^-2, 3.06538*10^-2, 3.98189*10^-2, -3.05744*10^-3, 4.62241*10^-2, 7.35245*10^-2, 4.46943*10^-2, -8.62466*10^-3, 1.61692*10^-2, 5.76913*10^-2, -1.09835*10^-2, -3.50465*10^-2, -4.10253*10^-3, -1.13266*10^-2, -1.54331*10^-2, -2.41119*10^-2, -1.19454*10^-2, -8.63187*10^-3, -1.87685*10^-2, -2.04983*10^-2, -2.12632*10^-2, 1.69851*10^-3, -1.08342*10^-2, -1.94009*10^-2, -1.0154*10^-2, -3.29724*10^-3, 2.72871*10^-3, 8.452*10^-3, 1.01911*10^-2, 7.93981*10^-3, 6.70798*10^-3, 3.44097*10^-3, 5.98216*10^-3, 6.46392*10^-3, 4.05223*10^-3, 2.11746*10^-3, 4.45085*10^-3, 7.7832*10^-3, 2.10043*10^-3, 1.49633*10^-3, 3.11967*10^-3, -1.21022*10^-3, -1.50013*10^-3, -1.5582*10^-3, -4.58534*10^-4, 5.71158*10^-4, 1.716*10^-3, 4.97296*10^-4, -1.27246*10^-4, -2.44379*10^-5, 1.48653*10^-3, 2.52236*10^-3, 5.19892*10^-4, -1.60011*10^-3, -1.46534*10^-3, -1.63475*10^-3, -4.88274*10^-3, -2.89252*10^-3, 1.36597*10^-3, 7.09958*10^-4, 4.65135*10^-4, 1.73413*10^-3, 1.87164*10^-3, 3.11041*10^-3, 2.31907*10^-3, -1.33571*10^-3, -3.50304*10^-3, -2.86542*10^-3, 3.92849*10^-5, 2.70084*10^-4, -1.55724*10^-3, -1.21433*10^-4, 1.81963*10^-3, 5.82052*10^-4, -1.12463*10^-3, -1.46465*10^-4, -1.7854*10^-3, -1.70461*10^-3, 2.52183*10^-4, 1.10409*10^-3, 2.46217*10^-3, 1.04006*10^-3, 3.89001*10^-5, 5.9752*10^-4, 6.90762*10^-4, -4.07922*10^-4, -4.72497*10^-4, -4.19827*10^-4, -1.08188*10^-3, -3.84054*10^-4, 3.92463*10^-4, 3.73165*10^-4, -6.68194*10^-5, -3.37365*10^-5, 1.48299*10^-4, -2.71348*10^-4, -4.32147*10^-4, -3.82735*10^-4, -1.33249*10^-4, -5.25158*10^-5, -2.82792*10^-4, -2.16745*10^-4, 2.3925*10^-6, 6.81638*10^-5, 3.5723*10^-5, 2.80703*10^-5, 5.59214*10^-5, 3.75609*10^-5, 2.11466*10^-5, 1.44848*10^-5, -1.74216*10^-7, -1.61781*10^-7, 1.20674*10^-6, 0));
h(10,0) = fi.fir((5.48693*10^-6, -3.85305*10^-5, 1.00796*10^-4, 1.39085*10^-4, -1.37982*10^-4, -3.50258*10^-4, 8.31508*10^-4, 9.31576*10^-5, -7.85107*10^-4, 2.95081*10^-4, 2.062*10^-4, 2.23801*10^-4, 1.53611*10^-3, -6.42346*10^-3, -1.46583*10^-3, 1.49275*10^-2, -1.02315*10^-2, -1.78674*10^-2, 1.32495*10^-2, 1.66362*10^-2, -7.3916*10^-3, 3.36605*10^-3, -2.10234*10^-3, -2.51933*10^-2, -3.16892*10^-3, 3.47789*10^-2, 8.64838*10^-3, -3.03502*10^-2, 6.59946*10^-3, 6.83453*10^-3, 1.85503*10^-3, 2.31009*10^-4, 1.851*10^-3, 3.84314*10^-3, -8.55288*10^-3, -6.04199*10^-3, -8.17616*10^-3, 7.42784*10^-3, 4.66712*10^-3, -2.9096*10^-3, -4.66173*10^-3, -4.38658*10^-3, 6.99246*10^-3, 5.94912*10^-3, 1.72897*10^-3, -6.94179*10^-5, -1.07731*10^-3, -8.2497*10^-4, -2.23008*10^-3, -2.54084*10^-3, -2.44285*10^-3, 2.04601*10^-3, 1.71871*10^-3, -2.67377*10^-3, 3.4213*10^-4, 4.96274*10^-3, 5.22673*10^-3, 1.47745*10^-3, -1.42805*10^-3, -3.73734*10^-3, -1.52274*10^-3, 4.65329*10^-4, -1.28761*10^-3, 3.13016*10^-4, 1.4824*10^-3, 1.47564*10^-3, 6.11671*10^-4, 1.66238*10^-3, 3.46059*10^-4, -1.52436*10^-3, 2.84002*10^-4, 3.34641*10^-4, -3.00188*10^-4, -4.15989*10^-4, 1.44934*10^-3, 2.95361*10^-3, -2.12224*10^-4, -1.7465*10^-3, 9.4611*10^-4, 4.72243*10^-4, -2.35131*10^-3, -2.86437*10^-3, -2.994*10^-4, 8.838*10^-4, 4.36437*10^-4, 4.35811*10^-4, 1.05312*10^-3, -1.18062*10^-3, -3.19579*10^-3, -2.66689*10^-4, 1.3291*10^-3, -6.35546*10^-4, -1.93305*10^-3, -1.22074*10^-3, -7.66797*10^-4, 5.48452*10^-4, 2.24032*10^-3, 6.8593*10^-4, -8.80495*10^-4, -7.36785*10^-4, -2.91027*10^-4, 1.43957*10^-4, 9.94203*10^-5, 1.03047*10^-5, 1.64362*10^-4, 4.18213*10^-4, 2.9296*10^-6, -1.1731*10^-4, 2.73018*10^-4, 3.29795*10^-4, -1.42659*10^-4, -8.36778*10^-5, -7.14364*10^-5, -1.26889*10^-4, 1.45918*10^-4, 7.54347*10^-5, 8.94557*10^-5, -3.85597*10^-5, -7.5002*10^-6, 3.05406*10^-5, 4.88743*10^-5, 4.99589*10^-5, 8.18749*10^-7, 7.05084*10^-7, -1.20529*10^-5, 4.32078*10^-6, 1.38227*10^-6, 0));
h(11,0) = fi.fir((-1.12306*10^-5, -1.96564*10^-5, 2.91555*10^-4, -1.96712*10^-4, 1.67915*10^-4, -4.87725*10^-4, 1.39101*10^-3, -1.01342*10^-3, 1.94679*10^-3, -2.84011*10^-3, 3.55895*10^-3, -8.82548*10^-3, -5.04098*10^-2, -4.7074*10^-2, -4.41737*10^-3, 1.19852*10^-2, 2.97061*10^-2, 2.91912*10^-2, 1.07382*10^-2, 6.67629*10^-2, 2.62009*10^-2, 1.01949*10^-2, 2.44384*10^-2, -2.51683*10^-2, -6.41723*10^-3, 3.51383*10^-3, 5.32911*10^-3, -7.63561*10^-3, -5.45861*10^-2, -1.52686*10^-2, 1.96498*10^-2, -4.82022*10^-3, -1.13631*10^-2, -2.01016*10^-2, -6.07352*10^-3, -7.81816*10^-3, -2.29341*10^-3, -4.00815*10^-3, -8.94526*10^-3, 2.81839*10^-3, 4.13023*10^-4, -2.00456*10^-3, -2.75069*10^-4, 5.94332*10^-3, 1.12361*10^-2, 6.95498*10^-3, 3.16854*10^-4, -1.76094*10^-3, 1.94699*10^-3, 9.01863*10^-3, 8.65974*10^-3, 4.68559*10^-3, 6.54081*10^-4, 1.13477*10^-4, 5.15455*10^-4, 1.43156*10^-4, -5.91623*10^-4, 1.28197*10^-3, 7.18359*10^-4, -4.48033*10^-5, -8.32929*10^-4, 1.75998*10^-3, 2.26954*10^-3, -1.73247*10^-3, -2.44249*10^-3, -2.00254*10^-3, -4.81834*10^-4, 7.73294*10^-4, 3.05641*10^-4, -1.48032*10^-3, -2.4714*10^-3, -2.17995*10^-3, 9.53805*10^-4, -3.9275*10^-4, -4.06353*10^-3, -2.14124*10^-3, 8.98599*10^-4, 1.26397*10^-3, -9.51349*10^-4, -1.14574*10^-3, 1.05746*10^-3, 1.11031*10^-3, 1.64742*10^-4, -1.45004*10^-4, 1.02265*10^-3, 6.24043*10^-4, -2.32233*10^-3, -2.56128*10^-3, -4.4989*10^-4, 8.41901*10^-4, 1.99792*10^-3, 9.17054*10^-4, 3.7591*10^-4, 1.9079*10^-3, 9.5647*10^-4, -3.43216*10^-4, 7.27429*10^-4, 9.97294*10^-4, -6.79702*10^-5, -5.18811*10^-4, -1.20154*10^-4, 4.18061*10^-4, 7.45986*10^-4, 1.44139*10^-4, -4.14496*10^-4, -3.02481*10^-4, -1.10646*10^-4, 1.34045*10^-4, -3.44395*10^-4, -4.14666*10^-5, 7.12612*10^-5, -2.22638*10^-4, -4.24445*10^-4, -4.70283*10^-4, -2.51783*10^-5, -1.20038*10^-5, -3.14955*10^-5, -1.07544*10^-4, -6.22888*10^-5, 6.90663*10^-5, 5.05388*10^-5, 1.23535*10^-5, -5.16506*10^-6, 1.60959*10^-5, 1.17165*10^-5, 8.04748*10^-6, 1.16687*10^-6, 0));
h(12,0) = fi.fir((4.05285*10^-6, -2.38744*10^-5, -1.77443*10^-4, 3.64899*10^-4, 9.0163*10^-5, -6.12552*10^-4, -2.24284*10^-4, 8.40711*10^-4, -6.34741*10^-4, 2.48625*10^-4, 1.07833*10^-4, 1.6957*10^-4, 1.09563*10^-2, -3.92742*10^-4, -1.71496*10^-2, 1.21954*10^-2, 2.24529*10^-2, -1.26705*10^-2, -1.96975*10^-2, -1.58055*10^-2, -6.86806*10^-3, 8.19548*10^-3, 4.41556*10^-2, -1.30615*10^-2, -4.51095*10^-2, 1.85312*10^-2, 1.02524*10^-2, 1.52522*10^-2, 5.72338*10^-3, -8.39197*10^-3, -1.05468*10^-2, 5.86129*10^-3, -3.92588*10^-3, -1.51485*10^-3, 1.4772*10^-2, -8.21411*10^-3, -7.2907*10^-3, -1.82432*10^-3, 6.45056*10^-3, -9.35414*10^-4, 2.58005*10^-4, -2.45199*10^-3, -3.64145*10^-3, -2.60672*10^-3, -6.94716*10^-3, 5.61014*10^-3, 5.94723*10^-3, -6.33431*10^-5, 5.17522*10^-4, -9.55261*10^-4, -2.88925*10^-3, 2.29784*10^-3, 1.9625*10^-3, -1.12007*10^-3, 2.32054*10^-3, -3.21321*10^-4, 7.10064*10^-4, 2.38549*10^-3, 1.65568*10^-3, 1.2767*10^-3, 7.15895*10^-4, -9.5073*10^-4, -3.38625*10^-3, 2.8319*10^-3, 9.38082*10^-4, -1.81631*10^-3, 1.4007*10^-3, 2.405*10^-3, 2.30851*10^-3, 1.26208*10^-3, 2.45352*10^-4, -1.2871*10^-3, -8.98868*10^-4, -4.12349*10^-3, -3.59524*10^-3, -2.12276*10^-4, -1.52058*10^-3, -1.87816*10^-3, -1.48109*10^-3, 8.76298*10^-4, 8.41932*10^-4, 2.58177*10^-5, -7.94133*10^-4, -1.68139*10^-3, -2.50352*10^-4, -1.31875*10^-3, -1.29094*10^-3, -5.04936*10^-4, -2.17749*10^-4, 5.02031*10^-4, 1.32314*10^-3, 2.07371*10^-3, 1.73953*10^-3, -7.51968*10^-5, -1.44401*10^-3, -2.08778*10^-4, 1.29779*10^-3, 1.93557*10^-3, 1.54983*10^-3, 6.71795*10^-4, 3.39349*10^-4, 1.02703*10^-3, 8.1182*10^-4, 7.67969*10^-5, 3.25173*10^-5, 2.03142*10^-5, 1.22237*10^-4, 1.46092*10^-4, 4.62645*10^-4, 5.12512*10^-4, 3.5913*10^-4, 1.89527*10^-4, -4.59823*10^-5, -5.5362*10^-5, -2.35945*10^-5, 7.12921*10^-5, -1.31389*10^-4, -1.41562*10^-4, -4.13157*10^-5, -8.46506*10^-6, -3.85191*10^-6, -2.57285*10^-5, -4.38868*10^-7, -7.68317*10^-6, -7.80589*10^-6, -7.41927*10^-6, -7.51808*10^-7, 0));
h(13,0) = fi.fir((-2.52312*10^-6, 4.34537*10^-5, -1.05713*10^-4, 2.79699*10^-4, -5.04787*10^-4, 5.82347*10^-4, -3.29953*10^-4, 5.66156*10^-4, -8.57682*10^-4, 6.11259*10^-4, 6.82175*10^-5, 1.09725*10^-3, 3.73188*10^-3, -4.21391*10^-3, 1.13579*10^-2, -1.30569*10^-2, -9.1074*10^-3, -6.78927*10^-3, -6.68055*10^-3, 3.66919*10^-2, -1.66733*10^-2, -1.02882*10^-2, 2.77414*10^-2, -4.06681*10^-3, 8.72424*10^-3, -1.47427*10^-2, -1.44785*10^-2, 1.68631*10^-2, 7.36302*10^-3, -4.58477*10^-3, -2.63113*10^-2, -3.09207*10^-3, 5.39354*10^-3, 1.00301*10^-2, 7.68544*10^-5, -6.44387*10^-3, 1.12386*10^-2, -8.55274*10^-3, -5.82475*10^-4, 8.34913*10^-3, 4.05293*10^-3, 4.98791*10^-3, 6.04743*10^-3, -1.83014*10^-3, -7.21087*10^-3, 9.06784*10^-4, 5.00621*10^-3, 3.5765*10^-3, 2.25201*10^-3, -5.81225*10^-4, -5.00102*10^-4, 1.77941*10^-3, -2.64084*10^-3, -3.27415*10^-3, -2.46231*10^-4, -4.01066*10^-3, -4.16767*10^-3, -3.15957*10^-3, -2.77183*10^-3, -2.59037*10^-3, -3.48997*10^-3, -4.77056*10^-4, -7.41451*10^-4, 5.80731*10^-4, 3.00284*10^-3, 2.14308*10^-3, 2.39619*10^-3, 2.43812*10^-3, -8.13831*10^-4, 4.27879*10^-5, 2.84355*10^-3, 1.92226*10^-3, 8.02295*10^-4, 3.21723*10^-4, 2.25629*10^-3, 5.24925*10^-4, -2.12052*10^-3, -9.79097*10^-4, -3.56792*10^-4, -2.54*10^-4, -1.2131*10^-3, -1.8585*10^-3, -1.1357*10^-3, 1.05676*10^-4, -1.89814*10^-3, -1.91763*10^-3, -1.61277*10^-4, -2.20327*10^-4, -1.67573*10^-4, -9.49436*10^-4, -8.30762*10^-4, -6.12352*10^-4, 8.56978*10^-4, 4.10223*10^-4, -1.32621*10^-4, 3.77329*10^-4, 8.1509*10^-5, 5.64883*10^-4, 5.07438*10^-4, 1.90946*10^-4, 1.59857*10^-4, 3.77714*10^-4, 6.15073*10^-4, 2.98232*10^-5, 3.44298*10^-4, 6.27893*10^-4, 3.54246*10^-4, 3.35637*10^-4, 5.85691*10^-4, 6.45228*10^-4, 8.04918*10^-5, 9.1395*10^-5, 1.85267*10^-4, 9.84972*10^-5, 1.4199*10^-4, 1.38519*10^-5, -4.78325*10^-5, -2.22436*10^-5, 7.05634*10^-5, 3.07658*10^-5, -2.68242*10^-5, -3.116*10^-5, -2.34972*10^-5, -2.30493*10^-5, -1.63933*10^-5, -7.51228*10^-6, -5.28915*10^-7, 0));
h(14,0) = fi.fir((8.37095*10^-6, 3.0721*10^-5, -2.44107*10^-5, 3.94012*10^-4, -5.40082*10^-4, 1.33299*10^-4, 5.9634*10^-5, 7.03552*10^-4, -1.22706*10^-3, 1.18495*10^-3, -4.80909*10^-5, -1.72325*10^-4, 1.41354*10^-2, -3.45408*10^-3, -6.5491*10^-3, 1.57246*10^-2, -7.19438*10^-3, -2.43991*10^-2, 2.40516*10^-2, -1.01244*10^-2, -1.91082*10^-2, 1.37094*10^-2, -2.92208*10^-2, 1.30168*10^-3, 1.87559*10^-2, 7.11267*10^-3, 2.2163*10^-2, 1.17525*10^-3, -1.9054*10^-2, -5.14333*10^-3, 1.26468*10^-2, 7.36515*10^-3, 1.80637*10^-3, -1.52187*10^-2, -1.60001*10^-2, 1.54244*10^-2, 7.637*10^-3, -1.02748*10^-2, -1.9387*10^-3, 9.76594*10^-3, -3.17124*10^-3, -3.18131*10^-3, 3.94411*10^-3, -7.37466*10^-3, 4.36414*10^-3, 1.1157*10^-2, -4.28256*10^-3, -3.50576*10^-3, -5.45431*10^-4, -8.15364*10^-4, -8.34486*10^-4, -1.37375*10^-3, -1.00727*10^-3, -2.18833*10^-3, 1.02788*10^-3, 2.78239*10^-3, 4.55995*10^-4, -2.30976*10^-4, 1.50399*10^-4, 1.17113*10^-3, 2.5198*10^-3, -4.04712*10^-4, -9.5934*10^-4, 5.07685*10^-4, 1.62886*10^-3, 1.92579*10^-3, -7.85903*10^-4, 1.40689*10^-4, 6.54063*10^-4, -7.25117*10^-5, -6.8371*10^-4, -7.3845*10^-4, -8.48441*10^-4, -1.02811*10^-3, -7.25093*10^-6, -4.93225*10^-4, 8.02543*10^-4, -7.60084*10^-4, -2.27573*10^-3, 1.78293*10^-4, 6.23596*10^-4, -1.1469*10^-3, -1.36395*10^-3, -5.56316*10^-4, -8.31551*10^-5, 1.07274*10^-3, -1.84015*10^-4, -1.11288*10^-3, 6.7549*10^-4, 1.54597*10^-3, -3.86924*10^-4, 1.53309*10^-4, 2.59752*10^-3, 2.1457*10^-3, 1.63467*10^-3, 1.17306*10^-3, -5.74324*10^-4, -8.54434*10^-5, 7.55146*10^-4, 6.21383*10^-4, 3.80628*10^-4, 7.28026*10^-4, 6.17358*10^-4, 6.14408*10^-4, 4.94544*10^-4, 5.91619*10^-4, 5.76861*10^-4, -2.53606*10^-4, -3.81137*10^-4, -4.09514*10^-6, 4.18388*10^-4, 3.71043*10^-4, -1.45164*10^-5, 1.26919*10^-5, -1.35082*10^-4, -4.0048*10^-5, -9.43885*10^-5, -2.00899*10^-6, 2.78184*10^-5, -1.03767*10^-4, -4.04727*10^-5, 3.33905*10^-5, 2.90409*10^-5, -1.68007*10^-5, -1.98714*10^-5, -7.35414*10^-6, 4.46206*10^-7, 0));
h(15,0) = fi.fir((-2.06109*10^-5, -4.35698*10^-5, -3.2355*10^-4, 6.82276*10^-4, -6.63236*10^-4, 1.21235*10^-3, -2.15786*10^-3, 3.23953*10^-3, -2.98131*10^-3, 3.08077*10^-3, -5.77376*10^-3, 9.80213*10^-3, 1.96517*10^-2, -1.65226*10^-2, -3.9235*10^-4, -1.97247*10^-2, 4.06018*10^-3, -1.42523*10^-2, -3.7316*10^-2, 1.40976*10^-2, 3.46439*10^-2, 2.53549*10^-2, 9.43111*10^-3, 2.64389*10^-2, -1.84273*10^-2, -2.71505*10^-2, 2.64857*10^-2, -3.0688*10^-4, -3.37348*10^-2, 1.21804*10^-3, 3.10434*10^-2, -5.88073*10^-3, -1.77826*10^-2, -2.36909*10^-3, -6.51593*10^-3, -4.35367*10^-4, -2.20238*10^-3, -9.13909*10^-3, 1.37708*10^-3, 6.88927*10^-3, -3.55896*10^-3, 1.32128*10^-3, 3.9352*10^-3, -8.71503*10^-3, -7.75237*10^-3, -2.28113*10^-3, -1.37963*10^-3, 1.10392*10^-3, 6.5292*10^-3, 5.31055*10^-3, 2.89419*10^-3, 1.64227*10^-3, 1.27944*10^-3, 3.49222*10^-3, 1.85941*10^-3, -2.36502*10^-3, -2.1144*10^-3, 1.23933*10^-3, -7.41378*10^-4, -1.82733*10^-3, 2.50107*10^-3, 5.2284*10^-3, 3.14139*10^-3, 4.38634*10^-4, -3.07919*10^-4, -7.73588*10^-4, 5.57951*10^-4, -1.42759*10^-3, -2.67889*10^-3, -1.31779*10^-3, -1.87645*10^-3, 1.13353*10^-3, 2.19127*10^-3, 2.86919*10^-4, -8.08308*10^-4, -1.78288*10^-3, -7.5356*10^-4, -3.00667*10^-4, -5.63399*10^-4, 1.01481*10^-3, 4.23161*10^-4, -3.82178*10^-4, -8.22186*10^-4, -3.69031*10^-5, 5.86933*10^-4, -2.56723*10^-4, 6.38658*10^-4, -9.30012*10^-4, -1.18116*10^-3, -1.06654*10^-3, -1.46779*10^-3, 2.40167*10^-3, 2.22258*10^-3, 8.30153*10^-5, 2.04468*10^-3, 2.7205*10^-3, 5.0057*10^-4, -4.01156*10^-4, -1.05844*10^-5, 7.3607*10^-5, 3.10625*10^-4, -2.57437*10^-4, -9.18619*10^-4, -1.65872*10^-5, 4.16715*10^-4, -3.70808*10^-4, -4.20754*10^-4, -3.93613*10^-4, -4.65384*10^-4, -3.3167*10^-4, -3.9344*10^-4, -3.18859*10^-4, -2.52511*10^-4, -3.32442*10^-4, -3.49208*10^-4, -2.11704*10^-4, -1.23195*10^-4, -5.71822*10^-5, -9.16493*10^-5, -6.42769*10^-5, 1.26129*10^-5, 2.81772*10^-5, 2.64155*10^-5, 2.60022*10^-5, 1.28934*10^-5, 1.22111*10^-6, 1.40342*10^-6, 0));
h(16,0) = fi.fir((-2.1262*10^-5, -5.3094*10^-5, -3.34903*10^-4, 7.7166*10^-4, -3.83729*10^-4, 1.24509*10^-3, -2.45907*10^-3, 3.52222*10^-3, -2.64073*10^-3, 3.39722*10^-3, -6.79985*10^-3, 1.10932*10^-2, 2.38201*10^-2, -1.95592*10^-2, -1.76219*10^-2, -2.68616*10^-2, 2.20748*10^-2, 8.5219*10^-3, -3.22351*10^-2, 1.02863*10^-2, 4.22833*10^-2, 2.54816*10^-2, -1.21111*10^-2, 4.91825*10^-3, -2.22522*10^-2, -2.83548*10^-2, 1.00723*10^-2, -3.82544*10^-3, -2.21542*10^-2, -1.57922*10^-2, 3.22688*10^-2, 2.85047*10^-2, -1.04107*10^-2, -6.69666*10^-3, 1.16439*10^-3, 1.32235*10^-2, 9.17371*10^-3, -1.41874*10^-2, -1.37516*10^-2, 5.45521*10^-3, 2.71587*10^-3, -2.18185*10^-3, 3.67744*10^-3, 1.58416*10^-3, 3.34905*10^-3, 9.90862*10^-4, -7.07962*10^-4, -2.21442*10^-4, 8.41515*10^-4, 2.77331*10^-3, 1.05023*10^-3, -6.67396*10^-4, -6.88945*10^-3, -3.02391*10^-3, 2.38925*10^-3, -2.89899*10^-3, -5.39126*10^-3, -3.59992*10^-3, -1.98825*10^-3, -3.88658*10^-4, -1.79447*10^-3, -8.93149*10^-4, 1.50672*10^-3, 3.82579*10^-4, -9.62443*10^-4, 1.40544*10^-3, 5.06806*10^-3, 5.51325*10^-3, 2.19406*10^-3, -1.89788*10^-3, -9.63223*10^-4, -6.30692*10^-5, -4.18394*10^-4, -7.63769*10^-4, -1.06849*10^-3, 3.02304*10^-6, 1.54457*10^-3, 1.3969*10^-3, -8.50277*10^-4, -3.1279*10^-4, 7.86229*10^-4, -4.1789*10^-5, -6.50408*10^-4, -7.50881*10^-4, 1.00488*10^-3, 2.21638*10^-3, 2.05112*10^-3, -3.7485*10^-4, -1.31973*10^-3, -1.49718*10^-4, -1.79301*10^-3, -1.35671*10^-3, -2.47972*10^-4, 7.2873*10^-4, 1.78987*10^-3, 9.07199*10^-4, -8.45641*10^-4, -5.4271*10^-4, 1.18519*10^-3, 6.26361*10^-4, -7.61591*10^-4, -9.37814*10^-4, -6.643*10^-4, 2.55523*10^-4, 2.6838*10^-4, 9.85502*10^-5, 2.26127*10^-4, 1.74103*10^-4, -2.27209*10^-4, -4.12255*10^-4, -4.38894*10^-5, 1.59478*10^-4, 9.04753*10^-5, -1.37956*10^-4, -2.06061*10^-4, -6.71447*10^-5, 3.17384*10^-6, 7.17361*10^-5, -6.12164*10^-5, -6.66239*10^-5, 1.77189*10^-5, 9.23388*10^-6, -9.38071*10^-6, 8.44729*10^-6, 9.58828*10^-6, 1.07446*10^-6, -8.34712*10^-8, 0));
h(17,0) = fi.fir((3.72465*10^-6, 1.28028*10^-5, 7.17746*10^-6, 2.70815*10^-4, -2.79043*10^-4, 5.75673*10^-4, 4.95002*10^-4, -2.47311*10^-4, -5.29721*10^-4, 1.57953*10^-3, 3.95019*10^-4, -1.09278*10^-3, 1.26422*10^-2, -3.46417*10^-3, -3.10649*10^-3, 4.16136*10^-3, -3.01621*10^-2, -1.92268*10^-3, 3.61441*10^-2, -1.75408*10^-2, -2.37126*10^-2, 2.14288*10^-2, 2.62638*10^-3, 2.95677*10^-3, 1.36048*10^-3, -3.74543*10^-3, 1.2572*10^-2, 1.18809*10^-3, -9.64619*10^-3, -3.85501*10^-3, 1.26109*10^-3, -2.34756*10^-3, 1.31105*10^-2, -3.0624*10^-4, -1.48794*10^-2, 3.30539*10^-3, 1.05468*10^-2, 6.53828*10^-3, -2.07787*10^-4, -6.19983*10^-3, -1.00496*10^-2, 8.45193*10^-4, 5.76367*10^-3, -3.8521*10^-3, -3.23524*10^-3, -1.03326*10^-3, -1.3777*10^-3, 2.74367*10^-3, 1.6738*10^-3, 2.58888*10^-3, 4.14681*10^-3, 8.59083*10^-4, -2.2187*10^-4, -1.64567*10^-3, -3.92902*10^-3, -1.22024*10^-3, -1.99714*10^-3, -2.47375*10^-3, -1.82919*10^-3, -4.82877*10^-4, 1.75925*10^-3, 1.85732*10^-3, 1.34079*10^-3, 4.05816*10^-5, 1.04509*10^-3, 1.38174*10^-3, 4.27601*10^-5, 3.61265*10^-3, 2.11924*10^-4, -6.13213*10^-3, -1.8818*10^-3, -8.97747*10^-6, -1.09108*10^-3, 1.48732*10^-4, 2.25575*10^-3, 2.56526*10^-3, 2.3236*10^-3, 2.39427*10^-3, 7.96718*10^-4, 4.56618*10^-4, -1.2976*10^-4, -2.20121*10^-3, -1.15699*10^-3, 2.49326*10^-4, 2.41237*10^-5, 2.48422*10^-3, 1.85746*10^-3, -1.23666*10^-3, -1.5988*10^-3, 1.91076*10^-3, 2.46245*10^-3, 1.73972*10^-4, -5.19623*10^-4, -1.46449*10^-3, -2.04095*10^-4, 1.26756*10^-3, 2.02897*10^-3, 1.16917*10^-3, 3.8421*10^-5, -1.38969*10^-4, 5.16525*10^-4, 3.13914*10^-4, -4.9481*10^-4, 1.09887*10^-4, 2.47627*10^-4, 3.75995*10^-4, -1.49329*10^-4, -1.07876*10^-4, 2.75636*10^-4, 6.78696*10^-5, 1.24213*10^-4, -3.13663*10^-4, -8.42085*10^-5, -4.39827*10^-5, -2.13902*10^-4, -1.91516*10^-5, 7.36453*10^-6, 5.89022*10^-5, -4.70706*10^-5, -9.50844*10^-5, -2.30979*10^-5, 1.46008*10^-5, 3.52399*10^-5, 1.3475*10^-6, -5.45086*10^-6, 2.87072*10^-6, 1.28309*10^-6, 0));
h(18,0) = fi.fir((-1.14319*10^-5, 5.70168*10^-5, -1.86294*10^-4, 3.75048*10^-4, -6.17655*10^-4, 1.15678*10^-3, -5.95664*10^-4, 7.75796*10^-4, -1.52329*10^-3, 4.51648*10^-4, 2.74568*10^-4, 1.5058*10^-3, 4.33909*10^-3, -6.37433*10^-3, 1.93175*10^-2, -2.33488*10^-2, -1.61029*10^-2, -5.94964*10^-3, -3.46477*10^-3, 6.17741*10^-2, -2.54109*10^-2, -2.52123*10^-2, 3.62129*10^-2, 1.6548*10^-2, -1.9233*10^-3, -5.6289*10^-2, -9.46017*10^-3, 3.45977*10^-2, 8.53129*10^-3, 7.03724*10^-3, -1.99204*10^-2, -1.31458*10^-2, 1.21836*10^-2, 1.3695*10^-2, -4.10369*10^-3, -1.40448*10^-2, 3.31961*10^-3, 3.36219*10^-3, 2.46126*10^-3, 7.23776*10^-4, -2.9619*10^-3, 1.88773*10^-3, 3.42066*10^-3, -5.71986*10^-3, -7.57838*10^-3, 2.34829*10^-3, 5.53183*10^-3, -1.10702*10^-3, -6.84048*10^-3, -2.27223*10^-3, 2.24102*10^-3, 2.3747*10^-3, 1.67453*10^-3, 2.54822*10^-3, 2.08672*10^-3, 3.07626*10^-4, 2.56564*10^-3, 1.51166*10^-3, 1.78498*10^-3, 1.09084*10^-3, -1.72928*10^-3, 2.89013*10^-4, 6.69018*10^-5, -8.65997*10^-4, -9.76137*10^-4, -6.06054*10^-4, -8.3187*10^-5, 7.3816*10^-4, 3.01001*10^-4, -4.68146*10^-4, -8.48891*10^-4, -2.8124*10^-3, -1.43001*10^-3, -4.29597*10^-4, 5.98353*10^-4, 2.29359*10^-3, -1.03739*10^-3, -3.74345*10^-3, -1.39739*10^-3, 2.35076*10^-3, 2.70412*10^-3, 1.24236*10^-3, -1.13197*10^-4, -1.67658*10^-5, 1.45937*10^-3, 1.39789*10^-3, -1.20763*10^-3, -2.62294*10^-3, 2.93813*10^-5, 8.94156*10^-4, 7.48604*10^-4, -1.25445*10^-3, -6.72678*10^-4, 2.38975*10^-3, 4.69039*10^-4, -1.42954*10^-3, -7.57965*10^-6, 4.05015*10^-4, -8.1397*10^-4, -1.2871*10^-3, -4.15345*10^-4, 5.16478*10^-4, 7.62918*10^-4, 2.93036*10^-4, -1.45514*10^-4, 3.6058*10^-6, 2.75218*10^-4, 2.49542*10^-4, 3.89903*10^-5, -5.94134*10^-5, 3.74309*10^-5, 1.73661*10^-4, 1.27454*10^-5, -5.60214*10^-5, -3.17417*10^-5, -8.76434*10^-6, 1.98454*10^-4, -2.67218*10^-5, -8.92639*10^-5, -1.76768*10^-5, 3.69637*10^-5, 1.8821*10^-5, -3.24431*10^-5, -1.33867*10^-5, -5.00961*10^-6, 6.13128*10^-6, 1.14214*10^-6, 0));
h(19,0) = fi.fir((1.39912*10^-5, -1.90322*10^-5, -2.36811*10^-4, 3.78*10^-4, 4.67777*10^-4, -5.70294*10^-4, -4.25031*10^-4, 7.53112*10^-4, 2.81149*10^-4, 2.03049*10^-4, 2.80775*10^-4, -3.43985*10^-4, 1.70614*10^-2, -9.79447*10^-4, -3.48084*10^-2, 1.95027*10^-3, 3.28055*10^-2, 1.40525*10^-2, -2.82654*10^-2, -4.04917*10^-2, -1.88454*10^-2, 2.18175*10^-2, 7.49369*10^-2, -6.37302*10^-3, -5.35023*10^-2, 2.67236*10^-3, 1.94414*10^-2, 2.47297*10^-2, -2.90637*10^-3, -1.92195*10^-2, -1.29717*10^-2, 8.10531*10^-3, 9.43887*10^-3, -1.86979*10^-3, -7.54331*10^-4, -1.5552*10^-3, -9.19779*10^-4, -4.45628*10^-3, -8.47557*10^-3, -7.27784*10^-4, 9.35817*10^-3, 7.95084*10^-3, -2.73346*10^-3, -5.47867*10^-3, 1.71457*10^-3, 3.86253*10^-3, 1.45453*10^-3, -3.26547*10^-3, -3.56416*10^-3, -2.11865*10^-3, 9.55961*10^-5, -2.43794*10^-4, -1.17291*10^-4, 3.27819*10^-3, 2.12824*10^-3, -4.00646*10^-3, -2.77951*10^-3, 2.2176*10^-3, 6.09872*10^-3, 4.09957*10^-3, -3.04548*10^-4, -2.03198*10^-3, -6.76045*10^-4, 1.92213*10^-3, 4.3826*10^-4, -6.96391*10^-4, -1.20328*10^-3, -3.92744*10^-3, -2.89725*10^-3, 1.87697*10^-3, 2.03825*10^-3, 1.25158*10^-3, 1.55957*10^-3, -1.25607*10^-3, -1.74287*10^-3, -1.19106*10^-3, -2.47177*10^-3, -8.66478*10^-4, 3.45487*10^-4, -7.25571*10^-4, -9.33224*10^-4, -4.78745*10^-4, 7.49489*10^-4, 9.01459*10^-4, 6.49265*10^-4, 5.41133*10^-5, -8.21348*10^-4, -3.66501*10^-4, 2.84761*10^-4, 4.90146*10^-4, 7.25643*10^-4, 9.95284*10^-4, 1.71413*10^-3, 2.47695*10^-3, 1.36867*10^-3, 1.09923*10^-3, 5.77726*10^-4, 4.88597*10^-4, 1.12136*10^-3, 7.54761*10^-4, 7.28629*10^-5, -3.36252*10^-5, 1.21649*10^-4, 9.13903*10^-5, 3.79578*10^-4, -3.73852*10^-5, -1.72279*10^-4, 3.31291*10^-5, -7.17044*10^-5, -1.01234*10^-4, -2.91422*10^-4, -1.22341*10^-4, -1.16085*10^-4, -1.16408*10^-4, -1.46982*10^-4, -1.03264*10^-4, -7.37692*10^-5, -1.17855*10^-4, -8.54731*10^-5, -2.54989*10^-5, -1.7197*10^-5, -8.6229*10^-6, 4.54045*10^-6, 6.25169*10^-6, 5.97645*10^-7, -4.51728*10^-6, 4.58062*10^-8, 0));
h(20,0) = fi.fir((-1.03784*10^-5, -5.02284*10^-5, -1.00435*10^-4, 1.51413*10^-4, -2.80004*10^-5, 4.88887*10^-4, 1.78065*10^-5, 4.03915*10^-4, -1.44769*10^-3, 1.23547*10^-3, -1.50615*10^-3, 5.34416*10^-3, 2.0862*10^-2, 1.51143*10^-2, 3.38173*10^-3, -1.26652*10^-2, -4.15784*10^-2, -4.67927*10^-2, -8.35795*10^-3, 4.99569*10^-4, 1.07009*10^-2, 2.76724*10^-2, 1.84233*10^-2, 1.92779*10^-2, -3.87754*10^-3, -6.70207*10^-3, 5.83455*10^-4, 3.65507*10^-3, 2.63628*10^-2, 1.0495*10^-2, 2.29415*10^-3, -1.01188*10^-2, -8.92614*10^-3, -1.22827*10^-2, -1.58944*10^-2, 6.5383*10^-3, -2.11074*10^-3, -4.94324*10^-3, -3.61009*10^-3, 4.71535*10^-3, 7.33884*10^-3, 1.68281*10^-3, -5.71269*10^-3, 3.00027*10^-4, 7.65257*10^-4, -4.91451*10^-3, -4.65906*10^-4, 2.42461*10^-3, 2.9572*10^-3, -1.9431*10^-3, -1.63647*10^-3, -1.79836*10^-3, -2.3648*10^-3, -2.98389*10^-4, 3.33124*10^-3, 3.25046*10^-3, -4.19712*10^-4, -8.64468*10^-5, 2.84304*10^-3, 1.90896*10^-3, -4.17858*10^-3, -3.84341*10^-3, 2.91055*10^-4, 1.37382*10^-3, 2.07858*10^-3, 9.38103*10^-4, 8.37476*10^-4, -9.84316*10^-4, -6.3152*10^-4, 1.77419*10^-3, 1.07893*10^-3, 1.97256*10^-3, -6.64651*10^-7, -3.11015*10^-3, -2.31874*10^-3, -5.61436*10^-4, 7.70415*10^-4, 3.03893*10^-4, -5.17777*10^-4, -8.77033*10^-4, 1.59888*10^-4, 1.30389*10^-3, -9.28064*10^-5, -1.58519*10^-3, 3.21652*10^-4, 1.04393*10^-3, -1.11305*10^-4, -7.09914*10^-4, -7.48207*10^-4, 5.01744*10^-4, 6.36688*10^-4, 5.70744*10^-5, -7.9619*10^-5, 4.99474*10^-4, 7.19178*10^-4, 6.02189*10^-4, 8.40974*10^-4, 6.34879*10^-4, -2.20547*10^-4, -3.53242*10^-4, -9.60885*10^-5, 5.87138*10^-4, 4.78541*10^-4, -1.68409*10^-4, 9.81452*10^-6, -1.09868*10^-4, -1.09251*10^-4, -1.09356*10^-4, -4.73355*10^-4, -4.77114*10^-4, -2.07249*10^-4, -5.31454*10^-5, -1.08869*10^-4, 6.57187*10^-5, -7.95313*10^-5, -6.95875*10^-5, -9.13684*10^-5, -1.11332*10^-4, -1.5923*10^-4, -1.10866*10^-4, 3.51642*10^-5, 4.90464*10^-5, -4.82714*10^-8, -2.58574*10^-5, -4.42373*10^-6, -1.49918*10^-6, 4.39693*10^-8, 0));
h(21,0) = fi.fir((-5.23088*10^-6, 3.4461*10^-5, -1.1068*10^-4, -2.00198*10^-5, 1.4403*10^-4, 1.30836*10^-4, -2.4266*10^-4, 7.40873*10^-5, 1.76835*10^-5, -2.12574*10^-4, 1.68404*10^-4, 2.45132*10^-5, -1.90957*10^-3, 4.70066*10^-3, 8.86332*10^-4, -7.47712*10^-3, 1.58755*10^-3, 6.74364*10^-3, -3.56307*10^-3, 2.78912*10^-3, 5.21713*10^-3, -3.0671*10^-2, 1.94353*10^-2, 1.84019*10^-2, -1.64562*10^-2, -9.06296*10^-3, -6.16176*10^-3, 1.99192*10^-2, -6.38263*10^-3, -4.63457*10^-3, 6.72019*10^-3, 1.45007*10^-2, -6.94916*10^-3, -1.32761*10^-2, 9.01156*10^-3, 2.34021*10^-3, -5.64573*10^-3, -2.8605*10^-3, 3.88246*10^-3, -3.93449*10^-3, 8.473*10^-4, 1.31939*10^-4, 4.84425*10^-4, 3.96984*10^-4, -3.97721*10^-3, -3.2389*10^-4, 9.34662*10^-4, -3.02236*10^-4, -7.12602*10^-4, 2.9808*10^-3, 3.24858*10^-3, -1.33477*10^-3, 3.32192*10^-4, 1.35646*10^-3, 3.48514*10^-3, 1.55395*10^-3, -1.2573*10^-3, -1.14311*10^-4, -2.47372*10^-4, -2.08733*10^-3, -8.98965*10^-5, 8.80268*10^-4, -3.04745*10^-3, -3.64205*10^-3, 3.5715*10^-4, 2.57028*10^-3, -4.63351*10^-4, -2.45922*10^-3, -2.65079*10^-3, 2.28953*10^-3, 4.84152*10^-3, 6.62269*10^-4, -2.51479*10^-3, -2.79594*10^-3, 6.15079*10^-4, 2.09709*10^-3, 9.10119*10^-4, 1.04108*10^-3, -2.67192*10^-6, 1.37465*10^-3, 1.3749*10^-3, -7.41713*10^-5, -2.10023*10^-4, -2.80411*10^-4, -6.16784*10^-5, -1.84891*10^-3, -1.21693*10^-3, 3.45615*10^-4, 6.46264*10^-4, 1.44607*10^-4, -6.25426*10^-4, -1.12509*10^-3, -9.06333*10^-4, 1.13763*10^-4, 1.89175*10^-4, 3.56228*10^-4, 5.01086*10^-4, 4.74641*10^-4, 4.31015*10^-4, -2.62271*10^-4, -6.3192*10^-4, 6.57163*10^-5, 6.44643*10^-4, 5.61176*10^-5, -4.73663*10^-4, -3.36155*10^-4, -2.93857*10^-4, 2.9283*10^-5, 4.03428*10^-4, 1.61672*10^-5, -3.38393*10^-4, 5.91271*10^-5, 3.41547*10^-4, 1.38321*10^-4, -9.71308*10^-5, -1.25321*10^-4, 6.77324*10^-6, 4.99707*10^-5, 5.32461*10^-5, -1.23038*10^-6, -4.21833*10^-5, 1.18088*10^-5, 3.79593*10^-5, 1.60144*10^-5, -1.05587*10^-7, -1.37594*10^-6, -4.91333*10^-7, 0));
h(22,0) = fi.fir((1.72019*10^-5, -4.20162*10^-5, -3.73285*10^-4, 1.19794*10^-6, 8.84338*10^-6, 3.94259*10^-4, -1.10994*10^-3, 1.70722*10^-3, -1.86017*10^-3, 3.33416*10^-3, -4.04497*10^-3, 1.00781*10^-2, 3.26266*10^-2, 3.47874*10^-2, -2.30352*10^-2, -4.8092*10^-2, -1.93256*10^-2, -3.34603*10^-2, 3.91203*10^-3, -2.47213*10^-2, -2.09115*10^-2, 1.91181*10^-2, 3.44971*10^-2, 2.3621*10^-2, 2.21261*10^-2, 4.63034*10^-2, -7.8797*10^-3, -1.27315*10^-2, 8.41159*10^-3, 9.0183*10^-3, -9.59986*10^-3, -1.51029*10^-2, 4.57404*10^-3, 2.0424*10^-2, -1.38748*10^-2, -3.21063*10^-2, -8.36109*10^-3, -1.34129*10^-2, -5.46174*10^-3, -5.14502*10^-3, -6.23044*10^-3, -5.07495*10^-3, 1.24876*10^-3, 6.54397*10^-3, 2.79399*10^-3, 5.00401*10^-3, 3.10408*10^-3, 5.03138*10^-3, 6.23583*10^-3, 8.6589*10^-4, 1.65015*10^-3, 7.15822*10^-3, 6.15348*10^-3, -4.29732*10^-4, -8.19291*10^-4, 7.92234*10^-4, 1.15193*10^-3, 5.79959*10^-4, 3.72656*10^-4, 9.64308*10^-4, -1.23704*10^-3, -3.64308*10^-3, -4.15939*10^-3, -7.55412*10^-4, -1.06258*10^-3, -1.00438*10^-3, 6.96704*10^-4, -5.66219*10^-4, -4.05854*10^-4, 7.82348*10^-4, 1.5915*10^-3, 1.48547*10^-3, -1.90097*10^-3, -6.58052*10^-4, 3.92995*10^-3, 3.12323*10^-3, 5.85214*10^-4, -5.26497*10^-4, 8.42545*10^-4, 1.14842*10^-3, -7.65537*10^-4, -2.58392*10^-3, -3.61297*10^-3, -1.33927*10^-3, -2.36279*10^-3, -2.21687*10^-3, 8.02397*10^-4, 4.78125*10^-4, -2.68152*10^-4, 4.99573*10^-4, -1.19114*10^-4, -2.92779*10^-3, -2.09365*10^-3, -1.16137*10^-3, -3.18641*10^-4, -7.45052*10^-5, -1.63301*10^-4, 1.73168*10^-3, 2.36228*10^-3, 8.37104*10^-4, 1.25802*10^-4, 1.02263*10^-3, 1.31849*10^-3, 1.95092*10^-4, -1.36272*10^-4, 8.23148*10^-4, 5.41122*10^-4, 2.17683*10^-4, -1.14459*10^-4, -2.66353*10^-4, 4.14208*10^-4, 4.01458*10^-4, 1.26237*10^-4, -1.5691*10^-4, -2.59228*10^-4, -1.05037*10^-4, -5.98006*10^-5, -2.54885*10^-6, -5.07352*10^-5, -7.89525*10^-5, -2.01223*10^-5, 1.46484*10^-5, 7.37101*10^-6, -2.47572*10^-5, -1.00244*10^-5, 2.11656*10^-6, 8.72722*10^-7, 0));
h(23,0) = fi.fir((-7.141*10^-7, 5.18206*10^-5, -1.11809*10^-4, -1.33329*10^-4, 2.02929*10^-4, 5.3025*10^-4, -9.57729*10^-4, 1.29078*10^-4, 6.35239*10^-4, -6.03345*10^-4, 3.2269*10^-4, -7.59139*10^-4, -2.39529*10^-3, 1.05155*10^-2, 2.48262*10^-3, -2.01477*10^-2, 6.74812*10^-3, 1.4183*10^-2, -9.86006*10^-3, -4.47612*10^-3, 4.77835*10^-3, -1.39955*10^-2, -1.01347*10^-2, 4.03773*10^-2, 6.13711*10^-3, -4.6698*10^-2, 3.62348*10^-3, 2.21418*10^-2, 9.02199*10^-3, -4.95867*10^-3, -1.89367*10^-2, 8.42662*10^-4, 2.06382*10^-2, 1.06083*10^-3, -1.54334*10^-2, 1.93108*10^-3, 7.39659*10^-3, 6.22777*10^-4, -1.25907*10^-3, 2.54407*10^-3, -2.97958*10^-3, 1.36954*10^-3, 7.28973*10^-3, -6.22034*10^-3, -8.64462*10^-3, 7.76734*10^-4, 3.31172*10^-3, 2.28025*10^-5, -4.14967*10^-3, -1.21156*10^-3, 2.40733*10^-3, 2.37984*10^-3, -3.57925*10^-3, -4.26296*10^-3, 1.33644*10^-3, 1.21754*10^-3, -8.29773*10^-5, -1.69948*10^-4, -8.56917*10^-4, -2.39216*10^-4, 3.32763*10^-3, 3.30293*10^-3, -5.45788*10^-4, -5.91758*10^-4, 2.51024*10^-3, 2.25112*10^-3, 5.63093*10^-5, -8.45649*10^-4, 1.06876*10^-4, 1.2564*10^-3, -3.61035*10^-4, -1.08413*10^-3, -9.0364*10^-5, 8.82425*10^-4, 1.53292*10^-3, -1.4521*10^-4, -2.11802*10^-5, -2.58102*10^-3, -2.1193*10^-3, 1.83101*10^-3, 6.01634*10^-4, -6.27552*10^-4, -1.58407*10^-3, -1.90189*10^-3, 5.32943*10^-4, 8.46243*10^-4, -8.66983*10^-4, -9.31954*10^-4, 4.1581*10^-4, -1.18579*10^-4, -1.897*10^-3, -2.93585*10^-4, 1.38449*10^-3, 1.30733*10^-3, 6.72234*10^-4, -2.02613*10^-4, -8.61147*10^-4, 2.99863*10^-4, 7.83748*10^-4, 2.96552*10^-4, -3.00542*10^-4, -2.04823*10^-4, 2.83507*10^-4, 1.20169*10^-4, 2.85806*10^-4, 6.12934*10^-4, 1.9826*10^-4, -3.09929*10^-4, -4.2288*10^-4, -2.34313*10^-5, 2.14669*10^-4, 2.00705*10^-4, 1.46022*10^-4, -1.51845*10^-4, -1.44395*10^-4, 2.03482*10^-6, -1.44194*10^-4, 4.44424*10^-5, -1.66244*10^-6, -8.72555*10^-5, -6.7243*10^-5, -1.72062*10^-5, 2.30759*10^-5, 2.3008*10^-6, 3.91749*10^-6, -5.48001*10^-6, -8.79393*10^-7, 0));
h(24,0) = fi.fir((2.77815*10^-6, -2.82339*10^-5, -4.28012*10^-4, -3.94248*10^-5, 6.21661*10^-5, 6.26207*10^-4, -1.37245*10^-3, 7.29263*10^-4, 3.3558*10^-4, 1.02731*10^-3, -3.19145*10^-3, 1.02197*10^-2, 4.809*10^-2, 2.91373*10^-2, -2.43826*10^-3, -5.9615*10^-2, -5.67235*10^-2, -1.65282*10^-2, -6.01819*10^-2, -2.54417*10^-2, 3.34517*10^-2, 2.56304*10^-2, 1.94273*10^-2, 3.80066*10^-2, 3.68608*10^-2, 1.629*10^-2, 1.62706*10^-2, 1.02472*10^-2, -1.59477*10^-2, -4.65916*10^-3, 1.19731*10^-2, -7.41363*10^-3, -1.07335*10^-2, -7.76615*10^-3, -6.79729*10^-3, -1.092*10^-2, -1.39099*10^-2, -8.69685*10^-3, 1.85862*10^-3, 8.22441*10^-3, -2.37291*10^-3, -5.07741*10^-3, 5.16845*10^-3, 1.52776*10^-3, -2.1516*10^-3, -2.59251*10^-3, 4.13783*10^-5, 4.50443*10^-3, 4.93388*10^-4, -1.12839*10^-3, -1.11949*10^-3, 3.53529*10^-3, 2.69973*10^-3, -2.18946*10^-3, 4.49132*10^-4, 1.87394*10^-3, 1.83667*10^-3, 1.48457*10^-3, 1.14566*10^-3, 1.16275*10^-3, -1.60028*10^-3, -1.50633*10^-3, -1.15475*10^-3, -1.43402*10^-3, -4.124*10^-4, -1.95193*10^-4, -1.42557*10^-3, -1.83186*10^-3, -1.89538*10^-3, -8.34602*10^-4, 1.73039*10^-3, 2.68183*10^-3, 7.27846*10^-4, -4.58976*10^-4, -8.84948*10^-5, -1.25911*10^-3, 8.99127*10^-4, 1.98166*10^-3, -3.2896*10^-4, -1.08943*10^-3, 5.71055*10^-4, 1.84866*10^-3, 5.39723*10^-4, -4.65231*10^-5, 1.82591*10^-3, 1.54042*10^-3, -7.58082*10^-4, -1.95016*10^-3, -5.29275*10^-4, -1.77073*10^-4, -2.50102*10^-3, -1.03668*10^-3, -9.29285*10^-5, -3.76089*10^-4, 1.19519*10^-3, 1.02399*10^-3, -6.47235*10^-4, -9.69106*10^-4, -1.16687*10^-4, 1.20943*10^-3, 1.23146*10^-3, 1.77917*10^-4, -1.02777*10^-4, 7.43441*10^-4, 1.08294*10^-3, 6.01945*10^-5, 1.90676*10^-4, 4.07182*10^-5, -5.33674*10^-4, 5.0066*10^-5, -1.66584*10^-4, -1.34228*10^-5, 8.92561*10^-5, 8.74663*10^-5, -1.0287*10^-5, -2.04054*10^-4, -2.01394*10^-4, -1.70883*10^-4, 7.31299*10^-6, -2.4284*10^-5, -9.50505*10^-5, -6.39302*10^-5, -3.59127*10^-5, -8.14788*10^-6, 2.35614*10^-6, -1.43761*10^-7, 8.80793*10^-7, 0));
h(25,0) = fi.fir((-1.70263*10^-5, -1.28761*10^-4, -3.34792*10^-4, -2.13287*10^-4, 1.05049*10^-4, 3.68725*10^-4, -6.08016*10^-4, 1.40487*10^-3, 4.62468*10^-4, 7.12078*10^-4, -3.51067*10^-3, 1.23121*10^-2, 2.22899*10^-2, 1.64861*10^-3, -9.93043*10^-3, -4.64173*10^-2, -3.31992*10^-2, -1.29798*10^-2, -4.81246*10^-2, 2.41549*10^-2, 8.46089*10^-2, 3.27345*10^-2, 1.561*10^-2, 4.55923*10^-2, 1.26811*10^-2, -3.0081*10^-2, -2.40429*10^-2, -2.08135*10^-2, -3.20108*10^-2, -4.53053*10^-2, -9.67799*10^-3, 1.21792*10^-2, 5.13198*10^-3, 2.67935*10^-4, 1.13855*10^-2, 1.85694*10^-2, 2.94205*10^-3, -1.28371*10^-3, 2.09454*10^-3, 9.4253*10^-3, -1.55259*10^-5, 2.30617*10^-3, 5.7944*10^-3, 3.98422*10^-4, 2.73429*10^-3, -1.1864*10^-4, 3.04515*10^-3, -2.48611*10^-3, -7.53053*10^-3, -1.40849*10^-3, 3.57481*10^-5, -3.72074*10^-3, -2.11718*10^-3, 2.02768*10^-3, 4.74078*10^-4, -5.12379*10^-4, -2.44481*10^-3, -1.26397*10^-4, -1.27928*10^-4, -2.44065*10^-3, -3.84313*10^-4, 2.91301*10^-3, 4.80335*10^-3, 8.61686*10^-4, 1.40539*10^-3, 1.95178*10^-3, -2.78354*10^-4, -2.43704*10^-3, -2.3621*10^-4, 4.23868*10^-3, -5.92458*10^-4, -4.46858*10^-3, -2.84673*10^-3, -7.28816*10^-4, -2.34322*10^-3, -2.21456*10^-3, 2.85524*10^-3, 1.59543*10^-3, -1.62569*10^-3, -6.62465*10^-4, 2.90071*10^-3, 3.14338*10^-3, 2.76293*10^-4, -6.64091*10^-4, 9.55951*10^-4, -2.73964*10^-5, -5.00895*10^-4, -3.50802*10^-4, -9.79809*10^-5, 1.53133*10^-4, -8.41651*10^-4, -1.77624*10^-3, -2.19278*10^-3, 7.32989*10^-4, 2.63843*10^-3, 2.63199*10^-3, -5.95601*10^-4, -1.49484*10^-3, 9.34703*10^-4, 9.48527*10^-4, -9.29703*10^-4, -1.15517*10^-3, -3.89822*10^-4, 2.53754*10^-4, -4.32335*10^-4, -3.39077*10^-4, 5.88923*10^-4, 2.28243*10^-4, -3.53326*10^-4, 4.89925*10^-5, 3.371*10^-4, 3.68061*10^-4, 1.61925*10^-4, 8.79203*10^-5, -1.05008*10^-4, -4.91721*10^-5, -7.67448*10^-5, -6.1289*10^-5, -3.33774*10^-5, -7.06464*10^-5, -1.05671*10^-5, 2.12878*10^-5, -3.25801*10^-6, 1.09688*10^-7, 5.57647*10^-6, 3.1932*10^-6, 9.49831*10^-7, 0));
h(26,0) = fi.fir((2.68192*10^-6, 5.38381*10^-5, -7.47409*10^-5, -1.42843*10^-4, 2.49371*10^-4, 3.19706*10^-4, -5.1771*10^-4, 8.60445*10^-5, 4.35335*10^-4, -1.14515*10^-3, 1.34702*10^-3, -1.77218*10^-3, -2.67511*10^-3, 1.39846*10^-2, 2.71387*10^-3, -2.30019*10^-2, -5.03077*10^-4, 3.97455*10^-3, -4.28855*10^-3, 2.58428*10^-2, 4.40381*10^-3, -3.19437*10^-2, -1.35128*10^-2, 2.68305*10^-2, 1.5686*10^-2, -1.38866*10^-2, -1.27638*10^-2, -7.24165*10^-3, 2.38144*10^-2, 1.23298*10^-2, -1.74139*10^-2, -9.73992*10^-3, 1.06577*10^-2, 3.12486*10^-3, -2.86586*10^-3, -3.96475*10^-3, -1.0624*10^-2, 7.68047*10^-3, 9.14505*10^-3, -4.15635*10^-3, -9.09655*10^-3, -1.01376*10^-3, 3.48552*10^-3, 4.39891*10^-3, 3.14719*10^-3, -5.99736*10^-3, 1.40738*10^-3, 6.07597*10^-3, 7.76718*10^-4, 1.90838*10^-4, -2.23711*10^-4, 1.22064*10^-3, 3.76688*10^-4, -3.94129*10^-4, -3.47579*10^-3, -1.91599*10^-3, 7.70106*10^-5, -1.19369*10^-3, -2.03858*10^-3, -1.32063*10^-3, 2.99716*10^-3, 2.9268*10^-3, 5.62786*10^-4, -1.04869*10^-3, 8.26995*10^-4, 1.88054*10^-3, -4.93161*10^-4, -3.90518*10^-3, -1.51366*10^-3, 3.76388*10^-3, 5.3093*10^-4, -3.00154*10^-3, -2.40843*10^-3, 8.5528*10^-4, 3.85729*10^-4, -2.43098*10^-3, -2.37887*10^-4, 2.89557*10^-3, 2.61856*10^-3, 3.28094*10^-4, 8.79738*10^-4, 7.70035*10^-4, 5.71347*10^-5, 3.76642*10^-4, 1.31691*10^-3, 9.55996*10^-4, 7.21945*10^-4, -4.03372*10^-4, -1.60847*10^-3, -1.03283*10^-3, -7.51801*10^-4, 4.23174*10^-4, 6.27723*10^-4, -6.71705*10^-4, -8.58713*10^-4, 1.62586*10^-3, 1.03657*10^-3, -9.5057*10^-4, -9.10638*10^-4, -1.0125*10^-3, -8.61948*10^-4, -3.62245*10^-5, -2.27309*10^-4, -5.78743*10^-4, -5.47456*10^-4, 6.47828*10^-5, -2.35777*10^-4, -5.59697*10^-4, -3.44701*10^-4, 2.84905*10^-5, 3.02894*10^-4, 1.77081*10^-4, -1.71227*10^-4, -8.80198*10^-5, 6.64343*10^-5, 6.22115*10^-5, 4.16509*10^-5, 9.30948*10^-5, -1.38413*10^-5, -4.98662*10^-5, 3.01538*10^-5, 4.76362*10^-5, 2.37743*10^-5, 1.70699*10^-5, 4.2651*10^-6, 6.51553*10^-8, 4.06252*10^-7, 0));
h(27,0) = fi.fir((8.51986*10^-6, -7.74554*10^-5, -1.57615*10^-4, 2.81386*10^-4, 7.3914*10^-4, 4.23694*10^-4, -2.06734*10^-3, 2.0378*10^-3, -2.29203*10^-3, 2.98479*10^-3, -5.20434*10^-3, 1.27194*10^-2, 1.84747*10^-2, 2.50006*10^-2, -4.69379*10^-2, -6.82872*10^-2, 1.76843*10^-2, -9.09983*10^-3, 2.63662*10^-2, 2.2592*10^-2, 6.3924*10^-3, 3.44057*10^-2, 8.71626*10^-3, -1.09569*10^-2, -2.00701*10^-2, -3.34543*10^-3, 1.22418*10^-2, -7.62197*10^-3, -1.82466*10^-2, -1.58395*10^-4, 8.04866*10^-3, -7.42268*10^-3, -1.70216*10^-2, -1.33348*10^-2, -8.67311*10^-3, 2.38606*10^-3, 1.93621*10^-2, 1.55897*10^-2, 2.11082*10^-3, 5.56127*10^-3, 8.4834*10^-3, 9.72094*10^-3, -3.15093*10^-3, -6.12273*10^-3, 3.13242*10^-3, 3.43884*10^-3, -3.62372*10^-3, -8.52966*10^-3, -1.53152*10^-3, -2.58936*10^-3, -3.48503*10^-3, -5.35488*10^-3, -5.97157*10^-3, 2.31401*10^-3, 2.92822*10^-3, -1.38717*10^-3, -3.00938*10^-3, -1.19474*10^-3, 5.74179*10^-5, -1.84167*10^-4, 1.72416*10^-3, 1.50731*10^-3, 3.8534*10^-3, 5.42097*10^-3, 3.39852*10^-3, 2.69334*10^-3, 1.66145*10^-3, -1.48438*10^-4, -1.11658*10^-3, -1.16978*10^-3, -1.22465*10^-3, -2.61339*10^-3, -5.84997*10^-4, -2.92849*10^-4, -7.56*10^-4, 2.1444*10^-3, 5.62922*10^-5, -3.50869*10^-3, -2.89841*10^-3, 2.28003*10^-4, 1.17529*10^-3, 8.44764*10^-4, 7.15955*10^-4, 1.11741*10^-3, 1.48688*10^-3, 1.15957*10^-3, -1.09252*10^-3, -2.20769*10^-3, -1.13326*10^-3, -2.55332*10^-4, 9.35657*10^-4, -4.01088*10^-4, 3.27901*10^-4, 2.48299*10^-3, 1.93815*10^-3, -7.27717*10^-5, -9.40745*10^-4, -4.50768*10^-4, -8.76083*10^-4, -1.25786*10^-3, -4.3473*10^-4, 1.59333*10^-4, 3.35003*10^-4, 2.85647*10^-5, -6.99542*10^-5, 1.42745*10^-4, -8.06921*10^-5, -2.4979*10^-4, -8.0048*10^-5, -2.53297*10^-4, -1.35398*10^-4, 2.72418*10^-4, 2.00374*10^-4, -2.73761*10^-5, -8.88094*10^-5, 2.73751*10^-5, 2.66986*10^-4, 7.26382*10^-5, -2.03089*10^-5, -2.65182*10^-5, 4.53633*10^-6, -5.46369*10^-7, -3.69577*10^-6, 9.80256*10^-6, -8.48683*10^-6, 4.36517*10^-6, 2.06204*10^-6, 0));
h(28,0) = fi.fir((-2.45111*10^-6, 6.66307*10^-5, -9.32174*10^-5, -1.60407*10^-5, 1.66822*10^-4, 1.24945*10^-4, -2.63228*10^-4, 1.75562*10^-4, 8.99811*10^-6, -4.89232*10^-4, 8.61523*10^-4, -5.50526*10^-4, -2.741*10^-3, 9.06451*10^-3, 1.47161*10^-3, -1.31018*10^-2, -1.50782*10^-3, 4.18876*10^-3, -2.4936*10^-3, 2.00021*10^-2, 6.25602*10^-3, -4.5702*10^-2, 1.71183*10^-2, 1.90398*10^-2, -9.87325*10^-3, 2.86731*10^-3, -9.41389*10^-3, 5.60726*10^-3, -4.25737*10^-4, -1.00331*10^-3, -1.15684*10^-3, 6.25974*10^-3, 1.32022*10^-3, -1.10307*10^-2, -3.32504*10^-3, 4.56292*10^-3, 6.60159*10^-3, 2.73952*10^-3, -4.58215*10^-3, -4.38771*10^-3, 2.02385*10^-3, 3.9643*10^-3, 2.29238*10^-4, 1.8177*10^-4, 5.30734*10^-4, -1.07051*10^-3, -8.05097*10^-4, 3.55014*10^-4, 1.49892*10^-3, -8.3629*10^-4, -2.93281*10^-4, -2.95353*10^-3, -1.9031*10^-3, -1.97557*10^-3, -1.97986*10^-3, -1.57247*10^-4, -4.70026*10^-4, -2.31036*10^-3, -1.80221*10^-3, 2.72356*10^-3, 3.19405*10^-3, 2.66101*10^-3, 2.00488*10^-3, 3.1505*10^-3, 4.52555*10^-3, 1.35169*10^-3, 1.45411*10^-4, 1.97812*10^-3, 7.67253*10^-4, -2.01637*10^-3, -9.7867*10^-4, -4.91883*10^-4, -1.59083*10^-3, -2.78685*10^-3, -2.58031*10^-3, -1.54227*10^-3, -1.91087*10^-3, -9.45088*10^-4, 1.47535*10^-4, 1.87605*10^-3, 9.27866*10^-4, -1.72966*10^-3, 5.17364*10^-4, 8.3453*10^-4, -9.58155*10^-4, -5.64467*10^-4, 2.71591*10^-4, 3.32391*10^-5, -1.28847*10^-3, -9.01326*10^-4, 6.15793*10^-4, 1.35228*10^-3, 1.13838*10^-3, 3.65355*10^-4, 1.94269*10^-4, 6.89543*10^-4, -1.09271*10^-4, -4.3673*10^-4, 7.48744*10^-5, -8.89243*10^-5, -2.21859*10^-4, 1.9163*10^-4, 4.51852*10^-4, 1.65983*10^-4, -2.60014*10^-5, 1.96808*10^-4, 1.71925*10^-4, 1.27255*10^-4, 2.14574*10^-5, 5.18306*10^-5, -2.48485*10^-5, 1.79268*10^-4, 1.23721*10^-4, 2.41166*10^-5, 4.99249*10^-5, -7.10481*10^-6, -1.77564*10^-5, -2.35601*10^-7, 2.56017*10^-5, 6.58063*10^-6, -2.38164*10^-5, -7.21558*10^-6, -4.49342*10^-6, -6.23026*10^-6, -6.40275*10^-6, -1.86267*10^-6, 5.07019*10^-7, 0));
h(29,0) = fi.fir((-2.18142*10^-5, -1.56564*10^-4, -1.84408*10^-4, -1.06294*10^-5, -2.93371*10^-4, 3.27483*10^-4, 8.31128*10^-4, 8.17338*10^-4, -8.56541*10^-4, 1.37029*10^-3, -1.7446*10^-3, 7.09911*10^-3, 1.0756*10^-2, -1.95281*10^-3, 2.98747*10^-3, -9.02319*10^-3, -3.53463*10^-2, -4.7048*10^-2, -7.06658*10^-3, 2.98992*10^-2, 2.58465*10^-2, 4.26235*10^-2, 3.92127*10^-2, 6.48839*10^-3, -1.66423*10^-3, -1.35478*10^-2, -3.41773*10^-2, -1.68554*10^-2, -2.65172*10^-2, -2.17894*10^-2, 8.60355*10^-3, 8.93964*10^-3, 1.05553*10^-2, 4.43326*10^-3, 6.52963*10^-3, 6.90235*10^-3, 4.03661*10^-3, -4.34042*10^-3, -9.32151*10^-4, -1.8332*10^-4, -3.16858*10^-3, 8.43456*10^-3, 5.70878*10^-3, -1.04407*10^-3, -1.60081*10^-3, 2.86157*10^-3, 3.20929*10^-3, 3.54243*10^-3, 1.28158*10^-4, -5.82607*10^-3, -5.60222*10^-3, -2.0779*10^-3, -2.31387*10^-3, -1.7007*10^-3, -4.11024*10^-4, 7.43701*10^-4, 2.33792*10^-3, 7.64665*10^-4, -1.82756*10^-3, -2.63297*10^-4, -4.69645*10^-4, -2.57292*10^-4, 1.17857*10^-3, 7.8053*10^-4, -1.52468*10^-5, 6.70616*10^-4, 3.99552*10^-3, 9.45599*10^-5, -2.58432*10^-3, 1.85273*10^-3, 1.45445*10^-3, 4.15991*10^-5, -1.07001*10^-3, -2.59023*10^-3, -1.47947*10^-3, 9.27011*10^-4, 1.20252*10^-3, -2.71824*10^-4, -2.60324*10^-4, 9.53455*10^-4, 3.26808*10^-5, -2.77959*10^-3, -7.70604*10^-4, -3.01831*10^-4, 3.07557*10^-4, 2.00473*10^-3, 2.5674*10^-3, 1.52675*10^-3, -4.54995*10^-4, -9.2322*10^-4, -2.85195*10^-3, -1.95925*10^-3, -1.97653*10^-4, 2.60997*10^-4, 1.42043*10^-3, 1.42217*10^-3, -1.21333*10^-4, 7.64203*10^-4, 1.7678*10^-3, -2.00928*10^-4, -2.02617*10^-3, -7.54518*10^-4, -4.18504*10^-4, -2.88454*10^-4, 1.79094*10^-4, 1.47907*10^-4, 1.29107*10^-4, -1.89154*10^-4, 8.77618*10^-5, 7.6293*10^-5, 3.11603*10^-5, 2.20948*10^-4, 1.14784*10^-4, 1.15323*10^-4, -9.51111*10^-5, -6.27218*10^-5, -1.20831*10^-4, 7.54961*10^-5, 8.79836*10^-5, -5.42298*10^-5, -4.57112*10^-5, 7.11125*10^-6, 3.00959*10^-5, 5.90208*10^-6, 5.44547*10^-6, -2.11481*10^-6, 1.0928*10^-7, 0));
h(30,0) = fi.fir((-1.18039*10^-5, 6.60603*10^-6, 2.11791*10^-4, -2.46179*10^-4, -3.99461*10^-4, 3.98691*10^-4, 3.27605*10^-4, -1.47688*10^-4, -5.1073*10^-4, 6.04741*10^-4, -1.06129*10^-3, 5.36497*10^-4, -1.29335*10^-2, 1.4727*10^-3, 3.11939*10^-2, 9.90797*10^-3, -2.34014*10^-2, -3.03173*10^-2, 1.02524*10^-2, 5.28166*10^-3, 2.64191*10^-2, 1.36932*10^-2, -4.89987*10^-2, 1.03916*10^-3, 9.32673*10^-3, 1.36454*10^-2, 2.49342*10^-3, -1.18615*10^-2, -2.37959*10^-4, 1.12098*10^-3, 1.03706*10^-2, -1.21944*10^-2, -5.78663*10^-3, 1.43394*10^-2, 7.13828*10^-3, -1.56883*10^-2, -6.44337*10^-3, 8.18587*10^-4, 8.27502*10^-3, 8.45345*10^-3, -4.65704*10^-3, -2.93578*10^-3, -1.74324*10^-3, 3.76534*10^-3, -3.7675*10^-4, -1.03774*10^-3, 9.59046*10^-4, -1.19035*10^-3, 1.93187*10^-3, 4.40682*10^-5, -1.71104*10^-4, 6.04681*10^-4, 2.80423*10^-3, 1.24663*10^-3, -4.93117*10^-3, -1.73866*10^-3, 1.4399*10^-3, 1.9703*10^-3, -1.11116*10^-3, -3.59368*10^-3, -1.98759*10^-3, -2.84615*10^-4, -5.25284*10^-4, -1.02227*10^-3, 1.8252*10^-3, 1.95075*10^-3, -4.33131*10^-4, -5.29127*10^-4, 1.48042*10^-3, 1.35711*10^-3, -7.68065*10^-4, 7.3311*10^-4, 7.05703*10^-4, -4.88378*10^-4, -7.30893*10^-5, 1.09489*10^-3, -9.40939*10^-4, -2.53659*10^-3, 5.94607*10^-4, 1.43457*10^-3, -5.24453*10^-4, -7.68652*10^-4, 1.39346*10^-3, 1.80516*10^-3, 4.37236*10^-6, -2.92426*10^-3, -2.24872*10^-3, 6.11472*10^-4, 2.86831*10^-4, -8.52483*10^-4, -9.67328*10^-4, -9.20395*10^-5, 1.22176*10^-3, 1.72185*10^-3, 7.73201*10^-4, -3.79908*10^-4, -9.09645*10^-4, -3.48091*10^-4, 3.39934*10^-4, 3.52626*10^-4, -1.17002*10^-4, -7.80214*10^-5, 8.07527*10^-5, -1.68338*10^-5, -1.11947*10^-4, -1.87727*10^-4, -7.96625*10^-5, -1.39837*10^-4, 1.93883*10^-4, -6.72879*10^-6, -1.16221*10^-4, 4.81784*10^-5, -6.48567*10^-5, -8.94861*10^-7, -1.19238*10^-5, 1.58936*10^-4, 9.31571*10^-5, -3.46926*10^-5, -7.13169*10^-5, -5.88322*10^-5, 3.59987*10^-5, 3.74989*10^-5, 4.86425*10^-6, -2.06496*10^-6, 6.6844*10^-7, -9.10627*10^-7, -3.55656*10^-7, 0));
h(31,0) = fi.fir((1.01157*10^-6, -4.03825*10^-5, 2.23065*10^-5, -1.47048*10^-4, 3.3447*10^-4, -6.64534*10^-4, 7.55389*10^-5, 7.61332*10^-5, 5.94679*10^-4, 1.81232*10^-4, -1.14539*10^-3, 9.23611*10^-4, 3.06798*10^-5, 2.00059*10^-3, -1.6422*10^-2, 1.40754*10^-2, 1.3812*10^-2, 5.06151*10^-3, -9.81395*10^-3, -4.59517*10^-2, 2.47785*10^-2, 1.60248*10^-2, -2.50778*10^-3, -5.72812*10^-3, -6.52795*10^-3, 2.65575*10^-2, -1.61714*10^-3, -1.19202*10^-2, -7.35669*10^-3, 6.00253*10^-3, 1.02206*10^-3, -9.38958*10^-3, 6.11832*10^-3, 4.89319*10^-3, 1.05405*10^-3, -5.47477*10^-3, -2.0941*10^-3, 6.8213*10^-3, -2.99433*10^-3, -5.42361*10^-3, -5.4999*10^-4, -7.87007*10^-5, -4.61107*10^-3, -4.80775*10^-4, 1.30451*10^-3, 9.18804*10^-4, 1.65884*10^-3, 1.49424*10^-4, 2.0852*10^-3, 9.60428*10^-4, 1.8685*10^-3, 2.76262*10^-3, 6.98747*10^-3, 3.78388*10^-3, -2.27789*10^-3, 9.75207*10^-4, 7.42107*10^-4, -1.23695*10^-3, -3.36984*10^-3, -5.50671*10^-3, -3.03662*10^-3, -6.60673*10^-4, -6.6618*10^-4, -1.03156*10^-3, 1.53153*10^-3, 1.79709*10^-3, 1.46131*10^-3, 1.89629*10^-3, 1.17538*10^-3, -1.03923*10^-4, 1.48803*10^-4, 4.53915*10^-4, -8.26743*10^-4, -3.24762*10^-3, -3.55812*10^-3, -1.36177*10^-3, -4.16915*10^-4, 1.11758*10^-3, 1.39629*10^-3, 1.67645*10^-3, 8.32944*10^-4, -9.69889*10^-4, -9.83742*10^-4, -1.76922*10^-3, -1.13013*10^-3, 2.84445*10^-5, 1.25928*10^-3, -1.13318*10^-5, -1.7108*10^-3, 1.17786*10^-4, 1.89*10^-3, 1.85798*10^-3, 5.69339*10^-4, 1.59872*10^-4, 9.04747*10^-4, 9.86218*10^-4, -6.75161*10^-5, 1.84688*10^-4, 1.5707*10^-3, 8.84292*10^-4, 1.86045*10^-4, 7.65027*10^-5, -1.78949*10^-4, -2.48451*10^-4, -4.8894*10^-4, -4.23574*10^-4, -1.84412*10^-5, 6.94546*10^-5, -5.46457*10^-4, -6.89602*10^-4, -2.08731*10^-4, -2.04718*10^-4, -1.0308*10^-4, 2.61503*10^-5, -5.68727*10^-5, -1.62033*10^-4, -2.11951*10^-4, -4.45035*10^-5, -1.24917*10^-5, -1.96488*10^-5, 1.24482*10^-5, 5.01888*10^-5, 3.12629*10^-5, 7.84319*10^-6, 5.23772*10^-6, 2.50842*10^-6, 1.26382*10^-7, 0));
h(32,0) = fi.fir((-4.48862*10^-6, 6.09362*10^-5, 2.44466*10^-4, -1.75865*10^-4, -4.49274*10^-4, 4.98891*10^-4, 7.51191*10^-4, -3.11959*10^-4, -3.31602*10^-4, 3.64566*10^-4, -2.79713*10^-4, 5.17846*10^-4, -1.51797*10^-2, 1.73991*10^-3, 3.75927*10^-2, 9.66999*10^-3, -3.46531*10^-2, -2.97084*10^-2, 1.47103*10^-2, 3.66681*10^-2, 2.61141*10^-2, -1.88242*10^-2, -5.40977*10^-2, -2.57094*10^-2, 2.98618*10^-2, 3.33516*10^-2, 3.18798*10^-3, -9.88893*10^-3, -1.88993*10^-2, -7.7309*10^-3, 1.38099*10^-2, 2.22203*10^-2, -4.07277*10^-4, -1.55326*10^-2, -3.21032*10^-3, 7.51132*10^-3, -3.6415*10^-3, 1.25525*10^-3, 9.09915*10^-3, 2.06941*10^-3, -5.42482*10^-3, -1.16972*10^-2, 2.8542*10^-4, 9.08149*10^-3, 9.73025*10^-3, -1.85872*10^-3, -7.28406*10^-3, -3.70021*10^-3, -3.08716*10^-3, 4.51093*10^-3, 3.89232*10^-3, -3.14501*10^-3, -4.60254*10^-4, -1.96657*10^-4, -2.54129*10^-3, 9.01699*10^-4, 3.61275*10^-3, 1.42499*10^-3, -2.29887*10^-3, -2.99232*10^-3, -5.83665*10^-4, 5.25939*10^-4, -7.98806*10^-5, -1.70656*10^-3, -6.68441*10^-4, 1.1855*10^-4, -8.67284*10^-4, 5.37148*10^-4, 2.29131*10^-3, 1.72384*10^-3, 1.07515*10^-3, 5.97472*10^-4, -3.05031*10^-4, -8.13872*10^-4, 6.42208*10^-5, 1.7048*10^-3, 1.3547*10^-3, 2.49221*10^-4, -3.3844*10^-4, -1.58616*10^-3, -1.18645*10^-3, 1.46979*10^-4, 6.4464*10^-5, 6.1178*10^-4, -2.0812*10^-3, -2.30834*10^-3, 1.92456*10^-3, 3.2023*10^-3, 9.47805*10^-4, -2.55453*10^-3, -7.71784*10^-4, 4.6127*10^-4, -4.69807*10^-4, 3.90704*10^-4, 1.51091*10^-3, 1.97553*10^-3, 5.6378*10^-4, 1.39927*10^-4, 4.52311*10^-4, 3.41852*10^-4, 2.79169*10^-4, 7.55511*10^-4, 1.22775*10^-3, 4.61068*10^-4, -3.11203*10^-4, 1.86037*10^-4, 3.25624*10^-4, -1.01329*10^-5, 1.12732*10^-5, 5.47188*10^-5, 2.87584*10^-4, 2.58787*10^-4, -4.64091*10^-6, -5.30887*10^-5, -7.25049*10^-6, -6.32482*10^-5, -2.12418*10^-5, 7.75834*10^-5, 3.02156*10^-5, -4.38703*10^-5, -1.2815*10^-5, 5.53353*10^-6, -1.16328*10^-5, -7.25239*10^-6, -2.23419*10^-6, 2.83422*10^-6, -1.89068*10^-7, 0));
h(33,0) = fi.fir((1.26794*10^-5, -3.7578*10^-5, 1.20349*10^-4, -3.25849*10^-4, 2.95949*10^-4, -1.02578*10^-3, 5.33003*10^-4, -5.52184*10^-4, 1.28688*10^-3, -1.80737*10^-4, -2.36882*10^-4, -1.11859*10^-3, -2.74356*10^-3, 4.83803*10^-3, -1.52924*10^-2, 1.87626*10^-2, 1.2748*10^-2, 2.67758*10^-3, -3.84138*10^-4, -4.83742*10^-2, 1.80199*10^-2, 2.44772*10^-2, -2.35437*10^-2, -2.7768*10^-2, 9.72829*10^-3, 5.97894*10^-2, 5.78605*10^-3, -2.70073*10^-2, -1.25824*10^-2, -1.3434*10^-2, 3.5737*10^-3, 9.26215*10^-3, -9.21767*10^-5, 7.54794*10^-3, -6.29108*10^-3, 5.95796*10^-4, 1.3603*10^-2, -2.96929*10^-3, 2.7787*10^-4, -1.54923*10^-3, -4.33275*10^-4, -6.92862*10^-3, -1.0442*10^-2, 3.4046*10^-3, 3.85159*10^-3, 3.92166*10^-3, -2.73524*10^-3, -4.35121*10^-3, 5.08894*10^-3, 4.72401*10^-4, 2.12803*10^-3, 4.74119*10^-3, -2.16002*10^-3, -2.90217*10^-3, -2.47795*10^-3, -1.38943*10^-3, 1.22764*10^-3, 3.29923*10^-3, 2.06871*10^-3, -3.82866*10^-3, -5.14821*10^-3, -3.03617*10^-3, 2.41698*10^-4, 9.7928*10^-4, -2.62236*10^-3, -8.86112*10^-4, 2.75799*10^-3, 2.54593*10^-3, 2.16744*10^-3, 1.09212*10^-3, -5.37946*10^-4, -3.21608*10^-4, 7.89164*10^-4, 3.70871*10^-4, -1.16524*10^-4, -3.63363*10^-4, 2.0359*10^-3, 2.84025*10^-3, 2.40705*10^-3, 6.30052*10^-4, -8.457*10^-4, 5.49988*10^-4, -1.36692*10^-3, -2.63742*10^-3, -2.43838*10^-3, -2.92289*10^-4, 1.09914*10^-3, -2.7603*10^-4, -3.30784*10^-4, 5.08796*10^-4, 9.19875*10^-4, -3.45505*10^-4, -1.59165*10^-3, -8.26149*10^-4, 1.04705*10^-4, -8.57647*10^-4, -2.17092*10^-3, -2.26857*10^-4, 9.96146*10^-4, 3.54697*10^-4, 8.09902*10^-5, 6.6595*10^-4, 2.99469*10^-4, -6.72221*10^-4, -2.96615*10^-4, 1.79193*10^-4, 1.60559*10^-4, 5.49628*10^-5, 1.77574*10^-4, 2.36535*10^-4, 4.61641*10^-4, 1.12188*10^-4, -3.30619*10^-5, 1.61932*10^-4, 1.35399*10^-4, 2.01172*10^-5, -1.58067*10^-4, 3.94347*10^-5, 7.90168*10^-5, 2.52952*10^-5, -1.41828*10^-5, 7.16722*10^-6, 1.40883*10^-5, -1.1707*10^-5, -2.7363*10^-6, -4.80203*10^-6, -5.81624*10^-7, 0));
h(34,0) = fi.fir((8.14951*10^-6, 3.52685*10^-7, 3.19158*10^-5, 1.14879*10^-5, 4.00007*10^-4, -2.71113*10^-4, -7.01769*10^-4, 1.07489*10^-3, 6.41677*10^-4, -9.01272*10^-4, -6.88747*10^-4, 1.7748*10^-3, -6.96466*10^-3, 2.49486*10^-3, -2.98*10^-3, 2.39814*10^-3, 4.0556*10^-2, -7.6565*10^-3, -3.67176*10^-2, -7.14102*10^-3, 2.16451*10^-2, 2.43323*10^-3, -3.38868*10^-2, 9.98825*10^-3, 1.7029*10^-2, -7.64684*10^-3, 1.21183*10^-2, -6.28892*10^-4, -1.68571*10^-2, -1.01902*10^-3, 1.65353*10^-2, 1.86297*10^-2, -1.46474*10^-2, -1.62934*10^-2, -6.38752*10^-3, 9.29137*10^-3, 1.42479*10^-2, -7.99541*10^-3, -4.23944*10^-3, 1.28385*10^-3, -4.18323*10^-3, 9.13826*10^-4, 1.01335*10^-2, 9.28239*10^-4, -2.46241*10^-3, 1.15421*10^-3, 6.00314*10^-4, -1.37786*10^-3, 1.00493*10^-4, 4.1121*10^-3, -1.41283*10^-3, -3.19451*10^-3, -2.61967*10^-3, -2.7896*10^-3, 5.88005*10^-4, 1.00567*10^-3, -5.48478*10^-4, -2.17545*10^-3, -9.33177*10^-4, 1.25557*10^-3, 8.94945*10^-4, 2.7542*10^-3, 3.56714*10^-3, -4.7788*10^-4, -5.12486*10^-3, -1.72815*10^-3, 2.47594*10^-3, 1.44275*10^-4, 1.48588*10^-3, 3.1345*10^-3, -7.56187*10^-4, -2.44176*10^-3, -4.33004*10^-4, 1.63421*10^-3, 4.28056*10^-4, -2.87614*10^-3, -2.42127*10^-3, 4.56407*10^-4, 1.5641*10^-3, 9.49912*10^-4, 1.08999*10^-3, 1.16118*10^-3, 1.46583*10^-4, -2.16163*10^-4, -1.27645*10^-4, -2.33796*10^-3, -8.47197*10^-4, 2.60412*10^-3, 1.65866*10^-3, -1.86258*10^-3, -1.5387*10^-3, 1.94141*10^-3, 1.36244*10^-3, -2.97423*10^-4, 1.67942*10^-4, 9.26958*10^-4, -2.14066*10^-4, -1.16884*10^-4, 6.92021*10^-4, 5.04406*10^-4, -3.35078*10^-4, 6.28932*10^-4, 9.95192*10^-4, 2.33008*10^-4, 1.0493*10^-4, 5.76404*10^-4, 7.4196*10^-4, -2.23633*10^-4, -5.01475*10^-4, 4.83903*10^-4, 5.36297*10^-4, 1.55359*10^-4, 5.6033*10^-5, 2.01717*10^-5, -4.89991*10^-5, 7.32446*10^-5, -1.40287*10^-4, -1.56736*10^-5, 5.99611*10^-5, -1.58143*10^-6, -5.35903*10^-5, -2.33977*10^-5, -4.23318*10^-6, -2.27502*10^-5, 7.261*10^-6, -3.27926*10^-6, -1.24281*10^-6, 0));
h(35,0) = fi.fir((5.40621*10^-6, 1.91853*10^-5, 1.33104*10^-4, -9.32093*10^-4, 1.94297*10^-4, -5.95943*10^-4, 2.59053*10^-3, -2.76788*10^-3, 2.10005*10^-3, -2.83878*10^-3, 6.53665*10^-3, -1.06439*10^-2, -2.64557*10^-2, 2.02633*10^-2, 3.50476*10^-2, 2.93269*10^-2, -4.17492*10^-2, -2.79913*10^-2, 2.17552*10^-2, -9.52426*10^-3, -2.7775*10^-2, -2.88177*10^-2, 4.94517*10^-2, 4.98324*10^-2, -1.54797*10^-2, -1.93369*10^-3, 4.87655*10^-3, -5.16451*10^-3, -1.44908*10^-2, -1.22021*10^-3, -3.46316*10^-3, -1.41067*10^-2, 3.84372*10^-3, 4.87331*10^-4, -1.71877*10^-3, 8.07785*10^-3, -2.49059*10^-3, -1.64291*10^-3, 1.79895*10^-3, -4.80367*10^-3, -3.04848*10^-4, -3.38744*10^-4, 3.16473*10^-3, 2.54488*10^-3, 3.88663*10^-3, 5.0693*10^-3, -1.43747*10^-3, 2.19258*10^-3, 1.72276*10^-3, 1.55049*10^-5, 1.21859*10^-3, -3.66072*10^-4, -3.84556*10^-3, -4.5419*10^-3, -1.4153*10^-3, 2.86103*10^-3, 2.72508*10^-3, 1.1049*10^-4, -8.63202*10^-4, -2.78885*10^-4, 8.0278*10^-4, -1.36552*10^-3, -8.49942*10^-4, -1.425*10^-3, -9.16682*10^-4, 6.46569*10^-4, 6.50717*10^-4, 2.05676*10^-3, 4.11961*10^-4, -6.81564*10^-4, -1.04465*10^-3, 4.06358*10^-4, -5.18251*10^-5, -3.02467*10^-3, -6.25004*10^-4, 6.71543*10^-4, -1.16373*10^-4, -5.34862*10^-4, -3.65446*10^-4, 3.93975*10^-4, 2.2775*10^-5, 1.00113*10^-3, 8.3288*10^-4, 1.15098*10^-4, 3.53773*10^-4, 2.67389*10^-4, -6.30503*10^-4, -6.6567*10^-4, 8.29062*10^-4, 1.23606*10^-3, -8.7084*10^-4, -7.16723*10^-4, 7.45042*10^-4, 5.75747*10^-4, 5.69013*10^-4, -8.98243*10^-4, -5.03005*10^-4, 5.71304*10^-4, -5.31534*10^-5, 3.29446*10^-4, 9.95788*10^-4, 1.60726*10^-4, -5.96185*10^-4, 2.12565*10^-4, 5.79142*10^-4, -2.2867*10^-4, -2.57395*10^-4, 6.56951*10^-5, 1.84131*10^-4, 2.27385*10^-4, -1.03678*10^-4, -2.96208*10^-4, 1.43947*10^-4, 1.30158*10^-4, -1.59219*10^-4, -7.53028*10^-5, -4.23704*10^-5, -4.65941*10^-5, 3.94849*10^-5, 1.10663*10^-5, -5.17859*10^-5, -3.0136*10^-5, 1.87906*10^-6, -8.87482*10^-6, -1.04529*10^-6, -1.1368*10^-7, 4.15975*10^-7, 0));
h(0,1) = fi.fir((1.96889*10^-5, 1.27139*10^-4, -1.60754*10^-4, 7.24458*10^-4, 8.40054*10^-4, 7.82518*10^-4, 6.46817*10^-4, 1.05561*10^-3, 1.07368*10^-3, 5.57527*10^-4, 2.06854*10^-3, 7.39153*10^-4, 4.89414*10^-2, 5.30012*10^-2, 4.66987*10^-2, 6.22112*10^-2, 4.39486*10^-2, 8.13459*10^-2, 4.74243*10^-2, 4.14059*10^-2, 6.97323*10^-2, 5.03806*10^-2, 1.11697*10^-1, 5.44643*10^-2, -2.12956*10^-2, 3.68012*10^-2, 4.24237*10^-2, 7.52294*10^-3, 1.23141*10^-2, 2.16826*10^-2, 1.77306*10^-2, 8.01942*10^-3, -2.93953*10^-3, 2.1074*10^-2, 2.72114*10^-2, 5.65642*10^-3, 1.05391*10^-2, 8.15985*10^-3, 6.06657*10^-3, 7.29384*10^-3, 1.45252*10^-3, 4.98629*10^-3, 1.40384*10^-2, 1.05579*10^-2, -9.20787*10^-4, 4.31154*10^-3, 8.46299*10^-3, 7.157*10^-4, 6.71666*10^-4, 4.64837*10^-3, 1.43566*10^-3, 2.09301*10^-4, 1.39635*10^-3, 2.92299*10^-3, 4.2595*10^-3, 3.9974*10^-3, 4.49754*10^-6, -6.33171*10^-4, 2.78079*10^-3, 3.80208*10^-3, 2.61221*10^-3, 3.38193*10^-3, 6.48151*10^-3, 6.72976*10^-3, 3.88011*10^-3, 2.93818*10^-3, 1.69334*10^-3, 2.81279*10^-3, 3.37264*10^-3, -3.62222*10^-4, 7.2404*10^-4, 1.98287*10^-3, 3.90875*10^-3, 5.30227*10^-3, 3.60327*10^-3, 5.38217*10^-3, 4.63264*10^-3, 2.01999*10^-3, 2.04096*10^-3, 1.44247*10^-3, 2.66924*10^-3, 1.53689*10^-3, -6.87957*10^-4, 2.51564*10^-5, 1.05509*10^-3, 1.75057*10^-3, 2.67456*10^-3, 3.65475*10^-3, 1.93882*10^-3, -8.75197*10^-4, -6.11186*10^-4, -1.7742*10^-5, -1.96204*10^-3, -2.3706*10^-3, -9.94088*10^-5, 3.35121*10^-3, 2.5739*10^-3, -4.73651*10^-4, -4.8385*10^-4, 5.9498*10^-4, 9.45038*10^-4, 1.3272*10^-3, 1.47426*10^-3, 1.84199*10^-3, 1.2236*10^-3, 1.00501*10^-3, 1.62599*10^-3, 1.30975*10^-3, 9.59789*10^-4, 7.79071*10^-4, 7.09245*10^-4, 1.03368*10^-3, 5.0422*10^-4, 4.26597*10^-4, 5.08036*10^-4, 5.02614*10^-4, 3.83524*10^-4, 1.61141*10^-4, 2.02164*10^-4, 1.95057*10^-4, 1.17308*10^-4, 5.59968*10^-5, -1.47262*10^-6, 7.39806*10^-7, 1.69708*10^-5, 7.13748*10^-6, 1.74779*10^-6, 0));
h(1,1) = fi.fir((-2.47098*10^-5, -1.5027*10^-4, 2.75169*10^-4, -8.51532*10^-4, -8.49503*10^-4, -1.07232*10^-3, -4.29699*10^-4, -4.53602*10^-4, -1.01019*10^-3, -7.2128*10^-4, -1.49621*10^-3, -6.73578*10^-4, -7.84899*10^-2, -8.29356*10^-2, -6.4767*10^-2, -7.72965*10^-2, -4.00928*10^-2, -9.77876*10^-2, -5.31961*10^-2, -8.81751*10^-3, -4.26613*10^-2, -4.13938*10^-2, -8.01361*10^-2, -9.29206*10^-4, 5.68951*10^-2, 1.0567*10^-2, 1.42102*10^-2, 2.54229*10^-2, 2.36018*10^-2, 3.30715*10^-2, 2.46582*10^-2, 1.28671*10^-2, 2.3498*10^-2, 3.02699*10^-2, 2.32959*10^-2, 1.86217*10^-2, 2.90731*10^-2, 3.33365*10^-2, 1.7693*10^-2, 1.6965*10^-2, 2.27996*10^-2, 1.60724*10^-2, 1.75694*10^-2, 1.73035*10^-2, 1.98069*10^-2, 1.70273*10^-2, 1.22635*10^-2, 1.16857*10^-2, 1.21522*10^-2, 1.66992*10^-2, 1.88991*10^-2, 1.43637*10^-2, 7.90244*10^-3, 4.68815*10^-3, 5.80003*10^-3, 7.40671*10^-3, 1.09805*10^-2, 1.10121*10^-2, 5.75489*10^-3, 5.13578*10^-3, 3.89261*10^-3, 2.04509*10^-3, 2.32849*10^-3, 3.037*10^-3, 2.27327*10^-3, 3.77902*10^-4, 1.28867*10^-3, 1.64631*10^-3, 5.42053*10^-4, 3.90025*10^-3, 4.45499*10^-3, 1.55717*10^-4, -1.88932*10^-3, -5.97807*10^-4, -9.84567*10^-4, -1.1553*10^-3, 1.7905*10^-3, 6.59942*10^-4, -2.56507*10^-3, -2.47991*10^-3, -1.74382*10^-3, -1.1313*10^-4, 1.16433*10^-3, -6.15973*10^-4, -2.12734*10^-3, -1.44013*10^-3, -7.52906*10^-4, -1.67116*10^-3, -1.61012*10^-3, 2.19727*10^-4, 1.54297*10^-4, -1.30908*10^-3, -1.27163*10^-3, -1.7169*10^-3, -2.05962*10^-3, -1.39564*10^-3, -6.9698*10^-4, -6.5036*10^-4, -7.37778*10^-4, -7.7856*10^-4, -9.6599*10^-4, -1.05724*10^-3, -6.49337*10^-4, -4.21802*10^-4, -4.06934*10^-4, -4.15784*10^-4, -2.38018*10^-5, -1.54768*10^-4, 9.12388*10^-6, 2.39084*10^-4, 2.2708*10^-4, 2.51322*10^-4, 3.68308*10^-4, 3.06277*10^-4, 1.52618*10^-5, 2.67516*10^-5, 1.18887*10^-4, 1.58936*10^-4, 1.65502*10^-4, 3.39827*10^-5, -2.50192*10^-6, 3.71676*10^-5, 7.19018*10^-5, 4.14705*10^-5, 8.50585*10^-6, 3.69732*10^-6, 1.48337*10^-6, 0));
h(2,1) = fi.fir((-1.04262*10^-5, -3.758*10^-5, -5.11234*10^-6, -2.70496*10^-4, 1.47661*10^-4, 2.31146*10^-4, -2.49192*10^-4, -1.0622*10^-3, 7.69566*10^-4, 7.08007*10^-5, -9.5017*10^-4, -2.12469*10^-4, -5.64598*10^-3, -9.76993*10^-4, -1.84861*10^-3, -1.11431*10^-2, -1.41169*10^-2, 2.58155*10^-2, -2.49322*10^-3, -4.33556*10^-2, 1.20598*10^-3, 2.2299*10^-2, 9.2729*10^-3, 2.78365*10^-3, 4.38648*10^-3, -8.63905*10^-3, 5.37327*10^-4, -1.96867*10^-2, 9.235*10^-3, 3.3864*10^-2, -4.93341*10^-3, -1.43689*10^-2, -8.98901*10^-3, 4.03937*10^-3, -1.33631*10^-3, 5.4466*10^-3, 8.84039*10^-3, -7.86783*10^-3, -1.14674*10^-2, -3.8962*10^-3, 1.08066*10^-3, 8.17955*10^-3, 6.69066*10^-3, 3.30976*10^-4, -2.63441*10^-3, -1.2261*10^-3, 1.84975*10^-4, 3.0812*10^-3, 7.96032*10^-3, 7.56406*10^-3, 4.15929*10^-3, -7.85113*10^-4, -2.29878*10^-4, 3.2282*10^-3, 4.25301*10^-3, 2.27417*10^-3, -7.83797*10^-4, -2.20639*10^-3, -1.52893*10^-3, -1.22218*10^-3, -6.80485*10^-4, 7.66541*10^-6, 2.1519*10^-3, 2.35812*10^-3, -1.34083*10^-3, -2.59829*10^-3, -1.64578*10^-3, -2.75033*10^-3, -3.16542*10^-3, -2.38017*10^-3, -1.82603*10^-3, -1.96376*10^-3, -3.06353*10^-3, -1.37004*10^-3, 1.02092*10^-3, 1.74807*10^-3, 1.39904*10^-4, -1.09607*10^-3, 8.27394*10^-4, 1.45085*10^-3, 9.06103*10^-4, 3.86788*10^-4, -2.74177*10^-5, 1.18894*10^-3, -2.16738*10^-4, -4.39841*10^-4, 2.51957*10^-3, 2.97761*10^-3, 1.73031*10^-3, 1.32805*10^-3, 2.0406*10^-3, 8.76507*10^-4, -1.13467*10^-3, -1.02503*10^-3, -3.84737*10^-4, -4.65506*10^-4, -1.52734*10^-3, -1.28149*10^-3, -4.03028*10^-4, -1.03053*10^-3, -1.20272*10^-3, -1.3616*10^-3, -1.67489*10^-3, -1.86384*10^-3, -1.36555*10^-3, -8.28266*10^-4, -1.10553*10^-3, -9.79588*10^-4, -8.55899*10^-4, -9.47718*10^-4, -7.25086*10^-4, -6.65779*10^-4, -4.86784*10^-4, -2.63489*10^-4, 1.91026*10^-5, 5.59009*10^-5, -3.48346*10^-5, -5.18512*10^-5, -7.89041*10^-7, 9.57012*10^-5, 1.22408*10^-4, 9.32295*10^-5, 3.4954*10^-5, 1.98734*10^-5, 1.89778*10^-5, 1.0045*10^-5, 1.8649*10^-6, 0));
h(3,1) = fi.fir((1.50022*10^-5, 2.32588*10^-5, 1.07706*10^-4, -6.42903*10^-5, 5.58749*10^-4, -1.97024*10^-4, 5.69647*10^-4, -5.05773*10^-4, 2.86004*10^-4, 1.27547*10^-4, 6.54334*10^-4, -2.16524*10^-4, -3.73067*10^-3, 3.3821*10^-3, -5.80219*10^-4, 1.31959*10^-2, -7.36802*10^-3, 1.5611*10^-2, 2.92041*10^-2, -4.39889*10^-3, -1.47934*10^-3, -2.15706*10^-2, 2.1176*10^-2, 1.30594*10^-2, -5.75248*10^-2, -6.0285*10^-3, 5.37481*10^-2, -1.44425*10^-3, -3.91217*10^-2, -9.24877*10^-3, 2.43674*10^-2, 1.15422*10^-2, -2.86455*10^-2, -1.31834*10^-2, 1.25606*10^-2, -4.59738*10^-3, -7.3186*10^-3, -1.5759*10^-3, 1.27378*10^-3, 8.42323*10^-3, -4.34699*10^-3, -1.06382*10^-2, 2.22904*10^-3, 1.10775*10^-2, 2.87069*10^-3, -1.39329*10^-3, 6.15266*10^-3, 1.19972*10^-3, -4.37394*10^-3, 2.01686*10^-3, 4.86999*10^-3, 2.07781*10^-3, 1.78551*10^-4, 1.19525*10^-3, 3.85171*10^-5, 2.21504*10^-3, 3.54482*10^-3, 1.11368*10^-3, 4.08736*10^-4, 7.01284*10^-4, -1.6638*10^-3, -3.83124*10^-3, 1.02589*10^-3, 3.90744*10^-3, 1.21048*10^-3, -4.4511*10^-4, -5.0954*10^-4, -1.10707*10^-3, -2.33558*10^-3, -2.93582*10^-3, -1.81733*10^-3, -1.37873*10^-3, -1.03864*10^-3, -5.9075*10^-4, -1.90491*10^-3, -2.29879*10^-3, -1.00318*10^-3, -1.29805*10^-3, -1.24602*10^-3, -1.10995*10^-3, -1.13996*10^-3, -2.86675*10^-3, -2.73074*10^-3, -1.6274*10^-4, 1.09229*10^-3, 1.50447*10^-3, 2.32615*10^-3, 4.06262*10^-3, 1.98173*10^-3, -1.70804*10^-3, -1.377*10^-3, 1.67907*10^-3, 6.59975*10^-4, -2.28615*10^-3, -1.45302*10^-3, 2.75175*10^-3, 3.73392*10^-3, -4.09495*10^-4, -2.77688*10^-3, -1.30731*10^-3, -5.98906*10^-4, -7.39556*10^-4, -9.1664*10^-4, -6.40613*10^-4, -2.31076*10^-4, -8.29505*10^-4, -8.1294*10^-4, -6.43591*10^-4, -8.06327*10^-4, -7.023*10^-4, -5.28145*10^-4, 1.15798*10^-4, 5.66913*10^-5, -2.80439*10^-4, -2.93776*10^-4, -7.43292*10^-5, 1.16979*10^-4, 3.24905*10^-5, 4.2207*10^-5, 9.86781*10^-5, 1.19185*10^-4, 5.53096*10^-5, 5.56606*10^-6, 8.76003*10^-6, 5.14829*10^-6, 3.31876*10^-6, 1.41881*10^-6, 0));
h(4,1) = fi.fir((-1.28837*10^-5, -2.2571*10^-6, -2.04336*10^-4, 2.89394*10^-4, -4.36107*10^-4, 6.24781*10^-4, -1.14682*10^-3, 1.49292*10^-3, -3.32498*10^-4, -6.40174*10^-5, -6.58512*10^-4, 1.08131*10^-3, 6.14859*10^-3, -5.05303*10^-3, 1.07937*10^-3, -2.58357*10^-2, 1.25871*10^-2, -1.94256*10^-2, -4.44767*10^-2, 1.82515*10^-2, 9.20931*10^-3, 3.15938*10^-2, -6.57556*10^-3, 4.78233*10^-3, 4.80442*10^-2, 3.87811*10^-3, -1.73968*10^-2, -6.6563*10^-3, 9.46403*10^-3, 2.72256*10^-2, 8.70882*10^-4, -2.68658*10^-2, -2.20283*10^-3, 1.70789*10^-2, 5.82195*10^-3, -8.75734*10^-3, -8.55455*10^-3, -7.84948*10^-4, -2.16257*10^-3, -1.07364*10^-2, -6.62343*10^-3, -1.64357*10^-3, 6.85873*10^-3, 3.47187*10^-3, -4.75943*10^-3, -7.34871*10^-3, -4.17985*10^-3, 9.96385*10^-4, 1.68163*10^-3, -4.09446*10^-3, -4.8163*10^-3, 1.88691*10^-3, -4.69171*10^-4, 1.07755*10^-3, 2.62109*10^-3, 2.26215*10^-3, 2.44952*10^-3, -1.30377*10^-3, -3.75098*10^-3, -4.28571*10^-3, -5.1085*10^-4, 2.00028*10^-3, -1.22741*10^-3, 4.00218*10^-4, 9.80719*10^-4, -1.75864*10^-4, 1.75755*10^-4, 9.29631*10^-4, -1.62845*10^-4, 2.34556*10^-4, 3.21454*10^-3, 1.71149*10^-3, -2.60035*10^-4, -1.96968*10^-4, 3.34401*10^-4, -7.62874*10^-4, -9.81886*10^-4, 4.16359*10^-4, -4.26477*10^-4, 1.09789*10^-3, 1.54485*10^-3, 7.30135*10^-4, 1.21663*10^-3, -3.94495*10^-4, 1.2959*10^-4, 1.03707*10^-4, -9.91956*10^-4, -3.0826*10^-4, -8.45419*10^-4, 4.44119*10^-5, 1.00478*10^-3, 1.18167*10^-3, 6.50443*10^-4, -1.2369*10^-3, -1.24727*10^-3, -1.81872*10^-4, 3.26622*10^-4, 4.47982*10^-4, 5.50446*10^-4, -5.50101*10^-5, 1.1103*10^-4, 1.36011*10^-4, -1.81368*10^-4, 2.28636*10^-4, 2.99965*10^-5, -3.51923*10^-4, -3.3669*10^-4, -6.18528*10^-5, 1.54268*10^-4, 4.63668*10^-5, -7.42483*10^-5, -4.85157*10^-5, -8.10968*10^-5, -4.24054*10^-5, -3.68663*10^-5, -5.55517*10^-5, -8.65485*10^-5, -2.59414*10^-5, 2.23151*10^-5, -3.59181*10^-5, -6.33178*10^-5, -4.06072*10^-5, 8.17412*10^-6, 6.14464*10^-6, -3.26217*10^-6, -3.52551*10^-6, -4.87449*10^-7, 0));
h(5,1) = fi.fir((-1.24137*10^-5, -3.47005*10^-5, -2.05885*10^-4, 1.48373*10^-4, -6.74882*10^-4, -7.85914*10^-4, -5.57107*10^-4, 8.44402*10^-4, -1.92172*10^-3, -4.63656*10^-4, 4.82542*10^-4, -3.39503*10^-4, 1.11489*10^-2, 1.39284*10^-3, -3.28332*10^-3, 1.5908*10^-2, 1.68941*10^-2, -3.51254*10^-2, -8.21635*10^-4, 3.68006*10^-2, -7.9993*10^-3, -2.63323*10^-2, -1.61706*10^-2, 2.06245*10^-3, 3.41205*10^-3, 2.43489*10^-3, -2.87375*10^-3, 1.57848*10^-2, -1.0152*10^-3, -1.10397*10^-2, -8.01492*10^-3, -2.2649*10^-3, 1.35094*10^-2, -7.53143*10^-3, -4.96896*10^-3, 5.08388*10^-3, -2.06598*10^-3, -2.20457*10^-4, -3.20157*10^-4, -3.80796*10^-3, -2.63921*10^-3, -2.41141*10^-3, -3.07881*10^-3, 1.14676*10^-3, 7.22064*10^-3, -1.18978*10^-3, -2.66146*10^-3, 1.48231*10^-4, 5.31922*10^-4, -1.93302*10^-3, -1.77042*10^-3, 1.86255*10^-3, 1.40911*10^-3, 1.55444*10^-3, -1.58308*10^-3, -1.56606*10^-3, 3.45985*10^-3, 3.40823*10^-3, 1.78537*10^-3, 5.75071*10^-4, 1.3802*10^-3, 1.32278*10^-3, -1.15249*10^-3, 5.03369*10^-4, 3.3735*10^-4, -5.63033*10^-5, 1.06162*10^-3, -5.44179*10^-4, 7.3547*10^-5, 3.65462*10^-3, 2.67881*10^-3, 6.37521*10^-4, 7.69439*10^-4, -3.47477*10^-4, -1.91797*10^-3, -1.7979*10^-3, 7.51019*10^-5, -1.76065*10^-5, -1.39395*10^-3, 2.275*10^-4, 9.19819*10^-4, 2.07868*10^-3, 2.80241*10^-3, -5.83562*10^-4, -2.58332*10^-3, -2.39031*10^-3, -3.1734*10^-3, -2.73144*10^-3, -1.31188*10^-3, -5.83876*10^-4, -9.65501*10^-4, -7.85101*10^-4, 2.76682*10^-4, -6.82499*10^-4, -1.49796*10^-3, -3.28942*10^-3, -3.08618*10^-3, -1.06711*10^-3, -1.19415*10^-3, -1.22034*10^-3, -6.1493*10^-4, -5.42423*10^-4, -5.71456*10^-4, -1.21467*10^-3, -9.64846*10^-4, -7.1455*10^-4, -9.23679*10^-4, -2.72771*10^-4, -3.95822*10^-4, -3.19031*10^-4, 4.16914*10^-5, -2.42675*10^-4, -2.58434*10^-5, -3.62927*10^-5, -6.50093*10^-5, -7.65374*10^-5, -1.5924*10^-4, 4.49009*10^-5, 1.26739*10^-5, -2.91374*10^-5, 1.32206*10^-5, 7.22764*10^-6, 2.05057*10^-5, 3.47604*10^-8, -1.32724*10^-5, -5.71049*10^-6, 7.21156*10^-7, 0));
h(6,1) = fi.fir((-4.94134*10^-6, -2.03832*10^-5, 1.5575*10^-4, -5.70227*10^-5, -2.26502*10^-4, -1.75224*10^-4, 2.01359*10^-4, 2.31249*10^-4, -6.155*10^-5, -2.72913*10^-4, 3.58363*10^-4, -2.11776*10^-3, -4.22768*10^-2, -4.44816*10^-2, -1.93023*10^-2, -2.74978*10^-2, 5.26948*10^-3, -1.55901*10^-2, -1.26207*10^-2, 4.52021*10^-2, 3.7277*10^-3, 6.97526*10^-3, 3.4926*10^-2, 3.20497*10^-4, 2.01536*10^-2, 4.16384*10^-2, 9.92074*10^-3, 1.52545*10^-2, 1.63858*10^-2, 9.39652*10^-3, 1.39764*10^-2, -6.03544*10^-4, 2.95888*10^-3, 1.07584*10^-2, 4.11948*10^-3, -4.57394*10^-3, -5.18584*10^-5, 8.67053*10^-3, -8.19709*10^-4, -2.71496*10^-3, 1.57178*10^-3, -6.04226*10^-3, -7.573*10^-3, -4.97027*10^-3, -7.72571*10^-3, -5.40122*10^-3, -6.65008*10^-4, -5.13181*10^-3, -8.61829*10^-3, -6.1875*10^-3, -5.86852*10^-3, -6.90397*10^-3, -1.97319*10^-3, -1.10637*10^-3, -4.40538*10^-3, -5.0915*10^-3, -4.60066*10^-3, -3.75105*10^-3, -2.02713*10^-3, 6.34135*10^-4, 1.52519*10^-3, 2.16723*10^-4, -1.90415*10^-3, -6.41773*10^-4, 2.93369*10^-3, 3.06934*10^-3, 1.61143*10^-3, 1.11467*10^-5, -2.91699*10^-3, -1.18198*10^-3, 1.59566*10^-3, 8.02869*10^-5, -1.45224*10^-4, -6.72323*10^-4, -3.35524*10^-3, -1.299*10^-3, 3.48142*10^-4, -3.64334*10^-4, -1.40716*10^-3, -1.33269*10^-3, 9.54181*10^-4, 9.4944*10^-5, -4.90638*10^-4, 7.64064*10^-4, 5.15169*10^-4, 7.1971*10^-5, -8.4653*10^-4, -1.24543*10^-3, -3.70598*10^-4, -3.16498*10^-4, 1.01923*10^-3, 4.93628*10^-4, -1.99826*10^-4, 6.54404*10^-4, 1.59738*10^-4, -1.38876*10^-4, -9.65849*10^-4, -1.78013*10^-4, 1.5065*10^-3, 1.03462*10^-3, 1.02185*10^-4, 1.1025*10^-6, 4.21365*10^-5, -7.97753*10^-5, -3.24792*10^-5, 4.138*10^-4, 6.18073*10^-4, 5.01459*10^-4, 1.29941*10^-4, 1.6541*10^-4, 2.58758*10^-4, 2.1505*10^-5, -1.01844*10^-4, -1.3697*10^-4, -1.05237*10^-4, -5.84711*10^-5, -3.22237*10^-5, -1.69802*10^-5, -1.41509*10^-5, -3.28963*10^-6, -6.86851*10^-5, -5.10851*10^-5, -1.1654*10^-5, -8.49295*10^-6, -7.91252*10^-6, -5.39788*10^-6, 6.59979*10^-8, 0));
h(7,1) = fi.fir((5.35095*10^-6, 2.00819*10^-5, 5.19844*10^-6, -7.49829*10^-5, 1.29621*10^-4, -1.15039*10^-4, -6.50134*10^-5, 3.0013*10^-4, 2.5865*10^-4, -6.40087*10^-4, 5.0859*10^-4, 3.59551*10^-4, -3.63038*10^-4, -1.45427*10^-3, 4.7379*10^-4, 2.51299*10^-4, -3.96484*10^-3, 2.63627*10^-4, -8.43745*10^-3, 1.06017*10^-2, 1.69305*10^-2, -1.39511*10^-2, -1.44406*10^-2, 2.84124*10^-2, -9.65604*10^-3, -2.92933*10^-2, 3.6199*10^-2, -7.86339*10^-3, -9.22201*10^-3, 6.88345*10^-3, -1.165*10^-2, -6.39689*10^-3, 1.92933*10^-2, 1.91555*10^-2, -2.706*10^-2, 9.63596*10^-3, 1.77702*10^-2, -1.58301*10^-2, 1.1423*10^-3, 9.42445*10^-3, -1.5727*10^-3, -6.58114*10^-3, -3.85272*10^-4, -3.49277*10^-3, -4.28385*10^-3, 6.45499*10^-3, -2.64027*10^-3, -5.6145*10^-3, -2.88651*10^-3, -3.92757*10^-3, -5.57668*10^-3, -8.64361*10^-4, 5.74359*10^-3, -1.64622*10^-3, -1.13243*10^-3, -2.56907*10^-5, 7.75016*10^-4, 4.28737*10^-4, -8.0034*10^-4, 3.94994*10^-3, 2.92619*10^-3, 4.54632*10^-4, 1.29704*10^-3, 1.50553*10^-3, 2.81043*10^-3, 8.97913*10^-4, -5.88187*10^-4, 7.43556*10^-4, 2.4844*10^-3, 1.3638*10^-3, -1.86575*10^-3, -2.4288*10^-4, 2.03837*10^-3, 1.71093*10^-3, -2.18125*10^-3, -2.84821*10^-3, 1.03257*10^-4, -1.72719*10^-4, -5.61862*10^-4, -1.77178*10^-3, -2.57691*10^-3, -1.07323*10^-3, -3.158*10^-4, 5.08309*10^-4, -3.59207*10^-4, -1.61329*10^-3, -9.08412*10^-4, -1.17327*10^-3, -2.0847*10^-4, 5.59696*10^-4, -1.71772*10^-4, 1.92954*10^-4, 1.25953*10^-3, 1.1231*10^-3, -2.0233*10^-4, -1.22724*10^-3, -1.68486*10^-4, 1.22649*10^-3, 9.2775*10^-4, 9.54727*10^-4, 1.00476*10^-3, 1.19575*10^-3, 6.38058*10^-4, -1.98384*10^-4, 3.62151*10^-4, 5.23747*10^-4, 2.33961*10^-4, -1.93746*10^-4, 1.0191*10^-5, 3.40968*10^-4, 9.64443*10^-5, -3.49096*10^-4, -2.5527*10^-4, -8.33186*10^-5, -1.33871*10^-5, -2.28995*10^-5, -9.74875*10^-5, -1.36371*10^-4, -1.6574*10^-4, -1.1763*10^-4, -5.28142*10^-5, -1.94034*10^-6, -4.96364*10^-6, -1.68386*10^-5, -7.7027*10^-6, 3.30668*10^-6, 1.57539*10^-7, 0));
h(8,1) = fi.fir((-1.32874*10^-5, -6.44951*10^-5, 3.14378*10^-4, -4.0926*10^-4, -1.25892*10^-4, -6.34386*10^-4, 4.74467*10^-4, 1.04719*10^-3, -1.10016*10^-4, -9.76536*10^-4, -9.4869*10^-5, -1.38136*10^-3, -7.44374*10^-2, -7.68453*10^-2, -4.83192*10^-2, -2.87878*10^-2, 1.08471*10^-2, -4.59645*10^-2, -1.53902*10^-2, 5.40471*10^-2, 4.90934*10^-2, 4.67726*10^-4, -9.30466*10^-4, 7.54126*10^-2, 6.34564*10^-2, 2.87948*10^-2, 4.21412*10^-2, 2.46212*10^-2, 5.61861*10^-3, 3.29321*10^-2, 4.143*10^-2, 9.4423*10^-3, -9.53651*10^-3, 7.1496*10^-3, 4.36247*10^-3, -6.09081*10^-3, 1.4331*10^-3, -4.89087*10^-3, -9.05307*10^-3, -2.63838*10^-3, -8.08286*10^-3, -2.24651*10^-2, -1.05223*10^-2, -2.14593*10^-3, -1.4119*10^-2, -1.30982*10^-2, -6.31691*10^-3, -9.37013*10^-3, -1.03953*10^-2, -3.33511*10^-3, -2.92244*10^-3, -9.20974*10^-3, -4.32975*10^-3, -2.65571*10^-3, -6.26758*10^-3, -4.59766*10^-3, -2.35631*10^-3, -3.48053*10^-3, -4.89879*10^-3, -1.65106*10^-3, -4.49678*10^-4, -1.67732*10^-3, -3.27984*10^-3, -2.45323*10^-3, -9.06947*10^-4, 2.22449*10^-3, 6.56153*10^-3, 6.37634*10^-3, 3.79148*10^-3, 4.72803*10^-3, 4.46647*10^-3, 2.50567*10^-3, 1.30425*10^-3, -2.74135*10^-4, -9.08465*10^-4, -7.12925*10^-4, 1.05*10^-3, 1.86927*10^-3, -2.08903*10^-4, 1.29173*10^-4, 6.41628*10^-4, -3.80057*10^-4, -1.12458*10^-3, -2.37411*10^-3, -1.52554*10^-3, -9.76026*10^-4, -3.10688*10^-4, 9.91772*10^-5, -1.84137*10^-3, -3.16413*10^-3, -1.87875*10^-3, 2.75005*10^-4, -8.87071*10^-4, -2.89758*10^-3, -1.33293*10^-3, 2.02051*10^-3, 2.2768*10^-3, -2.86928*10^-4, -1.55106*10^-3, -1.00915*10^-3, -1.52135*10^-4, 3.3373*10^-5, -2.3814*10^-4, 1.25112*10^-5, 1.09994*10^-4, -4.83405*10^-4, -7.05638*10^-4, -1.58107*10^-4, -9.45697*10^-5, -1.01428*10^-4, -5.72348*10^-5, -3.46081*10^-5, -1.18083*10^-4, -1.95522*10^-4, -2.27988*10^-4, -1.80181*10^-4, -1.06835*10^-4, -4.27783*10^-5, -6.29344*10^-5, -4.93226*10^-5, 2.95878*10^-5, 5.78253*10^-6, -6.19357*10^-7, 1.08966*10^-5, 1.07578*10^-6, -9.86646*10^-7, 1.03369*10^-6, 0));
h(9,1) = fi.fir((1.89155*10^-5, 2.95993*10^-5, -3.15406*10^-4, 7.65605*10^-5, 6.27826*10^-5, 5.32984*10^-4, -9.56498*10^-4, -9.20231*10^-4, 2.08207*10^-5, 1.26033*10^-3, -5.44776*10^-4, 5.12142*10^-3, 6.08886*10^-2, 6.03767*10^-2, 2.75179*10^-2, -2.7306*10^-2, -5.55369*10^-2, -1.95357*10^-3, -2.2666*10^-2, -6.61857*10^-2, -6.39153*10^-2, -6.85298*10^-3, 9.12445*10^-3, -2.57435*10^-2, -2.79132*10^-2, 7.34391*10^-3, 2.42892*10^-2, 1.34953*10^-2, 2.09338*10^-2, 2.37538*10^-2, 2.86742*10^-3, -1.72568*10^-3, 2.57452*10^-2, 2.77789*10^-2, 1.97598*10^-2, 6.38856*10^-3, 3.11321*10^-3, 1.34784*10^-2, 1.89657*10^-2, 2.89754*10^-3, -7.89563*10^-3, 2.89646*10^-3, -3.62881*10^-3, -1.62506*10^-2, -9.76483*10^-3, -4.98942*10^-3, -3.17079*10^-3, -4.25409*10^-3, -8.17591*10^-3, -4.43077*10^-3, -4.5752*10^-3, -6.63702*10^-3, -4.71875*10^-3, 7.84338*10^-4, 1.99607*10^-3, 5.14009*10^-4, -2.8681*10^-3, -3.58773*10^-3, 1.93199*10^-3, 2.63347*10^-3, -2.04118*10^-3, -2.91838*10^-3, -3.9613*10^-4, 1.2512*10^-3, 1.0393*10^-3, -1.89639*10^-4, -8.28256*10^-4, 8.31506*10^-4, 1.59933*10^-3, 1.19016*10^-3, 1.65305*10^-3, 2.22115*10^-3, 1.54955*10^-3, -1.21165*10^-4, -6.7648*10^-4, -1.43391*10^-3, -2.69454*10^-3, -2.6293*10^-3, -2.55959*10^-4, 8.54822*10^-4, 1.2425*10^-3, 2.70886*10^-3, 2.73936*10^-3, -2.15316*10^-5, 7.82466*10^-5, 8.16548*10^-4, -6.64108*10^-4, -9.37912*10^-4, -7.63589*10^-4, -7.52537*10^-4, 2.7312*10^-4, 2.83557*10^-3, 1.2796*10^-3, -2.09591*10^-3, -1.74195*10^-3, -6.81458*10^-4, -7.55823*10^-4, -1.04411*10^-3, -3.70958*10^-4, -7.35482*10^-5, -8.31871*10^-5, 2.83063*10^-4, 3.42585*10^-6, 3.99315*10^-4, 4.68411*10^-4, -4.05334*10^-4, -9.18478*10^-5, 3.19806*10^-4, 3.63852*10^-6, -1.56105*10^-4, 3.77477*10^-4, 6.44241*10^-4, 2.40259*10^-4, 5.68899*10^-5, 1.95567*10^-4, 2.3654*10^-4, 5.73293*10^-5, -4.46169*10^-5, 3.27635*10^-5, 8.1741*10^-6, -7.06224*10^-5, -6.81354*10^-5, -1.28596*10^-5, 9.30078*10^-6, -2.34088*10^-6, -3.51464*10^-6, -9.12964*10^-7, 0));
h(10,1) = fi.fir((-6.90525*10^-6, 1.26895*10^-5, -5.07632*10^-5, -4.25921*10^-6, -3.06084*10^-4, 4.47309*10^-4, -3.00497*10^-4, -4.6817*10^-5, -3.16584*10^-4, 9.80811*10^-4, -8.46133*10^-4, 1.18111*10^-4, 1.25948*10^-4, 2.18183*10^-3, 1.23416*10^-3, -2.23481*10^-3, 3.35082*10^-3, 2.03881*10^-3, 1.09137*10^-2, -2.20259*10^-2, -1.52245*10^-2, 1.7673*10^-2, 5.61989*10^-3, -6.93778*10^-3, 1.84808*10^-2, 2.02873*10^-3, -2.89144*10^-2, 1.34849*10^-2, -4.98675*10^-3, -8.08788*10^-4, 6.34478*10^-3, -5.37065*10^-3, 1.59773*10^-3, -1.19074*10^-2, 1.07473*10^-2, 8.68801*10^-3, -3.46914*10^-3, 6.51347*10^-3, -4.53393*10^-3, -2.97135*10^-3, 4.54128*10^-3, 5.84137*10^-3, -8.06327*10^-3, -3.951*10^-3, 4.98626*10^-3, -5.49752*10^-3, -3.58275*10^-3, -1.26195*10^-3, 4.02261*10^-3, 3.13502*10^-3, 3.09385*10^-3, 2.60939*10^-3, -3.81199*10^-3, 1.51906*10^-4, 1.56251*10^-3, -3.34453*10^-3, -4.42281*10^-3, -2.53939*10^-3, 9.56534*10^-5, 1.01213*10^-3, 2.70927*10^-3, 2.06534*10^-3, 6.16297*10^-4, -6.01002*10^-5, -1.19671*10^-3, -2.03118*10^-3, -1.08711*10^-3, 1.66844*10^-4, -1.25626*10^-3, 3.3741*10^-4, 4.30616*10^-4, -2.24925*10^-4, -2.74129*10^-5, -1.36514*10^-3, -7.57852*10^-5, -1.05727*10^-3, -7.65697*10^-4, 2.26067*10^-4, -8.45473*10^-4, 6.30502*10^-4, -1.94535*10^-5, 2.29648*10^-3, 3.34238*10^-3, 2.9935*10^-4, -1.38639*10^-3, -1.57817*10^-3, -1.97515*10^-4, 7.65762*10^-5, 1.22317*10^-3, 1.36599*10^-3, 4.53566*10^-4, 4.79237*10^-4, 4.35133*10^-4, 1.47025*10^-3, 1.32148*10^-3, -5.42254*10^-4, -1.71888*10^-3, -7.11998*10^-4, 7.2084*10^-4, 2.83247*10^-4, 4.17124*10^-4, 1.35894*10^-4, 2.56366*10^-5, 3.17986*10^-4, -1.74273*10^-4, -4.09525*10^-4, -3.57221*10^-4, 1.3044*10^-4, 2.16033*10^-4, -1.74119*10^-4, -9.33864*10^-5, -6.39853*10^-5, 2.48682*10^-7, 1.336*10^-4, 6.72119*10^-5, -5.60343*10^-5, -1.84328*10^-4, -5.21864*10^-5, 1.34827*10^-5, -3.15558*10^-5, -5.19876*10^-5, -1.81582*10^-5, -8.97496*10^-6, -8.25901*10^-6, 2.4814*10^-6, -3.23644*10^-6, -6.2718*10^-7, 0));
h(11,1) = fi.fir((1.31127*10^-5, -7.38879*10^-6, -1.51989*10^-4, -9.11027*10^-7, 1.939*10^-4, -1.71535*10^-4, -3.22858*10^-4, -2.43654*10^-4, -7.13603*10^-4, 1.11514*10^-3, -6.76222*10^-4, 5.17239*10^-3, 4.60809*10^-2, 4.83216*10^-2, 2.76563*10^-3, -9.17066*10^-4, -3.72107*10^-2, -2.72916*10^-2, -8.20955*10^-4, -6.29913*10^-2, -3.16397*10^-2, -8.77745*10^-3, -2.40856*10^-2, 1.44447*10^-2, 9.33732*10^-4, 5.63275*10^-3, 1.06274*10^-2, -1.33066*10^-2, 3.86248*10^-2, 3.09151*10^-2, -1.0519*10^-2, 3.94804*10^-3, 6.26552*10^-3, 7.84534*10^-3, 1.42782*10^-2, 1.04436*10^-2, 5.34952*10^-3, 9.61553*10^-3, 3.047*10^-3, -2.08251*10^-3, -3.13446*10^-3, 2.02925*10^-3, 4.09361*10^-3, -8.99273*10^-3, -9.42078*10^-3, -2.95204*10^-3, -5.66593*10^-3, -2.00101*10^-3, 6.04909*10^-4, -2.58112*10^-3, -7.69069*10^-3, -8.8627*10^-3, -2.71579*10^-3, -1.69048*10^-3, 1.27175*10^-3, 2.10741*10^-3, -1.56026*10^-3, -2.06903*10^-3, 3.39129*10^-4, -1.18608*10^-3, -1.44718*10^-3, 5.25487*10^-4, -7.11836*10^-5, -9.09094*10^-5, 1.00984*10^-3, 1.69188*10^-3, 1.24293*10^-3, 1.95065*10^-3, 1.83846*10^-3, -1.20529*10^-3, -1.79294*10^-4, 1.8129*10^-3, 1.6884*10^-3, 1.29178*10^-3, 1.39515*10^-3, 1.86454*10^-3, 5.84763*10^-4, -4.84253*10^-4, -8.55611*10^-4, -1.05795*10^-5, 9.96855*10^-4, 3.25346*10^-4, -6.64306*10^-4, -1.05405*10^-3, -4.536*10^-4, 1.4791*10^-4, 5.086*10^-4, 2.10854*10^-3, 1.27291*10^-3, -6.48676*10^-4, -1.05839*10^-3, -1.69906*10^-3, -7.04934*10^-4, -7.45014*10^-5, -5.81171*10^-4, -5.98512*10^-4, -8.77149*10^-4, -6.51168*10^-4, 1.60366*10^-4, 3.21589*10^-4, -1.30289*10^-4, -7.37136*10^-4, -2.81437*10^-4, 6.96143*10^-5, -2.91548*10^-4, 4.27083*10^-5, 3.01242*10^-4, 8.81382*10^-5, 2.94159*10^-4, 3.12487*10^-4, 4.50719*10^-5, 8.06952*10^-5, 2.48997*10^-4, 2.96876*10^-4, 3.83697*10^-5, 2.30441*10^-5, 4.60206*10^-5, 7.06061*10^-5, 8.15635*10^-5, -1.90061*10^-5, -4.67294*10^-5, -2.15894*10^-5, -2.22245*10^-6, -2.14215*10^-5, -1.5791*10^-5, -5.21215*10^-6, -7.49018*10^-7, 0));
h(12,1) = fi.fir((3.27738*10^-6, -1.98933*10^-5, -2.24377*10^-4, 2.36034*10^-4, 2.31547*10^-4, -5.44781*10^-4, -4.39775*10^-4, 7.9964*10^-4, -5.44421*10^-4, -3.37965*10^-5, 2.37477*10^-4, -2.99193*10^-5, 1.06573*10^-2, 3.5753*10^-3, -1.67824*10^-2, 5.96581*10^-3, 2.30173*10^-2, -3.42189*10^-3, -2.06794*10^-2, -1.60074*10^-2, -1.01068*10^-2, -1.35014*10^-2, 4.19631*10^-2, 1.80855*10^-2, -3.55257*10^-2, -2.71591*10^-3, -2.44034*10^-3, 1.2678*10^-2, 1.4909*10^-2, 7.08753*10^-3, -4.76206*10^-3, -7.64567*10^-3, -5.58608*10^-3, -8.15685*10^-3, 1.47137*10^-2, 7.96626*10^-3, -9.86967*10^-3, -8.58863*10^-3, 3.25646*10^-3, 6.15977*10^-3, -4.3833*10^-3, -3.48297*10^-3, 3.04111*10^-3, -1.31719*10^-3, -5.34971*10^-3, -1.47622*10^-3, 5.53479*10^-3, 4.46569*10^-3, 2.13182*10^-3, -9.42707*10^-4, -3.93236*10^-3, -1.68373*10^-3, -3.28718*10^-4, -8.94931*10^-5, 1.94062*10^-3, 1.68114*10^-3, -1.41673*10^-3, -1.68419*10^-3, 3.99343*10^-4, 2.06966*10^-3, 3.69514*10^-4, 2.53042*10^-4, 9.77515*10^-4, -9.12804*10^-4, 2.74873*10^-4, 2.26848*10^-3, 2.31892*10^-3, 2.21365*10^-3, 1.92945*10^-4, 1.38286*10^-3, 2.26825*10^-3, 2.44418*10^-4, -1.87271*10^-3, -3.17289*10^-3, -1.20738*10^-3, -3.89164*10^-5, -7.16831*10^-4, 6.07349*10^-5, -3.01523*10^-5, -4.14409*10^-4, -7.53958*10^-6, -1.12029*10^-3, -1.67158*10^-3, -2.92629*10^-3, -2.39894*10^-3, -5.27782*10^-4, -4.24545*10^-4, -4.0871*10^-4, -2.2978*10^-4, -1.79398*10^-5, 2.39355*10^-4, 1.05812*10^-3, 1.0682*10^-3, -7.58498*10^-4, -1.48937*10^-3, 1.16086*10^-4, 9.87828*10^-4, 8.07473*10^-4, 1.16715*10^-3, 1.13736*10^-3, 4.94459*10^-4, 6.39692*10^-4, 5.38982*10^-4, 1.16257*10^-4, 9.32166*10^-5, 2.36701*10^-4, 4.55971*10^-4, 2.23411*10^-4, 2.12529*10^-4, 3.92538*10^-4, 2.09402*10^-4, 3.10328*10^-4, 1.32193*10^-4, -3.69908*10^-5, -2.28937*10^-5, 5.66962*10^-5, -6.23196*10^-5, -1.05953*10^-4, -1.37302*10^-5, -3.09197*10^-5, -1.28753*10^-5, 8.30434*10^-6, 2.78378*10^-6, -1.26402*10^-5, -1.02932*10^-5, -5.80166*10^-6, -7.71071*10^-7, 0));
h(13,1) = fi.fir((-3.30557*10^-6, 6.58295*10^-6, -4.13336*10^-5, 1.34953*10^-4, -2.3944*10^-4, 1.23429*10^-4, 3.54764*10^-5, 4.38524*10^-4, -4.46457*10^-4, -2.14162*10^-4, 5.94639*10^-4, 1.50709*10^-4, 1.21477*10^-3, -1.43594*10^-3, 2.24066*10^-3, -6.86843*10^-3, 6.84583*10^-4, -1.26404*10^-2, -6.24609*10^-3, 3.23072*10^-2, -9.08867*10^-3, -6.55955*10^-3, 7.42411*10^-3, -3.31393*10^-3, 2.51271*10^-2, 3.7619*10^-4, -2.98252*10^-2, -3.17145*10^-3, 4.79751*10^-3, 1.06036*10^-2, -3.05803*10^-3, -2.0928*10^-2, 1.30206*10^-3, 3.34124*10^-3, 5.98066*10^-3, -1.39712*10^-3, -1.31632*10^-3, 7.16025*10^-3, -7.59216*10^-3, -1.46599*10^-3, 9.55154*10^-3, 5.51641*10^-3, 5.55038*10^-3, 1.23226*10^-3, -4.43409*10^-3, -3.08075*10^-3, 2.40414*10^-3, 2.82354*10^-3, 4.00457*10^-3, 4.7209*10^-3, 8.29111*10^-4, -1.01166*10^-3, -2.57823*10^-3, -1.06278*10^-3, -2.22912*10^-3, -7.95623*10^-4, -7.00189*10^-4, -5.04316*10^-3, -4.18949*10^-3, -2.82809*10^-3, -3.14607*10^-3, -1.21634*10^-3, 6.43135*10^-4, 1.04922*10^-3, 1.33325*10^-4, 1.07997*10^-3, 2.31148*10^-3, 2.65451*10^-3, 1.06408*10^-3, -2.35539*10^-3, -1.14272*10^-4, 3.38497*10^-3, 3.28831*10^-3, 1.71971*10^-4, -3.2057*10^-4, 2.10505*10^-3, -2.96216*10^-4, -2.75839*10^-3, -1.1997*10^-3, 3.46228*10^-4, 1.58192*10^-3, -4.43774*10^-4, -3.29516*10^-3, -1.99081*10^-3, -6.43004*10^-4, -4.21855*10^-4, -9.60012*10^-4, 2.76212*10^-4, 5.72913*10^-4, -1.6863*10^-3, -1.26468*10^-3, -6.3397*10^-4, -3.99078*10^-5, 2.67905*10^-4, 4.92812*10^-5, 6.181*10^-4, 2.44744*10^-4, 4.59707*10^-4, 1.2123*10^-3, 5.20144*10^-4, -5.09173*10^-4, -8.19063*10^-5, 4.93395*10^-4, 2.53793*10^-4, 4.26232*10^-4, 5.82041*10^-4, 4.40844*10^-4, 5.71553*10^-4, 1.36777*10^-4, 9.34823*10^-5, 3.39887*10^-4, 2.97869*10^-4, 2.58727*10^-4, 1.03477*10^-4, 1.28055*10^-4, -1.21549*10^-5, -4.28586*10^-5, 3.3221*10^-5, 2.93676*10^-5, 5.60649*10^-5, -3.26185*10^-5, -5.6678*10^-5, -1.49079*10^-5, -4.80575*10^-6, -7.10373*10^-6, -6.55232*10^-6, -1.24034*10^-6, 0));
h(14,1) = fi.fir((3.51439*10^-7, 2.87613*10^-6, -1.45798*10^-4, 9.0752*10^-5, -6.11966*10^-4, -2.45544*10^-4, -2.21059*10^-4, 5.94499*10^-4, -1.25521*10^-3, 3.12022*10^-4, 4.25134*10^-4, -8.48038*10^-4, 1.33545*10^-2, 1.14058*10^-3, -4.88234*10^-3, 9.19814*10^-3, -6.27052*10^-3, -2.14937*10^-2, 1.23386*10^-2, 8.03106*10^-3, -1.64583*10^-2, -1.01589*10^-2, -2.09074*10^-2, 1.16758*10^-2, 2.38261*10^-2, 4.4089*10^-3, 8.66514*10^-3, -3.65339*10^-3, -3.37606*10^-3, -9.8116*10^-3, -6.91913*10^-3, 8.70097*10^-3, 1.26165*10^-2, 3.51771*10^-3, -2.47151*10^-2, -8.33375*10^-4, 1.7721*10^-2, -1.94991*10^-3, -4.53353*10^-3, 4.02003*10^-3, 6.79846*10^-4, -7.26018*10^-3, -1.77306*10^-4, -2.24289*10^-3, -3.29005*10^-3, 8.41359*10^-3, 4.59243*10^-3, -5.91923*10^-3, -1.20555*10^-3, 2.19487*10^-3, -1.14701*10^-3, 9.30791*10^-5, 2.18685*10^-3, -4.49193*10^-3, -4.73366*10^-3, 2.26702*10^-3, 4.49539*10^-3, 4.21747*10^-3, 3.96111*10^-3, 1.77683*10^-4, -3.02825*10^-3, -8.89718*10^-4, 5.64437*10^-4, -1.67615*10^-4, 6.02522*10^-4, 1.87077*10^-3, 1.2949*10^-3, -5.94883*10^-4, -1.92181*10^-3, -1.22613*10^-3, -8.5715*10^-5, 4.10859*10^-4, -1.40928*10^-4, -2.02792*10^-3, -5.53977*10^-4, 1.30066*10^-3, 5.83343*10^-4, 8.61494*10^-4, -1.19166*10^-3, -2.18237*10^-3, -1.21283*10^-3, -1.08317*10^-3, -1.9593*10^-4, -1.34809*10^-4, -6.54677*10^-4, -9.36929*10^-4, -1.48747*10^-3, -1.59498*10^-3, -1.07904*10^-3, 1.19197*10^-3, 9.83816*10^-4, -9.17038*10^-4, -2.51922*10^-4, -1.71245*10^-4, -6.6768*10^-4, -6.18854*10^-4, -3.61373*10^-4, 2.76893*10^-4, 6.54997*10^-4, 7.13557*10^-4, 7.84532*10^-4, 9.21074*10^-5, -3.20935*10^-5, 1.43232*10^-4, 6.22619*10^-4, 5.18774*10^-4, -2.74811*10^-4, -4.39844*10^-4, 2.92392*10^-4, 4.58341*10^-4, -8.30032*10^-5, -1.57369*10^-4, 1.47762*10^-4, 2.02603*10^-4, -6.66399*10^-5, -5.52051*10^-6, 4.1404*10^-5, -4.42386*10^-5, -7.86137*10^-5, -8.64243*10^-5, -8.95919*10^-6, 2.60922*10^-5, 2.14766*10^-5, -7.65888*10^-6, -9.23643*10^-6, -1.1904*10^-6, -3.57125*10^-7, 0));
h(15,1) = fi.fir((-1.88214*10^-5, 5.47506*10^-7, -3.62138*10^-4, 3.4025*10^-4, -1.5391*10^-4, 9.13577*10^-4, -1.59128*10^-3, 1.86949*10^-3, -5.7894*10^-4, -7.61445*10^-5, -9.44821*10^-4, 1.5239*10^-3, 6.93131*10^-3, -5.08856*10^-3, -1.64934*10^-3, -3.28386*10^-2, 1.56604*10^-2, -7.18646*10^-3, -3.99608*10^-2, 2.78627*10^-2, 2.10797*10^-2, 2.36595*10^-2, 2.04958*10^-2, 2.62763*10^-2, -8.38542*10^-3, -2.54705*10^-2, 1.6657*10^-2, -1.6476*10^-3, -2.9996*10^-2, -2.96593*10^-3, 2.29607*10^-2, 4.06638*10^-3, -1.99525*10^-2, -9.55486*10^-3, 2.15033*10^-3, -7.14622*10^-3, -4.87891*10^-3, -1.99292*10^-3, 1.16732*10^-4, 2.97933*10^-3, 4.9839*10^-4, -6.55393*10^-3, -1.16543*10^-3, 5.36463*10^-3, -6.3972*10^-3, -8.90121*10^-3, -5.88588*10^-4, 4.84007*10^-4, 1.36571*10^-3, 6.21762*10^-3, 6.40891*10^-3, 2.3052*10^-3, 2.52014*10^-3, 3.03026*10^-3, 1.4746*10^-3, 1.06462*10^-3, -4.70089*10^-4, -1.5733*10^-3, -8.0711*10^-4, 1.55653*10^-5, -1.06767*10^-4, 1.10327*10^-3, 3.74636*10^-3, 4.99281*10^-3, 7.22126*10^-4, -2.893*10^-3, -1.64107*10^-3, 7.19126*10^-4, -6.68844*10^-4, -2.46309*10^-3, -1.44934*10^-3, 1.74066*10^-4, 1.00658*10^-3, 5.37174*10^-5, -4.13929*10^-4, -2.79138*10^-4, -9.57403*10^-4, -1.77829*10^-3, -8.63774*10^-4, 1.77585*10^-3, 1.49904*10^-3, 1.27816*10^-4, -5.78467*10^-5, -1.13474*10^-3, -1.34423*10^-4, 3.59113*10^-4, -3.40049*10^-4, -5.12483*10^-4, -7.75252*10^-4, -1.1166*10^-3, -1.37867*10^-3, 3.97475*10^-4, 1.9904*10^-3, 1.12803*10^-3, 1.40679*10^-4, 1.99225*10^-3, 2.10768*10^-3, 2.04947*10^-4, -1.73206*10^-4, -1.23233*10^-5, 4.44418*10^-4, 2.66517*10^-4, -4.01355*10^-4, 1.76596*10^-5, 5.21337*10^-5, -3.43904*10^-4, -5.62304*10^-4, -3.45911*10^-4, 1.63275*10^-4, -1.78548*10^-4, -7.38871*10^-4, -3.41992*10^-4, -1.29415*10^-4, -2.14133*10^-4, -2.67914*10^-4, -2.00619*10^-4, -1.74628*10^-4, -1.68571*10^-4, -1.07805*10^-4, -5.32896*10^-5, 7.93834*10^-6, 1.46317*10^-5, 3.73611*10^-6, 1.32153*10^-5, 1.75291*10^-5, 6.12983*10^-6, 9.58706*10^-7, 0));
h(16,1) = fi.fir((2.47639*10^-5, -4.7088*10^-6, 3.5434*10^-4, -3.9905*10^-4, -8.62417*10^-5, -1.16299*10^-3, 1.49577*10^-3, -1.62677*10^-3, 3.20863*10^-4, -6.24716*10^-4, 1.68283*10^-3, -1.45821*10^-3, -7.87119*10^-3, 4.51814*10^-3, 8.48161*10^-3, 3.31264*10^-2, -2.0029*10^-2, -1.63571*10^-2, 2.27166*10^-2, -1.90547*10^-2, -2.21976*10^-2, -1.74228*10^-2, -1.76328*10^-2, 1.09545*10^-3, 3.26907*10^-2, 3.70124*10^-2, 6.20737*10^-3, -1.76526*10^-2, 1.44063*10^-2, 3.66584*10^-2, -2.08799*10^-2, -4.51098*10^-2, -6.02232*10^-3, 7.96541*10^-3, 7.25046*10^-3, -7.19013*10^-3, -9.58897*10^-3, 5.85768*10^-3, 1.27408*10^-2, 2.27231*10^-3, -1.17918*10^-2, 1.21233*10^-3, 3.52334*10^-3, -8.30121*10^-3, -2.53834*10^-3, 5.23374*10^-3, 2.60297*10^-3, -6.63947*10^-4, 6.88957*10^-4, 3.85154*10^-4, -3.02839*10^-3, -4.64818*10^-3, 1.05713*10^-3, 3.78545*10^-3, 2.27285*10^-3, 3.75072*10^-3, 1.88724*10^-3, 3.72662*10^-3, 6.05514*10^-3, 2.86602*10^-3, 1.42131*10^-3, 1.52038*10^-3, 3.1719*10^-4, -3.99725*10^-3, -2.40002*10^-3, 1.00471*10^-3, -3.04565*10^-3, -6.84891*10^-3, -5.92465*10^-3, -7.91495*10^-4, 2.65224*10^-3, 1.05786*10^-3, 4.39049*10^-4, 1.8128*10^-3, 2.37751*10^-3, 7.46752*10^-4, -1.01038*10^-3, -1.08777*10^-3, -1.53375*10^-3, -3.76877*10^-4, -4.25318*10^-4, -5.65439*10^-4, 1.27944*10^-3, -4.86147*10^-4, -1.09859*10^-3, -4.41226*10^-4, -1.28331*10^-3, -6.54352*10^-4, -5.11422*10^-4, 5.65125*10^-4, 1.91671*10^-3, 2.36682*10^-3, 1.3563*10^-3, -1.02102*10^-3, -7.786*10^-4, -6.98236*10^-4, -8.02984*10^-4, -2.31761*10^-4, 6.12519*10^-6, -9.07679*10^-5, 3.35677*10^-4, 3.22414*10^-4, 2.65365*10^-4, 2.76137*10^-4, 9.15682*10^-5, -2.51816*10^-4, -4.69868*10^-5, 3.0512*10^-4, -1.65316*10^-4, -3.23155*10^-4, 6.31454*10^-5, 1.35007*10^-4, 2.50399*10^-5, -8.92612*10^-5, 2.14393*10^-5, 2.54175*10^-6, 6.31566*10^-5, 1.71501*10^-5, 8.08098*10^-5, 3.0611*10^-5, -7.71602*10^-5, -3.63984*10^-5, 7.08545*10^-6, 2.20134*10^-5, -4.54475*10^-6, -5.94526*10^-6, -1.99452*10^-7, 0));
h(17,1) = fi.fir((-1.12518*10^-5, -2.52175*10^-5, -4.38429*10^-7, -1.61649*10^-4, 1.85227*10^-4, -3.79492*10^-4, -6.08489*10^-4, 8.83931*10^-5, 6.68369*10^-4, -9.99367*10^-4, -1.21022*10^-3, 1.29228*10^-3, -1.21788*10^-2, -4.68315*10^-4, 1.50281*10^-3, -6.03551*10^-4, 3.1857*10^-2, 8.21013*10^-3, -3.03129*10^-2, -7.41938*10^-3, 2.20151*10^-2, 1.01088*10^-2, -6.07037*10^-3, -1.19074*10^-2, -5.38*10^-3, -9.75742*10^-3, 2.26556*10^-3, 3.68369*10^-3, -7.71687*10^-3, 1.49585*10^-2, -2.8647*10^-3, -5.48534*10^-3, 3.84218*10^-3, -7.39329*10^-3, 5.02779*10^-3, 7.88494*10^-3, -4.92785*10^-3, -8.36886*10^-3, -9.18883*10^-3, 5.7775*10^-3, 1.12766*10^-2, 5.56093*10^-3, -1.91035*10^-3, -5.86651*10^-3, 9.93771*10^-4, 4.91499*10^-3, 3.45724*10^-3, 4.10376*10^-5, -1.2248*10^-3, -5.36977*10^-3, -4.36442*10^-3, -2.28246*10^-3, -9.53147*10^-4, 1.04997*10^-3, 2.95045*10^-3, 2.98067*10^-3, 1.74005*10^-3, 1.91928*10^-3, 2.52441*10^-3, -9.23606*10^-5, -8.34922*10^-4, -6.02009*10^-4, -2.25984*10^-4, -1.66927*10^-3, -1.00309*10^-3, -2.0463*10^-4, -1.9296*10^-3, -1.0428*10^-3, -4.5546*10^-4, 1.12042*10^-3, 1.83867*10^-3, 1.65864*10^-3, 1.93418*10^-3, 6.23567*10^-4, -8.31176*10^-4, -3.12604*10^-3, -3.34934*10^-3, -1.48754*10^-3, -2.38546*10^-4, 5.24849*10^-4, -7.20907*10^-4, -4.83266*10^-4, 9.61786*10^-4, 8.75555*10^-4, -7.18929*10^-4, -1.49106*10^-3, -5.01798*10^-4, -3.01003*10^-4, -9.25607*10^-5, -1.64878*10^-4, -9.46731*10^-4, -7.6694*10^-4, -5.47987*10^-4, 5.26503*10^-4, 4.54822*10^-4, -1.24766*10^-3, -1.50239*10^-3, -8.47043*10^-4, -5.93637*10^-4, -3.94813*10^-4, -2.93212*10^-4, -2.53678*10^-4, 1.36606*10^-4, -4.53146*10^-6, 4.64796*10^-5, -4.01919*10^-5, -4.94946*10^-5, 4.74848*10^-5, -2.41033*10^-4, 3.49977*10^-5, -9.78587*10^-5, 1.22163*10^-5, 2.72989*10^-4, 7.91379*10^-5, 7.78936*10^-5, 9.61423*10^-5, 7.98075*10^-5, 1.10373*10^-4, 1.08625*10^-5, 1.68101*10^-5, -5.14588*10^-5, -1.02699*10^-5, 4.24498*10^-5, -1.54209*10^-6, -3.55566*10^-7, -3.38734*10^-6, -1.42182*10^-6, 0));
h(18,1) = fi.fir((8.46754*10^-6, -3.99997*10^-5, 7.81131*10^-5, -1.76664*10^-4, 2.18614*10^-4, -2.62422*10^-4, -4.45652*10^-5, -5.6178*10^-4, 9.2258*10^-4, 7.08956*10^-4, -1.2249*10^-3, -5.24485*10^-4, -8.38376*10^-4, 2.26799*10^-3, -4.73027*10^-3, 8.71162*10^-3, 1.58126*10^-3, 1.83656*10^-2, 2.73151*10^-3, -5.80978*10^-2, 7.39795*10^-3, 3.23093*10^-2, -1.3579*10^-2, -1.44256*10^-2, -1.30734*10^-2, 3.02041*10^-2, 3.12594*10^-2, -2.0943*10^-2, -6.04938*10^-3, -1.38165*10^-2, 1.74843*10^-4, 2.46952*10^-2, 4.84082*10^-4, -1.07633*10^-2, -5.82769*10^-4, 3.04413*10^-3, -1.21855*10^-2, 8.43931*10^-4, 7.15823*10^-3, -1.14539*10^-3, -4.58897*10^-3, 1.71053*10^-3, 5.96175*10^-3, -1.31856*10^-3, 3.25658*10^-3, 4.04222*10^-3, -4.19875*10^-3, 4.47298*10^-4, 2.09315*10^-3, -1.6919*10^-3, -1.33556*10^-3, 5.23524*10^-4, 5.90727*10^-4, -2.3095*10^-3, -1.72704*10^-3, -1.50241*10^-3, -5.78455*10^-4, -3.23551*10^-5, 4.10224*10^-5, -1.55243*10^-3, -2.09868*10^-3, 5.84863*10^-5, -5.67201*10^-4, -1.15911*10^-3, 5.26208*10^-4, 2.4605*10^-3, 1.465*10^-3, -5.84392*10^-4, -1.37493*10^-3, 8.90404*10^-5, 2.72071*10^-3, 3.72753*10^-3, 1.13654*10^-3, -2.32522*10^-3, -7.15857*10^-4, 7.67318*10^-4, 5.34539*10^-4, 1.1149*10^-3, 4.0236*10^-4, 1.03558*10^-4, -2.9607*10^-4, -1.93484*10^-3, -1.47848*10^-3, -1.28741*10^-3, -3.75861*10^-4, 1.52264*10^-4, -7.14358*10^-4, 1.13972*10^-3, 7.74481*10^-4, 6.73181*10^-5, 3.18167*10^-4, -7.12106*10^-4, -8.5018*10^-4, -1.2821*10^-4, 5.63847*10^-4, 4.27308*10^-4, 8.49064*10^-5, 4.12732*10^-5, 7.43967*10^-4, 7.86364*10^-4, 1.09181*10^-4, -1.04291*10^-3, -7.10936*10^-4, 3.65642*10^-4, -1.8673*10^-4, -2.51117*10^-4, 2.83307*10^-5, 1.79366*10^-4, 2.56181*10^-4, -9.16734*10^-5, -8.14924*10^-5, -7.95034*10^-5, -8.87843*10^-5, 5.96209*10^-6, -1.1491*10^-4, 6.3452*10^-5, -2.58999*10^-5, -4.90741*10^-5, 6.5355*10^-5, 5.53433*10^-5, 6.04376*10^-5, -1.73088*10^-5, -1.28328*10^-5, 3.80288*10^-6, 3.25446*10^-6, -1.66874*10^-6, -3.16691*10^-7, 0));
h(19,1) = fi.fir((-1.60519*10^-5, -5.07492*10^-6, 2.87357*10^-4, -2.04084*10^-4, -6.49941*10^-4, 5.25536*10^-4, 4.99998*10^-4, -7.18214*10^-4, -4.36211*10^-4, 3.23886*10^-5, -6.26824*10^-4, 6.89937*10^-4, -1.72606*10^-2, -4.24591*10^-3, 3.61436*10^-2, 5.0167*10^-3, -2.81069*10^-2, -2.331*10^-2, 2.18264*10^-2, 3.92449*10^-2, 1.89946*10^-2, 1.35645*10^-2, -6.3962*10^-2, -3.7707*10^-2, 3.51136*10^-2, 9.01473*10^-3, -1.23668*10^-3, -1.17299*10^-2, -1.24636*10^-2, 7.84715*10^-3, 9.20741*10^-3, 3.91203*10^-4, 6.4388*10^-4, 6.651*10^-4, -3.94122*10^-3, -3.85536*10^-3, 1.92288*10^-3, 4.81443*10^-3, 1.11639*10^-2, 2.85857*10^-3, -4.73491*10^-3, -5.36479*10^-3, -2.82256*10^-3, -2.56657*10^-3, -1.07359*10^-3, 4.01416*10^-3, 1.63053*10^-3, 8.2404*10^-4, -1.27327*10^-3, -1.63773*10^-3, 2.11746*10^-3, 4.64776*10^-3, 5.07914*10^-4, -3.48194*10^-3, -3.2662*10^-3, 1.76202*10^-4, 1.85579*10^-3, 1.85225*10^-3, -2.50956*10^-3, -4.21615*10^-3, -3.10362*10^-3, -1.09943*10^-3, 1.80572*10^-3, 1.15181*10^-3, -6.60232*10^-4, 1.09564*10^-3, 1.99802*10^-3, 1.0342*10^-3, 2.25408*10^-3, 7.62111*10^-8, -1.62152*10^-3, -7.16191*10^-4, -1.81778*10^-3, -1.13227*10^-3, 1.64066*10^-3, 1.83631*10^-3, 1.59506*10^-3, 1.5986*10^-3, 1.80161*10^-3, 8.28893*10^-4, -1.33194*10^-3, -1.3112*10^-3, 4.22487*10^-4, 1.39281*10^-3, 6.23239*10^-4, -1.2205*10^-3, -1.14263*10^-3, 2.98468*10^-4, 1.85644*10^-4, 5.45233*10^-5, -5.75289*10^-4, -1.20267*10^-3, -9.98064*10^-4, -2.37096*10^-3, -1.89254*10^-3, -6.60745*10^-4, -6.57748*10^-4, -8.8091*10^-4, -1.16818*10^-3, -8.61727*10^-4, -3.27773*10^-4, -1.61222*10^-4, 1.94191*10^-4, 3.61344*10^-4, -4.30785*10^-4, -5.61166*10^-4, -1.44006*10^-4, 6.22891*10^-5, 3.5927*10^-4, 1.03944*10^-4, 2.33591*10^-4, 3.22562*10^-4, 4.5599*10^-5, 4.79109*10^-5, 1.36757*10^-4, 1.60109*10^-4, 9.52111*10^-5, 3.45891*10^-5, 7.48501*10^-5, 7.69231*10^-5, 7.42812*10^-5, 1.35771*10^-5, -3.03839*10^-5, -1.24208*10^-5, 5.73009*10^-6, 4.11672*10^-6, -2.39344*10^-7, 0));
h(20,1) = fi.fir((-1.11966*10^-5, -8.88238*10^-5, -6.64415*10^-5, 9.08779*10^-6, 2.8978*10^-4, -1.99779*10^-4, 7.84588*10^-4, -3.08419*10^-4, -3.83537*10^-4, -2.43798*10^-4, 4.00823*10^-5, 4.07078*10^-3, 2.02492*10^-2, 1.45401*10^-2, -1.87744*10^-3, -1.40586*10^-3, -4.04868*10^-2, -4.18774*10^-2, -2.00329*10^-2, -7.1259*10^-3, 1.84133*10^-2, 2.28362*10^-2, 2.64909*10^-2, 1.21774*10^-2, 8.06984*10^-4, 7.44592*10^-3, -8.87858*10^-3, -1.18445*10^-2, 2.63112*10^-2, 2.33436*10^-2, 5.29021*10^-3, -8.71086*10^-3, -1.61164*10^-2, -7.51844*10^-3, -1.53619*10^-2, -3.23006*10^-3, 6.29851*10^-3, 6.60932*10^-4, -6.08021*10^-3, -6.30607*10^-3, 6.02894*10^-3, 6.10741*10^-3, -3.47263*10^-3, -2.0012*10^-4, 1.05347*10^-4, -4.65258*10^-3, -2.81874*10^-3, -1.57369*10^-3, 3.7996*10^-3, 6.86201*10^-3, 1.0076*10^-3, -4.86479*10^-3, -3.46055*10^-3, 2.2847*10^-4, 1.27474*10^-3, 3.60318*10^-3, 4.21488*10^-3, 8.45167*10^-4, -5.06952*10^-4, -8.3919*10^-4, -8.95233*10^-4, -2.80215*10^-3, -1.22374*10^-3, 1.04215*10^-3, 1.0659*10^-3, 5.06966*10^-4, -5.18492*10^-4, -1.42481*10^-3, -8.09402*10^-4, 3.01676*10^-3, 1.85159*10^-3, -2.36257*10^-4, 1.4127*10^-3, -4.00493*10^-4, -2.50376*10^-3, -2.10972*10^-3, 2.11399*10^-4, 1.3705*10^-3, -7.28887*10^-4, -7.70172*10^-4, 3.56111*10^-4, 1.52084*10^-3, 1.09117*10^-3, -2.09016*10^-3, -2.3455*10^-3, -1.67692*10^-4, 7.5464*10^-4, 3.47804*10^-4, -1.01029*10^-3, -8.11262*10^-4, -3.12518*10^-5, 8.49904*10^-4, 1.29043*10^-3, 9.17368*10^-4, 4.42065*10^-4, -8.35573*10^-5, 1.10474*10^-3, 1.50157*10^-3, 1.41582*10^-4, -3.43523*10^-4, -5.0613*10^-5, -1.22187*10^-4, 1.72603*10^-4, 1.26907*10^-4, 4.5528*10^-4, 1.07997*10^-4, -3.74969*10^-4, 2.48529*10^-6, -3.90002*10^-4, -4.24739*10^-4, -2.91292*10^-4, -3.80888*10^-4, 1.2067*10^-5, 3.17963*10^-5, -1.32352*10^-4, -1.43383*10^-4, -1.88798*10^-4, -5.53501*10^-5, -7.91089*10^-5, -1.55607*10^-4, -4.37215*10^-5, 2.5023*10^-5, 4.36754*10^-5, 6.82071*10^-6, -1.51174*10^-5, -4.01122*10^-6, 4.88989*10^-7, 0));
h(21,1) = fi.fir((-1.72456*10^-6, 1.51199*10^-5, -8.9622*10^-5, 4.51662*10^-5, -6.02566*10^-5, 1.4925*10^-4, -4.63978*10^-5, 1.28289*10^-4, -1.59971*10^-4, 5.51018*10^-5, -8.52122*10^-5, 1.24608*10^-4, -4.81403*10^-4, 1.3988*10^-3, 1.42046*10^-3, -2.43694*10^-3, -1.34784*10^-3, 4.05739*10^-3, -3.37356*10^-3, 3.79702*10^-3, -1.62823*10^-4, -1.33363*10^-2, 1.51297*10^-2, -1.99099*10^-3, 8.8277*10^-5, 1.38903*10^-3, -8.64536*10^-3, 1.74132*10^-3, -9.25597*10^-4, 1.16576*10^-4, -1.36287*10^-3, 1.50701*10^-2, 1.57599*10^-3, -9.8981*10^-3, -7.16758*10^-3, 8.06326*10^-3, 5.16217*10^-3, -1.32405*10^-2, 1.65833*10^-3, 4.64267*10^-3, -3.35439*10^-3, -3.49793*10^-4, 1.17955*10^-3, 8.88766*10^-4, -2.01648*10^-3, 8.99674*10^-4, -9.62836*10^-4, -1.71734*10^-3, 3.59954*10^-3, -1.10467*10^-3, -2.3227*10^-4, 1.25554*10^-3, 2.21503*10^-3, -7.08518*10^-4, 1.38544*10^-3, 4.92437*10^-3, -1.78311*10^-4, -1.12848*10^-3, -2.74061*10^-4, -2.76848*10^-3, -1.09522*10^-3, 1.22199*10^-3, -8.65618*10^-4, -2.82137*10^-3, -2.16653*10^-3, -7.13619*10^-4, -8.86716*10^-5, 1.04919*10^-4, 3.42128*10^-4, 3.15598*10^-4, 2.5078*10^-4, 1.17239*10^-3, 1.1948*10^-3, -3.29991*10^-4, -4.60373*10^-4, -9.07143*10^-5, -1.35154*10^-3, 9.80584*10^-4, 2.05091*10^-3, 1.23329*10^-3, -7.46007*10^-5, -1.32245*10^-3, 5.88936*10^-4, 7.87857*10^-4, 1.78134*10^-4, -3.60258*10^-4, -1.19211*10^-3, -2.98303*10^-4, -2.37842*10^-4, -1.07163*10^-4, 4.67904*10^-4, 8.76573*10^-4, 2.68727*10^-4, -1.16942*10^-3, -1.64166*10^-3, -6.53472*10^-5, 2.08517*10^-3, 1.20197*10^-3, 5.97838*10^-6, -7.95606*10^-5, 1.90799*10^-4, -7.33386*10^-5, -2.56214*10^-4, -5.17742*10^-6, -1.06843*10^-4, -4.30154*10^-5, -2.5283*10^-4, -2.67635*10^-4, 1.23694*10^-4, 4.31971*10^-5, -3.80833*10^-4, -2.66416*10^-4, 1.33655*10^-4, 1.31404*10^-4, 2.92614*10^-5, 9.48311*10^-6, -1.79707*10^-5, -5.33063*10^-5, -2.60729*10^-6, -3.11424*10^-5, -5.02754*10^-5, 6.37954*10^-6, 3.6885*10^-5, 2.56571*10^-5, 5.33039*10^-6, -1.5362*10^-6, -5.88919*10^-7, 0));
h(22,1) = fi.fir((2.48655*10^-5, -5.2325*10^-5, -3.16647*10^-4, -1.40598*10^-4, 9.90226*10^-5, 7.29466*10^-5, -5.1453*10^-4, 1.10753*10^-3, -1.26463*10^-3, 2.38535*10^-3, -1.78727*10^-3, 8.03193*10^-3, 2.96316*10^-2, 3.52858*10^-2, -2.0667*10^-2, -4.29015*10^-2, -2.62128*10^-2, -3.74964*10^-2, 1.46813*10^-2, -1.57208*10^-2, -3.99341*10^-2, 1.39343*10^-2, 4.26851*10^-2, 3.79115*10^-2, 1.44081*10^-2, 3.31856*10^-2, 1.29721*10^-2, -1.86206*10^-2, -1.72566*10^-3, 4.66849*10^-3, -5.21283*10^-3, -3.24698*10^-3, 5.97366*10^-3, 1.3015*10^-3, -5.33637*10^-3, -7.63633*10^-3, -2.24471*10^-2, -2.31689*10^-2, -6.6379*10^-3, -1.49051*10^-3, -5.55617*10^-3, -5.42286*10^-3, 1.87131*10^-3, -3.51473*10^-4, 2.32295*10^-3, 6.39798*10^-3, 4.6697*10^-3, 5.0508*10^-3, 4.30472*10^-3, 2.86225*10^-3, 2.47781*10^-3, 5.52152*10^-3, 5.06712*10^-3, 2.91467*10^-3, 2.04454*10^-3, -3.74723*10^-5, -8.71398*10^-4, -3.41146*10^-4, 1.39395*10^-3, 1.41333*10^-3, -8.97885*10^-4, -2.57216*10^-3, -4.39151*10^-3, -3.73773*10^-3, -3.62271*10^-3, -2.64545*10^-4, 2.5929*10^-3, -4.22486*10^-4, -1.2386*10^-3, 7.14534*10^-4, 2.07345*10^-3, 1.28457*10^-3, 1.23699*10^-3, 1.2271*10^-4, -9.64007*10^-4, 1.17332*10^-3, 2.34453*10^-3, 2.26393*10^-3, 1.01466*10^-3, -6.77591*10^-4, -3.89581*10^-4, 4.90595*10^-4, -1.24704*10^-3, -3.26374*10^-3, -2.87005*10^-3, -1.10188*10^-3, 1.1911*10^-4, 4.32073*10^-4, -8.76799*10^-6, -1.04977*10^-3, -6.46028*10^-4, -3.69246*10^-4, -1.91836*10^-3, -3.56517*10^-3, -1.26296*10^-3, 2.54428*10^-4, 1.09714*10^-6, 1.49528*10^-3, 1.82236*10^-3, 8.54379*10^-4, -1.65683*10^-4, 4.23628*10^-4, 1.46408*10^-3, 5.97418*10^-4, -3.6978*10^-5, 3.99827*10^-4, 7.13353*10^-4, 7.93463*10^-4, -4.61018*10^-5, -3.53584*10^-4, 6.40531*10^-4, 4.79932*10^-4, -9.5068*10^-5, -2.38922*10^-4, -7.41771*10^-5, -1.33542*10^-6, -1.45382*10^-4, -5.40852*10^-5, -1.79538*10^-5, -4.78923*10^-5, -1.27759*10^-5, -2.27523*10^-5, -1.74931*10^-5, -8.18893*10^-6, -9.31525*10^-6, -2.14361*10^-6, 1.24397*10^-6, 0));
h(23,1) = fi.fir((-9.94474*10^-6, 4.27114*10^-5, -7.58864*10^-5, -4.08033*10^-5, -1.66029*10^-4, 6.99969*10^-4, -6.60455*10^-4, 3.87942*10^-4, -2.56811*10^-5, 5.21205*10^-4, -9.92013*10^-4, 5.2282*10^-4, 4.02347*10^-4, 1.64552*10^-3, 4.88735*10^-3, -7.16065*10^-3, -1.16489*10^-3, 5.46722*10^-3, 5.91649*10^-3, -2.51933*10^-2, 6.86249*10^-3, 1.25277*10^-2, -2.22476*10^-2, 2.85481*10^-2, 1.69364*10^-2, -2.42674*10^-2, -6.12438*10^-3, 2.59762*10^-3, -7.59654*10^-3, 1.04596*10^-2, 7.95004*10^-3, -1.68353*10^-2, 2.37525*10^-3, 1.71455*10^-2, -1.58868*10^-2, -2.06715*10^-3, 1.14507*10^-2, -3.84699*10^-3, -5.75882*10^-3, 4.73693*10^-3, 4.44541*10^-3, -5.3719*10^-3, 7.07381*10^-3, -1.44816*10^-3, -8.83576*10^-3, 4.74825*10^-3, 3.46505*10^-3, -3.93443*10^-3, -1.88966*10^-3, 1.73706*10^-4, -3.47623*10^-3, -2.49524*10^-3, 3.02676*10^-3, -9.34111*10^-4, -1.06458*10^-3, -2.31743*10^-4, -1.57497*10^-4, -1.67037*10^-3, -3.0292*10^-3, -1.32391*10^-3, 1.38116*10^-3, 5.06015*10^-3, 2.69779*10^-3, 1.31753*10^-3, 5.56525*10^-4, 8.93187*10^-4, 2.29024*10^-3, 1.95557*10^-3, 1.35886*10^-3, -2.43386*10^-4, -1.04462*10^-3, -5.11794*10^-4, -1.02342*10^-3, -1.35237*10^-3, -3.60761*10^-4, -4.90595*10^-4, -6.67587*10^-4, -1.08501*10^-3, -2.71009*10^-3, -6.3472*10^-4, 9.17056*10^-4, 7.24254*10^-4, 7.04233*10^-4, -1.61289*10^-3, -9.26784*10^-4, 1.22065*10^-4, 2.94391*10^-6, -3.4728*10^-4, -1.24285*10^-3, 9.43769*10^-4, 1.1113*10^-3, -7.15588*10^-4, 4.09948*10^-4, 1.4052*10^-3, 6.92748*10^-4, 4.71341*10^-4, 3.15615*10^-4, 4.52161*10^-4, 9.45078*10^-4, 8.04685*10^-4, 8.21556*10^-6, -3.57801*10^-4, 5.83444*10^-7, 6.1747*10^-4, 3.98374*10^-4, 2.45972*10^-4, 1.13249*10^-4, -2.76345*10^-4, 1.21626*10^-4, 2.36304*10^-4, -2.22619*10^-4, -3.59817*10^-4, -9.72827*10^-5, 1.78986*10^-5, -2.0505*10^-4, -6.99009*10^-5, -1.10715*10^-4, -8.35894*10^-5, -4.12822*10^-5, -5.59518*10^-5, -3.75969*10^-5, -5.71836*10^-5, -1.51806*10^-5, -4.28309*10^-6, 6.88232*10^-7, 2.35351*10^-6, -1.47788*10^-7, 0));
h(24,1) = fi.fir((9.35012*10^-6, -5.35087*10^-5, -3.65476*10^-4, -2.45125*10^-4, 2.67346*10^-4, 6.04623*10^-4, -8.77518*10^-4, 1.16198*10^-4, 2.1498*10^-4, 1.02728*10^-3, -1.914*10^-3, 9.69097*10^-3, 4.07828*10^-2, 3.57639*10^-2, 8.26336*10^-3, -5.86346*10^-2, -6.61816*10^-2, -2.39763*10^-2, -4.34275*10^-2, -2.30372*10^-2, 5.32942*10^-3, 2.15685*10^-2, 5.31705*10^-2, 5.41351*10^-2, -4.37594*10^-3, 1.13766*10^-2, 3.23898*10^-2, 3.78819*10^-3, -6.9729*10^-3, -8.28142*10^-3, 1.34835*10^-2, -9.09249*10^-3, -1.45286*10^-2, -6.90546*10^-3, -3.55798*10^-3, -6.78837*10^-3, -1.82876*10^-2, -1.28663*10^-2, 2.19275*10^-3, 8.33522*10^-3, 8.3406*10^-5, -5.79098*10^-3, 3.15133*10^-3, 5.71376*10^-3, -4.30659*10^-3, -5.7374*10^-3, 3.28927*10^-3, 6.59259*10^-3, 1.34358*10^-3, 1.06006*10^-3, -1.49271*10^-3, 1.86571*10^-3, 3.56575*10^-3, 1.81036*10^-6, -3.46722*10^-4, 1.77995*10^-4, -1.24097*10^-4, 1.32287*10^-4, 6.14402*10^-5, 9.07871*10^-4, -1.91513*10^-4, -1.00305*10^-3, -1.00811*10^-4, -1.24849*10^-3, -5.35492*10^-4, -6.00765*10^-5, -7.01885*10^-4, -6.77036*10^-4, -1.84157*10^-3, -2.28896*10^-3, -1.51697*10^-3, 1.21332*10^-3, 2.94839*10^-3, 1.27728*10^-3, -6.31887*10^-4, -9.03401*10^-4, 3.26236*10^-4, -1.10683*10^-4, 1.24937*10^-3, 1.27678*10^-3, -1.93253*10^-5, 9.2739*10^-4, 8.16862*10^-4, 3.07199*10^-4, 1.09648*10^-3, 2.0883*10^-3, 7.45629*10^-4, -1.94134*10^-3, -1.87102*10^-3, -7.60785*10^-4, -1.1286*10^-3, -1.25057*10^-3, -5.22489*10^-4, -4.51032*10^-4, 7.48275*10^-5, 5.8756*10^-4, -1.16422*10^-4, 4.54606*10^-5, 3.94057*10^-4, 3.30823*10^-4, 4.43729*10^-4, 6.34335*10^-4, 7.10508*10^-4, 4.83306*10^-4, 5.21324*10^-4, 2.24978*10^-4, -4.46103*10^-5, 4.35921*10^-5, -1.50574*10^-4, 4.54877*10^-5, -2.53513*10^-4, -1.0568*10^-4, 2.11629*10^-4, 6.57646*10^-5, 5.95893*10^-5, -1.68436*10^-4, -2.68843*10^-4, -1.39565*10^-4, -5.68304*10^-5, -3.4888*10^-6, -6.92076*10^-5, -7.69788*10^-5, -3.3133*10^-5, -1.58658*10^-5, 3.83839*10^-6, 2.13798*10^-6, 8.78916*10^-7, 0));
h(25,1) = fi.fir((1.75745*10^-5, 1.46899*10^-4, 2.98616*10^-4, 2.91907*10^-4, -1.36334*10^-4, -5.05798*10^-4, 4.59936*10^-4, -1.05671*10^-3, -3.71296*10^-4, -1.11838*10^-3, 3.34114*10^-3, -1.35237*10^-2, -1.95576*10^-2, -5.53276*10^-3, 4.60016*10^-3, 4.94228*10^-2, 3.49525*10^-2, 1.69814*10^-2, 4.13115*10^-2, -1.99525*10^-2, -6.08337*10^-2, -4.261*10^-2, -4.6904*10^-2, -3.8218*10^-2, 9.49311*10^-3, 2.55713*10^-2, 2.3786*10^-2, 1.55105*10^-2, 3.00478*10^-2, 5.33536*10^-2, -3.29497*10^-3, -1.3194*10^-2, 5.26077*10^-3, -7.24585*10^-3, -5.95666*10^-3, -2.01764*10^-2, -1.41497*10^-2, 1.1094*10^-2, 9.51644*10^-3, -6.3158*10^-3, -1.71203*10^-2, -2.15968*10^-3, 2.37423*10^-3, -4.59366*10^-3, -3.3277*10^-3, -1.32678*10^-3, 4.36719*10^-4, -9.75091*10^-4, 2.9275*10^-3, 4.98083*10^-3, 3.75698*10^-3, 2.47108*10^-3, 1.81967*10^-3, -9.08305*10^-4, -2.80125*10^-3, 1.30247*10^-4, 3.40864*10^-3, 2.46043*10^-3, 1.88758*10^-3, 2.3077*10^-5, -1.32038*10^-3, -8.685*10^-4, -2.54997*10^-3, -2.42258*10^-3, -1.96148*10^-3, -1.87308*10^-3, -4.56271*10^-4, 9.99454*10^-4, 2.07461*10^-3, -1.27137*10^-3, -2.09749*10^-3, 3.52481*10^-3, 3.48921*10^-3, 2.07019*10^-5, 1.00514*10^-3, 3.1206*10^-3, 2.95256*10^-4, -3.28529*10^-3, -2.15363*10^-3, 9.74996*10^-4, 1.15759*10^-4, -2.08429*10^-3, -1.39596*10^-3, 2.88039*10^-4, 3.52237*10^-4, -8.81839*10^-4, -1.51922*10^-3, 1.19948*10^-3, 1.04628*10^-3, -6.85543*10^-4, 3.08893*10^-5, 9.46998*10^-4, 1.99563*10^-3, 7.05182*10^-4, -9.68873*10^-4, -1.91172*10^-3, -5.8996*10^-4, -9.38325*10^-5, -6.62862*10^-4, -7.00253*10^-5, 1.04924*10^-3, 6.33366*10^-4, -1.25815*10^-4, -6.02163*10^-5, 1.31514*10^-4, 2.49788*10^-4, 1.23289*10^-4, 6.38484*10^-6, 2.98695*10^-5, -7.74413*10^-5, -6.18813*10^-5, -2.91172*10^-4, -2.10773*10^-4, -4.13487*10^-5, 6.10882*10^-5, 7.31887*10^-5, 8.02268*10^-5, 2.289*10^-5, 4.08276*10^-5, 4.40934*10^-5, -1.03733*10^-5, 1.1964*10^-5, 9.03398*10^-6, -7.87942*10^-7, -1.11533*10^-5, -7.913*10^-6, -1.06573*10^-6, 0));
h(26,1) = fi.fir((1.2426*10^-5, -4.77088*10^-5, 1.74254*10^-5, 8.95737*10^-5, 6.94603*10^-6, -5.57998*10^-4, 6.11467*10^-4, -2.28106*10^-4, -3.03717*10^-4, 1.99821*10^-4, 6.37561*10^-4, -2.81438*10^-4, -1.05089*10^-3, -1.26156*10^-3, -7.92312*10^-3, 1.39144*10^-2, 6.49938*10^-3, -8.46662*10^-3, 4.52054*10^-3, 6.68414*10^-3, -2.83141*10^-2, 3.9259*10^-3, 3.43884*10^-2, -2.45073*10^-2, -1.76419*10^-3, 2.56057*10^-3, -1.40884*10^-4, 8.69002*10^-3, -2.1991*10^-3, -6.47077*10^-3, -9.24293*10^-3, 9.10019*10^-3, 1.66209*10^-3, -6.67199*10^-3, 5.0464*10^-3, 5.06006*10^-3, 2.58447*10^-4, -1.72143*10^-4, -2.42872*10^-3, 9.16115*10^-4, 9.92355*10^-4, 1.9535*10^-3, 1.9573*10^-3, -2.8023*10^-3, -4.1707*10^-3, 9.30843*10^-4, 3.45299*10^-4, -2.16593*10^-3, -1.48984*10^-3, -1.44952*10^-3, -9.69359*10^-4, -3.41713*10^-4, 1.87801*10^-3, -9.55175*10^-4, 6.30711*10^-5, 3.86306*10^-3, 1.72614*10^-3, -2.87262*10^-5, 1.01278*10^-3, 1.19309*10^-3, -1.30918*10^-3, -2.47843*10^-3, -5.99368*10^-4, -8.62886*10^-4, -4.50483*10^-4, -4.98383*10^-5, -6.25081*10^-4, 9.02621*10^-4, 1.73495*10^-3, 8.8974*10^-4, -5.08301*10^-4, 2.56778*10^-4, 2.023*10^-3, -2.65444*10^-4, 6.00058*10^-4, 2.7544*10^-3, -5.11977*10^-4, -2.79595*10^-3, -2.27893*10^-3, -1.5044*10^-3, -7.19575*10^-4, -2.48827*10^-4, -3.51084*10^-5, 3.99715*10^-4, -1.07648*10^-3, -2.01868*10^-3, -9.25746*10^-4, 7.67893*10^-4, 1.79612*10^-3, 7.40578*10^-4, -2.08784*10^-4, -5.24523*10^-4, -1.58131*10^-4, 5.07031*10^-4, 2.61123*10^-4, -7.04872*10^-4, -6.71401*10^-4, 3.81263*10^-4, 9.84421*10^-4, 9.53969*10^-4, 9.41409*10^-4, 5.03337*10^-4, 1.95336*10^-4, -1.24894*10^-4, 3.35934*10^-4, 5.48825*10^-4, 2.10516*10^-4, 4.97707*10^-4, 3.23931*10^-4, -9.83185*10^-5, -2.27783*10^-5, -1.5412*10^-4, 1.20834*10^-4, 9.9222*10^-5, -5.28381*10^-5, -8.80554*10^-5, -3.85857*10^-5, 5.25383*10^-5, -1.5899*10^-5, -1.58565*10^-5, -2.24063*10^-5, -4.13718*10^-5, -2.14482*10^-5, -6.95742*10^-6, -4.01784*10^-6, -6.53995*10^-7, -6.41601*10^-7, 0));
h(27,1) = fi.fir((-1.00563*10^-5, 5.9274*10^-5, 2.35554*10^-4, -3.5335*10^-4, -5.97894*10^-4, -7.15845*10^-4, 1.88223*10^-3, -1.71357*10^-3, 2.65382*10^-3, -3.06884*10^-3, 3.68918*10^-3, -1.19578*10^-2, -1.62451*10^-2, -2.60322*10^-2, 3.96346*10^-2, 7.41808*10^-2, -9.73336*10^-3, 1.97923*10^-2, -4.62601*10^-2, -3.74157*10^-2, 3.06522*10^-2, -3.63476*10^-2, -4.49094*10^-2, 9.48836*10^-3, 3.67587*10^-2, 2.54189*10^-2, -1.73924*10^-2, -2.07012*10^-2, 2.39723*10^-2, 2.80468*10^-3, 1.67917*10^-3, 1.25467*10^-2, 4.27576*10^-3, 1.1241*10^-2, 1.18508*10^-2, -6.11762*10^-4, -1.14478*10^-2, -1.26997*10^-2, -8.91142*10^-3, -1.21305*10^-2, -7.06148*10^-3, -1.97276*10^-3, -4.2019*10^-3, 2.15697*10^-3, 4.01709*10^-3, -4.71807*10^-3, -2.01605*10^-3, 8.74338*10^-3, 7.03788*10^-3, 3.42858*10^-3, 2.49072*10^-3, 6.1142*10^-3, 3.20897*10^-3, -6.67307*10^-4, -6.59524*10^-4, -1.37444*10^-3, 1.0144*10^-3, 2.05969*10^-3, -2.46821*10^-3, -1.53181*10^-3, 1.3799*10^-3, 8.26331*10^-4, -2.17175*10^-3, -5.63238*10^-3, -2.79104*10^-3, -1.11618*10^-3, -2.11442*10^-3, -2.07328*10^-4, 6.16098*10^-4, 1.70694*10^-3, 1.04743*10^-3, 6.32304*10^-4, 1.28951*10^-3, -5.49762*10^-4, -1.44309*10^-3, -1.1269*10^-3, 5.84764*10^-4, 8.1579*10^-4, 1.18839*10^-3, 2.26951*10^-3, 1.8906*10^-3, -4.12462*10^-4, -2.3686*10^-3, -2.87648*10^-3, -1.12341*10^-3, 5.21822*10^-4, 1.56127*10^-4, 1.30195*10^-4, 8.20513*10^-4, 1.70656*10^-3, 7.38411*10^-4, -4.16141*10^-4, -7.01969*10^-4, -4.32107*10^-4, -1.20732*10^-4, -1.08228*10^-3, -1.8442*10^-4, 9.55993*10^-4, 8.38237*10^-4, 1.02043*10^-3, 2.83175*10^-4, -5.39898*10^-4, -1.90144*10^-4, 1.35094*10^-5, -2.74943*10^-4, -2.79033*10^-4, 1.77257*10^-4, 2.1278*10^-4, 1.37094*10^-4, 1.9604*10^-4, -3.83873*10^-5, -2.54403*10^-4, -9.55285*10^-5, -1.40286*10^-5, -1.59793*10^-4, -1.89387*10^-4, -1.00599*10^-4, 3.46764*10^-5, 4.29566*10^-5, -7.46743*10^-6, 1.64162*10^-6, 3.71658*10^-7, 8.58456*10^-6, -3.6527*10^-7, 3.71601*10^-6, -8.32524*10^-7, -8.31327*10^-7, 0));
h(28,1) = fi.fir((4.42571*10^-6, -5.25139*10^-5, 4.80723*10^-5, -7.35592*10^-5, 4.77664*10^-5, -2.27046*10^-4, 2.09086*10^-4, -1.4026*10^-4, -2.81565*10^-5, 1.09371*10^-4, -1.18816*10^-5, -2.92397*10^-4, 1.2743*10^-4, -1.64412*10^-3, -4.13328*10^-3, 7.62388*10^-3, 4.75107*10^-3, -7.01003*10^-3, 8.55208*10^-3, -1.04871*10^-2, -1.38051*10^-2, 2.21686*10^-2, -6.08628*10^-3, 7.39797*10^-4, 3.0502*10^-3, -9.89071*10^-3, 4.92144*10^-3, 3.02305*10^-4, -4.89462*10^-3, 3.46101*10^-3, 1.11627*10^-2, -7.56119*10^-3, -7.24114*10^-3, 4.09864*10^-3, 8.23437*10^-3, 1.4973*10^-3, -4.40095*10^-3, -7.53947*10^-3, 2.14502*10^-3, 4.49558*10^-3, -2.4353*10^-3, -3.68379*10^-3, 1.46191*10^-3, 5.10677*10^-4, -2.50409*10^-3, 7.47175*10^-4, 1.79311*10^-3, 9.22453*10^-4, -2.456*10^-3, 7.52408*10^-4, 1.63234*10^-3, 1.28692*10^-3, 1.01539*10^-3, 1.08284*10^-3, 2.19494*10^-3, 3.08748*10^-3, 4.96248*10^-4, 7.71643*10^-4, 1.18863*10^-3, -8.68116*10^-4, -2.69635*10^-3, -2.6382*10^-3, -1.91084*10^-3, -2.79993*10^-3, -3.23837*10^-3, -2.68603*10^-3, -1.86269*10^-3, -1.86959*10^-3, -1.27989*10^-3, 2.01564*10^-3, 2.76083*10^-3, 9.86549*10^-4, -8.7314*10^-4, 1.26592*10^-3, 4.80566*10^-3, 2.13314*10^-3, 1.68506*10^-3, 1.2087*10^-3, -4.96449*10^-4, -7.57128*10^-4, -1.77717*10^-3, -1.01262*10^-3, 1.0737*10^-3, 1.35725*10^-3, 2.15705*10^-4, -7.83307*10^-4, 1.46598*10^-4, 8.85188*10^-4, 8.33678*10^-4, 3.04239*10^-4, -3.98159*10^-4, -8.54766*10^-4, -1.32091*10^-3, -5.35662*10^-4, 8.28129*10^-5, 3.82586*10^-4, -7.23748*10^-5, -8.28216*10^-4, -8.18907*10^-5, 5.12723*10^-4, 3.70794*10^-4, -1.75629*10^-4, -3.78407*10^-4, 2.2061*10^-4, -6.95443*10^-5, -5.58027*10^-4, -2.90926*10^-4, -1.97983*10^-4, 1.29549*10^-4, -1.29874*10^-6, -1.1364*10^-4, 8.94487*10^-5, -9.41637*10^-5, -1.60941*10^-4, -1.69719*10^-4, 2.72544*10^-5, 1.00615*10^-4, -5.87972*10^-5, -4.64086*10^-5, -1.40473*10^-5, 4.62928*10^-5, 2.68796*10^-5, -1.42806*10^-5, -3.50232*10^-6, 7.56753*10^-6, 4.54977*10^-6, -4.9856*10^-7, 0));
h(29,1) = fi.fir((1.72514*10^-5, 2.02799*10^-4, 1.8682*10^-4, 1.60664*10^-4, -4.56519*10^-6, 3.3872*10^-4, -1.28234*10^-3, -3.60277*10^-4, -1.9713*10^-4, -7.16211*10^-5, 7.59286*10^-4, -7.38491*10^-3, -1.19741*10^-2, 3.51663*10^-3, 3.92377*10^-3, 5.26516*10^-4, 3.00314*10^-2, 3.97127*10^-2, 2.70782*10^-2, -1.77782*10^-2, -3.70878*10^-2, -3.91555*10^-2, -4.40249*10^-2, -8.97252*10^-3, -5.0746*10^-3, 6.93356*10^-3, 4.16227*10^-2, 3.0071*10^-2, 2.15117*10^-2, 1.71091*10^-2, -5.29178*10^-3, -1.18732*10^-2, -9.87757*10^-3, -2.20865*10^-3, -1.07476*10^-2, -1.07259*10^-2, 4.16279*10^-3, 6.76094*10^-4, -2.13691*10^-3, 2.86477*10^-3, 3.57658*10^-3, -2.46872*10^-3, -9.27232*10^-3, -4.00764*10^-3, 1.66773*10^-3, 1.61128*10^-3, 4.27902*10^-4, -4.86256*10^-3, -4.47439*10^-3, 2.3905*10^-3, 6.67455*10^-3, 3.03536*10^-3, 1.64915*10^-3, 2.73609*10^-3, -2.71304*10^-4, -1.10411*10^-3, -3.4311*10^-4, -2.00575*10^-4, 1.42515*10^-3, 7.5748*10^-4, -6.2549*10^-4, -2.51395*10^-4, -4.0375*10^-4, 2.30371*10^-5, -1.85713*10^-3, -1.7735*10^-3, -4.67836*10^-4, 2.24438*10^-5, 2.44374*10^-3, -3.6717*10^-4, -1.40439*10^-3, -3.85146*10^-4, -2.78346*10^-4, 1.81392*10^-3, 1.83653*10^-3, 1.19337*10^-4, -2.69222*10^-3, -2.05297*10^-3, -5.49832*10^-4, -6.56534*10^-4, -4.99124*10^-4, 1.98928*10^-3, 2.30627*10^-3, 8.69766*10^-4, 4.68453*10^-4, -6.54213*10^-4, -9.48419*10^-4, -1.15308*10^-3, -9.4006*10^-4, 1.11535*10^-4, 1.58769*10^-3, 2.07482*10^-3, 5.33459*10^-4, -1.09815*10^-4, 9.2514*10^-5, -1.38243*10^-3, -1.83849*10^-3, -1.08857*10^-3, -7.13545*10^-4, 7.82302*10^-5, 1.09697*10^-3, 9.86079*10^-4, 7.54206*10^-4, 7.56137*10^-4, -2.0109*10^-5, -4.71166*10^-4, -4.71096*10^-4, 1.7491*10^-5, 1.12602*10^-4, -1.84757*10^-4, 3.20605*10^-5, -2.10856*10^-4, -8.98024*10^-5, 4.41671*10^-5, 8.48396*10^-5, 1.55277*10^-5, 6.40002*10^-5, 6.22259*10^-5, -7.16573*10^-5, -4.57601*10^-6, -7.5315*10^-6, -1.40902*10^-5, -9.16519*10^-6, -3.96373*10^-6, -5.00245*10^-6, -3.87501*10^-6, -4.69133*10^-7, 0));
h(30,1) = fi.fir((-1.05977*10^-5, -5.86263*10^-6, 2.69518*10^-4, -1.26525*10^-4, -4.52774*10^-4, 5.0002*10^-4, 2.41483*10^-4, -4.51158*10^-6, -6.87059*10^-4, 1.09752*10^-3, -1.20929*10^-3, 1.06518*10^-3, -1.35867*10^-2, -2.28244*10^-3, 3.37715*10^-2, 1.36485*10^-2, -1.589*10^-2, -3.46426*10^-2, 4.41343*10^-3, -1.42898*10^-3, 1.76399*10^-2, 3.29432*10^-2, -3.62081*10^-2, -6.68881*10^-3, -9.56696*10^-3, 1.12001*10^-2, 8.05071*10^-3, 6.88129*10^-4, 6.31159*10^-3, -1.46507*10^-2, 1.09057*10^-2, -5.01016*10^-3, -3.74484*10^-3, -1.11508*10^-3, 1.38261*10^-2, 9.22232*10^-4, -1.71481*10^-2, -3.49336*10^-4, -4.60814*10^-4, 5.75083*10^-3, 9.46257*10^-3, 9.05153*10^-4, -2.65807*10^-3, -4.34325*10^-3, 8.74476*10^-4, 9.42166*10^-4, 2.59628*10^-3, 4.75582*10^-3, -2.48036*10^-3, -2.60247*10^-3, -3.90607*10^-3, 7.86462*10^-4, 2.61399*10^-3, 2.73783*10^-3, -5.18858*10^-4, -4.45753*10^-3, -4.27208*10^-3, -2.76925*10^-3, -1.3237*10^-3, -1.34827*10^-3, -3.49078*10^-4, 8.65055*10^-4, -3.97991*10^-4, -2.80854*10^-3, -1.37461*10^-3, 3.96601*10^-3, 6.43215*10^-3, 3.14286*10^-3, -1.77889*10^-3, -9.95502*10^-4, 1.82123*10^-3, 1.4475*10^-3, 3.40608*10^-4, -7.72423*10^-4, 1.89618*10^-4, 8.67725*10^-4, 4.77414*10^-4, -3.48148*10^-5, 1.28504*10^-3, 1.66311*10^-3, -7.54096*10^-5, -1.73577*10^-4, -4.56731*10^-4, -1.94944*10^-3, -1.84168*10^-3, -4.10563*10^-4, 4.80377*10^-4, 3.29585*10^-4, 1.96801*10^-4, -5.9544*10^-4, -1.58268*10^-3, -8.97449*10^-4, 5.22556*10^-4, 5.07778*10^-4, 9.75903*10^-4, 1.27258*10^-3, -4.88943*10^-4, -1.04705*10^-3, -6.10951*10^-4, -2.51397*10^-4, -1.7389*10^-4, 1.79626*10^-4, 3.07713*10^-4, -2.64718*10^-6, 1.21443*10^-5, -3.27868*10^-5, 9.54264*10^-5, -6.01777*10^-5, -2.66374*10^-4, -4.29445*10^-6, 1.45441*10^-4, 3.37082*10^-4, -1.30989*10^-5, -1.75064*10^-4, 1.04909*10^-5, 1.10349*10^-4, 7.62055*10^-5, -1.22155*10^-5, -6.81875*10^-6, 3.71672*10^-5, 4.54373*10^-5, 2.86475*10^-6, -1.06744*10^-5, -1.45709*10^-5, -3.72582*10^-7, 1.88015*10^-6, -1.63011*10^-7, 0));
h(31,1) = fi.fir((3.63197*10^-6, -4.17893*10^-5, 2.45768*10^-5, -1.34394*10^-4, 1.50699*10^-4, -8.45052*10^-5, -2.68248*10^-4, -2.68464*10^-4, 6.01937*10^-4, 6.75301*10^-4, -8.7964*10^-4, -4.40041*10^-4, 1.13343*10^-3, 4.75425*10^-4, -4.00795*10^-3, -6.47921*10^-4, 5.94561*10^-3, 1.26277*10^-2, 2.50689*10^-3, -4.30838*10^-2, -7.39102*10^-4, 3.85717*10^-2, -4.28972*10^-3, -4.64304*10^-3, -1.6027*10^-2, 1.70557*10^-2, 1.26768*10^-2, -1.12476*10^-2, -3.82452*10^-3, -1.07588*10^-2, 1.15049*10^-2, -6.29321*10^-3, -4.74255*10^-3, 5.58298*10^-3, 6.44089*10^-3, 1.04873*10^-4, -6.63592*10^-3, 7.18382*10^-3, -1.00255*10^-3, -5.59198*10^-3, -9.87406*10^-4, -3.41198*10^-3, -6.22494*10^-4, -9.36523*10^-4, 1.15447*10^-3, 9.73388*10^-4, 1.62607*10^-3, 2.03041*10^-3, -1.79843*10^-3, 1.97711*10^-3, 1.25431*10^-3, 1.92313*10^-3, 2.94417*10^-3, 5.09311*10^-3, 3.40691*10^-3, -2.40451*10^-3, -1.35731*10^-3, 3.72132*10^-4, -1.52802*10^-3, -3.56673*10^-3, -3.94725*10^-3, -2.08793*10^-3, -9.67496*10^-4, 7.06466*10^-4, 2.09277*10^-4, -9.2161*10^-4, 2.89724*10^-3, 3.8661*10^-3, 6.22213*10^-4, -8.51723*10^-4, 1.52091*10^-3, 2.18308*10^-5, -1.30001*10^-3, -1.3667*10^-3, -3.36625*10^-3, -2.26563*10^-3, -9.35397*10^-4, 1.24657*10^-3, 1.29894*10^-3, 6.93492*10^-4, 1.36393*10^-3, 4.27555*10^-4, -5.36187*10^-4, -2.65679*10^-3, -2.42276*10^-3, -7.04107*10^-4, 5.54658*10^-4, 5.9552*10^-4, -1.18464*10^-3, -4.89254*10^-4, 1.09719*10^-3, 2.20104*10^-3, 1.98143*10^-3, 7.49778*10^-4, 3.33683*10^-4, -3.61494*10^-4, 7.21114*10^-4, 1.34956*10^-3, 5.9681*10^-4, 6.10358*10^-4, 7.25472*10^-4, 3.90337*10^-4, -1.48989*10^-4, -4.89266*10^-4, -3.09042*10^-4, -2.36409*10^-4, -1.32294*10^-4, -4.35343*10^-5, -2.01118*10^-4, -2.4303*10^-4, -2.94806*10^-4, -4.64657*10^-4, -2.47144*10^-4, -1.45969*10^-5, -7.18141*10^-5, -1.23111*10^-4, -1.74271*10^-4, -6.39473*10^-5, 3.00874*10^-5, -7.7359*10^-5, -7.41747*10^-5, 2.71876*10^-5, 6.36235*10^-5, 3.12801*10^-5, -4.71864*10^-7, -3.30959*10^-6, 1.23727*10^-7, 0));
h(32,1) = fi.fir((-1.5164*10^-5, 1.02701*10^-5, 1.41547*10^-4, -7.76787*10^-5, -9.04689*10^-4, 4.66854*10^-4, 3.55339*10^-4, -1.87639*10^-4, -1.11055*10^-3, 8.663*10^-4, -8.22522*10^-4, 9.9208*10^-4, -1.70128*10^-2, -1.57207*10^-3, 3.93297*10^-2, 1.49163*10^-2, -2.79797*10^-2, -3.55512*10^-2, 6.42963*10^-3, 3.52265*10^-2, 1.30171*10^-2, 6.14379*10^-3, -2.02561*10^-2, -5.19214*10^-2, 1.02132*10^-2, 2.45356*10^-2, 2.06716*10^-2, -1.51029*10^-3, -2.2164*10^-2, -9.11925*10^-3, -8.62691*10^-3, 2.35389*10^-2, 1.1447*10^-2, -1.31559*10^-3, -1.03384*10^-2, -1.48828*10^-3, 3.21049*10^-3, -2.7003*10^-3, 9.47477*10^-3, 1.01988*10^-3, -5.15505*10^-3, -4.1224*10^-3, -6.57104*10^-3, 2.78443*10^-3, 6.73849*10^-3, 3.25351*10^-3, -4.39663*10^-3, -5.66711*10^-3, 1.41698*10^-3, -1.67894*10^-3, 2.45316*10^-3, 4.59245*10^-3, 2.2929*10^-3, -3.16872*10^-3, -4.27748*10^-3, 2.75949*10^-4, 3.22519*10^-3, 3.55722*10^-3, 2.48167*10^-3, -1.11709*10^-3, -3.5176*10^-3, -3.13317*10^-3, -1.723*10^-3, -8.63605*10^-4, 8.44115*10^-4, 1.26202*10^-3, 4.58586*10^-6, 1.27345*10^-4, -6.5914*10^-4, -1.7622*10^-4, 7.88594*10^-4, 2.76781*10^-3, 2.43735*10^-3, -2.16451*10^-3, -1.70087*10^-3, 1.00277*10^-3, 7.9166*10^-4, 1.67515*10^-3, 2.15798*10^-4, -9.9123*10^-4, -1.56334*10^-3, -1.68341*10^-3, 3.25692*10^-4, 9.56928*10^-4, 2.0754*10^-5, -1.90896*10^-3, -2.64317*10^-3, 1.83213*10^-4, 8.50208*10^-4, -5.55223*10^-4, -9.65448*10^-4, -8.72375*10^-4, -1.45471*10^-3, -2.25587*10^-3, -1.03743*10^-3, 1.09749*10^-3, 1.38833*10^-3, 3.86128*10^-4, 3.49077*10^-4, 1.40134*10^-4, 3.74136*10^-4, -2.56234*10^-5, -2.37476*10^-4, 3.39702*10^-4, 5.52412*10^-4, 2.23003*10^-4, -2.40769*10^-4, -1.23724*10^-4, 4.94989*10^-4, 2.98805*10^-4, -1.87967*10^-4, -1.46232*10^-4, 1.73897*10^-5, -3.34046*10^-5, 5.13725*10^-5, 2.16907*10^-4, 1.12568*10^-4, -7.63593*10^-5, -6.98524*10^-5, -8.69074*10^-5, -2.7445*10^-5, 3.56627*10^-5, 7.37787*10^-6, 3.66075*10^-7, 2.76592*10^-6, 3.84136*10^-6, -6.72085*10^-7, 0));
h(33,1) = fi.fir((1.01375*10^-5, -2.49811*10^-5, 4.65485*10^-5, -2.29372*10^-4, -6.88701*10^-5, -3.90714*10^-4, -1.07298*10^-4, -3.65628*10^-4, 8.87982*10^-4, 6.98917*10^-4, -8.64595*10^-4, -5.15935*10^-4, -3.04341*10^-4, 1.81913*10^-3, -4.17119*10^-3, 5.48634*10^-3, 1.9924*10^-3, 1.36526*10^-2, -1.02873*10^-3, -4.68348*10^-2, 1.59373*10^-3, 3.60815*10^-2, -9.42342*10^-3, -2.29176*10^-2, 3.09503*10^-3, 3.77746*10^-2, 2.88282*10^-2, -3.17335*10^-2, -1.62549*10^-2, 2.04141*10^-4, -1.84381*10^-2, 4.27428*10^-3, 8.99894*10^-3, 6.85897*10^-3, 6.04322*10^-3, -3.95258*10^-3, 3.91352*10^-3, 3.16628*10^-3, 1.33088*10^-3, 3.90822*10^-4, -3.48179*10^-3, -2.61772*10^-3, -5.58366*10^-3, -4.76877*10^-3, 1.58516*10^-3, 6.54236*10^-3, 1.89017*10^-3, -3.3063*10^-3, -8.1561*10^-5, -1.03839*10^-4, 5.74132*10^-4, 2.0712*10^-3, 1.21332*10^-3, 1.80529*10^-3, -2.31329*10^-3, -3.80022*10^-3, -1.45005*10^-3, 2.37035*10^-3, 3.67069*10^-3, 3.02275*10^-4, -4.9128*10^-3, -5.15866*10^-3, -1.35669*10^-3, 9.76814*10^-5, 5.91784*10^-4, 8.61779*10^-4, 1.43107*10^-3, 2.88222*10^-4, -1.00629*10^-3, 1.60129*10^-3, 2.04694*10^-3, 5.91966*10^-4, 7.35529*10^-4, 1.78321*10^-4, 4.39099*10^-4, -9.54427*10^-4, 4.36226*10^-4, 2.77631*10^-3, 3.0928*10^-3, 2.62714*10^-3, -1.35578*10^-3, -1.08538*10^-3, 4.79579*10^-4, -1.78226*10^-3, -3.17387*10^-3, -1.79845*10^-3, 1.05056*10^-3, -2.99232*10^-5, -1.03551*10^-3, -5.69112*10^-4, 6.01508*10^-4, 1.58322*10^-3, -8.23208*10^-4, -1.99189*10^-3, -2.4809*10^-4, 5.06377*10^-4, -8.9911*10^-4, -4.05136*10^-4, 6.31182*10^-4, 2.25169*10^-4, -3.08355*10^-4, -3.50962*10^-4, 5.02959*10^-4, 1.08012*10^-4, -6.87927*10^-4, -5.45958*10^-4, 3.48008*10^-4, 7.64329*10^-4, -1.32916*10^-5, -4.51546*10^-4, 1.87338*10^-4, 6.212*10^-4, 2.56356*10^-4, 2.39158*10^-5, -2.30096*10^-5, 8.15938*10^-6, -2.47797*10^-5, -1.31011*10^-5, 8.27008*10^-5, 4.74732*10^-5, -2.03243*10^-6, 8.23851*10^-7, 9.54223*10^-6, 6.97606*10^-6, 3.78575*10^-6, -1.43513*10^-6, -7.8919*10^-7, 0));
h(34,1) = fi.fir((-4.23075*10^-6, -4.21605*10^-5, -5.52922*10^-5, -1.59978*10^-4, 2.93752*10^-4, -2.06297*10^-4, -9.32457*10^-4, 5.97987*10^-4, 7.46486*10^-4, -7.91399*10^-4, -1.50718*10^-3, 1.53082*10^-3, -6.45897*10^-3, -4.12302*10^-4, -4.28109*10^-3, 3.11497*10^-3, 4.2757*10^-2, 2.62717*10^-3, -3.41347*10^-2, -3.25426*10^-2, 2.15351*10^-2, 2.80744*10^-2, -3.69366*10^-2, 1.38136*10^-2, 1.36663*10^-2, -1.98677*10^-2, 1.33925*10^-2, -1.66183*10^-3, -1.22118*10^-2, 2.64607*10^-3, 3.0944*10^-3, 8.2787*10^-3, 6.12769*10^-3, -1.72205*10^-3, -2.41709*10^-2, -3.63107*10^-3, 1.89019*10^-2, 5.92862*10^-3, -4.12913*10^-3, -7.29143*10^-3, -1.32075*10^-3, -2.22156*10^-3, 7.58612*10^-3, 5.85264*10^-3, -2.90549*10^-3, -2.43273*10^-3, -1.26632*10^-3, -2.39696*10^-4, 2.34591*10^-3, 3.9225*10^-3, 1.88155*10^-3, -2.30692*10^-3, -1.60383*10^-3, -3.26795*10^-3, -3.05104*10^-3, 7.90294*10^-4, 2.08479*10^-3, -4.36044*10^-4, -1.79432*10^-3, 8.07006*10^-4, 1.60437*10^-4, -3.77872*10^-4, 2.68202*10^-3, 2.18859*10^-3, -5.50278*10^-4, -2.15952*10^-3, -2.47974*10^-3, -1.38293*10^-3, 1.16165*10^-3, 3.82518*10^-3, 1.23554*10^-3, -9.52937*10^-4, -1.41146*10^-3, -5.3795*10^-4, 2.01899*10^-4, -2.3482*10^-4, 5.14625*10^-6, -7.19536*10^-4, 8.17245*10^-6, 1.51931*10^-3, 2.97595*10^-4, -1.98034*10^-4, 1.56951*10^-3, -2.80705*10^-4, -2.20105*10^-3, -1.3306*10^-3, -1.12762*10^-3, -1.25525*10^-3, -1.4361*10^-4, 1.2728*10^-3, 2.60613*10^-4, -1.18816*10^-3, -4.00668*10^-4, -3.24235*10^-4, -1.54521*10^-3, -6.33094*10^-4, 2.84425*10^-4, -3.19442*10^-4, -3.78649*10^-4, 2.76423*10^-4, 7.36034*10^-5, -6.94307*10^-5, 2.18866*10^-4, 3.09816*10^-4, 4.41506*10^-4, 2.11596*10^-4, 1.0837*10^-4, -1.01793*10^-4, 6.99201*10^-5, 4.77425*10^-4, -8.02488*10^-5, -1.08287*10^-4, 2.02515*10^-4, 1.81432*10^-4, -1.31045*10^-5, 1.57635*10^-5, 9.60958*10^-6, 3.04029*10^-5, 2.47107*10^-5, -7.85942*10^-6, -6.0562*10^-6, -1.85995*10^-5, -2.64133*10^-7, -1.0509*10^-5, -1.72572*10^-7, 5.22982*10^-7, -3.53876*10^-7, 0));
h(35,1) = fi.fir((1.12765*10^-5, -3.65911*10^-5, 1.06173*10^-4, -5.33286*10^-4, -1.69883*10^-4, -5.69943*10^-4, 1.61338*10^-3, -4.73348*10^-4, -1.36568*10^-5, -9.0807*10^-4, 2.09803*10^-3, -9.92748*10^-4, -9.21977*10^-3, 2.71609*10^-3, 1.64873*10^-2, 2.93523*10^-2, -2.32394*10^-2, -4.09862*10^-2, 7.27637*10^-3, 8.22568*10^-3, -9.44457*10^-3, -2.5463*10^-2, 9.93941*10^-3, 6.29214*10^-2, 1.14492*10^-2, -7.04191*10^-3, 2.81423*10^-3, -2.21118*10^-2, -1.21284*10^-2, -6.07418*10^-3, 4.15989*10^-3, -2.93199*10^-3, -9.59867*10^-3, -8.7117*10^-3, 2.89994*10^-3, 9.09699*10^-3, 3.25678*10^-3, -1.67883*10^-3, -1.11825*10^-3, 5.42193*10^-3, 6.68591*10^-4, -5.09335*10^-3, 2.98655*10^-3, 6.97034*10^-3, 7.70276*10^-4, -1.12635*10^-3, 6.42569*10^-4, 3.29707*10^-3, -1.49884*10^-4, -2.18477*10^-3, -8.68943*10^-5, 2.22795*10^-3, -2.68978*10^-3, -5.62012*10^-3, -5.35669*10^-3, 1.85839*10^-3, 5.87075*10^-3, 2.29604*10^-3, -8.41582*10^-4, -1.51538*10^-3, 1.84832*10^-3, 1.27824*10^-3, -9.7666*10^-4, -1.15073*10^-3, -4.60191*10^-4, -2.181*10^-4, -3.53714*10^-4, -4.96173*10^-4, -2.88855*10^-4, 7.91697*10^-4, 4.2063*10^-4, -6.69976*10^-4, 1.29987*10^-3, -1.32234*10^-3, -1.28346*10^-3, 1.37812*10^-3, 1.4116*10^-3, 2.86537*10^-4, -2.00664*10^-3, -1.3521*10^-3, 3.42351*10^-4, 2.97016*10^-4, -3.18298*10^-5, -3.24878*10^-4, 6.07156*10^-4, 1.39777*10^-3, -7.19942*10^-4, -1.347*10^-3, 4.89703*10^-4, 7.94729*10^-4, -3.85158*10^-4, -1.37693*10^-3, -1.0998*10^-4, 4.59358*10^-4, -3.56807*10^-4, 4.57207*10^-4, 6.47257*10^-4, 2.83578*10^-4, 3.40922*10^-4, 3.48375*10^-4, 6.2797*10^-4, 4.59552*10^-4, 7.54328*10^-5, 3.15497*10^-4, 3.18047*10^-4, -6.81554*10^-5, -1.63798*10^-4, 1.16481*10^-4, 2.4529*10^-4, 1.23295*10^-4, -1.30172*10^-4, -1.87145*10^-4, 1.02567*10^-4, 1.60079*10^-4, -7.18506*10^-5, -1.47306*10^-4, -1.31546*10^-4, -6.18916*10^-5, -3.97443*10^-5, -6.46746*10^-5, -3.96236*10^-5, -1.86122*10^-5, -1.09357*10^-5, -1.29722*10^-5, -1.88962*10^-6, 5.36799*10^-7, 4.90107*10^-7, 0));
|
https://raw.githubusercontent.com/sekisushai/ambitools/2d21b7cc7cfe9bc35d91d51ec05bf9250372f0ce/Faust/src/hoa_decoder_lebedev50_binaural.dsp
|
faust
|
Description: Binaural decoder for a virtual 50-node Lebedev grid [1]. HRTFs of a Neumann KU-100 from [2].
References:
[1] Lecomte, P., Gauthier, P.-A., Langrenne, C., Garcia, A., & Berry, A. (2015). On the use of a Lebedev grid for Ambisonics. In Audio Engineering Society Convention 139. New York.
[2] B. Bernschütz, “A spherical far field hrir/hrtf compilation of the neumann ku 100,” in Proceedings of the 40th Italian (AIA) Annual Conference on Acoustics and the 39th German Annual Conference on Acoustics (DAGA) Conference on Acoustics, 2013, p. 29.
Inputs: (M+1)^2
Outputs: 2
WARNING: very CPU consuming if taking order up to 5 (36 linear convolution involved, prefer solution like jconvolver...)
Filter bank
Gains
|
declare name "Binaural decoder";
declare version "1.0";
declare author "Pierre Lecomte";
declare license "GPL)";
declare copyright "(c) Pierre Lecomte 2015";
import("stdfaust.lib");
import("gui.lib");
M = 5;
mix(0) = par(i,(M+1)^2,h(i,0)):>_*volout;
mix(1) = par(i,(M+1)^2,h(i,1)):>_*volout;
volin = vslider("[1]Inputs Gain[unit:dB][osc:/levelin -10 10]", 0, -10, 10, 0.1) : ba.db2linear : si.smooth(0.999);
volout = vslider("[2]Outputs Gain[unit:dB][osc:/levelout -10 10]", 0, -10, 10, 0.1) : ba.db2linear : si.smooth(0.999);
process = hgroup("Inputs",par(i,(M+1)^2,_*volin):par(i,M+1,metermute(i))<:(mix(0),mix(1))):vgroup("Outputs",hgroup("Left",hmeter),hgroup("Right",hmeter));
h(0,0) = fi.fir((2.51182*10^-5, 1.23708*10^-4, -1.7378*10^-4, 9.68384*10^-4, 5.9949*10^-4, 7.67728*10^-4, 1.41179*10^-4, 1.86342*10^-3, 2.49571*10^-4, 1.15892*10^-3, 5.08795*10^-4, 3.63026*10^-3, 5.65104*10^-2, 4.93423*10^-2, 4.49074*10^-2, 6.47491*10^-2, 5.96065*10^-2, 7.34951*10^-2, 3.45148*10^-2, 5.57725*10^-2, 6.59684*10^-2, 5.78092*10^-2, 9.68951*10^-2, 2.12609*10^-2, -1.5415*10^-2, 3.17463*10^-2, 5.28391*10^-2, 3.06246*10^-2, -1.14164*10^-2, 8.70641*10^-3, 2.66261*10^-2, 1.13663*10^-2, 5.70825*10^-3, 2.3002*10^-2, 2.00236*10^-2, 4.46807*10^-3, 1.41227*10^-2, 7.9812*10^-3, 6.93019*10^-3, 1.15891*10^-2, 6.4973*10^-3, 5.69457*10^-3, 7.43299*10^-3, 2.88578*10^-3, 7.92482*10^-3, 1.50058*10^-2, 2.50454*10^-3, -2.96739*10^-3, 3.06785*10^-3, 1.75234*10^-3, 8.6377*10^-4, 3.66525*10^-3, 2.8834*10^-3, 3.25793*10^-3, 3.05273*10^-3, 1.24616*10^-3, 1.21185*10^-3, 5.00282*10^-3, 3.61293*10^-3, 3.12119*10^-3, 4.22506*10^-3, 3.57753*10^-3, 6.80407*10^-3, 6.23851*10^-3, 4.2153*10^-3, 2.74035*10^-3, 2.30892*10^-3, 3.42846*10^-3, 2.25593*10^-3, 1.4647*10^-3, 1.85049*10^-3, 3.21075*10^-3, 5.23563*10^-3, 3.08689*10^-3, 2.91291*10^-3, 6.37431*10^-3, 4.19458*10^-3, 8.28477*10^-4, 2.4405*10^-3, 4.19052*10^-3, 2.43653*10^-3, -1.06944*10^-3, 5.63692*10^-4, 1.57017*10^-3, -3.11911*10^-4, 1.67995*10^-3, 5.17576*10^-3, 3.70831*10^-3, -1.41242*10^-3, -1.34669*10^-3, 4.13299*10^-4, -1.48382*10^-3, -2.49697*10^-3, 2.3955*10^-5, 2.14615*10^-3, 2.72945*10^-3, 5.4874*10^-4, -5.44865*10^-4, 5.84702*10^-4, 6.12825*10^-4, 5.06834*10^-4, 8.77276*10^-4, 1.54024*10^-3, 1.85348*10^-3, 1.20654*10^-3, 1.40592*10^-3, 1.36699*10^-3, 1.2923*10^-3, 9.43651*10^-4, 8.34515*10^-4, 9.81663*10^-4, 6.76256*10^-4, 5.0102*10^-4, 5.33584*10^-4, 5.47366*10^-4, 4.53824*10^-4, 3.416*10^-4, 2.58553*10^-4, 1.68725*10^-4, 1.64044*10^-4, 1.06546*10^-4, 4.25413*10^-5, 1.87179*10^-5, 2.09787*10^-5, 5.71261*10^-6, 5.08139*10^-6, 2.06253*10^-6, 0));
h(1,0) = fi.fir((3.39551*10^-5, 1.5469*10^-4, -3.15062*10^-4, 1.22991*10^-3, 5.86903*10^-4, 1.14689*10^-3, -4.14599*10^-4, 1.94177*10^-3, -1.67329*10^-4, 1.81104*10^-3, -1.17791*10^-3, 5.45812*10^-3, 9.05515*10^-2, 7.71319*10^-2, 6.08862*10^-2, 7.81434*10^-2, 6.36584*10^-2, 8.89548*10^-2, 2.93457*10^-2, 2.14629*10^-2, 4.13412*10^-2, 5.06357*10^-2, 5.85082*10^-2, -3.46875*10^-2, -4.27948*10^-2, -6.03285*10^-4, -9.5142*10^-3, -1.60175*10^-2, -3.94065*10^-2, -3.90074*10^-2, -1.25257*10^-2, -5.21665*10^-3, -1.93807*10^-2, -3.57626*10^-2, -2.6437*10^-2, -1.80915*10^-2, -2.39676*10^-2, -2.69667*10^-2, -2.52633*10^-2, -1.5369*10^-2, -8.62273*10^-3, -2.03737*10^-2, -2.21845*10^-2, -1.88738*10^-2, -1.60792*10^-2, -8.87528*10^-3, -1.16756*10^-2, -1.61942*10^-2, -1.66062*10^-2, -1.28559*10^-2, -1.51194*10^-2, -1.59132*10^-2, -9.58195*10^-3, -6.87643*10^-3, -7.66095*10^-3, -1.00582*10^-2, -1.04416*10^-2, -4.54199*10^-3, -3.77104*10^-3, -4.75476*10^-3, -2.79511*10^-3, -4.74844*10^-3, -4.44703*10^-3, -2.46014*10^-3, -1.70561*10^-3, -2.43748*10^-3, -2.1747*10^-3, -1.57916*10^-3, -3.01046*10^-3, -2.3879*10^-3, -1.02903*10^-3, 1.03767*10^-4, 1.61521*10^-3, 4.6795*10^-4, -1.84981*10^-3, -1.89912*10^-3, -9.29744*10^-4, 1.77653*10^-3, 2.78163*10^-3, 5.87931*10^-4, 2.36486*10^-5, -1.17495*10^-3, 3.31327*10^-4, 3.00031*10^-3, 1.04984*10^-3, 8.84337*10^-4, 1.36716*10^-3, 1.33451*10^-3, 4.59752*10^-4, 2.64467*10^-4, 6.79848*10^-5, -1.38672*10^-4, 1.08099*10^-3, 1.6778*10^-3, 2.14314*10^-3, 1.36595*10^-3, 6.23519*10^-4, 8.13006*10^-4, 9.22271*10^-4, 4.56141*10^-4, 7.05385*10^-4, 7.09739*10^-4, 4.32368*10^-4, 4.7704*10^-4, 4.69697*10^-4, 5.36059*10^-5, -3.5653*10^-4, 4.19816*10^-4, -8.74662*10^-6, -2.73034*10^-4, -2.69357*10^-4, -3.14307*10^-4, -2.72806*10^-4, -2.50633*10^-4, 1.17965*10^-5, -1.25622*10^-4, -9.1399*10^-5, -1.37362*10^-4, -1.63854*10^-4, -1.1129*10^-5, -3.1175*10^-5, -4.81323*10^-5, -6.52305*10^-5, -3.8802*10^-5, -8.31851*10^-6, -2.56393*10^-6, -1.86561*10^-6, 0));
h(2,0) = fi.fir((4.45788*10^-6, 2.85198*10^-5, 1.58404*10^-4, -1.9245*10^-4, 4.94618*10^-4, 3.1507*10^-4, -1.60361*10^-4, -9.70589*10^-4, 1.65835*10^-3, -1.81327*10^-4, -4.38717*10^-4, -3.62721*10^-4, -4.89909*10^-3, 8.68029*10^-4, 5.03397*10^-4, -1.58698*10^-2, -9.2683*10^-3, 3.25354*10^-2, -1.49073*10^-2, -3.71117*10^-2, 1.21098*10^-2, 1.97594*10^-2, -5.7804*10^-3, -3.21277*10^-3, 5.76228*10^-3, -1.15485*10^-2, 5.79697*10^-3, -4.36148*10^-3, 2.16851*10^-2, 2.15763*10^-2, -2.00181*10^-2, -1.61655*10^-2, 8.64831*10^-3, 3.76608*10^-3, -1.37585*10^-2, 1.64669*10^-2, 5.34294*10^-4, -1.93136*10^-2, -3.92637*10^-3, 3.01503*10^-3, 5.31059*10^-3, 7.0971*10^-3, 2.85895*10^-3, -4.32563*10^-3, 2.23295*10^-3, 2.14275*10^-3, 1.30772*10^-3, 9.18714*10^-3, 4.21731*10^-3, -1.61133*10^-3, 1.62146*10^-3, 7.79086*10^-4, 2.79092*10^-3, 5.6766*10^-3, 2.43588*10^-3, -2.94729*10^-4, -3.50462*10^-3, -1.23749*10^-3, 9.95482*10^-4, 7.91254*10^-4, 8.95198*10^-4, -1.13341*10^-3, 1.66911*10^-3, 3.37181*10^-5, -2.71694*10^-3, -1.77024*10^-3, -1.53815*10^-3, -2.60887*10^-3, -4.65625*10^-3, -3.36985*10^-3, -7.35849*10^-4, -1.91902*10^-3, -2.39256*10^-3, -1.13852*10^-3, -3.15111*10^-4, 2.59004*10^-4, -4.10988*10^-5, 2.85455*10^-4, 2.06802*10^-3, 1.60799*10^-3, 3.83377*10^-4, -7.37536*10^-4, -6.08302*10^-4, 7.21582*10^-4, 8.9328*10^-4, 3.68326*10^-3, 3.27138*10^-3, 1.69945*10^-3, 3.75801*10^-3, 4.36899*10^-3, 1.9519*10^-3, -5.44478*10^-6, 1.19739*10^-3, 2.29129*10^-3, 1.28729*10^-3, -1.04971*10^-3, -1.21329*10^-3, 3.24763*10^-4, 5.11494*10^-5, -1.47963*10^-3, -1.55276*10^-3, -1.3151*10^-3, -6.22009*10^-4, -9.64667*10^-4, -1.49514*10^-3, -1.26437*10^-3, -6.41907*10^-4, -2.60407*10^-4, -1.27535*10^-3, -1.079*10^-3, -3.83553*10^-4, -3.88626*10^-4, -5.42304*10^-4, -5.50354*10^-4, -7.58938*10^-5, -6.57488*10^-5, 9.50248*10^-7, 7.74527*10^-5, 5.80835*10^-5, 9.08167*10^-5, 9.94261*10^-5, 8.00668*10^-5, 2.43757*10^-5, 8.79674*10^-6, 8.88365*10^-6, 8.46417*10^-6, 2.40821*10^-6, 0));
h(3,0) = fi.fir((9.93628*10^-6, 2.49699*10^-5, 1.3874*10^-4, -1.77736*10^-4, 6.9471*10^-4, -3.62084*10^-4, 5.34434*10^-4, -1.10817*10^-3, 1.48817*10^-3, -1.31485*10^-3, 2.01002*10^-3, -3.03202*10^-3, -7.21718*10^-3, 6.18924*10^-3, -5.30958*10^-3, 2.5992*10^-3, 2.53457*10^-3, 2.11909*10^-2, 1.74746*10^-2, -1.16911*10^-2, 7.02438*10^-4, -1.20184*10^-2, 9.40654*10^-5, 1.94897*10^-3, -2.54585*10^-2, -6.98871*10^-4, 3.066*10^-2, -3.15638*10^-4, -3.91701*10^-2, 9.67744*10^-3, 3.62823*10^-2, -1.73412*10^-2, -3.01367*10^-2, 6.00683*10^-3, 5.36729*10^-3, -1.00647*10^-2, 3.41282*10^-3, 1.15935*10^-3, 1.73416*10^-5, 4.83835*10^-3, -7.65874*10^-3, -3.03209*10^-3, 8.14256*10^-3, 3.36909*10^-3, 5.03769*10^-3, 6.81093*10^-3, -2.48879*10^-3, -2.99686*10^-3, 5.71347*10^-3, 5.34772*10^-3, -4.98921*10^-4, 1.17636*10^-3, 1.2247*10^-3, 1.66342*10^-3, 3.59199*10^-3, 8.81705*10^-4, 2.88332*10^-3, 2.06635*10^-3, -5.50486*10^-4, -5.02175*10^-4, -1.49053*10^-3, -2.55876*10^-4, 7.08839*10^-4, 1.46986*10^-3, 1.13331*10^-3, 1.0312*10^-3, -1.03439*10^-3, -1.93403*10^-3, -4.52416*10^-5, -1.71475*10^-3, -3.12195*10^-3, -1.98432*10^-3, -1.63132*10^-3, -1.52868*10^-3, -1.21188*10^-3, -3.23087*10^-4, -1.90084*10^-3, -2.99123*10^-3, -1.46794*10^-3, -8.30328*10^-4, -8.29761*10^-4, -3.0592*10^-3, -2.00404*10^-3, 6.95453*10^-4, 3.67688*10^-4, 1.54417*10^-3, 5.27862*10^-3, 3.37025*10^-3, -1.42103*10^-3, -1.03026*10^-3, 1.40369*10^-3, 5.62856*10^-4, -2.01638*10^-3, -1.35489*10^-3, 6.82534*10^-4, 3.17138*10^-3, 1.95891*10^-3, -1.26004*10^-3, -1.70268*10^-3, -1.03889*10^-3, -1.24353*10^-3, -1.24685*10^-3, -7.11991*10^-4, -4.46193*10^-4, -8.88254*10^-4, -6.54569*10^-4, -5.18168*10^-4, -5.63891*10^-4, -8.39627*10^-4, -5.41095*10^-4, -2.0805*10^-4, -9.82972*10^-5, -2.90241*10^-4, -4.28973*10^-4, -1.03579*10^-4, 1.84012*10^-4, 1.84563*10^-4, 3.85491*10^-5, -9.84852*10^-6, 3.92966*10^-5, 1.05639*10^-4, 1.01833*10^-4, 3.88276*10^-5, 8.03417*10^-6, -6.97166*10^-6, 1.70273*10^-6, 2.45331*10^-6, 0));
h(4,0) = fi.fir((1.46221*10^-5, 2.00167*10^-5, 2.02228*10^-4, -5.06998*10^-4, 8.48566*10^-4, -9.19794*10^-4, 1.28861*10^-3, -2.35191*10^-3, 2.47242*10^-3, -2.51081*10^-3, 3.89043*10^-3, -6.7548*10^-3, -1.42655*10^-2, 1.20915*10^-2, -7.36941*10^-3, 1.03427*10^-2, 3.09089*10^-3, 2.74497*10^-2, 3.16732*10^-2, -1.79474*10^-2, -1.23166*10^-2, -2.23719*10^-2, -8.51016*10^-3, -1.0793*10^-2, -1.49272*10^-2, 6.91979*10^-3, 3.41252*10^-3, -3.96492*10^-3, -1.01439*10^-2, -5.08919*10^-3, 1.05234*10^-2, 7.32389*10^-3, -1.92986*10^-3, -2.74518*10^-3, -5.44477*10^-3, 7.32402*10^-3, 1.02309*10^-2, 2.91413*10^-3, 5.3044*10^-3, 5.35601*10^-3, 9.22673*10^-5, -2.41033*10^-3, 1.31455*10^-3, -2.1753*10^-3, 2.08879*10^-4, 4.44323*10^-3, -1.0344*10^-3, -3.04542*10^-3, 1.96889*10^-3, 7.98082*10^-3, 1.60511*10^-3, -1.91281*10^-3, 1.10736*10^-3, -2.80679*10^-3, -3.85064*10^-3, -1.50426*10^-3, 1.63393*10^-3, 5.05196*10^-4, 1.31157*10^-4, 1.47938*10^-3, -3.43024*10^-4, 1.60801*10^-3, 2.05137*10^-3, -5.8659*10^-5, -1.90039*10^-3, -1.10453*10^-3, 8.71167*10^-5, 2.62382*10^-3, 1.47127*10^-3, -2.75591*10^-3, -1.15775*10^-3, -7.69724*10^-4, -1.36039*10^-3, -7.82908*10^-4, 1.16141*10^-3, 1.31188*10^-3, -1.45515*10^-3, -1.14088*10^-5, 4.7882*10^-4, -7.15635*10^-4, -4.8162*10^-4, -1.72614*10^-3, -6.21192*10^-5, 1.29144*10^-3, -1.12739*10^-3, -3.34905*10^-4, 1.90242*10^-3, 8.62519*10^-4, -1.66752*10^-3, -1.27253*10^-3, -1.72844*10^-3, -1.53058*10^-3, 1.48392*10^-4, 6.32642*10^-4, 1.55754*10^-3, 7.61493*10^-5, -4.92681*10^-4, 3.51382*10^-4, 1.83796*10^-4, -6.84209*10^-4, -3.15156*10^-4, 2.54261*10^-4, -4.44158*10^-4, -2.70074*10^-4, 5.07708*10^-4, 3.6701*10^-4, 5.25869*10^-5, 2.04282*10^-4, 1.06553*10^-4, -1.41728*10^-4, 1.45149*10^-4, 8.2866*10^-5, 8.32732*10^-5, 2.27166*10^-4, 8.7317*10^-5, -3.78775*10^-5, 9.09633*10^-5, 3.84705*10^-5, -1.98935*10^-5, 8.21408*10^-6, 3.87224*10^-5, 2.72483*10^-5, -9.02966*10^-6, 2.11859*10^-6, 3.82797*10^-6, 6.18201*10^-6, 2.51378*10^-7, 0));
h(5,0) = fi.fir((1.57811*10^-5, 4.41782*10^-5, 2.31406*10^-4, -2.60758*10^-4, 9.03587*10^-4, 7.02765*10^-4, 3.68557*10^-4, -9.98409*10^-4, 2.52097*10^-3, -2.39278*10^-4, 4.61844*10^-5, -1.62087*10^-4, -1.10732*10^-2, 2.7371*10^-3, 5.96596*10^-3, -2.40448*10^-2, -1.17481*10^-2, 4.51275*10^-2, -1.55188*10^-2, -2.61531*10^-2, 1.67235*10^-2, 1.3603*10^-2, 9.91536*10^-3, 1.60061*10^-3, 1.3329*10^-3, -1.65022*10^-2, -6.43151*10^-4, -5.81921*10^-3, 1.09229*10^-2, 9.98562*10^-3, -9.99544*10^-3, -3.54222*10^-3, 9.14287*10^-3, 4.90455*10^-3, -9.53766*10^-3, 6.01814*10^-3, 4.19719*10^-5, -1.7748*10^-3, 3.86721*10^-3, 4.79459*10^-3, 2.90687*10^-3, -4.31318*10^-4, 3.80235*10^-3, -3.37746*10^-3, -3.13597*10^-3, 1.84624*10^-3, -1.34822*10^-4, 5.54582*10^-4, 3.56967*10^-3, 2.92148*10^-4, -3.51467*10^-3, 1.74319*10^-3, 2.19724*10^-4, -1.43258*10^-3, 2.15198*10^-3, -3.59638*10^-4, -4.76244*10^-3, -2.33638*10^-3, -1.32344*10^-3, -1.42376*10^-3, 1.40545*10^-3, -1.38811*10^-3, -1.74957*10^-3, -4.75105*10^-4, 1.50508*10^-3, 8.84199*10^-5, -4.1918*10^-4, 5.59142*10^-4, -3.77265*10^-3, -4.2904*10^-3, -9.61273*10^-4, 5.89775*10^-4, 6.09699*10^-4, 1.0633*10^-3, 6.47084*10^-4, 2.06941*10^-4, 6.11713*10^-4, 1.1545*10^-3, 1.27111*10^-3, -6.25519*10^-4, -1.93753*10^-3, -3.29212*10^-3, -1.52143*10^-3, 1.45329*10^-3, 2.55904*10^-3, 3.44944*10^-3, 2.62148*10^-3, 1.33959*10^-3, 1.7063*10^-3, 1.67233*10^-3, 5.5143*10^-4, 4.01845*10^-4, 7.19341*10^-4, 6.81816*10^-4, 7.54655*10^-4, 3.01162*10^-3, 3.46972*10^-3, 1.56339*10^-3, 8.42543*10^-4, 3.80719*10^-4, 6.93815*10^-4, 4.66624*10^-4, 6.92291*10^-4, 1.62719*10^-3, 1.133*10^-3, 4.97187*10^-4, 5.06744*10^-4, 5.30096*10^-4, 4.0572*10^-4, 2.01872*10^-4, 2.60275*10^-4, -2.72057*10^-5, -9.1851*10^-5, 3.26233*10^-5, 3.00808*10^-4, 2.03617*10^-4, 5.07898*10^-5, -8.33149*10^-5, -1.03751*10^-5, 7.76086*10^-5, -5.33407*10^-7, -3.06573*10^-5, -1.70851*10^-5, 2.01059*10^-5, 3.98048*10^-6, 3.35889*10^-6, 3.43292*10^-8, 0));
h(6,0) = fi.fir((-3.86616*10^-6, -2.92856*10^-5, 2.57463*10^-4, -2.55296*10^-4, -6.78291*10^-6, -5.84922*10^-4, 1.01332*10^-3, -8.61014*10^-4, 9.46613*10^-4, -1.43681*10^-3, 2.55288*10^-3, -5.67696*10^-3, -4.71336*10^-2, -4.24378*10^-2, -2.01533*10^-2, -2.22634*10^-2, -3.88006*10^-3, -1.15908*10^-2, 3.31593*10^-4, 4.48946*10^-2, 1.8844*10^-3, 1.37521*10^-2, 3.59968*10^-2, -1.28167*10^-2, 1.24978*10^-2, 5.27583*10^-2, 2.34635*10^-2, -2.63881*10^-3, 8.67306*10^-3, 2.4751*10^-2, 5.87393*10^-3, -9.25468*10^-3, 1.18865*10^-2, 1.58006*10^-2, -1.04271*10^-3, -1.14966*10^-2, 9.57015*10^-3, 4.89365*10^-3, -6.55248*10^-3, 7.03939*10^-3, -2.12608*10^-3, -1.04984*10^-2, -3.61629*10^-3, -7.17239*10^-3, -5.23434*10^-3, -2.0962*10^-3, -7.01442*10^-3, -7.31803*10^-3, -4.60171*10^-3, -3.69246*10^-3, -9.09628*10^-3, -3.28774*10^-3, 1.22438*10^-3, -4.19002*10^-3, -5.04437*10^-3, -5.07132*10^-3, -3.11109*10^-3, -1.28336*10^-3, -1.39409*10^-3, -5.34437*10^-4, 1.9439*10^-3, -5.92974*10^-4, -1.41222*10^-3, 2.15115*10^-3, 1.6155*10^-3, 1.10439*10^-3, 5.51147*10^-4, -6.92677*10^-4, -2.69537*10^-3, -8.60682*10^-4, 1.25214*10^-3, 1.17567*10^-3, 6.25862*10^-5, -4.49214*10^-3, -9.97929*10^-4, 2.71718*10^-3, -2.03951*10^-3, -3.55741*10^-3, -1.08387*10^-3, 6.46904*10^-4, -3.55818*10^-4, -1.00778*10^-3, 4.60677*10^-4, 1.43222*10^-3, 7.68707*10^-4, -1.02436*10^-3, -1.92194*10^-3, 1.5598*10^-4, 5.61379*10^-4, -4.09825*10^-4, 3.64663*10^-5, 3.56328*10^-5, 1.15068*10^-3, 8.24869*10^-4, 5.8267*10^-4, -4.83767*10^-4, -1.17138*10^-3, 7.64905*10^-4, 1.21078*10^-3, 4.86777*10^-4, 2.61474*10^-4, 3.07859*10^-4, 2.08667*10^-4, -1.41295*10^-4, 6.09299*10^-5, 1.35904*10^-4, 4.57857*10^-4, 3.37973*10^-4, 2.04718*10^-4, 3.41662*10^-4, 1.00847*10^-4, -8.46021*10^-5, -1.08104*10^-4, -1.27879*10^-4, -1.09223*10^-4, -4.56845*10^-5, -9.0214*10^-5, -1.3188*10^-4, 3.02152*10^-5, 4.86084*10^-5, -4.50631*10^-5, -6.11718*10^-5, -2.83688*10^-5, -8.4151*10^-6, -4.11553*10^-6, -3.53055*10^-6, 8.96305*10^-8, 0));
h(7,0) = fi.fir((4.2463*10^-6, -2.82698*10^-6, 5.23527*10^-5, 2.49726*10^-5, -1.7067*10^-4, -1.7706*10^-4, 2.40886*10^-4, 1.60215*10^-4, -5.28537*10^-4, 2.2609*10^-4, 3.39552*10^-4, 2.7819*10^-4, 2.78137*10^-4, -2.52045*10^-3, -3.72384*10^-4, 7.1841*10^-3, -7.4312*10^-3, -1.10708*10^-2, 9.43312*10^-3, 1.13006*10^-2, -5.36636*10^-3, -4.82279*10^-3, -5.74575*10^-3, -1.60587*10^-3, -8.34246*10^-3, 3.58491*10^-3, 2.4944*10^-2, -1.15642*10^-2, -1.67202*10^-3, 5.18072*10^-4, -1.07983*10^-2, 2.19485*10^-3, 2.35272*10^-2, -3.90009*10^-3, -1.53265*10^-2, 2.15568*10^-2, 3.0387*10^-3, -8.19711*10^-4, 2.183*10^-3, -1.4029*10^-3, -3.91025*10^-3, 1.37613*10^-3, -5.52124*10^-3, -9.85606*10^-3, 2.15494*10^-3, -3.20578*10^-3, -4.54218*10^-3, -1.9447*10^-3, -3.5543*10^-3, -1.64123*10^-3, 4.59555*10^-3, 2.52762*10^-3, -4.02653*10^-3, -1.8522*10^-3, 2.04676*10^-4, 2.88148*10^-3, 3.43243*10^-3, 5.47636*10^-4, 2.75394*10^-3, 2.21665*10^-3, -1.2919*10^-3, 4.00805*10^-4, 2.57166*10^-3, 1.46628*10^-3, 2.72868*10^-5, -1.16132*10^-3, 3.80668*10^-5, 3.61819*10^-3, 2.21192*10^-3, -8.18766*10^-4, 6.62261*10^-4, 1.08661*10^-3, 7.49201*10^-4, -4.81969*10^-5, -4.2257*10^-4, -2.02931*10^-4, 2.06879*10^-5, 6.29365*10^-5, 1.41728*10^-4, -1.46906*10^-3, -2.38707*10^-3, -1.86912*10^-3, -1.11238*10^-3, -1.19961*10^-3, -2.86108*10^-3, 7.00973*10^-4, 1.27749*10^-3, -1.12713*10^-3, -1.14887*10^-3, -4.13161*10^-4, -5.0415*10^-4, -2.00683*10^-3, -3.58722*10^-5, 2.2713*10^-3, 1.24614*10^-3, -1.59644*10^-3, -8.18819*10^-4, 1.43667*10^-3, 7.11437*10^-4, 9.06548*10^-5, 3.20771*10^-4, 5.151*10^-4, 7.0562*10^-4, 2.85357*10^-4, 2.53833*10^-4, 3.44038*10^-4, 3.56086*10^-4, 1.83376*10^-4, 1.0309*10^-4, -9.07505*10^-5, 1.42212*10^-4, 2.47962*10^-4, 5.25912*10^-5, -7.44214*10^-5, -1.31304*10^-4, -1.65695*10^-4, 2.45583*10^-5, 2.84575*10^-6, -9.82888*10^-5, -9.99562*10^-5, -7.66841*10^-6, 5.3135*10^-6, -2.61613*10^-5, -9.6016*10^-6, -6.81842*10^-6, 2.773*10^-6, 4.94959*10^-7, 0));
h(8,0) = fi.fir((-1.68655*10^-5, -7.21153*10^-5, 3.78556*10^-4, -7.01652*10^-4, 1.28073*10^-4, -7.43055*10^-4, 1.35568*10^-3, -2.72118*10^-4, 6.69039*10^-4, -2.1171*10^-3, 2.66075*10^-3, -5.26349*10^-3, -8.64246*10^-2, -7.03236*10^-2, -4.05775*10^-2, -2.6085*10^-2, -1.01035*10^-2, -4.39697*10^-2, 1.08086*10^-2, 5.51774*10^-2, 4.17719*10^-2, -1.44567*10^-2, 2.13921*10^-2, 1.07582*10^-1, 3.87707*10^-2, -5.54456*10^-3, 4.99856*10^-2, 4.09783*10^-2, 4.81083*10^-3, 2.73854*10^-2, 3.64387*10^-2, -3.17886*10^-3, -7.72274*10^-3, 1.81197*10^-2, 1.60415*10^-3, -3.71408*10^-3, -7.00634*10^-3, -1.12762*10^-2, 8.33056*10^-3, -2.80427*10^-3, -2.49734*10^-2, -1.02805*10^-2, 2.14717*10^-4, -1.21152*10^-2, -1.56673*10^-2, -6.13615*10^-3, -9.19539*10^-3, -1.1857*10^-2, -4.06259*10^-3, -3.23696*10^-3, -5.01662*10^-3, -8.23842*10^-3, -1.87769*10^-3, 6.66127*10^-4, -7.61051*10^-3, -7.56122*10^-3, -2.77838*10^-3, -2.46885*10^-3, -4.76789*10^-3, -4.42888*10^-3, -6.30871*10^-4, -1.00798*10^-3, -3.20891*10^-3, -2.00773*10^-3, 1.24406*10^-3, 3.91085*10^-3, 3.65062*10^-3, 5.34785*10^-3, 5.4627*10^-3, 2.41144*10^-3, 1.85354*10^-3, 2.87405*10^-3, 2.07133*10^-3, -2.6133*10^-4, 1.0638*10^-3, 9.85821*10^-4, 8.9492*10^-4, 5.35477*10^-4, -6.03783*10^-4, 7.82042*10^-4, -1.20611*10^-4, -2.37535*10^-3, -2.25807*10^-3, -4.0582*10^-4, -1.75915*10^-3, -1.09401*10^-3, 2.2533*10^-3, -1.34825*10^-3, -4.61702*10^-3, -2.35077*10^-3, -2.49663*10^-4, 3.61728*10^-5, -2.13426*10^-3, -2.67142*10^-3, 7.83896*10^-4, 3.16299*10^-3, 1.16068*10^-3, -1.13754*10^-3, -1.30056*10^-3, -9.18475*10^-4, -4.78309*10^-4, -1.38245*10^-4, -4.1388*10^-4, 1.0279*10^-6, 7.26447*10^-5, -2.33207*10^-4, -2.62141*10^-4, -3.42912*10^-4, -5.39206*10^-4, -3.01184*10^-6, 1.44938*10^-4, -1.69249*10^-4, -1.63111*10^-4, -4.75819*10^-5, -3.09052*10^-4, -2.14425*10^-4, -1.965*10^-6, 4.87482*10^-5, -1.1532*10^-4, -9.03683*10^-5, 4.34695*10^-5, 5.61129*10^-5, 3.83196*10^-5, -3.11789*10^-6, -5.52174*10^-6, -2.11033*10^-6, 1.06705*10^-6, 0));
h(9,0) = fi.fir((-1.60757*10^-5, -4.19701*10^-5, 4.10355*10^-4, -3.34547*10^-4, 1.89441*10^-4, -6.56648*10^-4, 1.66465*10^-3, -1.42845*10^-6, 2.34716*10^-4, -1.96452*10^-3, 2.83126*10^-3, -7.45693*10^-3, -7.13278*10^-2, -5.34188*10^-2, -1.62979*10^-2, 3.06538*10^-2, 3.98189*10^-2, -3.05744*10^-3, 4.62241*10^-2, 7.35245*10^-2, 4.46943*10^-2, -8.62466*10^-3, 1.61692*10^-2, 5.76913*10^-2, -1.09835*10^-2, -3.50465*10^-2, -4.10253*10^-3, -1.13266*10^-2, -1.54331*10^-2, -2.41119*10^-2, -1.19454*10^-2, -8.63187*10^-3, -1.87685*10^-2, -2.04983*10^-2, -2.12632*10^-2, 1.69851*10^-3, -1.08342*10^-2, -1.94009*10^-2, -1.0154*10^-2, -3.29724*10^-3, 2.72871*10^-3, 8.452*10^-3, 1.01911*10^-2, 7.93981*10^-3, 6.70798*10^-3, 3.44097*10^-3, 5.98216*10^-3, 6.46392*10^-3, 4.05223*10^-3, 2.11746*10^-3, 4.45085*10^-3, 7.7832*10^-3, 2.10043*10^-3, 1.49633*10^-3, 3.11967*10^-3, -1.21022*10^-3, -1.50013*10^-3, -1.5582*10^-3, -4.58534*10^-4, 5.71158*10^-4, 1.716*10^-3, 4.97296*10^-4, -1.27246*10^-4, -2.44379*10^-5, 1.48653*10^-3, 2.52236*10^-3, 5.19892*10^-4, -1.60011*10^-3, -1.46534*10^-3, -1.63475*10^-3, -4.88274*10^-3, -2.89252*10^-3, 1.36597*10^-3, 7.09958*10^-4, 4.65135*10^-4, 1.73413*10^-3, 1.87164*10^-3, 3.11041*10^-3, 2.31907*10^-3, -1.33571*10^-3, -3.50304*10^-3, -2.86542*10^-3, 3.92849*10^-5, 2.70084*10^-4, -1.55724*10^-3, -1.21433*10^-4, 1.81963*10^-3, 5.82052*10^-4, -1.12463*10^-3, -1.46465*10^-4, -1.7854*10^-3, -1.70461*10^-3, 2.52183*10^-4, 1.10409*10^-3, 2.46217*10^-3, 1.04006*10^-3, 3.89001*10^-5, 5.9752*10^-4, 6.90762*10^-4, -4.07922*10^-4, -4.72497*10^-4, -4.19827*10^-4, -1.08188*10^-3, -3.84054*10^-4, 3.92463*10^-4, 3.73165*10^-4, -6.68194*10^-5, -3.37365*10^-5, 1.48299*10^-4, -2.71348*10^-4, -4.32147*10^-4, -3.82735*10^-4, -1.33249*10^-4, -5.25158*10^-5, -2.82792*10^-4, -2.16745*10^-4, 2.3925*10^-6, 6.81638*10^-5, 3.5723*10^-5, 2.80703*10^-5, 5.59214*10^-5, 3.75609*10^-5, 2.11466*10^-5, 1.44848*10^-5, -1.74216*10^-7, -1.61781*10^-7, 1.20674*10^-6, 0));
h(10,0) = fi.fir((5.48693*10^-6, -3.85305*10^-5, 1.00796*10^-4, 1.39085*10^-4, -1.37982*10^-4, -3.50258*10^-4, 8.31508*10^-4, 9.31576*10^-5, -7.85107*10^-4, 2.95081*10^-4, 2.062*10^-4, 2.23801*10^-4, 1.53611*10^-3, -6.42346*10^-3, -1.46583*10^-3, 1.49275*10^-2, -1.02315*10^-2, -1.78674*10^-2, 1.32495*10^-2, 1.66362*10^-2, -7.3916*10^-3, 3.36605*10^-3, -2.10234*10^-3, -2.51933*10^-2, -3.16892*10^-3, 3.47789*10^-2, 8.64838*10^-3, -3.03502*10^-2, 6.59946*10^-3, 6.83453*10^-3, 1.85503*10^-3, 2.31009*10^-4, 1.851*10^-3, 3.84314*10^-3, -8.55288*10^-3, -6.04199*10^-3, -8.17616*10^-3, 7.42784*10^-3, 4.66712*10^-3, -2.9096*10^-3, -4.66173*10^-3, -4.38658*10^-3, 6.99246*10^-3, 5.94912*10^-3, 1.72897*10^-3, -6.94179*10^-5, -1.07731*10^-3, -8.2497*10^-4, -2.23008*10^-3, -2.54084*10^-3, -2.44285*10^-3, 2.04601*10^-3, 1.71871*10^-3, -2.67377*10^-3, 3.4213*10^-4, 4.96274*10^-3, 5.22673*10^-3, 1.47745*10^-3, -1.42805*10^-3, -3.73734*10^-3, -1.52274*10^-3, 4.65329*10^-4, -1.28761*10^-3, 3.13016*10^-4, 1.4824*10^-3, 1.47564*10^-3, 6.11671*10^-4, 1.66238*10^-3, 3.46059*10^-4, -1.52436*10^-3, 2.84002*10^-4, 3.34641*10^-4, -3.00188*10^-4, -4.15989*10^-4, 1.44934*10^-3, 2.95361*10^-3, -2.12224*10^-4, -1.7465*10^-3, 9.4611*10^-4, 4.72243*10^-4, -2.35131*10^-3, -2.86437*10^-3, -2.994*10^-4, 8.838*10^-4, 4.36437*10^-4, 4.35811*10^-4, 1.05312*10^-3, -1.18062*10^-3, -3.19579*10^-3, -2.66689*10^-4, 1.3291*10^-3, -6.35546*10^-4, -1.93305*10^-3, -1.22074*10^-3, -7.66797*10^-4, 5.48452*10^-4, 2.24032*10^-3, 6.8593*10^-4, -8.80495*10^-4, -7.36785*10^-4, -2.91027*10^-4, 1.43957*10^-4, 9.94203*10^-5, 1.03047*10^-5, 1.64362*10^-4, 4.18213*10^-4, 2.9296*10^-6, -1.1731*10^-4, 2.73018*10^-4, 3.29795*10^-4, -1.42659*10^-4, -8.36778*10^-5, -7.14364*10^-5, -1.26889*10^-4, 1.45918*10^-4, 7.54347*10^-5, 8.94557*10^-5, -3.85597*10^-5, -7.5002*10^-6, 3.05406*10^-5, 4.88743*10^-5, 4.99589*10^-5, 8.18749*10^-7, 7.05084*10^-7, -1.20529*10^-5, 4.32078*10^-6, 1.38227*10^-6, 0));
h(11,0) = fi.fir((-1.12306*10^-5, -1.96564*10^-5, 2.91555*10^-4, -1.96712*10^-4, 1.67915*10^-4, -4.87725*10^-4, 1.39101*10^-3, -1.01342*10^-3, 1.94679*10^-3, -2.84011*10^-3, 3.55895*10^-3, -8.82548*10^-3, -5.04098*10^-2, -4.7074*10^-2, -4.41737*10^-3, 1.19852*10^-2, 2.97061*10^-2, 2.91912*10^-2, 1.07382*10^-2, 6.67629*10^-2, 2.62009*10^-2, 1.01949*10^-2, 2.44384*10^-2, -2.51683*10^-2, -6.41723*10^-3, 3.51383*10^-3, 5.32911*10^-3, -7.63561*10^-3, -5.45861*10^-2, -1.52686*10^-2, 1.96498*10^-2, -4.82022*10^-3, -1.13631*10^-2, -2.01016*10^-2, -6.07352*10^-3, -7.81816*10^-3, -2.29341*10^-3, -4.00815*10^-3, -8.94526*10^-3, 2.81839*10^-3, 4.13023*10^-4, -2.00456*10^-3, -2.75069*10^-4, 5.94332*10^-3, 1.12361*10^-2, 6.95498*10^-3, 3.16854*10^-4, -1.76094*10^-3, 1.94699*10^-3, 9.01863*10^-3, 8.65974*10^-3, 4.68559*10^-3, 6.54081*10^-4, 1.13477*10^-4, 5.15455*10^-4, 1.43156*10^-4, -5.91623*10^-4, 1.28197*10^-3, 7.18359*10^-4, -4.48033*10^-5, -8.32929*10^-4, 1.75998*10^-3, 2.26954*10^-3, -1.73247*10^-3, -2.44249*10^-3, -2.00254*10^-3, -4.81834*10^-4, 7.73294*10^-4, 3.05641*10^-4, -1.48032*10^-3, -2.4714*10^-3, -2.17995*10^-3, 9.53805*10^-4, -3.9275*10^-4, -4.06353*10^-3, -2.14124*10^-3, 8.98599*10^-4, 1.26397*10^-3, -9.51349*10^-4, -1.14574*10^-3, 1.05746*10^-3, 1.11031*10^-3, 1.64742*10^-4, -1.45004*10^-4, 1.02265*10^-3, 6.24043*10^-4, -2.32233*10^-3, -2.56128*10^-3, -4.4989*10^-4, 8.41901*10^-4, 1.99792*10^-3, 9.17054*10^-4, 3.7591*10^-4, 1.9079*10^-3, 9.5647*10^-4, -3.43216*10^-4, 7.27429*10^-4, 9.97294*10^-4, -6.79702*10^-5, -5.18811*10^-4, -1.20154*10^-4, 4.18061*10^-4, 7.45986*10^-4, 1.44139*10^-4, -4.14496*10^-4, -3.02481*10^-4, -1.10646*10^-4, 1.34045*10^-4, -3.44395*10^-4, -4.14666*10^-5, 7.12612*10^-5, -2.22638*10^-4, -4.24445*10^-4, -4.70283*10^-4, -2.51783*10^-5, -1.20038*10^-5, -3.14955*10^-5, -1.07544*10^-4, -6.22888*10^-5, 6.90663*10^-5, 5.05388*10^-5, 1.23535*10^-5, -5.16506*10^-6, 1.60959*10^-5, 1.17165*10^-5, 8.04748*10^-6, 1.16687*10^-6, 0));
h(12,0) = fi.fir((4.05285*10^-6, -2.38744*10^-5, -1.77443*10^-4, 3.64899*10^-4, 9.0163*10^-5, -6.12552*10^-4, -2.24284*10^-4, 8.40711*10^-4, -6.34741*10^-4, 2.48625*10^-4, 1.07833*10^-4, 1.6957*10^-4, 1.09563*10^-2, -3.92742*10^-4, -1.71496*10^-2, 1.21954*10^-2, 2.24529*10^-2, -1.26705*10^-2, -1.96975*10^-2, -1.58055*10^-2, -6.86806*10^-3, 8.19548*10^-3, 4.41556*10^-2, -1.30615*10^-2, -4.51095*10^-2, 1.85312*10^-2, 1.02524*10^-2, 1.52522*10^-2, 5.72338*10^-3, -8.39197*10^-3, -1.05468*10^-2, 5.86129*10^-3, -3.92588*10^-3, -1.51485*10^-3, 1.4772*10^-2, -8.21411*10^-3, -7.2907*10^-3, -1.82432*10^-3, 6.45056*10^-3, -9.35414*10^-4, 2.58005*10^-4, -2.45199*10^-3, -3.64145*10^-3, -2.60672*10^-3, -6.94716*10^-3, 5.61014*10^-3, 5.94723*10^-3, -6.33431*10^-5, 5.17522*10^-4, -9.55261*10^-4, -2.88925*10^-3, 2.29784*10^-3, 1.9625*10^-3, -1.12007*10^-3, 2.32054*10^-3, -3.21321*10^-4, 7.10064*10^-4, 2.38549*10^-3, 1.65568*10^-3, 1.2767*10^-3, 7.15895*10^-4, -9.5073*10^-4, -3.38625*10^-3, 2.8319*10^-3, 9.38082*10^-4, -1.81631*10^-3, 1.4007*10^-3, 2.405*10^-3, 2.30851*10^-3, 1.26208*10^-3, 2.45352*10^-4, -1.2871*10^-3, -8.98868*10^-4, -4.12349*10^-3, -3.59524*10^-3, -2.12276*10^-4, -1.52058*10^-3, -1.87816*10^-3, -1.48109*10^-3, 8.76298*10^-4, 8.41932*10^-4, 2.58177*10^-5, -7.94133*10^-4, -1.68139*10^-3, -2.50352*10^-4, -1.31875*10^-3, -1.29094*10^-3, -5.04936*10^-4, -2.17749*10^-4, 5.02031*10^-4, 1.32314*10^-3, 2.07371*10^-3, 1.73953*10^-3, -7.51968*10^-5, -1.44401*10^-3, -2.08778*10^-4, 1.29779*10^-3, 1.93557*10^-3, 1.54983*10^-3, 6.71795*10^-4, 3.39349*10^-4, 1.02703*10^-3, 8.1182*10^-4, 7.67969*10^-5, 3.25173*10^-5, 2.03142*10^-5, 1.22237*10^-4, 1.46092*10^-4, 4.62645*10^-4, 5.12512*10^-4, 3.5913*10^-4, 1.89527*10^-4, -4.59823*10^-5, -5.5362*10^-5, -2.35945*10^-5, 7.12921*10^-5, -1.31389*10^-4, -1.41562*10^-4, -4.13157*10^-5, -8.46506*10^-6, -3.85191*10^-6, -2.57285*10^-5, -4.38868*10^-7, -7.68317*10^-6, -7.80589*10^-6, -7.41927*10^-6, -7.51808*10^-7, 0));
h(13,0) = fi.fir((-2.52312*10^-6, 4.34537*10^-5, -1.05713*10^-4, 2.79699*10^-4, -5.04787*10^-4, 5.82347*10^-4, -3.29953*10^-4, 5.66156*10^-4, -8.57682*10^-4, 6.11259*10^-4, 6.82175*10^-5, 1.09725*10^-3, 3.73188*10^-3, -4.21391*10^-3, 1.13579*10^-2, -1.30569*10^-2, -9.1074*10^-3, -6.78927*10^-3, -6.68055*10^-3, 3.66919*10^-2, -1.66733*10^-2, -1.02882*10^-2, 2.77414*10^-2, -4.06681*10^-3, 8.72424*10^-3, -1.47427*10^-2, -1.44785*10^-2, 1.68631*10^-2, 7.36302*10^-3, -4.58477*10^-3, -2.63113*10^-2, -3.09207*10^-3, 5.39354*10^-3, 1.00301*10^-2, 7.68544*10^-5, -6.44387*10^-3, 1.12386*10^-2, -8.55274*10^-3, -5.82475*10^-4, 8.34913*10^-3, 4.05293*10^-3, 4.98791*10^-3, 6.04743*10^-3, -1.83014*10^-3, -7.21087*10^-3, 9.06784*10^-4, 5.00621*10^-3, 3.5765*10^-3, 2.25201*10^-3, -5.81225*10^-4, -5.00102*10^-4, 1.77941*10^-3, -2.64084*10^-3, -3.27415*10^-3, -2.46231*10^-4, -4.01066*10^-3, -4.16767*10^-3, -3.15957*10^-3, -2.77183*10^-3, -2.59037*10^-3, -3.48997*10^-3, -4.77056*10^-4, -7.41451*10^-4, 5.80731*10^-4, 3.00284*10^-3, 2.14308*10^-3, 2.39619*10^-3, 2.43812*10^-3, -8.13831*10^-4, 4.27879*10^-5, 2.84355*10^-3, 1.92226*10^-3, 8.02295*10^-4, 3.21723*10^-4, 2.25629*10^-3, 5.24925*10^-4, -2.12052*10^-3, -9.79097*10^-4, -3.56792*10^-4, -2.54*10^-4, -1.2131*10^-3, -1.8585*10^-3, -1.1357*10^-3, 1.05676*10^-4, -1.89814*10^-3, -1.91763*10^-3, -1.61277*10^-4, -2.20327*10^-4, -1.67573*10^-4, -9.49436*10^-4, -8.30762*10^-4, -6.12352*10^-4, 8.56978*10^-4, 4.10223*10^-4, -1.32621*10^-4, 3.77329*10^-4, 8.1509*10^-5, 5.64883*10^-4, 5.07438*10^-4, 1.90946*10^-4, 1.59857*10^-4, 3.77714*10^-4, 6.15073*10^-4, 2.98232*10^-5, 3.44298*10^-4, 6.27893*10^-4, 3.54246*10^-4, 3.35637*10^-4, 5.85691*10^-4, 6.45228*10^-4, 8.04918*10^-5, 9.1395*10^-5, 1.85267*10^-4, 9.84972*10^-5, 1.4199*10^-4, 1.38519*10^-5, -4.78325*10^-5, -2.22436*10^-5, 7.05634*10^-5, 3.07658*10^-5, -2.68242*10^-5, -3.116*10^-5, -2.34972*10^-5, -2.30493*10^-5, -1.63933*10^-5, -7.51228*10^-6, -5.28915*10^-7, 0));
h(14,0) = fi.fir((8.37095*10^-6, 3.0721*10^-5, -2.44107*10^-5, 3.94012*10^-4, -5.40082*10^-4, 1.33299*10^-4, 5.9634*10^-5, 7.03552*10^-4, -1.22706*10^-3, 1.18495*10^-3, -4.80909*10^-5, -1.72325*10^-4, 1.41354*10^-2, -3.45408*10^-3, -6.5491*10^-3, 1.57246*10^-2, -7.19438*10^-3, -2.43991*10^-2, 2.40516*10^-2, -1.01244*10^-2, -1.91082*10^-2, 1.37094*10^-2, -2.92208*10^-2, 1.30168*10^-3, 1.87559*10^-2, 7.11267*10^-3, 2.2163*10^-2, 1.17525*10^-3, -1.9054*10^-2, -5.14333*10^-3, 1.26468*10^-2, 7.36515*10^-3, 1.80637*10^-3, -1.52187*10^-2, -1.60001*10^-2, 1.54244*10^-2, 7.637*10^-3, -1.02748*10^-2, -1.9387*10^-3, 9.76594*10^-3, -3.17124*10^-3, -3.18131*10^-3, 3.94411*10^-3, -7.37466*10^-3, 4.36414*10^-3, 1.1157*10^-2, -4.28256*10^-3, -3.50576*10^-3, -5.45431*10^-4, -8.15364*10^-4, -8.34486*10^-4, -1.37375*10^-3, -1.00727*10^-3, -2.18833*10^-3, 1.02788*10^-3, 2.78239*10^-3, 4.55995*10^-4, -2.30976*10^-4, 1.50399*10^-4, 1.17113*10^-3, 2.5198*10^-3, -4.04712*10^-4, -9.5934*10^-4, 5.07685*10^-4, 1.62886*10^-3, 1.92579*10^-3, -7.85903*10^-4, 1.40689*10^-4, 6.54063*10^-4, -7.25117*10^-5, -6.8371*10^-4, -7.3845*10^-4, -8.48441*10^-4, -1.02811*10^-3, -7.25093*10^-6, -4.93225*10^-4, 8.02543*10^-4, -7.60084*10^-4, -2.27573*10^-3, 1.78293*10^-4, 6.23596*10^-4, -1.1469*10^-3, -1.36395*10^-3, -5.56316*10^-4, -8.31551*10^-5, 1.07274*10^-3, -1.84015*10^-4, -1.11288*10^-3, 6.7549*10^-4, 1.54597*10^-3, -3.86924*10^-4, 1.53309*10^-4, 2.59752*10^-3, 2.1457*10^-3, 1.63467*10^-3, 1.17306*10^-3, -5.74324*10^-4, -8.54434*10^-5, 7.55146*10^-4, 6.21383*10^-4, 3.80628*10^-4, 7.28026*10^-4, 6.17358*10^-4, 6.14408*10^-4, 4.94544*10^-4, 5.91619*10^-4, 5.76861*10^-4, -2.53606*10^-4, -3.81137*10^-4, -4.09514*10^-6, 4.18388*10^-4, 3.71043*10^-4, -1.45164*10^-5, 1.26919*10^-5, -1.35082*10^-4, -4.0048*10^-5, -9.43885*10^-5, -2.00899*10^-6, 2.78184*10^-5, -1.03767*10^-4, -4.04727*10^-5, 3.33905*10^-5, 2.90409*10^-5, -1.68007*10^-5, -1.98714*10^-5, -7.35414*10^-6, 4.46206*10^-7, 0));
h(15,0) = fi.fir((-2.06109*10^-5, -4.35698*10^-5, -3.2355*10^-4, 6.82276*10^-4, -6.63236*10^-4, 1.21235*10^-3, -2.15786*10^-3, 3.23953*10^-3, -2.98131*10^-3, 3.08077*10^-3, -5.77376*10^-3, 9.80213*10^-3, 1.96517*10^-2, -1.65226*10^-2, -3.9235*10^-4, -1.97247*10^-2, 4.06018*10^-3, -1.42523*10^-2, -3.7316*10^-2, 1.40976*10^-2, 3.46439*10^-2, 2.53549*10^-2, 9.43111*10^-3, 2.64389*10^-2, -1.84273*10^-2, -2.71505*10^-2, 2.64857*10^-2, -3.0688*10^-4, -3.37348*10^-2, 1.21804*10^-3, 3.10434*10^-2, -5.88073*10^-3, -1.77826*10^-2, -2.36909*10^-3, -6.51593*10^-3, -4.35367*10^-4, -2.20238*10^-3, -9.13909*10^-3, 1.37708*10^-3, 6.88927*10^-3, -3.55896*10^-3, 1.32128*10^-3, 3.9352*10^-3, -8.71503*10^-3, -7.75237*10^-3, -2.28113*10^-3, -1.37963*10^-3, 1.10392*10^-3, 6.5292*10^-3, 5.31055*10^-3, 2.89419*10^-3, 1.64227*10^-3, 1.27944*10^-3, 3.49222*10^-3, 1.85941*10^-3, -2.36502*10^-3, -2.1144*10^-3, 1.23933*10^-3, -7.41378*10^-4, -1.82733*10^-3, 2.50107*10^-3, 5.2284*10^-3, 3.14139*10^-3, 4.38634*10^-4, -3.07919*10^-4, -7.73588*10^-4, 5.57951*10^-4, -1.42759*10^-3, -2.67889*10^-3, -1.31779*10^-3, -1.87645*10^-3, 1.13353*10^-3, 2.19127*10^-3, 2.86919*10^-4, -8.08308*10^-4, -1.78288*10^-3, -7.5356*10^-4, -3.00667*10^-4, -5.63399*10^-4, 1.01481*10^-3, 4.23161*10^-4, -3.82178*10^-4, -8.22186*10^-4, -3.69031*10^-5, 5.86933*10^-4, -2.56723*10^-4, 6.38658*10^-4, -9.30012*10^-4, -1.18116*10^-3, -1.06654*10^-3, -1.46779*10^-3, 2.40167*10^-3, 2.22258*10^-3, 8.30153*10^-5, 2.04468*10^-3, 2.7205*10^-3, 5.0057*10^-4, -4.01156*10^-4, -1.05844*10^-5, 7.3607*10^-5, 3.10625*10^-4, -2.57437*10^-4, -9.18619*10^-4, -1.65872*10^-5, 4.16715*10^-4, -3.70808*10^-4, -4.20754*10^-4, -3.93613*10^-4, -4.65384*10^-4, -3.3167*10^-4, -3.9344*10^-4, -3.18859*10^-4, -2.52511*10^-4, -3.32442*10^-4, -3.49208*10^-4, -2.11704*10^-4, -1.23195*10^-4, -5.71822*10^-5, -9.16493*10^-5, -6.42769*10^-5, 1.26129*10^-5, 2.81772*10^-5, 2.64155*10^-5, 2.60022*10^-5, 1.28934*10^-5, 1.22111*10^-6, 1.40342*10^-6, 0));
h(16,0) = fi.fir((-2.1262*10^-5, -5.3094*10^-5, -3.34903*10^-4, 7.7166*10^-4, -3.83729*10^-4, 1.24509*10^-3, -2.45907*10^-3, 3.52222*10^-3, -2.64073*10^-3, 3.39722*10^-3, -6.79985*10^-3, 1.10932*10^-2, 2.38201*10^-2, -1.95592*10^-2, -1.76219*10^-2, -2.68616*10^-2, 2.20748*10^-2, 8.5219*10^-3, -3.22351*10^-2, 1.02863*10^-2, 4.22833*10^-2, 2.54816*10^-2, -1.21111*10^-2, 4.91825*10^-3, -2.22522*10^-2, -2.83548*10^-2, 1.00723*10^-2, -3.82544*10^-3, -2.21542*10^-2, -1.57922*10^-2, 3.22688*10^-2, 2.85047*10^-2, -1.04107*10^-2, -6.69666*10^-3, 1.16439*10^-3, 1.32235*10^-2, 9.17371*10^-3, -1.41874*10^-2, -1.37516*10^-2, 5.45521*10^-3, 2.71587*10^-3, -2.18185*10^-3, 3.67744*10^-3, 1.58416*10^-3, 3.34905*10^-3, 9.90862*10^-4, -7.07962*10^-4, -2.21442*10^-4, 8.41515*10^-4, 2.77331*10^-3, 1.05023*10^-3, -6.67396*10^-4, -6.88945*10^-3, -3.02391*10^-3, 2.38925*10^-3, -2.89899*10^-3, -5.39126*10^-3, -3.59992*10^-3, -1.98825*10^-3, -3.88658*10^-4, -1.79447*10^-3, -8.93149*10^-4, 1.50672*10^-3, 3.82579*10^-4, -9.62443*10^-4, 1.40544*10^-3, 5.06806*10^-3, 5.51325*10^-3, 2.19406*10^-3, -1.89788*10^-3, -9.63223*10^-4, -6.30692*10^-5, -4.18394*10^-4, -7.63769*10^-4, -1.06849*10^-3, 3.02304*10^-6, 1.54457*10^-3, 1.3969*10^-3, -8.50277*10^-4, -3.1279*10^-4, 7.86229*10^-4, -4.1789*10^-5, -6.50408*10^-4, -7.50881*10^-4, 1.00488*10^-3, 2.21638*10^-3, 2.05112*10^-3, -3.7485*10^-4, -1.31973*10^-3, -1.49718*10^-4, -1.79301*10^-3, -1.35671*10^-3, -2.47972*10^-4, 7.2873*10^-4, 1.78987*10^-3, 9.07199*10^-4, -8.45641*10^-4, -5.4271*10^-4, 1.18519*10^-3, 6.26361*10^-4, -7.61591*10^-4, -9.37814*10^-4, -6.643*10^-4, 2.55523*10^-4, 2.6838*10^-4, 9.85502*10^-5, 2.26127*10^-4, 1.74103*10^-4, -2.27209*10^-4, -4.12255*10^-4, -4.38894*10^-5, 1.59478*10^-4, 9.04753*10^-5, -1.37956*10^-4, -2.06061*10^-4, -6.71447*10^-5, 3.17384*10^-6, 7.17361*10^-5, -6.12164*10^-5, -6.66239*10^-5, 1.77189*10^-5, 9.23388*10^-6, -9.38071*10^-6, 8.44729*10^-6, 9.58828*10^-6, 1.07446*10^-6, -8.34712*10^-8, 0));
h(17,0) = fi.fir((3.72465*10^-6, 1.28028*10^-5, 7.17746*10^-6, 2.70815*10^-4, -2.79043*10^-4, 5.75673*10^-4, 4.95002*10^-4, -2.47311*10^-4, -5.29721*10^-4, 1.57953*10^-3, 3.95019*10^-4, -1.09278*10^-3, 1.26422*10^-2, -3.46417*10^-3, -3.10649*10^-3, 4.16136*10^-3, -3.01621*10^-2, -1.92268*10^-3, 3.61441*10^-2, -1.75408*10^-2, -2.37126*10^-2, 2.14288*10^-2, 2.62638*10^-3, 2.95677*10^-3, 1.36048*10^-3, -3.74543*10^-3, 1.2572*10^-2, 1.18809*10^-3, -9.64619*10^-3, -3.85501*10^-3, 1.26109*10^-3, -2.34756*10^-3, 1.31105*10^-2, -3.0624*10^-4, -1.48794*10^-2, 3.30539*10^-3, 1.05468*10^-2, 6.53828*10^-3, -2.07787*10^-4, -6.19983*10^-3, -1.00496*10^-2, 8.45193*10^-4, 5.76367*10^-3, -3.8521*10^-3, -3.23524*10^-3, -1.03326*10^-3, -1.3777*10^-3, 2.74367*10^-3, 1.6738*10^-3, 2.58888*10^-3, 4.14681*10^-3, 8.59083*10^-4, -2.2187*10^-4, -1.64567*10^-3, -3.92902*10^-3, -1.22024*10^-3, -1.99714*10^-3, -2.47375*10^-3, -1.82919*10^-3, -4.82877*10^-4, 1.75925*10^-3, 1.85732*10^-3, 1.34079*10^-3, 4.05816*10^-5, 1.04509*10^-3, 1.38174*10^-3, 4.27601*10^-5, 3.61265*10^-3, 2.11924*10^-4, -6.13213*10^-3, -1.8818*10^-3, -8.97747*10^-6, -1.09108*10^-3, 1.48732*10^-4, 2.25575*10^-3, 2.56526*10^-3, 2.3236*10^-3, 2.39427*10^-3, 7.96718*10^-4, 4.56618*10^-4, -1.2976*10^-4, -2.20121*10^-3, -1.15699*10^-3, 2.49326*10^-4, 2.41237*10^-5, 2.48422*10^-3, 1.85746*10^-3, -1.23666*10^-3, -1.5988*10^-3, 1.91076*10^-3, 2.46245*10^-3, 1.73972*10^-4, -5.19623*10^-4, -1.46449*10^-3, -2.04095*10^-4, 1.26756*10^-3, 2.02897*10^-3, 1.16917*10^-3, 3.8421*10^-5, -1.38969*10^-4, 5.16525*10^-4, 3.13914*10^-4, -4.9481*10^-4, 1.09887*10^-4, 2.47627*10^-4, 3.75995*10^-4, -1.49329*10^-4, -1.07876*10^-4, 2.75636*10^-4, 6.78696*10^-5, 1.24213*10^-4, -3.13663*10^-4, -8.42085*10^-5, -4.39827*10^-5, -2.13902*10^-4, -1.91516*10^-5, 7.36453*10^-6, 5.89022*10^-5, -4.70706*10^-5, -9.50844*10^-5, -2.30979*10^-5, 1.46008*10^-5, 3.52399*10^-5, 1.3475*10^-6, -5.45086*10^-6, 2.87072*10^-6, 1.28309*10^-6, 0));
h(18,0) = fi.fir((-1.14319*10^-5, 5.70168*10^-5, -1.86294*10^-4, 3.75048*10^-4, -6.17655*10^-4, 1.15678*10^-3, -5.95664*10^-4, 7.75796*10^-4, -1.52329*10^-3, 4.51648*10^-4, 2.74568*10^-4, 1.5058*10^-3, 4.33909*10^-3, -6.37433*10^-3, 1.93175*10^-2, -2.33488*10^-2, -1.61029*10^-2, -5.94964*10^-3, -3.46477*10^-3, 6.17741*10^-2, -2.54109*10^-2, -2.52123*10^-2, 3.62129*10^-2, 1.6548*10^-2, -1.9233*10^-3, -5.6289*10^-2, -9.46017*10^-3, 3.45977*10^-2, 8.53129*10^-3, 7.03724*10^-3, -1.99204*10^-2, -1.31458*10^-2, 1.21836*10^-2, 1.3695*10^-2, -4.10369*10^-3, -1.40448*10^-2, 3.31961*10^-3, 3.36219*10^-3, 2.46126*10^-3, 7.23776*10^-4, -2.9619*10^-3, 1.88773*10^-3, 3.42066*10^-3, -5.71986*10^-3, -7.57838*10^-3, 2.34829*10^-3, 5.53183*10^-3, -1.10702*10^-3, -6.84048*10^-3, -2.27223*10^-3, 2.24102*10^-3, 2.3747*10^-3, 1.67453*10^-3, 2.54822*10^-3, 2.08672*10^-3, 3.07626*10^-4, 2.56564*10^-3, 1.51166*10^-3, 1.78498*10^-3, 1.09084*10^-3, -1.72928*10^-3, 2.89013*10^-4, 6.69018*10^-5, -8.65997*10^-4, -9.76137*10^-4, -6.06054*10^-4, -8.3187*10^-5, 7.3816*10^-4, 3.01001*10^-4, -4.68146*10^-4, -8.48891*10^-4, -2.8124*10^-3, -1.43001*10^-3, -4.29597*10^-4, 5.98353*10^-4, 2.29359*10^-3, -1.03739*10^-3, -3.74345*10^-3, -1.39739*10^-3, 2.35076*10^-3, 2.70412*10^-3, 1.24236*10^-3, -1.13197*10^-4, -1.67658*10^-5, 1.45937*10^-3, 1.39789*10^-3, -1.20763*10^-3, -2.62294*10^-3, 2.93813*10^-5, 8.94156*10^-4, 7.48604*10^-4, -1.25445*10^-3, -6.72678*10^-4, 2.38975*10^-3, 4.69039*10^-4, -1.42954*10^-3, -7.57965*10^-6, 4.05015*10^-4, -8.1397*10^-4, -1.2871*10^-3, -4.15345*10^-4, 5.16478*10^-4, 7.62918*10^-4, 2.93036*10^-4, -1.45514*10^-4, 3.6058*10^-6, 2.75218*10^-4, 2.49542*10^-4, 3.89903*10^-5, -5.94134*10^-5, 3.74309*10^-5, 1.73661*10^-4, 1.27454*10^-5, -5.60214*10^-5, -3.17417*10^-5, -8.76434*10^-6, 1.98454*10^-4, -2.67218*10^-5, -8.92639*10^-5, -1.76768*10^-5, 3.69637*10^-5, 1.8821*10^-5, -3.24431*10^-5, -1.33867*10^-5, -5.00961*10^-6, 6.13128*10^-6, 1.14214*10^-6, 0));
h(19,0) = fi.fir((1.39912*10^-5, -1.90322*10^-5, -2.36811*10^-4, 3.78*10^-4, 4.67777*10^-4, -5.70294*10^-4, -4.25031*10^-4, 7.53112*10^-4, 2.81149*10^-4, 2.03049*10^-4, 2.80775*10^-4, -3.43985*10^-4, 1.70614*10^-2, -9.79447*10^-4, -3.48084*10^-2, 1.95027*10^-3, 3.28055*10^-2, 1.40525*10^-2, -2.82654*10^-2, -4.04917*10^-2, -1.88454*10^-2, 2.18175*10^-2, 7.49369*10^-2, -6.37302*10^-3, -5.35023*10^-2, 2.67236*10^-3, 1.94414*10^-2, 2.47297*10^-2, -2.90637*10^-3, -1.92195*10^-2, -1.29717*10^-2, 8.10531*10^-3, 9.43887*10^-3, -1.86979*10^-3, -7.54331*10^-4, -1.5552*10^-3, -9.19779*10^-4, -4.45628*10^-3, -8.47557*10^-3, -7.27784*10^-4, 9.35817*10^-3, 7.95084*10^-3, -2.73346*10^-3, -5.47867*10^-3, 1.71457*10^-3, 3.86253*10^-3, 1.45453*10^-3, -3.26547*10^-3, -3.56416*10^-3, -2.11865*10^-3, 9.55961*10^-5, -2.43794*10^-4, -1.17291*10^-4, 3.27819*10^-3, 2.12824*10^-3, -4.00646*10^-3, -2.77951*10^-3, 2.2176*10^-3, 6.09872*10^-3, 4.09957*10^-3, -3.04548*10^-4, -2.03198*10^-3, -6.76045*10^-4, 1.92213*10^-3, 4.3826*10^-4, -6.96391*10^-4, -1.20328*10^-3, -3.92744*10^-3, -2.89725*10^-3, 1.87697*10^-3, 2.03825*10^-3, 1.25158*10^-3, 1.55957*10^-3, -1.25607*10^-3, -1.74287*10^-3, -1.19106*10^-3, -2.47177*10^-3, -8.66478*10^-4, 3.45487*10^-4, -7.25571*10^-4, -9.33224*10^-4, -4.78745*10^-4, 7.49489*10^-4, 9.01459*10^-4, 6.49265*10^-4, 5.41133*10^-5, -8.21348*10^-4, -3.66501*10^-4, 2.84761*10^-4, 4.90146*10^-4, 7.25643*10^-4, 9.95284*10^-4, 1.71413*10^-3, 2.47695*10^-3, 1.36867*10^-3, 1.09923*10^-3, 5.77726*10^-4, 4.88597*10^-4, 1.12136*10^-3, 7.54761*10^-4, 7.28629*10^-5, -3.36252*10^-5, 1.21649*10^-4, 9.13903*10^-5, 3.79578*10^-4, -3.73852*10^-5, -1.72279*10^-4, 3.31291*10^-5, -7.17044*10^-5, -1.01234*10^-4, -2.91422*10^-4, -1.22341*10^-4, -1.16085*10^-4, -1.16408*10^-4, -1.46982*10^-4, -1.03264*10^-4, -7.37692*10^-5, -1.17855*10^-4, -8.54731*10^-5, -2.54989*10^-5, -1.7197*10^-5, -8.6229*10^-6, 4.54045*10^-6, 6.25169*10^-6, 5.97645*10^-7, -4.51728*10^-6, 4.58062*10^-8, 0));
h(20,0) = fi.fir((-1.03784*10^-5, -5.02284*10^-5, -1.00435*10^-4, 1.51413*10^-4, -2.80004*10^-5, 4.88887*10^-4, 1.78065*10^-5, 4.03915*10^-4, -1.44769*10^-3, 1.23547*10^-3, -1.50615*10^-3, 5.34416*10^-3, 2.0862*10^-2, 1.51143*10^-2, 3.38173*10^-3, -1.26652*10^-2, -4.15784*10^-2, -4.67927*10^-2, -8.35795*10^-3, 4.99569*10^-4, 1.07009*10^-2, 2.76724*10^-2, 1.84233*10^-2, 1.92779*10^-2, -3.87754*10^-3, -6.70207*10^-3, 5.83455*10^-4, 3.65507*10^-3, 2.63628*10^-2, 1.0495*10^-2, 2.29415*10^-3, -1.01188*10^-2, -8.92614*10^-3, -1.22827*10^-2, -1.58944*10^-2, 6.5383*10^-3, -2.11074*10^-3, -4.94324*10^-3, -3.61009*10^-3, 4.71535*10^-3, 7.33884*10^-3, 1.68281*10^-3, -5.71269*10^-3, 3.00027*10^-4, 7.65257*10^-4, -4.91451*10^-3, -4.65906*10^-4, 2.42461*10^-3, 2.9572*10^-3, -1.9431*10^-3, -1.63647*10^-3, -1.79836*10^-3, -2.3648*10^-3, -2.98389*10^-4, 3.33124*10^-3, 3.25046*10^-3, -4.19712*10^-4, -8.64468*10^-5, 2.84304*10^-3, 1.90896*10^-3, -4.17858*10^-3, -3.84341*10^-3, 2.91055*10^-4, 1.37382*10^-3, 2.07858*10^-3, 9.38103*10^-4, 8.37476*10^-4, -9.84316*10^-4, -6.3152*10^-4, 1.77419*10^-3, 1.07893*10^-3, 1.97256*10^-3, -6.64651*10^-7, -3.11015*10^-3, -2.31874*10^-3, -5.61436*10^-4, 7.70415*10^-4, 3.03893*10^-4, -5.17777*10^-4, -8.77033*10^-4, 1.59888*10^-4, 1.30389*10^-3, -9.28064*10^-5, -1.58519*10^-3, 3.21652*10^-4, 1.04393*10^-3, -1.11305*10^-4, -7.09914*10^-4, -7.48207*10^-4, 5.01744*10^-4, 6.36688*10^-4, 5.70744*10^-5, -7.9619*10^-5, 4.99474*10^-4, 7.19178*10^-4, 6.02189*10^-4, 8.40974*10^-4, 6.34879*10^-4, -2.20547*10^-4, -3.53242*10^-4, -9.60885*10^-5, 5.87138*10^-4, 4.78541*10^-4, -1.68409*10^-4, 9.81452*10^-6, -1.09868*10^-4, -1.09251*10^-4, -1.09356*10^-4, -4.73355*10^-4, -4.77114*10^-4, -2.07249*10^-4, -5.31454*10^-5, -1.08869*10^-4, 6.57187*10^-5, -7.95313*10^-5, -6.95875*10^-5, -9.13684*10^-5, -1.11332*10^-4, -1.5923*10^-4, -1.10866*10^-4, 3.51642*10^-5, 4.90464*10^-5, -4.82714*10^-8, -2.58574*10^-5, -4.42373*10^-6, -1.49918*10^-6, 4.39693*10^-8, 0));
h(21,0) = fi.fir((-5.23088*10^-6, 3.4461*10^-5, -1.1068*10^-4, -2.00198*10^-5, 1.4403*10^-4, 1.30836*10^-4, -2.4266*10^-4, 7.40873*10^-5, 1.76835*10^-5, -2.12574*10^-4, 1.68404*10^-4, 2.45132*10^-5, -1.90957*10^-3, 4.70066*10^-3, 8.86332*10^-4, -7.47712*10^-3, 1.58755*10^-3, 6.74364*10^-3, -3.56307*10^-3, 2.78912*10^-3, 5.21713*10^-3, -3.0671*10^-2, 1.94353*10^-2, 1.84019*10^-2, -1.64562*10^-2, -9.06296*10^-3, -6.16176*10^-3, 1.99192*10^-2, -6.38263*10^-3, -4.63457*10^-3, 6.72019*10^-3, 1.45007*10^-2, -6.94916*10^-3, -1.32761*10^-2, 9.01156*10^-3, 2.34021*10^-3, -5.64573*10^-3, -2.8605*10^-3, 3.88246*10^-3, -3.93449*10^-3, 8.473*10^-4, 1.31939*10^-4, 4.84425*10^-4, 3.96984*10^-4, -3.97721*10^-3, -3.2389*10^-4, 9.34662*10^-4, -3.02236*10^-4, -7.12602*10^-4, 2.9808*10^-3, 3.24858*10^-3, -1.33477*10^-3, 3.32192*10^-4, 1.35646*10^-3, 3.48514*10^-3, 1.55395*10^-3, -1.2573*10^-3, -1.14311*10^-4, -2.47372*10^-4, -2.08733*10^-3, -8.98965*10^-5, 8.80268*10^-4, -3.04745*10^-3, -3.64205*10^-3, 3.5715*10^-4, 2.57028*10^-3, -4.63351*10^-4, -2.45922*10^-3, -2.65079*10^-3, 2.28953*10^-3, 4.84152*10^-3, 6.62269*10^-4, -2.51479*10^-3, -2.79594*10^-3, 6.15079*10^-4, 2.09709*10^-3, 9.10119*10^-4, 1.04108*10^-3, -2.67192*10^-6, 1.37465*10^-3, 1.3749*10^-3, -7.41713*10^-5, -2.10023*10^-4, -2.80411*10^-4, -6.16784*10^-5, -1.84891*10^-3, -1.21693*10^-3, 3.45615*10^-4, 6.46264*10^-4, 1.44607*10^-4, -6.25426*10^-4, -1.12509*10^-3, -9.06333*10^-4, 1.13763*10^-4, 1.89175*10^-4, 3.56228*10^-4, 5.01086*10^-4, 4.74641*10^-4, 4.31015*10^-4, -2.62271*10^-4, -6.3192*10^-4, 6.57163*10^-5, 6.44643*10^-4, 5.61176*10^-5, -4.73663*10^-4, -3.36155*10^-4, -2.93857*10^-4, 2.9283*10^-5, 4.03428*10^-4, 1.61672*10^-5, -3.38393*10^-4, 5.91271*10^-5, 3.41547*10^-4, 1.38321*10^-4, -9.71308*10^-5, -1.25321*10^-4, 6.77324*10^-6, 4.99707*10^-5, 5.32461*10^-5, -1.23038*10^-6, -4.21833*10^-5, 1.18088*10^-5, 3.79593*10^-5, 1.60144*10^-5, -1.05587*10^-7, -1.37594*10^-6, -4.91333*10^-7, 0));
h(22,0) = fi.fir((1.72019*10^-5, -4.20162*10^-5, -3.73285*10^-4, 1.19794*10^-6, 8.84338*10^-6, 3.94259*10^-4, -1.10994*10^-3, 1.70722*10^-3, -1.86017*10^-3, 3.33416*10^-3, -4.04497*10^-3, 1.00781*10^-2, 3.26266*10^-2, 3.47874*10^-2, -2.30352*10^-2, -4.8092*10^-2, -1.93256*10^-2, -3.34603*10^-2, 3.91203*10^-3, -2.47213*10^-2, -2.09115*10^-2, 1.91181*10^-2, 3.44971*10^-2, 2.3621*10^-2, 2.21261*10^-2, 4.63034*10^-2, -7.8797*10^-3, -1.27315*10^-2, 8.41159*10^-3, 9.0183*10^-3, -9.59986*10^-3, -1.51029*10^-2, 4.57404*10^-3, 2.0424*10^-2, -1.38748*10^-2, -3.21063*10^-2, -8.36109*10^-3, -1.34129*10^-2, -5.46174*10^-3, -5.14502*10^-3, -6.23044*10^-3, -5.07495*10^-3, 1.24876*10^-3, 6.54397*10^-3, 2.79399*10^-3, 5.00401*10^-3, 3.10408*10^-3, 5.03138*10^-3, 6.23583*10^-3, 8.6589*10^-4, 1.65015*10^-3, 7.15822*10^-3, 6.15348*10^-3, -4.29732*10^-4, -8.19291*10^-4, 7.92234*10^-4, 1.15193*10^-3, 5.79959*10^-4, 3.72656*10^-4, 9.64308*10^-4, -1.23704*10^-3, -3.64308*10^-3, -4.15939*10^-3, -7.55412*10^-4, -1.06258*10^-3, -1.00438*10^-3, 6.96704*10^-4, -5.66219*10^-4, -4.05854*10^-4, 7.82348*10^-4, 1.5915*10^-3, 1.48547*10^-3, -1.90097*10^-3, -6.58052*10^-4, 3.92995*10^-3, 3.12323*10^-3, 5.85214*10^-4, -5.26497*10^-4, 8.42545*10^-4, 1.14842*10^-3, -7.65537*10^-4, -2.58392*10^-3, -3.61297*10^-3, -1.33927*10^-3, -2.36279*10^-3, -2.21687*10^-3, 8.02397*10^-4, 4.78125*10^-4, -2.68152*10^-4, 4.99573*10^-4, -1.19114*10^-4, -2.92779*10^-3, -2.09365*10^-3, -1.16137*10^-3, -3.18641*10^-4, -7.45052*10^-5, -1.63301*10^-4, 1.73168*10^-3, 2.36228*10^-3, 8.37104*10^-4, 1.25802*10^-4, 1.02263*10^-3, 1.31849*10^-3, 1.95092*10^-4, -1.36272*10^-4, 8.23148*10^-4, 5.41122*10^-4, 2.17683*10^-4, -1.14459*10^-4, -2.66353*10^-4, 4.14208*10^-4, 4.01458*10^-4, 1.26237*10^-4, -1.5691*10^-4, -2.59228*10^-4, -1.05037*10^-4, -5.98006*10^-5, -2.54885*10^-6, -5.07352*10^-5, -7.89525*10^-5, -2.01223*10^-5, 1.46484*10^-5, 7.37101*10^-6, -2.47572*10^-5, -1.00244*10^-5, 2.11656*10^-6, 8.72722*10^-7, 0));
h(23,0) = fi.fir((-7.141*10^-7, 5.18206*10^-5, -1.11809*10^-4, -1.33329*10^-4, 2.02929*10^-4, 5.3025*10^-4, -9.57729*10^-4, 1.29078*10^-4, 6.35239*10^-4, -6.03345*10^-4, 3.2269*10^-4, -7.59139*10^-4, -2.39529*10^-3, 1.05155*10^-2, 2.48262*10^-3, -2.01477*10^-2, 6.74812*10^-3, 1.4183*10^-2, -9.86006*10^-3, -4.47612*10^-3, 4.77835*10^-3, -1.39955*10^-2, -1.01347*10^-2, 4.03773*10^-2, 6.13711*10^-3, -4.6698*10^-2, 3.62348*10^-3, 2.21418*10^-2, 9.02199*10^-3, -4.95867*10^-3, -1.89367*10^-2, 8.42662*10^-4, 2.06382*10^-2, 1.06083*10^-3, -1.54334*10^-2, 1.93108*10^-3, 7.39659*10^-3, 6.22777*10^-4, -1.25907*10^-3, 2.54407*10^-3, -2.97958*10^-3, 1.36954*10^-3, 7.28973*10^-3, -6.22034*10^-3, -8.64462*10^-3, 7.76734*10^-4, 3.31172*10^-3, 2.28025*10^-5, -4.14967*10^-3, -1.21156*10^-3, 2.40733*10^-3, 2.37984*10^-3, -3.57925*10^-3, -4.26296*10^-3, 1.33644*10^-3, 1.21754*10^-3, -8.29773*10^-5, -1.69948*10^-4, -8.56917*10^-4, -2.39216*10^-4, 3.32763*10^-3, 3.30293*10^-3, -5.45788*10^-4, -5.91758*10^-4, 2.51024*10^-3, 2.25112*10^-3, 5.63093*10^-5, -8.45649*10^-4, 1.06876*10^-4, 1.2564*10^-3, -3.61035*10^-4, -1.08413*10^-3, -9.0364*10^-5, 8.82425*10^-4, 1.53292*10^-3, -1.4521*10^-4, -2.11802*10^-5, -2.58102*10^-3, -2.1193*10^-3, 1.83101*10^-3, 6.01634*10^-4, -6.27552*10^-4, -1.58407*10^-3, -1.90189*10^-3, 5.32943*10^-4, 8.46243*10^-4, -8.66983*10^-4, -9.31954*10^-4, 4.1581*10^-4, -1.18579*10^-4, -1.897*10^-3, -2.93585*10^-4, 1.38449*10^-3, 1.30733*10^-3, 6.72234*10^-4, -2.02613*10^-4, -8.61147*10^-4, 2.99863*10^-4, 7.83748*10^-4, 2.96552*10^-4, -3.00542*10^-4, -2.04823*10^-4, 2.83507*10^-4, 1.20169*10^-4, 2.85806*10^-4, 6.12934*10^-4, 1.9826*10^-4, -3.09929*10^-4, -4.2288*10^-4, -2.34313*10^-5, 2.14669*10^-4, 2.00705*10^-4, 1.46022*10^-4, -1.51845*10^-4, -1.44395*10^-4, 2.03482*10^-6, -1.44194*10^-4, 4.44424*10^-5, -1.66244*10^-6, -8.72555*10^-5, -6.7243*10^-5, -1.72062*10^-5, 2.30759*10^-5, 2.3008*10^-6, 3.91749*10^-6, -5.48001*10^-6, -8.79393*10^-7, 0));
h(24,0) = fi.fir((2.77815*10^-6, -2.82339*10^-5, -4.28012*10^-4, -3.94248*10^-5, 6.21661*10^-5, 6.26207*10^-4, -1.37245*10^-3, 7.29263*10^-4, 3.3558*10^-4, 1.02731*10^-3, -3.19145*10^-3, 1.02197*10^-2, 4.809*10^-2, 2.91373*10^-2, -2.43826*10^-3, -5.9615*10^-2, -5.67235*10^-2, -1.65282*10^-2, -6.01819*10^-2, -2.54417*10^-2, 3.34517*10^-2, 2.56304*10^-2, 1.94273*10^-2, 3.80066*10^-2, 3.68608*10^-2, 1.629*10^-2, 1.62706*10^-2, 1.02472*10^-2, -1.59477*10^-2, -4.65916*10^-3, 1.19731*10^-2, -7.41363*10^-3, -1.07335*10^-2, -7.76615*10^-3, -6.79729*10^-3, -1.092*10^-2, -1.39099*10^-2, -8.69685*10^-3, 1.85862*10^-3, 8.22441*10^-3, -2.37291*10^-3, -5.07741*10^-3, 5.16845*10^-3, 1.52776*10^-3, -2.1516*10^-3, -2.59251*10^-3, 4.13783*10^-5, 4.50443*10^-3, 4.93388*10^-4, -1.12839*10^-3, -1.11949*10^-3, 3.53529*10^-3, 2.69973*10^-3, -2.18946*10^-3, 4.49132*10^-4, 1.87394*10^-3, 1.83667*10^-3, 1.48457*10^-3, 1.14566*10^-3, 1.16275*10^-3, -1.60028*10^-3, -1.50633*10^-3, -1.15475*10^-3, -1.43402*10^-3, -4.124*10^-4, -1.95193*10^-4, -1.42557*10^-3, -1.83186*10^-3, -1.89538*10^-3, -8.34602*10^-4, 1.73039*10^-3, 2.68183*10^-3, 7.27846*10^-4, -4.58976*10^-4, -8.84948*10^-5, -1.25911*10^-3, 8.99127*10^-4, 1.98166*10^-3, -3.2896*10^-4, -1.08943*10^-3, 5.71055*10^-4, 1.84866*10^-3, 5.39723*10^-4, -4.65231*10^-5, 1.82591*10^-3, 1.54042*10^-3, -7.58082*10^-4, -1.95016*10^-3, -5.29275*10^-4, -1.77073*10^-4, -2.50102*10^-3, -1.03668*10^-3, -9.29285*10^-5, -3.76089*10^-4, 1.19519*10^-3, 1.02399*10^-3, -6.47235*10^-4, -9.69106*10^-4, -1.16687*10^-4, 1.20943*10^-3, 1.23146*10^-3, 1.77917*10^-4, -1.02777*10^-4, 7.43441*10^-4, 1.08294*10^-3, 6.01945*10^-5, 1.90676*10^-4, 4.07182*10^-5, -5.33674*10^-4, 5.0066*10^-5, -1.66584*10^-4, -1.34228*10^-5, 8.92561*10^-5, 8.74663*10^-5, -1.0287*10^-5, -2.04054*10^-4, -2.01394*10^-4, -1.70883*10^-4, 7.31299*10^-6, -2.4284*10^-5, -9.50505*10^-5, -6.39302*10^-5, -3.59127*10^-5, -8.14788*10^-6, 2.35614*10^-6, -1.43761*10^-7, 8.80793*10^-7, 0));
h(25,0) = fi.fir((-1.70263*10^-5, -1.28761*10^-4, -3.34792*10^-4, -2.13287*10^-4, 1.05049*10^-4, 3.68725*10^-4, -6.08016*10^-4, 1.40487*10^-3, 4.62468*10^-4, 7.12078*10^-4, -3.51067*10^-3, 1.23121*10^-2, 2.22899*10^-2, 1.64861*10^-3, -9.93043*10^-3, -4.64173*10^-2, -3.31992*10^-2, -1.29798*10^-2, -4.81246*10^-2, 2.41549*10^-2, 8.46089*10^-2, 3.27345*10^-2, 1.561*10^-2, 4.55923*10^-2, 1.26811*10^-2, -3.0081*10^-2, -2.40429*10^-2, -2.08135*10^-2, -3.20108*10^-2, -4.53053*10^-2, -9.67799*10^-3, 1.21792*10^-2, 5.13198*10^-3, 2.67935*10^-4, 1.13855*10^-2, 1.85694*10^-2, 2.94205*10^-3, -1.28371*10^-3, 2.09454*10^-3, 9.4253*10^-3, -1.55259*10^-5, 2.30617*10^-3, 5.7944*10^-3, 3.98422*10^-4, 2.73429*10^-3, -1.1864*10^-4, 3.04515*10^-3, -2.48611*10^-3, -7.53053*10^-3, -1.40849*10^-3, 3.57481*10^-5, -3.72074*10^-3, -2.11718*10^-3, 2.02768*10^-3, 4.74078*10^-4, -5.12379*10^-4, -2.44481*10^-3, -1.26397*10^-4, -1.27928*10^-4, -2.44065*10^-3, -3.84313*10^-4, 2.91301*10^-3, 4.80335*10^-3, 8.61686*10^-4, 1.40539*10^-3, 1.95178*10^-3, -2.78354*10^-4, -2.43704*10^-3, -2.3621*10^-4, 4.23868*10^-3, -5.92458*10^-4, -4.46858*10^-3, -2.84673*10^-3, -7.28816*10^-4, -2.34322*10^-3, -2.21456*10^-3, 2.85524*10^-3, 1.59543*10^-3, -1.62569*10^-3, -6.62465*10^-4, 2.90071*10^-3, 3.14338*10^-3, 2.76293*10^-4, -6.64091*10^-4, 9.55951*10^-4, -2.73964*10^-5, -5.00895*10^-4, -3.50802*10^-4, -9.79809*10^-5, 1.53133*10^-4, -8.41651*10^-4, -1.77624*10^-3, -2.19278*10^-3, 7.32989*10^-4, 2.63843*10^-3, 2.63199*10^-3, -5.95601*10^-4, -1.49484*10^-3, 9.34703*10^-4, 9.48527*10^-4, -9.29703*10^-4, -1.15517*10^-3, -3.89822*10^-4, 2.53754*10^-4, -4.32335*10^-4, -3.39077*10^-4, 5.88923*10^-4, 2.28243*10^-4, -3.53326*10^-4, 4.89925*10^-5, 3.371*10^-4, 3.68061*10^-4, 1.61925*10^-4, 8.79203*10^-5, -1.05008*10^-4, -4.91721*10^-5, -7.67448*10^-5, -6.1289*10^-5, -3.33774*10^-5, -7.06464*10^-5, -1.05671*10^-5, 2.12878*10^-5, -3.25801*10^-6, 1.09688*10^-7, 5.57647*10^-6, 3.1932*10^-6, 9.49831*10^-7, 0));
h(26,0) = fi.fir((2.68192*10^-6, 5.38381*10^-5, -7.47409*10^-5, -1.42843*10^-4, 2.49371*10^-4, 3.19706*10^-4, -5.1771*10^-4, 8.60445*10^-5, 4.35335*10^-4, -1.14515*10^-3, 1.34702*10^-3, -1.77218*10^-3, -2.67511*10^-3, 1.39846*10^-2, 2.71387*10^-3, -2.30019*10^-2, -5.03077*10^-4, 3.97455*10^-3, -4.28855*10^-3, 2.58428*10^-2, 4.40381*10^-3, -3.19437*10^-2, -1.35128*10^-2, 2.68305*10^-2, 1.5686*10^-2, -1.38866*10^-2, -1.27638*10^-2, -7.24165*10^-3, 2.38144*10^-2, 1.23298*10^-2, -1.74139*10^-2, -9.73992*10^-3, 1.06577*10^-2, 3.12486*10^-3, -2.86586*10^-3, -3.96475*10^-3, -1.0624*10^-2, 7.68047*10^-3, 9.14505*10^-3, -4.15635*10^-3, -9.09655*10^-3, -1.01376*10^-3, 3.48552*10^-3, 4.39891*10^-3, 3.14719*10^-3, -5.99736*10^-3, 1.40738*10^-3, 6.07597*10^-3, 7.76718*10^-4, 1.90838*10^-4, -2.23711*10^-4, 1.22064*10^-3, 3.76688*10^-4, -3.94129*10^-4, -3.47579*10^-3, -1.91599*10^-3, 7.70106*10^-5, -1.19369*10^-3, -2.03858*10^-3, -1.32063*10^-3, 2.99716*10^-3, 2.9268*10^-3, 5.62786*10^-4, -1.04869*10^-3, 8.26995*10^-4, 1.88054*10^-3, -4.93161*10^-4, -3.90518*10^-3, -1.51366*10^-3, 3.76388*10^-3, 5.3093*10^-4, -3.00154*10^-3, -2.40843*10^-3, 8.5528*10^-4, 3.85729*10^-4, -2.43098*10^-3, -2.37887*10^-4, 2.89557*10^-3, 2.61856*10^-3, 3.28094*10^-4, 8.79738*10^-4, 7.70035*10^-4, 5.71347*10^-5, 3.76642*10^-4, 1.31691*10^-3, 9.55996*10^-4, 7.21945*10^-4, -4.03372*10^-4, -1.60847*10^-3, -1.03283*10^-3, -7.51801*10^-4, 4.23174*10^-4, 6.27723*10^-4, -6.71705*10^-4, -8.58713*10^-4, 1.62586*10^-3, 1.03657*10^-3, -9.5057*10^-4, -9.10638*10^-4, -1.0125*10^-3, -8.61948*10^-4, -3.62245*10^-5, -2.27309*10^-4, -5.78743*10^-4, -5.47456*10^-4, 6.47828*10^-5, -2.35777*10^-4, -5.59697*10^-4, -3.44701*10^-4, 2.84905*10^-5, 3.02894*10^-4, 1.77081*10^-4, -1.71227*10^-4, -8.80198*10^-5, 6.64343*10^-5, 6.22115*10^-5, 4.16509*10^-5, 9.30948*10^-5, -1.38413*10^-5, -4.98662*10^-5, 3.01538*10^-5, 4.76362*10^-5, 2.37743*10^-5, 1.70699*10^-5, 4.2651*10^-6, 6.51553*10^-8, 4.06252*10^-7, 0));
h(27,0) = fi.fir((8.51986*10^-6, -7.74554*10^-5, -1.57615*10^-4, 2.81386*10^-4, 7.3914*10^-4, 4.23694*10^-4, -2.06734*10^-3, 2.0378*10^-3, -2.29203*10^-3, 2.98479*10^-3, -5.20434*10^-3, 1.27194*10^-2, 1.84747*10^-2, 2.50006*10^-2, -4.69379*10^-2, -6.82872*10^-2, 1.76843*10^-2, -9.09983*10^-3, 2.63662*10^-2, 2.2592*10^-2, 6.3924*10^-3, 3.44057*10^-2, 8.71626*10^-3, -1.09569*10^-2, -2.00701*10^-2, -3.34543*10^-3, 1.22418*10^-2, -7.62197*10^-3, -1.82466*10^-2, -1.58395*10^-4, 8.04866*10^-3, -7.42268*10^-3, -1.70216*10^-2, -1.33348*10^-2, -8.67311*10^-3, 2.38606*10^-3, 1.93621*10^-2, 1.55897*10^-2, 2.11082*10^-3, 5.56127*10^-3, 8.4834*10^-3, 9.72094*10^-3, -3.15093*10^-3, -6.12273*10^-3, 3.13242*10^-3, 3.43884*10^-3, -3.62372*10^-3, -8.52966*10^-3, -1.53152*10^-3, -2.58936*10^-3, -3.48503*10^-3, -5.35488*10^-3, -5.97157*10^-3, 2.31401*10^-3, 2.92822*10^-3, -1.38717*10^-3, -3.00938*10^-3, -1.19474*10^-3, 5.74179*10^-5, -1.84167*10^-4, 1.72416*10^-3, 1.50731*10^-3, 3.8534*10^-3, 5.42097*10^-3, 3.39852*10^-3, 2.69334*10^-3, 1.66145*10^-3, -1.48438*10^-4, -1.11658*10^-3, -1.16978*10^-3, -1.22465*10^-3, -2.61339*10^-3, -5.84997*10^-4, -2.92849*10^-4, -7.56*10^-4, 2.1444*10^-3, 5.62922*10^-5, -3.50869*10^-3, -2.89841*10^-3, 2.28003*10^-4, 1.17529*10^-3, 8.44764*10^-4, 7.15955*10^-4, 1.11741*10^-3, 1.48688*10^-3, 1.15957*10^-3, -1.09252*10^-3, -2.20769*10^-3, -1.13326*10^-3, -2.55332*10^-4, 9.35657*10^-4, -4.01088*10^-4, 3.27901*10^-4, 2.48299*10^-3, 1.93815*10^-3, -7.27717*10^-5, -9.40745*10^-4, -4.50768*10^-4, -8.76083*10^-4, -1.25786*10^-3, -4.3473*10^-4, 1.59333*10^-4, 3.35003*10^-4, 2.85647*10^-5, -6.99542*10^-5, 1.42745*10^-4, -8.06921*10^-5, -2.4979*10^-4, -8.0048*10^-5, -2.53297*10^-4, -1.35398*10^-4, 2.72418*10^-4, 2.00374*10^-4, -2.73761*10^-5, -8.88094*10^-5, 2.73751*10^-5, 2.66986*10^-4, 7.26382*10^-5, -2.03089*10^-5, -2.65182*10^-5, 4.53633*10^-6, -5.46369*10^-7, -3.69577*10^-6, 9.80256*10^-6, -8.48683*10^-6, 4.36517*10^-6, 2.06204*10^-6, 0));
h(28,0) = fi.fir((-2.45111*10^-6, 6.66307*10^-5, -9.32174*10^-5, -1.60407*10^-5, 1.66822*10^-4, 1.24945*10^-4, -2.63228*10^-4, 1.75562*10^-4, 8.99811*10^-6, -4.89232*10^-4, 8.61523*10^-4, -5.50526*10^-4, -2.741*10^-3, 9.06451*10^-3, 1.47161*10^-3, -1.31018*10^-2, -1.50782*10^-3, 4.18876*10^-3, -2.4936*10^-3, 2.00021*10^-2, 6.25602*10^-3, -4.5702*10^-2, 1.71183*10^-2, 1.90398*10^-2, -9.87325*10^-3, 2.86731*10^-3, -9.41389*10^-3, 5.60726*10^-3, -4.25737*10^-4, -1.00331*10^-3, -1.15684*10^-3, 6.25974*10^-3, 1.32022*10^-3, -1.10307*10^-2, -3.32504*10^-3, 4.56292*10^-3, 6.60159*10^-3, 2.73952*10^-3, -4.58215*10^-3, -4.38771*10^-3, 2.02385*10^-3, 3.9643*10^-3, 2.29238*10^-4, 1.8177*10^-4, 5.30734*10^-4, -1.07051*10^-3, -8.05097*10^-4, 3.55014*10^-4, 1.49892*10^-3, -8.3629*10^-4, -2.93281*10^-4, -2.95353*10^-3, -1.9031*10^-3, -1.97557*10^-3, -1.97986*10^-3, -1.57247*10^-4, -4.70026*10^-4, -2.31036*10^-3, -1.80221*10^-3, 2.72356*10^-3, 3.19405*10^-3, 2.66101*10^-3, 2.00488*10^-3, 3.1505*10^-3, 4.52555*10^-3, 1.35169*10^-3, 1.45411*10^-4, 1.97812*10^-3, 7.67253*10^-4, -2.01637*10^-3, -9.7867*10^-4, -4.91883*10^-4, -1.59083*10^-3, -2.78685*10^-3, -2.58031*10^-3, -1.54227*10^-3, -1.91087*10^-3, -9.45088*10^-4, 1.47535*10^-4, 1.87605*10^-3, 9.27866*10^-4, -1.72966*10^-3, 5.17364*10^-4, 8.3453*10^-4, -9.58155*10^-4, -5.64467*10^-4, 2.71591*10^-4, 3.32391*10^-5, -1.28847*10^-3, -9.01326*10^-4, 6.15793*10^-4, 1.35228*10^-3, 1.13838*10^-3, 3.65355*10^-4, 1.94269*10^-4, 6.89543*10^-4, -1.09271*10^-4, -4.3673*10^-4, 7.48744*10^-5, -8.89243*10^-5, -2.21859*10^-4, 1.9163*10^-4, 4.51852*10^-4, 1.65983*10^-4, -2.60014*10^-5, 1.96808*10^-4, 1.71925*10^-4, 1.27255*10^-4, 2.14574*10^-5, 5.18306*10^-5, -2.48485*10^-5, 1.79268*10^-4, 1.23721*10^-4, 2.41166*10^-5, 4.99249*10^-5, -7.10481*10^-6, -1.77564*10^-5, -2.35601*10^-7, 2.56017*10^-5, 6.58063*10^-6, -2.38164*10^-5, -7.21558*10^-6, -4.49342*10^-6, -6.23026*10^-6, -6.40275*10^-6, -1.86267*10^-6, 5.07019*10^-7, 0));
h(29,0) = fi.fir((-2.18142*10^-5, -1.56564*10^-4, -1.84408*10^-4, -1.06294*10^-5, -2.93371*10^-4, 3.27483*10^-4, 8.31128*10^-4, 8.17338*10^-4, -8.56541*10^-4, 1.37029*10^-3, -1.7446*10^-3, 7.09911*10^-3, 1.0756*10^-2, -1.95281*10^-3, 2.98747*10^-3, -9.02319*10^-3, -3.53463*10^-2, -4.7048*10^-2, -7.06658*10^-3, 2.98992*10^-2, 2.58465*10^-2, 4.26235*10^-2, 3.92127*10^-2, 6.48839*10^-3, -1.66423*10^-3, -1.35478*10^-2, -3.41773*10^-2, -1.68554*10^-2, -2.65172*10^-2, -2.17894*10^-2, 8.60355*10^-3, 8.93964*10^-3, 1.05553*10^-2, 4.43326*10^-3, 6.52963*10^-3, 6.90235*10^-3, 4.03661*10^-3, -4.34042*10^-3, -9.32151*10^-4, -1.8332*10^-4, -3.16858*10^-3, 8.43456*10^-3, 5.70878*10^-3, -1.04407*10^-3, -1.60081*10^-3, 2.86157*10^-3, 3.20929*10^-3, 3.54243*10^-3, 1.28158*10^-4, -5.82607*10^-3, -5.60222*10^-3, -2.0779*10^-3, -2.31387*10^-3, -1.7007*10^-3, -4.11024*10^-4, 7.43701*10^-4, 2.33792*10^-3, 7.64665*10^-4, -1.82756*10^-3, -2.63297*10^-4, -4.69645*10^-4, -2.57292*10^-4, 1.17857*10^-3, 7.8053*10^-4, -1.52468*10^-5, 6.70616*10^-4, 3.99552*10^-3, 9.45599*10^-5, -2.58432*10^-3, 1.85273*10^-3, 1.45445*10^-3, 4.15991*10^-5, -1.07001*10^-3, -2.59023*10^-3, -1.47947*10^-3, 9.27011*10^-4, 1.20252*10^-3, -2.71824*10^-4, -2.60324*10^-4, 9.53455*10^-4, 3.26808*10^-5, -2.77959*10^-3, -7.70604*10^-4, -3.01831*10^-4, 3.07557*10^-4, 2.00473*10^-3, 2.5674*10^-3, 1.52675*10^-3, -4.54995*10^-4, -9.2322*10^-4, -2.85195*10^-3, -1.95925*10^-3, -1.97653*10^-4, 2.60997*10^-4, 1.42043*10^-3, 1.42217*10^-3, -1.21333*10^-4, 7.64203*10^-4, 1.7678*10^-3, -2.00928*10^-4, -2.02617*10^-3, -7.54518*10^-4, -4.18504*10^-4, -2.88454*10^-4, 1.79094*10^-4, 1.47907*10^-4, 1.29107*10^-4, -1.89154*10^-4, 8.77618*10^-5, 7.6293*10^-5, 3.11603*10^-5, 2.20948*10^-4, 1.14784*10^-4, 1.15323*10^-4, -9.51111*10^-5, -6.27218*10^-5, -1.20831*10^-4, 7.54961*10^-5, 8.79836*10^-5, -5.42298*10^-5, -4.57112*10^-5, 7.11125*10^-6, 3.00959*10^-5, 5.90208*10^-6, 5.44547*10^-6, -2.11481*10^-6, 1.0928*10^-7, 0));
h(30,0) = fi.fir((-1.18039*10^-5, 6.60603*10^-6, 2.11791*10^-4, -2.46179*10^-4, -3.99461*10^-4, 3.98691*10^-4, 3.27605*10^-4, -1.47688*10^-4, -5.1073*10^-4, 6.04741*10^-4, -1.06129*10^-3, 5.36497*10^-4, -1.29335*10^-2, 1.4727*10^-3, 3.11939*10^-2, 9.90797*10^-3, -2.34014*10^-2, -3.03173*10^-2, 1.02524*10^-2, 5.28166*10^-3, 2.64191*10^-2, 1.36932*10^-2, -4.89987*10^-2, 1.03916*10^-3, 9.32673*10^-3, 1.36454*10^-2, 2.49342*10^-3, -1.18615*10^-2, -2.37959*10^-4, 1.12098*10^-3, 1.03706*10^-2, -1.21944*10^-2, -5.78663*10^-3, 1.43394*10^-2, 7.13828*10^-3, -1.56883*10^-2, -6.44337*10^-3, 8.18587*10^-4, 8.27502*10^-3, 8.45345*10^-3, -4.65704*10^-3, -2.93578*10^-3, -1.74324*10^-3, 3.76534*10^-3, -3.7675*10^-4, -1.03774*10^-3, 9.59046*10^-4, -1.19035*10^-3, 1.93187*10^-3, 4.40682*10^-5, -1.71104*10^-4, 6.04681*10^-4, 2.80423*10^-3, 1.24663*10^-3, -4.93117*10^-3, -1.73866*10^-3, 1.4399*10^-3, 1.9703*10^-3, -1.11116*10^-3, -3.59368*10^-3, -1.98759*10^-3, -2.84615*10^-4, -5.25284*10^-4, -1.02227*10^-3, 1.8252*10^-3, 1.95075*10^-3, -4.33131*10^-4, -5.29127*10^-4, 1.48042*10^-3, 1.35711*10^-3, -7.68065*10^-4, 7.3311*10^-4, 7.05703*10^-4, -4.88378*10^-4, -7.30893*10^-5, 1.09489*10^-3, -9.40939*10^-4, -2.53659*10^-3, 5.94607*10^-4, 1.43457*10^-3, -5.24453*10^-4, -7.68652*10^-4, 1.39346*10^-3, 1.80516*10^-3, 4.37236*10^-6, -2.92426*10^-3, -2.24872*10^-3, 6.11472*10^-4, 2.86831*10^-4, -8.52483*10^-4, -9.67328*10^-4, -9.20395*10^-5, 1.22176*10^-3, 1.72185*10^-3, 7.73201*10^-4, -3.79908*10^-4, -9.09645*10^-4, -3.48091*10^-4, 3.39934*10^-4, 3.52626*10^-4, -1.17002*10^-4, -7.80214*10^-5, 8.07527*10^-5, -1.68338*10^-5, -1.11947*10^-4, -1.87727*10^-4, -7.96625*10^-5, -1.39837*10^-4, 1.93883*10^-4, -6.72879*10^-6, -1.16221*10^-4, 4.81784*10^-5, -6.48567*10^-5, -8.94861*10^-7, -1.19238*10^-5, 1.58936*10^-4, 9.31571*10^-5, -3.46926*10^-5, -7.13169*10^-5, -5.88322*10^-5, 3.59987*10^-5, 3.74989*10^-5, 4.86425*10^-6, -2.06496*10^-6, 6.6844*10^-7, -9.10627*10^-7, -3.55656*10^-7, 0));
h(31,0) = fi.fir((1.01157*10^-6, -4.03825*10^-5, 2.23065*10^-5, -1.47048*10^-4, 3.3447*10^-4, -6.64534*10^-4, 7.55389*10^-5, 7.61332*10^-5, 5.94679*10^-4, 1.81232*10^-4, -1.14539*10^-3, 9.23611*10^-4, 3.06798*10^-5, 2.00059*10^-3, -1.6422*10^-2, 1.40754*10^-2, 1.3812*10^-2, 5.06151*10^-3, -9.81395*10^-3, -4.59517*10^-2, 2.47785*10^-2, 1.60248*10^-2, -2.50778*10^-3, -5.72812*10^-3, -6.52795*10^-3, 2.65575*10^-2, -1.61714*10^-3, -1.19202*10^-2, -7.35669*10^-3, 6.00253*10^-3, 1.02206*10^-3, -9.38958*10^-3, 6.11832*10^-3, 4.89319*10^-3, 1.05405*10^-3, -5.47477*10^-3, -2.0941*10^-3, 6.8213*10^-3, -2.99433*10^-3, -5.42361*10^-3, -5.4999*10^-4, -7.87007*10^-5, -4.61107*10^-3, -4.80775*10^-4, 1.30451*10^-3, 9.18804*10^-4, 1.65884*10^-3, 1.49424*10^-4, 2.0852*10^-3, 9.60428*10^-4, 1.8685*10^-3, 2.76262*10^-3, 6.98747*10^-3, 3.78388*10^-3, -2.27789*10^-3, 9.75207*10^-4, 7.42107*10^-4, -1.23695*10^-3, -3.36984*10^-3, -5.50671*10^-3, -3.03662*10^-3, -6.60673*10^-4, -6.6618*10^-4, -1.03156*10^-3, 1.53153*10^-3, 1.79709*10^-3, 1.46131*10^-3, 1.89629*10^-3, 1.17538*10^-3, -1.03923*10^-4, 1.48803*10^-4, 4.53915*10^-4, -8.26743*10^-4, -3.24762*10^-3, -3.55812*10^-3, -1.36177*10^-3, -4.16915*10^-4, 1.11758*10^-3, 1.39629*10^-3, 1.67645*10^-3, 8.32944*10^-4, -9.69889*10^-4, -9.83742*10^-4, -1.76922*10^-3, -1.13013*10^-3, 2.84445*10^-5, 1.25928*10^-3, -1.13318*10^-5, -1.7108*10^-3, 1.17786*10^-4, 1.89*10^-3, 1.85798*10^-3, 5.69339*10^-4, 1.59872*10^-4, 9.04747*10^-4, 9.86218*10^-4, -6.75161*10^-5, 1.84688*10^-4, 1.5707*10^-3, 8.84292*10^-4, 1.86045*10^-4, 7.65027*10^-5, -1.78949*10^-4, -2.48451*10^-4, -4.8894*10^-4, -4.23574*10^-4, -1.84412*10^-5, 6.94546*10^-5, -5.46457*10^-4, -6.89602*10^-4, -2.08731*10^-4, -2.04718*10^-4, -1.0308*10^-4, 2.61503*10^-5, -5.68727*10^-5, -1.62033*10^-4, -2.11951*10^-4, -4.45035*10^-5, -1.24917*10^-5, -1.96488*10^-5, 1.24482*10^-5, 5.01888*10^-5, 3.12629*10^-5, 7.84319*10^-6, 5.23772*10^-6, 2.50842*10^-6, 1.26382*10^-7, 0));
h(32,0) = fi.fir((-4.48862*10^-6, 6.09362*10^-5, 2.44466*10^-4, -1.75865*10^-4, -4.49274*10^-4, 4.98891*10^-4, 7.51191*10^-4, -3.11959*10^-4, -3.31602*10^-4, 3.64566*10^-4, -2.79713*10^-4, 5.17846*10^-4, -1.51797*10^-2, 1.73991*10^-3, 3.75927*10^-2, 9.66999*10^-3, -3.46531*10^-2, -2.97084*10^-2, 1.47103*10^-2, 3.66681*10^-2, 2.61141*10^-2, -1.88242*10^-2, -5.40977*10^-2, -2.57094*10^-2, 2.98618*10^-2, 3.33516*10^-2, 3.18798*10^-3, -9.88893*10^-3, -1.88993*10^-2, -7.7309*10^-3, 1.38099*10^-2, 2.22203*10^-2, -4.07277*10^-4, -1.55326*10^-2, -3.21032*10^-3, 7.51132*10^-3, -3.6415*10^-3, 1.25525*10^-3, 9.09915*10^-3, 2.06941*10^-3, -5.42482*10^-3, -1.16972*10^-2, 2.8542*10^-4, 9.08149*10^-3, 9.73025*10^-3, -1.85872*10^-3, -7.28406*10^-3, -3.70021*10^-3, -3.08716*10^-3, 4.51093*10^-3, 3.89232*10^-3, -3.14501*10^-3, -4.60254*10^-4, -1.96657*10^-4, -2.54129*10^-3, 9.01699*10^-4, 3.61275*10^-3, 1.42499*10^-3, -2.29887*10^-3, -2.99232*10^-3, -5.83665*10^-4, 5.25939*10^-4, -7.98806*10^-5, -1.70656*10^-3, -6.68441*10^-4, 1.1855*10^-4, -8.67284*10^-4, 5.37148*10^-4, 2.29131*10^-3, 1.72384*10^-3, 1.07515*10^-3, 5.97472*10^-4, -3.05031*10^-4, -8.13872*10^-4, 6.42208*10^-5, 1.7048*10^-3, 1.3547*10^-3, 2.49221*10^-4, -3.3844*10^-4, -1.58616*10^-3, -1.18645*10^-3, 1.46979*10^-4, 6.4464*10^-5, 6.1178*10^-4, -2.0812*10^-3, -2.30834*10^-3, 1.92456*10^-3, 3.2023*10^-3, 9.47805*10^-4, -2.55453*10^-3, -7.71784*10^-4, 4.6127*10^-4, -4.69807*10^-4, 3.90704*10^-4, 1.51091*10^-3, 1.97553*10^-3, 5.6378*10^-4, 1.39927*10^-4, 4.52311*10^-4, 3.41852*10^-4, 2.79169*10^-4, 7.55511*10^-4, 1.22775*10^-3, 4.61068*10^-4, -3.11203*10^-4, 1.86037*10^-4, 3.25624*10^-4, -1.01329*10^-5, 1.12732*10^-5, 5.47188*10^-5, 2.87584*10^-4, 2.58787*10^-4, -4.64091*10^-6, -5.30887*10^-5, -7.25049*10^-6, -6.32482*10^-5, -2.12418*10^-5, 7.75834*10^-5, 3.02156*10^-5, -4.38703*10^-5, -1.2815*10^-5, 5.53353*10^-6, -1.16328*10^-5, -7.25239*10^-6, -2.23419*10^-6, 2.83422*10^-6, -1.89068*10^-7, 0));
h(33,0) = fi.fir((1.26794*10^-5, -3.7578*10^-5, 1.20349*10^-4, -3.25849*10^-4, 2.95949*10^-4, -1.02578*10^-3, 5.33003*10^-4, -5.52184*10^-4, 1.28688*10^-3, -1.80737*10^-4, -2.36882*10^-4, -1.11859*10^-3, -2.74356*10^-3, 4.83803*10^-3, -1.52924*10^-2, 1.87626*10^-2, 1.2748*10^-2, 2.67758*10^-3, -3.84138*10^-4, -4.83742*10^-2, 1.80199*10^-2, 2.44772*10^-2, -2.35437*10^-2, -2.7768*10^-2, 9.72829*10^-3, 5.97894*10^-2, 5.78605*10^-3, -2.70073*10^-2, -1.25824*10^-2, -1.3434*10^-2, 3.5737*10^-3, 9.26215*10^-3, -9.21767*10^-5, 7.54794*10^-3, -6.29108*10^-3, 5.95796*10^-4, 1.3603*10^-2, -2.96929*10^-3, 2.7787*10^-4, -1.54923*10^-3, -4.33275*10^-4, -6.92862*10^-3, -1.0442*10^-2, 3.4046*10^-3, 3.85159*10^-3, 3.92166*10^-3, -2.73524*10^-3, -4.35121*10^-3, 5.08894*10^-3, 4.72401*10^-4, 2.12803*10^-3, 4.74119*10^-3, -2.16002*10^-3, -2.90217*10^-3, -2.47795*10^-3, -1.38943*10^-3, 1.22764*10^-3, 3.29923*10^-3, 2.06871*10^-3, -3.82866*10^-3, -5.14821*10^-3, -3.03617*10^-3, 2.41698*10^-4, 9.7928*10^-4, -2.62236*10^-3, -8.86112*10^-4, 2.75799*10^-3, 2.54593*10^-3, 2.16744*10^-3, 1.09212*10^-3, -5.37946*10^-4, -3.21608*10^-4, 7.89164*10^-4, 3.70871*10^-4, -1.16524*10^-4, -3.63363*10^-4, 2.0359*10^-3, 2.84025*10^-3, 2.40705*10^-3, 6.30052*10^-4, -8.457*10^-4, 5.49988*10^-4, -1.36692*10^-3, -2.63742*10^-3, -2.43838*10^-3, -2.92289*10^-4, 1.09914*10^-3, -2.7603*10^-4, -3.30784*10^-4, 5.08796*10^-4, 9.19875*10^-4, -3.45505*10^-4, -1.59165*10^-3, -8.26149*10^-4, 1.04705*10^-4, -8.57647*10^-4, -2.17092*10^-3, -2.26857*10^-4, 9.96146*10^-4, 3.54697*10^-4, 8.09902*10^-5, 6.6595*10^-4, 2.99469*10^-4, -6.72221*10^-4, -2.96615*10^-4, 1.79193*10^-4, 1.60559*10^-4, 5.49628*10^-5, 1.77574*10^-4, 2.36535*10^-4, 4.61641*10^-4, 1.12188*10^-4, -3.30619*10^-5, 1.61932*10^-4, 1.35399*10^-4, 2.01172*10^-5, -1.58067*10^-4, 3.94347*10^-5, 7.90168*10^-5, 2.52952*10^-5, -1.41828*10^-5, 7.16722*10^-6, 1.40883*10^-5, -1.1707*10^-5, -2.7363*10^-6, -4.80203*10^-6, -5.81624*10^-7, 0));
h(34,0) = fi.fir((8.14951*10^-6, 3.52685*10^-7, 3.19158*10^-5, 1.14879*10^-5, 4.00007*10^-4, -2.71113*10^-4, -7.01769*10^-4, 1.07489*10^-3, 6.41677*10^-4, -9.01272*10^-4, -6.88747*10^-4, 1.7748*10^-3, -6.96466*10^-3, 2.49486*10^-3, -2.98*10^-3, 2.39814*10^-3, 4.0556*10^-2, -7.6565*10^-3, -3.67176*10^-2, -7.14102*10^-3, 2.16451*10^-2, 2.43323*10^-3, -3.38868*10^-2, 9.98825*10^-3, 1.7029*10^-2, -7.64684*10^-3, 1.21183*10^-2, -6.28892*10^-4, -1.68571*10^-2, -1.01902*10^-3, 1.65353*10^-2, 1.86297*10^-2, -1.46474*10^-2, -1.62934*10^-2, -6.38752*10^-3, 9.29137*10^-3, 1.42479*10^-2, -7.99541*10^-3, -4.23944*10^-3, 1.28385*10^-3, -4.18323*10^-3, 9.13826*10^-4, 1.01335*10^-2, 9.28239*10^-4, -2.46241*10^-3, 1.15421*10^-3, 6.00314*10^-4, -1.37786*10^-3, 1.00493*10^-4, 4.1121*10^-3, -1.41283*10^-3, -3.19451*10^-3, -2.61967*10^-3, -2.7896*10^-3, 5.88005*10^-4, 1.00567*10^-3, -5.48478*10^-4, -2.17545*10^-3, -9.33177*10^-4, 1.25557*10^-3, 8.94945*10^-4, 2.7542*10^-3, 3.56714*10^-3, -4.7788*10^-4, -5.12486*10^-3, -1.72815*10^-3, 2.47594*10^-3, 1.44275*10^-4, 1.48588*10^-3, 3.1345*10^-3, -7.56187*10^-4, -2.44176*10^-3, -4.33004*10^-4, 1.63421*10^-3, 4.28056*10^-4, -2.87614*10^-3, -2.42127*10^-3, 4.56407*10^-4, 1.5641*10^-3, 9.49912*10^-4, 1.08999*10^-3, 1.16118*10^-3, 1.46583*10^-4, -2.16163*10^-4, -1.27645*10^-4, -2.33796*10^-3, -8.47197*10^-4, 2.60412*10^-3, 1.65866*10^-3, -1.86258*10^-3, -1.5387*10^-3, 1.94141*10^-3, 1.36244*10^-3, -2.97423*10^-4, 1.67942*10^-4, 9.26958*10^-4, -2.14066*10^-4, -1.16884*10^-4, 6.92021*10^-4, 5.04406*10^-4, -3.35078*10^-4, 6.28932*10^-4, 9.95192*10^-4, 2.33008*10^-4, 1.0493*10^-4, 5.76404*10^-4, 7.4196*10^-4, -2.23633*10^-4, -5.01475*10^-4, 4.83903*10^-4, 5.36297*10^-4, 1.55359*10^-4, 5.6033*10^-5, 2.01717*10^-5, -4.89991*10^-5, 7.32446*10^-5, -1.40287*10^-4, -1.56736*10^-5, 5.99611*10^-5, -1.58143*10^-6, -5.35903*10^-5, -2.33977*10^-5, -4.23318*10^-6, -2.27502*10^-5, 7.261*10^-6, -3.27926*10^-6, -1.24281*10^-6, 0));
h(35,0) = fi.fir((5.40621*10^-6, 1.91853*10^-5, 1.33104*10^-4, -9.32093*10^-4, 1.94297*10^-4, -5.95943*10^-4, 2.59053*10^-3, -2.76788*10^-3, 2.10005*10^-3, -2.83878*10^-3, 6.53665*10^-3, -1.06439*10^-2, -2.64557*10^-2, 2.02633*10^-2, 3.50476*10^-2, 2.93269*10^-2, -4.17492*10^-2, -2.79913*10^-2, 2.17552*10^-2, -9.52426*10^-3, -2.7775*10^-2, -2.88177*10^-2, 4.94517*10^-2, 4.98324*10^-2, -1.54797*10^-2, -1.93369*10^-3, 4.87655*10^-3, -5.16451*10^-3, -1.44908*10^-2, -1.22021*10^-3, -3.46316*10^-3, -1.41067*10^-2, 3.84372*10^-3, 4.87331*10^-4, -1.71877*10^-3, 8.07785*10^-3, -2.49059*10^-3, -1.64291*10^-3, 1.79895*10^-3, -4.80367*10^-3, -3.04848*10^-4, -3.38744*10^-4, 3.16473*10^-3, 2.54488*10^-3, 3.88663*10^-3, 5.0693*10^-3, -1.43747*10^-3, 2.19258*10^-3, 1.72276*10^-3, 1.55049*10^-5, 1.21859*10^-3, -3.66072*10^-4, -3.84556*10^-3, -4.5419*10^-3, -1.4153*10^-3, 2.86103*10^-3, 2.72508*10^-3, 1.1049*10^-4, -8.63202*10^-4, -2.78885*10^-4, 8.0278*10^-4, -1.36552*10^-3, -8.49942*10^-4, -1.425*10^-3, -9.16682*10^-4, 6.46569*10^-4, 6.50717*10^-4, 2.05676*10^-3, 4.11961*10^-4, -6.81564*10^-4, -1.04465*10^-3, 4.06358*10^-4, -5.18251*10^-5, -3.02467*10^-3, -6.25004*10^-4, 6.71543*10^-4, -1.16373*10^-4, -5.34862*10^-4, -3.65446*10^-4, 3.93975*10^-4, 2.2775*10^-5, 1.00113*10^-3, 8.3288*10^-4, 1.15098*10^-4, 3.53773*10^-4, 2.67389*10^-4, -6.30503*10^-4, -6.6567*10^-4, 8.29062*10^-4, 1.23606*10^-3, -8.7084*10^-4, -7.16723*10^-4, 7.45042*10^-4, 5.75747*10^-4, 5.69013*10^-4, -8.98243*10^-4, -5.03005*10^-4, 5.71304*10^-4, -5.31534*10^-5, 3.29446*10^-4, 9.95788*10^-4, 1.60726*10^-4, -5.96185*10^-4, 2.12565*10^-4, 5.79142*10^-4, -2.2867*10^-4, -2.57395*10^-4, 6.56951*10^-5, 1.84131*10^-4, 2.27385*10^-4, -1.03678*10^-4, -2.96208*10^-4, 1.43947*10^-4, 1.30158*10^-4, -1.59219*10^-4, -7.53028*10^-5, -4.23704*10^-5, -4.65941*10^-5, 3.94849*10^-5, 1.10663*10^-5, -5.17859*10^-5, -3.0136*10^-5, 1.87906*10^-6, -8.87482*10^-6, -1.04529*10^-6, -1.1368*10^-7, 4.15975*10^-7, 0));
h(0,1) = fi.fir((1.96889*10^-5, 1.27139*10^-4, -1.60754*10^-4, 7.24458*10^-4, 8.40054*10^-4, 7.82518*10^-4, 6.46817*10^-4, 1.05561*10^-3, 1.07368*10^-3, 5.57527*10^-4, 2.06854*10^-3, 7.39153*10^-4, 4.89414*10^-2, 5.30012*10^-2, 4.66987*10^-2, 6.22112*10^-2, 4.39486*10^-2, 8.13459*10^-2, 4.74243*10^-2, 4.14059*10^-2, 6.97323*10^-2, 5.03806*10^-2, 1.11697*10^-1, 5.44643*10^-2, -2.12956*10^-2, 3.68012*10^-2, 4.24237*10^-2, 7.52294*10^-3, 1.23141*10^-2, 2.16826*10^-2, 1.77306*10^-2, 8.01942*10^-3, -2.93953*10^-3, 2.1074*10^-2, 2.72114*10^-2, 5.65642*10^-3, 1.05391*10^-2, 8.15985*10^-3, 6.06657*10^-3, 7.29384*10^-3, 1.45252*10^-3, 4.98629*10^-3, 1.40384*10^-2, 1.05579*10^-2, -9.20787*10^-4, 4.31154*10^-3, 8.46299*10^-3, 7.157*10^-4, 6.71666*10^-4, 4.64837*10^-3, 1.43566*10^-3, 2.09301*10^-4, 1.39635*10^-3, 2.92299*10^-3, 4.2595*10^-3, 3.9974*10^-3, 4.49754*10^-6, -6.33171*10^-4, 2.78079*10^-3, 3.80208*10^-3, 2.61221*10^-3, 3.38193*10^-3, 6.48151*10^-3, 6.72976*10^-3, 3.88011*10^-3, 2.93818*10^-3, 1.69334*10^-3, 2.81279*10^-3, 3.37264*10^-3, -3.62222*10^-4, 7.2404*10^-4, 1.98287*10^-3, 3.90875*10^-3, 5.30227*10^-3, 3.60327*10^-3, 5.38217*10^-3, 4.63264*10^-3, 2.01999*10^-3, 2.04096*10^-3, 1.44247*10^-3, 2.66924*10^-3, 1.53689*10^-3, -6.87957*10^-4, 2.51564*10^-5, 1.05509*10^-3, 1.75057*10^-3, 2.67456*10^-3, 3.65475*10^-3, 1.93882*10^-3, -8.75197*10^-4, -6.11186*10^-4, -1.7742*10^-5, -1.96204*10^-3, -2.3706*10^-3, -9.94088*10^-5, 3.35121*10^-3, 2.5739*10^-3, -4.73651*10^-4, -4.8385*10^-4, 5.9498*10^-4, 9.45038*10^-4, 1.3272*10^-3, 1.47426*10^-3, 1.84199*10^-3, 1.2236*10^-3, 1.00501*10^-3, 1.62599*10^-3, 1.30975*10^-3, 9.59789*10^-4, 7.79071*10^-4, 7.09245*10^-4, 1.03368*10^-3, 5.0422*10^-4, 4.26597*10^-4, 5.08036*10^-4, 5.02614*10^-4, 3.83524*10^-4, 1.61141*10^-4, 2.02164*10^-4, 1.95057*10^-4, 1.17308*10^-4, 5.59968*10^-5, -1.47262*10^-6, 7.39806*10^-7, 1.69708*10^-5, 7.13748*10^-6, 1.74779*10^-6, 0));
h(1,1) = fi.fir((-2.47098*10^-5, -1.5027*10^-4, 2.75169*10^-4, -8.51532*10^-4, -8.49503*10^-4, -1.07232*10^-3, -4.29699*10^-4, -4.53602*10^-4, -1.01019*10^-3, -7.2128*10^-4, -1.49621*10^-3, -6.73578*10^-4, -7.84899*10^-2, -8.29356*10^-2, -6.4767*10^-2, -7.72965*10^-2, -4.00928*10^-2, -9.77876*10^-2, -5.31961*10^-2, -8.81751*10^-3, -4.26613*10^-2, -4.13938*10^-2, -8.01361*10^-2, -9.29206*10^-4, 5.68951*10^-2, 1.0567*10^-2, 1.42102*10^-2, 2.54229*10^-2, 2.36018*10^-2, 3.30715*10^-2, 2.46582*10^-2, 1.28671*10^-2, 2.3498*10^-2, 3.02699*10^-2, 2.32959*10^-2, 1.86217*10^-2, 2.90731*10^-2, 3.33365*10^-2, 1.7693*10^-2, 1.6965*10^-2, 2.27996*10^-2, 1.60724*10^-2, 1.75694*10^-2, 1.73035*10^-2, 1.98069*10^-2, 1.70273*10^-2, 1.22635*10^-2, 1.16857*10^-2, 1.21522*10^-2, 1.66992*10^-2, 1.88991*10^-2, 1.43637*10^-2, 7.90244*10^-3, 4.68815*10^-3, 5.80003*10^-3, 7.40671*10^-3, 1.09805*10^-2, 1.10121*10^-2, 5.75489*10^-3, 5.13578*10^-3, 3.89261*10^-3, 2.04509*10^-3, 2.32849*10^-3, 3.037*10^-3, 2.27327*10^-3, 3.77902*10^-4, 1.28867*10^-3, 1.64631*10^-3, 5.42053*10^-4, 3.90025*10^-3, 4.45499*10^-3, 1.55717*10^-4, -1.88932*10^-3, -5.97807*10^-4, -9.84567*10^-4, -1.1553*10^-3, 1.7905*10^-3, 6.59942*10^-4, -2.56507*10^-3, -2.47991*10^-3, -1.74382*10^-3, -1.1313*10^-4, 1.16433*10^-3, -6.15973*10^-4, -2.12734*10^-3, -1.44013*10^-3, -7.52906*10^-4, -1.67116*10^-3, -1.61012*10^-3, 2.19727*10^-4, 1.54297*10^-4, -1.30908*10^-3, -1.27163*10^-3, -1.7169*10^-3, -2.05962*10^-3, -1.39564*10^-3, -6.9698*10^-4, -6.5036*10^-4, -7.37778*10^-4, -7.7856*10^-4, -9.6599*10^-4, -1.05724*10^-3, -6.49337*10^-4, -4.21802*10^-4, -4.06934*10^-4, -4.15784*10^-4, -2.38018*10^-5, -1.54768*10^-4, 9.12388*10^-6, 2.39084*10^-4, 2.2708*10^-4, 2.51322*10^-4, 3.68308*10^-4, 3.06277*10^-4, 1.52618*10^-5, 2.67516*10^-5, 1.18887*10^-4, 1.58936*10^-4, 1.65502*10^-4, 3.39827*10^-5, -2.50192*10^-6, 3.71676*10^-5, 7.19018*10^-5, 4.14705*10^-5, 8.50585*10^-6, 3.69732*10^-6, 1.48337*10^-6, 0));
h(2,1) = fi.fir((-1.04262*10^-5, -3.758*10^-5, -5.11234*10^-6, -2.70496*10^-4, 1.47661*10^-4, 2.31146*10^-4, -2.49192*10^-4, -1.0622*10^-3, 7.69566*10^-4, 7.08007*10^-5, -9.5017*10^-4, -2.12469*10^-4, -5.64598*10^-3, -9.76993*10^-4, -1.84861*10^-3, -1.11431*10^-2, -1.41169*10^-2, 2.58155*10^-2, -2.49322*10^-3, -4.33556*10^-2, 1.20598*10^-3, 2.2299*10^-2, 9.2729*10^-3, 2.78365*10^-3, 4.38648*10^-3, -8.63905*10^-3, 5.37327*10^-4, -1.96867*10^-2, 9.235*10^-3, 3.3864*10^-2, -4.93341*10^-3, -1.43689*10^-2, -8.98901*10^-3, 4.03937*10^-3, -1.33631*10^-3, 5.4466*10^-3, 8.84039*10^-3, -7.86783*10^-3, -1.14674*10^-2, -3.8962*10^-3, 1.08066*10^-3, 8.17955*10^-3, 6.69066*10^-3, 3.30976*10^-4, -2.63441*10^-3, -1.2261*10^-3, 1.84975*10^-4, 3.0812*10^-3, 7.96032*10^-3, 7.56406*10^-3, 4.15929*10^-3, -7.85113*10^-4, -2.29878*10^-4, 3.2282*10^-3, 4.25301*10^-3, 2.27417*10^-3, -7.83797*10^-4, -2.20639*10^-3, -1.52893*10^-3, -1.22218*10^-3, -6.80485*10^-4, 7.66541*10^-6, 2.1519*10^-3, 2.35812*10^-3, -1.34083*10^-3, -2.59829*10^-3, -1.64578*10^-3, -2.75033*10^-3, -3.16542*10^-3, -2.38017*10^-3, -1.82603*10^-3, -1.96376*10^-3, -3.06353*10^-3, -1.37004*10^-3, 1.02092*10^-3, 1.74807*10^-3, 1.39904*10^-4, -1.09607*10^-3, 8.27394*10^-4, 1.45085*10^-3, 9.06103*10^-4, 3.86788*10^-4, -2.74177*10^-5, 1.18894*10^-3, -2.16738*10^-4, -4.39841*10^-4, 2.51957*10^-3, 2.97761*10^-3, 1.73031*10^-3, 1.32805*10^-3, 2.0406*10^-3, 8.76507*10^-4, -1.13467*10^-3, -1.02503*10^-3, -3.84737*10^-4, -4.65506*10^-4, -1.52734*10^-3, -1.28149*10^-3, -4.03028*10^-4, -1.03053*10^-3, -1.20272*10^-3, -1.3616*10^-3, -1.67489*10^-3, -1.86384*10^-3, -1.36555*10^-3, -8.28266*10^-4, -1.10553*10^-3, -9.79588*10^-4, -8.55899*10^-4, -9.47718*10^-4, -7.25086*10^-4, -6.65779*10^-4, -4.86784*10^-4, -2.63489*10^-4, 1.91026*10^-5, 5.59009*10^-5, -3.48346*10^-5, -5.18512*10^-5, -7.89041*10^-7, 9.57012*10^-5, 1.22408*10^-4, 9.32295*10^-5, 3.4954*10^-5, 1.98734*10^-5, 1.89778*10^-5, 1.0045*10^-5, 1.8649*10^-6, 0));
h(3,1) = fi.fir((1.50022*10^-5, 2.32588*10^-5, 1.07706*10^-4, -6.42903*10^-5, 5.58749*10^-4, -1.97024*10^-4, 5.69647*10^-4, -5.05773*10^-4, 2.86004*10^-4, 1.27547*10^-4, 6.54334*10^-4, -2.16524*10^-4, -3.73067*10^-3, 3.3821*10^-3, -5.80219*10^-4, 1.31959*10^-2, -7.36802*10^-3, 1.5611*10^-2, 2.92041*10^-2, -4.39889*10^-3, -1.47934*10^-3, -2.15706*10^-2, 2.1176*10^-2, 1.30594*10^-2, -5.75248*10^-2, -6.0285*10^-3, 5.37481*10^-2, -1.44425*10^-3, -3.91217*10^-2, -9.24877*10^-3, 2.43674*10^-2, 1.15422*10^-2, -2.86455*10^-2, -1.31834*10^-2, 1.25606*10^-2, -4.59738*10^-3, -7.3186*10^-3, -1.5759*10^-3, 1.27378*10^-3, 8.42323*10^-3, -4.34699*10^-3, -1.06382*10^-2, 2.22904*10^-3, 1.10775*10^-2, 2.87069*10^-3, -1.39329*10^-3, 6.15266*10^-3, 1.19972*10^-3, -4.37394*10^-3, 2.01686*10^-3, 4.86999*10^-3, 2.07781*10^-3, 1.78551*10^-4, 1.19525*10^-3, 3.85171*10^-5, 2.21504*10^-3, 3.54482*10^-3, 1.11368*10^-3, 4.08736*10^-4, 7.01284*10^-4, -1.6638*10^-3, -3.83124*10^-3, 1.02589*10^-3, 3.90744*10^-3, 1.21048*10^-3, -4.4511*10^-4, -5.0954*10^-4, -1.10707*10^-3, -2.33558*10^-3, -2.93582*10^-3, -1.81733*10^-3, -1.37873*10^-3, -1.03864*10^-3, -5.9075*10^-4, -1.90491*10^-3, -2.29879*10^-3, -1.00318*10^-3, -1.29805*10^-3, -1.24602*10^-3, -1.10995*10^-3, -1.13996*10^-3, -2.86675*10^-3, -2.73074*10^-3, -1.6274*10^-4, 1.09229*10^-3, 1.50447*10^-3, 2.32615*10^-3, 4.06262*10^-3, 1.98173*10^-3, -1.70804*10^-3, -1.377*10^-3, 1.67907*10^-3, 6.59975*10^-4, -2.28615*10^-3, -1.45302*10^-3, 2.75175*10^-3, 3.73392*10^-3, -4.09495*10^-4, -2.77688*10^-3, -1.30731*10^-3, -5.98906*10^-4, -7.39556*10^-4, -9.1664*10^-4, -6.40613*10^-4, -2.31076*10^-4, -8.29505*10^-4, -8.1294*10^-4, -6.43591*10^-4, -8.06327*10^-4, -7.023*10^-4, -5.28145*10^-4, 1.15798*10^-4, 5.66913*10^-5, -2.80439*10^-4, -2.93776*10^-4, -7.43292*10^-5, 1.16979*10^-4, 3.24905*10^-5, 4.2207*10^-5, 9.86781*10^-5, 1.19185*10^-4, 5.53096*10^-5, 5.56606*10^-6, 8.76003*10^-6, 5.14829*10^-6, 3.31876*10^-6, 1.41881*10^-6, 0));
h(4,1) = fi.fir((-1.28837*10^-5, -2.2571*10^-6, -2.04336*10^-4, 2.89394*10^-4, -4.36107*10^-4, 6.24781*10^-4, -1.14682*10^-3, 1.49292*10^-3, -3.32498*10^-4, -6.40174*10^-5, -6.58512*10^-4, 1.08131*10^-3, 6.14859*10^-3, -5.05303*10^-3, 1.07937*10^-3, -2.58357*10^-2, 1.25871*10^-2, -1.94256*10^-2, -4.44767*10^-2, 1.82515*10^-2, 9.20931*10^-3, 3.15938*10^-2, -6.57556*10^-3, 4.78233*10^-3, 4.80442*10^-2, 3.87811*10^-3, -1.73968*10^-2, -6.6563*10^-3, 9.46403*10^-3, 2.72256*10^-2, 8.70882*10^-4, -2.68658*10^-2, -2.20283*10^-3, 1.70789*10^-2, 5.82195*10^-3, -8.75734*10^-3, -8.55455*10^-3, -7.84948*10^-4, -2.16257*10^-3, -1.07364*10^-2, -6.62343*10^-3, -1.64357*10^-3, 6.85873*10^-3, 3.47187*10^-3, -4.75943*10^-3, -7.34871*10^-3, -4.17985*10^-3, 9.96385*10^-4, 1.68163*10^-3, -4.09446*10^-3, -4.8163*10^-3, 1.88691*10^-3, -4.69171*10^-4, 1.07755*10^-3, 2.62109*10^-3, 2.26215*10^-3, 2.44952*10^-3, -1.30377*10^-3, -3.75098*10^-3, -4.28571*10^-3, -5.1085*10^-4, 2.00028*10^-3, -1.22741*10^-3, 4.00218*10^-4, 9.80719*10^-4, -1.75864*10^-4, 1.75755*10^-4, 9.29631*10^-4, -1.62845*10^-4, 2.34556*10^-4, 3.21454*10^-3, 1.71149*10^-3, -2.60035*10^-4, -1.96968*10^-4, 3.34401*10^-4, -7.62874*10^-4, -9.81886*10^-4, 4.16359*10^-4, -4.26477*10^-4, 1.09789*10^-3, 1.54485*10^-3, 7.30135*10^-4, 1.21663*10^-3, -3.94495*10^-4, 1.2959*10^-4, 1.03707*10^-4, -9.91956*10^-4, -3.0826*10^-4, -8.45419*10^-4, 4.44119*10^-5, 1.00478*10^-3, 1.18167*10^-3, 6.50443*10^-4, -1.2369*10^-3, -1.24727*10^-3, -1.81872*10^-4, 3.26622*10^-4, 4.47982*10^-4, 5.50446*10^-4, -5.50101*10^-5, 1.1103*10^-4, 1.36011*10^-4, -1.81368*10^-4, 2.28636*10^-4, 2.99965*10^-5, -3.51923*10^-4, -3.3669*10^-4, -6.18528*10^-5, 1.54268*10^-4, 4.63668*10^-5, -7.42483*10^-5, -4.85157*10^-5, -8.10968*10^-5, -4.24054*10^-5, -3.68663*10^-5, -5.55517*10^-5, -8.65485*10^-5, -2.59414*10^-5, 2.23151*10^-5, -3.59181*10^-5, -6.33178*10^-5, -4.06072*10^-5, 8.17412*10^-6, 6.14464*10^-6, -3.26217*10^-6, -3.52551*10^-6, -4.87449*10^-7, 0));
h(5,1) = fi.fir((-1.24137*10^-5, -3.47005*10^-5, -2.05885*10^-4, 1.48373*10^-4, -6.74882*10^-4, -7.85914*10^-4, -5.57107*10^-4, 8.44402*10^-4, -1.92172*10^-3, -4.63656*10^-4, 4.82542*10^-4, -3.39503*10^-4, 1.11489*10^-2, 1.39284*10^-3, -3.28332*10^-3, 1.5908*10^-2, 1.68941*10^-2, -3.51254*10^-2, -8.21635*10^-4, 3.68006*10^-2, -7.9993*10^-3, -2.63323*10^-2, -1.61706*10^-2, 2.06245*10^-3, 3.41205*10^-3, 2.43489*10^-3, -2.87375*10^-3, 1.57848*10^-2, -1.0152*10^-3, -1.10397*10^-2, -8.01492*10^-3, -2.2649*10^-3, 1.35094*10^-2, -7.53143*10^-3, -4.96896*10^-3, 5.08388*10^-3, -2.06598*10^-3, -2.20457*10^-4, -3.20157*10^-4, -3.80796*10^-3, -2.63921*10^-3, -2.41141*10^-3, -3.07881*10^-3, 1.14676*10^-3, 7.22064*10^-3, -1.18978*10^-3, -2.66146*10^-3, 1.48231*10^-4, 5.31922*10^-4, -1.93302*10^-3, -1.77042*10^-3, 1.86255*10^-3, 1.40911*10^-3, 1.55444*10^-3, -1.58308*10^-3, -1.56606*10^-3, 3.45985*10^-3, 3.40823*10^-3, 1.78537*10^-3, 5.75071*10^-4, 1.3802*10^-3, 1.32278*10^-3, -1.15249*10^-3, 5.03369*10^-4, 3.3735*10^-4, -5.63033*10^-5, 1.06162*10^-3, -5.44179*10^-4, 7.3547*10^-5, 3.65462*10^-3, 2.67881*10^-3, 6.37521*10^-4, 7.69439*10^-4, -3.47477*10^-4, -1.91797*10^-3, -1.7979*10^-3, 7.51019*10^-5, -1.76065*10^-5, -1.39395*10^-3, 2.275*10^-4, 9.19819*10^-4, 2.07868*10^-3, 2.80241*10^-3, -5.83562*10^-4, -2.58332*10^-3, -2.39031*10^-3, -3.1734*10^-3, -2.73144*10^-3, -1.31188*10^-3, -5.83876*10^-4, -9.65501*10^-4, -7.85101*10^-4, 2.76682*10^-4, -6.82499*10^-4, -1.49796*10^-3, -3.28942*10^-3, -3.08618*10^-3, -1.06711*10^-3, -1.19415*10^-3, -1.22034*10^-3, -6.1493*10^-4, -5.42423*10^-4, -5.71456*10^-4, -1.21467*10^-3, -9.64846*10^-4, -7.1455*10^-4, -9.23679*10^-4, -2.72771*10^-4, -3.95822*10^-4, -3.19031*10^-4, 4.16914*10^-5, -2.42675*10^-4, -2.58434*10^-5, -3.62927*10^-5, -6.50093*10^-5, -7.65374*10^-5, -1.5924*10^-4, 4.49009*10^-5, 1.26739*10^-5, -2.91374*10^-5, 1.32206*10^-5, 7.22764*10^-6, 2.05057*10^-5, 3.47604*10^-8, -1.32724*10^-5, -5.71049*10^-6, 7.21156*10^-7, 0));
h(6,1) = fi.fir((-4.94134*10^-6, -2.03832*10^-5, 1.5575*10^-4, -5.70227*10^-5, -2.26502*10^-4, -1.75224*10^-4, 2.01359*10^-4, 2.31249*10^-4, -6.155*10^-5, -2.72913*10^-4, 3.58363*10^-4, -2.11776*10^-3, -4.22768*10^-2, -4.44816*10^-2, -1.93023*10^-2, -2.74978*10^-2, 5.26948*10^-3, -1.55901*10^-2, -1.26207*10^-2, 4.52021*10^-2, 3.7277*10^-3, 6.97526*10^-3, 3.4926*10^-2, 3.20497*10^-4, 2.01536*10^-2, 4.16384*10^-2, 9.92074*10^-3, 1.52545*10^-2, 1.63858*10^-2, 9.39652*10^-3, 1.39764*10^-2, -6.03544*10^-4, 2.95888*10^-3, 1.07584*10^-2, 4.11948*10^-3, -4.57394*10^-3, -5.18584*10^-5, 8.67053*10^-3, -8.19709*10^-4, -2.71496*10^-3, 1.57178*10^-3, -6.04226*10^-3, -7.573*10^-3, -4.97027*10^-3, -7.72571*10^-3, -5.40122*10^-3, -6.65008*10^-4, -5.13181*10^-3, -8.61829*10^-3, -6.1875*10^-3, -5.86852*10^-3, -6.90397*10^-3, -1.97319*10^-3, -1.10637*10^-3, -4.40538*10^-3, -5.0915*10^-3, -4.60066*10^-3, -3.75105*10^-3, -2.02713*10^-3, 6.34135*10^-4, 1.52519*10^-3, 2.16723*10^-4, -1.90415*10^-3, -6.41773*10^-4, 2.93369*10^-3, 3.06934*10^-3, 1.61143*10^-3, 1.11467*10^-5, -2.91699*10^-3, -1.18198*10^-3, 1.59566*10^-3, 8.02869*10^-5, -1.45224*10^-4, -6.72323*10^-4, -3.35524*10^-3, -1.299*10^-3, 3.48142*10^-4, -3.64334*10^-4, -1.40716*10^-3, -1.33269*10^-3, 9.54181*10^-4, 9.4944*10^-5, -4.90638*10^-4, 7.64064*10^-4, 5.15169*10^-4, 7.1971*10^-5, -8.4653*10^-4, -1.24543*10^-3, -3.70598*10^-4, -3.16498*10^-4, 1.01923*10^-3, 4.93628*10^-4, -1.99826*10^-4, 6.54404*10^-4, 1.59738*10^-4, -1.38876*10^-4, -9.65849*10^-4, -1.78013*10^-4, 1.5065*10^-3, 1.03462*10^-3, 1.02185*10^-4, 1.1025*10^-6, 4.21365*10^-5, -7.97753*10^-5, -3.24792*10^-5, 4.138*10^-4, 6.18073*10^-4, 5.01459*10^-4, 1.29941*10^-4, 1.6541*10^-4, 2.58758*10^-4, 2.1505*10^-5, -1.01844*10^-4, -1.3697*10^-4, -1.05237*10^-4, -5.84711*10^-5, -3.22237*10^-5, -1.69802*10^-5, -1.41509*10^-5, -3.28963*10^-6, -6.86851*10^-5, -5.10851*10^-5, -1.1654*10^-5, -8.49295*10^-6, -7.91252*10^-6, -5.39788*10^-6, 6.59979*10^-8, 0));
h(7,1) = fi.fir((5.35095*10^-6, 2.00819*10^-5, 5.19844*10^-6, -7.49829*10^-5, 1.29621*10^-4, -1.15039*10^-4, -6.50134*10^-5, 3.0013*10^-4, 2.5865*10^-4, -6.40087*10^-4, 5.0859*10^-4, 3.59551*10^-4, -3.63038*10^-4, -1.45427*10^-3, 4.7379*10^-4, 2.51299*10^-4, -3.96484*10^-3, 2.63627*10^-4, -8.43745*10^-3, 1.06017*10^-2, 1.69305*10^-2, -1.39511*10^-2, -1.44406*10^-2, 2.84124*10^-2, -9.65604*10^-3, -2.92933*10^-2, 3.6199*10^-2, -7.86339*10^-3, -9.22201*10^-3, 6.88345*10^-3, -1.165*10^-2, -6.39689*10^-3, 1.92933*10^-2, 1.91555*10^-2, -2.706*10^-2, 9.63596*10^-3, 1.77702*10^-2, -1.58301*10^-2, 1.1423*10^-3, 9.42445*10^-3, -1.5727*10^-3, -6.58114*10^-3, -3.85272*10^-4, -3.49277*10^-3, -4.28385*10^-3, 6.45499*10^-3, -2.64027*10^-3, -5.6145*10^-3, -2.88651*10^-3, -3.92757*10^-3, -5.57668*10^-3, -8.64361*10^-4, 5.74359*10^-3, -1.64622*10^-3, -1.13243*10^-3, -2.56907*10^-5, 7.75016*10^-4, 4.28737*10^-4, -8.0034*10^-4, 3.94994*10^-3, 2.92619*10^-3, 4.54632*10^-4, 1.29704*10^-3, 1.50553*10^-3, 2.81043*10^-3, 8.97913*10^-4, -5.88187*10^-4, 7.43556*10^-4, 2.4844*10^-3, 1.3638*10^-3, -1.86575*10^-3, -2.4288*10^-4, 2.03837*10^-3, 1.71093*10^-3, -2.18125*10^-3, -2.84821*10^-3, 1.03257*10^-4, -1.72719*10^-4, -5.61862*10^-4, -1.77178*10^-3, -2.57691*10^-3, -1.07323*10^-3, -3.158*10^-4, 5.08309*10^-4, -3.59207*10^-4, -1.61329*10^-3, -9.08412*10^-4, -1.17327*10^-3, -2.0847*10^-4, 5.59696*10^-4, -1.71772*10^-4, 1.92954*10^-4, 1.25953*10^-3, 1.1231*10^-3, -2.0233*10^-4, -1.22724*10^-3, -1.68486*10^-4, 1.22649*10^-3, 9.2775*10^-4, 9.54727*10^-4, 1.00476*10^-3, 1.19575*10^-3, 6.38058*10^-4, -1.98384*10^-4, 3.62151*10^-4, 5.23747*10^-4, 2.33961*10^-4, -1.93746*10^-4, 1.0191*10^-5, 3.40968*10^-4, 9.64443*10^-5, -3.49096*10^-4, -2.5527*10^-4, -8.33186*10^-5, -1.33871*10^-5, -2.28995*10^-5, -9.74875*10^-5, -1.36371*10^-4, -1.6574*10^-4, -1.1763*10^-4, -5.28142*10^-5, -1.94034*10^-6, -4.96364*10^-6, -1.68386*10^-5, -7.7027*10^-6, 3.30668*10^-6, 1.57539*10^-7, 0));
h(8,1) = fi.fir((-1.32874*10^-5, -6.44951*10^-5, 3.14378*10^-4, -4.0926*10^-4, -1.25892*10^-4, -6.34386*10^-4, 4.74467*10^-4, 1.04719*10^-3, -1.10016*10^-4, -9.76536*10^-4, -9.4869*10^-5, -1.38136*10^-3, -7.44374*10^-2, -7.68453*10^-2, -4.83192*10^-2, -2.87878*10^-2, 1.08471*10^-2, -4.59645*10^-2, -1.53902*10^-2, 5.40471*10^-2, 4.90934*10^-2, 4.67726*10^-4, -9.30466*10^-4, 7.54126*10^-2, 6.34564*10^-2, 2.87948*10^-2, 4.21412*10^-2, 2.46212*10^-2, 5.61861*10^-3, 3.29321*10^-2, 4.143*10^-2, 9.4423*10^-3, -9.53651*10^-3, 7.1496*10^-3, 4.36247*10^-3, -6.09081*10^-3, 1.4331*10^-3, -4.89087*10^-3, -9.05307*10^-3, -2.63838*10^-3, -8.08286*10^-3, -2.24651*10^-2, -1.05223*10^-2, -2.14593*10^-3, -1.4119*10^-2, -1.30982*10^-2, -6.31691*10^-3, -9.37013*10^-3, -1.03953*10^-2, -3.33511*10^-3, -2.92244*10^-3, -9.20974*10^-3, -4.32975*10^-3, -2.65571*10^-3, -6.26758*10^-3, -4.59766*10^-3, -2.35631*10^-3, -3.48053*10^-3, -4.89879*10^-3, -1.65106*10^-3, -4.49678*10^-4, -1.67732*10^-3, -3.27984*10^-3, -2.45323*10^-3, -9.06947*10^-4, 2.22449*10^-3, 6.56153*10^-3, 6.37634*10^-3, 3.79148*10^-3, 4.72803*10^-3, 4.46647*10^-3, 2.50567*10^-3, 1.30425*10^-3, -2.74135*10^-4, -9.08465*10^-4, -7.12925*10^-4, 1.05*10^-3, 1.86927*10^-3, -2.08903*10^-4, 1.29173*10^-4, 6.41628*10^-4, -3.80057*10^-4, -1.12458*10^-3, -2.37411*10^-3, -1.52554*10^-3, -9.76026*10^-4, -3.10688*10^-4, 9.91772*10^-5, -1.84137*10^-3, -3.16413*10^-3, -1.87875*10^-3, 2.75005*10^-4, -8.87071*10^-4, -2.89758*10^-3, -1.33293*10^-3, 2.02051*10^-3, 2.2768*10^-3, -2.86928*10^-4, -1.55106*10^-3, -1.00915*10^-3, -1.52135*10^-4, 3.3373*10^-5, -2.3814*10^-4, 1.25112*10^-5, 1.09994*10^-4, -4.83405*10^-4, -7.05638*10^-4, -1.58107*10^-4, -9.45697*10^-5, -1.01428*10^-4, -5.72348*10^-5, -3.46081*10^-5, -1.18083*10^-4, -1.95522*10^-4, -2.27988*10^-4, -1.80181*10^-4, -1.06835*10^-4, -4.27783*10^-5, -6.29344*10^-5, -4.93226*10^-5, 2.95878*10^-5, 5.78253*10^-6, -6.19357*10^-7, 1.08966*10^-5, 1.07578*10^-6, -9.86646*10^-7, 1.03369*10^-6, 0));
h(9,1) = fi.fir((1.89155*10^-5, 2.95993*10^-5, -3.15406*10^-4, 7.65605*10^-5, 6.27826*10^-5, 5.32984*10^-4, -9.56498*10^-4, -9.20231*10^-4, 2.08207*10^-5, 1.26033*10^-3, -5.44776*10^-4, 5.12142*10^-3, 6.08886*10^-2, 6.03767*10^-2, 2.75179*10^-2, -2.7306*10^-2, -5.55369*10^-2, -1.95357*10^-3, -2.2666*10^-2, -6.61857*10^-2, -6.39153*10^-2, -6.85298*10^-3, 9.12445*10^-3, -2.57435*10^-2, -2.79132*10^-2, 7.34391*10^-3, 2.42892*10^-2, 1.34953*10^-2, 2.09338*10^-2, 2.37538*10^-2, 2.86742*10^-3, -1.72568*10^-3, 2.57452*10^-2, 2.77789*10^-2, 1.97598*10^-2, 6.38856*10^-3, 3.11321*10^-3, 1.34784*10^-2, 1.89657*10^-2, 2.89754*10^-3, -7.89563*10^-3, 2.89646*10^-3, -3.62881*10^-3, -1.62506*10^-2, -9.76483*10^-3, -4.98942*10^-3, -3.17079*10^-3, -4.25409*10^-3, -8.17591*10^-3, -4.43077*10^-3, -4.5752*10^-3, -6.63702*10^-3, -4.71875*10^-3, 7.84338*10^-4, 1.99607*10^-3, 5.14009*10^-4, -2.8681*10^-3, -3.58773*10^-3, 1.93199*10^-3, 2.63347*10^-3, -2.04118*10^-3, -2.91838*10^-3, -3.9613*10^-4, 1.2512*10^-3, 1.0393*10^-3, -1.89639*10^-4, -8.28256*10^-4, 8.31506*10^-4, 1.59933*10^-3, 1.19016*10^-3, 1.65305*10^-3, 2.22115*10^-3, 1.54955*10^-3, -1.21165*10^-4, -6.7648*10^-4, -1.43391*10^-3, -2.69454*10^-3, -2.6293*10^-3, -2.55959*10^-4, 8.54822*10^-4, 1.2425*10^-3, 2.70886*10^-3, 2.73936*10^-3, -2.15316*10^-5, 7.82466*10^-5, 8.16548*10^-4, -6.64108*10^-4, -9.37912*10^-4, -7.63589*10^-4, -7.52537*10^-4, 2.7312*10^-4, 2.83557*10^-3, 1.2796*10^-3, -2.09591*10^-3, -1.74195*10^-3, -6.81458*10^-4, -7.55823*10^-4, -1.04411*10^-3, -3.70958*10^-4, -7.35482*10^-5, -8.31871*10^-5, 2.83063*10^-4, 3.42585*10^-6, 3.99315*10^-4, 4.68411*10^-4, -4.05334*10^-4, -9.18478*10^-5, 3.19806*10^-4, 3.63852*10^-6, -1.56105*10^-4, 3.77477*10^-4, 6.44241*10^-4, 2.40259*10^-4, 5.68899*10^-5, 1.95567*10^-4, 2.3654*10^-4, 5.73293*10^-5, -4.46169*10^-5, 3.27635*10^-5, 8.1741*10^-6, -7.06224*10^-5, -6.81354*10^-5, -1.28596*10^-5, 9.30078*10^-6, -2.34088*10^-6, -3.51464*10^-6, -9.12964*10^-7, 0));
h(10,1) = fi.fir((-6.90525*10^-6, 1.26895*10^-5, -5.07632*10^-5, -4.25921*10^-6, -3.06084*10^-4, 4.47309*10^-4, -3.00497*10^-4, -4.6817*10^-5, -3.16584*10^-4, 9.80811*10^-4, -8.46133*10^-4, 1.18111*10^-4, 1.25948*10^-4, 2.18183*10^-3, 1.23416*10^-3, -2.23481*10^-3, 3.35082*10^-3, 2.03881*10^-3, 1.09137*10^-2, -2.20259*10^-2, -1.52245*10^-2, 1.7673*10^-2, 5.61989*10^-3, -6.93778*10^-3, 1.84808*10^-2, 2.02873*10^-3, -2.89144*10^-2, 1.34849*10^-2, -4.98675*10^-3, -8.08788*10^-4, 6.34478*10^-3, -5.37065*10^-3, 1.59773*10^-3, -1.19074*10^-2, 1.07473*10^-2, 8.68801*10^-3, -3.46914*10^-3, 6.51347*10^-3, -4.53393*10^-3, -2.97135*10^-3, 4.54128*10^-3, 5.84137*10^-3, -8.06327*10^-3, -3.951*10^-3, 4.98626*10^-3, -5.49752*10^-3, -3.58275*10^-3, -1.26195*10^-3, 4.02261*10^-3, 3.13502*10^-3, 3.09385*10^-3, 2.60939*10^-3, -3.81199*10^-3, 1.51906*10^-4, 1.56251*10^-3, -3.34453*10^-3, -4.42281*10^-3, -2.53939*10^-3, 9.56534*10^-5, 1.01213*10^-3, 2.70927*10^-3, 2.06534*10^-3, 6.16297*10^-4, -6.01002*10^-5, -1.19671*10^-3, -2.03118*10^-3, -1.08711*10^-3, 1.66844*10^-4, -1.25626*10^-3, 3.3741*10^-4, 4.30616*10^-4, -2.24925*10^-4, -2.74129*10^-5, -1.36514*10^-3, -7.57852*10^-5, -1.05727*10^-3, -7.65697*10^-4, 2.26067*10^-4, -8.45473*10^-4, 6.30502*10^-4, -1.94535*10^-5, 2.29648*10^-3, 3.34238*10^-3, 2.9935*10^-4, -1.38639*10^-3, -1.57817*10^-3, -1.97515*10^-4, 7.65762*10^-5, 1.22317*10^-3, 1.36599*10^-3, 4.53566*10^-4, 4.79237*10^-4, 4.35133*10^-4, 1.47025*10^-3, 1.32148*10^-3, -5.42254*10^-4, -1.71888*10^-3, -7.11998*10^-4, 7.2084*10^-4, 2.83247*10^-4, 4.17124*10^-4, 1.35894*10^-4, 2.56366*10^-5, 3.17986*10^-4, -1.74273*10^-4, -4.09525*10^-4, -3.57221*10^-4, 1.3044*10^-4, 2.16033*10^-4, -1.74119*10^-4, -9.33864*10^-5, -6.39853*10^-5, 2.48682*10^-7, 1.336*10^-4, 6.72119*10^-5, -5.60343*10^-5, -1.84328*10^-4, -5.21864*10^-5, 1.34827*10^-5, -3.15558*10^-5, -5.19876*10^-5, -1.81582*10^-5, -8.97496*10^-6, -8.25901*10^-6, 2.4814*10^-6, -3.23644*10^-6, -6.2718*10^-7, 0));
h(11,1) = fi.fir((1.31127*10^-5, -7.38879*10^-6, -1.51989*10^-4, -9.11027*10^-7, 1.939*10^-4, -1.71535*10^-4, -3.22858*10^-4, -2.43654*10^-4, -7.13603*10^-4, 1.11514*10^-3, -6.76222*10^-4, 5.17239*10^-3, 4.60809*10^-2, 4.83216*10^-2, 2.76563*10^-3, -9.17066*10^-4, -3.72107*10^-2, -2.72916*10^-2, -8.20955*10^-4, -6.29913*10^-2, -3.16397*10^-2, -8.77745*10^-3, -2.40856*10^-2, 1.44447*10^-2, 9.33732*10^-4, 5.63275*10^-3, 1.06274*10^-2, -1.33066*10^-2, 3.86248*10^-2, 3.09151*10^-2, -1.0519*10^-2, 3.94804*10^-3, 6.26552*10^-3, 7.84534*10^-3, 1.42782*10^-2, 1.04436*10^-2, 5.34952*10^-3, 9.61553*10^-3, 3.047*10^-3, -2.08251*10^-3, -3.13446*10^-3, 2.02925*10^-3, 4.09361*10^-3, -8.99273*10^-3, -9.42078*10^-3, -2.95204*10^-3, -5.66593*10^-3, -2.00101*10^-3, 6.04909*10^-4, -2.58112*10^-3, -7.69069*10^-3, -8.8627*10^-3, -2.71579*10^-3, -1.69048*10^-3, 1.27175*10^-3, 2.10741*10^-3, -1.56026*10^-3, -2.06903*10^-3, 3.39129*10^-4, -1.18608*10^-3, -1.44718*10^-3, 5.25487*10^-4, -7.11836*10^-5, -9.09094*10^-5, 1.00984*10^-3, 1.69188*10^-3, 1.24293*10^-3, 1.95065*10^-3, 1.83846*10^-3, -1.20529*10^-3, -1.79294*10^-4, 1.8129*10^-3, 1.6884*10^-3, 1.29178*10^-3, 1.39515*10^-3, 1.86454*10^-3, 5.84763*10^-4, -4.84253*10^-4, -8.55611*10^-4, -1.05795*10^-5, 9.96855*10^-4, 3.25346*10^-4, -6.64306*10^-4, -1.05405*10^-3, -4.536*10^-4, 1.4791*10^-4, 5.086*10^-4, 2.10854*10^-3, 1.27291*10^-3, -6.48676*10^-4, -1.05839*10^-3, -1.69906*10^-3, -7.04934*10^-4, -7.45014*10^-5, -5.81171*10^-4, -5.98512*10^-4, -8.77149*10^-4, -6.51168*10^-4, 1.60366*10^-4, 3.21589*10^-4, -1.30289*10^-4, -7.37136*10^-4, -2.81437*10^-4, 6.96143*10^-5, -2.91548*10^-4, 4.27083*10^-5, 3.01242*10^-4, 8.81382*10^-5, 2.94159*10^-4, 3.12487*10^-4, 4.50719*10^-5, 8.06952*10^-5, 2.48997*10^-4, 2.96876*10^-4, 3.83697*10^-5, 2.30441*10^-5, 4.60206*10^-5, 7.06061*10^-5, 8.15635*10^-5, -1.90061*10^-5, -4.67294*10^-5, -2.15894*10^-5, -2.22245*10^-6, -2.14215*10^-5, -1.5791*10^-5, -5.21215*10^-6, -7.49018*10^-7, 0));
h(12,1) = fi.fir((3.27738*10^-6, -1.98933*10^-5, -2.24377*10^-4, 2.36034*10^-4, 2.31547*10^-4, -5.44781*10^-4, -4.39775*10^-4, 7.9964*10^-4, -5.44421*10^-4, -3.37965*10^-5, 2.37477*10^-4, -2.99193*10^-5, 1.06573*10^-2, 3.5753*10^-3, -1.67824*10^-2, 5.96581*10^-3, 2.30173*10^-2, -3.42189*10^-3, -2.06794*10^-2, -1.60074*10^-2, -1.01068*10^-2, -1.35014*10^-2, 4.19631*10^-2, 1.80855*10^-2, -3.55257*10^-2, -2.71591*10^-3, -2.44034*10^-3, 1.2678*10^-2, 1.4909*10^-2, 7.08753*10^-3, -4.76206*10^-3, -7.64567*10^-3, -5.58608*10^-3, -8.15685*10^-3, 1.47137*10^-2, 7.96626*10^-3, -9.86967*10^-3, -8.58863*10^-3, 3.25646*10^-3, 6.15977*10^-3, -4.3833*10^-3, -3.48297*10^-3, 3.04111*10^-3, -1.31719*10^-3, -5.34971*10^-3, -1.47622*10^-3, 5.53479*10^-3, 4.46569*10^-3, 2.13182*10^-3, -9.42707*10^-4, -3.93236*10^-3, -1.68373*10^-3, -3.28718*10^-4, -8.94931*10^-5, 1.94062*10^-3, 1.68114*10^-3, -1.41673*10^-3, -1.68419*10^-3, 3.99343*10^-4, 2.06966*10^-3, 3.69514*10^-4, 2.53042*10^-4, 9.77515*10^-4, -9.12804*10^-4, 2.74873*10^-4, 2.26848*10^-3, 2.31892*10^-3, 2.21365*10^-3, 1.92945*10^-4, 1.38286*10^-3, 2.26825*10^-3, 2.44418*10^-4, -1.87271*10^-3, -3.17289*10^-3, -1.20738*10^-3, -3.89164*10^-5, -7.16831*10^-4, 6.07349*10^-5, -3.01523*10^-5, -4.14409*10^-4, -7.53958*10^-6, -1.12029*10^-3, -1.67158*10^-3, -2.92629*10^-3, -2.39894*10^-3, -5.27782*10^-4, -4.24545*10^-4, -4.0871*10^-4, -2.2978*10^-4, -1.79398*10^-5, 2.39355*10^-4, 1.05812*10^-3, 1.0682*10^-3, -7.58498*10^-4, -1.48937*10^-3, 1.16086*10^-4, 9.87828*10^-4, 8.07473*10^-4, 1.16715*10^-3, 1.13736*10^-3, 4.94459*10^-4, 6.39692*10^-4, 5.38982*10^-4, 1.16257*10^-4, 9.32166*10^-5, 2.36701*10^-4, 4.55971*10^-4, 2.23411*10^-4, 2.12529*10^-4, 3.92538*10^-4, 2.09402*10^-4, 3.10328*10^-4, 1.32193*10^-4, -3.69908*10^-5, -2.28937*10^-5, 5.66962*10^-5, -6.23196*10^-5, -1.05953*10^-4, -1.37302*10^-5, -3.09197*10^-5, -1.28753*10^-5, 8.30434*10^-6, 2.78378*10^-6, -1.26402*10^-5, -1.02932*10^-5, -5.80166*10^-6, -7.71071*10^-7, 0));
h(13,1) = fi.fir((-3.30557*10^-6, 6.58295*10^-6, -4.13336*10^-5, 1.34953*10^-4, -2.3944*10^-4, 1.23429*10^-4, 3.54764*10^-5, 4.38524*10^-4, -4.46457*10^-4, -2.14162*10^-4, 5.94639*10^-4, 1.50709*10^-4, 1.21477*10^-3, -1.43594*10^-3, 2.24066*10^-3, -6.86843*10^-3, 6.84583*10^-4, -1.26404*10^-2, -6.24609*10^-3, 3.23072*10^-2, -9.08867*10^-3, -6.55955*10^-3, 7.42411*10^-3, -3.31393*10^-3, 2.51271*10^-2, 3.7619*10^-4, -2.98252*10^-2, -3.17145*10^-3, 4.79751*10^-3, 1.06036*10^-2, -3.05803*10^-3, -2.0928*10^-2, 1.30206*10^-3, 3.34124*10^-3, 5.98066*10^-3, -1.39712*10^-3, -1.31632*10^-3, 7.16025*10^-3, -7.59216*10^-3, -1.46599*10^-3, 9.55154*10^-3, 5.51641*10^-3, 5.55038*10^-3, 1.23226*10^-3, -4.43409*10^-3, -3.08075*10^-3, 2.40414*10^-3, 2.82354*10^-3, 4.00457*10^-3, 4.7209*10^-3, 8.29111*10^-4, -1.01166*10^-3, -2.57823*10^-3, -1.06278*10^-3, -2.22912*10^-3, -7.95623*10^-4, -7.00189*10^-4, -5.04316*10^-3, -4.18949*10^-3, -2.82809*10^-3, -3.14607*10^-3, -1.21634*10^-3, 6.43135*10^-4, 1.04922*10^-3, 1.33325*10^-4, 1.07997*10^-3, 2.31148*10^-3, 2.65451*10^-3, 1.06408*10^-3, -2.35539*10^-3, -1.14272*10^-4, 3.38497*10^-3, 3.28831*10^-3, 1.71971*10^-4, -3.2057*10^-4, 2.10505*10^-3, -2.96216*10^-4, -2.75839*10^-3, -1.1997*10^-3, 3.46228*10^-4, 1.58192*10^-3, -4.43774*10^-4, -3.29516*10^-3, -1.99081*10^-3, -6.43004*10^-4, -4.21855*10^-4, -9.60012*10^-4, 2.76212*10^-4, 5.72913*10^-4, -1.6863*10^-3, -1.26468*10^-3, -6.3397*10^-4, -3.99078*10^-5, 2.67905*10^-4, 4.92812*10^-5, 6.181*10^-4, 2.44744*10^-4, 4.59707*10^-4, 1.2123*10^-3, 5.20144*10^-4, -5.09173*10^-4, -8.19063*10^-5, 4.93395*10^-4, 2.53793*10^-4, 4.26232*10^-4, 5.82041*10^-4, 4.40844*10^-4, 5.71553*10^-4, 1.36777*10^-4, 9.34823*10^-5, 3.39887*10^-4, 2.97869*10^-4, 2.58727*10^-4, 1.03477*10^-4, 1.28055*10^-4, -1.21549*10^-5, -4.28586*10^-5, 3.3221*10^-5, 2.93676*10^-5, 5.60649*10^-5, -3.26185*10^-5, -5.6678*10^-5, -1.49079*10^-5, -4.80575*10^-6, -7.10373*10^-6, -6.55232*10^-6, -1.24034*10^-6, 0));
h(14,1) = fi.fir((3.51439*10^-7, 2.87613*10^-6, -1.45798*10^-4, 9.0752*10^-5, -6.11966*10^-4, -2.45544*10^-4, -2.21059*10^-4, 5.94499*10^-4, -1.25521*10^-3, 3.12022*10^-4, 4.25134*10^-4, -8.48038*10^-4, 1.33545*10^-2, 1.14058*10^-3, -4.88234*10^-3, 9.19814*10^-3, -6.27052*10^-3, -2.14937*10^-2, 1.23386*10^-2, 8.03106*10^-3, -1.64583*10^-2, -1.01589*10^-2, -2.09074*10^-2, 1.16758*10^-2, 2.38261*10^-2, 4.4089*10^-3, 8.66514*10^-3, -3.65339*10^-3, -3.37606*10^-3, -9.8116*10^-3, -6.91913*10^-3, 8.70097*10^-3, 1.26165*10^-2, 3.51771*10^-3, -2.47151*10^-2, -8.33375*10^-4, 1.7721*10^-2, -1.94991*10^-3, -4.53353*10^-3, 4.02003*10^-3, 6.79846*10^-4, -7.26018*10^-3, -1.77306*10^-4, -2.24289*10^-3, -3.29005*10^-3, 8.41359*10^-3, 4.59243*10^-3, -5.91923*10^-3, -1.20555*10^-3, 2.19487*10^-3, -1.14701*10^-3, 9.30791*10^-5, 2.18685*10^-3, -4.49193*10^-3, -4.73366*10^-3, 2.26702*10^-3, 4.49539*10^-3, 4.21747*10^-3, 3.96111*10^-3, 1.77683*10^-4, -3.02825*10^-3, -8.89718*10^-4, 5.64437*10^-4, -1.67615*10^-4, 6.02522*10^-4, 1.87077*10^-3, 1.2949*10^-3, -5.94883*10^-4, -1.92181*10^-3, -1.22613*10^-3, -8.5715*10^-5, 4.10859*10^-4, -1.40928*10^-4, -2.02792*10^-3, -5.53977*10^-4, 1.30066*10^-3, 5.83343*10^-4, 8.61494*10^-4, -1.19166*10^-3, -2.18237*10^-3, -1.21283*10^-3, -1.08317*10^-3, -1.9593*10^-4, -1.34809*10^-4, -6.54677*10^-4, -9.36929*10^-4, -1.48747*10^-3, -1.59498*10^-3, -1.07904*10^-3, 1.19197*10^-3, 9.83816*10^-4, -9.17038*10^-4, -2.51922*10^-4, -1.71245*10^-4, -6.6768*10^-4, -6.18854*10^-4, -3.61373*10^-4, 2.76893*10^-4, 6.54997*10^-4, 7.13557*10^-4, 7.84532*10^-4, 9.21074*10^-5, -3.20935*10^-5, 1.43232*10^-4, 6.22619*10^-4, 5.18774*10^-4, -2.74811*10^-4, -4.39844*10^-4, 2.92392*10^-4, 4.58341*10^-4, -8.30032*10^-5, -1.57369*10^-4, 1.47762*10^-4, 2.02603*10^-4, -6.66399*10^-5, -5.52051*10^-6, 4.1404*10^-5, -4.42386*10^-5, -7.86137*10^-5, -8.64243*10^-5, -8.95919*10^-6, 2.60922*10^-5, 2.14766*10^-5, -7.65888*10^-6, -9.23643*10^-6, -1.1904*10^-6, -3.57125*10^-7, 0));
h(15,1) = fi.fir((-1.88214*10^-5, 5.47506*10^-7, -3.62138*10^-4, 3.4025*10^-4, -1.5391*10^-4, 9.13577*10^-4, -1.59128*10^-3, 1.86949*10^-3, -5.7894*10^-4, -7.61445*10^-5, -9.44821*10^-4, 1.5239*10^-3, 6.93131*10^-3, -5.08856*10^-3, -1.64934*10^-3, -3.28386*10^-2, 1.56604*10^-2, -7.18646*10^-3, -3.99608*10^-2, 2.78627*10^-2, 2.10797*10^-2, 2.36595*10^-2, 2.04958*10^-2, 2.62763*10^-2, -8.38542*10^-3, -2.54705*10^-2, 1.6657*10^-2, -1.6476*10^-3, -2.9996*10^-2, -2.96593*10^-3, 2.29607*10^-2, 4.06638*10^-3, -1.99525*10^-2, -9.55486*10^-3, 2.15033*10^-3, -7.14622*10^-3, -4.87891*10^-3, -1.99292*10^-3, 1.16732*10^-4, 2.97933*10^-3, 4.9839*10^-4, -6.55393*10^-3, -1.16543*10^-3, 5.36463*10^-3, -6.3972*10^-3, -8.90121*10^-3, -5.88588*10^-4, 4.84007*10^-4, 1.36571*10^-3, 6.21762*10^-3, 6.40891*10^-3, 2.3052*10^-3, 2.52014*10^-3, 3.03026*10^-3, 1.4746*10^-3, 1.06462*10^-3, -4.70089*10^-4, -1.5733*10^-3, -8.0711*10^-4, 1.55653*10^-5, -1.06767*10^-4, 1.10327*10^-3, 3.74636*10^-3, 4.99281*10^-3, 7.22126*10^-4, -2.893*10^-3, -1.64107*10^-3, 7.19126*10^-4, -6.68844*10^-4, -2.46309*10^-3, -1.44934*10^-3, 1.74066*10^-4, 1.00658*10^-3, 5.37174*10^-5, -4.13929*10^-4, -2.79138*10^-4, -9.57403*10^-4, -1.77829*10^-3, -8.63774*10^-4, 1.77585*10^-3, 1.49904*10^-3, 1.27816*10^-4, -5.78467*10^-5, -1.13474*10^-3, -1.34423*10^-4, 3.59113*10^-4, -3.40049*10^-4, -5.12483*10^-4, -7.75252*10^-4, -1.1166*10^-3, -1.37867*10^-3, 3.97475*10^-4, 1.9904*10^-3, 1.12803*10^-3, 1.40679*10^-4, 1.99225*10^-3, 2.10768*10^-3, 2.04947*10^-4, -1.73206*10^-4, -1.23233*10^-5, 4.44418*10^-4, 2.66517*10^-4, -4.01355*10^-4, 1.76596*10^-5, 5.21337*10^-5, -3.43904*10^-4, -5.62304*10^-4, -3.45911*10^-4, 1.63275*10^-4, -1.78548*10^-4, -7.38871*10^-4, -3.41992*10^-4, -1.29415*10^-4, -2.14133*10^-4, -2.67914*10^-4, -2.00619*10^-4, -1.74628*10^-4, -1.68571*10^-4, -1.07805*10^-4, -5.32896*10^-5, 7.93834*10^-6, 1.46317*10^-5, 3.73611*10^-6, 1.32153*10^-5, 1.75291*10^-5, 6.12983*10^-6, 9.58706*10^-7, 0));
h(16,1) = fi.fir((2.47639*10^-5, -4.7088*10^-6, 3.5434*10^-4, -3.9905*10^-4, -8.62417*10^-5, -1.16299*10^-3, 1.49577*10^-3, -1.62677*10^-3, 3.20863*10^-4, -6.24716*10^-4, 1.68283*10^-3, -1.45821*10^-3, -7.87119*10^-3, 4.51814*10^-3, 8.48161*10^-3, 3.31264*10^-2, -2.0029*10^-2, -1.63571*10^-2, 2.27166*10^-2, -1.90547*10^-2, -2.21976*10^-2, -1.74228*10^-2, -1.76328*10^-2, 1.09545*10^-3, 3.26907*10^-2, 3.70124*10^-2, 6.20737*10^-3, -1.76526*10^-2, 1.44063*10^-2, 3.66584*10^-2, -2.08799*10^-2, -4.51098*10^-2, -6.02232*10^-3, 7.96541*10^-3, 7.25046*10^-3, -7.19013*10^-3, -9.58897*10^-3, 5.85768*10^-3, 1.27408*10^-2, 2.27231*10^-3, -1.17918*10^-2, 1.21233*10^-3, 3.52334*10^-3, -8.30121*10^-3, -2.53834*10^-3, 5.23374*10^-3, 2.60297*10^-3, -6.63947*10^-4, 6.88957*10^-4, 3.85154*10^-4, -3.02839*10^-3, -4.64818*10^-3, 1.05713*10^-3, 3.78545*10^-3, 2.27285*10^-3, 3.75072*10^-3, 1.88724*10^-3, 3.72662*10^-3, 6.05514*10^-3, 2.86602*10^-3, 1.42131*10^-3, 1.52038*10^-3, 3.1719*10^-4, -3.99725*10^-3, -2.40002*10^-3, 1.00471*10^-3, -3.04565*10^-3, -6.84891*10^-3, -5.92465*10^-3, -7.91495*10^-4, 2.65224*10^-3, 1.05786*10^-3, 4.39049*10^-4, 1.8128*10^-3, 2.37751*10^-3, 7.46752*10^-4, -1.01038*10^-3, -1.08777*10^-3, -1.53375*10^-3, -3.76877*10^-4, -4.25318*10^-4, -5.65439*10^-4, 1.27944*10^-3, -4.86147*10^-4, -1.09859*10^-3, -4.41226*10^-4, -1.28331*10^-3, -6.54352*10^-4, -5.11422*10^-4, 5.65125*10^-4, 1.91671*10^-3, 2.36682*10^-3, 1.3563*10^-3, -1.02102*10^-3, -7.786*10^-4, -6.98236*10^-4, -8.02984*10^-4, -2.31761*10^-4, 6.12519*10^-6, -9.07679*10^-5, 3.35677*10^-4, 3.22414*10^-4, 2.65365*10^-4, 2.76137*10^-4, 9.15682*10^-5, -2.51816*10^-4, -4.69868*10^-5, 3.0512*10^-4, -1.65316*10^-4, -3.23155*10^-4, 6.31454*10^-5, 1.35007*10^-4, 2.50399*10^-5, -8.92612*10^-5, 2.14393*10^-5, 2.54175*10^-6, 6.31566*10^-5, 1.71501*10^-5, 8.08098*10^-5, 3.0611*10^-5, -7.71602*10^-5, -3.63984*10^-5, 7.08545*10^-6, 2.20134*10^-5, -4.54475*10^-6, -5.94526*10^-6, -1.99452*10^-7, 0));
h(17,1) = fi.fir((-1.12518*10^-5, -2.52175*10^-5, -4.38429*10^-7, -1.61649*10^-4, 1.85227*10^-4, -3.79492*10^-4, -6.08489*10^-4, 8.83931*10^-5, 6.68369*10^-4, -9.99367*10^-4, -1.21022*10^-3, 1.29228*10^-3, -1.21788*10^-2, -4.68315*10^-4, 1.50281*10^-3, -6.03551*10^-4, 3.1857*10^-2, 8.21013*10^-3, -3.03129*10^-2, -7.41938*10^-3, 2.20151*10^-2, 1.01088*10^-2, -6.07037*10^-3, -1.19074*10^-2, -5.38*10^-3, -9.75742*10^-3, 2.26556*10^-3, 3.68369*10^-3, -7.71687*10^-3, 1.49585*10^-2, -2.8647*10^-3, -5.48534*10^-3, 3.84218*10^-3, -7.39329*10^-3, 5.02779*10^-3, 7.88494*10^-3, -4.92785*10^-3, -8.36886*10^-3, -9.18883*10^-3, 5.7775*10^-3, 1.12766*10^-2, 5.56093*10^-3, -1.91035*10^-3, -5.86651*10^-3, 9.93771*10^-4, 4.91499*10^-3, 3.45724*10^-3, 4.10376*10^-5, -1.2248*10^-3, -5.36977*10^-3, -4.36442*10^-3, -2.28246*10^-3, -9.53147*10^-4, 1.04997*10^-3, 2.95045*10^-3, 2.98067*10^-3, 1.74005*10^-3, 1.91928*10^-3, 2.52441*10^-3, -9.23606*10^-5, -8.34922*10^-4, -6.02009*10^-4, -2.25984*10^-4, -1.66927*10^-3, -1.00309*10^-3, -2.0463*10^-4, -1.9296*10^-3, -1.0428*10^-3, -4.5546*10^-4, 1.12042*10^-3, 1.83867*10^-3, 1.65864*10^-3, 1.93418*10^-3, 6.23567*10^-4, -8.31176*10^-4, -3.12604*10^-3, -3.34934*10^-3, -1.48754*10^-3, -2.38546*10^-4, 5.24849*10^-4, -7.20907*10^-4, -4.83266*10^-4, 9.61786*10^-4, 8.75555*10^-4, -7.18929*10^-4, -1.49106*10^-3, -5.01798*10^-4, -3.01003*10^-4, -9.25607*10^-5, -1.64878*10^-4, -9.46731*10^-4, -7.6694*10^-4, -5.47987*10^-4, 5.26503*10^-4, 4.54822*10^-4, -1.24766*10^-3, -1.50239*10^-3, -8.47043*10^-4, -5.93637*10^-4, -3.94813*10^-4, -2.93212*10^-4, -2.53678*10^-4, 1.36606*10^-4, -4.53146*10^-6, 4.64796*10^-5, -4.01919*10^-5, -4.94946*10^-5, 4.74848*10^-5, -2.41033*10^-4, 3.49977*10^-5, -9.78587*10^-5, 1.22163*10^-5, 2.72989*10^-4, 7.91379*10^-5, 7.78936*10^-5, 9.61423*10^-5, 7.98075*10^-5, 1.10373*10^-4, 1.08625*10^-5, 1.68101*10^-5, -5.14588*10^-5, -1.02699*10^-5, 4.24498*10^-5, -1.54209*10^-6, -3.55566*10^-7, -3.38734*10^-6, -1.42182*10^-6, 0));
h(18,1) = fi.fir((8.46754*10^-6, -3.99997*10^-5, 7.81131*10^-5, -1.76664*10^-4, 2.18614*10^-4, -2.62422*10^-4, -4.45652*10^-5, -5.6178*10^-4, 9.2258*10^-4, 7.08956*10^-4, -1.2249*10^-3, -5.24485*10^-4, -8.38376*10^-4, 2.26799*10^-3, -4.73027*10^-3, 8.71162*10^-3, 1.58126*10^-3, 1.83656*10^-2, 2.73151*10^-3, -5.80978*10^-2, 7.39795*10^-3, 3.23093*10^-2, -1.3579*10^-2, -1.44256*10^-2, -1.30734*10^-2, 3.02041*10^-2, 3.12594*10^-2, -2.0943*10^-2, -6.04938*10^-3, -1.38165*10^-2, 1.74843*10^-4, 2.46952*10^-2, 4.84082*10^-4, -1.07633*10^-2, -5.82769*10^-4, 3.04413*10^-3, -1.21855*10^-2, 8.43931*10^-4, 7.15823*10^-3, -1.14539*10^-3, -4.58897*10^-3, 1.71053*10^-3, 5.96175*10^-3, -1.31856*10^-3, 3.25658*10^-3, 4.04222*10^-3, -4.19875*10^-3, 4.47298*10^-4, 2.09315*10^-3, -1.6919*10^-3, -1.33556*10^-3, 5.23524*10^-4, 5.90727*10^-4, -2.3095*10^-3, -1.72704*10^-3, -1.50241*10^-3, -5.78455*10^-4, -3.23551*10^-5, 4.10224*10^-5, -1.55243*10^-3, -2.09868*10^-3, 5.84863*10^-5, -5.67201*10^-4, -1.15911*10^-3, 5.26208*10^-4, 2.4605*10^-3, 1.465*10^-3, -5.84392*10^-4, -1.37493*10^-3, 8.90404*10^-5, 2.72071*10^-3, 3.72753*10^-3, 1.13654*10^-3, -2.32522*10^-3, -7.15857*10^-4, 7.67318*10^-4, 5.34539*10^-4, 1.1149*10^-3, 4.0236*10^-4, 1.03558*10^-4, -2.9607*10^-4, -1.93484*10^-3, -1.47848*10^-3, -1.28741*10^-3, -3.75861*10^-4, 1.52264*10^-4, -7.14358*10^-4, 1.13972*10^-3, 7.74481*10^-4, 6.73181*10^-5, 3.18167*10^-4, -7.12106*10^-4, -8.5018*10^-4, -1.2821*10^-4, 5.63847*10^-4, 4.27308*10^-4, 8.49064*10^-5, 4.12732*10^-5, 7.43967*10^-4, 7.86364*10^-4, 1.09181*10^-4, -1.04291*10^-3, -7.10936*10^-4, 3.65642*10^-4, -1.8673*10^-4, -2.51117*10^-4, 2.83307*10^-5, 1.79366*10^-4, 2.56181*10^-4, -9.16734*10^-5, -8.14924*10^-5, -7.95034*10^-5, -8.87843*10^-5, 5.96209*10^-6, -1.1491*10^-4, 6.3452*10^-5, -2.58999*10^-5, -4.90741*10^-5, 6.5355*10^-5, 5.53433*10^-5, 6.04376*10^-5, -1.73088*10^-5, -1.28328*10^-5, 3.80288*10^-6, 3.25446*10^-6, -1.66874*10^-6, -3.16691*10^-7, 0));
h(19,1) = fi.fir((-1.60519*10^-5, -5.07492*10^-6, 2.87357*10^-4, -2.04084*10^-4, -6.49941*10^-4, 5.25536*10^-4, 4.99998*10^-4, -7.18214*10^-4, -4.36211*10^-4, 3.23886*10^-5, -6.26824*10^-4, 6.89937*10^-4, -1.72606*10^-2, -4.24591*10^-3, 3.61436*10^-2, 5.0167*10^-3, -2.81069*10^-2, -2.331*10^-2, 2.18264*10^-2, 3.92449*10^-2, 1.89946*10^-2, 1.35645*10^-2, -6.3962*10^-2, -3.7707*10^-2, 3.51136*10^-2, 9.01473*10^-3, -1.23668*10^-3, -1.17299*10^-2, -1.24636*10^-2, 7.84715*10^-3, 9.20741*10^-3, 3.91203*10^-4, 6.4388*10^-4, 6.651*10^-4, -3.94122*10^-3, -3.85536*10^-3, 1.92288*10^-3, 4.81443*10^-3, 1.11639*10^-2, 2.85857*10^-3, -4.73491*10^-3, -5.36479*10^-3, -2.82256*10^-3, -2.56657*10^-3, -1.07359*10^-3, 4.01416*10^-3, 1.63053*10^-3, 8.2404*10^-4, -1.27327*10^-3, -1.63773*10^-3, 2.11746*10^-3, 4.64776*10^-3, 5.07914*10^-4, -3.48194*10^-3, -3.2662*10^-3, 1.76202*10^-4, 1.85579*10^-3, 1.85225*10^-3, -2.50956*10^-3, -4.21615*10^-3, -3.10362*10^-3, -1.09943*10^-3, 1.80572*10^-3, 1.15181*10^-3, -6.60232*10^-4, 1.09564*10^-3, 1.99802*10^-3, 1.0342*10^-3, 2.25408*10^-3, 7.62111*10^-8, -1.62152*10^-3, -7.16191*10^-4, -1.81778*10^-3, -1.13227*10^-3, 1.64066*10^-3, 1.83631*10^-3, 1.59506*10^-3, 1.5986*10^-3, 1.80161*10^-3, 8.28893*10^-4, -1.33194*10^-3, -1.3112*10^-3, 4.22487*10^-4, 1.39281*10^-3, 6.23239*10^-4, -1.2205*10^-3, -1.14263*10^-3, 2.98468*10^-4, 1.85644*10^-4, 5.45233*10^-5, -5.75289*10^-4, -1.20267*10^-3, -9.98064*10^-4, -2.37096*10^-3, -1.89254*10^-3, -6.60745*10^-4, -6.57748*10^-4, -8.8091*10^-4, -1.16818*10^-3, -8.61727*10^-4, -3.27773*10^-4, -1.61222*10^-4, 1.94191*10^-4, 3.61344*10^-4, -4.30785*10^-4, -5.61166*10^-4, -1.44006*10^-4, 6.22891*10^-5, 3.5927*10^-4, 1.03944*10^-4, 2.33591*10^-4, 3.22562*10^-4, 4.5599*10^-5, 4.79109*10^-5, 1.36757*10^-4, 1.60109*10^-4, 9.52111*10^-5, 3.45891*10^-5, 7.48501*10^-5, 7.69231*10^-5, 7.42812*10^-5, 1.35771*10^-5, -3.03839*10^-5, -1.24208*10^-5, 5.73009*10^-6, 4.11672*10^-6, -2.39344*10^-7, 0));
h(20,1) = fi.fir((-1.11966*10^-5, -8.88238*10^-5, -6.64415*10^-5, 9.08779*10^-6, 2.8978*10^-4, -1.99779*10^-4, 7.84588*10^-4, -3.08419*10^-4, -3.83537*10^-4, -2.43798*10^-4, 4.00823*10^-5, 4.07078*10^-3, 2.02492*10^-2, 1.45401*10^-2, -1.87744*10^-3, -1.40586*10^-3, -4.04868*10^-2, -4.18774*10^-2, -2.00329*10^-2, -7.1259*10^-3, 1.84133*10^-2, 2.28362*10^-2, 2.64909*10^-2, 1.21774*10^-2, 8.06984*10^-4, 7.44592*10^-3, -8.87858*10^-3, -1.18445*10^-2, 2.63112*10^-2, 2.33436*10^-2, 5.29021*10^-3, -8.71086*10^-3, -1.61164*10^-2, -7.51844*10^-3, -1.53619*10^-2, -3.23006*10^-3, 6.29851*10^-3, 6.60932*10^-4, -6.08021*10^-3, -6.30607*10^-3, 6.02894*10^-3, 6.10741*10^-3, -3.47263*10^-3, -2.0012*10^-4, 1.05347*10^-4, -4.65258*10^-3, -2.81874*10^-3, -1.57369*10^-3, 3.7996*10^-3, 6.86201*10^-3, 1.0076*10^-3, -4.86479*10^-3, -3.46055*10^-3, 2.2847*10^-4, 1.27474*10^-3, 3.60318*10^-3, 4.21488*10^-3, 8.45167*10^-4, -5.06952*10^-4, -8.3919*10^-4, -8.95233*10^-4, -2.80215*10^-3, -1.22374*10^-3, 1.04215*10^-3, 1.0659*10^-3, 5.06966*10^-4, -5.18492*10^-4, -1.42481*10^-3, -8.09402*10^-4, 3.01676*10^-3, 1.85159*10^-3, -2.36257*10^-4, 1.4127*10^-3, -4.00493*10^-4, -2.50376*10^-3, -2.10972*10^-3, 2.11399*10^-4, 1.3705*10^-3, -7.28887*10^-4, -7.70172*10^-4, 3.56111*10^-4, 1.52084*10^-3, 1.09117*10^-3, -2.09016*10^-3, -2.3455*10^-3, -1.67692*10^-4, 7.5464*10^-4, 3.47804*10^-4, -1.01029*10^-3, -8.11262*10^-4, -3.12518*10^-5, 8.49904*10^-4, 1.29043*10^-3, 9.17368*10^-4, 4.42065*10^-4, -8.35573*10^-5, 1.10474*10^-3, 1.50157*10^-3, 1.41582*10^-4, -3.43523*10^-4, -5.0613*10^-5, -1.22187*10^-4, 1.72603*10^-4, 1.26907*10^-4, 4.5528*10^-4, 1.07997*10^-4, -3.74969*10^-4, 2.48529*10^-6, -3.90002*10^-4, -4.24739*10^-4, -2.91292*10^-4, -3.80888*10^-4, 1.2067*10^-5, 3.17963*10^-5, -1.32352*10^-4, -1.43383*10^-4, -1.88798*10^-4, -5.53501*10^-5, -7.91089*10^-5, -1.55607*10^-4, -4.37215*10^-5, 2.5023*10^-5, 4.36754*10^-5, 6.82071*10^-6, -1.51174*10^-5, -4.01122*10^-6, 4.88989*10^-7, 0));
h(21,1) = fi.fir((-1.72456*10^-6, 1.51199*10^-5, -8.9622*10^-5, 4.51662*10^-5, -6.02566*10^-5, 1.4925*10^-4, -4.63978*10^-5, 1.28289*10^-4, -1.59971*10^-4, 5.51018*10^-5, -8.52122*10^-5, 1.24608*10^-4, -4.81403*10^-4, 1.3988*10^-3, 1.42046*10^-3, -2.43694*10^-3, -1.34784*10^-3, 4.05739*10^-3, -3.37356*10^-3, 3.79702*10^-3, -1.62823*10^-4, -1.33363*10^-2, 1.51297*10^-2, -1.99099*10^-3, 8.8277*10^-5, 1.38903*10^-3, -8.64536*10^-3, 1.74132*10^-3, -9.25597*10^-4, 1.16576*10^-4, -1.36287*10^-3, 1.50701*10^-2, 1.57599*10^-3, -9.8981*10^-3, -7.16758*10^-3, 8.06326*10^-3, 5.16217*10^-3, -1.32405*10^-2, 1.65833*10^-3, 4.64267*10^-3, -3.35439*10^-3, -3.49793*10^-4, 1.17955*10^-3, 8.88766*10^-4, -2.01648*10^-3, 8.99674*10^-4, -9.62836*10^-4, -1.71734*10^-3, 3.59954*10^-3, -1.10467*10^-3, -2.3227*10^-4, 1.25554*10^-3, 2.21503*10^-3, -7.08518*10^-4, 1.38544*10^-3, 4.92437*10^-3, -1.78311*10^-4, -1.12848*10^-3, -2.74061*10^-4, -2.76848*10^-3, -1.09522*10^-3, 1.22199*10^-3, -8.65618*10^-4, -2.82137*10^-3, -2.16653*10^-3, -7.13619*10^-4, -8.86716*10^-5, 1.04919*10^-4, 3.42128*10^-4, 3.15598*10^-4, 2.5078*10^-4, 1.17239*10^-3, 1.1948*10^-3, -3.29991*10^-4, -4.60373*10^-4, -9.07143*10^-5, -1.35154*10^-3, 9.80584*10^-4, 2.05091*10^-3, 1.23329*10^-3, -7.46007*10^-5, -1.32245*10^-3, 5.88936*10^-4, 7.87857*10^-4, 1.78134*10^-4, -3.60258*10^-4, -1.19211*10^-3, -2.98303*10^-4, -2.37842*10^-4, -1.07163*10^-4, 4.67904*10^-4, 8.76573*10^-4, 2.68727*10^-4, -1.16942*10^-3, -1.64166*10^-3, -6.53472*10^-5, 2.08517*10^-3, 1.20197*10^-3, 5.97838*10^-6, -7.95606*10^-5, 1.90799*10^-4, -7.33386*10^-5, -2.56214*10^-4, -5.17742*10^-6, -1.06843*10^-4, -4.30154*10^-5, -2.5283*10^-4, -2.67635*10^-4, 1.23694*10^-4, 4.31971*10^-5, -3.80833*10^-4, -2.66416*10^-4, 1.33655*10^-4, 1.31404*10^-4, 2.92614*10^-5, 9.48311*10^-6, -1.79707*10^-5, -5.33063*10^-5, -2.60729*10^-6, -3.11424*10^-5, -5.02754*10^-5, 6.37954*10^-6, 3.6885*10^-5, 2.56571*10^-5, 5.33039*10^-6, -1.5362*10^-6, -5.88919*10^-7, 0));
h(22,1) = fi.fir((2.48655*10^-5, -5.2325*10^-5, -3.16647*10^-4, -1.40598*10^-4, 9.90226*10^-5, 7.29466*10^-5, -5.1453*10^-4, 1.10753*10^-3, -1.26463*10^-3, 2.38535*10^-3, -1.78727*10^-3, 8.03193*10^-3, 2.96316*10^-2, 3.52858*10^-2, -2.0667*10^-2, -4.29015*10^-2, -2.62128*10^-2, -3.74964*10^-2, 1.46813*10^-2, -1.57208*10^-2, -3.99341*10^-2, 1.39343*10^-2, 4.26851*10^-2, 3.79115*10^-2, 1.44081*10^-2, 3.31856*10^-2, 1.29721*10^-2, -1.86206*10^-2, -1.72566*10^-3, 4.66849*10^-3, -5.21283*10^-3, -3.24698*10^-3, 5.97366*10^-3, 1.3015*10^-3, -5.33637*10^-3, -7.63633*10^-3, -2.24471*10^-2, -2.31689*10^-2, -6.6379*10^-3, -1.49051*10^-3, -5.55617*10^-3, -5.42286*10^-3, 1.87131*10^-3, -3.51473*10^-4, 2.32295*10^-3, 6.39798*10^-3, 4.6697*10^-3, 5.0508*10^-3, 4.30472*10^-3, 2.86225*10^-3, 2.47781*10^-3, 5.52152*10^-3, 5.06712*10^-3, 2.91467*10^-3, 2.04454*10^-3, -3.74723*10^-5, -8.71398*10^-4, -3.41146*10^-4, 1.39395*10^-3, 1.41333*10^-3, -8.97885*10^-4, -2.57216*10^-3, -4.39151*10^-3, -3.73773*10^-3, -3.62271*10^-3, -2.64545*10^-4, 2.5929*10^-3, -4.22486*10^-4, -1.2386*10^-3, 7.14534*10^-4, 2.07345*10^-3, 1.28457*10^-3, 1.23699*10^-3, 1.2271*10^-4, -9.64007*10^-4, 1.17332*10^-3, 2.34453*10^-3, 2.26393*10^-3, 1.01466*10^-3, -6.77591*10^-4, -3.89581*10^-4, 4.90595*10^-4, -1.24704*10^-3, -3.26374*10^-3, -2.87005*10^-3, -1.10188*10^-3, 1.1911*10^-4, 4.32073*10^-4, -8.76799*10^-6, -1.04977*10^-3, -6.46028*10^-4, -3.69246*10^-4, -1.91836*10^-3, -3.56517*10^-3, -1.26296*10^-3, 2.54428*10^-4, 1.09714*10^-6, 1.49528*10^-3, 1.82236*10^-3, 8.54379*10^-4, -1.65683*10^-4, 4.23628*10^-4, 1.46408*10^-3, 5.97418*10^-4, -3.6978*10^-5, 3.99827*10^-4, 7.13353*10^-4, 7.93463*10^-4, -4.61018*10^-5, -3.53584*10^-4, 6.40531*10^-4, 4.79932*10^-4, -9.5068*10^-5, -2.38922*10^-4, -7.41771*10^-5, -1.33542*10^-6, -1.45382*10^-4, -5.40852*10^-5, -1.79538*10^-5, -4.78923*10^-5, -1.27759*10^-5, -2.27523*10^-5, -1.74931*10^-5, -8.18893*10^-6, -9.31525*10^-6, -2.14361*10^-6, 1.24397*10^-6, 0));
h(23,1) = fi.fir((-9.94474*10^-6, 4.27114*10^-5, -7.58864*10^-5, -4.08033*10^-5, -1.66029*10^-4, 6.99969*10^-4, -6.60455*10^-4, 3.87942*10^-4, -2.56811*10^-5, 5.21205*10^-4, -9.92013*10^-4, 5.2282*10^-4, 4.02347*10^-4, 1.64552*10^-3, 4.88735*10^-3, -7.16065*10^-3, -1.16489*10^-3, 5.46722*10^-3, 5.91649*10^-3, -2.51933*10^-2, 6.86249*10^-3, 1.25277*10^-2, -2.22476*10^-2, 2.85481*10^-2, 1.69364*10^-2, -2.42674*10^-2, -6.12438*10^-3, 2.59762*10^-3, -7.59654*10^-3, 1.04596*10^-2, 7.95004*10^-3, -1.68353*10^-2, 2.37525*10^-3, 1.71455*10^-2, -1.58868*10^-2, -2.06715*10^-3, 1.14507*10^-2, -3.84699*10^-3, -5.75882*10^-3, 4.73693*10^-3, 4.44541*10^-3, -5.3719*10^-3, 7.07381*10^-3, -1.44816*10^-3, -8.83576*10^-3, 4.74825*10^-3, 3.46505*10^-3, -3.93443*10^-3, -1.88966*10^-3, 1.73706*10^-4, -3.47623*10^-3, -2.49524*10^-3, 3.02676*10^-3, -9.34111*10^-4, -1.06458*10^-3, -2.31743*10^-4, -1.57497*10^-4, -1.67037*10^-3, -3.0292*10^-3, -1.32391*10^-3, 1.38116*10^-3, 5.06015*10^-3, 2.69779*10^-3, 1.31753*10^-3, 5.56525*10^-4, 8.93187*10^-4, 2.29024*10^-3, 1.95557*10^-3, 1.35886*10^-3, -2.43386*10^-4, -1.04462*10^-3, -5.11794*10^-4, -1.02342*10^-3, -1.35237*10^-3, -3.60761*10^-4, -4.90595*10^-4, -6.67587*10^-4, -1.08501*10^-3, -2.71009*10^-3, -6.3472*10^-4, 9.17056*10^-4, 7.24254*10^-4, 7.04233*10^-4, -1.61289*10^-3, -9.26784*10^-4, 1.22065*10^-4, 2.94391*10^-6, -3.4728*10^-4, -1.24285*10^-3, 9.43769*10^-4, 1.1113*10^-3, -7.15588*10^-4, 4.09948*10^-4, 1.4052*10^-3, 6.92748*10^-4, 4.71341*10^-4, 3.15615*10^-4, 4.52161*10^-4, 9.45078*10^-4, 8.04685*10^-4, 8.21556*10^-6, -3.57801*10^-4, 5.83444*10^-7, 6.1747*10^-4, 3.98374*10^-4, 2.45972*10^-4, 1.13249*10^-4, -2.76345*10^-4, 1.21626*10^-4, 2.36304*10^-4, -2.22619*10^-4, -3.59817*10^-4, -9.72827*10^-5, 1.78986*10^-5, -2.0505*10^-4, -6.99009*10^-5, -1.10715*10^-4, -8.35894*10^-5, -4.12822*10^-5, -5.59518*10^-5, -3.75969*10^-5, -5.71836*10^-5, -1.51806*10^-5, -4.28309*10^-6, 6.88232*10^-7, 2.35351*10^-6, -1.47788*10^-7, 0));
h(24,1) = fi.fir((9.35012*10^-6, -5.35087*10^-5, -3.65476*10^-4, -2.45125*10^-4, 2.67346*10^-4, 6.04623*10^-4, -8.77518*10^-4, 1.16198*10^-4, 2.1498*10^-4, 1.02728*10^-3, -1.914*10^-3, 9.69097*10^-3, 4.07828*10^-2, 3.57639*10^-2, 8.26336*10^-3, -5.86346*10^-2, -6.61816*10^-2, -2.39763*10^-2, -4.34275*10^-2, -2.30372*10^-2, 5.32942*10^-3, 2.15685*10^-2, 5.31705*10^-2, 5.41351*10^-2, -4.37594*10^-3, 1.13766*10^-2, 3.23898*10^-2, 3.78819*10^-3, -6.9729*10^-3, -8.28142*10^-3, 1.34835*10^-2, -9.09249*10^-3, -1.45286*10^-2, -6.90546*10^-3, -3.55798*10^-3, -6.78837*10^-3, -1.82876*10^-2, -1.28663*10^-2, 2.19275*10^-3, 8.33522*10^-3, 8.3406*10^-5, -5.79098*10^-3, 3.15133*10^-3, 5.71376*10^-3, -4.30659*10^-3, -5.7374*10^-3, 3.28927*10^-3, 6.59259*10^-3, 1.34358*10^-3, 1.06006*10^-3, -1.49271*10^-3, 1.86571*10^-3, 3.56575*10^-3, 1.81036*10^-6, -3.46722*10^-4, 1.77995*10^-4, -1.24097*10^-4, 1.32287*10^-4, 6.14402*10^-5, 9.07871*10^-4, -1.91513*10^-4, -1.00305*10^-3, -1.00811*10^-4, -1.24849*10^-3, -5.35492*10^-4, -6.00765*10^-5, -7.01885*10^-4, -6.77036*10^-4, -1.84157*10^-3, -2.28896*10^-3, -1.51697*10^-3, 1.21332*10^-3, 2.94839*10^-3, 1.27728*10^-3, -6.31887*10^-4, -9.03401*10^-4, 3.26236*10^-4, -1.10683*10^-4, 1.24937*10^-3, 1.27678*10^-3, -1.93253*10^-5, 9.2739*10^-4, 8.16862*10^-4, 3.07199*10^-4, 1.09648*10^-3, 2.0883*10^-3, 7.45629*10^-4, -1.94134*10^-3, -1.87102*10^-3, -7.60785*10^-4, -1.1286*10^-3, -1.25057*10^-3, -5.22489*10^-4, -4.51032*10^-4, 7.48275*10^-5, 5.8756*10^-4, -1.16422*10^-4, 4.54606*10^-5, 3.94057*10^-4, 3.30823*10^-4, 4.43729*10^-4, 6.34335*10^-4, 7.10508*10^-4, 4.83306*10^-4, 5.21324*10^-4, 2.24978*10^-4, -4.46103*10^-5, 4.35921*10^-5, -1.50574*10^-4, 4.54877*10^-5, -2.53513*10^-4, -1.0568*10^-4, 2.11629*10^-4, 6.57646*10^-5, 5.95893*10^-5, -1.68436*10^-4, -2.68843*10^-4, -1.39565*10^-4, -5.68304*10^-5, -3.4888*10^-6, -6.92076*10^-5, -7.69788*10^-5, -3.3133*10^-5, -1.58658*10^-5, 3.83839*10^-6, 2.13798*10^-6, 8.78916*10^-7, 0));
h(25,1) = fi.fir((1.75745*10^-5, 1.46899*10^-4, 2.98616*10^-4, 2.91907*10^-4, -1.36334*10^-4, -5.05798*10^-4, 4.59936*10^-4, -1.05671*10^-3, -3.71296*10^-4, -1.11838*10^-3, 3.34114*10^-3, -1.35237*10^-2, -1.95576*10^-2, -5.53276*10^-3, 4.60016*10^-3, 4.94228*10^-2, 3.49525*10^-2, 1.69814*10^-2, 4.13115*10^-2, -1.99525*10^-2, -6.08337*10^-2, -4.261*10^-2, -4.6904*10^-2, -3.8218*10^-2, 9.49311*10^-3, 2.55713*10^-2, 2.3786*10^-2, 1.55105*10^-2, 3.00478*10^-2, 5.33536*10^-2, -3.29497*10^-3, -1.3194*10^-2, 5.26077*10^-3, -7.24585*10^-3, -5.95666*10^-3, -2.01764*10^-2, -1.41497*10^-2, 1.1094*10^-2, 9.51644*10^-3, -6.3158*10^-3, -1.71203*10^-2, -2.15968*10^-3, 2.37423*10^-3, -4.59366*10^-3, -3.3277*10^-3, -1.32678*10^-3, 4.36719*10^-4, -9.75091*10^-4, 2.9275*10^-3, 4.98083*10^-3, 3.75698*10^-3, 2.47108*10^-3, 1.81967*10^-3, -9.08305*10^-4, -2.80125*10^-3, 1.30247*10^-4, 3.40864*10^-3, 2.46043*10^-3, 1.88758*10^-3, 2.3077*10^-5, -1.32038*10^-3, -8.685*10^-4, -2.54997*10^-3, -2.42258*10^-3, -1.96148*10^-3, -1.87308*10^-3, -4.56271*10^-4, 9.99454*10^-4, 2.07461*10^-3, -1.27137*10^-3, -2.09749*10^-3, 3.52481*10^-3, 3.48921*10^-3, 2.07019*10^-5, 1.00514*10^-3, 3.1206*10^-3, 2.95256*10^-4, -3.28529*10^-3, -2.15363*10^-3, 9.74996*10^-4, 1.15759*10^-4, -2.08429*10^-3, -1.39596*10^-3, 2.88039*10^-4, 3.52237*10^-4, -8.81839*10^-4, -1.51922*10^-3, 1.19948*10^-3, 1.04628*10^-3, -6.85543*10^-4, 3.08893*10^-5, 9.46998*10^-4, 1.99563*10^-3, 7.05182*10^-4, -9.68873*10^-4, -1.91172*10^-3, -5.8996*10^-4, -9.38325*10^-5, -6.62862*10^-4, -7.00253*10^-5, 1.04924*10^-3, 6.33366*10^-4, -1.25815*10^-4, -6.02163*10^-5, 1.31514*10^-4, 2.49788*10^-4, 1.23289*10^-4, 6.38484*10^-6, 2.98695*10^-5, -7.74413*10^-5, -6.18813*10^-5, -2.91172*10^-4, -2.10773*10^-4, -4.13487*10^-5, 6.10882*10^-5, 7.31887*10^-5, 8.02268*10^-5, 2.289*10^-5, 4.08276*10^-5, 4.40934*10^-5, -1.03733*10^-5, 1.1964*10^-5, 9.03398*10^-6, -7.87942*10^-7, -1.11533*10^-5, -7.913*10^-6, -1.06573*10^-6, 0));
h(26,1) = fi.fir((1.2426*10^-5, -4.77088*10^-5, 1.74254*10^-5, 8.95737*10^-5, 6.94603*10^-6, -5.57998*10^-4, 6.11467*10^-4, -2.28106*10^-4, -3.03717*10^-4, 1.99821*10^-4, 6.37561*10^-4, -2.81438*10^-4, -1.05089*10^-3, -1.26156*10^-3, -7.92312*10^-3, 1.39144*10^-2, 6.49938*10^-3, -8.46662*10^-3, 4.52054*10^-3, 6.68414*10^-3, -2.83141*10^-2, 3.9259*10^-3, 3.43884*10^-2, -2.45073*10^-2, -1.76419*10^-3, 2.56057*10^-3, -1.40884*10^-4, 8.69002*10^-3, -2.1991*10^-3, -6.47077*10^-3, -9.24293*10^-3, 9.10019*10^-3, 1.66209*10^-3, -6.67199*10^-3, 5.0464*10^-3, 5.06006*10^-3, 2.58447*10^-4, -1.72143*10^-4, -2.42872*10^-3, 9.16115*10^-4, 9.92355*10^-4, 1.9535*10^-3, 1.9573*10^-3, -2.8023*10^-3, -4.1707*10^-3, 9.30843*10^-4, 3.45299*10^-4, -2.16593*10^-3, -1.48984*10^-3, -1.44952*10^-3, -9.69359*10^-4, -3.41713*10^-4, 1.87801*10^-3, -9.55175*10^-4, 6.30711*10^-5, 3.86306*10^-3, 1.72614*10^-3, -2.87262*10^-5, 1.01278*10^-3, 1.19309*10^-3, -1.30918*10^-3, -2.47843*10^-3, -5.99368*10^-4, -8.62886*10^-4, -4.50483*10^-4, -4.98383*10^-5, -6.25081*10^-4, 9.02621*10^-4, 1.73495*10^-3, 8.8974*10^-4, -5.08301*10^-4, 2.56778*10^-4, 2.023*10^-3, -2.65444*10^-4, 6.00058*10^-4, 2.7544*10^-3, -5.11977*10^-4, -2.79595*10^-3, -2.27893*10^-3, -1.5044*10^-3, -7.19575*10^-4, -2.48827*10^-4, -3.51084*10^-5, 3.99715*10^-4, -1.07648*10^-3, -2.01868*10^-3, -9.25746*10^-4, 7.67893*10^-4, 1.79612*10^-3, 7.40578*10^-4, -2.08784*10^-4, -5.24523*10^-4, -1.58131*10^-4, 5.07031*10^-4, 2.61123*10^-4, -7.04872*10^-4, -6.71401*10^-4, 3.81263*10^-4, 9.84421*10^-4, 9.53969*10^-4, 9.41409*10^-4, 5.03337*10^-4, 1.95336*10^-4, -1.24894*10^-4, 3.35934*10^-4, 5.48825*10^-4, 2.10516*10^-4, 4.97707*10^-4, 3.23931*10^-4, -9.83185*10^-5, -2.27783*10^-5, -1.5412*10^-4, 1.20834*10^-4, 9.9222*10^-5, -5.28381*10^-5, -8.80554*10^-5, -3.85857*10^-5, 5.25383*10^-5, -1.5899*10^-5, -1.58565*10^-5, -2.24063*10^-5, -4.13718*10^-5, -2.14482*10^-5, -6.95742*10^-6, -4.01784*10^-6, -6.53995*10^-7, -6.41601*10^-7, 0));
h(27,1) = fi.fir((-1.00563*10^-5, 5.9274*10^-5, 2.35554*10^-4, -3.5335*10^-4, -5.97894*10^-4, -7.15845*10^-4, 1.88223*10^-3, -1.71357*10^-3, 2.65382*10^-3, -3.06884*10^-3, 3.68918*10^-3, -1.19578*10^-2, -1.62451*10^-2, -2.60322*10^-2, 3.96346*10^-2, 7.41808*10^-2, -9.73336*10^-3, 1.97923*10^-2, -4.62601*10^-2, -3.74157*10^-2, 3.06522*10^-2, -3.63476*10^-2, -4.49094*10^-2, 9.48836*10^-3, 3.67587*10^-2, 2.54189*10^-2, -1.73924*10^-2, -2.07012*10^-2, 2.39723*10^-2, 2.80468*10^-3, 1.67917*10^-3, 1.25467*10^-2, 4.27576*10^-3, 1.1241*10^-2, 1.18508*10^-2, -6.11762*10^-4, -1.14478*10^-2, -1.26997*10^-2, -8.91142*10^-3, -1.21305*10^-2, -7.06148*10^-3, -1.97276*10^-3, -4.2019*10^-3, 2.15697*10^-3, 4.01709*10^-3, -4.71807*10^-3, -2.01605*10^-3, 8.74338*10^-3, 7.03788*10^-3, 3.42858*10^-3, 2.49072*10^-3, 6.1142*10^-3, 3.20897*10^-3, -6.67307*10^-4, -6.59524*10^-4, -1.37444*10^-3, 1.0144*10^-3, 2.05969*10^-3, -2.46821*10^-3, -1.53181*10^-3, 1.3799*10^-3, 8.26331*10^-4, -2.17175*10^-3, -5.63238*10^-3, -2.79104*10^-3, -1.11618*10^-3, -2.11442*10^-3, -2.07328*10^-4, 6.16098*10^-4, 1.70694*10^-3, 1.04743*10^-3, 6.32304*10^-4, 1.28951*10^-3, -5.49762*10^-4, -1.44309*10^-3, -1.1269*10^-3, 5.84764*10^-4, 8.1579*10^-4, 1.18839*10^-3, 2.26951*10^-3, 1.8906*10^-3, -4.12462*10^-4, -2.3686*10^-3, -2.87648*10^-3, -1.12341*10^-3, 5.21822*10^-4, 1.56127*10^-4, 1.30195*10^-4, 8.20513*10^-4, 1.70656*10^-3, 7.38411*10^-4, -4.16141*10^-4, -7.01969*10^-4, -4.32107*10^-4, -1.20732*10^-4, -1.08228*10^-3, -1.8442*10^-4, 9.55993*10^-4, 8.38237*10^-4, 1.02043*10^-3, 2.83175*10^-4, -5.39898*10^-4, -1.90144*10^-4, 1.35094*10^-5, -2.74943*10^-4, -2.79033*10^-4, 1.77257*10^-4, 2.1278*10^-4, 1.37094*10^-4, 1.9604*10^-4, -3.83873*10^-5, -2.54403*10^-4, -9.55285*10^-5, -1.40286*10^-5, -1.59793*10^-4, -1.89387*10^-4, -1.00599*10^-4, 3.46764*10^-5, 4.29566*10^-5, -7.46743*10^-6, 1.64162*10^-6, 3.71658*10^-7, 8.58456*10^-6, -3.6527*10^-7, 3.71601*10^-6, -8.32524*10^-7, -8.31327*10^-7, 0));
h(28,1) = fi.fir((4.42571*10^-6, -5.25139*10^-5, 4.80723*10^-5, -7.35592*10^-5, 4.77664*10^-5, -2.27046*10^-4, 2.09086*10^-4, -1.4026*10^-4, -2.81565*10^-5, 1.09371*10^-4, -1.18816*10^-5, -2.92397*10^-4, 1.2743*10^-4, -1.64412*10^-3, -4.13328*10^-3, 7.62388*10^-3, 4.75107*10^-3, -7.01003*10^-3, 8.55208*10^-3, -1.04871*10^-2, -1.38051*10^-2, 2.21686*10^-2, -6.08628*10^-3, 7.39797*10^-4, 3.0502*10^-3, -9.89071*10^-3, 4.92144*10^-3, 3.02305*10^-4, -4.89462*10^-3, 3.46101*10^-3, 1.11627*10^-2, -7.56119*10^-3, -7.24114*10^-3, 4.09864*10^-3, 8.23437*10^-3, 1.4973*10^-3, -4.40095*10^-3, -7.53947*10^-3, 2.14502*10^-3, 4.49558*10^-3, -2.4353*10^-3, -3.68379*10^-3, 1.46191*10^-3, 5.10677*10^-4, -2.50409*10^-3, 7.47175*10^-4, 1.79311*10^-3, 9.22453*10^-4, -2.456*10^-3, 7.52408*10^-4, 1.63234*10^-3, 1.28692*10^-3, 1.01539*10^-3, 1.08284*10^-3, 2.19494*10^-3, 3.08748*10^-3, 4.96248*10^-4, 7.71643*10^-4, 1.18863*10^-3, -8.68116*10^-4, -2.69635*10^-3, -2.6382*10^-3, -1.91084*10^-3, -2.79993*10^-3, -3.23837*10^-3, -2.68603*10^-3, -1.86269*10^-3, -1.86959*10^-3, -1.27989*10^-3, 2.01564*10^-3, 2.76083*10^-3, 9.86549*10^-4, -8.7314*10^-4, 1.26592*10^-3, 4.80566*10^-3, 2.13314*10^-3, 1.68506*10^-3, 1.2087*10^-3, -4.96449*10^-4, -7.57128*10^-4, -1.77717*10^-3, -1.01262*10^-3, 1.0737*10^-3, 1.35725*10^-3, 2.15705*10^-4, -7.83307*10^-4, 1.46598*10^-4, 8.85188*10^-4, 8.33678*10^-4, 3.04239*10^-4, -3.98159*10^-4, -8.54766*10^-4, -1.32091*10^-3, -5.35662*10^-4, 8.28129*10^-5, 3.82586*10^-4, -7.23748*10^-5, -8.28216*10^-4, -8.18907*10^-5, 5.12723*10^-4, 3.70794*10^-4, -1.75629*10^-4, -3.78407*10^-4, 2.2061*10^-4, -6.95443*10^-5, -5.58027*10^-4, -2.90926*10^-4, -1.97983*10^-4, 1.29549*10^-4, -1.29874*10^-6, -1.1364*10^-4, 8.94487*10^-5, -9.41637*10^-5, -1.60941*10^-4, -1.69719*10^-4, 2.72544*10^-5, 1.00615*10^-4, -5.87972*10^-5, -4.64086*10^-5, -1.40473*10^-5, 4.62928*10^-5, 2.68796*10^-5, -1.42806*10^-5, -3.50232*10^-6, 7.56753*10^-6, 4.54977*10^-6, -4.9856*10^-7, 0));
h(29,1) = fi.fir((1.72514*10^-5, 2.02799*10^-4, 1.8682*10^-4, 1.60664*10^-4, -4.56519*10^-6, 3.3872*10^-4, -1.28234*10^-3, -3.60277*10^-4, -1.9713*10^-4, -7.16211*10^-5, 7.59286*10^-4, -7.38491*10^-3, -1.19741*10^-2, 3.51663*10^-3, 3.92377*10^-3, 5.26516*10^-4, 3.00314*10^-2, 3.97127*10^-2, 2.70782*10^-2, -1.77782*10^-2, -3.70878*10^-2, -3.91555*10^-2, -4.40249*10^-2, -8.97252*10^-3, -5.0746*10^-3, 6.93356*10^-3, 4.16227*10^-2, 3.0071*10^-2, 2.15117*10^-2, 1.71091*10^-2, -5.29178*10^-3, -1.18732*10^-2, -9.87757*10^-3, -2.20865*10^-3, -1.07476*10^-2, -1.07259*10^-2, 4.16279*10^-3, 6.76094*10^-4, -2.13691*10^-3, 2.86477*10^-3, 3.57658*10^-3, -2.46872*10^-3, -9.27232*10^-3, -4.00764*10^-3, 1.66773*10^-3, 1.61128*10^-3, 4.27902*10^-4, -4.86256*10^-3, -4.47439*10^-3, 2.3905*10^-3, 6.67455*10^-3, 3.03536*10^-3, 1.64915*10^-3, 2.73609*10^-3, -2.71304*10^-4, -1.10411*10^-3, -3.4311*10^-4, -2.00575*10^-4, 1.42515*10^-3, 7.5748*10^-4, -6.2549*10^-4, -2.51395*10^-4, -4.0375*10^-4, 2.30371*10^-5, -1.85713*10^-3, -1.7735*10^-3, -4.67836*10^-4, 2.24438*10^-5, 2.44374*10^-3, -3.6717*10^-4, -1.40439*10^-3, -3.85146*10^-4, -2.78346*10^-4, 1.81392*10^-3, 1.83653*10^-3, 1.19337*10^-4, -2.69222*10^-3, -2.05297*10^-3, -5.49832*10^-4, -6.56534*10^-4, -4.99124*10^-4, 1.98928*10^-3, 2.30627*10^-3, 8.69766*10^-4, 4.68453*10^-4, -6.54213*10^-4, -9.48419*10^-4, -1.15308*10^-3, -9.4006*10^-4, 1.11535*10^-4, 1.58769*10^-3, 2.07482*10^-3, 5.33459*10^-4, -1.09815*10^-4, 9.2514*10^-5, -1.38243*10^-3, -1.83849*10^-3, -1.08857*10^-3, -7.13545*10^-4, 7.82302*10^-5, 1.09697*10^-3, 9.86079*10^-4, 7.54206*10^-4, 7.56137*10^-4, -2.0109*10^-5, -4.71166*10^-4, -4.71096*10^-4, 1.7491*10^-5, 1.12602*10^-4, -1.84757*10^-4, 3.20605*10^-5, -2.10856*10^-4, -8.98024*10^-5, 4.41671*10^-5, 8.48396*10^-5, 1.55277*10^-5, 6.40002*10^-5, 6.22259*10^-5, -7.16573*10^-5, -4.57601*10^-6, -7.5315*10^-6, -1.40902*10^-5, -9.16519*10^-6, -3.96373*10^-6, -5.00245*10^-6, -3.87501*10^-6, -4.69133*10^-7, 0));
h(30,1) = fi.fir((-1.05977*10^-5, -5.86263*10^-6, 2.69518*10^-4, -1.26525*10^-4, -4.52774*10^-4, 5.0002*10^-4, 2.41483*10^-4, -4.51158*10^-6, -6.87059*10^-4, 1.09752*10^-3, -1.20929*10^-3, 1.06518*10^-3, -1.35867*10^-2, -2.28244*10^-3, 3.37715*10^-2, 1.36485*10^-2, -1.589*10^-2, -3.46426*10^-2, 4.41343*10^-3, -1.42898*10^-3, 1.76399*10^-2, 3.29432*10^-2, -3.62081*10^-2, -6.68881*10^-3, -9.56696*10^-3, 1.12001*10^-2, 8.05071*10^-3, 6.88129*10^-4, 6.31159*10^-3, -1.46507*10^-2, 1.09057*10^-2, -5.01016*10^-3, -3.74484*10^-3, -1.11508*10^-3, 1.38261*10^-2, 9.22232*10^-4, -1.71481*10^-2, -3.49336*10^-4, -4.60814*10^-4, 5.75083*10^-3, 9.46257*10^-3, 9.05153*10^-4, -2.65807*10^-3, -4.34325*10^-3, 8.74476*10^-4, 9.42166*10^-4, 2.59628*10^-3, 4.75582*10^-3, -2.48036*10^-3, -2.60247*10^-3, -3.90607*10^-3, 7.86462*10^-4, 2.61399*10^-3, 2.73783*10^-3, -5.18858*10^-4, -4.45753*10^-3, -4.27208*10^-3, -2.76925*10^-3, -1.3237*10^-3, -1.34827*10^-3, -3.49078*10^-4, 8.65055*10^-4, -3.97991*10^-4, -2.80854*10^-3, -1.37461*10^-3, 3.96601*10^-3, 6.43215*10^-3, 3.14286*10^-3, -1.77889*10^-3, -9.95502*10^-4, 1.82123*10^-3, 1.4475*10^-3, 3.40608*10^-4, -7.72423*10^-4, 1.89618*10^-4, 8.67725*10^-4, 4.77414*10^-4, -3.48148*10^-5, 1.28504*10^-3, 1.66311*10^-3, -7.54096*10^-5, -1.73577*10^-4, -4.56731*10^-4, -1.94944*10^-3, -1.84168*10^-3, -4.10563*10^-4, 4.80377*10^-4, 3.29585*10^-4, 1.96801*10^-4, -5.9544*10^-4, -1.58268*10^-3, -8.97449*10^-4, 5.22556*10^-4, 5.07778*10^-4, 9.75903*10^-4, 1.27258*10^-3, -4.88943*10^-4, -1.04705*10^-3, -6.10951*10^-4, -2.51397*10^-4, -1.7389*10^-4, 1.79626*10^-4, 3.07713*10^-4, -2.64718*10^-6, 1.21443*10^-5, -3.27868*10^-5, 9.54264*10^-5, -6.01777*10^-5, -2.66374*10^-4, -4.29445*10^-6, 1.45441*10^-4, 3.37082*10^-4, -1.30989*10^-5, -1.75064*10^-4, 1.04909*10^-5, 1.10349*10^-4, 7.62055*10^-5, -1.22155*10^-5, -6.81875*10^-6, 3.71672*10^-5, 4.54373*10^-5, 2.86475*10^-6, -1.06744*10^-5, -1.45709*10^-5, -3.72582*10^-7, 1.88015*10^-6, -1.63011*10^-7, 0));
h(31,1) = fi.fir((3.63197*10^-6, -4.17893*10^-5, 2.45768*10^-5, -1.34394*10^-4, 1.50699*10^-4, -8.45052*10^-5, -2.68248*10^-4, -2.68464*10^-4, 6.01937*10^-4, 6.75301*10^-4, -8.7964*10^-4, -4.40041*10^-4, 1.13343*10^-3, 4.75425*10^-4, -4.00795*10^-3, -6.47921*10^-4, 5.94561*10^-3, 1.26277*10^-2, 2.50689*10^-3, -4.30838*10^-2, -7.39102*10^-4, 3.85717*10^-2, -4.28972*10^-3, -4.64304*10^-3, -1.6027*10^-2, 1.70557*10^-2, 1.26768*10^-2, -1.12476*10^-2, -3.82452*10^-3, -1.07588*10^-2, 1.15049*10^-2, -6.29321*10^-3, -4.74255*10^-3, 5.58298*10^-3, 6.44089*10^-3, 1.04873*10^-4, -6.63592*10^-3, 7.18382*10^-3, -1.00255*10^-3, -5.59198*10^-3, -9.87406*10^-4, -3.41198*10^-3, -6.22494*10^-4, -9.36523*10^-4, 1.15447*10^-3, 9.73388*10^-4, 1.62607*10^-3, 2.03041*10^-3, -1.79843*10^-3, 1.97711*10^-3, 1.25431*10^-3, 1.92313*10^-3, 2.94417*10^-3, 5.09311*10^-3, 3.40691*10^-3, -2.40451*10^-3, -1.35731*10^-3, 3.72132*10^-4, -1.52802*10^-3, -3.56673*10^-3, -3.94725*10^-3, -2.08793*10^-3, -9.67496*10^-4, 7.06466*10^-4, 2.09277*10^-4, -9.2161*10^-4, 2.89724*10^-3, 3.8661*10^-3, 6.22213*10^-4, -8.51723*10^-4, 1.52091*10^-3, 2.18308*10^-5, -1.30001*10^-3, -1.3667*10^-3, -3.36625*10^-3, -2.26563*10^-3, -9.35397*10^-4, 1.24657*10^-3, 1.29894*10^-3, 6.93492*10^-4, 1.36393*10^-3, 4.27555*10^-4, -5.36187*10^-4, -2.65679*10^-3, -2.42276*10^-3, -7.04107*10^-4, 5.54658*10^-4, 5.9552*10^-4, -1.18464*10^-3, -4.89254*10^-4, 1.09719*10^-3, 2.20104*10^-3, 1.98143*10^-3, 7.49778*10^-4, 3.33683*10^-4, -3.61494*10^-4, 7.21114*10^-4, 1.34956*10^-3, 5.9681*10^-4, 6.10358*10^-4, 7.25472*10^-4, 3.90337*10^-4, -1.48989*10^-4, -4.89266*10^-4, -3.09042*10^-4, -2.36409*10^-4, -1.32294*10^-4, -4.35343*10^-5, -2.01118*10^-4, -2.4303*10^-4, -2.94806*10^-4, -4.64657*10^-4, -2.47144*10^-4, -1.45969*10^-5, -7.18141*10^-5, -1.23111*10^-4, -1.74271*10^-4, -6.39473*10^-5, 3.00874*10^-5, -7.7359*10^-5, -7.41747*10^-5, 2.71876*10^-5, 6.36235*10^-5, 3.12801*10^-5, -4.71864*10^-7, -3.30959*10^-6, 1.23727*10^-7, 0));
h(32,1) = fi.fir((-1.5164*10^-5, 1.02701*10^-5, 1.41547*10^-4, -7.76787*10^-5, -9.04689*10^-4, 4.66854*10^-4, 3.55339*10^-4, -1.87639*10^-4, -1.11055*10^-3, 8.663*10^-4, -8.22522*10^-4, 9.9208*10^-4, -1.70128*10^-2, -1.57207*10^-3, 3.93297*10^-2, 1.49163*10^-2, -2.79797*10^-2, -3.55512*10^-2, 6.42963*10^-3, 3.52265*10^-2, 1.30171*10^-2, 6.14379*10^-3, -2.02561*10^-2, -5.19214*10^-2, 1.02132*10^-2, 2.45356*10^-2, 2.06716*10^-2, -1.51029*10^-3, -2.2164*10^-2, -9.11925*10^-3, -8.62691*10^-3, 2.35389*10^-2, 1.1447*10^-2, -1.31559*10^-3, -1.03384*10^-2, -1.48828*10^-3, 3.21049*10^-3, -2.7003*10^-3, 9.47477*10^-3, 1.01988*10^-3, -5.15505*10^-3, -4.1224*10^-3, -6.57104*10^-3, 2.78443*10^-3, 6.73849*10^-3, 3.25351*10^-3, -4.39663*10^-3, -5.66711*10^-3, 1.41698*10^-3, -1.67894*10^-3, 2.45316*10^-3, 4.59245*10^-3, 2.2929*10^-3, -3.16872*10^-3, -4.27748*10^-3, 2.75949*10^-4, 3.22519*10^-3, 3.55722*10^-3, 2.48167*10^-3, -1.11709*10^-3, -3.5176*10^-3, -3.13317*10^-3, -1.723*10^-3, -8.63605*10^-4, 8.44115*10^-4, 1.26202*10^-3, 4.58586*10^-6, 1.27345*10^-4, -6.5914*10^-4, -1.7622*10^-4, 7.88594*10^-4, 2.76781*10^-3, 2.43735*10^-3, -2.16451*10^-3, -1.70087*10^-3, 1.00277*10^-3, 7.9166*10^-4, 1.67515*10^-3, 2.15798*10^-4, -9.9123*10^-4, -1.56334*10^-3, -1.68341*10^-3, 3.25692*10^-4, 9.56928*10^-4, 2.0754*10^-5, -1.90896*10^-3, -2.64317*10^-3, 1.83213*10^-4, 8.50208*10^-4, -5.55223*10^-4, -9.65448*10^-4, -8.72375*10^-4, -1.45471*10^-3, -2.25587*10^-3, -1.03743*10^-3, 1.09749*10^-3, 1.38833*10^-3, 3.86128*10^-4, 3.49077*10^-4, 1.40134*10^-4, 3.74136*10^-4, -2.56234*10^-5, -2.37476*10^-4, 3.39702*10^-4, 5.52412*10^-4, 2.23003*10^-4, -2.40769*10^-4, -1.23724*10^-4, 4.94989*10^-4, 2.98805*10^-4, -1.87967*10^-4, -1.46232*10^-4, 1.73897*10^-5, -3.34046*10^-5, 5.13725*10^-5, 2.16907*10^-4, 1.12568*10^-4, -7.63593*10^-5, -6.98524*10^-5, -8.69074*10^-5, -2.7445*10^-5, 3.56627*10^-5, 7.37787*10^-6, 3.66075*10^-7, 2.76592*10^-6, 3.84136*10^-6, -6.72085*10^-7, 0));
h(33,1) = fi.fir((1.01375*10^-5, -2.49811*10^-5, 4.65485*10^-5, -2.29372*10^-4, -6.88701*10^-5, -3.90714*10^-4, -1.07298*10^-4, -3.65628*10^-4, 8.87982*10^-4, 6.98917*10^-4, -8.64595*10^-4, -5.15935*10^-4, -3.04341*10^-4, 1.81913*10^-3, -4.17119*10^-3, 5.48634*10^-3, 1.9924*10^-3, 1.36526*10^-2, -1.02873*10^-3, -4.68348*10^-2, 1.59373*10^-3, 3.60815*10^-2, -9.42342*10^-3, -2.29176*10^-2, 3.09503*10^-3, 3.77746*10^-2, 2.88282*10^-2, -3.17335*10^-2, -1.62549*10^-2, 2.04141*10^-4, -1.84381*10^-2, 4.27428*10^-3, 8.99894*10^-3, 6.85897*10^-3, 6.04322*10^-3, -3.95258*10^-3, 3.91352*10^-3, 3.16628*10^-3, 1.33088*10^-3, 3.90822*10^-4, -3.48179*10^-3, -2.61772*10^-3, -5.58366*10^-3, -4.76877*10^-3, 1.58516*10^-3, 6.54236*10^-3, 1.89017*10^-3, -3.3063*10^-3, -8.1561*10^-5, -1.03839*10^-4, 5.74132*10^-4, 2.0712*10^-3, 1.21332*10^-3, 1.80529*10^-3, -2.31329*10^-3, -3.80022*10^-3, -1.45005*10^-3, 2.37035*10^-3, 3.67069*10^-3, 3.02275*10^-4, -4.9128*10^-3, -5.15866*10^-3, -1.35669*10^-3, 9.76814*10^-5, 5.91784*10^-4, 8.61779*10^-4, 1.43107*10^-3, 2.88222*10^-4, -1.00629*10^-3, 1.60129*10^-3, 2.04694*10^-3, 5.91966*10^-4, 7.35529*10^-4, 1.78321*10^-4, 4.39099*10^-4, -9.54427*10^-4, 4.36226*10^-4, 2.77631*10^-3, 3.0928*10^-3, 2.62714*10^-3, -1.35578*10^-3, -1.08538*10^-3, 4.79579*10^-4, -1.78226*10^-3, -3.17387*10^-3, -1.79845*10^-3, 1.05056*10^-3, -2.99232*10^-5, -1.03551*10^-3, -5.69112*10^-4, 6.01508*10^-4, 1.58322*10^-3, -8.23208*10^-4, -1.99189*10^-3, -2.4809*10^-4, 5.06377*10^-4, -8.9911*10^-4, -4.05136*10^-4, 6.31182*10^-4, 2.25169*10^-4, -3.08355*10^-4, -3.50962*10^-4, 5.02959*10^-4, 1.08012*10^-4, -6.87927*10^-4, -5.45958*10^-4, 3.48008*10^-4, 7.64329*10^-4, -1.32916*10^-5, -4.51546*10^-4, 1.87338*10^-4, 6.212*10^-4, 2.56356*10^-4, 2.39158*10^-5, -2.30096*10^-5, 8.15938*10^-6, -2.47797*10^-5, -1.31011*10^-5, 8.27008*10^-5, 4.74732*10^-5, -2.03243*10^-6, 8.23851*10^-7, 9.54223*10^-6, 6.97606*10^-6, 3.78575*10^-6, -1.43513*10^-6, -7.8919*10^-7, 0));
h(34,1) = fi.fir((-4.23075*10^-6, -4.21605*10^-5, -5.52922*10^-5, -1.59978*10^-4, 2.93752*10^-4, -2.06297*10^-4, -9.32457*10^-4, 5.97987*10^-4, 7.46486*10^-4, -7.91399*10^-4, -1.50718*10^-3, 1.53082*10^-3, -6.45897*10^-3, -4.12302*10^-4, -4.28109*10^-3, 3.11497*10^-3, 4.2757*10^-2, 2.62717*10^-3, -3.41347*10^-2, -3.25426*10^-2, 2.15351*10^-2, 2.80744*10^-2, -3.69366*10^-2, 1.38136*10^-2, 1.36663*10^-2, -1.98677*10^-2, 1.33925*10^-2, -1.66183*10^-3, -1.22118*10^-2, 2.64607*10^-3, 3.0944*10^-3, 8.2787*10^-3, 6.12769*10^-3, -1.72205*10^-3, -2.41709*10^-2, -3.63107*10^-3, 1.89019*10^-2, 5.92862*10^-3, -4.12913*10^-3, -7.29143*10^-3, -1.32075*10^-3, -2.22156*10^-3, 7.58612*10^-3, 5.85264*10^-3, -2.90549*10^-3, -2.43273*10^-3, -1.26632*10^-3, -2.39696*10^-4, 2.34591*10^-3, 3.9225*10^-3, 1.88155*10^-3, -2.30692*10^-3, -1.60383*10^-3, -3.26795*10^-3, -3.05104*10^-3, 7.90294*10^-4, 2.08479*10^-3, -4.36044*10^-4, -1.79432*10^-3, 8.07006*10^-4, 1.60437*10^-4, -3.77872*10^-4, 2.68202*10^-3, 2.18859*10^-3, -5.50278*10^-4, -2.15952*10^-3, -2.47974*10^-3, -1.38293*10^-3, 1.16165*10^-3, 3.82518*10^-3, 1.23554*10^-3, -9.52937*10^-4, -1.41146*10^-3, -5.3795*10^-4, 2.01899*10^-4, -2.3482*10^-4, 5.14625*10^-6, -7.19536*10^-4, 8.17245*10^-6, 1.51931*10^-3, 2.97595*10^-4, -1.98034*10^-4, 1.56951*10^-3, -2.80705*10^-4, -2.20105*10^-3, -1.3306*10^-3, -1.12762*10^-3, -1.25525*10^-3, -1.4361*10^-4, 1.2728*10^-3, 2.60613*10^-4, -1.18816*10^-3, -4.00668*10^-4, -3.24235*10^-4, -1.54521*10^-3, -6.33094*10^-4, 2.84425*10^-4, -3.19442*10^-4, -3.78649*10^-4, 2.76423*10^-4, 7.36034*10^-5, -6.94307*10^-5, 2.18866*10^-4, 3.09816*10^-4, 4.41506*10^-4, 2.11596*10^-4, 1.0837*10^-4, -1.01793*10^-4, 6.99201*10^-5, 4.77425*10^-4, -8.02488*10^-5, -1.08287*10^-4, 2.02515*10^-4, 1.81432*10^-4, -1.31045*10^-5, 1.57635*10^-5, 9.60958*10^-6, 3.04029*10^-5, 2.47107*10^-5, -7.85942*10^-6, -6.0562*10^-6, -1.85995*10^-5, -2.64133*10^-7, -1.0509*10^-5, -1.72572*10^-7, 5.22982*10^-7, -3.53876*10^-7, 0));
h(35,1) = fi.fir((1.12765*10^-5, -3.65911*10^-5, 1.06173*10^-4, -5.33286*10^-4, -1.69883*10^-4, -5.69943*10^-4, 1.61338*10^-3, -4.73348*10^-4, -1.36568*10^-5, -9.0807*10^-4, 2.09803*10^-3, -9.92748*10^-4, -9.21977*10^-3, 2.71609*10^-3, 1.64873*10^-2, 2.93523*10^-2, -2.32394*10^-2, -4.09862*10^-2, 7.27637*10^-3, 8.22568*10^-3, -9.44457*10^-3, -2.5463*10^-2, 9.93941*10^-3, 6.29214*10^-2, 1.14492*10^-2, -7.04191*10^-3, 2.81423*10^-3, -2.21118*10^-2, -1.21284*10^-2, -6.07418*10^-3, 4.15989*10^-3, -2.93199*10^-3, -9.59867*10^-3, -8.7117*10^-3, 2.89994*10^-3, 9.09699*10^-3, 3.25678*10^-3, -1.67883*10^-3, -1.11825*10^-3, 5.42193*10^-3, 6.68591*10^-4, -5.09335*10^-3, 2.98655*10^-3, 6.97034*10^-3, 7.70276*10^-4, -1.12635*10^-3, 6.42569*10^-4, 3.29707*10^-3, -1.49884*10^-4, -2.18477*10^-3, -8.68943*10^-5, 2.22795*10^-3, -2.68978*10^-3, -5.62012*10^-3, -5.35669*10^-3, 1.85839*10^-3, 5.87075*10^-3, 2.29604*10^-3, -8.41582*10^-4, -1.51538*10^-3, 1.84832*10^-3, 1.27824*10^-3, -9.7666*10^-4, -1.15073*10^-3, -4.60191*10^-4, -2.181*10^-4, -3.53714*10^-4, -4.96173*10^-4, -2.88855*10^-4, 7.91697*10^-4, 4.2063*10^-4, -6.69976*10^-4, 1.29987*10^-3, -1.32234*10^-3, -1.28346*10^-3, 1.37812*10^-3, 1.4116*10^-3, 2.86537*10^-4, -2.00664*10^-3, -1.3521*10^-3, 3.42351*10^-4, 2.97016*10^-4, -3.18298*10^-5, -3.24878*10^-4, 6.07156*10^-4, 1.39777*10^-3, -7.19942*10^-4, -1.347*10^-3, 4.89703*10^-4, 7.94729*10^-4, -3.85158*10^-4, -1.37693*10^-3, -1.0998*10^-4, 4.59358*10^-4, -3.56807*10^-4, 4.57207*10^-4, 6.47257*10^-4, 2.83578*10^-4, 3.40922*10^-4, 3.48375*10^-4, 6.2797*10^-4, 4.59552*10^-4, 7.54328*10^-5, 3.15497*10^-4, 3.18047*10^-4, -6.81554*10^-5, -1.63798*10^-4, 1.16481*10^-4, 2.4529*10^-4, 1.23295*10^-4, -1.30172*10^-4, -1.87145*10^-4, 1.02567*10^-4, 1.60079*10^-4, -7.18506*10^-5, -1.47306*10^-4, -1.31546*10^-4, -6.18916*10^-5, -3.97443*10^-5, -6.46746*10^-5, -3.96236*10^-5, -1.86122*10^-5, -1.09357*10^-5, -1.29722*10^-5, -1.88962*10^-6, 5.36799*10^-7, 4.90107*10^-7, 0));
|
3a56d586868ec9e084086a06646116008b802d0ca14056c3b37c49d4e8a0925a
|
simonvanderveldt/guitarix
|
lowpass_down.dsp
|
import("stdfaust.lib");
import("reduce.lib");
import("guitarix.lib");
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[unit:dB]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096) ; // : max(ba.db2linear(-70)) : ba.linear2db;
process = fi.lowpass(1,5631): fi.highpass(1,80): vmeter1 ;
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/LV2/faust/lowpass_down.dsp
|
faust
|
: max(ba.db2linear(-70)) : ba.linear2db;
|
import("stdfaust.lib");
import("reduce.lib");
import("guitarix.lib");
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[unit:dB]", -70, +5));
process = fi.lowpass(1,5631): fi.highpass(1,80): vmeter1 ;
|
96dc3b31b4b5474dfe58a5350e564ef0cf297233cc0133ce7c946baee8bf46ba
|
simonvanderveldt/guitarix
|
drumseq.dsp
|
declare id "seq";
declare name "DrumSequencer";
declare category "Misc";
declare shortname "Drum";
declare description "Simple Drum Step Sequencer";
//https://github.com/josmithiii/faust-jos/tree/master/percussion
import("stdfaust.lib");
hat = (vgroup("hat_closed.dsp",component("hat_closed.dsp"))); // hat_closed.dsp
kick = (vgroup("kick.dsp",component("kick.dsp"))); // kick.dsp
snare = (vgroup("snare.dsp",component("snare.dsp"))); // snare.dsp
tom = (vgroup("tom.dsp",component("tom.dsp"))); // tom.dsp
gain = vslider("gain [tooltip: Volume level in decibels]",-20,-60,40,0.1) : si.smooth(0.999) : ba.db2linear;
process(x) = hat+kick+snare+tom : *(gain) : +(x) : _;
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/faust/drumseq.dsp
|
faust
|
https://github.com/josmithiii/faust-jos/tree/master/percussion
hat_closed.dsp
kick.dsp
snare.dsp
tom.dsp
|
declare id "seq";
declare name "DrumSequencer";
declare category "Misc";
declare shortname "Drum";
declare description "Simple Drum Step Sequencer";
import("stdfaust.lib");
gain = vslider("gain [tooltip: Volume level in decibels]",-20,-60,40,0.1) : si.smooth(0.999) : ba.db2linear;
process(x) = hat+kick+snare+tom : *(gain) : +(x) : _;
|
c084c87514994258906061c7fa05b684e476ceb60081af7fb04a0a4e51170e97
|
simonvanderveldt/guitarix
|
bmfp.dsp
|
declare id "bmpf";
declare name "BigMuffFuzzPadel";
declare shortname "FuzzPadel";
declare category "Distortion";
declare description "BigMuffFuzzPadel";
import("guitarix.lib");
import("stdfaust.lib");
import("reduce.lib");
bigmuff = _<: filter1,filter2:>_ with {
tone = vslider("tone",0.5,0,1,0.01);
filter1 = fi.highpass( 1, 1856):*(tone);
filter2 = fi.lowpass( 1, 408 ) :*(1-tone);
};
process = _<:*(dry),(*(wet):*(gain):bigmuff:fuzz:fuzzy:fiz):>downfilter with {
//fuzz(x) = x-0.15*x^2-0.15*x^3;
//fuzz(x) = 1.5*x-0.5*x^3;
fuzz(x) = (1+drive/101)*x/(1+drive/101*abs(x));
drive = vslider("drive", 1, -3, 100, 1);
fuzzy = fuzzy_tube(2,1,0.5,drive);
fiz(x) = x+(x^7);
downfilter = fi.lowpass(1,5631): fi.highpass(1,80);
gain = vslider("Input",0,-24,20,0.1) : ba.db2linear : smoothi(0.999);
wet = vslider("Output", 100, 50, 100, 1) : /(100);
dry = 1 - wet;
};
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/LV2/faust/bmfp.dsp
|
faust
|
fuzz(x) = x-0.15*x^2-0.15*x^3;
fuzz(x) = 1.5*x-0.5*x^3;
|
declare id "bmpf";
declare name "BigMuffFuzzPadel";
declare shortname "FuzzPadel";
declare category "Distortion";
declare description "BigMuffFuzzPadel";
import("guitarix.lib");
import("stdfaust.lib");
import("reduce.lib");
bigmuff = _<: filter1,filter2:>_ with {
tone = vslider("tone",0.5,0,1,0.01);
filter1 = fi.highpass( 1, 1856):*(tone);
filter2 = fi.lowpass( 1, 408 ) :*(1-tone);
};
process = _<:*(dry),(*(wet):*(gain):bigmuff:fuzz:fuzzy:fiz):>downfilter with {
fuzz(x) = (1+drive/101)*x/(1+drive/101*abs(x));
drive = vslider("drive", 1, -3, 100, 1);
fuzzy = fuzzy_tube(2,1,0.5,drive);
fiz(x) = x+(x^7);
downfilter = fi.lowpass(1,5631): fi.highpass(1,80);
gain = vslider("Input",0,-24,20,0.1) : ba.db2linear : smoothi(0.999);
wet = vslider("Output", 100, 50, 100, 1) : /(100);
dry = 1 - wet;
};
|
0136b86d8ba78bc657fed6e8a0f9725e6173399a5ddbfafa5fd083d17a50e6e7
|
simonvanderveldt/guitarix
|
dattorros_progenitor.dsp
|
declare id "dattorros_progenitor";
declare name "Plate Reverb";
declare category "Reverb";
//------------------------------------
//Based at:
//Effect Design Part 1: Reverberator and Other Filters
//JON DATTORRO, AES Member
//CCRMA, Stanford University, Stanford, CA, USA
//------------------------------------
import("stdfaust.lib");
import("guitarix.lib");
//Controls
max_predelay_ms = 200;
predelay = hslider("predelay ms[name:Predelay]", 0, 0, max_predelay_ms, 10);
excursion = hslider("excursion[name:Excursion]", 0, 0, 16, 0.5);
decay = hslider("decay[name:Decay]", 0.1, 0, 0.5, 0.01);
decay_diffusion1 = hslider("decay diff 1[name:Decay 1]", 0.1, 0, 0.7, 0.01);
decay_diffusion2 = hslider("decay diff 2[name:Decay 2]", 0.1, 0, 0.5, 0.01);
input_diffusion1 = hslider("input diff 1[name:Input 1]", 0.1, 0, 0.75, 0.01);
input_diffusion2 = hslider("input diff 2[name:Input 2]", 0.1, 0, 0.625, 0.01);
bandwidth = hslider("bandwidth[name:Bandwidth]", 0.9, 0.1, 0.95, 0.0005);
damping = hslider("damping[name:HF Damp]", 0.0005, 0.1, 0.95, 0.0005);
dry_wet = hslider("dry/wet[name:Dry/Wet]", 0.5, 0, 1, 0.05);
//Will be moved to .lib
X = (_,_)<:(!,_,_,!);
mixer(c,x0,y0,x1,y1) = sel(c,x0,y0), sel(c,x1,y1)
with {
sel(c,x,y) = (1-c)*x + c*y;
};
//Consts
orig_sr = 29761.0; //Original sample rate, described in paper
//Correct de.delay lines according sample rate
get_length(x) = x/orig_sr:_*ma.SR:int;
get_predelay_length(x) = x*ma.SR:_*0.001;
input_chain(predelay, bw, input_diffusion1, input_diffusion2) =
(_+_)*0.5: de.sdelay(int(2^18), 100*ma.SR/1000.0, get_predelay_length(predelay)):opf(bw):
allpass_filter(get_length(142),input_diffusion1):allpass_filter(get_length(107),input_diffusion1):
allpass_filter(get_length(379),input_diffusion2):allpass_filter(get_length(277),input_diffusion2);
left_branch(excursion,decay_diffusion1,damping,decay,decay_diffusion2) =
_*0.5+_*0.3:allpass_with_fdelay(get_length(656),decay_diffusion1,17,0.5*(os.osc(1)+1)*excursion)<:@(get_length(4453)),_:
opf(damping),_:_*decay,_:allpass_filter(get_length(1800),decay_diffusion2),_:@(get_length(3720)),_:_*decay,_;
right_branch(excursion,decay_diffusion1,damping,decay,decay_diffusion2) =
_*0.5+_*0.3:allpass_with_fdelay(get_length(892),decay_diffusion1,17,0.5*(os.osc(1)+1)*excursion)<:@(get_length(4217)),_:
opf(damping),_:_*decay,_:allpass_filter(get_length(2656),decay_diffusion2),_:@(get_length(3163)),_:_*decay,_;
process = _,_<:
(_,(input_chain(predelay,1 - bandwidth, input_diffusion1,input_diffusion2)<:_,_),_):>
(_,(_,X,_:(left_branch(excursion,decay_diffusion1,damping,decay,decay_diffusion2),
right_branch(excursion,decay_diffusion1,damping,decay,decay_diffusion2)):_,X,_)~X),_:_,_,X,_,_:
_,(_,_:>_),(_,_:>_),_:X,_,_:mixer(1 - dry_wet);
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/faust/dattorros_progenitor.dsp
|
faust
|
------------------------------------
Based at:
Effect Design Part 1: Reverberator and Other Filters
JON DATTORRO, AES Member
CCRMA, Stanford University, Stanford, CA, USA
------------------------------------
Controls
Will be moved to .lib
Consts
Original sample rate, described in paper
Correct de.delay lines according sample rate
|
declare id "dattorros_progenitor";
declare name "Plate Reverb";
declare category "Reverb";
import("stdfaust.lib");
import("guitarix.lib");
max_predelay_ms = 200;
predelay = hslider("predelay ms[name:Predelay]", 0, 0, max_predelay_ms, 10);
excursion = hslider("excursion[name:Excursion]", 0, 0, 16, 0.5);
decay = hslider("decay[name:Decay]", 0.1, 0, 0.5, 0.01);
decay_diffusion1 = hslider("decay diff 1[name:Decay 1]", 0.1, 0, 0.7, 0.01);
decay_diffusion2 = hslider("decay diff 2[name:Decay 2]", 0.1, 0, 0.5, 0.01);
input_diffusion1 = hslider("input diff 1[name:Input 1]", 0.1, 0, 0.75, 0.01);
input_diffusion2 = hslider("input diff 2[name:Input 2]", 0.1, 0, 0.625, 0.01);
bandwidth = hslider("bandwidth[name:Bandwidth]", 0.9, 0.1, 0.95, 0.0005);
damping = hslider("damping[name:HF Damp]", 0.0005, 0.1, 0.95, 0.0005);
dry_wet = hslider("dry/wet[name:Dry/Wet]", 0.5, 0, 1, 0.05);
X = (_,_)<:(!,_,_,!);
mixer(c,x0,y0,x1,y1) = sel(c,x0,y0), sel(c,x1,y1)
with {
sel(c,x,y) = (1-c)*x + c*y;
};
get_length(x) = x/orig_sr:_*ma.SR:int;
get_predelay_length(x) = x*ma.SR:_*0.001;
input_chain(predelay, bw, input_diffusion1, input_diffusion2) =
(_+_)*0.5: de.sdelay(int(2^18), 100*ma.SR/1000.0, get_predelay_length(predelay)):opf(bw):
allpass_filter(get_length(142),input_diffusion1):allpass_filter(get_length(107),input_diffusion1):
allpass_filter(get_length(379),input_diffusion2):allpass_filter(get_length(277),input_diffusion2);
left_branch(excursion,decay_diffusion1,damping,decay,decay_diffusion2) =
_*0.5+_*0.3:allpass_with_fdelay(get_length(656),decay_diffusion1,17,0.5*(os.osc(1)+1)*excursion)<:@(get_length(4453)),_:
opf(damping),_:_*decay,_:allpass_filter(get_length(1800),decay_diffusion2),_:@(get_length(3720)),_:_*decay,_;
right_branch(excursion,decay_diffusion1,damping,decay,decay_diffusion2) =
_*0.5+_*0.3:allpass_with_fdelay(get_length(892),decay_diffusion1,17,0.5*(os.osc(1)+1)*excursion)<:@(get_length(4217)),_:
opf(damping),_:_*decay,_:allpass_filter(get_length(2656),decay_diffusion2),_:@(get_length(3163)),_:_*decay,_;
process = _,_<:
(_,(input_chain(predelay,1 - bandwidth, input_diffusion1,input_diffusion2)<:_,_),_):>
(_,(_,X,_:(left_branch(excursion,decay_diffusion1,damping,decay,decay_diffusion2),
right_branch(excursion,decay_diffusion1,damping,decay,decay_diffusion2)):_,X,_)~X),_:_,_,X,_,_:
_,(_,_:>_),(_,_:>_),_:X,_,_:mixer(1 - dry_wet);
|
3a6357a8c6246446371cb120e6faae870737a5cadb55d50fd9d98b1d1030da66
|
simonvanderveldt/guitarix
|
mbdel.dsp
|
declare id "mbdel";
declare name "MultiBand Delay";
declare shortname "MB Delay";
declare category "Echo / Delay";
declare description "Multi Band Delay";
import("stdfaust.lib");
import("reduce.lib");
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
interp = 100*ma.SR/1000.0;
N = int( 2^18);
g1 = vslider("gain1", -10, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d1 = ba.tempo(hslider("delay1[tooltip:Delay in Beats per Minute]",30,24,360,1));
g2 = vslider("gain2", -5, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d2 = ba.tempo(hslider("delay2[tooltip:Delay in Beats per Minute]",60,24,360,1));
g3 = vslider("gain3", -2, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d3 = ba.tempo(hslider("delay3[tooltip:Delay in Beats per Minute]",90,24,360,1));
g4 = vslider("gain4", 0, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d4 = ba.tempo(hslider("delay4[tooltip:Delay in Beats per Minute]",120,24,360,1));
g5 = vslider("gain5", -10, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d5 = ba.tempo(hslider("delay5[tooltip:Delay in Beats per Minute]",150,24,360,1));
del(g,d) = *(g) : de.sdelay(N, interp,d) ;
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096) ; // : max(ba.db2linear(-70)) : ba.linear2db;
process = _<:(geq: ( dist5s , dist4s , dist3s, dist2s, dist1s)),_:>_ with {
dist1s = del(g1,d1) : vmeter1;
dist2s = del(g2,d2) : vmeter2;
dist3s = del(g3,d3) : vmeter3;
dist4s = del(g4,d4) : vmeter4;
dist5s = del(g5,d5) : vmeter5;
};
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/plugins/mbdel.dsp
|
faust
|
: max(ba.db2linear(-70)) : ba.linear2db;
|
declare id "mbdel";
declare name "MultiBand Delay";
declare shortname "MB Delay";
declare category "Echo / Delay";
declare description "Multi Band Delay";
import("stdfaust.lib");
import("reduce.lib");
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
interp = 100*ma.SR/1000.0;
N = int( 2^18);
g1 = vslider("gain1", -10, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d1 = ba.tempo(hslider("delay1[tooltip:Delay in Beats per Minute]",30,24,360,1));
g2 = vslider("gain2", -5, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d2 = ba.tempo(hslider("delay2[tooltip:Delay in Beats per Minute]",60,24,360,1));
g3 = vslider("gain3", -2, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d3 = ba.tempo(hslider("delay3[tooltip:Delay in Beats per Minute]",90,24,360,1));
g4 = vslider("gain4", 0, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d4 = ba.tempo(hslider("delay4[tooltip:Delay in Beats per Minute]",120,24,360,1));
g5 = vslider("gain5", -10, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d5 = ba.tempo(hslider("delay5[tooltip:Delay in Beats per Minute]",150,24,360,1));
del(g,d) = *(g) : de.sdelay(N, interp,d) ;
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
process = _<:(geq: ( dist5s , dist4s , dist3s, dist2s, dist1s)),_:>_ with {
dist1s = del(g1,d1) : vmeter1;
dist2s = del(g2,d2) : vmeter2;
dist3s = del(g3,d3) : vmeter3;
dist4s = del(g4,d4) : vmeter4;
dist5s = del(g5,d5) : vmeter5;
};
|
6a7b048c99f33412486c452f35c3e2b5f9fcfdb5a2347803b0b355e210ab7c87
|
simonvanderveldt/guitarix
|
graphiceq.dsp
|
declare id "graphiceq";
declare name "Graphic EQ";
declare category "Tone Control";
declare description "Graphic EQ";
import("stdfaust.lib");
import("reduce.lib");
//geq = fi.filterbank(3, (31.25, 62.5, 125., 250., 500., 1000., 2000., 4000., 8000., 16000.));
geq = fi.filterbank(3, (44., 88., 177., 354., 707., 1414., 2828., 5657., 11384., 18110.));
g1 = vslider("g1[tooltip:gain (dB) below 31.25 Hz]", 0, -60, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g2 = vslider("g2 [tooltip:gain (dB) at 62.5 Hz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g3 = vslider("g3 [tooltip:gain (dB) at 125 Hz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g4 = vslider("g4 [tooltip:gain (dB) at 250 Hz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g5 = vslider("g5 [tooltip:gain (dB) at 500 Hz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g6 = vslider("g6 [tooltip:gain (dB) at 1 kHz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g7 = vslider("g7 [tooltip:gain (dB) at 2 kHz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g8 = vslider("g8 [tooltip:gain (dB) at 4 kHz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g9 = vslider("g9 [tooltip:gain (dB) at 8 kHz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g10 = vslider("g10 [tooltip:gain (dB) at 16 kHz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g11 = vslider("g11 [tooltip:gain (dB) above 16 kHz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
v1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
v2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
v3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
v4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
v5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
v6(x) = attach(x, envelop(x) : vbargraph("v6[nomidi:no]", -70, +5));
v7(x) = attach(x, envelop(x) : vbargraph("v7[nomidi:no]", -70, +5));
v8(x) = attach(x, envelop(x) : vbargraph("v8[nomidi:no]", -70, +5));
v9(x) = attach(x, envelop(x) : vbargraph("v9[nomidi:no]", -70, +5));
v10(x) = attach(x, envelop(x) : vbargraph("v10[nomidi:no]", -70, +5));
v11(x) = attach(x, envelop(x) : vbargraph("v11[nomidi:no]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096) ;
process = geq :(*(g11):v11), (*(g10):v10),(*(g9):v9),(*(g8):v8),(*(g7):v7),(*(g6):v6),
(*(g5):v5),(*(g4):v4),(*(g3):v3),(*(g2):v2),(*(g1):v1) :>_;
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/LV2/faust/graphiceq.dsp
|
faust
|
geq = fi.filterbank(3, (31.25, 62.5, 125., 250., 500., 1000., 2000., 4000., 8000., 16000.));
|
declare id "graphiceq";
declare name "Graphic EQ";
declare category "Tone Control";
declare description "Graphic EQ";
import("stdfaust.lib");
import("reduce.lib");
geq = fi.filterbank(3, (44., 88., 177., 354., 707., 1414., 2828., 5657., 11384., 18110.));
g1 = vslider("g1[tooltip:gain (dB) below 31.25 Hz]", 0, -60, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g2 = vslider("g2 [tooltip:gain (dB) at 62.5 Hz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g3 = vslider("g3 [tooltip:gain (dB) at 125 Hz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g4 = vslider("g4 [tooltip:gain (dB) at 250 Hz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g5 = vslider("g5 [tooltip:gain (dB) at 500 Hz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g6 = vslider("g6 [tooltip:gain (dB) at 1 kHz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g7 = vslider("g7 [tooltip:gain (dB) at 2 kHz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g8 = vslider("g8 [tooltip:gain (dB) at 4 kHz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g9 = vslider("g9 [tooltip:gain (dB) at 8 kHz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g10 = vslider("g10 [tooltip:gain (dB) at 16 kHz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
g11 = vslider("g11 [tooltip:gain (dB) above 16 kHz]", 0, -30, 5.2, 0.1) : ba.db2linear : si.smooth(0.999);
v1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
v2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
v3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
v4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
v5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
v6(x) = attach(x, envelop(x) : vbargraph("v6[nomidi:no]", -70, +5));
v7(x) = attach(x, envelop(x) : vbargraph("v7[nomidi:no]", -70, +5));
v8(x) = attach(x, envelop(x) : vbargraph("v8[nomidi:no]", -70, +5));
v9(x) = attach(x, envelop(x) : vbargraph("v9[nomidi:no]", -70, +5));
v10(x) = attach(x, envelop(x) : vbargraph("v10[nomidi:no]", -70, +5));
v11(x) = attach(x, envelop(x) : vbargraph("v11[nomidi:no]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096) ;
process = geq :(*(g11):v11), (*(g10):v10),(*(g9):v9),(*(g8):v8),(*(g7):v7),(*(g6):v6),
(*(g5):v5),(*(g4):v4),(*(g3):v3),(*(g2):v2),(*(g1):v1) :>_;
|
ade77cdaee54cdb6f22eb610cabc707a87157a52ed6ed6659db37703229bb216
|
simonvanderveldt/guitarix
|
mbe.dsp
|
declare id "mbe";
declare name "MultiBand Echo";
declare shortname "MB Echo";
declare category "Echo / Delay";
declare description "Multi Band Echo";
import("stdfaust.lib");
import("reduce.lib");
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
t1 = ba.tempo(hslider("time1[tooltip:Echo in Beats per Minute]",30,24,360,1));
r1 = hslider("percent1", 10, 0, 100, 0.1)/100.0 : si.smooth(0.999);
t2 = ba.tempo(hslider("time2[tooltip:Echo in Beats per Minute]",60,24,360,1));
r2 = hslider("percent2", 30, 0, 100, 0.1)/100.0 : si.smooth(0.999);
t3 = ba.tempo(hslider("time3[tooltip:Echo in Beats per Minute]",120,24,360,1));
r3 = hslider("percent3", 45, 0, 100, 0.1)/100.0 : si.smooth(0.999);
t4 = ba.tempo(hslider("time4[tooltip:Echo in Beats per Minute]",150,24,360,1));
r4 = hslider("percent4", 20, 0, 100, 0.1)/100.0 : si.smooth(0.999);
t5 = ba.tempo(hslider("time5[tooltip:Echo in Beats per Minute]",240,24,360,1));
r5 = hslider("percent5", 0, 0, 100, 0.1)/100.0 : si.smooth(0.999);
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096) ; // : max(ba.db2linear(-70)) : ba.linear2db;
echo1(t,r) = +~(de.sdelay(int(2^18), 100*ma.SR/1000.0, t) * (r));
process = geq: ( dist5s , dist4s , dist3s, dist2s, dist1s) :>_ with {
dist1s = echo1(t1,r1) : vmeter1 ;
dist2s = echo1(t2,r2) : vmeter2;
dist3s = echo1(t3,r3) : vmeter3;
dist4s = echo1(t4,r4) : vmeter4;
dist5s = echo1(t5,r5) : vmeter5;
};
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/LV2/faust/mbe.dsp
|
faust
|
: max(ba.db2linear(-70)) : ba.linear2db;
|
declare id "mbe";
declare name "MultiBand Echo";
declare shortname "MB Echo";
declare category "Echo / Delay";
declare description "Multi Band Echo";
import("stdfaust.lib");
import("reduce.lib");
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
t1 = ba.tempo(hslider("time1[tooltip:Echo in Beats per Minute]",30,24,360,1));
r1 = hslider("percent1", 10, 0, 100, 0.1)/100.0 : si.smooth(0.999);
t2 = ba.tempo(hslider("time2[tooltip:Echo in Beats per Minute]",60,24,360,1));
r2 = hslider("percent2", 30, 0, 100, 0.1)/100.0 : si.smooth(0.999);
t3 = ba.tempo(hslider("time3[tooltip:Echo in Beats per Minute]",120,24,360,1));
r3 = hslider("percent3", 45, 0, 100, 0.1)/100.0 : si.smooth(0.999);
t4 = ba.tempo(hslider("time4[tooltip:Echo in Beats per Minute]",150,24,360,1));
r4 = hslider("percent4", 20, 0, 100, 0.1)/100.0 : si.smooth(0.999);
t5 = ba.tempo(hslider("time5[tooltip:Echo in Beats per Minute]",240,24,360,1));
r5 = hslider("percent5", 0, 0, 100, 0.1)/100.0 : si.smooth(0.999);
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
echo1(t,r) = +~(de.sdelay(int(2^18), 100*ma.SR/1000.0, t) * (r));
process = geq: ( dist5s , dist4s , dist3s, dist2s, dist1s) :>_ with {
dist1s = echo1(t1,r1) : vmeter1 ;
dist2s = echo1(t2,r2) : vmeter2;
dist3s = echo1(t3,r3) : vmeter3;
dist4s = echo1(t4,r4) : vmeter4;
dist5s = echo1(t5,r5) : vmeter5;
};
|
5dd5ad7d9206f4ffce4da234d7149ca5a7ab96c2782bc051f83e91d09e7e2cea
|
simonvanderveldt/guitarix
|
mbd.dsp
|
declare id "mbd";
declare name "MultiBand Distortion";
declare shortname "MB Distortion";
declare category "Distortion";
declare description "MultiBand Distortion";
import("stdfaust.lib");
import("reduce.lib");
anti_denormal = pow(10,-20);
anti_denormal_ac = 1 - 1' : *(anti_denormal) : + ~ *(-1);
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
drive1 = hslider("Drive1 [tooltip: Amount of distortion]", 0, 0, 1, 0.01);
offset1 = hslider("Offset1 [tooltip: Brings in even harmonics]", 0, 0, 0.5, 0.01);
drive2 = hslider("Drive2 [tooltip: Amount of distortion]", 0, 0, 1, 0.01);
offset2 = hslider("Offset2 [tooltip: Brings in even harmonics]", 0, 0, 0.5, 0.01);
drive3 = hslider("Drive3 [tooltip: Amount of distortion]", 0, 0, 1, 0.01);
offset3 = hslider("Offset3 [tooltip: Brings in even harmonics]", 0, 0, 0.5, 0.01);
drive4 = hslider("Drive4 [tooltip: Amount of distortion]", 0, 0, 1, 0.01);
offset4 = hslider("Offset4 [tooltip: Brings in even harmonics]", 0, 0, 0.5, 0.01);
drive5 = hslider("Drive5 [tooltip: Amount of distortion]", 0, 0, 1, 0.01);
offset5 = hslider("Offset5 [tooltip: Brings in even harmonics]", 0, 0, 0.5, 0.01);
gain1 = vslider("Gain", 0, -40, 4, 0.1) : ba.db2linear : si.smooth(0.999);
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096); // : max(ba.db2linear(-70)) : ba.linear2db;
process = _: +(anti_denormal_ac): geq: ( dist5s , dist4s , dist3s, dist2s, dist1s) :> *(gain1) with {
dist1s = ef.cubicnl_nodc(drive1,offset1: si.smooth(0.999)) : vmeter1;
dist2s = ef.cubicnl_nodc(drive2,offset2: si.smooth(0.999)) : vmeter2;
dist3s = ef.cubicnl_nodc(drive3,offset3: si.smooth(0.999)) : vmeter3;
dist4s = ef.cubicnl_nodc(drive4,offset4: si.smooth(0.999)) : vmeter4;
dist5s = ef.cubicnl_nodc(drive5,offset5: si.smooth(0.999)) : vmeter5;
};
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/LV2/faust/mbd.dsp
|
faust
|
: max(ba.db2linear(-70)) : ba.linear2db;
|
declare id "mbd";
declare name "MultiBand Distortion";
declare shortname "MB Distortion";
declare category "Distortion";
declare description "MultiBand Distortion";
import("stdfaust.lib");
import("reduce.lib");
anti_denormal = pow(10,-20);
anti_denormal_ac = 1 - 1' : *(anti_denormal) : + ~ *(-1);
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
drive1 = hslider("Drive1 [tooltip: Amount of distortion]", 0, 0, 1, 0.01);
offset1 = hslider("Offset1 [tooltip: Brings in even harmonics]", 0, 0, 0.5, 0.01);
drive2 = hslider("Drive2 [tooltip: Amount of distortion]", 0, 0, 1, 0.01);
offset2 = hslider("Offset2 [tooltip: Brings in even harmonics]", 0, 0, 0.5, 0.01);
drive3 = hslider("Drive3 [tooltip: Amount of distortion]", 0, 0, 1, 0.01);
offset3 = hslider("Offset3 [tooltip: Brings in even harmonics]", 0, 0, 0.5, 0.01);
drive4 = hslider("Drive4 [tooltip: Amount of distortion]", 0, 0, 1, 0.01);
offset4 = hslider("Offset4 [tooltip: Brings in even harmonics]", 0, 0, 0.5, 0.01);
drive5 = hslider("Drive5 [tooltip: Amount of distortion]", 0, 0, 1, 0.01);
offset5 = hslider("Offset5 [tooltip: Brings in even harmonics]", 0, 0, 0.5, 0.01);
gain1 = vslider("Gain", 0, -40, 4, 0.1) : ba.db2linear : si.smooth(0.999);
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
process = _: +(anti_denormal_ac): geq: ( dist5s , dist4s , dist3s, dist2s, dist1s) :> *(gain1) with {
dist1s = ef.cubicnl_nodc(drive1,offset1: si.smooth(0.999)) : vmeter1;
dist2s = ef.cubicnl_nodc(drive2,offset2: si.smooth(0.999)) : vmeter2;
dist3s = ef.cubicnl_nodc(drive3,offset3: si.smooth(0.999)) : vmeter3;
dist4s = ef.cubicnl_nodc(drive4,offset4: si.smooth(0.999)) : vmeter4;
dist5s = ef.cubicnl_nodc(drive5,offset5: si.smooth(0.999)) : vmeter5;
};
|
211456365b223f0c97c9a276d90e4c054b35b026ebe24b9741c7d54fa9589c39
|
simonvanderveldt/guitarix
|
mbclipper.dsp
|
declare id "mbclip";
declare name "MultiBand Clipper";
declare shortname "MB Clipper";
declare category "Distortion";
declare description "MultiBand Clipper";
import("stdfaust.lib");
import("reduce.lib");
anti_denormal = pow(10,-20);
anti_denormal_ac = 1 - 1' : *(anti_denormal) : + ~ *(-1);
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
drive1 = hslider("Drive1 [tooltip: Amount of distortion]", 0.33, 0, 1, 0.01);
drive2 = hslider("Drive2 [tooltip: Amount of distortion]", 0.5, 0, 1, 0.01);
drive3 = hslider("Drive3 [tooltip: Amount of distortion]", 0.65, 0, 1, 0.01);
drive4 = hslider("Drive4 [tooltip: Amount of distortion]", 0.33, 0, 1, 0.01);
drive5 = hslider("Drive5 [tooltip: Amount of distortion]", 0.1, 0, 1, 0.01);
gain1 = vslider("Gain", 0, -40, 4, 0.1) : ba.db2linear : si.smooth(0.999);
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096); // : max(ba.db2linear(-70)) : ba.linear2db;
clip(drive) = *(pregain) : clip : *(postgain) with {
pregain = pow(10.0,2*drive);
clip = ffunction(float symclip(float), "clipping.h", "");
postgain = max(1.0,1.0/pregain);
};
eclip(drive) = *(pregain) : clip : *(postgain) with {
pregain = pow(10.0,2*drive);
clip(x) = ((exp(x*4)-exp(-x*4*1.2))/(exp(x*4)+exp(-x*4)))/4;
postgain = max(1.0,1.0/(pregain*2.5));
};
cclip(drive) = *(pregain) : clip : *(postgain) with {
pregain = pow(10.0,drive);
clip(x) = ma.tanh((drive+0.0001)*x)/ma.tanh(drive+0.0001);
postgain = max(1.0,1.0/pregain);
};
aclip(drive) = *(pregain) : clip : *(postgain) with {
pregain = pow(10.0,2*drive);
clip(x) = atan(x)/ma.PI;
postgain = max(1.0,1.0/pregain);
};
process = _: +(anti_denormal_ac): geq: ( dist5s , dist4s , dist3s, dist2s, dist1s) :> *(gain1) with {
dist1s = clip(drive1: si.smooth(0.999)) : vmeter1;
dist2s = clip(drive2: si.smooth(0.999)) : vmeter2;
dist3s = clip(drive3: si.smooth(0.999)) : vmeter3;
dist4s = clip(drive4: si.smooth(0.999)) : vmeter4;
dist5s = clip(drive5: si.smooth(0.999)) : vmeter5;
};
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/plugins/mbclipper.dsp
|
faust
|
: max(ba.db2linear(-70)) : ba.linear2db;
|
declare id "mbclip";
declare name "MultiBand Clipper";
declare shortname "MB Clipper";
declare category "Distortion";
declare description "MultiBand Clipper";
import("stdfaust.lib");
import("reduce.lib");
anti_denormal = pow(10,-20);
anti_denormal_ac = 1 - 1' : *(anti_denormal) : + ~ *(-1);
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
drive1 = hslider("Drive1 [tooltip: Amount of distortion]", 0.33, 0, 1, 0.01);
drive2 = hslider("Drive2 [tooltip: Amount of distortion]", 0.5, 0, 1, 0.01);
drive3 = hslider("Drive3 [tooltip: Amount of distortion]", 0.65, 0, 1, 0.01);
drive4 = hslider("Drive4 [tooltip: Amount of distortion]", 0.33, 0, 1, 0.01);
drive5 = hslider("Drive5 [tooltip: Amount of distortion]", 0.1, 0, 1, 0.01);
gain1 = vslider("Gain", 0, -40, 4, 0.1) : ba.db2linear : si.smooth(0.999);
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
clip(drive) = *(pregain) : clip : *(postgain) with {
pregain = pow(10.0,2*drive);
clip = ffunction(float symclip(float), "clipping.h", "");
postgain = max(1.0,1.0/pregain);
};
eclip(drive) = *(pregain) : clip : *(postgain) with {
pregain = pow(10.0,2*drive);
clip(x) = ((exp(x*4)-exp(-x*4*1.2))/(exp(x*4)+exp(-x*4)))/4;
postgain = max(1.0,1.0/(pregain*2.5));
};
cclip(drive) = *(pregain) : clip : *(postgain) with {
pregain = pow(10.0,drive);
clip(x) = ma.tanh((drive+0.0001)*x)/ma.tanh(drive+0.0001);
postgain = max(1.0,1.0/pregain);
};
aclip(drive) = *(pregain) : clip : *(postgain) with {
pregain = pow(10.0,2*drive);
clip(x) = atan(x)/ma.PI;
postgain = max(1.0,1.0/pregain);
};
process = _: +(anti_denormal_ac): geq: ( dist5s , dist4s , dist3s, dist2s, dist1s) :> *(gain1) with {
dist1s = clip(drive1: si.smooth(0.999)) : vmeter1;
dist2s = clip(drive2: si.smooth(0.999)) : vmeter2;
dist3s = clip(drive3: si.smooth(0.999)) : vmeter3;
dist4s = clip(drive4: si.smooth(0.999)) : vmeter4;
dist5s = clip(drive5: si.smooth(0.999)) : vmeter5;
};
|
84a58fbb2a81cfc8b0aba25a347802b6112276716060498740ba70a029c5063a
|
simonvanderveldt/guitarix
|
graphiceq.dsp
|
declare id "graphiceq";
declare name "Graphic EQ";
declare category "Tone Control";
declare description "Graphic EQ";
import("stdfaust.lib");
import("reduce.lib");
//geq = fi.filterbank(3, (31.25, 62.5, 125., 250., 500., 1000., 2000., 4000., 8000., 16000.));
geq = fi.filterbank(3, (44., 88., 177., 354., 707., 1414., 2828., 5657., 11384., 18110.));
g1 = vslider("g1[tooltip:gain (dB) below 31.25 Hz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g2 = vslider("g2 [tooltip:gain (dB) at 62.5 Hz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g3 = vslider("g3 [tooltip:gain (dB) at 125 Hz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g4 = vslider("g4 [tooltip:gain (dB) at 250 Hz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g5 = vslider("g5 [tooltip:gain (dB) at 500 Hz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g6 = vslider("g6 [tooltip:gain (dB) at 1 kHz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g7 = vslider("g7 [tooltip:gain (dB) at 2 kHz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g8 = vslider("g8 [tooltip:gain (dB) at 4 kHz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g9 = vslider("g9 [tooltip:gain (dB) at 8 kHz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g10 = vslider("g10 [tooltip:gain (dB) at 16 kHz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g11 = vslider("g11 [tooltip:gain (dB) above 16 kHz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
v1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
v2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
v3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
v4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
v5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
v6(x) = attach(x, envelop(x) : vbargraph("v6[nomidi:no]", -70, +5));
v7(x) = attach(x, envelop(x) : vbargraph("v7[nomidi:no]", -70, +5));
v8(x) = attach(x, envelop(x) : vbargraph("v8[nomidi:no]", -70, +5));
v9(x) = attach(x, envelop(x) : vbargraph("v9[nomidi:no]", -70, +5));
v10(x) = attach(x, envelop(x) : vbargraph("v10[nomidi:no]", -70, +5));
v11(x) = attach(x, envelop(x) : vbargraph("v11[nomidi:no]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096) ;
process = geq :(*(g11):v11), (*(g10):v10),(*(g9):v9),(*(g8):v8),(*(g7):v7),(*(g6):v6),
(*(g5):v5),(*(g4):v4),(*(g3):v3),(*(g2):v2),(*(g1):v1) :>_;
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/faust/graphiceq.dsp
|
faust
|
geq = fi.filterbank(3, (31.25, 62.5, 125., 250., 500., 1000., 2000., 4000., 8000., 16000.));
|
declare id "graphiceq";
declare name "Graphic EQ";
declare category "Tone Control";
declare description "Graphic EQ";
import("stdfaust.lib");
import("reduce.lib");
geq = fi.filterbank(3, (44., 88., 177., 354., 707., 1414., 2828., 5657., 11384., 18110.));
g1 = vslider("g1[tooltip:gain (dB) below 31.25 Hz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g2 = vslider("g2 [tooltip:gain (dB) at 62.5 Hz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g3 = vslider("g3 [tooltip:gain (dB) at 125 Hz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g4 = vslider("g4 [tooltip:gain (dB) at 250 Hz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g5 = vslider("g5 [tooltip:gain (dB) at 500 Hz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g6 = vslider("g6 [tooltip:gain (dB) at 1 kHz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g7 = vslider("g7 [tooltip:gain (dB) at 2 kHz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g8 = vslider("g8 [tooltip:gain (dB) at 4 kHz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g9 = vslider("g9 [tooltip:gain (dB) at 8 kHz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g10 = vslider("g10 [tooltip:gain (dB) at 16 kHz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
g11 = vslider("g11 [tooltip:gain (dB) above 16 kHz]", 0, -30, 20, 0.1) : ba.db2linear : si.smooth(0.999);
v1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
v2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
v3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
v4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
v5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
v6(x) = attach(x, envelop(x) : vbargraph("v6[nomidi:no]", -70, +5));
v7(x) = attach(x, envelop(x) : vbargraph("v7[nomidi:no]", -70, +5));
v8(x) = attach(x, envelop(x) : vbargraph("v8[nomidi:no]", -70, +5));
v9(x) = attach(x, envelop(x) : vbargraph("v9[nomidi:no]", -70, +5));
v10(x) = attach(x, envelop(x) : vbargraph("v10[nomidi:no]", -70, +5));
v11(x) = attach(x, envelop(x) : vbargraph("v11[nomidi:no]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096) ;
process = geq :(*(g11):v11), (*(g10):v10),(*(g9):v9),(*(g8):v8),(*(g7):v7),(*(g6):v6),
(*(g5):v5),(*(g4):v4),(*(g3):v3),(*(g2):v2),(*(g1):v1) :>_;
|
e0f091c2b04ddca636d7ddb7d622b9de5ea09b6759195f39d83825b50b170910
|
simonvanderveldt/guitarix
|
compressor.dsp
|
declare name "Compressor";
declare category "Guitar Effects";
/* Compressor unit. */
//declare name "compressor -- compressor/limiter unit";
declare author "Albert Graef";
declare version "1.0";
import("stdfaust.lib");
import("guitarix.lib");
import("reduce.lib");
/* Controls. */
// partition the controls into these three groups
comp_group(x) = hgroup("1-compression", x);
env_group(x) = vgroup("2-envelop", x);
gain_group(x) = vgroup("3-gain", x);
// compressor controls: ratio, threshold and knee size
ratio = nentry("ratio[name:Ratio]", 2, 1, 20, 0.1);
threshold = nentry("threshold[name:Threshold]", -20, -96, 10, 0.1);
knee = nentry("knee[name:Knee]", 3, 0, 20, 0.1);
// attack and release controls; clamped to a minimum of 1 sample
attack = hslider("attack[name:Attack]", 0.002, 0, 1, 0.001) : max(1/ma.SR);
release = hslider("release[name:Release]", 0.5, 0, 10, 0.01) : max(1/ma.SR);
// gain controls: make-up gain, compression gain meter
makeup_gain = gain_group(hslider("makeup gain[name:Makeup]", 0, -96, 96, 0.1));
gain(x) = attach(x, x : gain_group(hbargraph("gain", -96, 0)));
t = 0.1;
g = exp(-1/(ma.SR*t));
env = abs : *(1-g) : + ~ *(g);
rms = sqr : *(1-g) : + ~ *(g) : sqrt;
sqr(x) = x*x;
/* Compute the envelop of a stereo signal. Replace env with rms ba.if you want to
use the RMS value instead. */
//env2(x,y) = max(env(x),env(y));
env2(x) = max(env(x));
/* Compute the compression factor for the current input level. The gain is
always 0 dB ba.if we're below the reduced threshold, threshold-knee. Beyond
the real threshold value the level is scaled by 1/ratio. Between these two
extremes we return a convex combination of those factors. This is also
known as "soft-knee" compression: the compression kicks in gradually at
threshold-knee and reaches its full value at threshold. For special
effects, you can also achieve old-school "hard-knee" compression by setting
the knee value to fi.zero. Also note that, before computing the gain, the
input level is first smoothed out using a 1 fi.pole IIR to prevent clicks when
the input level changes abruptly. The attack and release times of this
filter are configured with the corresponding envelop controls of the
compressor. */
compress(env) = level*(1-r)/r
with {
// the (filtered) input level above the threshold
level = env : h ~ _ : ba.linear2db : (_-threshold+knee) : max(0)
with {
h(x,y) = f*x+(1-f)*y with { f = (x<y)*ga+(x>=y)*gr; };
ga = exp(-1/(ma.SR*attack));
gr = exp(-1/(ma.SR*release));
};
// the knee factor, clamped to 0..1; we add a small perturbation in
// the denominator to prevent infinities and nan when knee<<1
p = level/(knee+eps) : max(0) : min(1) with { eps = 0.001; };
// the actual compression ratio
r = 1-p+p*ratio;
};
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096); // : max(ba.db2linear(-70)) : ba.linear2db;
process(x) = g(x)*x
with {
//g = env2(x) : compress : gain : +(makeup_gain) : ba.db2linear ;
g = add_dc : env : compress : vmeter1 : ba.db2linear ;
};
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/faust/compressor.dsp
|
faust
|
Compressor unit.
declare name "compressor -- compressor/limiter unit";
Controls.
partition the controls into these three groups
compressor controls: ratio, threshold and knee size
attack and release controls; clamped to a minimum of 1 sample
gain controls: make-up gain, compression gain meter
Compute the envelop of a stereo signal. Replace env with rms ba.if you want to
use the RMS value instead.
env2(x,y) = max(env(x),env(y));
Compute the compression factor for the current input level. The gain is
always 0 dB ba.if we're below the reduced threshold, threshold-knee. Beyond
the real threshold value the level is scaled by 1/ratio. Between these two
extremes we return a convex combination of those factors. This is also
known as "soft-knee" compression: the compression kicks in gradually at
threshold-knee and reaches its full value at threshold. For special
effects, you can also achieve old-school "hard-knee" compression by setting
the knee value to fi.zero. Also note that, before computing the gain, the
input level is first smoothed out using a 1 fi.pole IIR to prevent clicks when
the input level changes abruptly. The attack and release times of this
filter are configured with the corresponding envelop controls of the
compressor.
the (filtered) input level above the threshold
the knee factor, clamped to 0..1; we add a small perturbation in
the denominator to prevent infinities and nan when knee<<1
the actual compression ratio
: max(ba.db2linear(-70)) : ba.linear2db;
g = env2(x) : compress : gain : +(makeup_gain) : ba.db2linear ;
|
declare name "Compressor";
declare category "Guitar Effects";
declare author "Albert Graef";
declare version "1.0";
import("stdfaust.lib");
import("guitarix.lib");
import("reduce.lib");
comp_group(x) = hgroup("1-compression", x);
env_group(x) = vgroup("2-envelop", x);
gain_group(x) = vgroup("3-gain", x);
ratio = nentry("ratio[name:Ratio]", 2, 1, 20, 0.1);
threshold = nentry("threshold[name:Threshold]", -20, -96, 10, 0.1);
knee = nentry("knee[name:Knee]", 3, 0, 20, 0.1);
attack = hslider("attack[name:Attack]", 0.002, 0, 1, 0.001) : max(1/ma.SR);
release = hslider("release[name:Release]", 0.5, 0, 10, 0.01) : max(1/ma.SR);
makeup_gain = gain_group(hslider("makeup gain[name:Makeup]", 0, -96, 96, 0.1));
gain(x) = attach(x, x : gain_group(hbargraph("gain", -96, 0)));
t = 0.1;
g = exp(-1/(ma.SR*t));
env = abs : *(1-g) : + ~ *(g);
rms = sqr : *(1-g) : + ~ *(g) : sqrt;
sqr(x) = x*x;
env2(x) = max(env(x));
compress(env) = level*(1-r)/r
with {
level = env : h ~ _ : ba.linear2db : (_-threshold+knee) : max(0)
with {
h(x,y) = f*x+(1-f)*y with { f = (x<y)*ga+(x>=y)*gr; };
ga = exp(-1/(ma.SR*attack));
gr = exp(-1/(ma.SR*release));
};
p = level/(knee+eps) : max(0) : min(1) with { eps = 0.001; };
r = 1-p+p*ratio;
};
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
process(x) = g(x)*x
with {
g = add_dc : env : compress : vmeter1 : ba.db2linear ;
};
|
7647bf9c496ec171eb0c116a48af06c8f4d62ae1a0b636bebda960d4e3348fa9
|
simonvanderveldt/guitarix
|
mbchor.dsp
|
declare id "mbchor";
declare name "Multi Band Chorus";
declare shortname "MB Chorus";
declare category "Modulation";
declare description "Multi Band Chorus";
import("stdfaust.lib");
import("reduce.lib");
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
l1 = hslider("level1", 0.5, 0, 1, 0.01);
f1 = hslider("freq1[tooltip:Beats per Minute]",30,24,360,1)/60;
d1 = hslider("delay1", 0.02, 0, 0.2, 0.01): si.smooth(0.999);
de1 = hslider("depth1", 0.02, 0.01, 1, 0.01)/10;
l2 = hslider("level2", 0.5, 0, 1, 0.01);
f2 = hslider("freq2[tooltip:Beats per Minute]",60,24,360,1)/60;
d2 = hslider("delay2", 0.04, 0, 0.2, 0.01): si.smooth(0.999);
de2 = hslider("depth2", 0.04, 0.01, 1, 0.01)/10;
l3 = hslider("level3", 0.5, 0, 1, 0.01);
f3 = hslider("freq3[tooltip:Beats per Minute]",90,24,360,1)/60;
d3 = hslider("delay3", 0.06, 0, 0.2, 0.01): si.smooth(0.999);
de3 = hslider("depth3", 0.06, 0.01, 1, 0.01)/10;
l4 = hslider("level4", 0.5, 0, 1, 0.01);
f4 = hslider("freq4[tooltip:Beats per Minute]",120,24,360,1)/60;
d4 = hslider("delay4", 0.08, 0, 0.2, 0.01): si.smooth(0.999);
de4 = hslider("depth4", 0.08, 0.01, 1, 0.01)/10;
l5 = hslider("level5", 0.5, 0, 1, 0.01);
f5 = hslider("freq5[tooltip:Beats per Minute]",150,24,360,1)/60;
d5 = hslider("delay5", 0.10, 0, 0.2, 0.01): si.smooth(0.999);
de5 = hslider("depth5", 0.10, 0.01, 1, 0.01)/10;
tblosc(n,f,freq,mod) = (1-d)*rdtable(n,wform,i&(n-1)) +
d*rdtable(n,wform,(i+1)&(n-1))
with {
wform = ba.time*(2.0*ma.PI)/n : f;
phase = freq/ma.SR : (+ : ma.decimal) ~ _;
modphase = ma.decimal(phase+mod/(2*ma.PI))*n;
i = int(floor(modphase));
d = ma.decimal(modphase);
};
chor(dtime,freq,depth,lev) = chorus(dtime,freq,depth,lev,0) : *(lev)
with {
chorus(dtime,freq,depth,lev,phase,x)
= x+lev*de.fdelay(1<<16, t, x)
with {
t = ma.SR*dtime/2*(1+depth*tblosc(1<<16, sin, freq, phase));
};
};
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -0, +1));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -0, +1));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -0, +1));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -0, +1));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -0, +1));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096) ; // : max(ba.db2linear(-70)) : ba.linear2db;
process = _<:(geq:( dist5s , dist4s , dist3s, dist2s, dist1s)),_ :>_ with {
dist1s = chor(d1,f1,de1,l1) : vmeter1;
dist2s = chor(d2,f2,de2,l2) : vmeter2;
dist3s = chor(d3,f3,de3,l3) : vmeter3;
dist4s = chor(d4,f4,de4,l4) : vmeter4;
dist5s = chor(d5,f5,de5,l5) : vmeter5;
};
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/plugins/mbchor.dsp
|
faust
|
: max(ba.db2linear(-70)) : ba.linear2db;
|
declare id "mbchor";
declare name "Multi Band Chorus";
declare shortname "MB Chorus";
declare category "Modulation";
declare description "Multi Band Chorus";
import("stdfaust.lib");
import("reduce.lib");
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
l1 = hslider("level1", 0.5, 0, 1, 0.01);
f1 = hslider("freq1[tooltip:Beats per Minute]",30,24,360,1)/60;
d1 = hslider("delay1", 0.02, 0, 0.2, 0.01): si.smooth(0.999);
de1 = hslider("depth1", 0.02, 0.01, 1, 0.01)/10;
l2 = hslider("level2", 0.5, 0, 1, 0.01);
f2 = hslider("freq2[tooltip:Beats per Minute]",60,24,360,1)/60;
d2 = hslider("delay2", 0.04, 0, 0.2, 0.01): si.smooth(0.999);
de2 = hslider("depth2", 0.04, 0.01, 1, 0.01)/10;
l3 = hslider("level3", 0.5, 0, 1, 0.01);
f3 = hslider("freq3[tooltip:Beats per Minute]",90,24,360,1)/60;
d3 = hslider("delay3", 0.06, 0, 0.2, 0.01): si.smooth(0.999);
de3 = hslider("depth3", 0.06, 0.01, 1, 0.01)/10;
l4 = hslider("level4", 0.5, 0, 1, 0.01);
f4 = hslider("freq4[tooltip:Beats per Minute]",120,24,360,1)/60;
d4 = hslider("delay4", 0.08, 0, 0.2, 0.01): si.smooth(0.999);
de4 = hslider("depth4", 0.08, 0.01, 1, 0.01)/10;
l5 = hslider("level5", 0.5, 0, 1, 0.01);
f5 = hslider("freq5[tooltip:Beats per Minute]",150,24,360,1)/60;
d5 = hslider("delay5", 0.10, 0, 0.2, 0.01): si.smooth(0.999);
de5 = hslider("depth5", 0.10, 0.01, 1, 0.01)/10;
tblosc(n,f,freq,mod) = (1-d)*rdtable(n,wform,i&(n-1)) +
d*rdtable(n,wform,(i+1)&(n-1))
with {
wform = ba.time*(2.0*ma.PI)/n : f;
phase = freq/ma.SR : (+ : ma.decimal) ~ _;
modphase = ma.decimal(phase+mod/(2*ma.PI))*n;
i = int(floor(modphase));
d = ma.decimal(modphase);
};
chor(dtime,freq,depth,lev) = chorus(dtime,freq,depth,lev,0) : *(lev)
with {
chorus(dtime,freq,depth,lev,phase,x)
= x+lev*de.fdelay(1<<16, t, x)
with {
t = ma.SR*dtime/2*(1+depth*tblosc(1<<16, sin, freq, phase));
};
};
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -0, +1));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -0, +1));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -0, +1));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -0, +1));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -0, +1));
process = _<:(geq:( dist5s , dist4s , dist3s, dist2s, dist1s)),_ :>_ with {
dist1s = chor(d1,f1,de1,l1) : vmeter1;
dist2s = chor(d2,f2,de2,l2) : vmeter2;
dist3s = chor(d3,f3,de3,l3) : vmeter3;
dist4s = chor(d4,f4,de4,l4) : vmeter4;
dist5s = chor(d5,f5,de5,l5) : vmeter5;
};
|
257e8917f439ade08c597a5bea821374f993757ed68262d32e3076646ab7b79a
|
simonvanderveldt/guitarix
|
mbdel.dsp
|
declare id "mbdel";
declare name "MultiBand Delay";
declare shortname "MB Delay";
declare category "Echo / Delay";
declare description "Multi Band Delay";
import("stdfaust.lib");
import("reduce.lib");
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
interp = 100*ma.SR/1000.0;
N = int( 2^18);
g1 = vslider("gain1", -10, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d1 = ba.tempo(hslider("delay1[tooltip:Delay in Beats per Minute]",30,24,360,1));
g2 = vslider("gain2", -5, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d2 = ba.tempo(hslider("delay2[tooltip:Delay in Beats per Minute]",60,24,360,1));
g3 = vslider("gain3", -2, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d3 = ba.tempo(hslider("delay3[tooltip:Delay in Beats per Minute]",90,24,360,1));
g4 = vslider("gain4", 0, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d4 = ba.tempo(hslider("delay4[tooltip:Delay in Beats per Minute]",120,24,360,1));
g5 = vslider("gain5", -10, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d5 = ba.tempo(hslider("delay5[tooltip:Delay in Beats per Minute]",150,24,360,1));
del(g,d,f) = *(g) : (+: de.sdelay(N, interp,d))~(*(f)) ;
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
f1 = vslider("feedback1[tooltip:percentage of the feedback level in the de.delay loop]", 50, 1, 100, 1)/100 ;
f2 = vslider("feedback2[tooltip:percentage of the feedback level in the de.delay loop]", 50, 1, 100, 1)/100 ;
f3 = vslider("feedback3[tooltip:percentage of the feedback level in the de.delay loop]", 50, 1, 100, 1)/100 ;
f4 = vslider("feedback4[tooltip:percentage of the feedback level in the de.delay loop]", 50, 1, 100, 1)/100 ;
f5 = vslider("feedback5[tooltip:percentage of the feedback level in the de.delay loop]", 50, 1, 100, 1)/100 ;
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096) ; // : max(ba.db2linear(-70)) : ba.linear2db;
process = _<:(geq: ( dist5s , dist4s , dist3s, dist2s, dist1s)),_:>_ with {
dist1s = del(g1,d1,f1) : vmeter1;
dist2s = del(g2,d2,f2) : vmeter2;
dist3s = del(g3,d3,f3) : vmeter3;
dist4s = del(g4,d4,f4) : vmeter4;
dist5s = del(g5,d5,f5) : vmeter5;
};
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/LV2/faust/mbdel.dsp
|
faust
|
: max(ba.db2linear(-70)) : ba.linear2db;
|
declare id "mbdel";
declare name "MultiBand Delay";
declare shortname "MB Delay";
declare category "Echo / Delay";
declare description "Multi Band Delay";
import("stdfaust.lib");
import("reduce.lib");
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
interp = 100*ma.SR/1000.0;
N = int( 2^18);
g1 = vslider("gain1", -10, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d1 = ba.tempo(hslider("delay1[tooltip:Delay in Beats per Minute]",30,24,360,1));
g2 = vslider("gain2", -5, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d2 = ba.tempo(hslider("delay2[tooltip:Delay in Beats per Minute]",60,24,360,1));
g3 = vslider("gain3", -2, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d3 = ba.tempo(hslider("delay3[tooltip:Delay in Beats per Minute]",90,24,360,1));
g4 = vslider("gain4", 0, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d4 = ba.tempo(hslider("delay4[tooltip:Delay in Beats per Minute]",120,24,360,1));
g5 = vslider("gain5", -10, -20, 20, 0.1) : ba.db2linear : si.smooth(0.999);
d5 = ba.tempo(hslider("delay5[tooltip:Delay in Beats per Minute]",150,24,360,1));
del(g,d,f) = *(g) : (+: de.sdelay(N, interp,d))~(*(f)) ;
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
f1 = vslider("feedback1[tooltip:percentage of the feedback level in the de.delay loop]", 50, 1, 100, 1)/100 ;
f2 = vslider("feedback2[tooltip:percentage of the feedback level in the de.delay loop]", 50, 1, 100, 1)/100 ;
f3 = vslider("feedback3[tooltip:percentage of the feedback level in the de.delay loop]", 50, 1, 100, 1)/100 ;
f4 = vslider("feedback4[tooltip:percentage of the feedback level in the de.delay loop]", 50, 1, 100, 1)/100 ;
f5 = vslider("feedback5[tooltip:percentage of the feedback level in the de.delay loop]", 50, 1, 100, 1)/100 ;
process = _<:(geq: ( dist5s , dist4s , dist3s, dist2s, dist1s)),_:>_ with {
dist1s = del(g1,d1,f1) : vmeter1;
dist2s = del(g2,d2,f2) : vmeter2;
dist3s = del(g3,d3,f3) : vmeter3;
dist4s = del(g4,d4,f4) : vmeter4;
dist5s = del(g5,d5,f5) : vmeter5;
};
|
508e8b0d84891b1c083d6c1c456f8a12a80f171a215c821f1060d4458a5786c7
|
simonvanderveldt/guitarix
|
mbreverb.dsp
|
declare id "mbe";
declare name "MultiBand Reverb";
declare shortname "MB Reverb";
declare category "Reverb";
declare description "Multi Band Reverb";
import("stdfaust.lib");
import("reduce.lib");
import("guitarix.lib");
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096) ; // : max(ba.db2linear(-70)) : ba.linear2db;
/*-----------------------------------------------
freeverb by "Grame"
-----------------------------------------------*/
c1 = vslider("RoomSize1", 0.5, 0, 1, 0.025)*0.28 + 0.7;
d1 = vslider("damp1",0.5, 0, 1, 0.025);
wet1 = vslider("wet_dry1[name:wet/dry]", 50, 0, 100, 1) : /(100);
dry1 = 1 - wet1;
c2 = vslider("RoomSize2", 0.5, 0, 1, 0.025)*0.28 + 0.7;
d2 = vslider("damp2",0.5, 0, 1, 0.025);
wet2 = vslider("wet_dry2[name:wet/dry]", 50, 0, 100, 1) : /(100);
dry2 = 1 - wet2;
c3 = vslider("RoomSize3", 0.5, 0, 1, 0.025)*0.28 + 0.7;
d3 = vslider("damp3",0.5, 0, 1, 0.025);
wet3 = vslider("wet_dry3[name:wet/dry]", 50, 0, 100, 1) : /(100);
dry3 = 1 - wet3;
c4 = vslider("RoomSize4", 0.5, 0, 1, 0.025)*0.28 + 0.7;
d4 = vslider("damp4",0.5, 0, 1, 0.025);
wet4 = vslider("wet_dry4[name:wet/dry]", 50, 0, 100, 1) : /(100);
dry4 = 1 - wet4;
c5 = vslider("RoomSize5", 0.5, 0, 1, 0.025)*0.28 + 0.7;
d5 = vslider("damp5",0.5, 0, 1, 0.025);
wet5 = vslider("wet_dry5[name:wet/dry]", 50, 0, 100, 1) : /(100);
dry5 = 1 - wet5;
// Filter Parameters
combtuningL1 = 1116;
combtuningL2 = 1188;
combtuningL3 = 1277;
combtuningL4 = 1356;
combtuningL5 = 1422;
combtuningL6 = 1491;
combtuningL7 = 1557;
combtuningL8 = 1617;
allpasstuningL1 = 556;
allpasstuningL2 = 441;
allpasstuningL3 = 341;
allpasstuningL4 = 225;
// Reverb components
monoReverb(fb1, fb2, damp, spread)
= _ <: comb(combtuningL1+spread, fb1, damp),
comb(combtuningL2+spread, fb1, damp),
comb(combtuningL3+spread, fb1, damp),
comb(combtuningL4+spread, fb1, damp),
comb(combtuningL5+spread, fb1, damp),
comb(combtuningL6+spread, fb1, damp),
comb(combtuningL7+spread, fb1, damp),
comb(combtuningL8+spread, fb1, damp)
+>
allpass (allpasstuningL1+spread, fb2)
: allpass (allpasstuningL2+spread, fb2)
: allpass (allpasstuningL3+spread, fb2)
: allpass (allpasstuningL4+spread, fb2)
;
//----------------------------------------------------------------
fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _;
reverb(dry, wet_dry, combfeed, dampslider) = _<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))):>_;
process = geq: ( dist5s , dist4s , dist3s, dist2s, dist1s) :>_ with {
dist1s = reverb(dry1,wet1,c1,d1) : vmeter1 ;
dist2s = reverb(dry2,wet2,c2,d2) : vmeter2;
dist3s = reverb(dry3,wet3,c3,d3) : vmeter3;
dist4s = reverb(dry4,wet4,c4,d4) : vmeter4;
dist5s = reverb(dry5,wet5,c5,d5) : vmeter5;
};
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/LV2/faust/mbreverb.dsp
|
faust
|
: max(ba.db2linear(-70)) : ba.linear2db;
-----------------------------------------------
freeverb by "Grame"
-----------------------------------------------
Filter Parameters
Reverb components
----------------------------------------------------------------
|
declare id "mbe";
declare name "MultiBand Reverb";
declare shortname "MB Reverb";
declare category "Reverb";
declare description "Multi Band Reverb";
import("stdfaust.lib");
import("reduce.lib");
import("guitarix.lib");
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
c1 = vslider("RoomSize1", 0.5, 0, 1, 0.025)*0.28 + 0.7;
d1 = vslider("damp1",0.5, 0, 1, 0.025);
wet1 = vslider("wet_dry1[name:wet/dry]", 50, 0, 100, 1) : /(100);
dry1 = 1 - wet1;
c2 = vslider("RoomSize2", 0.5, 0, 1, 0.025)*0.28 + 0.7;
d2 = vslider("damp2",0.5, 0, 1, 0.025);
wet2 = vslider("wet_dry2[name:wet/dry]", 50, 0, 100, 1) : /(100);
dry2 = 1 - wet2;
c3 = vslider("RoomSize3", 0.5, 0, 1, 0.025)*0.28 + 0.7;
d3 = vslider("damp3",0.5, 0, 1, 0.025);
wet3 = vslider("wet_dry3[name:wet/dry]", 50, 0, 100, 1) : /(100);
dry3 = 1 - wet3;
c4 = vslider("RoomSize4", 0.5, 0, 1, 0.025)*0.28 + 0.7;
d4 = vslider("damp4",0.5, 0, 1, 0.025);
wet4 = vslider("wet_dry4[name:wet/dry]", 50, 0, 100, 1) : /(100);
dry4 = 1 - wet4;
c5 = vslider("RoomSize5", 0.5, 0, 1, 0.025)*0.28 + 0.7;
d5 = vslider("damp5",0.5, 0, 1, 0.025);
wet5 = vslider("wet_dry5[name:wet/dry]", 50, 0, 100, 1) : /(100);
dry5 = 1 - wet5;
combtuningL1 = 1116;
combtuningL2 = 1188;
combtuningL3 = 1277;
combtuningL4 = 1356;
combtuningL5 = 1422;
combtuningL6 = 1491;
combtuningL7 = 1557;
combtuningL8 = 1617;
allpasstuningL1 = 556;
allpasstuningL2 = 441;
allpasstuningL3 = 341;
allpasstuningL4 = 225;
monoReverb(fb1, fb2, damp, spread)
= _ <: comb(combtuningL1+spread, fb1, damp),
comb(combtuningL2+spread, fb1, damp),
comb(combtuningL3+spread, fb1, damp),
comb(combtuningL4+spread, fb1, damp),
comb(combtuningL5+spread, fb1, damp),
comb(combtuningL6+spread, fb1, damp),
comb(combtuningL7+spread, fb1, damp),
comb(combtuningL8+spread, fb1, damp)
+>
allpass (allpasstuningL1+spread, fb2)
: allpass (allpasstuningL2+spread, fb2)
: allpass (allpasstuningL3+spread, fb2)
: allpass (allpasstuningL4+spread, fb2)
;
fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _;
reverb(dry, wet_dry, combfeed, dampslider) = _<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))):>_;
process = geq: ( dist5s , dist4s , dist3s, dist2s, dist1s) :>_ with {
dist1s = reverb(dry1,wet1,c1,d1) : vmeter1 ;
dist2s = reverb(dry2,wet2,c2,d2) : vmeter2;
dist3s = reverb(dry3,wet3,c3,d3) : vmeter3;
dist4s = reverb(dry4,wet4,c4,d4) : vmeter4;
dist5s = reverb(dry5,wet5,c5,d5) : vmeter5;
};
|
fd606838df7e42c14f84c51ef979f95ef8f120876137fbce4d56013c9fc7b11b
|
simonvanderveldt/guitarix
|
mbc.dsp
|
declare id "mbc";
declare name "Multi Band Compressor";
declare shortname "MB Comp";
declare category "Guitar Effects";
declare description "Multi Band Compressor contributed by kokoko3k";
import("stdfaust.lib");
import("reduce.lib");
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096) ; // : max(ba.db2linear(-70)) : ba.linear2db;
//Mono
process = geq : ( gcomp5s , gcomp4s , gcomp3s, gcomp2s, gcomp1s) :>_ with {
gcomp1s = ba.bypass1(bswitch1,co.compressor_mono(ratio1,-push1,attack1,release1)):*(Makeup1) : vmeter1;
gcomp2s = ba.bypass1(bswitch2,co.compressor_mono(ratio2,-push2,attack2,release2)):*(Makeup2) : vmeter2;
gcomp3s = ba.bypass1(bswitch3,co.compressor_mono(ratio3,-push3,attack3,release3)):*(Makeup3) : vmeter3;
gcomp4s = ba.bypass1(bswitch4,co.compressor_mono(ratio4,-push4,attack4,release4)):*(Makeup4) : vmeter4;
gcomp5s = ba.bypass1(bswitch5,co.compressor_mono(ratio5,-push5,attack5,release5)):*(Makeup5) : vmeter5;
};
sel1 = hslider("Mode1[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel2 = hslider("Mode2[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel3 = hslider("Mode3[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel4 = hslider("Mode4[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel5 = hslider("Mode5[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
not(x) = abs(x-1);
mute1 = not(max(0,sel1-2));
mute2 = not(max(0,sel2-2));
mute3 = not(max(0,sel3-2));
mute4 = not(max(0,sel4-2));
mute5 = not(max(0,sel5-2));
bypass(switch, block) = _ <: select2(switch, _, block);
bswitch1 = max(0,sel1-1);
bswitch2 = max(0,sel2-1);
bswitch3 = max(0,sel3-1);
bswitch4 = max(0,sel4-1);
bswitch5 = max(0,sel5-1);
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
ratio1 = hslider("[9] Ratio1 [tooltip: Compression ratio]",2,1,100,0.1);
attack1 = hslider("[A] Attack1 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release1 = hslider("[B] Release1 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio2 = hslider("[9] Ratio2 [tooltip: Compression ratio]",2,1,100,0.1);
attack2 = hslider("[A] Attack2 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release2 = hslider("[B] Release2 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio3 = hslider("[9] Ratio3 [tooltip: Compression ratio]",2,1,100,0.1);
attack3 = hslider("[A] Attack3 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release3 = hslider("[B] Release3 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio4 = hslider("[9] Ratio4 [tooltip: Compression ratio]",2,1,100,0.1);
attack4 = hslider("[A] Attack4 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release4 = hslider("[B] Release4 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio5 = hslider("[9] Ratio5 [tooltip: Compression ratio]",2,1,100,0.1);
attack5 = hslider("[A] Attack5 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release5 = hslider("[B] Release5 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
push1 = hslider("[5] Makeup1 [tooltip: Post amplification and threshold]" , 13, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
push2 = hslider("[5] Makeup2 [tooltip: Post amplification and threshold]" , 10, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
push3 = hslider("[5] Makeup3 [tooltip: Post amplification and threshold]" , 4, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
push4 = hslider("[5] Makeup4 [tooltip: Post amplification and threshold]" , 8, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
push5 = hslider("[5] Makeup5 [tooltip: Post amplification and threshold]" , 11, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
safe1 = hslider("[6] Makeup-Threshold1 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
safe2 = hslider("[6] Makeup-Threshold2 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
safe3 = hslider("[6] Makeup-Threshold3 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
safe4 = hslider("[6] Makeup-Threshold4 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
safe5 = hslider("[6] Makeup-Threshold5 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
Makeup1 = mute1* (not(bswitch1)*(push1-safe1) : ba.db2linear : si.smooth(0.999));
Makeup2 = mute2* (not(bswitch2)*(push2-safe2) : ba.db2linear : si.smooth(0.999));
Makeup3 = mute3* (not(bswitch3)*(push3-safe3) : ba.db2linear : si.smooth(0.999));
Makeup4 = mute4* (not(bswitch4)*(push4-safe4) : ba.db2linear : si.smooth(0.999));
Makeup5 = mute5* (not(bswitch5)*(push5-safe5) : ba.db2linear : si.smooth(0.999));
//Low end headsets: 13,10,4,8,11 (split 80,210,1700,5000)
//Mid-high end headsets: 17,20.5,20,10.5,10 (split 44,180,800,5000)
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/plugins/mbc.dsp
|
faust
|
: max(ba.db2linear(-70)) : ba.linear2db;
Mono
threshold-=push ; makeup+=push
threshold-=push ; makeup+=push
threshold-=push ; makeup+=push
threshold-=push ; makeup+=push
threshold-=push ; makeup+=push
makeup-=safe
makeup-=safe
makeup-=safe
makeup-=safe
makeup-=safe
Low end headsets: 13,10,4,8,11 (split 80,210,1700,5000)
Mid-high end headsets: 17,20.5,20,10.5,10 (split 44,180,800,5000)
|
declare id "mbc";
declare name "Multi Band Compressor";
declare shortname "MB Comp";
declare category "Guitar Effects";
declare description "Multi Band Compressor contributed by kokoko3k";
import("stdfaust.lib");
import("reduce.lib");
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[nomidi:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[nomidi:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[nomidi:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[nomidi:no]", -70, +5));
process = geq : ( gcomp5s , gcomp4s , gcomp3s, gcomp2s, gcomp1s) :>_ with {
gcomp1s = ba.bypass1(bswitch1,co.compressor_mono(ratio1,-push1,attack1,release1)):*(Makeup1) : vmeter1;
gcomp2s = ba.bypass1(bswitch2,co.compressor_mono(ratio2,-push2,attack2,release2)):*(Makeup2) : vmeter2;
gcomp3s = ba.bypass1(bswitch3,co.compressor_mono(ratio3,-push3,attack3,release3)):*(Makeup3) : vmeter3;
gcomp4s = ba.bypass1(bswitch4,co.compressor_mono(ratio4,-push4,attack4,release4)):*(Makeup4) : vmeter4;
gcomp5s = ba.bypass1(bswitch5,co.compressor_mono(ratio5,-push5,attack5,release5)):*(Makeup5) : vmeter5;
};
sel1 = hslider("Mode1[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel2 = hslider("Mode2[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel3 = hslider("Mode3[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel4 = hslider("Mode4[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel5 = hslider("Mode5[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
not(x) = abs(x-1);
mute1 = not(max(0,sel1-2));
mute2 = not(max(0,sel2-2));
mute3 = not(max(0,sel3-2));
mute4 = not(max(0,sel4-2));
mute5 = not(max(0,sel5-2));
bypass(switch, block) = _ <: select2(switch, _, block);
bswitch1 = max(0,sel1-1);
bswitch2 = max(0,sel2-1);
bswitch3 = max(0,sel3-1);
bswitch4 = max(0,sel4-1);
bswitch5 = max(0,sel5-1);
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
ratio1 = hslider("[9] Ratio1 [tooltip: Compression ratio]",2,1,100,0.1);
attack1 = hslider("[A] Attack1 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release1 = hslider("[B] Release1 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio2 = hslider("[9] Ratio2 [tooltip: Compression ratio]",2,1,100,0.1);
attack2 = hslider("[A] Attack2 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release2 = hslider("[B] Release2 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio3 = hslider("[9] Ratio3 [tooltip: Compression ratio]",2,1,100,0.1);
attack3 = hslider("[A] Attack3 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release3 = hslider("[B] Release3 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio4 = hslider("[9] Ratio4 [tooltip: Compression ratio]",2,1,100,0.1);
attack4 = hslider("[A] Attack4 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release4 = hslider("[B] Release4 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio5 = hslider("[9] Ratio5 [tooltip: Compression ratio]",2,1,100,0.1);
attack5 = hslider("[A] Attack5 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release5 = hslider("[B] Release5 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
Makeup1 = mute1* (not(bswitch1)*(push1-safe1) : ba.db2linear : si.smooth(0.999));
Makeup2 = mute2* (not(bswitch2)*(push2-safe2) : ba.db2linear : si.smooth(0.999));
Makeup3 = mute3* (not(bswitch3)*(push3-safe3) : ba.db2linear : si.smooth(0.999));
Makeup4 = mute4* (not(bswitch4)*(push4-safe4) : ba.db2linear : si.smooth(0.999));
Makeup5 = mute5* (not(bswitch5)*(push5-safe5) : ba.db2linear : si.smooth(0.999));
|
cc517d00c06aff416940ef3ca1d687b0385f48751d3e75567146e9a133d2e1a5
|
simonvanderveldt/guitarix
|
mbcs.dsp
|
declare id "mbcs";
declare name "Multi Band Compressor Stereo";
declare shortname "MB Comp St";
declare category "Guitar Effects";
declare description "Multi Band Compressor contributed by kokoko3k";
import("stdfaust.lib");
import("reduce.lib");
sel1 = hslider("Mode1[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel2 = hslider("Mode2[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel3 = hslider("Mode3[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel4 = hslider("Mode4[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel5 = hslider("Mode5[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
not(x) = abs(x-1);
mute1 = not(max(0,sel1-2));
mute2 = not(max(0,sel2-2));
mute3 = not(max(0,sel3-2));
mute4 = not(max(0,sel4-2));
mute5 = not(max(0,sel5-2));
bypass(switch, block) = _ <: select2(switch, _, block);
bswitch1 = max(0,sel1-1);
bswitch2 = max(0,sel2-1);
bswitch3 = max(0,sel3-1);
bswitch4 = max(0,sel4-1);
bswitch5 = max(0,sel5-1);
vmeter1(x,y) = attach(x, envelop(abs(x)+abs(y)) : vbargraph("v1[nomidi:no][tooltip: Sum of Band1 ]", -70, +5)),y;
vmeter2(x,y) = attach(x, envelop(abs(x)+abs(y)) : vbargraph("v2[nomidi:no][tooltip: Sum of Band2 ]", -70, +5)),y;
vmeter3(x,y) = attach(x, envelop(abs(x)+abs(y)) : vbargraph("v3[nomidi:no][tooltip: Sum of Band3 ]", -70, +5)),y;
vmeter4(x,y) = attach(x, envelop(abs(x)+abs(y)) : vbargraph("v4[nomidi:no][tooltip: Sum of Band4 ]", -70, +5)),y;
vmeter5(x,y) = attach(x, envelop(abs(x)+abs(y)) : vbargraph("v5[nomidi:no][tooltip: Sum of Band5 ]", -70, +5)),y;
envelop = _ : max ~ (1.0/ma.SR) : reduce(max,4096) : *(0.5); // : max(ba.db2linear(-70)) : ba.linear2db;
//Stereo
process = (_,_):geqs: ( gcomp5s , gcomp4s , gcomp3s, gcomp2s, gcomp1s) :>(_,_) with {
gcomp1s = ba.bypass2(bswitch1,co.compressor_stereo(ratio1,-push1,attack1,release1)):*(Makeup1),*(Makeup1) : vmeter1;
gcomp2s = ba.bypass2(bswitch2,co.compressor_stereo(ratio2,-push2,attack2,release2)):*(Makeup2),*(Makeup2) : vmeter2;
gcomp3s = ba.bypass2(bswitch3,co.compressor_stereo(ratio3,-push3,attack3,release3)):*(Makeup3),*(Makeup3) : vmeter3;
gcomp4s = ba.bypass2(bswitch4,co.compressor_stereo(ratio4,-push4,attack4,release4)):*(Makeup4),*(Makeup4) : vmeter4;
gcomp5s = ba.bypass2(bswitch5,co.compressor_stereo(ratio5,-push5,attack5,release5)):*(Makeup5),*(Makeup5) : vmeter5;
};
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
cross5 = _,!,!,!,!,_,!,!,!,!,!,_,!,!,!,!,_,!,!,!,!,!,_,!,!,!,!,_,!,!,!,!,!,_,!,!,!,!,_,!,!,!,!,!,_,!,!,!,!,_ ;
geqs = (geq,geq) <: cross5;
ratio1 = hslider("[9] Ratio1 [tooltip: Compression ratio]",2,1,100,0.1);
attack1 = hslider("[A] Attack1 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release1 = hslider("[B] Release1 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio2 = hslider("[9] Ratio2 [tooltip: Compression ratio]",2,1,100,0.1);
attack2 = hslider("[A] Attack2 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release2 = hslider("[B] Release2 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio3 = hslider("[9] Ratio3 [tooltip: Compression ratio]",2,1,100,0.1);
attack3 = hslider("[A] Attack3 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release3 = hslider("[B] Release3 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio4 = hslider("[9] Ratio4 [tooltip: Compression ratio]",2,1,100,0.1);
attack4 = hslider("[A] Attack4 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release4 = hslider("[B] Release4 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio5 = hslider("[9] Ratio5 [tooltip: Compression ratio]",2,1,100,0.1);
attack5 = hslider("[A] Attack5 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release5 = hslider("[B] Release5 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
push1 = hslider("[5] Makeup1 [tooltip: Post amplification and threshold]" , 13, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
push2 = hslider("[5] Makeup2 [tooltip: Post amplification and threshold]" , 10, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
push3 = hslider("[5] Makeup3 [tooltip: Post amplification and threshold]" , 4, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
push4 = hslider("[5] Makeup4 [tooltip: Post amplification and threshold]" , 8, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
push5 = hslider("[5] Makeup5 [tooltip: Post amplification and threshold]" , 11, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
safe1 = hslider("[6] Makeup-Threshold1 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
safe2 = hslider("[6] Makeup-Threshold2 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
safe3 = hslider("[6] Makeup-Threshold3 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
safe4 = hslider("[6] Makeup-Threshold4 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
safe5 = hslider("[6] Makeup-Threshold5 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
Makeup1 = mute1* (not(bswitch1)*(push1-safe1) : ba.db2linear : si.smooth(0.999));
Makeup2 = mute2* (not(bswitch2)*(push2-safe2) : ba.db2linear : si.smooth(0.999));
Makeup3 = mute3* (not(bswitch3)*(push3-safe3) : ba.db2linear : si.smooth(0.999));
Makeup4 = mute4* (not(bswitch4)*(push4-safe4) : ba.db2linear : si.smooth(0.999));
Makeup5 = mute5* (not(bswitch5)*(push5-safe5) : ba.db2linear : si.smooth(0.999));
//Low end headsets: 13,10,4,8,11 (split 80,210,1700,5000)
//Mid-high end headsets: 17,20.5,20,10.5,10 (split 44,180,800,5000)
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/plugins/mbcs.dsp
|
faust
|
: max(ba.db2linear(-70)) : ba.linear2db;
Stereo
threshold-=push ; makeup+=push
threshold-=push ; makeup+=push
threshold-=push ; makeup+=push
threshold-=push ; makeup+=push
threshold-=push ; makeup+=push
makeup-=safe
makeup-=safe
makeup-=safe
makeup-=safe
makeup-=safe
Low end headsets: 13,10,4,8,11 (split 80,210,1700,5000)
Mid-high end headsets: 17,20.5,20,10.5,10 (split 44,180,800,5000)
|
declare id "mbcs";
declare name "Multi Band Compressor Stereo";
declare shortname "MB Comp St";
declare category "Guitar Effects";
declare description "Multi Band Compressor contributed by kokoko3k";
import("stdfaust.lib");
import("reduce.lib");
sel1 = hslider("Mode1[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel2 = hslider("Mode2[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel3 = hslider("Mode3[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel4 = hslider("Mode4[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel5 = hslider("Mode5[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
not(x) = abs(x-1);
mute1 = not(max(0,sel1-2));
mute2 = not(max(0,sel2-2));
mute3 = not(max(0,sel3-2));
mute4 = not(max(0,sel4-2));
mute5 = not(max(0,sel5-2));
bypass(switch, block) = _ <: select2(switch, _, block);
bswitch1 = max(0,sel1-1);
bswitch2 = max(0,sel2-1);
bswitch3 = max(0,sel3-1);
bswitch4 = max(0,sel4-1);
bswitch5 = max(0,sel5-1);
vmeter1(x,y) = attach(x, envelop(abs(x)+abs(y)) : vbargraph("v1[nomidi:no][tooltip: Sum of Band1 ]", -70, +5)),y;
vmeter2(x,y) = attach(x, envelop(abs(x)+abs(y)) : vbargraph("v2[nomidi:no][tooltip: Sum of Band2 ]", -70, +5)),y;
vmeter3(x,y) = attach(x, envelop(abs(x)+abs(y)) : vbargraph("v3[nomidi:no][tooltip: Sum of Band3 ]", -70, +5)),y;
vmeter4(x,y) = attach(x, envelop(abs(x)+abs(y)) : vbargraph("v4[nomidi:no][tooltip: Sum of Band4 ]", -70, +5)),y;
vmeter5(x,y) = attach(x, envelop(abs(x)+abs(y)) : vbargraph("v5[nomidi:no][tooltip: Sum of Band5 ]", -70, +5)),y;
process = (_,_):geqs: ( gcomp5s , gcomp4s , gcomp3s, gcomp2s, gcomp1s) :>(_,_) with {
gcomp1s = ba.bypass2(bswitch1,co.compressor_stereo(ratio1,-push1,attack1,release1)):*(Makeup1),*(Makeup1) : vmeter1;
gcomp2s = ba.bypass2(bswitch2,co.compressor_stereo(ratio2,-push2,attack2,release2)):*(Makeup2),*(Makeup2) : vmeter2;
gcomp3s = ba.bypass2(bswitch3,co.compressor_stereo(ratio3,-push3,attack3,release3)):*(Makeup3),*(Makeup3) : vmeter3;
gcomp4s = ba.bypass2(bswitch4,co.compressor_stereo(ratio4,-push4,attack4,release4)):*(Makeup4),*(Makeup4) : vmeter4;
gcomp5s = ba.bypass2(bswitch5,co.compressor_stereo(ratio5,-push5,attack5,release5)):*(Makeup5),*(Makeup5) : vmeter5;
};
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
cross5 = _,!,!,!,!,_,!,!,!,!,!,_,!,!,!,!,_,!,!,!,!,!,_,!,!,!,!,_,!,!,!,!,!,_,!,!,!,!,_,!,!,!,!,!,_,!,!,!,!,_ ;
geqs = (geq,geq) <: cross5;
ratio1 = hslider("[9] Ratio1 [tooltip: Compression ratio]",2,1,100,0.1);
attack1 = hslider("[A] Attack1 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release1 = hslider("[B] Release1 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio2 = hslider("[9] Ratio2 [tooltip: Compression ratio]",2,1,100,0.1);
attack2 = hslider("[A] Attack2 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release2 = hslider("[B] Release2 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio3 = hslider("[9] Ratio3 [tooltip: Compression ratio]",2,1,100,0.1);
attack3 = hslider("[A] Attack3 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release3 = hslider("[B] Release3 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio4 = hslider("[9] Ratio4 [tooltip: Compression ratio]",2,1,100,0.1);
attack4 = hslider("[A] Attack4 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release4 = hslider("[B] Release4 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio5 = hslider("[9] Ratio5 [tooltip: Compression ratio]",2,1,100,0.1);
attack5 = hslider("[A] Attack5 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release5 = hslider("[B] Release5 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
Makeup1 = mute1* (not(bswitch1)*(push1-safe1) : ba.db2linear : si.smooth(0.999));
Makeup2 = mute2* (not(bswitch2)*(push2-safe2) : ba.db2linear : si.smooth(0.999));
Makeup3 = mute3* (not(bswitch3)*(push3-safe3) : ba.db2linear : si.smooth(0.999));
Makeup4 = mute4* (not(bswitch4)*(push4-safe4) : ba.db2linear : si.smooth(0.999));
Makeup5 = mute5* (not(bswitch5)*(push5-safe5) : ba.db2linear : si.smooth(0.999));
|
ff7e02f32313b2cb69e20d2f1247ea799e09840562e355a6799d6a86c3d6faf8
|
simonvanderveldt/guitarix
|
mbc.dsp
|
declare id "mbc";
declare name "Multi Band Compressor";
declare shortname "MB Compressor";
declare category "Guitar Effects";
declare description "Multi Band Compressor contributed by kokoko3k";
import("stdfaust.lib");
import("reduce.lib");
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[tooltip:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[tooltip:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[tooltip:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[tooltip:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[tooltip:no]", -70, +5));
vmeter6(x) = attach(x, envelop(x) : vbargraph("v6[tooltip:no]", -70, +5));
vmeter7(x) = attach(x, envelop(x) : vbargraph("v7[tooltip:no]", -70, +5));
vmeter8(x) = attach(x, envelop(x) : vbargraph("v8[tooltip:no]", -70, +5));
vmeter9(x) = attach(x, envelop(x) : vbargraph("v9[tooltip:no]", -70, +5));
vmeter10(x) = attach(x, envelop(x) : vbargraph("v10[tooltip:no]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096) ; // : max(ba.db2linear(-70)) : ba.linear2db;
//Mono
process = geq : ( gcomp5s , gcomp4s , gcomp3s, gcomp2s, gcomp1s) :>_ with {
gcomp1s = vmeter6:ba.bypass1(bswitch1,co.compressor_mono(ratio1,-push1,attack1,release1)):*(Makeup1) : vmeter1;
gcomp2s = vmeter7:ba.bypass1(bswitch2,co.compressor_mono(ratio2,-push2,attack2,release2)):*(Makeup2) : vmeter2;
gcomp3s = vmeter8:ba.bypass1(bswitch3,co.compressor_mono(ratio3,-push3,attack3,release3)):*(Makeup3) : vmeter3;
gcomp4s = vmeter9:ba.bypass1(bswitch4,co.compressor_mono(ratio4,-push4,attack4,release4)):*(Makeup4) : vmeter4;
gcomp5s = vmeter10:ba.bypass1(bswitch5,co.compressor_mono(ratio5,-push5,attack5,release5)):*(Makeup5) : vmeter5;
};
sel1 = hslider("Mode1[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel2 = hslider("Mode2[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel3 = hslider("Mode3[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel4 = hslider("Mode4[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel5 = hslider("Mode5[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
not(x) = abs(x-1);
mute1 = not(max(0,sel1-2));
mute2 = not(max(0,sel2-2));
mute3 = not(max(0,sel3-2));
mute4 = not(max(0,sel4-2));
mute5 = not(max(0,sel5-2));
bypass(switch, block) = _ <: select2(switch, _, block);
bswitch1 = max(0,sel1-1);
bswitch2 = max(0,sel2-1);
bswitch3 = max(0,sel3-1);
bswitch4 = max(0,sel4-1);
bswitch5 = max(0,sel5-1);
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
ratio1 = hslider("[9] Ratio1 [tooltip: Compression ratio]",2,1,100,0.1);
attack1 = hslider("[A] Attack1 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release1 = hslider("[B] Release1 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio2 = hslider("[9] Ratio2 [tooltip: Compression ratio]",2,1,100,0.1);
attack2 = hslider("[A] Attack2 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release2 = hslider("[B] Release2 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio3 = hslider("[9] Ratio3 [tooltip: Compression ratio]",2,1,100,0.1);
attack3 = hslider("[A] Attack3 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release3 = hslider("[B] Release3 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio4 = hslider("[9] Ratio4 [tooltip: Compression ratio]",2,1,100,0.1);
attack4 = hslider("[A] Attack4 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release4 = hslider("[B] Release4 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio5 = hslider("[9] Ratio5 [tooltip: Compression ratio]",2,1,100,0.1);
attack5 = hslider("[A] Attack5 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release5 = hslider("[B] Release5 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
push1 = hslider("[5] Makeup1 [tooltip: Post amplification and threshold]" , 13, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
push2 = hslider("[5] Makeup2 [tooltip: Post amplification and threshold]" , 10, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
push3 = hslider("[5] Makeup3 [tooltip: Post amplification and threshold]" , 4, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
push4 = hslider("[5] Makeup4 [tooltip: Post amplification and threshold]" , 8, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
push5 = hslider("[5] Makeup5 [tooltip: Post amplification and threshold]" , 11, -50, +50, 0.1) ; // threshold-=push ; makeup+=push
safe1 = hslider("[6] MakeupThreshold1 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
safe2 = hslider("[6] MakeupThreshold2 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
safe3 = hslider("[6] MakeupThreshold3 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
safe4 = hslider("[6] MakeupThreshold4 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
safe5 = hslider("[6] MakeupThreshold5 [tooltip: Threshold correction, an anticlip measure]" , 2, 0, +10, 0.1) ; // makeup-=safe
Makeup1 = mute1* (not(bswitch1)*(push1-safe1) : ba.db2linear : si.smooth(0.999));
Makeup2 = mute2* (not(bswitch2)*(push2-safe2) : ba.db2linear : si.smooth(0.999));
Makeup3 = mute3* (not(bswitch3)*(push3-safe3) : ba.db2linear : si.smooth(0.999));
Makeup4 = mute4* (not(bswitch4)*(push4-safe4) : ba.db2linear : si.smooth(0.999));
Makeup5 = mute5* (not(bswitch5)*(push5-safe5) : ba.db2linear : si.smooth(0.999));
//Low end headsets: 13,10,4,8,11 (split 80,210,1700,5000)
//Mid-high end headsets: 17,20.5,20,10.5,10 (split 44,180,800,5000)
|
https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/LV2/faust/mbc.dsp
|
faust
|
: max(ba.db2linear(-70)) : ba.linear2db;
Mono
threshold-=push ; makeup+=push
threshold-=push ; makeup+=push
threshold-=push ; makeup+=push
threshold-=push ; makeup+=push
threshold-=push ; makeup+=push
makeup-=safe
makeup-=safe
makeup-=safe
makeup-=safe
makeup-=safe
Low end headsets: 13,10,4,8,11 (split 80,210,1700,5000)
Mid-high end headsets: 17,20.5,20,10.5,10 (split 44,180,800,5000)
|
declare id "mbc";
declare name "Multi Band Compressor";
declare shortname "MB Compressor";
declare category "Guitar Effects";
declare description "Multi Band Compressor contributed by kokoko3k";
import("stdfaust.lib");
import("reduce.lib");
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[tooltip:no]", -70, +5));
vmeter2(x) = attach(x, envelop(x) : vbargraph("v2[tooltip:no]", -70, +5));
vmeter3(x) = attach(x, envelop(x) : vbargraph("v3[tooltip:no]", -70, +5));
vmeter4(x) = attach(x, envelop(x) : vbargraph("v4[tooltip:no]", -70, +5));
vmeter5(x) = attach(x, envelop(x) : vbargraph("v5[tooltip:no]", -70, +5));
vmeter6(x) = attach(x, envelop(x) : vbargraph("v6[tooltip:no]", -70, +5));
vmeter7(x) = attach(x, envelop(x) : vbargraph("v7[tooltip:no]", -70, +5));
vmeter8(x) = attach(x, envelop(x) : vbargraph("v8[tooltip:no]", -70, +5));
vmeter9(x) = attach(x, envelop(x) : vbargraph("v9[tooltip:no]", -70, +5));
vmeter10(x) = attach(x, envelop(x) : vbargraph("v10[tooltip:no]", -70, +5));
process = geq : ( gcomp5s , gcomp4s , gcomp3s, gcomp2s, gcomp1s) :>_ with {
gcomp1s = vmeter6:ba.bypass1(bswitch1,co.compressor_mono(ratio1,-push1,attack1,release1)):*(Makeup1) : vmeter1;
gcomp2s = vmeter7:ba.bypass1(bswitch2,co.compressor_mono(ratio2,-push2,attack2,release2)):*(Makeup2) : vmeter2;
gcomp3s = vmeter8:ba.bypass1(bswitch3,co.compressor_mono(ratio3,-push3,attack3,release3)):*(Makeup3) : vmeter3;
gcomp4s = vmeter9:ba.bypass1(bswitch4,co.compressor_mono(ratio4,-push4,attack4,release4)):*(Makeup4) : vmeter4;
gcomp5s = vmeter10:ba.bypass1(bswitch5,co.compressor_mono(ratio5,-push5,attack5,release5)):*(Makeup5) : vmeter5;
};
sel1 = hslider("Mode1[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel2 = hslider("Mode2[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel3 = hslider("Mode3[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel4 = hslider("Mode4[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
sel5 = hslider("Mode5[enum:Compress|Bypass|Mute][tooltip: Compress or Mute the selected band, or Bypass The Compressor]",1,1,3,1);
not(x) = abs(x-1);
mute1 = not(max(0,sel1-2));
mute2 = not(max(0,sel2-2));
mute3 = not(max(0,sel3-2));
mute4 = not(max(0,sel4-2));
mute5 = not(max(0,sel5-2));
bypass(switch, block) = _ <: select2(switch, _, block);
bswitch1 = max(0,sel1-1);
bswitch2 = max(0,sel2-1);
bswitch3 = max(0,sel3-1);
bswitch4 = max(0,sel4-1);
bswitch5 = max(0,sel5-1);
hifr1 =hslider("crossover_b1_b2 [log][name:Crossover B1-B2 (hz)][tooltip: Crossover fi.bandpass frequency]" ,80 , 20, 20000, 1.08);
hifr2 =hslider("crossover_b2_b3 [log][name:Crossover B2-B3 (hz)][tooltip: Crossover fi.bandpass frequency]",210,20,20000,1.08);
hifr3 =hslider("crossover_b3_b4 [log][name:Crossover B3-B4 (hz)][tooltip: Crossover fi.bandpass frequency]",1700,20,20000,1.08);
hifr4 =hslider("crossover_b4_b5 [log][name:Crossover B4-B5 (hz)][tooltip: Crossover fi.bandpass frequency]",5000,20,20000,1.08);
geq = fi.filterbank(3, (hifr1,hifr2,hifr3,hifr4));
ratio1 = hslider("[9] Ratio1 [tooltip: Compression ratio]",2,1,100,0.1);
attack1 = hslider("[A] Attack1 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release1 = hslider("[B] Release1 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio2 = hslider("[9] Ratio2 [tooltip: Compression ratio]",2,1,100,0.1);
attack2 = hslider("[A] Attack2 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release2 = hslider("[B] Release2 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio3 = hslider("[9] Ratio3 [tooltip: Compression ratio]",2,1,100,0.1);
attack3 = hslider("[A] Attack3 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release3 = hslider("[B] Release3 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio4 = hslider("[9] Ratio4 [tooltip: Compression ratio]",2,1,100,0.1);
attack4 = hslider("[A] Attack4 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release4 = hslider("[B] Release4 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
ratio5 = hslider("[9] Ratio5 [tooltip: Compression ratio]",2,1,100,0.1);
attack5 = hslider("[A] Attack5 [tooltip: Time before the compressor starts to kick in]", 0.012, 0.001, 1, 0.001);
release5 = hslider("[B] Release5 [tooltip: Time before the compressor releases the sound]", 1.25, 0.01, 10, 0.01);
Makeup1 = mute1* (not(bswitch1)*(push1-safe1) : ba.db2linear : si.smooth(0.999));
Makeup2 = mute2* (not(bswitch2)*(push2-safe2) : ba.db2linear : si.smooth(0.999));
Makeup3 = mute3* (not(bswitch3)*(push3-safe3) : ba.db2linear : si.smooth(0.999));
Makeup4 = mute4* (not(bswitch4)*(push4-safe4) : ba.db2linear : si.smooth(0.999));
Makeup5 = mute5* (not(bswitch5)*(push5-safe5) : ba.db2linear : si.smooth(0.999));
|
4f324017d7be0eba27be0c1173902f2cc1d930d4f70e7231af445f6548df5279
|
Frando/rust-faust
|
volume.dsp
|
declare name "dbmeter";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
//-------------------------------------------------
// A dB Vumeter
//-------------------------------------------------
import("stdfaust.lib");
envelop = abs : max(ba.db2linear(-70)) : ba.linear2db : min(10) : max ~ -(320.0/ma.SR);
process = _ : envelop : vbargraph("channel0[unit:dB]", -70, 10) : _;
|
https://raw.githubusercontent.com/Frando/rust-faust/b3238eabdb45f77d1cd27bfbdb90818935e71cfd/examples/example-dbmeter-jack/dsp/volume.dsp
|
faust
|
-------------------------------------------------
A dB Vumeter
-------------------------------------------------
|
declare name "dbmeter";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
import("stdfaust.lib");
envelop = abs : max(ba.db2linear(-70)) : ba.linear2db : min(10) : max ~ -(320.0/ma.SR);
process = _ : envelop : vbargraph("channel0[unit:dB]", -70, 10) : _;
|
878a682230747731509ba67cd589ca779d6c8489f8c9a8dd67d9cb575f75f483
|
Frando/rust-faust
|
volume.dsp
|
declare name "volumecontrol";
declare version "1.0";
declare author "Franz Heinzmann";
declare license "BSD";
declare options "[osc:on]";
import("stdfaust.lib");
stereo(func) = _,_ : func(_),func(_) : _,_;
volumeM = *(vslider("volume", 0, -70, +4, 0.1) : ba.db2linear : si.smoo);
volume = stereo(volumeM);
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
vumeterM(x) = envelop(x) : vbargraph("level[2][unit:dB][style:dB]", -60, +5);
vumeterS(a,b) = a,b <: _,_,_,_ :
(a, b, attach(0,vumeterM((a+b)/2)), 0) :>
_,_;
vumeter = _,_ : vumeterS(_,_);
faderchannel = _,_ : volume : vumeter : _,_;
process = faderchannel;
|
https://raw.githubusercontent.com/Frando/rust-faust/b3238eabdb45f77d1cd27bfbdb90818935e71cfd/examples/example-jack/dsp/volume.dsp
|
faust
|
declare name "volumecontrol";
declare version "1.0";
declare author "Franz Heinzmann";
declare license "BSD";
declare options "[osc:on]";
import("stdfaust.lib");
stereo(func) = _,_ : func(_),func(_) : _,_;
volumeM = *(vslider("volume", 0, -70, +4, 0.1) : ba.db2linear : si.smoo);
volume = stereo(volumeM);
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
vumeterM(x) = envelop(x) : vbargraph("level[2][unit:dB][style:dB]", -60, +5);
vumeterS(a,b) = a,b <: _,_,_,_ :
(a, b, attach(0,vumeterM((a+b)/2)), 0) :>
_,_;
vumeter = _,_ : vumeterS(_,_);
faderchannel = _,_ : volume : vumeter : _,_;
process = faderchannel;
|
|
661f832787ac5bbb7ab2760704a51d3ca29b1a196b29dc435a718a610a074ff0
|
jcelerier/guitarixlib
|
valve_rect.dsp
|
// dsp algorithm from swh ladspa valve_rect plugin (Steve Harrison)
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
sag = vslider("sag", 0, 0, 1, 0.01);
dist_p = vslider("dist", 0, 0, 1, 0.01);
process(x) = valve.vt(dist, q(x), x)
with {
dist = dist_p * 40 + 0.1;
q(x) = lp1tm1(x) * sag - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
|
https://raw.githubusercontent.com/jcelerier/guitarixlib/9c2947507cd13b82554020e669a85244e867d584/guitarix/valve_rect.dsp
|
faust
|
dsp algorithm from swh ladspa valve_rect plugin (Steve Harrison)
|
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
sag = vslider("sag", 0, 0, 1, 0.01);
dist_p = vslider("dist", 0, 0, 1, 0.01);
process(x) = valve.vt(dist, q(x), x)
with {
dist = dist_p * 40 + 0.1;
q(x) = lp1tm1(x) * sag - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
|
91125e627ce23c7daff4941365672a7ee2aaf437043fd2d9e2fdf5b761443301
|
jcelerier/guitarixlib
|
jconv_post.dsp
|
declare id "jconv";
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
wet = vslider("wet_dry[name:wet/dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
deltadelay = vslider("diff_delay[name:Delta Delay][tooltip:delay left or right channel by the specified amount (unit: ms)]", 0, -100, 100, 0.01)*ba.millisec : smoothi(0.999);
gain = vslider("gain[name:Gain][tooltip:gain trim for processed signal (unit: dB)]", 0, -20, 20, 0.1) : ba.db2linear : smoothi(0.999);
jbal = vslider("balance[name:Balance][tooltip:left/right trim for processed signal]", 0, -1, 1, 0.1): smoothi(0.999);
bal = balance_ctrl.bal;
/*
** We want to move the sound source to the right
** with increasing values of deltadelay; this means
** we have to delay the left channel
*/
//bug in faust (at least up to version 0.9.27)
//rdelay = -deltadelay : max(0);
//ldelay = deltadelay : max(0);
rdelay = select2(deltadelay > 0, -deltadelay, 0);
ldelay = select2(deltadelay < 0, deltadelay, 0);
fx = gain * de.fdelay1s(ldelay), gain * de.fdelay1s(rdelay) : balance(jbal);
process = *(dry), *(dry), (*(wet),*(wet) : fx) :> balance(bal);
|
https://raw.githubusercontent.com/jcelerier/guitarixlib/9c2947507cd13b82554020e669a85244e867d584/guitarix/jconv_post.dsp
|
faust
|
** We want to move the sound source to the right
** with increasing values of deltadelay; this means
** we have to delay the left channel
bug in faust (at least up to version 0.9.27)
rdelay = -deltadelay : max(0);
ldelay = deltadelay : max(0);
|
declare id "jconv";
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
wet = vslider("wet_dry[name:wet/dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
deltadelay = vslider("diff_delay[name:Delta Delay][tooltip:delay left or right channel by the specified amount (unit: ms)]", 0, -100, 100, 0.01)*ba.millisec : smoothi(0.999);
gain = vslider("gain[name:Gain][tooltip:gain trim for processed signal (unit: dB)]", 0, -20, 20, 0.1) : ba.db2linear : smoothi(0.999);
jbal = vslider("balance[name:Balance][tooltip:left/right trim for processed signal]", 0, -1, 1, 0.1): smoothi(0.999);
bal = balance_ctrl.bal;
rdelay = select2(deltadelay > 0, -deltadelay, 0);
ldelay = select2(deltadelay < 0, deltadelay, 0);
fx = gain * de.fdelay1s(ldelay), gain * de.fdelay1s(rdelay) : balance(jbal);
process = *(dry), *(dry), (*(wet),*(wet) : fx) :> balance(bal);
|
03a2ea4667ccc0512cb188db144649b0b996bbb5efcd660419cc50a26f973442
|
jcelerier/guitarixlib
|
gxamp17.dsp
|
declare id "12AT7 feedback"; // in amp tube ba.selector
declare name "12AT7 feedback";
declare samplerate "96000";
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
/****************************************************************
** Tube Preamp Emulation stage 1 - 2
* 12AT7 feedback
*/
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
tubeax(preamp,gain1) = hgroup("stage1", stage1) :
hgroup("stage2", stage2)
with {
atten = 0.6;
stage1 = tubestage(TB_12AT7_68k,86.0,2700.0,2.617753) : - ~ (atten*tubestage(TB_12AT7_250k,132.0,1500.0,1.887332)) : *(preamp):
fi.lowpass(1,6531.0) : tubestage(TB_12AT7_250k,132.0,1500.0,1.887332): + ~ (atten*tubestage(TB_12AT7_250k,194.0,820.0,1.256962));
stage2 = fi.lowpass(1,6531.0) : tubestage(TB_12AT7_250k,194.0,820.0,1.256962) : *(gain1);
} ;
process = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
drive = ampctrl.drive;
wet_dry = ampctrl.wet_dry;
preamp = ampctrl.preamp;
gain1 = ampctrl.gain1;
/*
drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : ba.db2linear : smoothi(0.999);
gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : ba.db2linear : smoothi(0.999);
*/
};
|
https://raw.githubusercontent.com/jcelerier/guitarixlib/9c2947507cd13b82554020e669a85244e867d584/guitarix/gxamp17.dsp
|
faust
|
in amp tube ba.selector
***************************************************************
** Tube Preamp Emulation stage 1 - 2
* 12AT7 feedback
drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : ba.db2linear : smoothi(0.999);
gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : ba.db2linear : smoothi(0.999);
|
declare name "12AT7 feedback";
declare samplerate "96000";
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
tubeax(preamp,gain1) = hgroup("stage1", stage1) :
hgroup("stage2", stage2)
with {
atten = 0.6;
stage1 = tubestage(TB_12AT7_68k,86.0,2700.0,2.617753) : - ~ (atten*tubestage(TB_12AT7_250k,132.0,1500.0,1.887332)) : *(preamp):
fi.lowpass(1,6531.0) : tubestage(TB_12AT7_250k,132.0,1500.0,1.887332): + ~ (atten*tubestage(TB_12AT7_250k,194.0,820.0,1.256962));
stage2 = fi.lowpass(1,6531.0) : tubestage(TB_12AT7_250k,194.0,820.0,1.256962) : *(gain1);
} ;
process = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
drive = ampctrl.drive;
wet_dry = ampctrl.wet_dry;
preamp = ampctrl.preamp;
gain1 = ampctrl.gain1;
};
|
da9c8f49f353b5c0409d2191ae021754ae8723265e60d7e399c756f4c69499ed
|
jcelerier/guitarixlib
|
gxamp11.dsp
|
declare id "12AU7 feedback"; // in amp tube ba.selector
declare name "12AU7 feedback";
declare samplerate "96000";
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
/****************************************************************
** Tube Preamp Emulation stage 1 - 2
* 12AU7 feedback
*/
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
tubeax(preamp,gain1) = hgroup("stage1", stage1) :
hgroup("stage2", stage2)
with {
stage1 = tubestage130_10(TB_12AU7_68k,86.0,2700.0,1.257240) : - ~ tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162) : *(preamp):
fi.lowpass(1,6531.0) : tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162): + ~ tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487) ;
stage2 = fi.lowpass(1,6531.0) : tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487) : *(gain1);
} ;
process = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
drive = ampctrl.drive;
wet_dry = ampctrl.wet_dry;
preamp = ampctrl.preamp;
gain1 = ampctrl.gain1;
/*
drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : ba.db2linear : smoothi(0.999);
gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : ba.db2linear : smoothi(0.999);
*/
} ;
|
https://raw.githubusercontent.com/jcelerier/guitarixlib/9c2947507cd13b82554020e669a85244e867d584/guitarix/gxamp11.dsp
|
faust
|
in amp tube ba.selector
***************************************************************
** Tube Preamp Emulation stage 1 - 2
* 12AU7 feedback
drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : ba.db2linear : smoothi(0.999);
gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : ba.db2linear : smoothi(0.999);
|
declare name "12AU7 feedback";
declare samplerate "96000";
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
tubeax(preamp,gain1) = hgroup("stage1", stage1) :
hgroup("stage2", stage2)
with {
stage1 = tubestage130_10(TB_12AU7_68k,86.0,2700.0,1.257240) : - ~ tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162) : *(preamp):
fi.lowpass(1,6531.0) : tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162): + ~ tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487) ;
stage2 = fi.lowpass(1,6531.0) : tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487) : *(gain1);
} ;
process = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
drive = ampctrl.drive;
wet_dry = ampctrl.wet_dry;
preamp = ampctrl.preamp;
gain1 = ampctrl.gain1;
} ;
|
0b03d7e4ba520b94db2c241cb6f694cddebb95b3ebdd67b63728777e7675c9da
|
jcelerier/guitarixlib
|
gxamp9.dsp
|
declare id "12ax7 feedback"; // in amp tube ba.selector
declare name "12ax7 feedback";
declare samplerate "96000";
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
/****************************************************************
** Tube Preamp Emulation stage 1 - 2
* 12ax7 feedback
*/
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
tubeax(preamp,gain1) = hgroup("stage1", stage1) :
hgroup("stage2", stage2)
with {
atten = 0.6;
stage1 = tubestage(TB_12AX7_68k,86.0,2700.0,1.581656) : - ~ (atten*tubestage(TB_12AX7_250k,132.0,1500.0,1.204285)) : *(preamp):
fi.lowpass(1,6531.0) : tubestage(TB_12AX7_250k,132.0,1500.0,1.204285): + ~ (atten*tubestage(TB_12AX7_250k,194.0,820.0,0.840702));
stage2 = fi.lowpass(1,6531.0) : tubestage(TB_12AX7_250k,194.0,820.0,0.840702) : *(gain1);
} ;
process = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
drive = ampctrl.drive;
wet_dry = ampctrl.wet_dry;
preamp = ampctrl.preamp;
gain1 = ampctrl.gain1;
/*
drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : ba.db2linear : smoothi(0.999);
gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : ba.db2linear : smoothi(0.999);
*/
};
|
https://raw.githubusercontent.com/jcelerier/guitarixlib/9c2947507cd13b82554020e669a85244e867d584/guitarix/gxamp9.dsp
|
faust
|
in amp tube ba.selector
***************************************************************
** Tube Preamp Emulation stage 1 - 2
* 12ax7 feedback
drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : ba.db2linear : smoothi(0.999);
gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : ba.db2linear : smoothi(0.999);
|
declare name "12ax7 feedback";
declare samplerate "96000";
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
tubeax(preamp,gain1) = hgroup("stage1", stage1) :
hgroup("stage2", stage2)
with {
atten = 0.6;
stage1 = tubestage(TB_12AX7_68k,86.0,2700.0,1.581656) : - ~ (atten*tubestage(TB_12AX7_250k,132.0,1500.0,1.204285)) : *(preamp):
fi.lowpass(1,6531.0) : tubestage(TB_12AX7_250k,132.0,1500.0,1.204285): + ~ (atten*tubestage(TB_12AX7_250k,194.0,820.0,0.840702));
stage2 = fi.lowpass(1,6531.0) : tubestage(TB_12AX7_250k,194.0,820.0,0.840702) : *(gain1);
} ;
process = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
drive = ampctrl.drive;
wet_dry = ampctrl.wet_dry;
preamp = ampctrl.preamp;
gain1 = ampctrl.gain1;
};
|
79fc6cf6dcaeebc8c71fd17e74be5c8828c1ff4dcbbc8eadfa6adab86c6dffeb
|
jcelerier/guitarixlib
|
gxamp13.dsp
|
declare id "6DJ8 feedback"; // in amp tube ba.selector
declare name "6DJ8 feedback";
declare samplerate "96000";
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
/****************************************************************
** Tube Preamp Emulation stage 1 - 2
*/
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
tubeax(preamp,gain1) = hgroup("stage1", stage1) :
hgroup("stage2", stage2)
with {
atten = 0.6;
stage1 = tubestage130_20(TB_6DJ8_68k,86.0,2700.0,1.863946) : - ~ (atten*tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609)) : *(preamp):
fi.lowpass(1,6531.0) : tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609): + ~ (atten*tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043));
stage2 = fi.lowpass(1,6531.0) : tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043) : *(gain1);
};
process = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
drive = ampctrl.drive;
wet_dry = ampctrl.wet_dry;
preamp = ampctrl.preamp;
gain1 = ampctrl.gain1;
/*
drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : ba.db2linear : smoothi(0.999);
gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : ba.db2linear : smoothi(0.999);
*/
};
|
https://raw.githubusercontent.com/jcelerier/guitarixlib/9c2947507cd13b82554020e669a85244e867d584/guitarix/gxamp13.dsp
|
faust
|
in amp tube ba.selector
***************************************************************
** Tube Preamp Emulation stage 1 - 2
drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : ba.db2linear : smoothi(0.999);
gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : ba.db2linear : smoothi(0.999);
|
declare name "6DJ8 feedback";
declare samplerate "96000";
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
tubeax(preamp,gain1) = hgroup("stage1", stage1) :
hgroup("stage2", stage2)
with {
atten = 0.6;
stage1 = tubestage130_20(TB_6DJ8_68k,86.0,2700.0,1.863946) : - ~ (atten*tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609)) : *(preamp):
fi.lowpass(1,6531.0) : tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609): + ~ (atten*tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043));
stage2 = fi.lowpass(1,6531.0) : tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043) : *(gain1);
};
process = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
drive = ampctrl.drive;
wet_dry = ampctrl.wet_dry;
preamp = ampctrl.preamp;
gain1 = ampctrl.gain1;
};
|
75be65d54d8593ffc401292d07848f6005b62547bb4972978efac096ef6c562d
|
jcelerier/guitarixlib
|
gxdistortion.dsp
|
declare id "gxdistortion";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
F = 300; //nentry("split_low_freq", 250, 20, 600, 10);
F1 = 1200; //nentry("split_middle_freq", 650, 600, 1250, 10);
F2 = 3200; //nentry("split_high_freq", 1250, 1250, 12000, 10);
/**********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
***********************************************************************/
//------------------------------ ba.count and ba.take --------------------------------------
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
//------------------------------ low/high-passfilters --------------------------------------
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
S = (O-parity)/2; // current section number
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
//------------------------------ an.analyzer --------------------------------------
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
/**********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completely to > 0.9.27
***********************************************************************/
//----------distortion---------
/* 2 exp() because of valve.vt */
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1.0 - lp2tm1(x) * 1.02 - 1.0 : clip(-1.0,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
vt = valve.vt(dist, q) : ma.neg : valve.vt(dist, q) : ma.neg with
{
q_p = 0.9;
dist_p = 1.7;
q = -q_p*-q_p*-q_p;
dist = pow(10,dist_p);
};
//-distortion
distdrive(drive) = wet_dry_mix(wet_dry, _: distortion) with {
//drive = vslider("drive", 0.35, 0, 1, 0.01);
//h = (2.0): ba.db2linear; //1,2589412
//l = (4.0): ba.db2linear; //1,584893192
//mh = (4.0): ba.db2linear; //1,584893192
//ml = (2.5): ba.db2linear; //1,333521432
distortion1 = _:ef.cubicnl(0.45*drive,0.0): *(1.2589412); // l
distortion2 = _:ef.cubicnl(0.4*drive,0.0) : *(1.584893192); // h
distortion3 = _:ef.cubicnl(1.0*drive,0.0) : *(1.584893192); //ml
distortion4 = _:ef.cubicnl(0.6*drive,0.0) : *(1.333521432); //mh
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,F1,F2)) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
wet_dry = (drive - 0.5) * 2;
};
clipit = min(0.7) : max(-0.7) ;
gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
wetdry = vslider("wet_dry[name:wet/dry]", 100, 0, 100, 1) : /(100);
drive = vslider("drive", 0.35, 0, 1, 0.01) : smoothi(0.999);
dist(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry):distdrive(drive)):>_
with{
dry = 1 - wetdry;
};
dist1(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry) <: (clipit: ef.cubicnl(drive,0.0) : * (0.5)),distdrive(drive) :>_):>_
with{
dry = 1 - wetdry;
};
/* 4 exp() because of val */
dist2(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry) :val :distdrive(drive)):>_
with{
dry = 1 - wetdry;
};
dist4(drive,wetdry) =_<:(*(dry): gx_drive(drive)),
(*(wetdry) : val <:
(ef.cubicnl(drive,0.0) : * (0.5)),distdrive(drive) :>_):>_
with{
dry = 1 - wetdry;
};
process = distdrive;
|
https://raw.githubusercontent.com/jcelerier/guitarixlib/9c2947507cd13b82554020e669a85244e867d584/guitarix/gxdistortion.dsp
|
faust
|
nentry("split_low_freq", 250, 20, 600, 10);
nentry("split_middle_freq", 650, 600, 1250, 10);
nentry("split_high_freq", 1250, 1250, 12000, 10);
*********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
**********************************************************************
------------------------------ ba.count and ba.take --------------------------------------
------------------------------ low/high-passfilters --------------------------------------
bilinear-transform scale-factor
bilinear-transform scale-factor
current section number
------------------------------ an.analyzer --------------------------------------
*********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completely to > 0.9.27
**********************************************************************
----------distortion---------
2 exp() because of valve.vt
-distortion
drive = vslider("drive", 0.35, 0, 1, 0.01);
h = (2.0): ba.db2linear; //1,2589412
l = (4.0): ba.db2linear; //1,584893192
mh = (4.0): ba.db2linear; //1,584893192
ml = (2.5): ba.db2linear; //1,333521432
l
h
ml
mh
4 exp() because of val
|
declare id "gxdistortion";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("delays.lib");
import("guitarix.lib");
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
val(x) = valve.vt(dist, q(x), x)
with {
dist = 40.1;
q(x) = lp1tm1(x) * 1.0 - lp2tm1(x) * 1.02 - 1.0 : clip(-1.0,-0.01);
lp(a) = *(1 - a) : + ~ *(a);
lp1tm1 = abs <: lp(0.9999), _ : max;
avgs = lp1tm1 : avg;
avg_size = ma.SR/9;
avg(x) = x - de.delay1s(avg_size,x) : + ~ _ : /(avg_size);
lp2tm1 = avgs : lp(0.999);
};
vt = valve.vt(dist, q) : ma.neg : valve.vt(dist, q) : ma.neg with
{
q_p = 0.9;
dist_p = 1.7;
q = -q_p*-q_p*-q_p;
dist = pow(10,dist_p);
};
distdrive(drive) = wet_dry_mix(wet_dry, _: distortion) with {
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,F1,F2)) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
wet_dry = (drive - 0.5) * 2;
};
clipit = min(0.7) : max(-0.7) ;
gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
wetdry = vslider("wet_dry[name:wet/dry]", 100, 0, 100, 1) : /(100);
drive = vslider("drive", 0.35, 0, 1, 0.01) : smoothi(0.999);
dist(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry):distdrive(drive)):>_
with{
dry = 1 - wetdry;
};
dist1(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry) <: (clipit: ef.cubicnl(drive,0.0) : * (0.5)),distdrive(drive) :>_):>_
with{
dry = 1 - wetdry;
};
dist2(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry) :val :distdrive(drive)):>_
with{
dry = 1 - wetdry;
};
dist4(drive,wetdry) =_<:(*(dry): gx_drive(drive)),
(*(wetdry) : val <:
(ef.cubicnl(drive,0.0) : * (0.5)),distdrive(drive) :>_):>_
with{
dry = 1 - wetdry;
};
process = distdrive;
|
fdee7e6b54256dd30f0b3694c0f1f88acfbdc4ddd5579056a67d12b38aee4a5e
|
HexHive/datAFLow
|
structure4chris.dsp
|
import("stdfaust.lib");
process = button("play")*no.noise : structure(4,4,200);
//--------------------------------------------------------------------------------------------------
// usage (osx):
// faust2caqt structure4chris.dsp
// open ./structure4chris.app
//--------------------------------------------------------------------------------------------------
//---------------------------------------IMPLEMENTATION---------------------------------------------
//--------------------------------------------------------------------------------------------------
// structure(X,Y,D): a 2D structure of X*Y interconnected nodes
// with a propagation time of D samples between them.
// The structure has a mono input and a stereo output
structure(X,Y,D) = (connections(X,Y, 1,1) : nodes(X, Y)) ~ delaylines(X,Y,D-1) : listen(X,Y, 1,Y/2, X-1, Y/2);
//--------------------------------------------------------------------------------------------------
// creates the connections for a mesh of X*Y nodes with 4 inputs and 4 outputs
// with an injection point at coord x0,y0.
connections(X, Y, x0, y0) = route(X*Y*4+1, X*Y*4,
par(x, X, par(y, Y, connections(x,y))),
in, N(x0,y0),
in, E(x0,y0),
in, S(x0,y0),
in, W(x0,y0)
)
with {
in = X*Y*4 + 1; // additional input for signal injection
// for each node we establish connections with its 4 neighbours
connections(x,y) = N(x,y), S(x,y-1),
S(x,y), N(x,y+1),
W(x,y), E(x-1,y),
E(x,y), W(x+1,y);
N(x,y) = (1 + 0 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
E(x,y) = (1 + 1 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
S(x,y) = (1 + 2 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
W(x,y) = (1 + 3 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
};
//--------------------------------------------------------------------------------------------------
// Among the X*Y nodes, listen to the node of coordinates (x,y)
listen(X, Y, x0, y0, x1, y1) = route( X*Y*4, 2,
N(x0,y0), 1,
E(x0,y0), 1,
S(x0,y0), 1,
W(x0,y0), 1,
N(x1,y1), 2,
E(x1,y1), 2,
S(x1,y1), 2,
W(x1,y1), 2
)
with {
N(x,y) = (1 + 0 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
E(x,y) = (1 + 1 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
S(x,y) = (1 + 2 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
W(x,y) = (1 + 3 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
};
//--------------------------------------------------------------------------------------------------
// the X*Y nodes with specific borders
nodes(X,Y) =
// the X*Y nodes
par (x, X, north),
par (y, Y-2, (west, par (x, X-2, node), east)),
par (x, X, south)
with {
// regular nodes
node(n,e,s,w) = (e+s+w)/3, (n+s+w)/3, (n+e+w)/3, (n+e+s)/3;
// border nodes
north(n,e,s,w) = 0, 0, filter(s), 0;
east(n,e,s,w) = 0, 0, 0, filter(w);
south(n,e,s,w) = filter(n), 0, 0, 0;
west(n,e,s,w) = 0, filter(e), 0, 0;
// common filter inside each border node
filter = fi.lowpass(3,4000);
};
//--------------------------------------------------------------------------------------------------
// X*Y*4 parallel delay lines
delaylines(X,Y,D) = par(i, X*Y*4, @(D));
|
https://raw.githubusercontent.com/HexHive/datAFLow/b9f3cbc42b1970f8655817c9fb67b1eaba3ae4c0/evaluation/ddfuzz/seeds/faust/structure4chris.dsp
|
faust
|
--------------------------------------------------------------------------------------------------
usage (osx):
faust2caqt structure4chris.dsp
open ./structure4chris.app
--------------------------------------------------------------------------------------------------
---------------------------------------IMPLEMENTATION---------------------------------------------
--------------------------------------------------------------------------------------------------
structure(X,Y,D): a 2D structure of X*Y interconnected nodes
with a propagation time of D samples between them.
The structure has a mono input and a stereo output
--------------------------------------------------------------------------------------------------
creates the connections for a mesh of X*Y nodes with 4 inputs and 4 outputs
with an injection point at coord x0,y0.
additional input for signal injection
for each node we establish connections with its 4 neighbours
--------------------------------------------------------------------------------------------------
Among the X*Y nodes, listen to the node of coordinates (x,y)
--------------------------------------------------------------------------------------------------
the X*Y nodes with specific borders
the X*Y nodes
regular nodes
border nodes
common filter inside each border node
--------------------------------------------------------------------------------------------------
X*Y*4 parallel delay lines
|
import("stdfaust.lib");
process = button("play")*no.noise : structure(4,4,200);
structure(X,Y,D) = (connections(X,Y, 1,1) : nodes(X, Y)) ~ delaylines(X,Y,D-1) : listen(X,Y, 1,Y/2, X-1, Y/2);
connections(X, Y, x0, y0) = route(X*Y*4+1, X*Y*4,
par(x, X, par(y, Y, connections(x,y))),
in, N(x0,y0),
in, E(x0,y0),
in, S(x0,y0),
in, W(x0,y0)
)
with {
connections(x,y) = N(x,y), S(x,y-1),
S(x,y), N(x,y+1),
W(x,y), E(x-1,y),
E(x,y), W(x+1,y);
N(x,y) = (1 + 0 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
E(x,y) = (1 + 1 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
S(x,y) = (1 + 2 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
W(x,y) = (1 + 3 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
};
listen(X, Y, x0, y0, x1, y1) = route( X*Y*4, 2,
N(x0,y0), 1,
E(x0,y0), 1,
S(x0,y0), 1,
W(x0,y0), 1,
N(x1,y1), 2,
E(x1,y1), 2,
S(x1,y1), 2,
W(x1,y1), 2
)
with {
N(x,y) = (1 + 0 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
E(x,y) = (1 + 1 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
S(x,y) = (1 + 2 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
W(x,y) = (1 + 3 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
};
nodes(X,Y) =
par (x, X, north),
par (y, Y-2, (west, par (x, X-2, node), east)),
par (x, X, south)
with {
node(n,e,s,w) = (e+s+w)/3, (n+s+w)/3, (n+e+w)/3, (n+e+s)/3;
north(n,e,s,w) = 0, 0, filter(s), 0;
east(n,e,s,w) = 0, 0, 0, filter(w);
south(n,e,s,w) = filter(n), 0, 0, 0;
west(n,e,s,w) = 0, filter(e), 0, 0;
filter = fi.lowpass(3,4000);
};
delaylines(X,Y,D) = par(i, X*Y*4, @(D));
|
a882726e5ff497c90cb19ac25abf7601126afa405490a9e0fef84cce06009ded
|
JDCAudio/Stray_virtual-synth
|
oscExperimentation1.0.dsp
|
import("stdfaust.lib");
//define samplerate
sr = ma.SR;
twopi = 2.0*ma.PI;
//define waveform in table
ts = 1<<16; //size = 65536 samples
time = (+(1) ~ _) , 1 : - ;
sinewave = ((float(time) / float(ts)) * twopi) : sin;
phase = os.phasor(ts,freq);
//read from table
sin_osc(freq) = rdtable(ts,sinewave,int(phase));
//generate a one sample impulse from the gate
trig = pm.impulseExcitation(reset);
freq = hslider("freq", 100, 0, 1600, 0.001);
process = sin_osc(freq);
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/oscExperimentation1.0.dsp
|
faust
|
define samplerate
define waveform in table
size = 65536 samples
read from table
generate a one sample impulse from the gate
|
import("stdfaust.lib");
sr = ma.SR;
twopi = 2.0*ma.PI;
time = (+(1) ~ _) , 1 : - ;
sinewave = ((float(time) / float(ts)) * twopi) : sin;
phase = os.phasor(ts,freq);
sin_osc(freq) = rdtable(ts,sinewave,int(phase));
trig = pm.impulseExcitation(reset);
freq = hslider("freq", 100, 0, 1600, 0.001);
process = sin_osc(freq);
|
7451e33a6449e5d23b82d7d023ca482ad86f3540b56accd2819ab7b2a9942587
|
JDCAudio/Stray_virtual-synth
|
NoiseWave2.dsp
|
import("stdfaust.lib");
freq = hslider("Freq",440,50,2000,0.1);
rand = no.noise : ba.latch(ba.beat(60));
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("gate");
};
f = freq + rand;
process = os.osc(f) * envelope;
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/d8eec109c51547fd9bc7311bbd1a833791f39476/WaveGenerationTests/OriginalTests/NoiseWave2.dsp
|
faust
|
import("stdfaust.lib");
freq = hslider("Freq",440,50,2000,0.1);
rand = no.noise : ba.latch(ba.beat(60));
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("gate");
};
f = freq + rand;
process = os.osc(f) * envelope;
|
|
e19fcec512ad52ada149cabc1697cbfe74c44907d105e3c53bd6d1929fbb0ac0
|
JDCAudio/Stray_virtual-synth
|
oscExperimentation1.2.dsp
|
import("stdfaust.lib");
//define samplerate
twopi = 2.0*ma.PI;
//define base waveform in table
tableSize = 1<<16; //size = 65536 samples
time = (+(1) ~ _) , 1 : - ;
sinewave = ((float(time) / float(tableSize)) * twopi) : sin;
//Define index
readIndex = int(os.phasor(tableSize,freq));
writeIndex = readIndex : de.delay(32,32);
writeStream = no.noise;
//read from table
sin_osc(freq) = rwtable(tableSize,sinewave,writeStream,writeIndex,readIndex);
freq = hslider("freq", 100, 0, 1600, 0.001);
switch = button("toggle") : ba.toggle;
process = switch*sin_osc(freq);
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/oscExperimentation1.2.dsp
|
faust
|
define samplerate
define base waveform in table
size = 65536 samples
Define index
read from table
|
import("stdfaust.lib");
twopi = 2.0*ma.PI;
time = (+(1) ~ _) , 1 : - ;
sinewave = ((float(time) / float(tableSize)) * twopi) : sin;
readIndex = int(os.phasor(tableSize,freq));
writeIndex = readIndex : de.delay(32,32);
writeStream = no.noise;
sin_osc(freq) = rwtable(tableSize,sinewave,writeStream,writeIndex,readIndex);
freq = hslider("freq", 100, 0, 1600, 0.001);
switch = button("toggle") : ba.toggle;
process = switch*sin_osc(freq);
|
c08091cbb1d3aa44d031fa2bf839b1828c057f40eaa9c07de73938e8fa6b0eeb
|
JDCAudio/Stray_virtual-synth
|
polymidi.dsp
|
import("stdfaust.lib");
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("[5]gate");
};
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq),os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave))
with{
wave = nentry("[0]Waveform",0,0,3,1);
freq = hslider("[1]freq",440,50,2000,0.01);
};
process = vgroup("Synth",waveGenerator * envelope);
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/polymidi.dsp
|
faust
|
import("stdfaust.lib");
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("[5]gate");
};
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq),os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave))
with{
wave = nentry("[0]Waveform",0,0,3,1);
freq = hslider("[1]freq",440,50,2000,0.01);
};
process = vgroup("Synth",waveGenerator * envelope);
|
|
227eb29743801c83701c2ef5b6b08bb683a685fb1eff45d2e3f465ce63fdd277
|
JDCAudio/Stray_virtual-synth
|
polymidiam.dsp
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq),os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave))
with{
wave = nentry("[0]Waveform",0,0,3,1);
freq = hslider("[1]freq",440,50,2000,0.01);
};
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("[5]gate");
};
am = hgroup("[2]AM",modulator)
with{
modulator = ((1-modDepth) + os.osc(modFreq)*0.5+0.5)*modDepth;
modFreq = hslider("[0]Modulator Frequency[style:knob]",20,0.01,2000,0.01);
modDepth = hslider("[1]Modulator Depth[style:knob]",0.5,0,1,0.01);
};
process = vgroup("Synth",(waveGenerator*am) * envelope);
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/polymidiam.dsp
|
faust
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq),os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave))
with{
wave = nentry("[0]Waveform",0,0,3,1);
freq = hslider("[1]freq",440,50,2000,0.01);
};
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("[5]gate");
};
am = hgroup("[2]AM",modulator)
with{
modulator = ((1-modDepth) + os.osc(modFreq)*0.5+0.5)*modDepth;
modFreq = hslider("[0]Modulator Frequency[style:knob]",20,0.01,2000,0.01);
modDepth = hslider("[1]Modulator Depth[style:knob]",0.5,0,1,0.01);
};
process = vgroup("Synth",(waveGenerator*am) * envelope);
|
|
4df1f362549c818ae5a425e5e36b441aa4809534c1996eaae3a897ecc9e45043
|
JDCAudio/Stray_virtual-synth
|
VariableAmpList.dsp
|
import("stdfaust.lib");
//N = order of interpolation
N = 15;
//I = number of iterations for various parameters
I = N+1;
//x used to calculate current location in waveform
x = os.phasor(I, freq);
//initialize list of inteeger x values
xCoords = par(i,I,int(i));
//Sliders for all amplitudes of integer values
ampList = hgroup("[2]Amplitudes",par(i,I,vslider("A%i",0,-1,1,0.01)));
//do the interpolation
result = x, ampList : it.lagrangeInterpolation(N,xCoords);
//basic midi and envelope
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
//gain = hslider("[4]gain",1,0,1,0.01);
gate = button("gate");
};
process = result * envelope;
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/953e9fbb8c14f9a1072cddc0decf2af8231cd6c6/WaveGenerationTests/OriginalTests/VariableAmpList.dsp
|
faust
|
N = order of interpolation
I = number of iterations for various parameters
x used to calculate current location in waveform
initialize list of inteeger x values
Sliders for all amplitudes of integer values
do the interpolation
basic midi and envelope
gain = hslider("[4]gain",1,0,1,0.01);
|
import("stdfaust.lib");
N = 15;
I = N+1;
x = os.phasor(I, freq);
xCoords = par(i,I,int(i));
ampList = hgroup("[2]Amplitudes",par(i,I,vslider("A%i",0,-1,1,0.01)));
result = x, ampList : it.lagrangeInterpolation(N,xCoords);
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gate = button("gate");
};
process = result * envelope;
|
54a464dab6c1f79df83d361ba7f4b31893994908db8a4ad4806c9f5f419d27fd
|
JDCAudio/Stray_virtual-synth
|
VariableAmpClipped.dsp
|
import("stdfaust.lib");
//N = order of interpolation
N = 5;
//I = number of iterations for various parameters
I = N+1;
//x used to calculate current location in waveform
x = os.phasor(I, freq);
//initialize list of inteeger x values
xCoords = par(i,I,int(i));
//Sliders for all amplitudes of integer values
ampList = hgroup("[2]Amplitudes",par(i,I,vslider("A%i",0,-1,1,0.01)));
//do the interpolation
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
result = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
//basic midi and envelope
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
//gain = hslider("[4]gain",1,0,1,0.01);
gate = button("gate");
};
process = result * envelope;
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/953e9fbb8c14f9a1072cddc0decf2af8231cd6c6/WaveGenerationTests/OriginalTests/VariableAmpClipped.dsp
|
faust
|
N = order of interpolation
I = number of iterations for various parameters
x used to calculate current location in waveform
initialize list of inteeger x values
Sliders for all amplitudes of integer values
do the interpolation
basic midi and envelope
gain = hslider("[4]gain",1,0,1,0.01);
|
import("stdfaust.lib");
N = 5;
I = N+1;
x = os.phasor(I, freq);
xCoords = par(i,I,int(i));
ampList = hgroup("[2]Amplitudes",par(i,I,vslider("A%i",0,-1,1,0.01)));
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
result = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gate = button("gate");
};
process = result * envelope;
|
6ab162bcc675bde743a58c6b11109d64f641580369b11f2fedb6d8df5525cb24
|
JDCAudio/Stray_virtual-synth
|
NoiseWave1.dsp
|
import("stdfaust.lib");
triangleWave = waveform{0,0.25,0.5,0.75,1,0.75,0.5,0.25,0,-0.25,-0.5,-0.75,-1,-0.75,-.5,-0.25};
squareWave = waveform{0,1,1,1,1,1,1,0,-1,-1,-1,-1,-1,-1,-1,0};
testOsc(freq) = squareWave,int(os.phasor(16,freq)) : rdtable;
freq = hslider("freq",440,50,2000,0.01);
rIdx = os.phasor(16, freq);
wIdx = ba.period(hslider("writeSpeed",16,1,16,0.01));
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("gate");
};
noise = no.lfnoise(freq) * hslider("noiseGain",0.5,0,1,0.01);
process = it.frwtable(1,16,os.sinwaveform(16),wIdx,(testOsc(freq) * noise),rIdx) * envelope;
//process = triangleOsc(freq) * envelope;
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/d8eec109c51547fd9bc7311bbd1a833791f39476/WaveGenerationTests/OriginalTests/NoiseWave1.dsp
|
faust
|
process = triangleOsc(freq) * envelope;
|
import("stdfaust.lib");
triangleWave = waveform{0,0.25,0.5,0.75,1,0.75,0.5,0.25,0,-0.25,-0.5,-0.75,-1,-0.75,-.5,-0.25};
squareWave = waveform{0,1,1,1,1,1,1,0,-1,-1,-1,-1,-1,-1,-1,0};
testOsc(freq) = squareWave,int(os.phasor(16,freq)) : rdtable;
freq = hslider("freq",440,50,2000,0.01);
rIdx = os.phasor(16, freq);
wIdx = ba.period(hslider("writeSpeed",16,1,16,0.01));
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("gate");
};
noise = no.lfnoise(freq) * hslider("noiseGain",0.5,0,1,0.01);
process = it.frwtable(1,16,os.sinwaveform(16),wIdx,(testOsc(freq) * noise),rIdx) * envelope;
|
1aabf99aa5761b7df7532d2286a1c9943f577b8754ff07a22242a525fea5ee6a
|
JDCAudio/Stray_virtual-synth
|
SubtractivePROG.dsp
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq+fm)*am,os.triangle(freq+fm)*am,os.square(freq+fm)*am,os.sawtooth(freq+fm)*am, no.noise : ba.selectn(5,wave))
with{
freq = hslider("[0]freq",440,50,2000,0.01);
wave = nentry("[1]Waveform",0,0,4,1);
am = ((1-amDepth) + os.osc(amFreq)*0.5+0.5)*amDepth;
amFreq = hslider("[2]AM Freq[style:knob]",20,0.01,2000,0.01);
amDepth = hslider("[3]AM Depth[style:knob]",0.5,0,1,0.01);
fm = fmMod*fmCheck;
fmMod = os.osc(fmFreq) * fmDepth;
fmCheck = checkbox("[4]FM On/Off");
fmFreq = hslider("[5]FM Freq[style:knob]",20,0.1,2000,0.01);
fmDepth = hslider("[6]FM Depth[style:knob]",100,0,1000,0.01);
};
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("Synth", waveGenerator * envelope);
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/SubtractivePROG.dsp
|
faust
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq+fm)*am,os.triangle(freq+fm)*am,os.square(freq+fm)*am,os.sawtooth(freq+fm)*am, no.noise : ba.selectn(5,wave))
with{
freq = hslider("[0]freq",440,50,2000,0.01);
wave = nentry("[1]Waveform",0,0,4,1);
am = ((1-amDepth) + os.osc(amFreq)*0.5+0.5)*amDepth;
amFreq = hslider("[2]AM Freq[style:knob]",20,0.01,2000,0.01);
amDepth = hslider("[3]AM Depth[style:knob]",0.5,0,1,0.01);
fm = fmMod*fmCheck;
fmMod = os.osc(fmFreq) * fmDepth;
fmCheck = checkbox("[4]FM On/Off");
fmFreq = hslider("[5]FM Freq[style:knob]",20,0.1,2000,0.01);
fmDepth = hslider("[6]FM Depth[style:knob]",100,0,1000,0.01);
};
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("Synth", waveGenerator * envelope);
|
|
03dc468988e1711f8c9b9826363097ca8e002013c5445277ed4859ba371ac69c
|
JDCAudio/Stray_virtual-synth
|
polymidiamfmPROG.dsp
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq+fm)*am,os.triangle(freq+fm)*am,os.square(freq+fm)*am,os.sawtooth(freq+fm)*am : ba.selectn(4,wave))
with{
freq = hslider("[0]freq",440,50,2000,0.01);
wave = nentry("[1]Waveform",0,0,3,1);
am = ((1-amDepth) + os.osc(amFreq)*0.5+0.5)*amDepth;
amFreq = hslider("[2]AM Freq[style:knob]",20,0.01,2000,0.01);
amDepth = hslider("[3]AM Depth[style:knob]",0.5,0,1,0.01);
fm = os.osc(fmFreq) * fmDepth;
fmFreq = hslider("[4]FM Freq[style:knob]",20,0.1,2000,0.01);
fmDepth = hslider("[5]FM Depth[style:knob]",100,0,1000,0.01);
};
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("Synth", waveGenerator * envelope);
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/polymidiamfmPROG.dsp
|
faust
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq+fm)*am,os.triangle(freq+fm)*am,os.square(freq+fm)*am,os.sawtooth(freq+fm)*am : ba.selectn(4,wave))
with{
freq = hslider("[0]freq",440,50,2000,0.01);
wave = nentry("[1]Waveform",0,0,3,1);
am = ((1-amDepth) + os.osc(amFreq)*0.5+0.5)*amDepth;
amFreq = hslider("[2]AM Freq[style:knob]",20,0.01,2000,0.01);
amDepth = hslider("[3]AM Depth[style:knob]",0.5,0,1,0.01);
fm = os.osc(fmFreq) * fmDepth;
fmFreq = hslider("[4]FM Freq[style:knob]",20,0.1,2000,0.01);
fmDepth = hslider("[5]FM Depth[style:knob]",100,0,1000,0.01);
};
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("Synth", waveGenerator * envelope);
|
|
c4271d5a9275481ee30f678a0ca106c4f498c5021d27414ee3a0216409b7748b
|
JDCAudio/Stray_virtual-synth
|
SubtractiveFixed.dsp
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq+fm)*am,os.triangle(freq+fm)*am,os.square(freq+fm)*am,os.sawtooth(freq+fm)*am, no.noise : ba.selectn(5,wave))
with{
freq = hslider("[0]freq",440,50,2000,0.01);
wave = nentry("[1]Waveform",0,0,4,1);
am = ((1-amDepth) + os.osc(amFreq)*0.5+0.5)*amDepth;
amFreq = hslider("[2]AM Freq[style:knob]",20,0.01,2000,0.01);
amDepth = hslider("[3]AM Depth[style:knob]",0.5,0,1,0.01);
fm = fmMod*fmCheck;
fmMod = os.osc(fmFreq) * fmDepth;
fmCheck = checkbox("[4]FM On/Off");
fmFreq = hslider("[5]FM Freq[style:knob]",20,0.1,2000,0.01);
fmDepth = hslider("[6]FM Depth[style:knob]",100,0,1000,0.01);
};
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("[5]gate");
};
subtractive = waveGenerator : hgroup("[2]Filter",fi.resonlp(resFreq,q,1))
with{
cutOff = hslider("[0]Cutoff Freq[style:knob]",2000,50,10000,0.01);
q = hslider("[1]Q[style:knob]",5,1,30,0.1);
lfoFreq = hslider("[2]LFO Freq[style:knob]",10,0.1,20,0.01);
lfoDepth = hslider("[3]LFO Depth[style:knob]",500,1,10000,1);
resFreq = cutOff + os.osc(lfoFreq)*lfoDepth : max(30);
};
process = vgroup("Synth", subtractive * envelope);
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/SubtractiveFixed.dsp
|
faust
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq+fm)*am,os.triangle(freq+fm)*am,os.square(freq+fm)*am,os.sawtooth(freq+fm)*am, no.noise : ba.selectn(5,wave))
with{
freq = hslider("[0]freq",440,50,2000,0.01);
wave = nentry("[1]Waveform",0,0,4,1);
am = ((1-amDepth) + os.osc(amFreq)*0.5+0.5)*amDepth;
amFreq = hslider("[2]AM Freq[style:knob]",20,0.01,2000,0.01);
amDepth = hslider("[3]AM Depth[style:knob]",0.5,0,1,0.01);
fm = fmMod*fmCheck;
fmMod = os.osc(fmFreq) * fmDepth;
fmCheck = checkbox("[4]FM On/Off");
fmFreq = hslider("[5]FM Freq[style:knob]",20,0.1,2000,0.01);
fmDepth = hslider("[6]FM Depth[style:knob]",100,0,1000,0.01);
};
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("[5]gate");
};
subtractive = waveGenerator : hgroup("[2]Filter",fi.resonlp(resFreq,q,1))
with{
cutOff = hslider("[0]Cutoff Freq[style:knob]",2000,50,10000,0.01);
q = hslider("[1]Q[style:knob]",5,1,30,0.1);
lfoFreq = hslider("[2]LFO Freq[style:knob]",10,0.1,20,0.01);
lfoDepth = hslider("[3]LFO Depth[style:knob]",500,1,10000,1);
resFreq = cutOff + os.osc(lfoFreq)*lfoDepth : max(30);
};
process = vgroup("Synth", subtractive * envelope);
|
|
d9dec7606a15ccb94e0c5e10a9b84a661318d7e68bf9f1dee76cbbfde2811c5d
|
JDCAudio/Stray_virtual-synth
|
Subtractive.dsp
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq+fm)*am,os.triangle(freq+fm)*am,os.square(freq+fm)*am,os.sawtooth(freq+fm)*am, no.noise : ba.selectn(5,wave))
with{
freq = hslider("[0]freq",440,50,2000,0.01);
wave = nentry("[1]Waveform",0,0,4,1);
am = ((1-amDepth) + os.osc(amFreq)*0.5+0.5)*amDepth;
amFreq = hslider("[2]AM Freq[style:knob]",20,0.01,2000,0.01);
amDepth = hslider("[3]AM Depth[style:knob]",0.5,0,1,0.01);
fm = fmMod*fmCheck;
fmMod = os.osc(fmFreq) * fmDepth;
fmCheck = checkbox("[4]FM On/Off");
fmFreq = hslider("[5]FM Freq[style:knob]",20,0.1,2000,0.01);
fmDepth = hslider("[6]FM Depth[style:knob]",100,0,1000,0.01);
};
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("[5]gate");
};
subtractive = waveGenerator : hgroup("[2]Filter",fi.resonlp(resFreq,q,1))
with{
cutOff = hslider("[0]Cutoff Freq[style:knob]",10,0.1,20,0.01);
q = hslider("[1]Q[style:knob]",5,1,30,0.1);
lfoFreq = hslider("[2]LFO Freq[style:knob]",10,0.1,20,0.01);
lfoDepth = hslider("[3]LFO Depth[style:knob]",500,1,10000,1);
resFreq = cutOff + os.osc(lfoFreq)*lfoDepth : max(30);
};
process = vgroup("Synth", subtractive * envelope);
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/Subtractive.dsp
|
faust
|
import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq+fm)*am,os.triangle(freq+fm)*am,os.square(freq+fm)*am,os.sawtooth(freq+fm)*am, no.noise : ba.selectn(5,wave))
with{
freq = hslider("[0]freq",440,50,2000,0.01);
wave = nentry("[1]Waveform",0,0,4,1);
am = ((1-amDepth) + os.osc(amFreq)*0.5+0.5)*amDepth;
amFreq = hslider("[2]AM Freq[style:knob]",20,0.01,2000,0.01);
amDepth = hslider("[3]AM Depth[style:knob]",0.5,0,1,0.01);
fm = fmMod*fmCheck;
fmMod = os.osc(fmFreq) * fmDepth;
fmCheck = checkbox("[4]FM On/Off");
fmFreq = hslider("[5]FM Freq[style:knob]",20,0.1,2000,0.01);
fmDepth = hslider("[6]FM Depth[style:knob]",100,0,1000,0.01);
};
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("[5]gate");
};
subtractive = waveGenerator : hgroup("[2]Filter",fi.resonlp(resFreq,q,1))
with{
cutOff = hslider("[0]Cutoff Freq[style:knob]",10,0.1,20,0.01);
q = hslider("[1]Q[style:knob]",5,1,30,0.1);
lfoFreq = hslider("[2]LFO Freq[style:knob]",10,0.1,20,0.01);
lfoDepth = hslider("[3]LFO Depth[style:knob]",500,1,10000,1);
resFreq = cutOff + os.osc(lfoFreq)*lfoDepth : max(30);
};
process = vgroup("Synth", subtractive * envelope);
|
|
5aefa18fac1ed85b8e7e2c81628f6f0e15db3537c21aab383e0192fd72bc4303
|
JDCAudio/Stray_virtual-synth
|
AmpList.dsp
|
import("stdfaust.lib");
//perlin style noise begins with predefined values at set integers
//test waveforms
yCoords1 = (0, 0.5, 1.0, 0.5, 0, -0.5, -1.0, -0.5);
yCoords2 = (0, 1.0, 1.0, 1.0, 0, -1.0, -1.0, -1.0);
yCoords3 = (0, 0.0, 1.0, 0.0, 0, 0.0, -1.0, 0.0);
yCoords4 = (0, 1.0, 0.75, 0.25, 0, -0.25, -0.75, -1.0);
yCoords5 = (0,no.noise,no.noise,no.noise,0,no.noise,no.noise,no.noise);
ampList = hgroup("[2]Amplitudes",a0, a1, a2, a3, a4, a5, a6, a7)
with{
a0 = vslider("0",0,-1,1,0.01);
a1 = vslider("1",0,-1,1,0.01);
a2 = vslider("2",0,-1,1,0.01);
a3 = vslider("3",0,-1,1,0.01);
a4 = vslider("4",0,-1,1,0.01);
a5 = vslider("5",0,-1,1,0.01);
a6 = vslider("6",0,-1,1,0.01);
a7 = vslider("7",0,-1,1,0.01);
};
//yCoords6 = ampList;
xCoords = (0,1,2,3,4,5,6,7);
//No lists in faust, use paralell
//Use interpolation to find in-between values
/*x , yCoords : lagrangeInterpolation(N, xCoordsList) : _
N: order of the interpolator, known at compile-time
xCoordsList: a list of N + 1 elements determining the x-axis spacing of the points, known at compile-time
x: an x-axis position to interpolate between the y-values
yCoords: N + 1 elements determining the values of the interpolation points */
N = 7;
x = os.phasor(8, freq);
//do the interpolation
result = x, ampList : it.lagrangeInterpolation(N,xCoords);
//basic midi and envelope
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("gate");
};
process = result * envelope;
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/a2b38509b36e6fe675f82b89f3347ab207ffd812/WaveGenerationTests/OriginalTests/AmpList.dsp
|
faust
|
perlin style noise begins with predefined values at set integers
test waveforms
yCoords6 = ampList;
No lists in faust, use paralell
Use interpolation to find in-between values
x , yCoords : lagrangeInterpolation(N, xCoordsList) : _
N: order of the interpolator, known at compile-time
xCoordsList: a list of N + 1 elements determining the x-axis spacing of the points, known at compile-time
x: an x-axis position to interpolate between the y-values
yCoords: N + 1 elements determining the values of the interpolation points
do the interpolation
basic midi and envelope
|
import("stdfaust.lib");
yCoords1 = (0, 0.5, 1.0, 0.5, 0, -0.5, -1.0, -0.5);
yCoords2 = (0, 1.0, 1.0, 1.0, 0, -1.0, -1.0, -1.0);
yCoords3 = (0, 0.0, 1.0, 0.0, 0, 0.0, -1.0, 0.0);
yCoords4 = (0, 1.0, 0.75, 0.25, 0, -0.25, -0.75, -1.0);
yCoords5 = (0,no.noise,no.noise,no.noise,0,no.noise,no.noise,no.noise);
ampList = hgroup("[2]Amplitudes",a0, a1, a2, a3, a4, a5, a6, a7)
with{
a0 = vslider("0",0,-1,1,0.01);
a1 = vslider("1",0,-1,1,0.01);
a2 = vslider("2",0,-1,1,0.01);
a3 = vslider("3",0,-1,1,0.01);
a4 = vslider("4",0,-1,1,0.01);
a5 = vslider("5",0,-1,1,0.01);
a6 = vslider("6",0,-1,1,0.01);
a7 = vslider("7",0,-1,1,0.01);
};
xCoords = (0,1,2,3,4,5,6,7);
N = 7;
x = os.phasor(8, freq);
result = x, ampList : it.lagrangeInterpolation(N,xCoords);
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[1]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("gate");
};
process = result * envelope;
|
69608704ca0fbdfe34a3259e1f862e57c96a719e0b381f6c1570e822eae78b3c
|
JDCAudio/Stray_virtual-synth
|
ModListVariableWave.dsp
|
import("stdfaust.lib");
modF0 = vslider("h:Modulation/h:[1]Modulation Frequency/[0]mod0[style:knob]",0,0,20,0.01);
modF1 = vslider("h:Modulation/h:[1]Modulation Frequency/[1]mod1[style:knob]",0,0,20,0.01);
modF2 = vslider("h:Modulation/h:[1]Modulation Frequency/[2]mod2[style:knob]",0,0,20,0.01);
modF3 = vslider("h:Modulation/h:[1]Modulation Frequency/[3]mod3[style:knob]",0,0,20,0.01);
modF4 = vslider("h:Modulation/h:[1]Modulation Frequency/[4]mod4[style:knob]",0,0,20,0.01);
modF5 = vslider("h:Modulation/h:[1]Modulation Frequency/[5]mod5[style:knob]",0,0,20,0.01);
modA0 = vslider("h:Modulation/h:[2]Modulation Amplitude/[0]modA0[style:knob]",0,0,1,0.01);
modA1 = vslider("h:Modulation/h:[2]Modulation Amplitude/[1]modA1[style:knob]",0,0,1,0.01);
modA2 = vslider("h:Modulation/h:[2]Modulation Amplitude/[2]modA2[style:knob]",0,0,1,0.01);
modA3 = vslider("h:Modulation/h:[2]Modulation Amplitude/[3]modA3[style:knob]",0,0,1,0.01);
modA4 = vslider("h:Modulation/h:[2]Modulation Amplitude/[4]modA4[style:knob]",0,0,1,0.01);
modA5 = vslider("h:Modulation/h:[2]Modulation Amplitude/[5]modA5[style:knob]",0,0,1,0.01);
modW0 = nentry("h:Modulation/h:[3]Modulation Waveform/[0]modWave0",0,0,2,1);
modW1 = nentry("h:Modulation/h:[3]Modulation Waveform/[1]modWave1",0,0,2,1);
modW2 = nentry("h:Modulation/h:[3]Modulation Waveform/[2]modWave2",0,0,2,1);
modW3 = nentry("h:Modulation/h:[3]Modulation Waveform/[3]modWave3",0,0,2,1);
modW4 = nentry("h:Modulation/h:[3]Modulation Waveform/[4]modWave4",0,0,2,1);
modW5 = nentry("h:Modulation/h:[3]Modulation Waveform/[5]modWave5",0,0,2,1);
ampList = (a0, a1, a2, a3, a4, a5)
with{
a0 = ba.if(modW0 == 0, os.osc(modF0) * modA0, ba.if(modW0 == 1, os.triangle(modF0) * modA0, ba.if(modW0 == 2, os.sawtooth(modF0))));
a1 = ba.if(modW1 == 0, os.osc(modF1) * modA1, ba.if(modW1 == 1, os.triangle(modF1) * modA1, ba.if(modW1 == 2, os.sawtooth(modF1))));
a2 = ba.if(modW2 == 0, os.osc(modF2) * modA2, ba.if(modW2 == 1, os.triangle(modF2) * modA2, ba.if(modW2 == 2, os.sawtooth(modF2))));
a3 = ba.if(modW3 == 0, os.osc(modF3) * modA3, ba.if(modW3 == 1, os.triangle(modF3) * modA3, ba.if(modW3 == 2, os.sawtooth(modF3))));
a4 = ba.if(modW4 == 0, os.osc(modF4) * modA4, ba.if(modW4 == 1, os.triangle(modF4) * modA4, ba.if(modW4 == 2, os.sawtooth(modF4))));
a5 = ba.if(modW5 == 0, os.osc(modF5) * modA5, ba.if(modW5 == 1, os.triangle(modF5) * modA5, ba.if(modW5 == 2, os.sawtooth(modF5))));
};
xCoords = par(i,I,int(i));
//No lists in faust, use paralell
//Use interpolation to find in-between values
/*x , yCoords : lagrangeInterpolation(N, xCoordsList) : _
N: order of the interpolator, known at compile-time
xCoordsList: a list of N + 1 elements determining the x-axis spacing of the points, known at compile-time
x: an x-axis position to interpolate between the y-values
yCoords: N + 1 elements determining the values of the interpolation points */
N = 5;
I = N+1;
x = os.phasor(I, freq);
//do the interpolation
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
//clipping
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
//basic midi and envelope
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("gate");
};
process = clipResult * envelope;
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/9571e2e12286c75ae495205546dfcfeb63449fe9/WaveGenerationTests/lfoAmplitudeControl/ModListVariableWave.dsp
|
faust
|
No lists in faust, use paralell
Use interpolation to find in-between values
x , yCoords : lagrangeInterpolation(N, xCoordsList) : _
N: order of the interpolator, known at compile-time
xCoordsList: a list of N + 1 elements determining the x-axis spacing of the points, known at compile-time
x: an x-axis position to interpolate between the y-values
yCoords: N + 1 elements determining the values of the interpolation points
do the interpolation
clipping
basic midi and envelope
|
import("stdfaust.lib");
modF0 = vslider("h:Modulation/h:[1]Modulation Frequency/[0]mod0[style:knob]",0,0,20,0.01);
modF1 = vslider("h:Modulation/h:[1]Modulation Frequency/[1]mod1[style:knob]",0,0,20,0.01);
modF2 = vslider("h:Modulation/h:[1]Modulation Frequency/[2]mod2[style:knob]",0,0,20,0.01);
modF3 = vslider("h:Modulation/h:[1]Modulation Frequency/[3]mod3[style:knob]",0,0,20,0.01);
modF4 = vslider("h:Modulation/h:[1]Modulation Frequency/[4]mod4[style:knob]",0,0,20,0.01);
modF5 = vslider("h:Modulation/h:[1]Modulation Frequency/[5]mod5[style:knob]",0,0,20,0.01);
modA0 = vslider("h:Modulation/h:[2]Modulation Amplitude/[0]modA0[style:knob]",0,0,1,0.01);
modA1 = vslider("h:Modulation/h:[2]Modulation Amplitude/[1]modA1[style:knob]",0,0,1,0.01);
modA2 = vslider("h:Modulation/h:[2]Modulation Amplitude/[2]modA2[style:knob]",0,0,1,0.01);
modA3 = vslider("h:Modulation/h:[2]Modulation Amplitude/[3]modA3[style:knob]",0,0,1,0.01);
modA4 = vslider("h:Modulation/h:[2]Modulation Amplitude/[4]modA4[style:knob]",0,0,1,0.01);
modA5 = vslider("h:Modulation/h:[2]Modulation Amplitude/[5]modA5[style:knob]",0,0,1,0.01);
modW0 = nentry("h:Modulation/h:[3]Modulation Waveform/[0]modWave0",0,0,2,1);
modW1 = nentry("h:Modulation/h:[3]Modulation Waveform/[1]modWave1",0,0,2,1);
modW2 = nentry("h:Modulation/h:[3]Modulation Waveform/[2]modWave2",0,0,2,1);
modW3 = nentry("h:Modulation/h:[3]Modulation Waveform/[3]modWave3",0,0,2,1);
modW4 = nentry("h:Modulation/h:[3]Modulation Waveform/[4]modWave4",0,0,2,1);
modW5 = nentry("h:Modulation/h:[3]Modulation Waveform/[5]modWave5",0,0,2,1);
ampList = (a0, a1, a2, a3, a4, a5)
with{
a0 = ba.if(modW0 == 0, os.osc(modF0) * modA0, ba.if(modW0 == 1, os.triangle(modF0) * modA0, ba.if(modW0 == 2, os.sawtooth(modF0))));
a1 = ba.if(modW1 == 0, os.osc(modF1) * modA1, ba.if(modW1 == 1, os.triangle(modF1) * modA1, ba.if(modW1 == 2, os.sawtooth(modF1))));
a2 = ba.if(modW2 == 0, os.osc(modF2) * modA2, ba.if(modW2 == 1, os.triangle(modF2) * modA2, ba.if(modW2 == 2, os.sawtooth(modF2))));
a3 = ba.if(modW3 == 0, os.osc(modF3) * modA3, ba.if(modW3 == 1, os.triangle(modF3) * modA3, ba.if(modW3 == 2, os.sawtooth(modF3))));
a4 = ba.if(modW4 == 0, os.osc(modF4) * modA4, ba.if(modW4 == 1, os.triangle(modF4) * modA4, ba.if(modW4 == 2, os.sawtooth(modF4))));
a5 = ba.if(modW5 == 0, os.osc(modF5) * modA5, ba.if(modW5 == 1, os.triangle(modF5) * modA5, ba.if(modW5 == 2, os.sawtooth(modF5))));
};
xCoords = par(i,I,int(i));
N = 5;
I = N+1;
x = os.phasor(I, freq);
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain*0.3)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01);
gate = button("gate");
};
process = clipResult * envelope;
|
acdcfb1970c817839d3e00429b2547669bf38012f8e8d76a617034474ec44833
|
JDCAudio/Stray_virtual-synth
|
ModListVariableWave(CleanedUp).dsp
|
import("stdfaust.lib");
/*MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values*/
//Amp List Modulation Frequency
modF0 = vslider("h:Modulation/h:[1]Modulation Frequency/[0]mod0[style:knob]",0,0,20,0.01);
modF1 = vslider("h:Modulation/h:[1]Modulation Frequency/[1]mod1[style:knob]",0,0,20,0.01);
modF2 = vslider("h:Modulation/h:[1]Modulation Frequency/[2]mod2[style:knob]",0,0,20,0.01);
modF3 = vslider("h:Modulation/h:[1]Modulation Frequency/[3]mod3[style:knob]",0,0,20,0.01);
//Amp List Modulation Amplitude
modA0 = vslider("h:Modulation/h:[2]Modulation Amplitude/[0]modA0[style:knob]",0,0,1,0.01);
modA1 = vslider("h:Modulation/h:[2]Modulation Amplitude/[1]modA1[style:knob]",0,0,1,0.01);
modA2 = vslider("h:Modulation/h:[2]Modulation Amplitude/[2]modA2[style:knob]",0,0,1,0.01);
modA3 = vslider("h:Modulation/h:[2]Modulation Amplitude/[3]modA3[style:knob]",0,0,1,0.01);
//Amp List Modulation waveform (0 = sin, 1 = triangle, 3 = saw)
modW0 = nentry("h:Modulation/h:[3]Modulation Waveform/[0]modWave0",0,0,2,1);
modW1 = nentry("h:Modulation/h:[3]Modulation Waveform/[1]modWave1",0,0,2,1);
modW2 = nentry("h:Modulation/h:[3]Modulation Waveform/[2]modWave2",0,0,2,1);
modW3 = nentry("h:Modulation/h:[3]Modulation Waveform/[3]modWave3",0,0,2,1);
/*AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list*/
//List of Amplitudes to be sent to interpolator
ampList = (a0, a1, a2, a3)
with{
a0 = ba.if(modW0 == 0, os.osc(modF0) * modA0, ba.if(modW0 == 1, os.triangle(modF0) * modA0, ba.if(modW0 == 2, os.sawtooth(modF0))));
a1 = ba.if(modW1 == 0, os.osc(modF1) * modA1, ba.if(modW1 == 1, os.triangle(modF1) * modA1, ba.if(modW1 == 2, os.sawtooth(modF1))));
a2 = ba.if(modW2 == 0, os.osc(modF2) * modA2, ba.if(modW2 == 1, os.triangle(modF2) * modA2, ba.if(modW2 == 2, os.sawtooth(modF2))));
a3 = ba.if(modW3 == 0, os.osc(modF3) * modA3, ba.if(modW3 == 1, os.triangle(modF3) * modA3, ba.if(modW3 == 2, os.sawtooth(modF3))));
};
//Using the paralell composition again, create a "list" for the integer X values of each amplitude
xCoords = par(i,I,int(i));
/*INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it determines how many values the interpolator is expecting*/
//Order of Interpolation
N = 3;
/*I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now*/
I = N+1;
//Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
x = os.phasor(I, freq);
//do the interpolation
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
/*POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument*/
//clip results between -1 and 1 to ensure the signal will not be clipping the output
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
//basic midi integration through frequency slider
freq = hslider("freq",300,20,3000,0.1);
//Creates ADSR envelope, gate variable is automatically connected to a midi key press
//en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01) * 0.3;
gate = button("gate");
};
//High Pass filter for eliminating any DC offset
filResult = clipResult : fi.highpass(16,15);
//Apply the envelope to the sound
result = filResult * envelope;
process = result;
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/9571e2e12286c75ae495205546dfcfeb63449fe9/WaveGenerationTests/lfoAmplitudeControl/ModListVariableWave(CleanedUp).dsp
|
faust
|
MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values
Amp List Modulation Frequency
Amp List Modulation Amplitude
Amp List Modulation waveform (0 = sin, 1 = triangle, 3 = saw)
AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list
List of Amplitudes to be sent to interpolator
Using the paralell composition again, create a "list" for the integer X values of each amplitude
INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it determines how many values the interpolator is expecting
Order of Interpolation
I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now
Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
do the interpolation
POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument
clip results between -1 and 1 to ensure the signal will not be clipping the output
basic midi integration through frequency slider
Creates ADSR envelope, gate variable is automatically connected to a midi key press
en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
High Pass filter for eliminating any DC offset
Apply the envelope to the sound
|
import("stdfaust.lib");
modF0 = vslider("h:Modulation/h:[1]Modulation Frequency/[0]mod0[style:knob]",0,0,20,0.01);
modF1 = vslider("h:Modulation/h:[1]Modulation Frequency/[1]mod1[style:knob]",0,0,20,0.01);
modF2 = vslider("h:Modulation/h:[1]Modulation Frequency/[2]mod2[style:knob]",0,0,20,0.01);
modF3 = vslider("h:Modulation/h:[1]Modulation Frequency/[3]mod3[style:knob]",0,0,20,0.01);
modA0 = vslider("h:Modulation/h:[2]Modulation Amplitude/[0]modA0[style:knob]",0,0,1,0.01);
modA1 = vslider("h:Modulation/h:[2]Modulation Amplitude/[1]modA1[style:knob]",0,0,1,0.01);
modA2 = vslider("h:Modulation/h:[2]Modulation Amplitude/[2]modA2[style:knob]",0,0,1,0.01);
modA3 = vslider("h:Modulation/h:[2]Modulation Amplitude/[3]modA3[style:knob]",0,0,1,0.01);
modW0 = nentry("h:Modulation/h:[3]Modulation Waveform/[0]modWave0",0,0,2,1);
modW1 = nentry("h:Modulation/h:[3]Modulation Waveform/[1]modWave1",0,0,2,1);
modW2 = nentry("h:Modulation/h:[3]Modulation Waveform/[2]modWave2",0,0,2,1);
modW3 = nentry("h:Modulation/h:[3]Modulation Waveform/[3]modWave3",0,0,2,1);
ampList = (a0, a1, a2, a3)
with{
a0 = ba.if(modW0 == 0, os.osc(modF0) * modA0, ba.if(modW0 == 1, os.triangle(modF0) * modA0, ba.if(modW0 == 2, os.sawtooth(modF0))));
a1 = ba.if(modW1 == 0, os.osc(modF1) * modA1, ba.if(modW1 == 1, os.triangle(modF1) * modA1, ba.if(modW1 == 2, os.sawtooth(modF1))));
a2 = ba.if(modW2 == 0, os.osc(modF2) * modA2, ba.if(modW2 == 1, os.triangle(modF2) * modA2, ba.if(modW2 == 2, os.sawtooth(modF2))));
a3 = ba.if(modW3 == 0, os.osc(modF3) * modA3, ba.if(modW3 == 1, os.triangle(modF3) * modA3, ba.if(modW3 == 2, os.sawtooth(modF3))));
};
xCoords = par(i,I,int(i));
N = 3;
I = N+1;
x = os.phasor(I, freq);
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01) * 0.3;
gate = button("gate");
};
filResult = clipResult : fi.highpass(16,15);
result = filResult * envelope;
process = result;
|
a444bfd67842397b19ab209be6d97e669da3f72e71e2066ba53e45f9de3d3a3b
|
JDCAudio/Stray_virtual-synth
|
withRandomLFO-1.dsp
|
import("stdfaust.lib");
/*MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values*/
//Amp List Modulation Frequency
modF0 = vslider("h:Modulation/h:[1]Modulation Frequency/[0]mod0[style:knob]",0.001,0,20,0.001);
modF1 = vslider("h:Modulation/h:[1]Modulation Frequency/[1]mod1[style:knob]",0.001,0,20,0.001);
modF2 = vslider("h:Modulation/h:[1]Modulation Frequency/[2]mod2[style:knob]",0.001,0,20,0.001);
modF3 = vslider("h:Modulation/h:[1]Modulation Frequency/[3]mod3[style:knob]",0.001,0,20,0.001);
//Amp List Modulation Amplitude
modA0 = vslider("h:Modulation/h:[2]Modulation Amplitude/[0]modA0[style:knob]",0,0,1,0.01);
modA1 = vslider("h:Modulation/h:[2]Modulation Amplitude/[1]modA1[style:knob]",0,0,1,0.01);
modA2 = vslider("h:Modulation/h:[2]Modulation Amplitude/[2]modA2[style:knob]",0,0,1,0.01);
modA3 = vslider("h:Modulation/h:[2]Modulation Amplitude/[3]modA3[style:knob]",0,0,1,0.01);
//Amp List Modulation waveform (0 = sin, 1 = triangle, 2 = saw, 3 = random)
modW0 = nentry("h:Modulation/h:[3]Modulation Waveform/[0]modWave0",0,0,3,1);
modW1 = nentry("h:Modulation/h:[3]Modulation Waveform/[1]modWave1",0,0,3,1);
modW2 = nentry("h:Modulation/h:[3]Modulation Waveform/[2]modWave2",0,0,3,1);
modW3 = nentry("h:Modulation/h:[3]Modulation Waveform/[3]modWave3",0,0,3,1);
nRand = 2;
iRand = nRand + 1;
xRandList = par(i,iRand,int(i));
fRand0 = modF0;
fRand1 = modF1;
fRand2 = modF2;
fRand3 = modF3;
xRand0 = os.phasor(iRand, fRand0);
xRand1 = os.phasor(iRand, fRand1);
xRand2 = os.phasor(iRand, fRand2);
xRand3 = os.phasor(iRand, fRand3);
aNoise0 = par(i,iRand,(no.lfnoise(fRand0)));
aNoise1 = par(i,iRand,(no.lfnoise(fRand1)));
aNoise2 = par(i,iRand,(no.lfnoise(fRand2)));
aNoise3 = par(i,iRand,(no.lfnoise(fRand3)));
lfoInterp0 = xRand0, aNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp1 = xRand1, aNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp2 = xRand2, aNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp3 = xRand3, aNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoRand0 = ba.if(lfoInterp0 > 1.0, 1.0, ba.if(lfoInterp0 < -1.0, -1.0, lfoInterp0));
lfoRand1 = ba.if(lfoInterp1 > 1.0, 1.0, ba.if(lfoInterp1 < -1.0, -1.0, lfoInterp1));
lfoRand2 = ba.if(lfoInterp2 > 1.0, 1.0, ba.if(lfoInterp2 < -1.0, -1.0, lfoInterp2));
lfoRand3 = ba.if(lfoInterp3 > 1.0, 1.0, ba.if(lfoInterp3 < -1.0, -1.0, lfoInterp3));
/*AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list*/
//List of Amplitudes to be sent to interpolator
ampList = (a0, a1, a2, a3)
with{
a0 = ba.if(modW0 == 0, os.osc(modF0), ba.if(modW0 == 1, os.triangle(modF0), ba.if(modW0 == 2, os.sawtooth(modF0), ba.if(modW0 == 3, lfoRand0)))) * modA0;
a1 = ba.if(modW1 == 0, os.osc(modF1), ba.if(modW1 == 1, os.triangle(modF1), ba.if(modW1 == 2, os.sawtooth(modF1), ba.if(modW1 == 3, lfoRand1)))) * modA1;
a2 = ba.if(modW2 == 0, os.osc(modF2), ba.if(modW2 == 1, os.triangle(modF2), ba.if(modW2 == 2, os.sawtooth(modF2), ba.if(modW2 == 3, lfoRand2)))) * modA2;
a3 = ba.if(modW3 == 0, os.osc(modF3), ba.if(modW3 == 1, os.triangle(modF3), ba.if(modW3 == 2, os.sawtooth(modF3), ba.if(modW3 == 3, lfoRand3)))) * modA3;
};
//Using the paralell composition again, create a "list" for the integer X values of each amplitude
xCoords = par(i,I,int(i));
/*INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it determines how many values the interpolator is expecting*/
//Order of Interpolation
N = 3;
/*I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now*/
I = N+1;
//Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
x = os.phasor(I, freq);
//do the interpolation
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
/*POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument*/
//clip results between -1 and 1 to ensure the signal will not be clipping the output
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
//basic midi integration through frequency slider
freq = hslider("freq",300,20,3000,0.1);
//Creates ADSR envelope, gate variable is automatically connected to a midi key press
//en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01) * 0.3;
gate = button("gate");
};
//High Pass filter for eliminating any DC offset
filResult = clipResult : fi.highpass(16,15);
//Apply the envelope to the sound
result = filResult * envelope;
process = result;
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/9571e2e12286c75ae495205546dfcfeb63449fe9/WaveGenerationTests/lfoAmplitudeControl/withRandomLFO-1.dsp
|
faust
|
MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values
Amp List Modulation Frequency
Amp List Modulation Amplitude
Amp List Modulation waveform (0 = sin, 1 = triangle, 2 = saw, 3 = random)
AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list
List of Amplitudes to be sent to interpolator
Using the paralell composition again, create a "list" for the integer X values of each amplitude
INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it determines how many values the interpolator is expecting
Order of Interpolation
I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now
Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
do the interpolation
POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument
clip results between -1 and 1 to ensure the signal will not be clipping the output
basic midi integration through frequency slider
Creates ADSR envelope, gate variable is automatically connected to a midi key press
en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
High Pass filter for eliminating any DC offset
Apply the envelope to the sound
|
import("stdfaust.lib");
modF0 = vslider("h:Modulation/h:[1]Modulation Frequency/[0]mod0[style:knob]",0.001,0,20,0.001);
modF1 = vslider("h:Modulation/h:[1]Modulation Frequency/[1]mod1[style:knob]",0.001,0,20,0.001);
modF2 = vslider("h:Modulation/h:[1]Modulation Frequency/[2]mod2[style:knob]",0.001,0,20,0.001);
modF3 = vslider("h:Modulation/h:[1]Modulation Frequency/[3]mod3[style:knob]",0.001,0,20,0.001);
modA0 = vslider("h:Modulation/h:[2]Modulation Amplitude/[0]modA0[style:knob]",0,0,1,0.01);
modA1 = vslider("h:Modulation/h:[2]Modulation Amplitude/[1]modA1[style:knob]",0,0,1,0.01);
modA2 = vslider("h:Modulation/h:[2]Modulation Amplitude/[2]modA2[style:knob]",0,0,1,0.01);
modA3 = vslider("h:Modulation/h:[2]Modulation Amplitude/[3]modA3[style:knob]",0,0,1,0.01);
modW0 = nentry("h:Modulation/h:[3]Modulation Waveform/[0]modWave0",0,0,3,1);
modW1 = nentry("h:Modulation/h:[3]Modulation Waveform/[1]modWave1",0,0,3,1);
modW2 = nentry("h:Modulation/h:[3]Modulation Waveform/[2]modWave2",0,0,3,1);
modW3 = nentry("h:Modulation/h:[3]Modulation Waveform/[3]modWave3",0,0,3,1);
nRand = 2;
iRand = nRand + 1;
xRandList = par(i,iRand,int(i));
fRand0 = modF0;
fRand1 = modF1;
fRand2 = modF2;
fRand3 = modF3;
xRand0 = os.phasor(iRand, fRand0);
xRand1 = os.phasor(iRand, fRand1);
xRand2 = os.phasor(iRand, fRand2);
xRand3 = os.phasor(iRand, fRand3);
aNoise0 = par(i,iRand,(no.lfnoise(fRand0)));
aNoise1 = par(i,iRand,(no.lfnoise(fRand1)));
aNoise2 = par(i,iRand,(no.lfnoise(fRand2)));
aNoise3 = par(i,iRand,(no.lfnoise(fRand3)));
lfoInterp0 = xRand0, aNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp1 = xRand1, aNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp2 = xRand2, aNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp3 = xRand3, aNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoRand0 = ba.if(lfoInterp0 > 1.0, 1.0, ba.if(lfoInterp0 < -1.0, -1.0, lfoInterp0));
lfoRand1 = ba.if(lfoInterp1 > 1.0, 1.0, ba.if(lfoInterp1 < -1.0, -1.0, lfoInterp1));
lfoRand2 = ba.if(lfoInterp2 > 1.0, 1.0, ba.if(lfoInterp2 < -1.0, -1.0, lfoInterp2));
lfoRand3 = ba.if(lfoInterp3 > 1.0, 1.0, ba.if(lfoInterp3 < -1.0, -1.0, lfoInterp3));
ampList = (a0, a1, a2, a3)
with{
a0 = ba.if(modW0 == 0, os.osc(modF0), ba.if(modW0 == 1, os.triangle(modF0), ba.if(modW0 == 2, os.sawtooth(modF0), ba.if(modW0 == 3, lfoRand0)))) * modA0;
a1 = ba.if(modW1 == 0, os.osc(modF1), ba.if(modW1 == 1, os.triangle(modF1), ba.if(modW1 == 2, os.sawtooth(modF1), ba.if(modW1 == 3, lfoRand1)))) * modA1;
a2 = ba.if(modW2 == 0, os.osc(modF2), ba.if(modW2 == 1, os.triangle(modF2), ba.if(modW2 == 2, os.sawtooth(modF2), ba.if(modW2 == 3, lfoRand2)))) * modA2;
a3 = ba.if(modW3 == 0, os.osc(modF3), ba.if(modW3 == 1, os.triangle(modF3), ba.if(modW3 == 2, os.sawtooth(modF3), ba.if(modW3 == 3, lfoRand3)))) * modA3;
};
xCoords = par(i,I,int(i));
N = 3;
I = N+1;
x = os.phasor(I, freq);
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01) * 0.3;
gate = button("gate");
};
filResult = clipResult : fi.highpass(16,15);
result = filResult * envelope;
process = result;
|
4ba6ad48b8309be1fce20a64977ddfcdd96151bb895538be63381560a0fcc6cf
|
JDCAudio/Stray_virtual-synth
|
smoothCrossing.dsp
|
import("stdfaust.lib");
/*MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values*/
//Amp List Modulation Frequency
modF0 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[0]P0",0.001,0.001,20,0.001);
modF1 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[1]P1",0.001,0.001,20,0.001);
modF2 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[2]P2",0.001,0.001,20,0.001);
modF3 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[3]P3",0.001,0.001,20,0.001);
//Amp List Modulation Amplitude, turn on and off points
modA0 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[0]P0");
modA1 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[1]P1");
modA2 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[2]P2");
modA3 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[3]P3");
//Amp List Modulation waveform (0 = sin, 1 = triangle, 2 = saw, 3 = smooth random, 4 = random)
modW0 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Waveform/[0]P0[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
modW1 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Waveform/[1]P1[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
modW2 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Waveform/[2]P2[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
modW3 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Waveform/[3]P3[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
/*RANDOM LFO SECTION:
In this region, all necessary variables for interpolation are declared and random LFO waves are
generated, one set of 4 smooth random and one set of 4 random*/
//These variables are consistent and can be used for all iterations of the random
nRand = 2;
iRand = nRand + 1;
xRandList = par(i,iRand,int(i));
//Assign modulation frequency variables to new random frequency variables for readability
fRand0 = modF0;
fRand1 = modF1;
fRand2 = modF2;
fRand3 = modF3;
//Seperate "Read Point" X values for each iteration of the random
xRand0 = os.phasor(iRand, fRand0);
xRand1 = os.phasor(iRand, fRand1);
xRand2 = os.phasor(iRand, fRand2);
xRand3 = os.phasor(iRand, fRand3);
//Create 4 seperate lists (parallel) of smooth noise
aSmNoise0 = par(i,iRand,(no.lfnoise(fRand0)));
aSmNoise1 = par(i,iRand,(no.lfnoise(fRand1)));
aSmNoise2 = par(i,iRand,(no.lfnoise(fRand2)));
aSmNoise3 = par(i,iRand,(no.lfnoise(fRand3)));
//Create 4 seperate lists (parallel) of noise
aNoise0 = par(i,iRand,(no.lfnoise0(fRand0)));
aNoise1 = par(i,iRand,(no.lfnoise0(fRand1)));
aNoise2 = par(i,iRand,(no.lfnoise0(fRand2)));
aNoise3 = par(i,iRand,(no.lfnoise0(fRand3)));
//Use lagrange interpolation to connect the random points from previous blocks
lfoSmInterp0 = xRand0, aSmNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp0 = xRand0, aNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp1 = xRand1, aSmNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp1 = xRand1, aNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp2 = xRand2, aSmNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp2 = xRand2, aNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp3 = xRand3, aSmNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp3 = xRand3, aNoise3 : it.lagrangeInterpolation(nRand, xRandList);
//Clip the LFO's to a -1 to 1 range
lfoSmRand0 = ba.if(lfoSmInterp0 > 1.0, 1.0, ba.if(lfoSmInterp0 < -1.0, -1.0, lfoSmInterp0));
lfoRand0 = ba.if(lfoInterp0 > 1.0, 1.0, ba.if(lfoInterp0 < -1.0, -1.0, lfoInterp0));
lfoSmRand1 = ba.if(lfoSmInterp1 > 1.0, 1.0, ba.if(lfoSmInterp1 < -1.0, -1.0, lfoSmInterp1));
lfoRand1 = ba.if(lfoInterp1 > 1.0, 1.0, ba.if(lfoInterp1 < -1.0, -1.0, lfoInterp1));
lfoSmRand2 = ba.if(lfoSmInterp2 > 1.0, 1.0, ba.if(lfoSmInterp2 < -1.0, -1.0, lfoSmInterp2));
lfoRand2 = ba.if(lfoInterp2 > 1.0, 1.0, ba.if(lfoInterp2 < -1.0, -1.0, lfoInterp2));
lfoSmRand3 = ba.if(lfoSmInterp3 > 1.0, 1.0, ba.if(lfoSmInterp3 < -1.0, -1.0, lfoSmInterp3));
lfoRand3 = ba.if(lfoInterp3 > 1.0, 1.0, ba.if(lfoInterp3 < -1.0, -1.0, lfoInterp3));
/*AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list*/
//List of Amplitudes to be sent to interpolator
//aC1 and aC2 provide consistent Zero-crossing points
ampList = (aC1, a0, a1, a2, a3, aC2)
with{
//Nested if/else statements to pick the correct wave for each amplitude point
aC1 = 0;
a0 = ba.if(modW0 == 0, os.osc(modF0), ba.if(modW0 == 1, os.triangle(modF0), ba.if(modW0 == 2, si.smoo(os.sawtooth(modF0)), ba.if(modW0 == 3, lfoSmRand0, ba.if(modW0 == 4, lfoRand0))))) * modA0;
a1 = ba.if(modW1 == 0, os.osc(modF1), ba.if(modW1 == 1, os.triangle(modF1), ba.if(modW1 == 2, si.smoo(os.sawtooth(modF1)), ba.if(modW1 == 3, lfoSmRand1, ba.if(modW1 == 4, lfoRand1))))) * modA1;
a2 = ba.if(modW2 == 0, os.osc(modF2), ba.if(modW2 == 1, os.triangle(modF2), ba.if(modW2 == 2, si.smoo(os.sawtooth(modF2)), ba.if(modW2 == 3, lfoSmRand2, ba.if(modW2 == 4, lfoRand2))))) * modA2;
a3 = ba.if(modW3 == 0, os.osc(modF3), ba.if(modW3 == 1, os.triangle(modF3), ba.if(modW3 == 2, si.smoo(os.sawtooth(modF3)), ba.if(modW3 == 3, lfoSmRand3, ba.if(modW3 == 4, lfoRand3))))) * modA3;
aC2 = 0;
};
//Using the paralell composition again, create a "list" for the integer X values of each amplitude
xCoords = par(i,I,int(i));
/*INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it
determines how many values the interpolator is expecting*/
//Order of Interpolation
N = 5;
/*I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now*/
I = N+1;
//Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
x = os.phasor(I, freq);
//do the interpolation
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
/*POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument*/
//clip results between -1 and 1 to ensure the signal will not be clipping the output
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
//basic midi integration through frequency slider
freq = hslider("freq",300,20,3000,0.1);
//Creates ADSR envelope, gate variable is automatically connected to a midi key press
//en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01) * 0.3;
gate = button("gate");
};
//High Pass filter for eliminating any DC offset
filResult = clipResult : fi.highpass(16,15);
//Apply the envelope to the sound
result = filResult * envelope;
process = result, result;
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/213d5e2abccbd6a22bd0d5e560956c49c08bbde1/WaveGenerationTests/smoothCrossing.dsp
|
faust
|
MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values
Amp List Modulation Frequency
Amp List Modulation Amplitude, turn on and off points
Amp List Modulation waveform (0 = sin, 1 = triangle, 2 = saw, 3 = smooth random, 4 = random)
RANDOM LFO SECTION:
In this region, all necessary variables for interpolation are declared and random LFO waves are
generated, one set of 4 smooth random and one set of 4 random
These variables are consistent and can be used for all iterations of the random
Assign modulation frequency variables to new random frequency variables for readability
Seperate "Read Point" X values for each iteration of the random
Create 4 seperate lists (parallel) of smooth noise
Create 4 seperate lists (parallel) of noise
Use lagrange interpolation to connect the random points from previous blocks
Clip the LFO's to a -1 to 1 range
AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list
List of Amplitudes to be sent to interpolator
aC1 and aC2 provide consistent Zero-crossing points
Nested if/else statements to pick the correct wave for each amplitude point
Using the paralell composition again, create a "list" for the integer X values of each amplitude
INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it
determines how many values the interpolator is expecting
Order of Interpolation
I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now
Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
do the interpolation
POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument
clip results between -1 and 1 to ensure the signal will not be clipping the output
basic midi integration through frequency slider
Creates ADSR envelope, gate variable is automatically connected to a midi key press
en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
High Pass filter for eliminating any DC offset
Apply the envelope to the sound
|
import("stdfaust.lib");
modF0 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[0]P0",0.001,0.001,20,0.001);
modF1 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[1]P1",0.001,0.001,20,0.001);
modF2 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[2]P2",0.001,0.001,20,0.001);
modF3 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[3]P3",0.001,0.001,20,0.001);
modA0 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[0]P0");
modA1 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[1]P1");
modA2 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[2]P2");
modA3 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[3]P3");
modW0 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Waveform/[0]P0[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
modW1 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Waveform/[1]P1[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
modW2 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Waveform/[2]P2[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
modW3 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Waveform/[3]P3[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
nRand = 2;
iRand = nRand + 1;
xRandList = par(i,iRand,int(i));
fRand0 = modF0;
fRand1 = modF1;
fRand2 = modF2;
fRand3 = modF3;
xRand0 = os.phasor(iRand, fRand0);
xRand1 = os.phasor(iRand, fRand1);
xRand2 = os.phasor(iRand, fRand2);
xRand3 = os.phasor(iRand, fRand3);
aSmNoise0 = par(i,iRand,(no.lfnoise(fRand0)));
aSmNoise1 = par(i,iRand,(no.lfnoise(fRand1)));
aSmNoise2 = par(i,iRand,(no.lfnoise(fRand2)));
aSmNoise3 = par(i,iRand,(no.lfnoise(fRand3)));
aNoise0 = par(i,iRand,(no.lfnoise0(fRand0)));
aNoise1 = par(i,iRand,(no.lfnoise0(fRand1)));
aNoise2 = par(i,iRand,(no.lfnoise0(fRand2)));
aNoise3 = par(i,iRand,(no.lfnoise0(fRand3)));
lfoSmInterp0 = xRand0, aSmNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp0 = xRand0, aNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp1 = xRand1, aSmNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp1 = xRand1, aNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp2 = xRand2, aSmNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp2 = xRand2, aNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp3 = xRand3, aSmNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp3 = xRand3, aNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmRand0 = ba.if(lfoSmInterp0 > 1.0, 1.0, ba.if(lfoSmInterp0 < -1.0, -1.0, lfoSmInterp0));
lfoRand0 = ba.if(lfoInterp0 > 1.0, 1.0, ba.if(lfoInterp0 < -1.0, -1.0, lfoInterp0));
lfoSmRand1 = ba.if(lfoSmInterp1 > 1.0, 1.0, ba.if(lfoSmInterp1 < -1.0, -1.0, lfoSmInterp1));
lfoRand1 = ba.if(lfoInterp1 > 1.0, 1.0, ba.if(lfoInterp1 < -1.0, -1.0, lfoInterp1));
lfoSmRand2 = ba.if(lfoSmInterp2 > 1.0, 1.0, ba.if(lfoSmInterp2 < -1.0, -1.0, lfoSmInterp2));
lfoRand2 = ba.if(lfoInterp2 > 1.0, 1.0, ba.if(lfoInterp2 < -1.0, -1.0, lfoInterp2));
lfoSmRand3 = ba.if(lfoSmInterp3 > 1.0, 1.0, ba.if(lfoSmInterp3 < -1.0, -1.0, lfoSmInterp3));
lfoRand3 = ba.if(lfoInterp3 > 1.0, 1.0, ba.if(lfoInterp3 < -1.0, -1.0, lfoInterp3));
ampList = (aC1, a0, a1, a2, a3, aC2)
with{
aC1 = 0;
a0 = ba.if(modW0 == 0, os.osc(modF0), ba.if(modW0 == 1, os.triangle(modF0), ba.if(modW0 == 2, si.smoo(os.sawtooth(modF0)), ba.if(modW0 == 3, lfoSmRand0, ba.if(modW0 == 4, lfoRand0))))) * modA0;
a1 = ba.if(modW1 == 0, os.osc(modF1), ba.if(modW1 == 1, os.triangle(modF1), ba.if(modW1 == 2, si.smoo(os.sawtooth(modF1)), ba.if(modW1 == 3, lfoSmRand1, ba.if(modW1 == 4, lfoRand1))))) * modA1;
a2 = ba.if(modW2 == 0, os.osc(modF2), ba.if(modW2 == 1, os.triangle(modF2), ba.if(modW2 == 2, si.smoo(os.sawtooth(modF2)), ba.if(modW2 == 3, lfoSmRand2, ba.if(modW2 == 4, lfoRand2))))) * modA2;
a3 = ba.if(modW3 == 0, os.osc(modF3), ba.if(modW3 == 1, os.triangle(modF3), ba.if(modW3 == 2, si.smoo(os.sawtooth(modF3)), ba.if(modW3 == 3, lfoSmRand3, ba.if(modW3 == 4, lfoRand3))))) * modA3;
aC2 = 0;
};
xCoords = par(i,I,int(i));
N = 5;
I = N+1;
x = os.phasor(I, freq);
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01) * 0.3;
gate = button("gate");
};
filResult = clipResult : fi.highpass(16,15);
result = filResult * envelope;
process = result, result;
|
f0774033715d541ddac2a20a436d0a679169f8105308322c428cd24d0a60f991
|
JDCAudio/Stray_virtual-synth
|
withRandomLFO-2.dsp
|
import("stdfaust.lib");
/*MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values*/
//Amp List Modulation Frequency
modF0 = vslider("h:Modulation/h:[1]Modulation Frequency/[0]mod0[style:knob]",0.001,0.001,20,0.001);
modF1 = vslider("h:Modulation/h:[1]Modulation Frequency/[1]mod1[style:knob]",0.001,0.001,20,0.001);
modF2 = vslider("h:Modulation/h:[1]Modulation Frequency/[2]mod2[style:knob]",0.001,0.001,20,0.001);
modF3 = vslider("h:Modulation/h:[1]Modulation Frequency/[3]mod3[style:knob]",0.001,0.001,20,0.001);
//Amp List Modulation Amplitude
modA0 = vslider("h:Modulation/h:[2]Modulation Amplitude/[0]modA0[style:knob]",0,0,1.0,0.01);
modA1 = vslider("h:Modulation/h:[2]Modulation Amplitude/[1]modA1[style:knob]",0,0,1.0,0.01);
modA2 = vslider("h:Modulation/h:[2]Modulation Amplitude/[2]modA2[style:knob]",0,0,1.0,0.01);
modA3 = vslider("h:Modulation/h:[2]Modulation Amplitude/[3]modA3[style:knob]",0,0,1.0,0.01);
//Amp List Modulation waveform (0 = sin, 1 = triangle, 2 = saw, 3 = smooth random, 4 = random)
modW0 = nentry("h:Modulation/h:[3]Modulation Waveform/[0]modWave0[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
modW1 = nentry("h:Modulation/h:[3]Modulation Waveform/[1]modWave1[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
modW2 = nentry("h:Modulation/h:[3]Modulation Waveform/[2]modWave2[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
modW3 = nentry("h:Modulation/h:[3]Modulation Waveform/[3]modWave3[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
/*RANDOM LFO SECTION:
In this region, all necessary variables for interpolation are declared and random LFO waves are
generated, one set of 4 smooth random and one set of 4 random*/
//These variables are consistent and can be used for all iterations of the random
nRand = 2;
iRand = nRand + 1;
xRandList = par(i,iRand,int(i));
//Assign modulation frequency variables to new random frequency variables for readability
fRand0 = modF0;
fRand1 = modF1;
fRand2 = modF2;
fRand3 = modF3;
//Seperate "Read Point" X values for each iteration of the random
xRand0 = os.phasor(iRand, fRand0);
xRand1 = os.phasor(iRand, fRand1);
xRand2 = os.phasor(iRand, fRand2);
xRand3 = os.phasor(iRand, fRand3);
//Create 4 seperate lists (parallel) of smooth noise
aSmNoise0 = par(i,iRand,(no.lfnoise(fRand0)));
aSmNoise1 = par(i,iRand,(no.lfnoise(fRand1)));
aSmNoise2 = par(i,iRand,(no.lfnoise(fRand2)));
aSmNoise3 = par(i,iRand,(no.lfnoise(fRand3)));
//Create 4 seperate lists (parallel) of noise
aNoise0 = par(i,iRand,(no.lfnoise0(fRand0)));
aNoise1 = par(i,iRand,(no.lfnoise0(fRand1)));
aNoise2 = par(i,iRand,(no.lfnoise0(fRand2)));
aNoise3 = par(i,iRand,(no.lfnoise0(fRand3)));
//Use lagrange interpolation to connect the random points from previous blocks
lfoSmInterp0 = xRand0, aSmNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp0 = xRand0, aNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp1 = xRand1, aSmNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp1 = xRand1, aNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp2 = xRand2, aSmNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp2 = xRand2, aNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp3 = xRand3, aSmNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp3 = xRand3, aNoise3 : it.lagrangeInterpolation(nRand, xRandList);
//Clip the LFO's to a -1 to 1 range
lfoSmRand0 = ba.if(lfoSmInterp0 > 1.0, 1.0, ba.if(lfoSmInterp0 < -1.0, -1.0, lfoSmInterp0));
lfoRand0 = ba.if(lfoInterp0 > 1.0, 1.0, ba.if(lfoInterp0 < -1.0, -1.0, lfoInterp0));
lfoSmRand1 = ba.if(lfoSmInterp1 > 1.0, 1.0, ba.if(lfoSmInterp1 < -1.0, -1.0, lfoSmInterp1));
lfoRand1 = ba.if(lfoInterp1 > 1.0, 1.0, ba.if(lfoInterp1 < -1.0, -1.0, lfoInterp1));
lfoSmRand2 = ba.if(lfoSmInterp2 > 1.0, 1.0, ba.if(lfoSmInterp2 < -1.0, -1.0, lfoSmInterp2));
lfoRand2 = ba.if(lfoInterp2 > 1.0, 1.0, ba.if(lfoInterp2 < -1.0, -1.0, lfoInterp2));
lfoSmRand3 = ba.if(lfoSmInterp3 > 1.0, 1.0, ba.if(lfoSmInterp3 < -1.0, -1.0, lfoSmInterp3));
lfoRand3 = ba.if(lfoInterp3 > 1.0, 1.0, ba.if(lfoInterp3 < -1.0, -1.0, lfoInterp3));
/*AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list*/
//List of Amplitudes to be sent to interpolator
ampList = (a0, a1, a2, a3)
with{
//Nested if/else statements to pick the correct wave for each amplitude point
a0 = ba.if(modW0 == 0, os.osc(modF0), ba.if(modW0 == 1, os.triangle(modF0), ba.if(modW0 == 2, os.sawtooth(modF0), ba.if(modW0 == 3, lfoSmRand0, ba.if(modW0 == 4, lfoRand0))))) * modA0;
a1 = ba.if(modW1 == 0, os.osc(modF1), ba.if(modW1 == 1, os.triangle(modF1), ba.if(modW1 == 2, os.sawtooth(modF1), ba.if(modW1 == 3, lfoSmRand1, ba.if(modW1 == 4, lfoRand1))))) * modA1;
a2 = ba.if(modW2 == 0, os.osc(modF2), ba.if(modW2 == 1, os.triangle(modF2), ba.if(modW2 == 2, os.sawtooth(modF2), ba.if(modW2 == 3, lfoSmRand2, ba.if(modW2 == 4, lfoRand2))))) * modA2;
a3 = ba.if(modW3 == 0, os.osc(modF3), ba.if(modW3 == 1, os.triangle(modF3), ba.if(modW3 == 2, os.sawtooth(modF3), ba.if(modW3 == 3, lfoSmRand3, ba.if(modW3 == 4, lfoRand3))))) * modA3;
};
//Using the paralell composition again, create a "list" for the integer X values of each amplitude
xCoords = par(i,I,int(i));
/*INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it
determines how many values the interpolator is expecting*/
//Order of Interpolation
N = 3;
/*I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now*/
I = N+1;
//Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
x = os.phasor(I, freq);
//do the interpolation
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
/*POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument*/
//clip results between -1 and 1 to ensure the signal will not be clipping the output
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
//basic midi integration through frequency slider
freq = hslider("freq",300,20,3000,0.1);
//Creates ADSR envelope, gate variable is automatically connected to a midi key press
//en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01) * 0.3;
gate = button("gate");
};
//High Pass filter for eliminating any DC offset
filResult = clipResult : fi.highpass(16,15);
//Apply the envelope to the sound
result = filResult * envelope;
process = result, result;
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/9571e2e12286c75ae495205546dfcfeb63449fe9/WaveGenerationTests/lfoAmplitudeControl/withRandomLFO-2.dsp
|
faust
|
MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values
Amp List Modulation Frequency
Amp List Modulation Amplitude
Amp List Modulation waveform (0 = sin, 1 = triangle, 2 = saw, 3 = smooth random, 4 = random)
RANDOM LFO SECTION:
In this region, all necessary variables for interpolation are declared and random LFO waves are
generated, one set of 4 smooth random and one set of 4 random
These variables are consistent and can be used for all iterations of the random
Assign modulation frequency variables to new random frequency variables for readability
Seperate "Read Point" X values for each iteration of the random
Create 4 seperate lists (parallel) of smooth noise
Create 4 seperate lists (parallel) of noise
Use lagrange interpolation to connect the random points from previous blocks
Clip the LFO's to a -1 to 1 range
AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list
List of Amplitudes to be sent to interpolator
Nested if/else statements to pick the correct wave for each amplitude point
Using the paralell composition again, create a "list" for the integer X values of each amplitude
INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it
determines how many values the interpolator is expecting
Order of Interpolation
I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now
Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
do the interpolation
POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument
clip results between -1 and 1 to ensure the signal will not be clipping the output
basic midi integration through frequency slider
Creates ADSR envelope, gate variable is automatically connected to a midi key press
en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
High Pass filter for eliminating any DC offset
Apply the envelope to the sound
|
import("stdfaust.lib");
modF0 = vslider("h:Modulation/h:[1]Modulation Frequency/[0]mod0[style:knob]",0.001,0.001,20,0.001);
modF1 = vslider("h:Modulation/h:[1]Modulation Frequency/[1]mod1[style:knob]",0.001,0.001,20,0.001);
modF2 = vslider("h:Modulation/h:[1]Modulation Frequency/[2]mod2[style:knob]",0.001,0.001,20,0.001);
modF3 = vslider("h:Modulation/h:[1]Modulation Frequency/[3]mod3[style:knob]",0.001,0.001,20,0.001);
modA0 = vslider("h:Modulation/h:[2]Modulation Amplitude/[0]modA0[style:knob]",0,0,1.0,0.01);
modA1 = vslider("h:Modulation/h:[2]Modulation Amplitude/[1]modA1[style:knob]",0,0,1.0,0.01);
modA2 = vslider("h:Modulation/h:[2]Modulation Amplitude/[2]modA2[style:knob]",0,0,1.0,0.01);
modA3 = vslider("h:Modulation/h:[2]Modulation Amplitude/[3]modA3[style:knob]",0,0,1.0,0.01);
modW0 = nentry("h:Modulation/h:[3]Modulation Waveform/[0]modWave0[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
modW1 = nentry("h:Modulation/h:[3]Modulation Waveform/[1]modWave1[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
modW2 = nentry("h:Modulation/h:[3]Modulation Waveform/[2]modWave2[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
modW3 = nentry("h:Modulation/h:[3]Modulation Waveform/[3]modWave3[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}]",0,0,4,1);
nRand = 2;
iRand = nRand + 1;
xRandList = par(i,iRand,int(i));
fRand0 = modF0;
fRand1 = modF1;
fRand2 = modF2;
fRand3 = modF3;
xRand0 = os.phasor(iRand, fRand0);
xRand1 = os.phasor(iRand, fRand1);
xRand2 = os.phasor(iRand, fRand2);
xRand3 = os.phasor(iRand, fRand3);
aSmNoise0 = par(i,iRand,(no.lfnoise(fRand0)));
aSmNoise1 = par(i,iRand,(no.lfnoise(fRand1)));
aSmNoise2 = par(i,iRand,(no.lfnoise(fRand2)));
aSmNoise3 = par(i,iRand,(no.lfnoise(fRand3)));
aNoise0 = par(i,iRand,(no.lfnoise0(fRand0)));
aNoise1 = par(i,iRand,(no.lfnoise0(fRand1)));
aNoise2 = par(i,iRand,(no.lfnoise0(fRand2)));
aNoise3 = par(i,iRand,(no.lfnoise0(fRand3)));
lfoSmInterp0 = xRand0, aSmNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp0 = xRand0, aNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp1 = xRand1, aSmNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp1 = xRand1, aNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp2 = xRand2, aSmNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp2 = xRand2, aNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp3 = xRand3, aSmNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp3 = xRand3, aNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmRand0 = ba.if(lfoSmInterp0 > 1.0, 1.0, ba.if(lfoSmInterp0 < -1.0, -1.0, lfoSmInterp0));
lfoRand0 = ba.if(lfoInterp0 > 1.0, 1.0, ba.if(lfoInterp0 < -1.0, -1.0, lfoInterp0));
lfoSmRand1 = ba.if(lfoSmInterp1 > 1.0, 1.0, ba.if(lfoSmInterp1 < -1.0, -1.0, lfoSmInterp1));
lfoRand1 = ba.if(lfoInterp1 > 1.0, 1.0, ba.if(lfoInterp1 < -1.0, -1.0, lfoInterp1));
lfoSmRand2 = ba.if(lfoSmInterp2 > 1.0, 1.0, ba.if(lfoSmInterp2 < -1.0, -1.0, lfoSmInterp2));
lfoRand2 = ba.if(lfoInterp2 > 1.0, 1.0, ba.if(lfoInterp2 < -1.0, -1.0, lfoInterp2));
lfoSmRand3 = ba.if(lfoSmInterp3 > 1.0, 1.0, ba.if(lfoSmInterp3 < -1.0, -1.0, lfoSmInterp3));
lfoRand3 = ba.if(lfoInterp3 > 1.0, 1.0, ba.if(lfoInterp3 < -1.0, -1.0, lfoInterp3));
ampList = (a0, a1, a2, a3)
with{
a0 = ba.if(modW0 == 0, os.osc(modF0), ba.if(modW0 == 1, os.triangle(modF0), ba.if(modW0 == 2, os.sawtooth(modF0), ba.if(modW0 == 3, lfoSmRand0, ba.if(modW0 == 4, lfoRand0))))) * modA0;
a1 = ba.if(modW1 == 0, os.osc(modF1), ba.if(modW1 == 1, os.triangle(modF1), ba.if(modW1 == 2, os.sawtooth(modF1), ba.if(modW1 == 3, lfoSmRand1, ba.if(modW1 == 4, lfoRand1))))) * modA1;
a2 = ba.if(modW2 == 0, os.osc(modF2), ba.if(modW2 == 1, os.triangle(modF2), ba.if(modW2 == 2, os.sawtooth(modF2), ba.if(modW2 == 3, lfoSmRand2, ba.if(modW2 == 4, lfoRand2))))) * modA2;
a3 = ba.if(modW3 == 0, os.osc(modF3), ba.if(modW3 == 1, os.triangle(modF3), ba.if(modW3 == 2, os.sawtooth(modF3), ba.if(modW3 == 3, lfoSmRand3, ba.if(modW3 == 4, lfoRand3))))) * modA3;
};
xCoords = par(i,I,int(i));
N = 3;
I = N+1;
x = os.phasor(I, freq);
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01) * 0.3;
gate = button("gate");
};
filResult = clipResult : fi.highpass(16,15);
result = filResult * envelope;
process = result, result;
|
63688ad2657b7bacdbee84d97d976360d176aee9028664cd3f804cc465c917c2
|
JDCAudio/Stray_virtual-synth
|
stray_1_0.dsp
|
import("stdfaust.lib");
/*MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values*/
//Amp List Modulation Frequency
modF0 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[0]P0 Freq[tooltip:Frequency of the LFO controlling Point 0 of the Waveform]",0.001,0.001,20,0.001);
modF1 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[1]P1 Freq[tooltip:Frequency of the LFO controlling Point 1 of the Waveform]",0.001,0.001,20,0.001);
modF2 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[2]P2 Freq[tooltip:Frequency of the LFO controlling Point 2 of the Waveform]",0.001,0.001,20,0.001);
modF3 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[3]P3 Freq[tooltip:Frequency of the LFO controlling Point 3 of the Waveform]",0.001,0.001,20,0.001);
//Amp List Modulation Amplitude, turn on and off points
modA0 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[0]P0 Toggle[tooltip:Turn On/Off LFO for Point 0]");
modA1 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[1]P1 Toggle[tooltip:Turn On/Off LFO for Point 1]");
modA2 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[2]P2 Toggle[tooltip:Turn On/Off LFO for Point 2]");
modA3 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[3]P3 Toggle[tooltip:Turn On/Off LFO for Point 3]");
//Amp List Modulation waveform (0 = sin, 1 = triangle, 2 = saw, 3 = smooth random, 4 = random)
modW0 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape/[0]P0 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 0]",0,0,4,1);
modW1 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape/[1]P1 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 1]",0,0,4,1);
modW2 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape/[2]P2 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 2]",0,0,4,1);
modW3 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape/[3]P3 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 3]",0,0,4,1);
/*RANDOM LFO SECTION:
In this region, all necessary variables for interpolation are declared and random LFO waves are
generated, one set of 4 smooth random and one set of 4 random*/
//These variables are consistent and can be used for all iterations of the random
nRand = 2;
iRand = nRand + 1;
xRandList = par(i,iRand,int(i));
//Assign modulation frequency variables to new random frequency variables for readability
fRand0 = modF0;
fRand1 = modF1;
fRand2 = modF2;
fRand3 = modF3;
//Seperate "Read Point" X values for each iteration of the random
xRand0 = os.phasor(iRand, fRand0);
xRand1 = os.phasor(iRand, fRand1);
xRand2 = os.phasor(iRand, fRand2);
xRand3 = os.phasor(iRand, fRand3);
//Create 4 seperate lists (parallel) of smooth noise
aSmNoise0 = par(i,iRand,(no.lfnoise(fRand0)));
aSmNoise1 = par(i,iRand,(no.lfnoise(fRand1)));
aSmNoise2 = par(i,iRand,(no.lfnoise(fRand2)));
aSmNoise3 = par(i,iRand,(no.lfnoise(fRand3)));
//Create 4 seperate lists (parallel) of noise
aNoise0 = par(i,iRand,(no.lfnoise0(fRand0)));
aNoise1 = par(i,iRand,(no.lfnoise0(fRand1)));
aNoise2 = par(i,iRand,(no.lfnoise0(fRand2)));
aNoise3 = par(i,iRand,(no.lfnoise0(fRand3)));
//Use lagrange interpolation to connect the random points from previous blocks
lfoSmInterp0 = xRand0, aSmNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp0 = xRand0, aNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp1 = xRand1, aSmNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp1 = xRand1, aNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp2 = xRand2, aSmNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp2 = xRand2, aNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp3 = xRand3, aSmNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp3 = xRand3, aNoise3 : it.lagrangeInterpolation(nRand, xRandList);
//Clip the LFO's to a -1 to 1 range
lfoSmRand0 = ba.if(lfoSmInterp0 > 1.0, 1.0, ba.if(lfoSmInterp0 < -1.0, -1.0, lfoSmInterp0));
lfoRand0 = ba.if(lfoInterp0 > 1.0, 1.0, ba.if(lfoInterp0 < -1.0, -1.0, lfoInterp0));
lfoSmRand1 = ba.if(lfoSmInterp1 > 1.0, 1.0, ba.if(lfoSmInterp1 < -1.0, -1.0, lfoSmInterp1));
lfoRand1 = ba.if(lfoInterp1 > 1.0, 1.0, ba.if(lfoInterp1 < -1.0, -1.0, lfoInterp1));
lfoSmRand2 = ba.if(lfoSmInterp2 > 1.0, 1.0, ba.if(lfoSmInterp2 < -1.0, -1.0, lfoSmInterp2));
lfoRand2 = ba.if(lfoInterp2 > 1.0, 1.0, ba.if(lfoInterp2 < -1.0, -1.0, lfoInterp2));
lfoSmRand3 = ba.if(lfoSmInterp3 > 1.0, 1.0, ba.if(lfoSmInterp3 < -1.0, -1.0, lfoSmInterp3));
lfoRand3 = ba.if(lfoInterp3 > 1.0, 1.0, ba.if(lfoInterp3 < -1.0, -1.0, lfoInterp3));
/*AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list*/
//List of Amplitudes to be sent to interpolator
//aC1 and aC2 provide consistent Zero-crossing points
ampList = (aC1, a0, a1, a2, a3, aC2)
with{
//Nested if/else statements to pick the correct wave for each amplitude point
aC1 = 0;
a0 = ba.if(modW0 == 0, os.osc(modF0), ba.if(modW0 == 1, os.triangle(modF0), ba.if(modW0 == 2, si.smoo(os.sawtooth(modF0)), ba.if(modW0 == 3, lfoSmRand0, ba.if(modW0 == 4, lfoRand0))))) * modA0;
a1 = ba.if(modW1 == 0, os.osc(modF1), ba.if(modW1 == 1, os.triangle(modF1), ba.if(modW1 == 2, si.smoo(os.sawtooth(modF1)), ba.if(modW1 == 3, lfoSmRand1, ba.if(modW1 == 4, lfoRand1))))) * modA1;
a2 = ba.if(modW2 == 0, os.osc(modF2), ba.if(modW2 == 1, os.triangle(modF2), ba.if(modW2 == 2, si.smoo(os.sawtooth(modF2)), ba.if(modW2 == 3, lfoSmRand2, ba.if(modW2 == 4, lfoRand2))))) * modA2;
a3 = ba.if(modW3 == 0, os.osc(modF3), ba.if(modW3 == 1, os.triangle(modF3), ba.if(modW3 == 2, si.smoo(os.sawtooth(modF3)), ba.if(modW3 == 3, lfoSmRand3, ba.if(modW3 == 4, lfoRand3))))) * modA3;
aC2 = 0;
};
//Using the paralell composition again, create a "list" for the integer X values of each amplitude
xCoords = par(i,I,int(i));
/*INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it
determines how many values the interpolator is expecting*/
//Order of Interpolation
N = 5;
/*I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now*/
I = N+1;
//Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
x = os.phasor(I, freq);
//do the interpolation
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
/*POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument*/
//clip results between -1 and 1 to ensure the signal will not be clipping the output
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
//basic midi integration through frequency slider
freq = hslider("freq",300,20,3000,0.1);
//Creates ADSR envelope, gate variable is automatically connected to a midi key press
//en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01) * 0.3;
gate = button("gate");
};
//High Pass filter for eliminating any DC offset
filResult = clipResult : fi.highpass(16,15);
//Apply the envelope to the sound
result = filResult * envelope;
process = result, result;
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/c0771fc89a9c64eae9faadeda79b5646a673742b/Stray/1_0/FaustDSP/stray_1_0.dsp
|
faust
|
MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values
Amp List Modulation Frequency
Amp List Modulation Amplitude, turn on and off points
Amp List Modulation waveform (0 = sin, 1 = triangle, 2 = saw, 3 = smooth random, 4 = random)
RANDOM LFO SECTION:
In this region, all necessary variables for interpolation are declared and random LFO waves are
generated, one set of 4 smooth random and one set of 4 random
These variables are consistent and can be used for all iterations of the random
Assign modulation frequency variables to new random frequency variables for readability
Seperate "Read Point" X values for each iteration of the random
Create 4 seperate lists (parallel) of smooth noise
Create 4 seperate lists (parallel) of noise
Use lagrange interpolation to connect the random points from previous blocks
Clip the LFO's to a -1 to 1 range
AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list
List of Amplitudes to be sent to interpolator
aC1 and aC2 provide consistent Zero-crossing points
Nested if/else statements to pick the correct wave for each amplitude point
Using the paralell composition again, create a "list" for the integer X values of each amplitude
INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it
determines how many values the interpolator is expecting
Order of Interpolation
I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now
Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
do the interpolation
POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument
clip results between -1 and 1 to ensure the signal will not be clipping the output
basic midi integration through frequency slider
Creates ADSR envelope, gate variable is automatically connected to a midi key press
en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
High Pass filter for eliminating any DC offset
Apply the envelope to the sound
|
import("stdfaust.lib");
modF0 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[0]P0 Freq[tooltip:Frequency of the LFO controlling Point 0 of the Waveform]",0.001,0.001,20,0.001);
modF1 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[1]P1 Freq[tooltip:Frequency of the LFO controlling Point 1 of the Waveform]",0.001,0.001,20,0.001);
modF2 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[2]P2 Freq[tooltip:Frequency of the LFO controlling Point 2 of the Waveform]",0.001,0.001,20,0.001);
modF3 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[3]P3 Freq[tooltip:Frequency of the LFO controlling Point 3 of the Waveform]",0.001,0.001,20,0.001);
modA0 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[0]P0 Toggle[tooltip:Turn On/Off LFO for Point 0]");
modA1 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[1]P1 Toggle[tooltip:Turn On/Off LFO for Point 1]");
modA2 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[2]P2 Toggle[tooltip:Turn On/Off LFO for Point 2]");
modA3 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[3]P3 Toggle[tooltip:Turn On/Off LFO for Point 3]");
modW0 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape/[0]P0 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 0]",0,0,4,1);
modW1 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape/[1]P1 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 1]",0,0,4,1);
modW2 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape/[2]P2 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 2]",0,0,4,1);
modW3 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape/[3]P3 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 3]",0,0,4,1);
nRand = 2;
iRand = nRand + 1;
xRandList = par(i,iRand,int(i));
fRand0 = modF0;
fRand1 = modF1;
fRand2 = modF2;
fRand3 = modF3;
xRand0 = os.phasor(iRand, fRand0);
xRand1 = os.phasor(iRand, fRand1);
xRand2 = os.phasor(iRand, fRand2);
xRand3 = os.phasor(iRand, fRand3);
aSmNoise0 = par(i,iRand,(no.lfnoise(fRand0)));
aSmNoise1 = par(i,iRand,(no.lfnoise(fRand1)));
aSmNoise2 = par(i,iRand,(no.lfnoise(fRand2)));
aSmNoise3 = par(i,iRand,(no.lfnoise(fRand3)));
aNoise0 = par(i,iRand,(no.lfnoise0(fRand0)));
aNoise1 = par(i,iRand,(no.lfnoise0(fRand1)));
aNoise2 = par(i,iRand,(no.lfnoise0(fRand2)));
aNoise3 = par(i,iRand,(no.lfnoise0(fRand3)));
lfoSmInterp0 = xRand0, aSmNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp0 = xRand0, aNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp1 = xRand1, aSmNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp1 = xRand1, aNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp2 = xRand2, aSmNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp2 = xRand2, aNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp3 = xRand3, aSmNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp3 = xRand3, aNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmRand0 = ba.if(lfoSmInterp0 > 1.0, 1.0, ba.if(lfoSmInterp0 < -1.0, -1.0, lfoSmInterp0));
lfoRand0 = ba.if(lfoInterp0 > 1.0, 1.0, ba.if(lfoInterp0 < -1.0, -1.0, lfoInterp0));
lfoSmRand1 = ba.if(lfoSmInterp1 > 1.0, 1.0, ba.if(lfoSmInterp1 < -1.0, -1.0, lfoSmInterp1));
lfoRand1 = ba.if(lfoInterp1 > 1.0, 1.0, ba.if(lfoInterp1 < -1.0, -1.0, lfoInterp1));
lfoSmRand2 = ba.if(lfoSmInterp2 > 1.0, 1.0, ba.if(lfoSmInterp2 < -1.0, -1.0, lfoSmInterp2));
lfoRand2 = ba.if(lfoInterp2 > 1.0, 1.0, ba.if(lfoInterp2 < -1.0, -1.0, lfoInterp2));
lfoSmRand3 = ba.if(lfoSmInterp3 > 1.0, 1.0, ba.if(lfoSmInterp3 < -1.0, -1.0, lfoSmInterp3));
lfoRand3 = ba.if(lfoInterp3 > 1.0, 1.0, ba.if(lfoInterp3 < -1.0, -1.0, lfoInterp3));
ampList = (aC1, a0, a1, a2, a3, aC2)
with{
aC1 = 0;
a0 = ba.if(modW0 == 0, os.osc(modF0), ba.if(modW0 == 1, os.triangle(modF0), ba.if(modW0 == 2, si.smoo(os.sawtooth(modF0)), ba.if(modW0 == 3, lfoSmRand0, ba.if(modW0 == 4, lfoRand0))))) * modA0;
a1 = ba.if(modW1 == 0, os.osc(modF1), ba.if(modW1 == 1, os.triangle(modF1), ba.if(modW1 == 2, si.smoo(os.sawtooth(modF1)), ba.if(modW1 == 3, lfoSmRand1, ba.if(modW1 == 4, lfoRand1))))) * modA1;
a2 = ba.if(modW2 == 0, os.osc(modF2), ba.if(modW2 == 1, os.triangle(modF2), ba.if(modW2 == 2, si.smoo(os.sawtooth(modF2)), ba.if(modW2 == 3, lfoSmRand2, ba.if(modW2 == 4, lfoRand2))))) * modA2;
a3 = ba.if(modW3 == 0, os.osc(modF3), ba.if(modW3 == 1, os.triangle(modF3), ba.if(modW3 == 2, si.smoo(os.sawtooth(modF3)), ba.if(modW3 == 3, lfoSmRand3, ba.if(modW3 == 4, lfoRand3))))) * modA3;
aC2 = 0;
};
xCoords = par(i,I,int(i));
N = 5;
I = N+1;
x = os.phasor(I, freq);
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01) * 0.3;
gate = button("gate");
};
filResult = clipResult : fi.highpass(16,15);
result = filResult * envelope;
process = result, result;
|
6fea328bb313147f547e35d895fa1bd44b7d8484d04b134003de9823e2c8207a
|
JDCAudio/Stray_virtual-synth
|
stray_1_2.dsp
|
import("stdfaust.lib");
/*MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values*/
//Amp List Modulation Frequency
modF0 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[0]P0 Freq[tooltip:Frequency of the LFO controlling Point 0 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modF1 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[1]P1 Freq[tooltip:Frequency of the LFO controlling Point 1 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modF2 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[2]P2 Freq[tooltip:Frequency of the LFO controlling Point 2 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modF3 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[3]P3 Freq[tooltip:Frequency of the LFO controlling Point 3 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
//Amp List Modulation Amplitude, turn on and off points
modA0 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[0]P0 Toggle[tooltip:Turn On/Off LFO for Point 0]");
modA1 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[1]P1 Toggle[tooltip:Turn On/Off LFO for Point 1]");
modA2 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[2]P2 Toggle[tooltip:Turn On/Off LFO for Point 2]");
modA3 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[3]P3 Toggle[tooltip:Turn On/Off LFO for Point 3]");
//Amp List Modulation waveform (0 = sin, 1 = triangle, 2 = saw, 3 = smooth random, 4 = random)
//Adding the 0 = sin and so on to the group title is redundant within the faust interface, but since the menu object does not transition properly to juce this is the most simple solution for now
modW0 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[0]P0 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 0]",0,0,4,1);
modW1 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[1]P1 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 1]",0,0,4,1);
modW2 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[2]P2 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 2]",0,0,4,1);
modW3 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[3]P3 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 3]",0,0,4,1);
/*RANDOM LFO SECTION:
In this region, all necessary variables for interpolation are declared and random LFO waves are
generated, one set of 4 smooth random and one set of 4 random*/
//These variables are consistent and can be used for all iterations of the random
nRand = 2;
iRand = nRand + 1;
xRandList = par(i,iRand,int(i));
//Assign modulation frequency variables to new random frequency variables for readability
fRand0 = modF0;
fRand1 = modF1;
fRand2 = modF2;
fRand3 = modF3;
//Seperate "Read Point" X values for each iteration of the random
xRand0 = os.phasor(iRand, fRand0);
xRand1 = os.phasor(iRand, fRand1);
xRand2 = os.phasor(iRand, fRand2);
xRand3 = os.phasor(iRand, fRand3);
//Create 4 seperate lists (parallel) of smooth noise
aSmNoise0 = par(i,iRand,(no.lfnoise(fRand0)));
aSmNoise1 = par(i,iRand,(no.lfnoise(fRand1)));
aSmNoise2 = par(i,iRand,(no.lfnoise(fRand2)));
aSmNoise3 = par(i,iRand,(no.lfnoise(fRand3)));
//Create 4 seperate lists (parallel) of noise
aNoise0 = par(i,iRand,(no.lfnoise0(fRand0)));
aNoise1 = par(i,iRand,(no.lfnoise0(fRand1)));
aNoise2 = par(i,iRand,(no.lfnoise0(fRand2)));
aNoise3 = par(i,iRand,(no.lfnoise0(fRand3)));
//Use lagrange interpolation to connect the random points from previous blocks
lfoSmInterp0 = xRand0, aSmNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp0 = xRand0, aNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp1 = xRand1, aSmNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp1 = xRand1, aNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp2 = xRand2, aSmNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp2 = xRand2, aNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp3 = xRand3, aSmNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp3 = xRand3, aNoise3 : it.lagrangeInterpolation(nRand, xRandList);
//Clip the LFO's to a -1 to 1 range
lfoSmRand0 = ba.if(lfoSmInterp0 > 1.0, 1.0, ba.if(lfoSmInterp0 < -1.0, -1.0, lfoSmInterp0));
lfoRand0 = ba.if(lfoInterp0 > 1.0, 1.0, ba.if(lfoInterp0 < -1.0, -1.0, lfoInterp0));
lfoSmRand1 = ba.if(lfoSmInterp1 > 1.0, 1.0, ba.if(lfoSmInterp1 < -1.0, -1.0, lfoSmInterp1));
lfoRand1 = ba.if(lfoInterp1 > 1.0, 1.0, ba.if(lfoInterp1 < -1.0, -1.0, lfoInterp1));
lfoSmRand2 = ba.if(lfoSmInterp2 > 1.0, 1.0, ba.if(lfoSmInterp2 < -1.0, -1.0, lfoSmInterp2));
lfoRand2 = ba.if(lfoInterp2 > 1.0, 1.0, ba.if(lfoInterp2 < -1.0, -1.0, lfoInterp2));
lfoSmRand3 = ba.if(lfoSmInterp3 > 1.0, 1.0, ba.if(lfoSmInterp3 < -1.0, -1.0, lfoSmInterp3));
lfoRand3 = ba.if(lfoInterp3 > 1.0, 1.0, ba.if(lfoInterp3 < -1.0, -1.0, lfoInterp3));
/*AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list*/
//List of Amplitudes to be sent to interpolator
//aC1 and aC2 provide consistent Zero-crossing points
ampList = (aC1, a0, a1, a2, a3, aC2)
with{
//Nested if/else statements to pick the correct wave for each amplitude point
aC1 = 0;
a0 = ba.if(modW0 == 0, os.osc(modF0), ba.if(modW0 == 1, os.triangle(modF0), ba.if(modW0 == 2, si.smoo(os.sawtooth(modF0)), ba.if(modW0 == 3, lfoSmRand0, ba.if(modW0 == 4, lfoRand0))))) * modA0;
a1 = ba.if(modW1 == 0, os.osc(modF1), ba.if(modW1 == 1, os.triangle(modF1), ba.if(modW1 == 2, si.smoo(os.sawtooth(modF1)), ba.if(modW1 == 3, lfoSmRand1, ba.if(modW1 == 4, lfoRand1))))) * modA1;
a2 = ba.if(modW2 == 0, os.osc(modF2), ba.if(modW2 == 1, os.triangle(modF2), ba.if(modW2 == 2, si.smoo(os.sawtooth(modF2)), ba.if(modW2 == 3, lfoSmRand2, ba.if(modW2 == 4, lfoRand2))))) * modA2;
a3 = ba.if(modW3 == 0, os.osc(modF3), ba.if(modW3 == 1, os.triangle(modF3), ba.if(modW3 == 2, si.smoo(os.sawtooth(modF3)), ba.if(modW3 == 3, lfoSmRand3, ba.if(modW3 == 4, lfoRand3))))) * modA3;
aC2 = 0;
};
//Using the paralell composition again, create a "list" for the integer X values of each amplitude
xCoords = par(i,I,int(i));
/*INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it
determines how many values the interpolator is expecting*/
//Order of Interpolation
N = 5;
/*I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now*/
I = N+1;
//Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
x = os.phasor(I, freq);
//do the interpolation
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
/*POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument*/
//clip results between -1 and 1 to ensure the signal will not be clipping the output
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
//basic midi integration through frequency slider
freq = hslider("freq[hidden:1]",300,20,3000,0.1);
//Creates ADSR envelope, gate variable is automatically connected to a midi key press
//en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob][unit:ms]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob][unit:ms]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob][unit:A]",0.8,0,1,0.01);
rel = hslider("[3]Release[style:knob][unit:ms]",50,1,1000,1)*0.001;
gain = (hslider("[4]gain[hidden:1]",1,0,1,0.01) * 0.3);
gate = button("gate[hidden:1]");
};
//High Pass filter for eliminating any DC offset
filResult = clipResult : fi.highpass(16,15);
//Apply the envelope to the sound
result = filResult * envelope;
process = result, result;
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/e2d263b2b50bd9ac364d9160c284039358d0fce5/Stray/1_2/FaustDSP/stray_1_2.dsp
|
faust
|
MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values
Amp List Modulation Frequency
Amp List Modulation Amplitude, turn on and off points
Amp List Modulation waveform (0 = sin, 1 = triangle, 2 = saw, 3 = smooth random, 4 = random)
Adding the 0 = sin and so on to the group title is redundant within the faust interface, but since the menu object does not transition properly to juce this is the most simple solution for now
RANDOM LFO SECTION:
In this region, all necessary variables for interpolation are declared and random LFO waves are
generated, one set of 4 smooth random and one set of 4 random
These variables are consistent and can be used for all iterations of the random
Assign modulation frequency variables to new random frequency variables for readability
Seperate "Read Point" X values for each iteration of the random
Create 4 seperate lists (parallel) of smooth noise
Create 4 seperate lists (parallel) of noise
Use lagrange interpolation to connect the random points from previous blocks
Clip the LFO's to a -1 to 1 range
AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list
List of Amplitudes to be sent to interpolator
aC1 and aC2 provide consistent Zero-crossing points
Nested if/else statements to pick the correct wave for each amplitude point
Using the paralell composition again, create a "list" for the integer X values of each amplitude
INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it
determines how many values the interpolator is expecting
Order of Interpolation
I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now
Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
do the interpolation
POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument
clip results between -1 and 1 to ensure the signal will not be clipping the output
basic midi integration through frequency slider
Creates ADSR envelope, gate variable is automatically connected to a midi key press
en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
High Pass filter for eliminating any DC offset
Apply the envelope to the sound
|
import("stdfaust.lib");
modF0 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[0]P0 Freq[tooltip:Frequency of the LFO controlling Point 0 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modF1 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[1]P1 Freq[tooltip:Frequency of the LFO controlling Point 1 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modF2 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[2]P2 Freq[tooltip:Frequency of the LFO controlling Point 2 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modF3 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[3]P3 Freq[tooltip:Frequency of the LFO controlling Point 3 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modA0 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[0]P0 Toggle[tooltip:Turn On/Off LFO for Point 0]");
modA1 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[1]P1 Toggle[tooltip:Turn On/Off LFO for Point 1]");
modA2 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[2]P2 Toggle[tooltip:Turn On/Off LFO for Point 2]");
modA3 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[3]P3 Toggle[tooltip:Turn On/Off LFO for Point 3]");
modW0 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[0]P0 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 0]",0,0,4,1);
modW1 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[1]P1 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 1]",0,0,4,1);
modW2 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[2]P2 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 2]",0,0,4,1);
modW3 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[3]P3 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 3]",0,0,4,1);
nRand = 2;
iRand = nRand + 1;
xRandList = par(i,iRand,int(i));
fRand0 = modF0;
fRand1 = modF1;
fRand2 = modF2;
fRand3 = modF3;
xRand0 = os.phasor(iRand, fRand0);
xRand1 = os.phasor(iRand, fRand1);
xRand2 = os.phasor(iRand, fRand2);
xRand3 = os.phasor(iRand, fRand3);
aSmNoise0 = par(i,iRand,(no.lfnoise(fRand0)));
aSmNoise1 = par(i,iRand,(no.lfnoise(fRand1)));
aSmNoise2 = par(i,iRand,(no.lfnoise(fRand2)));
aSmNoise3 = par(i,iRand,(no.lfnoise(fRand3)));
aNoise0 = par(i,iRand,(no.lfnoise0(fRand0)));
aNoise1 = par(i,iRand,(no.lfnoise0(fRand1)));
aNoise2 = par(i,iRand,(no.lfnoise0(fRand2)));
aNoise3 = par(i,iRand,(no.lfnoise0(fRand3)));
lfoSmInterp0 = xRand0, aSmNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp0 = xRand0, aNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp1 = xRand1, aSmNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp1 = xRand1, aNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp2 = xRand2, aSmNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp2 = xRand2, aNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp3 = xRand3, aSmNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp3 = xRand3, aNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmRand0 = ba.if(lfoSmInterp0 > 1.0, 1.0, ba.if(lfoSmInterp0 < -1.0, -1.0, lfoSmInterp0));
lfoRand0 = ba.if(lfoInterp0 > 1.0, 1.0, ba.if(lfoInterp0 < -1.0, -1.0, lfoInterp0));
lfoSmRand1 = ba.if(lfoSmInterp1 > 1.0, 1.0, ba.if(lfoSmInterp1 < -1.0, -1.0, lfoSmInterp1));
lfoRand1 = ba.if(lfoInterp1 > 1.0, 1.0, ba.if(lfoInterp1 < -1.0, -1.0, lfoInterp1));
lfoSmRand2 = ba.if(lfoSmInterp2 > 1.0, 1.0, ba.if(lfoSmInterp2 < -1.0, -1.0, lfoSmInterp2));
lfoRand2 = ba.if(lfoInterp2 > 1.0, 1.0, ba.if(lfoInterp2 < -1.0, -1.0, lfoInterp2));
lfoSmRand3 = ba.if(lfoSmInterp3 > 1.0, 1.0, ba.if(lfoSmInterp3 < -1.0, -1.0, lfoSmInterp3));
lfoRand3 = ba.if(lfoInterp3 > 1.0, 1.0, ba.if(lfoInterp3 < -1.0, -1.0, lfoInterp3));
ampList = (aC1, a0, a1, a2, a3, aC2)
with{
aC1 = 0;
a0 = ba.if(modW0 == 0, os.osc(modF0), ba.if(modW0 == 1, os.triangle(modF0), ba.if(modW0 == 2, si.smoo(os.sawtooth(modF0)), ba.if(modW0 == 3, lfoSmRand0, ba.if(modW0 == 4, lfoRand0))))) * modA0;
a1 = ba.if(modW1 == 0, os.osc(modF1), ba.if(modW1 == 1, os.triangle(modF1), ba.if(modW1 == 2, si.smoo(os.sawtooth(modF1)), ba.if(modW1 == 3, lfoSmRand1, ba.if(modW1 == 4, lfoRand1))))) * modA1;
a2 = ba.if(modW2 == 0, os.osc(modF2), ba.if(modW2 == 1, os.triangle(modF2), ba.if(modW2 == 2, si.smoo(os.sawtooth(modF2)), ba.if(modW2 == 3, lfoSmRand2, ba.if(modW2 == 4, lfoRand2))))) * modA2;
a3 = ba.if(modW3 == 0, os.osc(modF3), ba.if(modW3 == 1, os.triangle(modF3), ba.if(modW3 == 2, si.smoo(os.sawtooth(modF3)), ba.if(modW3 == 3, lfoSmRand3, ba.if(modW3 == 4, lfoRand3))))) * modA3;
aC2 = 0;
};
xCoords = par(i,I,int(i));
N = 5;
I = N+1;
x = os.phasor(I, freq);
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
freq = hslider("freq[hidden:1]",300,20,3000,0.1);
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob][unit:ms]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob][unit:ms]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob][unit:A]",0.8,0,1,0.01);
rel = hslider("[3]Release[style:knob][unit:ms]",50,1,1000,1)*0.001;
gain = (hslider("[4]gain[hidden:1]",1,0,1,0.01) * 0.3);
gate = button("gate[hidden:1]");
};
filResult = clipResult : fi.highpass(16,15);
result = filResult * envelope;
process = result, result;
|
bef911ad0b1bffb633efd6d52bedfb0b5cb14a9a2056798f41ea6733e1ef2973
|
JDCAudio/Stray_virtual-synth
|
stray_1_1.dsp
|
import("stdfaust.lib");
/*MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values*/
//Amp List Modulation Frequency
modF0 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[0]P0 Freq[tooltip:Frequency of the LFO controlling Point 0 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modF1 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[1]P1 Freq[tooltip:Frequency of the LFO controlling Point 1 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modF2 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[2]P2 Freq[tooltip:Frequency of the LFO controlling Point 2 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modF3 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[3]P3 Freq[tooltip:Frequency of the LFO controlling Point 3 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
//Amp List Modulation Amplitude, turn on and off points
modA0 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[0]P0 Toggle[tooltip:Turn On/Off LFO for Point 0]");
modA1 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[1]P1 Toggle[tooltip:Turn On/Off LFO for Point 1]");
modA2 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[2]P2 Toggle[tooltip:Turn On/Off LFO for Point 2]");
modA3 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[3]P3 Toggle[tooltip:Turn On/Off LFO for Point 3]");
//Amp List Modulation waveform (0 = sin, 1 = triangle, 2 = saw, 3 = smooth random, 4 = random)
//Adding the 0 = sin and so on to the group title is redundant within the faust interface, but since the menu object does not transition properly to juce this is the most simple solution for now
modW0 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[0]P0 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 0]",0,0,4,1);
modW1 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[1]P1 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 1]",0,0,4,1);
modW2 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[2]P2 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 2]",0,0,4,1);
modW3 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[3]P3 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 3]",0,0,4,1);
/*RANDOM LFO SECTION:
In this region, all necessary variables for interpolation are declared and random LFO waves are
generated, one set of 4 smooth random and one set of 4 random*/
//These variables are consistent and can be used for all iterations of the random
nRand = 2;
iRand = nRand + 1;
xRandList = par(i,iRand,int(i));
//Assign modulation frequency variables to new random frequency variables for readability
fRand0 = modF0;
fRand1 = modF1;
fRand2 = modF2;
fRand3 = modF3;
//Seperate "Read Point" X values for each iteration of the random
xRand0 = os.phasor(iRand, fRand0);
xRand1 = os.phasor(iRand, fRand1);
xRand2 = os.phasor(iRand, fRand2);
xRand3 = os.phasor(iRand, fRand3);
//Create 4 seperate lists (parallel) of smooth noise
aSmNoise0 = par(i,iRand,(no.lfnoise(fRand0)));
aSmNoise1 = par(i,iRand,(no.lfnoise(fRand1)));
aSmNoise2 = par(i,iRand,(no.lfnoise(fRand2)));
aSmNoise3 = par(i,iRand,(no.lfnoise(fRand3)));
//Create 4 seperate lists (parallel) of noise
aNoise0 = par(i,iRand,(no.lfnoise0(fRand0)));
aNoise1 = par(i,iRand,(no.lfnoise0(fRand1)));
aNoise2 = par(i,iRand,(no.lfnoise0(fRand2)));
aNoise3 = par(i,iRand,(no.lfnoise0(fRand3)));
//Use lagrange interpolation to connect the random points from previous blocks
lfoSmInterp0 = xRand0, aSmNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp0 = xRand0, aNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp1 = xRand1, aSmNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp1 = xRand1, aNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp2 = xRand2, aSmNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp2 = xRand2, aNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp3 = xRand3, aSmNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp3 = xRand3, aNoise3 : it.lagrangeInterpolation(nRand, xRandList);
//Clip the LFO's to a -1 to 1 range
lfoSmRand0 = ba.if(lfoSmInterp0 > 1.0, 1.0, ba.if(lfoSmInterp0 < -1.0, -1.0, lfoSmInterp0));
lfoRand0 = ba.if(lfoInterp0 > 1.0, 1.0, ba.if(lfoInterp0 < -1.0, -1.0, lfoInterp0));
lfoSmRand1 = ba.if(lfoSmInterp1 > 1.0, 1.0, ba.if(lfoSmInterp1 < -1.0, -1.0, lfoSmInterp1));
lfoRand1 = ba.if(lfoInterp1 > 1.0, 1.0, ba.if(lfoInterp1 < -1.0, -1.0, lfoInterp1));
lfoSmRand2 = ba.if(lfoSmInterp2 > 1.0, 1.0, ba.if(lfoSmInterp2 < -1.0, -1.0, lfoSmInterp2));
lfoRand2 = ba.if(lfoInterp2 > 1.0, 1.0, ba.if(lfoInterp2 < -1.0, -1.0, lfoInterp2));
lfoSmRand3 = ba.if(lfoSmInterp3 > 1.0, 1.0, ba.if(lfoSmInterp3 < -1.0, -1.0, lfoSmInterp3));
lfoRand3 = ba.if(lfoInterp3 > 1.0, 1.0, ba.if(lfoInterp3 < -1.0, -1.0, lfoInterp3));
/*AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list*/
//List of Amplitudes to be sent to interpolator
//aC1 and aC2 provide consistent Zero-crossing points
ampList = (aC1, a0, a1, a2, a3, aC2)
with{
//Nested if/else statements to pick the correct wave for each amplitude point
aC1 = 0;
a0 = ba.if(modW0 == 0, os.osc(modF0), ba.if(modW0 == 1, os.triangle(modF0), ba.if(modW0 == 2, si.smoo(os.sawtooth(modF0)), ba.if(modW0 == 3, lfoSmRand0, ba.if(modW0 == 4, lfoRand0))))) * modA0;
a1 = ba.if(modW1 == 0, os.osc(modF1), ba.if(modW1 == 1, os.triangle(modF1), ba.if(modW1 == 2, si.smoo(os.sawtooth(modF1)), ba.if(modW1 == 3, lfoSmRand1, ba.if(modW1 == 4, lfoRand1))))) * modA1;
a2 = ba.if(modW2 == 0, os.osc(modF2), ba.if(modW2 == 1, os.triangle(modF2), ba.if(modW2 == 2, si.smoo(os.sawtooth(modF2)), ba.if(modW2 == 3, lfoSmRand2, ba.if(modW2 == 4, lfoRand2))))) * modA2;
a3 = ba.if(modW3 == 0, os.osc(modF3), ba.if(modW3 == 1, os.triangle(modF3), ba.if(modW3 == 2, si.smoo(os.sawtooth(modF3)), ba.if(modW3 == 3, lfoSmRand3, ba.if(modW3 == 4, lfoRand3))))) * modA3;
aC2 = 0;
};
//Using the paralell composition again, create a "list" for the integer X values of each amplitude
xCoords = par(i,I,int(i));
/*INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it
determines how many values the interpolator is expecting*/
//Order of Interpolation
N = 5;
/*I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now*/
I = N+1;
//Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
x = os.phasor(I, freq);
//do the interpolation
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
/*POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument*/
//clip results between -1 and 1 to ensure the signal will not be clipping the output
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
//basic midi integration through frequency slider
freq = hslider("freq",300,20,3000,0.1);
//Creates ADSR envelope, gate variable is automatically connected to a midi key press
//en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob][unit:ms]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob][unit:ms]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob][unit:ms]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob][unit:ms]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01) * 0.3;
gate = button("gate");
};
//High Pass filter for eliminating any DC offset
filResult = clipResult : fi.highpass(16,15);
//Apply the envelope to the sound
result = filResult * envelope;
process = result, result;
|
https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/dedea5c43e977f95afc05c9597567cdf0a830b73/Stray/1_1/FaustDSP/stray_1_1.dsp
|
faust
|
MODULATION SECTION:
Each group of four modulation parameters controls a single variable within the ampList
Variables modW0-modW3 are used to select the oscillating waveform (sin, tri, saw)
Variables modA0-modA3 determine the amplitude of said waves
Variables modF0-modF3 determine the frequency of oscillation for that particular amplitude value
The modulation section results in 4 seperate oscillating values
Amp List Modulation Frequency
Amp List Modulation Amplitude, turn on and off points
Amp List Modulation waveform (0 = sin, 1 = triangle, 2 = saw, 3 = smooth random, 4 = random)
Adding the 0 = sin and so on to the group title is redundant within the faust interface, but since the menu object does not transition properly to juce this is the most simple solution for now
RANDOM LFO SECTION:
In this region, all necessary variables for interpolation are declared and random LFO waves are
generated, one set of 4 smooth random and one set of 4 random
These variables are consistent and can be used for all iterations of the random
Assign modulation frequency variables to new random frequency variables for readability
Seperate "Read Point" X values for each iteration of the random
Create 4 seperate lists (parallel) of smooth noise
Create 4 seperate lists (parallel) of noise
Use lagrange interpolation to connect the random points from previous blocks
Clip the LFO's to a -1 to 1 range
AMP LIST SECTION:
a0-a3 are assigned to the proper group of modulation parameters, a series of if statements are used to
determine what wave has been selected with the variables modW0-modW3
The amp list section takes the 4 oscillating values from before and puts them all into parrallel
composition, which for my purposes is being viewed as a list
List of Amplitudes to be sent to interpolator
aC1 and aC2 provide consistent Zero-crossing points
Nested if/else statements to pick the correct wave for each amplitude point
Using the paralell composition again, create a "list" for the integer X values of each amplitude
INTERPOLATION SECTION:
This is where the waveform for the synthesizer is determined. I am using the langrangeInterpolation
object to calculate the values in between the ampList values. xCoords for our integer X values, and
ampList determines the Y values for each point in xCoords. 'x', a phasor object will ramp from 0 to N and
is typically used to read through tables, we are using it to calculate the in-between values with
lagrangeInterpolation.
N refers to the order of interpolation, which has larger implications, but for our purposes, it
determines how many values the interpolator is expecting
Order of Interpolation
I is how many values in the lists (ampList and xCoords) the interpolator is expecting, based off of the
order of interpolation. xCoords is generalized using this variable, the amplist and modulation values are
written out for clarity for now
Ramps from 0 to I at a speed dependent on the current frequency, used to drive the interpolation
do the interpolation
POST INTERPOLATION:
At this point, a wave has been drawn that goes through all of our oscillating values, resulting in a
dynamic waveform. The remaining elements are used to "tame" this waveform, and add standard synthesizer
elements to create a playable instrument
clip results between -1 and 1 to ensure the signal will not be clipping the output
basic midi integration through frequency slider
Creates ADSR envelope, gate variable is automatically connected to a midi key press
en.adsr expects times in seconds, which is not very readable, so the user controlls are in ms
High Pass filter for eliminating any DC offset
Apply the envelope to the sound
|
import("stdfaust.lib");
modF0 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[0]P0 Freq[tooltip:Frequency of the LFO controlling Point 0 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modF1 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[1]P1 Freq[tooltip:Frequency of the LFO controlling Point 1 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modF2 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[2]P2 Freq[tooltip:Frequency of the LFO controlling Point 2 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modF3 = vslider("h:Wave Point Control/h:[0]Point Oscillation Frequency/[3]P3 Freq[tooltip:Frequency of the LFO controlling Point 3 of the Waveform][unit:Hz]",0.001,0.001,20,0.001);
modA0 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[0]P0 Toggle[tooltip:Turn On/Off LFO for Point 0]");
modA1 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[1]P1 Toggle[tooltip:Turn On/Off LFO for Point 1]");
modA2 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[2]P2 Toggle[tooltip:Turn On/Off LFO for Point 2]");
modA3 = checkbox("h:Wave Point Control/v:[1]Point LFO/h:[2]On | Off/[3]P3 Toggle[tooltip:Turn On/Off LFO for Point 3]");
modW0 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[0]P0 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 0]",0,0,4,1);
modW1 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[1]P1 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 1]",0,0,4,1);
modW2 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[2]P2 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 2]",0,0,4,1);
modW3 = nentry("h:Wave Point Control/v:[1]Point LFO/h:[3]LFO Shape: 0 = sin, 1 = tri, 2 = saw, 3 = smooth rand, 4 = coarse rand/[3]P3 Shape[style:menu{'Sine':0;'Triangle':1;'Sawtooth':2'Smooth Rand':3;'Coarse Rand':4}][tooltip:Change the LFO Shape for Point 3]",0,0,4,1);
nRand = 2;
iRand = nRand + 1;
xRandList = par(i,iRand,int(i));
fRand0 = modF0;
fRand1 = modF1;
fRand2 = modF2;
fRand3 = modF3;
xRand0 = os.phasor(iRand, fRand0);
xRand1 = os.phasor(iRand, fRand1);
xRand2 = os.phasor(iRand, fRand2);
xRand3 = os.phasor(iRand, fRand3);
aSmNoise0 = par(i,iRand,(no.lfnoise(fRand0)));
aSmNoise1 = par(i,iRand,(no.lfnoise(fRand1)));
aSmNoise2 = par(i,iRand,(no.lfnoise(fRand2)));
aSmNoise3 = par(i,iRand,(no.lfnoise(fRand3)));
aNoise0 = par(i,iRand,(no.lfnoise0(fRand0)));
aNoise1 = par(i,iRand,(no.lfnoise0(fRand1)));
aNoise2 = par(i,iRand,(no.lfnoise0(fRand2)));
aNoise3 = par(i,iRand,(no.lfnoise0(fRand3)));
lfoSmInterp0 = xRand0, aSmNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp0 = xRand0, aNoise0 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp1 = xRand1, aSmNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp1 = xRand1, aNoise1 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp2 = xRand2, aSmNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp2 = xRand2, aNoise2 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmInterp3 = xRand3, aSmNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoInterp3 = xRand3, aNoise3 : it.lagrangeInterpolation(nRand, xRandList);
lfoSmRand0 = ba.if(lfoSmInterp0 > 1.0, 1.0, ba.if(lfoSmInterp0 < -1.0, -1.0, lfoSmInterp0));
lfoRand0 = ba.if(lfoInterp0 > 1.0, 1.0, ba.if(lfoInterp0 < -1.0, -1.0, lfoInterp0));
lfoSmRand1 = ba.if(lfoSmInterp1 > 1.0, 1.0, ba.if(lfoSmInterp1 < -1.0, -1.0, lfoSmInterp1));
lfoRand1 = ba.if(lfoInterp1 > 1.0, 1.0, ba.if(lfoInterp1 < -1.0, -1.0, lfoInterp1));
lfoSmRand2 = ba.if(lfoSmInterp2 > 1.0, 1.0, ba.if(lfoSmInterp2 < -1.0, -1.0, lfoSmInterp2));
lfoRand2 = ba.if(lfoInterp2 > 1.0, 1.0, ba.if(lfoInterp2 < -1.0, -1.0, lfoInterp2));
lfoSmRand3 = ba.if(lfoSmInterp3 > 1.0, 1.0, ba.if(lfoSmInterp3 < -1.0, -1.0, lfoSmInterp3));
lfoRand3 = ba.if(lfoInterp3 > 1.0, 1.0, ba.if(lfoInterp3 < -1.0, -1.0, lfoInterp3));
ampList = (aC1, a0, a1, a2, a3, aC2)
with{
aC1 = 0;
a0 = ba.if(modW0 == 0, os.osc(modF0), ba.if(modW0 == 1, os.triangle(modF0), ba.if(modW0 == 2, si.smoo(os.sawtooth(modF0)), ba.if(modW0 == 3, lfoSmRand0, ba.if(modW0 == 4, lfoRand0))))) * modA0;
a1 = ba.if(modW1 == 0, os.osc(modF1), ba.if(modW1 == 1, os.triangle(modF1), ba.if(modW1 == 2, si.smoo(os.sawtooth(modF1)), ba.if(modW1 == 3, lfoSmRand1, ba.if(modW1 == 4, lfoRand1))))) * modA1;
a2 = ba.if(modW2 == 0, os.osc(modF2), ba.if(modW2 == 1, os.triangle(modF2), ba.if(modW2 == 2, si.smoo(os.sawtooth(modF2)), ba.if(modW2 == 3, lfoSmRand2, ba.if(modW2 == 4, lfoRand2))))) * modA2;
a3 = ba.if(modW3 == 0, os.osc(modF3), ba.if(modW3 == 1, os.triangle(modF3), ba.if(modW3 == 2, si.smoo(os.sawtooth(modF3)), ba.if(modW3 == 3, lfoSmRand3, ba.if(modW3 == 4, lfoRand3))))) * modA3;
aC2 = 0;
};
xCoords = par(i,I,int(i));
N = 5;
I = N+1;
x = os.phasor(I, freq);
interpResult = x, ampList : it.lagrangeInterpolation(N,xCoords);
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
freq = hslider("freq",300,20,3000,0.1);
envelope = hgroup("[0]Envelope",en.adsr(atk,dcy,sus,rel,gate)*gain)
with{
atk = hslider("[0]Attack[style:knob][unit:ms]",50,1,1000,1)*0.001;
dcy = hslider("[1]Decay[style:knob][unit:ms]",50,1,1000,1)*0.001;
sus = hslider("[2]Sustain[style:knob][unit:ms]",0.8,0.01,1,1);
rel = hslider("[3]Release[style:knob][unit:ms]",50,1,1000,1)*0.001;
gain = hslider("[4]gain",1,0,1,0.01) * 0.3;
gate = button("gate");
};
filResult = clipResult : fi.highpass(16,15);
result = filResult * envelope;
process = result, result;
|
c6928866c9d2be8a5fad37cfdec47052032d38957643841878455d5a13712f26
|
Trzyszcz/Langley
|
hihat.dsp
|
declare name "hihat";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("frequency", 440, 20, 20000, 0.001);
gain = nentry("gain", 0.3, 0, 1, 0.001);
gate = button("gate");
dry_sound = ( (gate : en.ar(0.02, 0.1*gain)) * gain * no.pink_noise ) : fi.highpass(3, 7.5*freq) : fi.lowpass(2, 7000);
wet_sound = 0.04*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = (wet_sound + (dry_sound*0.96))<:_,_;
|
https://raw.githubusercontent.com/Trzyszcz/Langley/21824b34f50f17ec2984ba9f1845a6ef4b3ac0ec/Instruments/Hihat/hihat.dsp
|
faust
|
declare name "hihat";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("frequency", 440, 20, 20000, 0.001);
gain = nentry("gain", 0.3, 0, 1, 0.001);
gate = button("gate");
dry_sound = ( (gate : en.ar(0.02, 0.1*gain)) * gain * no.pink_noise ) : fi.highpass(3, 7.5*freq) : fi.lowpass(2, 7000);
wet_sound = 0.04*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = (wet_sound + (dry_sound*0.96))<:_,_;
|
|
ea87f4e74f23982826fc8ec8a6e5d7fbf82d0325723644a67e89543ad78ca688
|
Trzyszcz/Langley
|
Normik3.dsp
|
declare name "normik3";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
RightHorizontal = hslider("righthorizontal", 0.5, 0, 1, 0.01);
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
frequency = freq * (1 + ( (os.osc(7) * 3 * RightHorizontal)/100) );
timbre = os.osc(frequency) + (os.osc(2*frequency) * RightVertical);
process = gain * gate * timbre;
|
https://raw.githubusercontent.com/Trzyszcz/Langley/21824b34f50f17ec2984ba9f1845a6ef4b3ac0ec/Instruments/Normie/Normik3.dsp
|
faust
|
declare name "normik3";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
RightHorizontal = hslider("righthorizontal", 0.5, 0, 1, 0.01);
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
frequency = freq * (1 + ( (os.osc(7) * 3 * RightHorizontal)/100) );
timbre = os.osc(frequency) + (os.osc(2*frequency) * RightVertical);
process = gain * gate * timbre;
|
|
6ee5616dc5f056aaef57064ffdbdcf7ae5eb608d3aa12c99c6d80bdb2f9df2fd
|
Trzyszcz/Langley
|
uan.dsp
|
declare name "Uan";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
RightHorizontal = hslider("righthorizontal", 0.5, 0, 1, 0.01);
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
Envelope = en.adsr(0.1, 0, 1, 0.1);
freque(frey) = frey + (frey*RightHorizontal*os.triangle(16*frey));
osc_base(frex) = gain * (gate : Envelope) * (os.square(frex)) : fi.lowpass(2, 500);
freqD = freq * (1 - (RightVertical/100));
freqU = freq * (1 + (RightVertical/100));
dry_sound = ((2/3) * osc_base(freque(freq))) + ((1/4) * osc_base(freque(freqD))) + ((1/4) * osc_base(freque(freqU)));
dry_soundEQ = dry_sound + ( (1/4) * dry_sound : fi.lowpass(2,100) ) + ( (1/4) * dry_sound : fi.lowpass(2, 50) );
wet_sound = 0.15*dry_soundEQ : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (dry_sound*0.85)<:_,_;
|
https://raw.githubusercontent.com/Trzyszcz/Langley/8146c5e9fff7b158736e420915157bb1158c5887/Instruments/Uan/uan.dsp
|
faust
|
declare name "Uan";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
RightHorizontal = hslider("righthorizontal", 0.5, 0, 1, 0.01);
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
Envelope = en.adsr(0.1, 0, 1, 0.1);
freque(frey) = frey + (frey*RightHorizontal*os.triangle(16*frey));
osc_base(frex) = gain * (gate : Envelope) * (os.square(frex)) : fi.lowpass(2, 500);
freqD = freq * (1 - (RightVertical/100));
freqU = freq * (1 + (RightVertical/100));
dry_sound = ((2/3) * osc_base(freque(freq))) + ((1/4) * osc_base(freque(freqD))) + ((1/4) * osc_base(freque(freqU)));
dry_soundEQ = dry_sound + ( (1/4) * dry_sound : fi.lowpass(2,100) ) + ( (1/4) * dry_sound : fi.lowpass(2, 50) );
wet_sound = 0.15*dry_soundEQ : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (dry_sound*0.85)<:_,_;
|
|
a221747c1972626c35c70eecf0bb260cb6a473232dbba7d587059cb4291e3fa1
|
Trzyszcz/Langley
|
mou.dsp
|
declare name "Mou";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
RightHorizontal = hslider("righthorizontal", 0.5, 0, 1, 0.01);
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
Envelope = en.adsr(0.1, 0, 1, 0.1);
freque1 = freq + (freq*0.007*no.lfnoise0(32)*RightVertical*3);
freque2 = freq + (freq*0.014*no.lfnoise0(32)*RightVertical*3);
basictimbre(x) = (1/2) * os.triangle(x) + (1/3) * os.triangle(3*x);
is_bet(x, y, z) = (x >= y) & (x < z); //is x between y and z
distortion(x) =
(x < -0.08905) * ( -1/4 * (1 - ( (1 - abs(x) - 0.032847) ^ 12) ) + 0.01) +
is_bet(x, -0.08905, 0.320018) * ( (-6.153*(x^2)) + (3.9375*x) ) +
(0.320018 < x) * 0.630035;
dry_sound = distortion(gain * (gate : Envelope) * (basictimbre(freque1) + basictimbre(freque2)) ) : fi.lowpass(2, 9000);
wet_sound = 0.05*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (dry_sound*0.95)<:_,_;
|
https://raw.githubusercontent.com/Trzyszcz/Langley/21824b34f50f17ec2984ba9f1845a6ef4b3ac0ec/Instruments/Mou/mou.dsp
|
faust
|
is x between y and z
|
declare name "Mou";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
RightHorizontal = hslider("righthorizontal", 0.5, 0, 1, 0.01);
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
Envelope = en.adsr(0.1, 0, 1, 0.1);
freque1 = freq + (freq*0.007*no.lfnoise0(32)*RightVertical*3);
freque2 = freq + (freq*0.014*no.lfnoise0(32)*RightVertical*3);
basictimbre(x) = (1/2) * os.triangle(x) + (1/3) * os.triangle(3*x);
distortion(x) =
(x < -0.08905) * ( -1/4 * (1 - ( (1 - abs(x) - 0.032847) ^ 12) ) + 0.01) +
is_bet(x, -0.08905, 0.320018) * ( (-6.153*(x^2)) + (3.9375*x) ) +
(0.320018 < x) * 0.630035;
dry_sound = distortion(gain * (gate : Envelope) * (basictimbre(freque1) + basictimbre(freque2)) ) : fi.lowpass(2, 9000);
wet_sound = 0.05*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (dry_sound*0.95)<:_,_;
|
44ac093c65bae102dc1a15b53380c043bfa593ed37e529070c5c81e759ec7ee8
|
Trzyszcz/Langley
|
shash.dsp
|
declare name "Shash";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 1);
gain = nentry("gain", 0.3, 0, 10, 0.01): si.smoo;
gate = button("gate");
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01) : si.smoo;
LeftVertical = hslider("leftvertical", 0.5, 0, 1, 0.01) : si.smoo;
LeftPush = button("LeftPush");
RightPush = button("RightPush");
Envelope = en.adsr(0.1, 0, 1, 0.1);
noilev = 0.001;
pgain = 160 * LeftVertical;
mspread = 0.0489508 * (2.71828^(1.83413*(2*RightVertical + 1)));
frelim(xfreq) = min(xfreq, 20000);
my_sound(xfreq) = (no.noise * noilev <: fi.peak_eq_rm(pgain, xfreq, mspread*0.0001) : fi.lowpass(3, frelim(1.5*xfreq)) : fi.highpass(3, frelim(0.5*xfreq)));
timbre(x) = my_sound(x) + (1/2) * my_sound(x*2) + (1/3) * my_sound(x*3);
dry_sound = timbre(freq)*(gate : Envelope)*gain;
wet_sound = 0.15*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
main_stream = wet_sound + (dry_sound*0.85);
long_delay = + ~ ( @(5*48000) *(19/20) );
short_delay = + ~ ( @(0.5*48000) *(1/3) );
short_delayed_stream = main_stream * RightPush : short_delay;
long_delayed_stream = ( main_stream + short_delayed_stream ) * LeftPush : long_delay;
process = main_stream + short_delayed_stream + long_delayed_stream <:_,_;
|
https://raw.githubusercontent.com/Trzyszcz/Langley/9c178deb946ef4822ba9c56368b7d20c18bbf2b8/Instruments/Shash/shash.dsp
|
faust
|
declare name "Shash";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 1);
gain = nentry("gain", 0.3, 0, 10, 0.01): si.smoo;
gate = button("gate");
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01) : si.smoo;
LeftVertical = hslider("leftvertical", 0.5, 0, 1, 0.01) : si.smoo;
LeftPush = button("LeftPush");
RightPush = button("RightPush");
Envelope = en.adsr(0.1, 0, 1, 0.1);
noilev = 0.001;
pgain = 160 * LeftVertical;
mspread = 0.0489508 * (2.71828^(1.83413*(2*RightVertical + 1)));
frelim(xfreq) = min(xfreq, 20000);
my_sound(xfreq) = (no.noise * noilev <: fi.peak_eq_rm(pgain, xfreq, mspread*0.0001) : fi.lowpass(3, frelim(1.5*xfreq)) : fi.highpass(3, frelim(0.5*xfreq)));
timbre(x) = my_sound(x) + (1/2) * my_sound(x*2) + (1/3) * my_sound(x*3);
dry_sound = timbre(freq)*(gate : Envelope)*gain;
wet_sound = 0.15*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
main_stream = wet_sound + (dry_sound*0.85);
long_delay = + ~ ( @(5*48000) *(19/20) );
short_delay = + ~ ( @(0.5*48000) *(1/3) );
short_delayed_stream = main_stream * RightPush : short_delay;
long_delayed_stream = ( main_stream + short_delayed_stream ) * LeftPush : long_delay;
process = main_stream + short_delayed_stream + long_delayed_stream <:_,_;
|
|
59ad7bc3f566101e29bdca4cb11f7143dc337343032a3bfe8d5f21e96e548e70
|
Trzyszcz/Langley
|
gutter.dsp
|
declare name "gutter";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
LeftVertical = hslider("leftvertical", 0.5, 0, 1, 0.01);
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
filres = nentry("filres", 1, 0.1, 20, 0.01);
Envelope = en.adsr(0.1, 0, 1, 0.1);
basictimbre(x) = (1/2)*os.pulsetrain(x*1.01, LeftVertical/2) + (1/2)*os.pulsetrain(x*0.99, LeftVertical/2) : fi.resonlp( (8*RightVertical + 4)*x, filres, 1);
dry_sound = gain * (gate : Envelope) * basictimbre(freq);
wet_sound = 0.05*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (0.95 * dry_sound) <: _,_;
//some old stuff, sorry for keeping it
/*
basictimbre(x) = (os.sawtooth(x) + (1/2)*os.sawtooth(2*x) + (1/3)*os.sawtooth(3*x)) : fi.lowpass(1, (8*RightHorizontal + 4)*x);
is_bet(x, y, z) = (x >= y) & (x < z); //is x between y and z
distortion(x) =
(x < -0.08905) * ( -1/4 * (1 - ( (1 - abs(x) - 0.032847) ^ 12) ) + 0.01) +
is_bet(x, -0.08905, 0.320018) * ( (-6.153*(x^2)) + (3.9375*x) ) +
(0.320018 < x) * 0.630035;
dry_sound = distortion(gain * (gate : Envelope) * basictimbre(freq)) : fi.lowpass(1, (8*RightVertical + 4)*freq);
wet_sound = 0.05*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (dry_sound*0.95)<: co.compressor_stereo(1.1, 0, 1, 0.5);
*/
|
https://raw.githubusercontent.com/Trzyszcz/Langley/25867936f5d0bf7b1b21969db6f58fc3a66c791b/Instruments/Gutter/gutter.dsp
|
faust
|
some old stuff, sorry for keeping it
basictimbre(x) = (os.sawtooth(x) + (1/2)*os.sawtooth(2*x) + (1/3)*os.sawtooth(3*x)) : fi.lowpass(1, (8*RightHorizontal + 4)*x);
is_bet(x, y, z) = (x >= y) & (x < z); //is x between y and z
distortion(x) =
(x < -0.08905) * ( -1/4 * (1 - ( (1 - abs(x) - 0.032847) ^ 12) ) + 0.01) +
is_bet(x, -0.08905, 0.320018) * ( (-6.153*(x^2)) + (3.9375*x) ) +
(0.320018 < x) * 0.630035;
dry_sound = distortion(gain * (gate : Envelope) * basictimbre(freq)) : fi.lowpass(1, (8*RightVertical + 4)*freq);
wet_sound = 0.05*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (dry_sound*0.95)<: co.compressor_stereo(1.1, 0, 1, 0.5);
|
declare name "gutter";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
LeftVertical = hslider("leftvertical", 0.5, 0, 1, 0.01);
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
filres = nentry("filres", 1, 0.1, 20, 0.01);
Envelope = en.adsr(0.1, 0, 1, 0.1);
basictimbre(x) = (1/2)*os.pulsetrain(x*1.01, LeftVertical/2) + (1/2)*os.pulsetrain(x*0.99, LeftVertical/2) : fi.resonlp( (8*RightVertical + 4)*x, filres, 1);
dry_sound = gain * (gate : Envelope) * basictimbre(freq);
wet_sound = 0.05*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (0.95 * dry_sound) <: _,_;
|
7140731303922a23b2d9c050b1754e3da469a19615dd7406bac7c24217042e23
|
Trzyszcz/Langley
|
distorgan.dsp
|
declare name "Distorgan";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
LeftVertical = hslider("leftvertical", 0.5, 0, 1, 0.01);
LeftPush = button("LeftPush");
RightPush = button("RightPush");
Envelope = en.adsr(0.1, 0, 1, 0.1);
Lower_part(freq) = (65/100) * os.triangle(freq*(1/2)*(499/500));
Main_part(freq) = (56/100) * os.osc(freq + (freq*(2/5)*os.osc(7*freq)));
High_part(freq) = (70/100) * (os.osc(2*freq) + (1/3) * os.osc(3*2*freq) + (1/5) * os.osc(5*2*freq));
timbre(x) = (Lower_part(x) + Main_part(x) + High_part(x)) * (0.04 + LeftVertical) * (1/2);
u_freq = freq*(1 + (0.2*(RightVertical - 0.50196081399918)));
distorted_timbre = distortion(timbre(freq) + timbre(u_freq));
dry_sound = (distorted_timbre - 1/8) * gain * (gate : Envelope) : fi.lowpass(2, 9000);
wet_sound = 0.15*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
is_bet(x, y, z) = (x >= y) & (x < z); //is x between y and z
distortion(x) =
(x < -0.08905) * ( -1/4 * (1 - ( (1 - abs(x) - 0.032847) ^ 12) ) + 0.01) +
is_bet(x, -0.08905, 0.320018) * ( (-6.153*(x^2)) + (3.9375*x) ) +
(0.320018 < x) * 0.630035;
main_stream = wet_sound + (dry_sound*0.85);
long_delay = + ~ ( @(5*48000) *(19/20) );
short_delay = + ~ ( @(0.5*48000) *(1/3) );
short_delayed_stream = main_stream * RightPush : short_delay;
long_delayed_stream = ( main_stream + short_delayed_stream ) * LeftPush : long_delay;
process = main_stream + short_delayed_stream + long_delayed_stream <:_,_;
|
https://raw.githubusercontent.com/Trzyszcz/Langley/c695120d16615884be94a58ff547e5c443313630/Instruments/Distorgan/distorgan.dsp
|
faust
|
is x between y and z
|
declare name "Distorgan";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
LeftVertical = hslider("leftvertical", 0.5, 0, 1, 0.01);
LeftPush = button("LeftPush");
RightPush = button("RightPush");
Envelope = en.adsr(0.1, 0, 1, 0.1);
Lower_part(freq) = (65/100) * os.triangle(freq*(1/2)*(499/500));
Main_part(freq) = (56/100) * os.osc(freq + (freq*(2/5)*os.osc(7*freq)));
High_part(freq) = (70/100) * (os.osc(2*freq) + (1/3) * os.osc(3*2*freq) + (1/5) * os.osc(5*2*freq));
timbre(x) = (Lower_part(x) + Main_part(x) + High_part(x)) * (0.04 + LeftVertical) * (1/2);
u_freq = freq*(1 + (0.2*(RightVertical - 0.50196081399918)));
distorted_timbre = distortion(timbre(freq) + timbre(u_freq));
dry_sound = (distorted_timbre - 1/8) * gain * (gate : Envelope) : fi.lowpass(2, 9000);
wet_sound = 0.15*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
distortion(x) =
(x < -0.08905) * ( -1/4 * (1 - ( (1 - abs(x) - 0.032847) ^ 12) ) + 0.01) +
is_bet(x, -0.08905, 0.320018) * ( (-6.153*(x^2)) + (3.9375*x) ) +
(0.320018 < x) * 0.630035;
main_stream = wet_sound + (dry_sound*0.85);
long_delay = + ~ ( @(5*48000) *(19/20) );
short_delay = + ~ ( @(0.5*48000) *(1/3) );
short_delayed_stream = main_stream * RightPush : short_delay;
long_delayed_stream = ( main_stream + short_delayed_stream ) * LeftPush : long_delay;
process = main_stream + short_delayed_stream + long_delayed_stream <:_,_;
|
378f872aaa1ce2b3e8a87d1c648422005451fa9571d57356e08aa877bfdd6e94
|
Trzyszcz/Langley
|
vang.dsp
|
declare name "Vang";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 1);
gain = nentry("gain", 0.3, 0, 10, 0.01): si.smoo;
gate = button("gate");
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01) : si.smoo;
LeftVertical = hslider("leftvertical", 0.5, 0, 1, 0.01);
LeftPush = button("LeftPush");
RightPush = button("RightPush");
Envelope = en.adsr(0.1, 0, 1, 0.1);
noise_for_unison(y) = no.multinoise(4) :
ba.downSample(y), ba.downSample(y), ba.downSample(y),ba.downSample(y) :
fi.lowpass(1, y),fi.lowpass(1, y), fi.lowpass(1, y),fi.lowpass(1, y);
add_noise_to_freq(base_freq, noise) = base_freq*(1 + (noise*0.014*LeftVertical));
noised_frequencies(base_freq) = noise_for_unison(32) :
add_noise_to_freq(base_freq), add_noise_to_freq(base_freq), add_noise_to_freq(base_freq), add_noise_to_freq(base_freq);
timbre(x) = noised_frequencies(x) :
os.sawtooth, os.sawtooth, os.sawtooth, os.sawtooth :> fi.lowpass(1, 100 + (400*RightVertical));
dry_sound = timbre(freq)*(gate : Envelope)*gain;
wet_sound = 0.15*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
main_stream = wet_sound + (dry_sound*0.85);
long_delay = + ~ ( @(5*48000) *(19/20) );
short_delay = + ~ ( @(0.5*48000) *(1/3) );
short_delayed_stream = main_stream * RightPush : short_delay;
long_delayed_stream = ( main_stream + short_delayed_stream ) * LeftPush : long_delay;
process = main_stream + short_delayed_stream + long_delayed_stream <:_,_;
|
https://raw.githubusercontent.com/Trzyszcz/Langley/d37f30e9c8713a258894421d889f6000df29d495/Instruments/Vang/vang.dsp
|
faust
|
declare name "Vang";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 1);
gain = nentry("gain", 0.3, 0, 10, 0.01): si.smoo;
gate = button("gate");
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01) : si.smoo;
LeftVertical = hslider("leftvertical", 0.5, 0, 1, 0.01);
LeftPush = button("LeftPush");
RightPush = button("RightPush");
Envelope = en.adsr(0.1, 0, 1, 0.1);
noise_for_unison(y) = no.multinoise(4) :
ba.downSample(y), ba.downSample(y), ba.downSample(y),ba.downSample(y) :
fi.lowpass(1, y),fi.lowpass(1, y), fi.lowpass(1, y),fi.lowpass(1, y);
add_noise_to_freq(base_freq, noise) = base_freq*(1 + (noise*0.014*LeftVertical));
noised_frequencies(base_freq) = noise_for_unison(32) :
add_noise_to_freq(base_freq), add_noise_to_freq(base_freq), add_noise_to_freq(base_freq), add_noise_to_freq(base_freq);
timbre(x) = noised_frequencies(x) :
os.sawtooth, os.sawtooth, os.sawtooth, os.sawtooth :> fi.lowpass(1, 100 + (400*RightVertical));
dry_sound = timbre(freq)*(gate : Envelope)*gain;
wet_sound = 0.15*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
main_stream = wet_sound + (dry_sound*0.85);
long_delay = + ~ ( @(5*48000) *(19/20) );
short_delay = + ~ ( @(0.5*48000) *(1/3) );
short_delayed_stream = main_stream * RightPush : short_delay;
long_delayed_stream = ( main_stream + short_delayed_stream ) * LeftPush : long_delay;
process = main_stream + short_delayed_stream + long_delayed_stream <:_,_;
|
|
a8c375be42e2f1dba73765e35f344d7935428871b091514785050c4bcc9a829b
|
Trzyszcz/Langley
|
organ.dsp
|
declare name "Organ";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
LeftVertical = hslider("leftvertical", 0.5, 0, 1, 0.01);
LeftPush = button("LeftPush");
RightPush = button("RightPush");
Envelope = en.adsr(0.1, 0, 1, 0.1);
Lower_part(freq) = (65/100) * os.triangle(freq*(1/2)*(499/500));
Main_part(freq) = (56/100) * os.osc(freq + (freq*(2/5)*os.osc(7*freq)));
High_part(freq) = (70/100) * (os.osc(2*freq) + (1/3) * os.osc(3*2*freq) + (1/5) * os.osc(5*2*freq));
timbre(x) = (Lower_part(x) + Main_part(x) + High_part(x)) * (0.04 + LeftVertical) * (1/2);
u_freq = freq*(1 + (0.2*(RightVertical - 0.50196081399918)));
distorted_timbre = distortion(timbre(freq) + timbre(u_freq));
dry_sound = (distorted_timbre - 1/8) * gain * (gate : Envelope) : fi.lowpass(2, 9000);
wet_sound = 0.15*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
is_bet(x, y, z) = (x >= y) & (x < z); //is x between y and z
distortion(x) =
(x < -0.08905) * ( -1/4 * (1 - ( (1 - abs(x) - 0.032847) ^ 12) ) + 0.01) +
is_bet(x, -0.08905, 0.320018) * ( (-6.153*(x^2)) + (3.9375*x) ) +
(0.320018 < x) * 0.630035;
main_stream = wet_sound + (dry_sound*0.85);
long_delay = + ~ ( @(5*48000) *(19/20) );
short_delay = + ~ ( @(0.5*48000) *(1/3) );
short_delayed_stream = main_stream * RightPush : short_delay;
long_delayed_stream = ( main_stream + short_delayed_stream ) * LeftPush : long_delay;
process = main_stream + short_delayed_stream + long_delayed_stream <:_,_;
|
https://raw.githubusercontent.com/Trzyszcz/Langley/25867936f5d0bf7b1b21969db6f58fc3a66c791b/Instruments/Organ/organ.dsp
|
faust
|
is x between y and z
|
declare name "Organ";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
LeftVertical = hslider("leftvertical", 0.5, 0, 1, 0.01);
LeftPush = button("LeftPush");
RightPush = button("RightPush");
Envelope = en.adsr(0.1, 0, 1, 0.1);
Lower_part(freq) = (65/100) * os.triangle(freq*(1/2)*(499/500));
Main_part(freq) = (56/100) * os.osc(freq + (freq*(2/5)*os.osc(7*freq)));
High_part(freq) = (70/100) * (os.osc(2*freq) + (1/3) * os.osc(3*2*freq) + (1/5) * os.osc(5*2*freq));
timbre(x) = (Lower_part(x) + Main_part(x) + High_part(x)) * (0.04 + LeftVertical) * (1/2);
u_freq = freq*(1 + (0.2*(RightVertical - 0.50196081399918)));
distorted_timbre = distortion(timbre(freq) + timbre(u_freq));
dry_sound = (distorted_timbre - 1/8) * gain * (gate : Envelope) : fi.lowpass(2, 9000);
wet_sound = 0.15*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
distortion(x) =
(x < -0.08905) * ( -1/4 * (1 - ( (1 - abs(x) - 0.032847) ^ 12) ) + 0.01) +
is_bet(x, -0.08905, 0.320018) * ( (-6.153*(x^2)) + (3.9375*x) ) +
(0.320018 < x) * 0.630035;
main_stream = wet_sound + (dry_sound*0.85);
long_delay = + ~ ( @(5*48000) *(19/20) );
short_delay = + ~ ( @(0.5*48000) *(1/3) );
short_delayed_stream = main_stream * RightPush : short_delay;
long_delayed_stream = ( main_stream + short_delayed_stream ) * LeftPush : long_delay;
process = main_stream + short_delayed_stream + long_delayed_stream <:_,_;
|
fa25be148c50e1549c8bcf28664f73dd557e055f2455dde5ff97eb6ae0999de0
|
Trzyszcz/Langley
|
testmou2.dsp
|
declare name "TestMou2";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
initgain = nentry("initgain", 0.3, 0, 10, 0.01) : si.smoo;
RightHorizontal = hslider("righthorizontal", 0.5, 0, 1, 0.01);
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
Envelope = initgain * en.adsr(0.1, 0, 1, 0.1);
nullify = *(0);
f1(x) = no.multinoise(4) <: _,nullify,nullify,nullify :> ba.downSample(x) : fi.lowpass(1, x);
f2(x) = no.multinoise(4) <: nullify,_,nullify,nullify :> ba.downSample(x) : fi.lowpass(1, x);
f3(x) = no.multinoise(4) <: nullify,nullify,_,nullify :> ba.downSample(x) : fi.lowpass(1, x);
f4(x) = no.multinoise(4) <: nullify,nullify,nullify,_ :> ba.downSample(x) : fi.lowpass(1, x);
rate = 32;
freque1 = freq + (freq*0.005*f1(rate)*RightVertical*3);
freque2 = freq + (freq*0.005*f2(rate)*RightVertical*3);
freque3 = freq + (freq*0.005*f3(rate)*RightVertical*3);
freque4 = freq + (freq*0.005*f4(rate)*RightVertical*3);
basictimbre(x) = (1/2) * os.triangle(x) + (1/3) * os.triangle(3*x);
timbre = (1/4) * basictimbre(freque1)
+ (1/4) * basictimbre(freque2)
+ (1/4) * basictimbre(freque3)
+ (1/4) * basictimbre(freque4);
is_bet(x, y, z) = (x >= y) & (x < z); //is x between y and z
distortion(x) =
(x < -0.08905) * ( -1/4 * (1 - ( (1 - abs(x) - 0.032847) ^ 12) ) + 0.01) +
is_bet(x, -0.08905, 0.320018) * ( (-6.153*(x^2)) + (3.9375*x) ) +
(0.320018 < x) * 0.630035;
distorted_timbre = distortion((RightHorizontal + 0.1) * timbre) / (RightHorizontal + 0.1);
dry_sound = gain * (1/(2^( (RightVertical - (1/2)) * 3 ))) * (gate : Envelope) * distorted_timbre : fi.lowpass(2, 9000);
wet_sound = 0.05*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (dry_sound*0.95)<:_,_;
|
https://raw.githubusercontent.com/Trzyszcz/Langley/21824b34f50f17ec2984ba9f1845a6ef4b3ac0ec/Instruments/TestMou2/testmou2.dsp
|
faust
|
is x between y and z
|
declare name "TestMou2";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
initgain = nentry("initgain", 0.3, 0, 10, 0.01) : si.smoo;
RightHorizontal = hslider("righthorizontal", 0.5, 0, 1, 0.01);
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
Envelope = initgain * en.adsr(0.1, 0, 1, 0.1);
nullify = *(0);
f1(x) = no.multinoise(4) <: _,nullify,nullify,nullify :> ba.downSample(x) : fi.lowpass(1, x);
f2(x) = no.multinoise(4) <: nullify,_,nullify,nullify :> ba.downSample(x) : fi.lowpass(1, x);
f3(x) = no.multinoise(4) <: nullify,nullify,_,nullify :> ba.downSample(x) : fi.lowpass(1, x);
f4(x) = no.multinoise(4) <: nullify,nullify,nullify,_ :> ba.downSample(x) : fi.lowpass(1, x);
rate = 32;
freque1 = freq + (freq*0.005*f1(rate)*RightVertical*3);
freque2 = freq + (freq*0.005*f2(rate)*RightVertical*3);
freque3 = freq + (freq*0.005*f3(rate)*RightVertical*3);
freque4 = freq + (freq*0.005*f4(rate)*RightVertical*3);
basictimbre(x) = (1/2) * os.triangle(x) + (1/3) * os.triangle(3*x);
timbre = (1/4) * basictimbre(freque1)
+ (1/4) * basictimbre(freque2)
+ (1/4) * basictimbre(freque3)
+ (1/4) * basictimbre(freque4);
distortion(x) =
(x < -0.08905) * ( -1/4 * (1 - ( (1 - abs(x) - 0.032847) ^ 12) ) + 0.01) +
is_bet(x, -0.08905, 0.320018) * ( (-6.153*(x^2)) + (3.9375*x) ) +
(0.320018 < x) * 0.630035;
distorted_timbre = distortion((RightHorizontal + 0.1) * timbre) / (RightHorizontal + 0.1);
dry_sound = gain * (1/(2^( (RightVertical - (1/2)) * 3 ))) * (gate : Envelope) * distorted_timbre : fi.lowpass(2, 9000);
wet_sound = 0.05*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (dry_sound*0.95)<:_,_;
|
5af789383c8c3fe790d5918fd6ab9330862d3ef6629a719c7a69770ff7bcbee3
|
Trzyszcz/Langley
|
testmou.dsp
|
declare name "TestMou";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
RightHorizontal = hslider("righthorizontal", 0.5, 0, 1, 0.01);
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
Envelope = en.adsr(0.1, 0, 1, 0.1);
nullify = *(0);
f1(x) = no.multinoise(4) <: _,nullify,nullify,nullify :> ba.downSample(x) : fi.lowpass(1, x);
f2(x) = no.multinoise(4) <: nullify,_,nullify,nullify :> ba.downSample(x) : fi.lowpass(1, x);
f3(x) = no.multinoise(4) <: nullify,nullify,_,nullify :> ba.downSample(x) : fi.lowpass(1, x);
f4(x) = no.multinoise(4) <: nullify,nullify,nullify,_ :> ba.downSample(x) : fi.lowpass(1, x);
rate = 32;
freque1 = freq + (freq*0.005*f1(rate)*RightVertical*3);
freque2 = freq + (freq*0.005*f2(rate)*RightVertical*3);
freque3 = freq + (freq*0.005*f3(rate)*RightVertical*3);
freque4 = freq + (freq*0.005*f4(rate)*RightVertical*3);
basictimbre(x) = (1/2) * os.triangle(x) + (1/3) * os.triangle(3*x);
timbre = (1/4) * basictimbre(freque1)
+ (1/4) * basictimbre(freque2)
+ (1/4) * basictimbre(freque3)
+ (1/4) * basictimbre(freque4);
is_bet(x, y, z) = (x >= y) & (x < z); //is x between y and z
distortion(x) =
(x < -0.08905) * ( -1/4 * (1 - ( (1 - abs(x) - 0.032847) ^ 12) ) + 0.01) +
is_bet(x, -0.08905, 0.320018) * ( (-6.153*(x^2)) + (3.9375*x) ) +
(0.320018 < x) * 0.630035;
distorted_timbre = distortion((RightHorizontal + 0.1) * timbre) / (RightHorizontal + 0.1);
dry_sound = gain * (1/(2^(RightHorizontal - (1/2)))) * (gate : Envelope) * distorted_timbre : fi.lowpass(2, 9000);
wet_sound = 0.05*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (dry_sound*0.95)<:_,_;
|
https://raw.githubusercontent.com/Trzyszcz/Langley/21824b34f50f17ec2984ba9f1845a6ef4b3ac0ec/Instruments/TestMou/testmou.dsp
|
faust
|
is x between y and z
|
declare name "TestMou";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 440, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
RightHorizontal = hslider("righthorizontal", 0.5, 0, 1, 0.01);
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
Envelope = en.adsr(0.1, 0, 1, 0.1);
nullify = *(0);
f1(x) = no.multinoise(4) <: _,nullify,nullify,nullify :> ba.downSample(x) : fi.lowpass(1, x);
f2(x) = no.multinoise(4) <: nullify,_,nullify,nullify :> ba.downSample(x) : fi.lowpass(1, x);
f3(x) = no.multinoise(4) <: nullify,nullify,_,nullify :> ba.downSample(x) : fi.lowpass(1, x);
f4(x) = no.multinoise(4) <: nullify,nullify,nullify,_ :> ba.downSample(x) : fi.lowpass(1, x);
rate = 32;
freque1 = freq + (freq*0.005*f1(rate)*RightVertical*3);
freque2 = freq + (freq*0.005*f2(rate)*RightVertical*3);
freque3 = freq + (freq*0.005*f3(rate)*RightVertical*3);
freque4 = freq + (freq*0.005*f4(rate)*RightVertical*3);
basictimbre(x) = (1/2) * os.triangle(x) + (1/3) * os.triangle(3*x);
timbre = (1/4) * basictimbre(freque1)
+ (1/4) * basictimbre(freque2)
+ (1/4) * basictimbre(freque3)
+ (1/4) * basictimbre(freque4);
distortion(x) =
(x < -0.08905) * ( -1/4 * (1 - ( (1 - abs(x) - 0.032847) ^ 12) ) + 0.01) +
is_bet(x, -0.08905, 0.320018) * ( (-6.153*(x^2)) + (3.9375*x) ) +
(0.320018 < x) * 0.630035;
distorted_timbre = distortion((RightHorizontal + 0.1) * timbre) / (RightHorizontal + 0.1);
dry_sound = gain * (1/(2^(RightHorizontal - (1/2)))) * (gate : Envelope) * distorted_timbre : fi.lowpass(2, 9000);
wet_sound = 0.05*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (dry_sound*0.95)<:_,_;
|
2a1a7174da8f060039c6b9ad0dc1613a28ae9f67be267b309daca4d0fb9b957a
|
beataburreau/FAUST-signal-graphs-goes-Haskell
|
bell.dsp
|
declare filename "bellModel.dsp";
declare name "bellModel";
import("stdfaust.lib");
tf22(b0,b1,b2,a1,a2) = // tf2, direct-form 2:
_ : (((_,_,_:>_)~*(-a1)<:mem,*(b0))~*(-a2))
: (_<:mem,*(b1)),_ : *(b2),_,_ :> _;
modeFilter(freq,t60,gain) = tf22(b0,b1,b2,a1,a2)*gain
with{
b0 = 1;
b1 = 0;
b2 = -1;
w = 2*ma.PI*freq/ma.SR;
r = pow(0.001,1/float(t60*ma.SR));
a1 = -2*r*cos(w);
a2 = r^2;
};
standardBellModel(nModes,exPos,t60) = modeFilter(400,10,0.691911)
// standardBellModel(nModes,exPos,t60) = _ <:
// par(i,nModes,modeFilter(modesFreqs(i),modesT60s(i),modesGains(int(exPos),i)))
// :> /(nModes)
with{
nExPos = 7;
modesFreqs(n) =
ba.take(n+1,(490.25,493.646,924.838,927.779,1181.21,1186.94,1348.84,1349.5,1560.33,1635.97,1706.73,1712.89,1745.05,1745.25,2005.51,2025.47,2053.88,2142.37,2151.4,2408.16,2534.11,2536.42,2623.3,2628.4,2711.57,2712.46,2823.23,2827.22,2863.42,2874.19,2923,2925.69,3032.52,3042.15,3208.57,3392.52,3485.92,3493.65,3539.8,3550.56,3678.71,3719.04,3722.59,3786.28,3789.38,3993.59,3998.43,4123.41,4164.83,4187.98));
modesGains(p,n) =
waveform{0.691911,0.622333,0.548651,0.463306,0.826946,0.749513,0.2242,0.642678,0.760442,0.326054,0.276463,0.359344,0.18258,0.686765,0.457159,0.839015,0.845338,0.372377,0.306417,0.147381,0.359707,0.653537,0.27553,0.401233,0.435417,0.251481,0.190062,0.773372,0.315014,0.228812,0.521512,0.411542,0.720762,1,0.286502,0.338938,0.119995,0.432289,0.409677,0.156272,0.298871,0.250786,0.640776,0.209431,0.17001,0.390014,0.301698,0.799413,0.980581,0.385,0.82544,0.818894,0.349616,0.235396,0.783164,0.821914,0.28411,0.430286,0.507671,0.326254,0.260488,0.273364,0.20518,0.714852,0.47995,0.803637,0.683943,0.355371,0.406924,0.656257,0.423025,0.413515,0.38636,0.384787,0.389448,0.813367,0.234988,1,0.311268,0.350245,0.403856,0.646143,0.500485,0.833553,0.431768,0.467064,0.298979,0.487413,0.514907,0.369383,0.106197,0.494224,0.816079,0.535807,0.379873,0.380201,0.606306,0.516117,0.748449,0.556948,0.587066,0.584423,0.394866,0.341121,0.433458,0.455987,0.361237,0.42939,0.122969,0.133175,0.505176,0.513985,0.0554619,0.604942,0.372074,0.381126,0.314354,0.499636,0.518711,0.923792,0.259544,0.576517,0.553915,0.585444,0.245369,1,0.117757,0.977318,0.652862,0.509314,0.14855,0.506402,0.180059,0.356005,0.38681,0.279354,0.205792,0.551055,0.689107,0.445724,0.306857,0.324747,0.603621,0.394466,0.288613,0.264697,0.60612,0.20274,0.267271,0.925656,0.439228,0.425884,0.626633,0.547204,0.230022,0.225654,0.392697,0.493474,0.149857,0.0604048,0.693889,0.740271,0.175485,0.704998,0.329732,0.153026,0.125744,0.286995,0.278878,0.812372,0.0562174,0.241479,0.294525,0.358834,0.171047,0.847604,0.17228,0.97521,0.892073,0.613987,0.0659213,0.301583,0.0610847,0.125438,0.145151,0.180086,0.124231,0.260161,0.337573,0.203743,0.655798,0.425893,0.902347,0.500686,0.311173,0.215561,0.349591,0.0854218,0.0805062,1,0.338652,0.295396,0.698314,0.664972,0.118983,0.0881905,0.31158,0.391136,0.151915,0.239504,0.685742,0.884332,0.288516,0.768688,0.274851,0.0490311,0.0357865,0.293303,0.249461,0.493771,0.340984,0.467623,0.216631,0.255235,0.0988695,0.46198,0.147247,0.640196,1,0.551938,0.0453732,0.189907,0.0197542,0.0309217,0.769837,0.360418,0.384041,0.867434,0.398948,0.171848,0.748652,0.301957,0.860611,0.958674,0.54903,0.272753,0.372753,0.0180728,0.0292353,0.8502,0.224583,0.214805,0.670319,0.586433,0.0435142,0.0388574,0.144811,0.157061,0.155569,0.418334,0.673656,0.749573,0.337354,0.747254,0.255997,0.0239656,0.0310719,0.721087,0.700616,0.199051,0.511844,0.849485,0.700682,0.778658,0.171289,0.261973,0.129228,0.328597,0.781821,0.583813,0.0806713,0.416876,0.0118202,0.00868563,1,0.461884,0.186882,0.641364,0.994705,0.501902,0.566449,0.0678845,0.139737,0.462582,0.318656,0.233947,0.495941,0.0314028,0.0146478,0.70432,0.124953,0.132549,0.457126,0.378636,0.0169362,0.0195494,0.204155,0.294401,0.271367,0.730857,0.459322,0.433078,0.325171,0.734536,0.416205,0.012873,0.0388489,0.821567,0.863683,0.0920531,0.393972,0.539544,0.832052,0.842732,0.241144,0.479558,0.283092,0.477845,0.385473,0.436587,0.144308,0.642395,0.0215791,0.00779029,0.563714,0.838279,0.410004,0.829086,1,0.630598,0.0233729,0.496217,0.711042,0.914266,0.695042,0.331894,0.898442,0.028568,0.0174966,0.482846},int(p*nModes+n)
: rdtable;
modesT60s(i) = t60*pow(1-(modesFreqs(i)/4191.95),2.5);
};
process = 1-1' : ba.impulsify : standardBellModel(50,0,30);
|
https://raw.githubusercontent.com/beataburreau/FAUST-signal-graphs-goes-Haskell/6f468716515a5047e290864b5af448c14d4c03d4/test/test-files/bell.dsp
|
faust
|
tf2, direct-form 2:
standardBellModel(nModes,exPos,t60) = _ <:
par(i,nModes,modeFilter(modesFreqs(i),modesT60s(i),modesGains(int(exPos),i)))
:> /(nModes)
|
declare filename "bellModel.dsp";
declare name "bellModel";
import("stdfaust.lib");
_ : (((_,_,_:>_)~*(-a1)<:mem,*(b0))~*(-a2))
: (_<:mem,*(b1)),_ : *(b2),_,_ :> _;
modeFilter(freq,t60,gain) = tf22(b0,b1,b2,a1,a2)*gain
with{
b0 = 1;
b1 = 0;
b2 = -1;
w = 2*ma.PI*freq/ma.SR;
r = pow(0.001,1/float(t60*ma.SR));
a1 = -2*r*cos(w);
a2 = r^2;
};
standardBellModel(nModes,exPos,t60) = modeFilter(400,10,0.691911)
with{
nExPos = 7;
modesFreqs(n) =
ba.take(n+1,(490.25,493.646,924.838,927.779,1181.21,1186.94,1348.84,1349.5,1560.33,1635.97,1706.73,1712.89,1745.05,1745.25,2005.51,2025.47,2053.88,2142.37,2151.4,2408.16,2534.11,2536.42,2623.3,2628.4,2711.57,2712.46,2823.23,2827.22,2863.42,2874.19,2923,2925.69,3032.52,3042.15,3208.57,3392.52,3485.92,3493.65,3539.8,3550.56,3678.71,3719.04,3722.59,3786.28,3789.38,3993.59,3998.43,4123.41,4164.83,4187.98));
modesGains(p,n) =
waveform{0.691911,0.622333,0.548651,0.463306,0.826946,0.749513,0.2242,0.642678,0.760442,0.326054,0.276463,0.359344,0.18258,0.686765,0.457159,0.839015,0.845338,0.372377,0.306417,0.147381,0.359707,0.653537,0.27553,0.401233,0.435417,0.251481,0.190062,0.773372,0.315014,0.228812,0.521512,0.411542,0.720762,1,0.286502,0.338938,0.119995,0.432289,0.409677,0.156272,0.298871,0.250786,0.640776,0.209431,0.17001,0.390014,0.301698,0.799413,0.980581,0.385,0.82544,0.818894,0.349616,0.235396,0.783164,0.821914,0.28411,0.430286,0.507671,0.326254,0.260488,0.273364,0.20518,0.714852,0.47995,0.803637,0.683943,0.355371,0.406924,0.656257,0.423025,0.413515,0.38636,0.384787,0.389448,0.813367,0.234988,1,0.311268,0.350245,0.403856,0.646143,0.500485,0.833553,0.431768,0.467064,0.298979,0.487413,0.514907,0.369383,0.106197,0.494224,0.816079,0.535807,0.379873,0.380201,0.606306,0.516117,0.748449,0.556948,0.587066,0.584423,0.394866,0.341121,0.433458,0.455987,0.361237,0.42939,0.122969,0.133175,0.505176,0.513985,0.0554619,0.604942,0.372074,0.381126,0.314354,0.499636,0.518711,0.923792,0.259544,0.576517,0.553915,0.585444,0.245369,1,0.117757,0.977318,0.652862,0.509314,0.14855,0.506402,0.180059,0.356005,0.38681,0.279354,0.205792,0.551055,0.689107,0.445724,0.306857,0.324747,0.603621,0.394466,0.288613,0.264697,0.60612,0.20274,0.267271,0.925656,0.439228,0.425884,0.626633,0.547204,0.230022,0.225654,0.392697,0.493474,0.149857,0.0604048,0.693889,0.740271,0.175485,0.704998,0.329732,0.153026,0.125744,0.286995,0.278878,0.812372,0.0562174,0.241479,0.294525,0.358834,0.171047,0.847604,0.17228,0.97521,0.892073,0.613987,0.0659213,0.301583,0.0610847,0.125438,0.145151,0.180086,0.124231,0.260161,0.337573,0.203743,0.655798,0.425893,0.902347,0.500686,0.311173,0.215561,0.349591,0.0854218,0.0805062,1,0.338652,0.295396,0.698314,0.664972,0.118983,0.0881905,0.31158,0.391136,0.151915,0.239504,0.685742,0.884332,0.288516,0.768688,0.274851,0.0490311,0.0357865,0.293303,0.249461,0.493771,0.340984,0.467623,0.216631,0.255235,0.0988695,0.46198,0.147247,0.640196,1,0.551938,0.0453732,0.189907,0.0197542,0.0309217,0.769837,0.360418,0.384041,0.867434,0.398948,0.171848,0.748652,0.301957,0.860611,0.958674,0.54903,0.272753,0.372753,0.0180728,0.0292353,0.8502,0.224583,0.214805,0.670319,0.586433,0.0435142,0.0388574,0.144811,0.157061,0.155569,0.418334,0.673656,0.749573,0.337354,0.747254,0.255997,0.0239656,0.0310719,0.721087,0.700616,0.199051,0.511844,0.849485,0.700682,0.778658,0.171289,0.261973,0.129228,0.328597,0.781821,0.583813,0.0806713,0.416876,0.0118202,0.00868563,1,0.461884,0.186882,0.641364,0.994705,0.501902,0.566449,0.0678845,0.139737,0.462582,0.318656,0.233947,0.495941,0.0314028,0.0146478,0.70432,0.124953,0.132549,0.457126,0.378636,0.0169362,0.0195494,0.204155,0.294401,0.271367,0.730857,0.459322,0.433078,0.325171,0.734536,0.416205,0.012873,0.0388489,0.821567,0.863683,0.0920531,0.393972,0.539544,0.832052,0.842732,0.241144,0.479558,0.283092,0.477845,0.385473,0.436587,0.144308,0.642395,0.0215791,0.00779029,0.563714,0.838279,0.410004,0.829086,1,0.630598,0.0233729,0.496217,0.711042,0.914266,0.695042,0.331894,0.898442,0.028568,0.0174966,0.482846},int(p*nModes+n)
: rdtable;
modesT60s(i) = t60*pow(1-(modesFreqs(i)/4191.95),2.5);
};
process = 1-1' : ba.impulsify : standardBellModel(50,0,30);
|
654417800b99066c25481b4b12c1d9f07aeaffd72c15c4b19e8b0cce7186fa5b
|
beataburreau/FAUST-signal-graphs-goes-Haskell
|
bellModel_oneWave.dsp
|
declare filename "bellModel_oneWave.dsp";
declare name "bellModel_oneWave";
import("stdfaust.lib");
tf22(b0,b1,b2,a1,a2) = // tf2, direct-form 2:
_ : (((_,_,_:>_)~*(-a1) : + (1000) : - (1000) <:mem,*(b0))~*(-a2))
: (_<:mem,*(b1)),_ : *(b2),_,_ :> _;
modeFilter(freq,t60,gain) = tf22(b0,b1,b2,a1,a2)*gain
with{
b0 = 1;
b1 = 0;
b2 = -1;
w = 2*ma.PI*freq/ma.SR;
r = pow(0.001,1/float(t60*ma.SR));
a1 = -2*r*cos(w);
a2 = r^2;
};
//standardBellModel(nModes,exPos,t60) = modeFilter(modesFreqs(0),modesT60s(0),modesGains(int(exPos),0))
standardBellModel(nModes,exPos,t60) = modeFilter(1000,10,1)
//standardBellModel(nModes,exPos,t60) = _ <:
//par(i,nModes,modeFilter(modesFreqs(i),modesT60s(i),modesGains(int(exPos),i)))
//:> /(nModes)
with{
nExPos = 7;
modesFreqs(n) =
ba.take(n+1,(490.25,493.646,924.838,927.779,1181.21,1186.94,1348.84,1349.5,1560.33,1635.97,1706.73,1712.89,1745.05,1745.25,2005.51,2025.47,2053.88,2142.37,2151.4,2408.16,2534.11,2536.42,2623.3,2628.4,2711.57,2712.46,2823.23,2827.22,2863.42,2874.19,2923,2925.69,3032.52,3042.15,3208.57,3392.52,3485.92,3493.65,3539.8,3550.56,3678.71,3719.04,3722.59,3786.28,3789.38,3993.59,3998.43,4123.41,4164.83,4187.98));
modesGains(p,n) =
waveform{0.691911,0.622333,0.548651,0.463306,0.826946,0.749513,0.2242,0.642678,0.760442,0.326054,0.276463,0.359344,0.18258,0.686765,0.457159,0.839015,0.845338,0.372377,0.306417,0.147381,0.359707,0.653537,0.27553,0.401233,0.435417,0.251481,0.190062,0.773372,0.315014,0.228812,0.521512,0.411542,0.720762,1,0.286502,0.338938,0.119995,0.432289,0.409677,0.156272,0.298871,0.250786,0.640776,0.209431,0.17001,0.390014,0.301698,0.799413,0.980581,0.385,0.82544,0.818894,0.349616,0.235396,0.783164,0.821914,0.28411,0.430286,0.507671,0.326254,0.260488,0.273364,0.20518,0.714852,0.47995,0.803637,0.683943,0.355371,0.406924,0.656257,0.423025,0.413515,0.38636,0.384787,0.389448,0.813367,0.234988,1,0.311268,0.350245,0.403856,0.646143,0.500485,0.833553,0.431768,0.467064,0.298979,0.487413,0.514907,0.369383,0.106197,0.494224,0.816079,0.535807,0.379873,0.380201,0.606306,0.516117,0.748449,0.556948,0.587066,0.584423,0.394866,0.341121,0.433458,0.455987,0.361237,0.42939,0.122969,0.133175,0.505176,0.513985,0.0554619,0.604942,0.372074,0.381126,0.314354,0.499636,0.518711,0.923792,0.259544,0.576517,0.553915,0.585444,0.245369,1,0.117757,0.977318,0.652862,0.509314,0.14855,0.506402,0.180059,0.356005,0.38681,0.279354,0.205792,0.551055,0.689107,0.445724,0.306857,0.324747,0.603621,0.394466,0.288613,0.264697,0.60612,0.20274,0.267271,0.925656,0.439228,0.425884,0.626633,0.547204,0.230022,0.225654,0.392697,0.493474,0.149857,0.0604048,0.693889,0.740271,0.175485,0.704998,0.329732,0.153026,0.125744,0.286995,0.278878,0.812372,0.0562174,0.241479,0.294525,0.358834,0.171047,0.847604,0.17228,0.97521,0.892073,0.613987,0.0659213,0.301583,0.0610847,0.125438,0.145151,0.180086,0.124231,0.260161,0.337573,0.203743,0.655798,0.425893,0.902347,0.500686,0.311173,0.215561,0.349591,0.0854218,0.0805062,1,0.338652,0.295396,0.698314,0.664972,0.118983,0.0881905,0.31158,0.391136,0.151915,0.239504,0.685742,0.884332,0.288516,0.768688,0.274851,0.0490311,0.0357865,0.293303,0.249461,0.493771,0.340984,0.467623,0.216631,0.255235,0.0988695,0.46198,0.147247,0.640196,1,0.551938,0.0453732,0.189907,0.0197542,0.0309217,0.769837,0.360418,0.384041,0.867434,0.398948,0.171848,0.748652,0.301957,0.860611,0.958674,0.54903,0.272753,0.372753,0.0180728,0.0292353,0.8502,0.224583,0.214805,0.670319,0.586433,0.0435142,0.0388574,0.144811,0.157061,0.155569,0.418334,0.673656,0.749573,0.337354,0.747254,0.255997,0.0239656,0.0310719,0.721087,0.700616,0.199051,0.511844,0.849485,0.700682,0.778658,0.171289,0.261973,0.129228,0.328597,0.781821,0.583813,0.0806713,0.416876,0.0118202,0.00868563,1,0.461884,0.186882,0.641364,0.994705,0.501902,0.566449,0.0678845,0.139737,0.462582,0.318656,0.233947,0.495941,0.0314028,0.0146478,0.70432,0.124953,0.132549,0.457126,0.378636,0.0169362,0.0195494,0.204155,0.294401,0.271367,0.730857,0.459322,0.433078,0.325171,0.734536,0.416205,0.012873,0.0388489,0.821567,0.863683,0.0920531,0.393972,0.539544,0.832052,0.842732,0.241144,0.479558,0.283092,0.477845,0.385473,0.436587,0.144308,0.642395,0.0215791,0.00779029,0.563714,0.838279,0.410004,0.829086,1,0.630598,0.0233729,0.496217,0.711042,0.914266,0.695042,0.331894,0.898442,0.028568,0.0174966,0.482846},int(p*nModes+n)
: rdtable;
modesT60s(i) = t60*pow(1-(modesFreqs(i)/4191.95),2.5);
};
process = 1-1' : ba.impulsify : standardBellModel(50,0,30);
|
https://raw.githubusercontent.com/beataburreau/FAUST-signal-graphs-goes-Haskell/6f468716515a5047e290864b5af448c14d4c03d4/test/test-files/bellModel_oneWave.dsp
|
faust
|
tf2, direct-form 2:
standardBellModel(nModes,exPos,t60) = modeFilter(modesFreqs(0),modesT60s(0),modesGains(int(exPos),0))
standardBellModel(nModes,exPos,t60) = _ <:
par(i,nModes,modeFilter(modesFreqs(i),modesT60s(i),modesGains(int(exPos),i)))
:> /(nModes)
|
declare filename "bellModel_oneWave.dsp";
declare name "bellModel_oneWave";
import("stdfaust.lib");
_ : (((_,_,_:>_)~*(-a1) : + (1000) : - (1000) <:mem,*(b0))~*(-a2))
: (_<:mem,*(b1)),_ : *(b2),_,_ :> _;
modeFilter(freq,t60,gain) = tf22(b0,b1,b2,a1,a2)*gain
with{
b0 = 1;
b1 = 0;
b2 = -1;
w = 2*ma.PI*freq/ma.SR;
r = pow(0.001,1/float(t60*ma.SR));
a1 = -2*r*cos(w);
a2 = r^2;
};
standardBellModel(nModes,exPos,t60) = modeFilter(1000,10,1)
with{
nExPos = 7;
modesFreqs(n) =
ba.take(n+1,(490.25,493.646,924.838,927.779,1181.21,1186.94,1348.84,1349.5,1560.33,1635.97,1706.73,1712.89,1745.05,1745.25,2005.51,2025.47,2053.88,2142.37,2151.4,2408.16,2534.11,2536.42,2623.3,2628.4,2711.57,2712.46,2823.23,2827.22,2863.42,2874.19,2923,2925.69,3032.52,3042.15,3208.57,3392.52,3485.92,3493.65,3539.8,3550.56,3678.71,3719.04,3722.59,3786.28,3789.38,3993.59,3998.43,4123.41,4164.83,4187.98));
modesGains(p,n) =
waveform{0.691911,0.622333,0.548651,0.463306,0.826946,0.749513,0.2242,0.642678,0.760442,0.326054,0.276463,0.359344,0.18258,0.686765,0.457159,0.839015,0.845338,0.372377,0.306417,0.147381,0.359707,0.653537,0.27553,0.401233,0.435417,0.251481,0.190062,0.773372,0.315014,0.228812,0.521512,0.411542,0.720762,1,0.286502,0.338938,0.119995,0.432289,0.409677,0.156272,0.298871,0.250786,0.640776,0.209431,0.17001,0.390014,0.301698,0.799413,0.980581,0.385,0.82544,0.818894,0.349616,0.235396,0.783164,0.821914,0.28411,0.430286,0.507671,0.326254,0.260488,0.273364,0.20518,0.714852,0.47995,0.803637,0.683943,0.355371,0.406924,0.656257,0.423025,0.413515,0.38636,0.384787,0.389448,0.813367,0.234988,1,0.311268,0.350245,0.403856,0.646143,0.500485,0.833553,0.431768,0.467064,0.298979,0.487413,0.514907,0.369383,0.106197,0.494224,0.816079,0.535807,0.379873,0.380201,0.606306,0.516117,0.748449,0.556948,0.587066,0.584423,0.394866,0.341121,0.433458,0.455987,0.361237,0.42939,0.122969,0.133175,0.505176,0.513985,0.0554619,0.604942,0.372074,0.381126,0.314354,0.499636,0.518711,0.923792,0.259544,0.576517,0.553915,0.585444,0.245369,1,0.117757,0.977318,0.652862,0.509314,0.14855,0.506402,0.180059,0.356005,0.38681,0.279354,0.205792,0.551055,0.689107,0.445724,0.306857,0.324747,0.603621,0.394466,0.288613,0.264697,0.60612,0.20274,0.267271,0.925656,0.439228,0.425884,0.626633,0.547204,0.230022,0.225654,0.392697,0.493474,0.149857,0.0604048,0.693889,0.740271,0.175485,0.704998,0.329732,0.153026,0.125744,0.286995,0.278878,0.812372,0.0562174,0.241479,0.294525,0.358834,0.171047,0.847604,0.17228,0.97521,0.892073,0.613987,0.0659213,0.301583,0.0610847,0.125438,0.145151,0.180086,0.124231,0.260161,0.337573,0.203743,0.655798,0.425893,0.902347,0.500686,0.311173,0.215561,0.349591,0.0854218,0.0805062,1,0.338652,0.295396,0.698314,0.664972,0.118983,0.0881905,0.31158,0.391136,0.151915,0.239504,0.685742,0.884332,0.288516,0.768688,0.274851,0.0490311,0.0357865,0.293303,0.249461,0.493771,0.340984,0.467623,0.216631,0.255235,0.0988695,0.46198,0.147247,0.640196,1,0.551938,0.0453732,0.189907,0.0197542,0.0309217,0.769837,0.360418,0.384041,0.867434,0.398948,0.171848,0.748652,0.301957,0.860611,0.958674,0.54903,0.272753,0.372753,0.0180728,0.0292353,0.8502,0.224583,0.214805,0.670319,0.586433,0.0435142,0.0388574,0.144811,0.157061,0.155569,0.418334,0.673656,0.749573,0.337354,0.747254,0.255997,0.0239656,0.0310719,0.721087,0.700616,0.199051,0.511844,0.849485,0.700682,0.778658,0.171289,0.261973,0.129228,0.328597,0.781821,0.583813,0.0806713,0.416876,0.0118202,0.00868563,1,0.461884,0.186882,0.641364,0.994705,0.501902,0.566449,0.0678845,0.139737,0.462582,0.318656,0.233947,0.495941,0.0314028,0.0146478,0.70432,0.124953,0.132549,0.457126,0.378636,0.0169362,0.0195494,0.204155,0.294401,0.271367,0.730857,0.459322,0.433078,0.325171,0.734536,0.416205,0.012873,0.0388489,0.821567,0.863683,0.0920531,0.393972,0.539544,0.832052,0.842732,0.241144,0.479558,0.283092,0.477845,0.385473,0.436587,0.144308,0.642395,0.0215791,0.00779029,0.563714,0.838279,0.410004,0.829086,1,0.630598,0.0233729,0.496217,0.711042,0.914266,0.695042,0.331894,0.898442,0.028568,0.0174966,0.482846},int(p*nModes+n)
: rdtable;
modesT60s(i) = t60*pow(1-(modesFreqs(i)/4191.95),2.5);
};
process = 1-1' : ba.impulsify : standardBellModel(50,0,30);
|
5639c2c26de2f8c58a3cbc936091840410a685a255e374e584d797b8efcadd99
|
SputnikStan5/Lua-Stk
|
midi_trigger.dsp
|
// midi-trigger.dsp
//
// Henrik von Coler
// 2020-05-17
import("stdfaust.lib");
freq = nentry("freq",200,40,2000,0.01) : si.polySmooth(gate,0.999,2);
gain = nentry("gain",1,0,1,0.01) : si.polySmooth(gate,0.999,2);
gate = button("gate") : si.smoo;
process = vgroup("synth",os.sawtooth(freq)*gain*gate <: _,_);
// import("stdfaust.lib");
// freq =100;
// hslider("frequency[midi:ctrl 48]",100,20,1000,0.1) : si.smoo;
// trigger = 1 when MIDI key pressed
// = 0 when released
// trig = button("trigger[midi:key 0,1]");
// process = os.osc(freq) * en.arfe(0.01, 1, 0,trig) <: _,_ ;
|
https://raw.githubusercontent.com/SputnikStan5/Lua-Stk/80cc99dce8648eccc2b065afdf170b8334091461/Faust/sound_synthesis_faust/faust/Control/midi_trigger.dsp
|
faust
|
midi-trigger.dsp
Henrik von Coler
2020-05-17
import("stdfaust.lib");
freq =100;
hslider("frequency[midi:ctrl 48]",100,20,1000,0.1) : si.smoo;
trigger = 1 when MIDI key pressed
= 0 when released
trig = button("trigger[midi:key 0,1]");
process = os.osc(freq) * en.arfe(0.01, 1, 0,trig) <: _,_ ;
|
import("stdfaust.lib");
freq = nentry("freq",200,40,2000,0.01) : si.polySmooth(gate,0.999,2);
gain = nentry("gain",1,0,1,0.01) : si.polySmooth(gate,0.999,2);
gate = button("gate") : si.smoo;
process = vgroup("synth",os.sawtooth(freq)*gain*gate <: _,_);
|
6bb38e678f1a6ae9656028d217c4cc0455116e1b66ae370eecc7831dac3f15b3
|
SputnikStan5/Lua-Stk
|
feedback_minimal.dsp
|
import("stdfaust.lib");
process = + ~ (_*0.1) ;
|
https://raw.githubusercontent.com/SputnikStan5/Lua-Stk/80cc99dce8648eccc2b065afdf170b8334091461/Faust/sound_synthesis_faust/faust/Basics/feedback_minimal.dsp
|
faust
|
import("stdfaust.lib");
process = + ~ (_*0.1) ;
|
|
256060817f7439039e0aecd8e15d86187c0b580a322d84dd0cdbb5b5bec65ef9
|
SputnikStan5/AudioLAB
|
sequential_example.dsp
|
import("stdfaust.lib");
freq = hslider("frequency",100, 10, 1000, 0.001) : si.smoo;
sig = 0.5*os.square(50);
filt = fi.lowpass(5,freq);
process = sig:filt;
|
https://raw.githubusercontent.com/SputnikStan5/AudioLAB/c12684b16f4d27dc3c33e63986611923821117d2/Faust/Library/DSP/sound_synthesis_faust/faust/Basics/sequential_example.dsp
|
faust
|
import("stdfaust.lib");
freq = hslider("frequency",100, 10, 1000, 0.001) : si.smoo;
sig = 0.5*os.square(50);
filt = fi.lowpass(5,freq);
process = sig:filt;
|
|
d2bcaf0b320dd6f80fd02164c0f5050b0ef705aae9b13f49b4f2ffb9579d1967
|
SputnikStan5/AudioLAB
|
quad_spat.dsp
|
declare name "quad_spat";
declare author "HvC";
import("stdfaust.lib");
angle = hslider("angle", 0.0, 0, 1, 0.01);
distance = hslider("distance", 0.5, 0, 1, 0.01);
process = vgroup("quad_spat", sp.spat(4, angle, distance));
|
https://raw.githubusercontent.com/SputnikStan5/AudioLAB/c12684b16f4d27dc3c33e63986611923821117d2/Faust/Library/sound_synthesis_faust/faust/Spatial/quad_spat.dsp
|
faust
|
declare name "quad_spat";
declare author "HvC";
import("stdfaust.lib");
angle = hslider("angle", 0.0, 0, 1, 0.01);
distance = hslider("distance", 0.5, 0, 1, 0.01);
process = vgroup("quad_spat", sp.spat(4, angle, distance));
|
|
94e3662ed35a20673296cfcdea95167f9d512547e3660f7397bd1f1de30ff3c1
|
SputnikStan5/Lua-Stk
|
feedback_example.dsp
|
import("stdfaust.lib");
// two parameters as horizontal sliders
gain = hslider("Gain",0, 0, 1, 0.01);
delay = hslider("Delay",0, 0, 10000, 1);
// source signal is a saw
sig = os.lf_imptrain(1);
// the processing function
process = sig : + ~ (gain * (_ ,delay : @)) ;
|
https://raw.githubusercontent.com/SputnikStan5/Lua-Stk/80cc99dce8648eccc2b065afdf170b8334091461/Faust/sound_synthesis_faust/faust/Basics/feedback_example.dsp
|
faust
|
two parameters as horizontal sliders
source signal is a saw
the processing function
|
import("stdfaust.lib");
gain = hslider("Gain",0, 0, 1, 0.01);
delay = hslider("Delay",0, 0, 10000, 1);
sig = os.lf_imptrain(1);
process = sig : + ~ (gain * (_ ,delay : @)) ;
|
22841fb2b0cbef82d44b4a18d38ba4c678204fa79949e15b29867658fa805509
|
SputnikStan5/Lua-Stk
|
midi_example.dsp
|
// midi-example.dsp
//
// Control a sine wave frequency with a MIDI controller.
//
// Henrik von Coler
// 2020-05-17
import("stdfaust.lib");
freq = hslider("frequency[midi:ctrl 48]",100,20,1000,0.1) : si.smoo;
process = os.osc(freq) <: _,_ ;
|
https://raw.githubusercontent.com/SputnikStan5/Lua-Stk/80cc99dce8648eccc2b065afdf170b8334091461/Faust/DSP/sound_synthesis_faust/faust/Control/midi_example.dsp
|
faust
|
midi-example.dsp
Control a sine wave frequency with a MIDI controller.
Henrik von Coler
2020-05-17
|
import("stdfaust.lib");
freq = hslider("frequency[midi:ctrl 48]",100,20,1000,0.1) : si.smoo;
process = os.osc(freq) <: _,_ ;
|
33b8b885d5fb375c8b28188eba2389bb1251ec18f41b73bba7b0aa5c1e720add
|
SputnikStan5/Lua-Stk
|
merging_example.dsp
|
import("stdfaust.lib");
// create four sine waves
// with arbitrary frequencies
s1 = 0.2*os.osc(120);
s2 = 0.2*os.osc(340);
s3 = 0.2*os.osc(1560);
s4 = 0.2*os.osc(780);
// merge them to two signals
process = s1,s2,s3,s4 :> _;
|
https://raw.githubusercontent.com/SputnikStan5/Lua-Stk/80cc99dce8648eccc2b065afdf170b8334091461/Faust/DSP/sound_synthesis_faust/faust/Basics/merging_example.dsp
|
faust
|
create four sine waves
with arbitrary frequencies
merge them to two signals
|
import("stdfaust.lib");
s1 = 0.2*os.osc(120);
s2 = 0.2*os.osc(340);
s3 = 0.2*os.osc(1560);
s4 = 0.2*os.osc(780);
process = s1,s2,s3,s4 :> _;
|
574bb99e8a67f4bd67557a85f98e8670c3044deefd2e5cbdbd41c37b42dea060
|
SputnikStan5/Lua-Stk
|
n_spat.dsp
|
import("stdfaust.lib");
speakers = (-45, 45, 135, -135);
n = 4;
angle = hslider("angle", 0.0, -180, 180, 0.01);
distance = hslider("distance", 0.5, 0, 10, 0.01);
process = _ <: par(i, n, *( scaler(i, n, angle, distance) : si.smooth(0.9999) ))
with {
scaler(i, n, angle, distance) = (distance/2.0+0.5)
* sqrt( max(0.0, 1.0 - abs(fmod(angle+0.5 + float(n-i) /n, 1.0) - 0.5) * n * distance));
};
|
https://raw.githubusercontent.com/SputnikStan5/Lua-Stk/80cc99dce8648eccc2b065afdf170b8334091461/Faust/DSP/sound_synthesis_faust/faust/Spatial/n_spat.dsp
|
faust
|
import("stdfaust.lib");
speakers = (-45, 45, 135, -135);
n = 4;
angle = hslider("angle", 0.0, -180, 180, 0.01);
distance = hslider("distance", 0.5, 0, 10, 0.01);
process = _ <: par(i, n, *( scaler(i, n, angle, distance) : si.smooth(0.9999) ))
with {
scaler(i, n, angle, distance) = (distance/2.0+0.5)
* sqrt( max(0.0, 1.0 - abs(fmod(angle+0.5 + float(n-i) /n, 1.0) - 0.5) * n * distance));
};
|
|
e725b8af300309cb813dced045f5456ec8dbca4b65e975e264f7f0132555fe68
|
SputnikStan5/Lua-Stk
|
sine_example.dsp
|
// sine_example.dsp
//
// Henrik von Coler
// 2020-04-21
import("stdfaust.lib");
// input parameters with GUI elements
freq = hslider("frequency",100, 10, 1000, 0.001);
gain = hslider("gain[style:knob]",0.5, 0, 1, 0.001);
// a sine oscillator with controllable freuency and aplitude:
process = os.osc(freq)*gain;
|
https://raw.githubusercontent.com/SputnikStan5/Lua-Stk/80cc99dce8648eccc2b065afdf170b8334091461/Faust/DSP/sound_synthesis_faust/faust/Basics/sine_example.dsp
|
faust
|
sine_example.dsp
Henrik von Coler
2020-04-21
input parameters with GUI elements
a sine oscillator with controllable freuency and aplitude:
|
import("stdfaust.lib");
freq = hslider("frequency",100, 10, 1000, 0.001);
gain = hslider("gain[style:knob]",0.5, 0, 1, 0.001);
process = os.osc(freq)*gain;
|
139b1d52361a466abef6d50e01134ba8fd1ee4a0556f77efa153ea7da4deaeef
|
SputnikStan5/Lua-Stk
|
sawtooth_filter.dsp
|
// sawtooth-filter.dsp
//
// First steps with a VCO-VCA-VCF setup.
// The three modules are connected in series.
//
// No anti-aliasing!
//
// - steady sound
// - control over f0, cutoff, resonance, gain
//
// Henrik von Coler
// 2020-05-17
import("stdfaust.lib");
//////////////////////////////////////////////////////////////////////////
// Control Parameters
//////////////////////////////////////////////////////////////////////////
cutoff = hslider("Cutoff [midi:ctrl 48]", 100, 5, 6000, 0.001):si.smoo;
f0 = hslider("Pitch[midi:ctrl 49]", 100, 5, 500, 0.001):si.smoo;
q = hslider("Q[midi:ctrl 50]", 1, 0.1, 100, 0.01):si.smoo;
gain = hslider("Gain[midi:ctrl 51]", 1, 0, 1, 0.01):si.smoo;
//////////////////////////////////////////////////////////////////////////
// Define three 'module' functions
//////////////////////////////////////////////////////////////////////////
vco = os.sawtooth(f0);
vcf = fi.resonlp(cutoff,q,1) ;
vca(x) = gain * x;
//////////////////////////////////////////////////////////////////////////
// Define three 'modules'
//////////////////////////////////////////////////////////////////////////
voice = vco : vcf : vca;
process = voice <: _,_ ;
|
https://raw.githubusercontent.com/SputnikStan5/Lua-Stk/80cc99dce8648eccc2b065afdf170b8334091461/Faust/DSP/sound_synthesis_faust/faust/Subtractive/sawtooth_filter.dsp
|
faust
|
sawtooth-filter.dsp
First steps with a VCO-VCA-VCF setup.
The three modules are connected in series.
No anti-aliasing!
- steady sound
- control over f0, cutoff, resonance, gain
Henrik von Coler
2020-05-17
////////////////////////////////////////////////////////////////////////
Control Parameters
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
Define three 'module' functions
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
Define three 'modules'
////////////////////////////////////////////////////////////////////////
|
import("stdfaust.lib");
cutoff = hslider("Cutoff [midi:ctrl 48]", 100, 5, 6000, 0.001):si.smoo;
f0 = hslider("Pitch[midi:ctrl 49]", 100, 5, 500, 0.001):si.smoo;
q = hslider("Q[midi:ctrl 50]", 1, 0.1, 100, 0.01):si.smoo;
gain = hslider("Gain[midi:ctrl 51]", 1, 0, 1, 0.01):si.smoo;
vco = os.sawtooth(f0);
vcf = fi.resonlp(cutoff,q,1) ;
vca(x) = gain * x;
voice = vco : vcf : vca;
process = voice <: _,_ ;
|
6209aaf1211651b14b933ba1addfaf49cd7d28782a5ba38ff84872b37d0da1d1
|
SputnikStan5/Lua-Stk
|
fm-simple.dsp
|
// fm-simple.dsp
//
// 2-operator FM synthesis
//
// - with trigger
// - dynamic modulation index
// through temporal envelope
//
// Henrik von Coler
// 2020-05-11
import("stdfaust.lib");
/////////////////////////////////////////////////////////
// UI ELEMENTS
/////////////////////////////////////////////////////////
trigger = button("Trigger");
f_1 = hslider("OP 1 Frequency",100,0.01,1000,0.1);
f_2 = hslider("OP 2 Frequency",100,0.01,1000,0.1);
ind_1 = hslider("Modulation Index",0,0,1000,0.1);
// a slider for the first release time
r1 = hslider("Release 1",0.5,0.01,5,0.01);
// a slider for the second release time
r2 = hslider("Release 2",0.5,0.01,5,0.01);
/////////////////////////////////////////////////////////
// FM Function
/////////////////////////////////////////////////////////
am(f1, f2, t1, r1, r2) = gain * os.osc(f1 + (os.osc(f2) * ind_1)* index1)
with
{
gain = en.arfe(0.01, r2, 0,t1);
index1 = en.arfe(0.01, r1, 0,t1);
};
/////////////////////////////////////////////////////////
// processing
/////////////////////////////////////////////////////////
process = am(f_1,f_2, trigger, r1 ,r2) <: _,_;
|
https://raw.githubusercontent.com/SputnikStan5/Lua-Stk/80cc99dce8648eccc2b065afdf170b8334091461/Faust/DSP/sound_synthesis_faust/faust/Modulation/fm-simple/fm-simple.dsp
|
faust
|
fm-simple.dsp
2-operator FM synthesis
- with trigger
- dynamic modulation index
through temporal envelope
Henrik von Coler
2020-05-11
///////////////////////////////////////////////////////
UI ELEMENTS
///////////////////////////////////////////////////////
a slider for the first release time
a slider for the second release time
///////////////////////////////////////////////////////
FM Function
///////////////////////////////////////////////////////
///////////////////////////////////////////////////////
processing
///////////////////////////////////////////////////////
|
import("stdfaust.lib");
trigger = button("Trigger");
f_1 = hslider("OP 1 Frequency",100,0.01,1000,0.1);
f_2 = hslider("OP 2 Frequency",100,0.01,1000,0.1);
ind_1 = hslider("Modulation Index",0,0,1000,0.1);
r1 = hslider("Release 1",0.5,0.01,5,0.01);
r2 = hslider("Release 2",0.5,0.01,5,0.01);
am(f1, f2, t1, r1, r2) = gain * os.osc(f1 + (os.osc(f2) * ind_1)* index1)
with
{
gain = en.arfe(0.01, r2, 0,t1);
index1 = en.arfe(0.01, r1, 0,t1);
};
process = am(f_1,f_2, trigger, r1 ,r2) <: _,_;
|
e4142efcecf501c169929bb9130ad51442c12f9cc9c53f837d77202b08be37f7
|
SputnikStan5/Lua-Stk
|
trigger_phasor.dsp
|
///
// towards a hard-synced oscillator
//
// based on:
// Synchronous Programming in Audio Processing:
// A Lookup Table Oscillator Case Study
//
// no anti-aliasing
//
// HvC
// 2020-08-29
//import( "stdfaust.lib" ) ;
import( "all.lib" ) ;
// gate and single sample impulse
gater = button ("gater");
trig = pm.impulseExcitation(gater);
// some basic stuff
sr = SR;
twopi = 2.0*PI;
ts = 1<<16 ;
time = (+(1) ~ _ ) , 1 : - ;
// define the waveform
sawwave = ((float(time) / float(ts)) *2 -1)*-1;
pulsewidth = hslider("pulsewidth", 0, 0, 1, 0.01);
sqaurewave = sawwave : >(0.0);
dec ( x ) = x - floor (x) ;
// from the paper:
// phase ( freq ) = freq / float ( sr ) : (+ : dec ) ~ _ : * ( float (ts) ) ;
phase = os.hs_phasor(ts,f,trig);
saw_osc( freq) = rdtable ( ts , sawwave , int ( phase ) ) ;
square_osc( freq) = rdtable ( ts , sqaurewave , int ( phase ) ) ;
f = hslider("f", 440, 2, 20000, 1);
mix = hslider("mix", 0, 0, 1, 0.01);
process = saw_osc(f) *mix + square_osc(f)*(1-mix) <: _,_ ;
|
https://raw.githubusercontent.com/SputnikStan5/Lua-Stk/80cc99dce8648eccc2b065afdf170b8334091461/Faust/sound_synthesis_faust/faust/Oscillators/trigger_phasor.dsp
|
faust
|
/
towards a hard-synced oscillator
based on:
Synchronous Programming in Audio Processing:
A Lookup Table Oscillator Case Study
no anti-aliasing
HvC
2020-08-29
import( "stdfaust.lib" ) ;
gate and single sample impulse
some basic stuff
define the waveform
from the paper:
phase ( freq ) = freq / float ( sr ) : (+ : dec ) ~ _ : * ( float (ts) ) ;
|
import( "all.lib" ) ;
gater = button ("gater");
trig = pm.impulseExcitation(gater);
sr = SR;
twopi = 2.0*PI;
ts = 1<<16 ;
time = (+(1) ~ _ ) , 1 : - ;
sawwave = ((float(time) / float(ts)) *2 -1)*-1;
pulsewidth = hslider("pulsewidth", 0, 0, 1, 0.01);
sqaurewave = sawwave : >(0.0);
dec ( x ) = x - floor (x) ;
phase = os.hs_phasor(ts,f,trig);
saw_osc( freq) = rdtable ( ts , sawwave , int ( phase ) ) ;
square_osc( freq) = rdtable ( ts , sqaurewave , int ( phase ) ) ;
f = hslider("f", 440, 2, 20000, 1);
mix = hslider("mix", 0, 0, 1, 0.01);
process = saw_osc(f) *mix + square_osc(f)*(1-mix) <: _,_ ;
|
138536e8bacf112c8ee8a1e30ae2ffccdb6e46adabd7eb14f2da229409291577
|
SputnikStan5/Lua-Stk
|
am-ringmod.dsp
|
// am-ringmod.dsp
//
// Example for amplitude modulation
// and ringmodulation.
//
// - steady sound
// - adjustable frequencies
// - fader for morphing between am/ringmod
//
// Henrik von Coler
// 2020-05-11
import("stdfaust.lib");
f_x = hslider("Signal Frequency",100,0.01,1000,0.1);
f_m = hslider("Modulator Frequency",100,0.01,1000,0.1);
m_off = hslider("Modulator Offset",0,0,0.5,0.01);
am(fx, fm) = os.osc(fx) * ((1-m_off) * os.osc(fm) + m_off);
process = am(f_x,f_m) <: _,_;
|
https://raw.githubusercontent.com/SputnikStan5/Lua-Stk/80cc99dce8648eccc2b065afdf170b8334091461/Faust/sound_synthesis_faust/faust/Modulation/am-ringmod/am-ringmod.dsp
|
faust
|
am-ringmod.dsp
Example for amplitude modulation
and ringmodulation.
- steady sound
- adjustable frequencies
- fader for morphing between am/ringmod
Henrik von Coler
2020-05-11
|
import("stdfaust.lib");
f_x = hslider("Signal Frequency",100,0.01,1000,0.1);
f_m = hslider("Modulator Frequency",100,0.01,1000,0.1);
m_off = hslider("Modulator Offset",0,0,0.5,0.01);
am(fx, fm) = os.osc(fx) * ((1-m_off) * os.osc(fm) + m_off);
process = am(f_x,f_m) <: _,_;
|
b55b7883f6ffe41aea2d9bce51582092f4c1b624e973942c9e5b8e7e4dac10b4
|
SputnikStan5/Lua-Stk
|
am-ringmod-trigger.dsp
|
// am-ringmod.dsp
//
//
//
// Henrik von Coler
// 2020-05-11
import("stdfaust.lib");
f_x = hslider("Signal Frequency",100,0.01,1000,0.1);
f_m = hslider("Modulator Frequency",100,0.01,1000,0.1);
m_off = hslider("Modulator Offset",0,0,0.5,0.01);
am(fx, fm) = os.osc(fx) * ((1-m_off) * os.osc(fm) + m_off);
// generate a single sine and apply the arfe envelope
// the attack time is set to 0.01
process = am(f_x,f_m) <: _,_;
|
https://raw.githubusercontent.com/SputnikStan5/Lua-Stk/80cc99dce8648eccc2b065afdf170b8334091461/Faust/sound_synthesis_faust/faust/Modulation/am-ringmod-trigger/am-ringmod-trigger.dsp
|
faust
|
am-ringmod.dsp
Henrik von Coler
2020-05-11
generate a single sine and apply the arfe envelope
the attack time is set to 0.01
|
import("stdfaust.lib");
f_x = hslider("Signal Frequency",100,0.01,1000,0.1);
f_m = hslider("Modulator Frequency",100,0.01,1000,0.1);
m_off = hslider("Modulator Offset",0,0,0.5,0.01);
am(fx, fm) = os.osc(fx) * ((1-m_off) * os.osc(fm) + m_off);
process = am(f_x,f_m) <: _,_;
|
788e7200b0ad4d67e57c2ec426bcb020fcbd9634500a7baf83b31b30505f227b
|
SputnikStan5/Lua-Stk
|
fourier_series.dsp
|
// fourier_series.dsp
//
// Generate a square wave through Fourier series.
// - without control
//
// Henrik von Coler
// 2020-05-06
import("stdfaust.lib");
// define a fundamental frequency
f0 = 100;
// define the number of partials
n_partial = 50;
// partial function with one argument ()
partial(partIDX) = (4/ma.PI) * os.oscrs(f)*volume
// arguments
with {
f = f0 * (2*partIDX+1);
volume = 1/(2*partIDX+1);
};
// the processing function,
// running 50 partials parallel
// mono output
process = par(i, n_partial, partial(i)) :> +;
|
https://raw.githubusercontent.com/SputnikStan5/Lua-Stk/80cc99dce8648eccc2b065afdf170b8334091461/Faust/DSP/sound_synthesis_faust/faust/Additive/fourier_series/fourier_series.dsp
|
faust
|
fourier_series.dsp
Generate a square wave through Fourier series.
- without control
Henrik von Coler
2020-05-06
define a fundamental frequency
define the number of partials
partial function with one argument ()
arguments
the processing function,
running 50 partials parallel
mono output
|
import("stdfaust.lib");
f0 = 100;
n_partial = 50;
partial(partIDX) = (4/ma.PI) * os.oscrs(f)*volume
with {
f = f0 * (2*partIDX+1);
volume = 1/(2*partIDX+1);
};
process = par(i, n_partial, partial(i)) :> +;
|
8ae75686ec5a2f5f35c396500e265269938c4765371d189c1c7873b3f79a8ba8
|
SputnikStan5/AudioLAB
|
ringmod-input.dsp
|
// ringmod-input.dsp
//
// Ringmodulator for audio input
//
// - fader for controlling modulator frequency
// - fader for controlling mix of ringmod
//
// Henrik von Coler
// 2020-05-12
import("stdfaust.lib");
f_m = hslider("Modulator Frequency",100,0.01,1000,0.1);
mix = hslider("Modulation Mix",0.5,0,1,0.01);
am(x, fm) = (1-mix) * x + mix * x * os.osc(fm);
process(x) = am(x,f_m) <: _,_;
|
https://raw.githubusercontent.com/SputnikStan5/AudioLAB/c12684b16f4d27dc3c33e63986611923821117d2/Faust/Library/sound_synthesis_faust/faust/Modulation/ringmod-input/ringmod-input.dsp
|
faust
|
ringmod-input.dsp
Ringmodulator for audio input
- fader for controlling modulator frequency
- fader for controlling mix of ringmod
Henrik von Coler
2020-05-12
|
import("stdfaust.lib");
f_m = hslider("Modulator Frequency",100,0.01,1000,0.1);
mix = hslider("Modulation Mix",0.5,0,1,0.01);
am(x, fm) = (1-mix) * x + mix * x * os.osc(fm);
process(x) = am(x,f_m) <: _,_;
|
b3eaa20d6d280f7e6ed25553c896fff0553718120fff811aef6f5dc5bedcaad1
|
SputnikStan5/LV2-Prototyper
|
svf.dsp
|
import("stdfaust.lib");
G = hslider("Gain", 0, -10, 10, 0.1);
F = hslider("Freq", 1000, 100, 10000, 1);
Q = hslider("Q", 1, 0.01, 100, 0.01);
process = _ : fi.svf.lp(F,Q,G) : _,_;
|
https://raw.githubusercontent.com/SputnikStan5/LV2-Prototyper/14965bd2c5f042d3f11e9a11f9614b5089b99184/svf.dsp
|
faust
|
import("stdfaust.lib");
G = hslider("Gain", 0, -10, 10, 0.1);
F = hslider("Freq", 1000, 100, 10000, 1);
Q = hslider("Q", 1, 0.01, 100, 0.01);
process = _ : fi.svf.lp(F,Q,G) : _,_;
|
|
9cec295c4623caed5ff47f654dd32f06de8aee1d9e1644fe95fadafd9a970b38
|
SputnikStan5/GobyJIT
|
splitting_example.dsp
|
// splitting_example.dsp
//
// Henrik von Coler
// 2020-04-21
import("stdfaust.lib");
// a source signal
signal = os.imptrain(5);
// split signal to stereo in process function:
process = signal <: _,_,_,_,_,_,_,_;
|
https://raw.githubusercontent.com/SputnikStan5/GobyJIT/589bb827b5b85095d81558c21438d080951a94b5/Faust/DSP/sound_synthesis_faust/faust/Basics/splitting_example.dsp
|
faust
|
splitting_example.dsp
Henrik von Coler
2020-04-21
a source signal
split signal to stereo in process function:
|
import("stdfaust.lib");
signal = os.imptrain(5);
process = signal <: _,_,_,_,_,_,_,_;
|
db107c3d164ad4515be3de5b5d2b3b07d3e40efece1fa87f210c8fdcf14a9cc7
|
jacktrip/jacktrip
|
zitarevdsp.dsp
|
import("stdfaust.lib");
// Modified version from Faust Libraries demos.lib
process = zita_rev1; // same as dm.zita_rev1 but for wetness control and some defaults
//process = zita_rev1 : _,attach(cout); // Not using this solution yet, but it works
//cout = ffunction (int cout(), <iostream>, ""); // dummy function to force #include <iostream> in output
//----------------------------------`(dm.)zita_rev1`------------------------------
// Example GUI for `zita_rev1_stereo` (mostly following the Linux `zita-rev1` GUI).
//
// Only the dry/wet and output level parameters are "dezippered" here. If
// parameters are to be varied in real time, use `smooth(0.999)` or the like
// in the same way.
//
// #### Usage
//
// ```
// _,_ : zita_rev1 : _,_
// ```
//
// #### Reference
//
// <http://www.kokkinizita.net/linuxaudio/zita-rev1-doc/quickguide.html>
//------------------------------------------------------------
zita_rev1 = _,_ <: re.zita_rev1_stereo(rdel,f1,f2,t60dc,t60m,fsmax),_,_ : out_eq,_,_ :
wet_dry_2(wet) : out_level
with{
fsmax = 48000.0; // highest sampling rate that will be used
fdn_group(x) = hgroup(
"[0] Zita_Rev1 [tooltip: ~ ZITA REV1 FEEDBACK DELAY NETWORK (FDN) & SCHROEDER
ALLPASS-COMB REVERBERATOR (8x8). See Faust's reverbs.lib for documentation and
references]", x);
in_group(x) = fdn_group(hgroup("[1] Input", x));
rdel = in_group(vslider("[1] In Delay [unit:ms] [style:knob] [tooltip: Delay in ms
before reverberation begins]",60,20,100,1));
freq_group(x) = fdn_group(hgroup("[2] Decay Times in Bands (see tooltips)", x));
f1 = freq_group(vslider("[1] LF X [unit:Hz] [style:knob] [scale:log] [tooltip:
Crossover frequency (Hz) separating low and middle frequencies]", 200, 50, 1000, 1));
t60dc = freq_group(vslider("[2] Low RT60 [unit:s] [style:knob] [scale:log]
[style:knob] [tooltip: T60 = time (in seconds) to decay 60dB in low-frequency band]",
3, 1, 8, 0.1));
t60m = freq_group(vslider("[3] Mid RT60 [unit:s] [style:knob] [scale:log] [tooltip:
T60 = time (in seconds) to decay 60dB in middle band]",2, 1, 8, 0.1));
f2 = freq_group(vslider("[4] HF Damping [unit:Hz] [style:knob] [scale:log]
[tooltip: Frequency (Hz) at which the high-frequency T60 is half the middle-band's T60]",
6000, 1500, 0.49*fsmax, 1));
out_eq = pareq_stereo(eq1f,eq1l,eq1q) : pareq_stereo(eq2f,eq2l,eq2q);
// Zolzer style peaking eq (not used in zita-rev1) (filters.lib):
// pareq_stereo(eqf,eql,Q) = peak_eq(eql,eqf,eqf/Q), peak_eq(eql,eqf,eqf/Q);
// Regalia-Mitra peaking eq with "Q" hard-wired near sqrt(g)/2 (filters.lib):
pareq_stereo(eqf,eql,Q) = fi.peak_eq_rm(eql,eqf,tpbt), fi.peak_eq_rm(eql,eqf,tpbt)
with {
tpbt = wcT/sqrt(max(0,g)); // tan(PI*B/SR), B bw in Hz (Q^2 ~ g/4)
wcT = 2*ma.PI*eqf/ma.SR; // peak frequency in rad/sample
g = ba.db2linear(eql); // peak gain
};
eq1_group(x) = fdn_group(hgroup("[3] RM Peaking Equalizer 1", x));
eq1f = eq1_group(vslider("[1] Eq1 Freq [unit:Hz] [style:knob] [scale:log] [tooltip:
Center-frequency of second-order Regalia-Mitra peaking equalizer section 1]",
315, 40, 2500, 1));
eq1l = eq1_group(vslider("[2] Eq1 Level [unit:dB] [style:knob] [tooltip: Peak level
in dB of second-order Regalia-Mitra peaking equalizer section 1]", 0, -15, 15, 0.1));
eq1q = eq1_group(vslider("[3] Eq1 Q [style:knob] [tooltip: Q = centerFrequency/bandwidth
of second-order peaking equalizer section 1]", 3, 0.1, 10, 0.1));
eq2_group(x) = fdn_group(hgroup("[4] RM Peaking Equalizer 2", x));
eq2f = eq2_group(vslider("[1] Eq2 Freq [unit:Hz] [style:knob] [scale:log] [tooltip:
Center-frequency of second-order Regalia-Mitra peaking equalizer section 2]",
1500, 160, 10000, 1));
eq2l = eq2_group(vslider("[2] Eq2 Level [unit:dB] [style:knob] [tooltip: Peak level
in dB of second-order Regalia-Mitra peaking equalizer section 2]", 0, -15, 15, 0.1));
eq2q = eq2_group(vslider("[3] Eq2 Q [style:knob] [tooltip: Q = centerFrequency/bandwidth
of second-order peaking equalizer section 2]", 3, 0.1, 10, 0.1));
out_group(x) = fdn_group(hgroup("[5] Output", x));
wet_dry(wet,y,x) = wet*y + (1-wet)*x;
wet_dry_2(wet,y1,y2,x1,x2) = wet_dry(wet,y1,x1), wet_dry(wet,y2,x2);
wet = out_group(vslider("[1] Wet [style:knob] [tooltip: Dry/Wet Mix: 0 = dry, 1 = wet]",
0, 0.0, 1.0, 0.01)) : si.smoo;
out_level = *(gain),*(gain);
gain = out_group(vslider("[2] Level [unit:dB] [style:knob] [tooltip: Output scale
factor]", -3, -70, 20, 0.1)) : ba.db2linear : si.smoo;
};
|
https://raw.githubusercontent.com/jacktrip/jacktrip/821ba6436cd721a96c7a4877a3c3e5432d3811fc/faust-src/zitarevdsp.dsp
|
faust
|
Modified version from Faust Libraries demos.lib
same as dm.zita_rev1 but for wetness control and some defaults
process = zita_rev1 : _,attach(cout); // Not using this solution yet, but it works
cout = ffunction (int cout(), <iostream>, ""); // dummy function to force #include <iostream> in output
----------------------------------`(dm.)zita_rev1`------------------------------
Example GUI for `zita_rev1_stereo` (mostly following the Linux `zita-rev1` GUI).
Only the dry/wet and output level parameters are "dezippered" here. If
parameters are to be varied in real time, use `smooth(0.999)` or the like
in the same way.
#### Usage
```
_,_ : zita_rev1 : _,_
```
#### Reference
<http://www.kokkinizita.net/linuxaudio/zita-rev1-doc/quickguide.html>
------------------------------------------------------------
highest sampling rate that will be used
Zolzer style peaking eq (not used in zita-rev1) (filters.lib):
pareq_stereo(eqf,eql,Q) = peak_eq(eql,eqf,eqf/Q), peak_eq(eql,eqf,eqf/Q);
Regalia-Mitra peaking eq with "Q" hard-wired near sqrt(g)/2 (filters.lib):
tan(PI*B/SR), B bw in Hz (Q^2 ~ g/4)
peak frequency in rad/sample
peak gain
|
import("stdfaust.lib");
zita_rev1 = _,_ <: re.zita_rev1_stereo(rdel,f1,f2,t60dc,t60m,fsmax),_,_ : out_eq,_,_ :
wet_dry_2(wet) : out_level
with{
fdn_group(x) = hgroup(
"[0] Zita_Rev1 [tooltip: ~ ZITA REV1 FEEDBACK DELAY NETWORK (FDN) & SCHROEDER
ALLPASS-COMB REVERBERATOR (8x8). See Faust's reverbs.lib for documentation and
references]", x);
in_group(x) = fdn_group(hgroup("[1] Input", x));
rdel = in_group(vslider("[1] In Delay [unit:ms] [style:knob] [tooltip: Delay in ms
before reverberation begins]",60,20,100,1));
freq_group(x) = fdn_group(hgroup("[2] Decay Times in Bands (see tooltips)", x));
f1 = freq_group(vslider("[1] LF X [unit:Hz] [style:knob] [scale:log] [tooltip:
Crossover frequency (Hz) separating low and middle frequencies]", 200, 50, 1000, 1));
t60dc = freq_group(vslider("[2] Low RT60 [unit:s] [style:knob] [scale:log]
[style:knob] [tooltip: T60 = time (in seconds) to decay 60dB in low-frequency band]",
3, 1, 8, 0.1));
t60m = freq_group(vslider("[3] Mid RT60 [unit:s] [style:knob] [scale:log] [tooltip:
T60 = time (in seconds) to decay 60dB in middle band]",2, 1, 8, 0.1));
f2 = freq_group(vslider("[4] HF Damping [unit:Hz] [style:knob] [scale:log]
[tooltip: Frequency (Hz) at which the high-frequency T60 is half the middle-band's T60]",
6000, 1500, 0.49*fsmax, 1));
out_eq = pareq_stereo(eq1f,eq1l,eq1q) : pareq_stereo(eq2f,eq2l,eq2q);
pareq_stereo(eqf,eql,Q) = fi.peak_eq_rm(eql,eqf,tpbt), fi.peak_eq_rm(eql,eqf,tpbt)
with {
};
eq1_group(x) = fdn_group(hgroup("[3] RM Peaking Equalizer 1", x));
eq1f = eq1_group(vslider("[1] Eq1 Freq [unit:Hz] [style:knob] [scale:log] [tooltip:
Center-frequency of second-order Regalia-Mitra peaking equalizer section 1]",
315, 40, 2500, 1));
eq1l = eq1_group(vslider("[2] Eq1 Level [unit:dB] [style:knob] [tooltip: Peak level
in dB of second-order Regalia-Mitra peaking equalizer section 1]", 0, -15, 15, 0.1));
eq1q = eq1_group(vslider("[3] Eq1 Q [style:knob] [tooltip: Q = centerFrequency/bandwidth
of second-order peaking equalizer section 1]", 3, 0.1, 10, 0.1));
eq2_group(x) = fdn_group(hgroup("[4] RM Peaking Equalizer 2", x));
eq2f = eq2_group(vslider("[1] Eq2 Freq [unit:Hz] [style:knob] [scale:log] [tooltip:
Center-frequency of second-order Regalia-Mitra peaking equalizer section 2]",
1500, 160, 10000, 1));
eq2l = eq2_group(vslider("[2] Eq2 Level [unit:dB] [style:knob] [tooltip: Peak level
in dB of second-order Regalia-Mitra peaking equalizer section 2]", 0, -15, 15, 0.1));
eq2q = eq2_group(vslider("[3] Eq2 Q [style:knob] [tooltip: Q = centerFrequency/bandwidth
of second-order peaking equalizer section 2]", 3, 0.1, 10, 0.1));
out_group(x) = fdn_group(hgroup("[5] Output", x));
wet_dry(wet,y,x) = wet*y + (1-wet)*x;
wet_dry_2(wet,y1,y2,x1,x2) = wet_dry(wet,y1,x1), wet_dry(wet,y2,x2);
wet = out_group(vslider("[1] Wet [style:knob] [tooltip: Dry/Wet Mix: 0 = dry, 1 = wet]",
0, 0.0, 1.0, 0.01)) : si.smoo;
out_level = *(gain),*(gain);
gain = out_group(vslider("[2] Level [unit:dB] [style:knob] [tooltip: Output scale
factor]", -3, -70, 20, 0.1)) : ba.db2linear : si.smoo;
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.