_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
c6ec6ab08a89ea570a50177668ebf8841d710d49206b17f62f4fed5bfc774aed
lupu2022/LotusRiver
biscale.dsp
import("stdfaust.lib"); low = nentry("low", 0.1, 0, 10000, 0.01); up = nentry("up", 0.1, 0, 10000, 0.01); scale = up - low; process(x) = low + (xx + 1.0) / 2.0 * scale with { xx = ((x <= 1.0) & (x >= -1.0)) * x + (x > 1.0) - (x < -1.0); };
https://raw.githubusercontent.com/lupu2022/LotusRiver/fdcfc1bd1669e61b21d09f22063a158cdfc23294/fs/zz/biscale.dsp
faust
import("stdfaust.lib"); low = nentry("low", 0.1, 0, 10000, 0.01); up = nentry("up", 0.1, 0, 10000, 0.01); scale = up - low; process(x) = low + (xx + 1.0) / 2.0 * scale with { xx = ((x <= 1.0) & (x >= -1.0)) * x + (x > 1.0) - (x < -1.0); };
d30d15e1f11aba12f1404f6eff2e009eea25a6bc6ec0cde8c2076a9b89467e26
lupu2022/LotusRiver
fm.dsp
import("stdfaust.lib"); carry = nentry("carry", 0.1, 0, 10000, 0.01); modulator = nentry("modulator", 0.1, 0, 10000, 0.01); index = nentry("index", 0.1, 0, 1000, 0.01); freqs = (carry, modulator); indics = (index); process = sy.fm(freqs, indics);
https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/zz/fm.dsp
faust
import("stdfaust.lib"); carry = nentry("carry", 0.1, 0, 10000, 0.01); modulator = nentry("modulator", 0.1, 0, 10000, 0.01); index = nentry("index", 0.1, 0, 1000, 0.01); freqs = (carry, modulator); indics = (index); process = sy.fm(freqs, indics);
0db8156c72390cb0bf9eae751134e57f1b978830388c868c06628ed04aac481e
lupu2022/LotusRiver
comb.dsp
import("stdfaust.lib"); rtime = nentry("rtime", 0.1, 0, 10000, 0.01); coef_y = nentry("coef_y", 0.1, 0, 10000, 0.01); coef_x = nentry("coef_x", 0.1, 0, 10000, 0.01); n = int(0.25 * ma.SR); d = int(rtime * ma.SR - 1); process = (*(coef_y), *(coef_x) : + : de.delay(n, d)) ~ _;
https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/zz/comb.dsp
faust
import("stdfaust.lib"); rtime = nentry("rtime", 0.1, 0, 10000, 0.01); coef_y = nentry("coef_y", 0.1, 0, 10000, 0.01); coef_x = nentry("coef_x", 0.1, 0, 10000, 0.01); n = int(0.25 * ma.SR); d = int(rtime * ma.SR - 1); process = (*(coef_y), *(coef_x) : + : de.delay(n, d)) ~ _;
f45b5bbc07fd4dac7e2d33cc9961a05bb7aeb9595a0ea2321b6dc805ad922c1f
lupu2022/LotusRiver
tenv.dsp
import("stdfaust.lib"); atk = nentry("atk", 0.1, 0, 10000, 0.01); hold = nentry("hold", 0.1, 0, 10000, 0.01); rel = nentry("rel", 0.1, 0, 10000, 0.01); hold_flag = (rel + hold) * ma.SR; pos = auto_add ~ _ with { auto_add(last_p, trig) = (trig == 0) * ( ( (last_p - 1) < hold_flag) * (last_p + 1) + ( (last_p + 1) >= hold_flag) * hold_flag); }; process(t) = en.are(atk, rel, trig) with { p = pos(t); trig = (p < hold_flag); };
https://raw.githubusercontent.com/lupu2022/LotusRiver/2502800bdb1c86ff7cfe2da97a3acf2d88b39002/fs/zz/tenv.dsp
faust
import("stdfaust.lib"); atk = nentry("atk", 0.1, 0, 10000, 0.01); hold = nentry("hold", 0.1, 0, 10000, 0.01); rel = nentry("rel", 0.1, 0, 10000, 0.01); hold_flag = (rel + hold) * ma.SR; pos = auto_add ~ _ with { auto_add(last_p, trig) = (trig == 0) * ( ( (last_p - 1) < hold_flag) * (last_p + 1) + ( (last_p + 1) >= hold_flag) * hold_flag); }; process(t) = en.are(atk, rel, trig) with { p = pos(t); trig = (p < hold_flag); };
ccc40aa95caca60a7cc2cb9a0d9d856c4ecf717c9528fe74292789ab6b519485
lupu2022/LotusRiver
tenvx.dsp
import("stdfaust.lib"); atk = nentry("atk", 0.1, 0, 10000, 0.01); hold = nentry("hold", 0.1, 0, 10000, 0.01); rel = nentry("rel", 0.1, 0, 10000, 0.01); a_a = exp(-1.0/(atk * ma.SR)); b_a = 1.0 - a_a; a_r = exp(-1.0/(rel * ma.SR)); hcount = hold * ma.SR; counter(t) = (a * hcount + b * (_ - 1) ) ~ check with { a = t != 0; b = t == 0; check(x) = (x > 0) * x; }; process(t) = select ~ _ with { count = counter(t); select(y) = (count > 0) * (b_a + a_a * y) + (count <= 0) * a_r * y; };
https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/zz/tenvx.dsp
faust
import("stdfaust.lib"); atk = nentry("atk", 0.1, 0, 10000, 0.01); hold = nentry("hold", 0.1, 0, 10000, 0.01); rel = nentry("rel", 0.1, 0, 10000, 0.01); a_a = exp(-1.0/(atk * ma.SR)); b_a = 1.0 - a_a; a_r = exp(-1.0/(rel * ma.SR)); hcount = hold * ma.SR; counter(t) = (a * hcount + b * (_ - 1) ) ~ check with { a = t != 0; b = t == 0; check(x) = (x > 0) * x; }; process(t) = select ~ _ with { count = counter(t); select(y) = (count > 0) * (b_a + a_a * y) + (count <= 0) * a_r * y; };
b040b127a8a7f942a529f8a9acd5c4b7bdca259cb85815f6a511c6a8243b51d3
lupu2022/phy2raw
clarinet.dsp
import("stdfaust.lib"); import("instruments.lib"); //==================== GUI SPECIFICATION ================ freq = nentry("h:Basic_Parameters/freq [1][unit:Hz] [tooltip:Tone frequency]",440,20,20000,1); gain = nentry("h:Basic_Parameters/gain [1][tooltip:Gain (value between 0 and 1)]",1,0,1,0.01); gate = button("h:Basic_Parameters/gate [1][tooltip:noteOn = 1, noteOff = 0]"); reedStiffness = 0.5; //Reed stiffness (value between 0 and 1) noiseGain = 0.0; //Breath noise gain (value between 0 and 1) pressure = 1.0; //Breath pressure (value bewteen 0 and 1) typeModulation = 0; /*0=theta is modulated by the incoming signal; 1=theta is modulated by the averaged incoming signal; 2=theta is modulated by the squared incoming signal; 3=theta is modulated by a sine wave of frequency freqMod; 4=theta is modulated by a sine wave of frequency freq;*/ nonLinearity = 0.0; //Nonlinearity factor (value between 0 and 1) frequencyMod = 220; //Frequency of the sine wave for the modulation of theta (works if Modulation Type=3) nonLinAttack = 0.1; //Attack duration of the nonlinearity (0 ~ 2 ) vibratoFreq = 5; //Vibrato_Freq, unit:hz vibratoGain = 0.01; //Vibrato_Gain A value between 0 and 1 vibratoAttack = 0.5; //Vibrato attack duration, unit:s (0 ~ 2) vibratoRelease = 0.01; //Vibrato release duration, unit:s (0 ~ 2) envelopeAttack = 0.01; //Envelope attack duration envelopeDecay = 0.05; //Envelope decay duration envelopeRelease = 0.1; //Envelope release duration //==================== SIGNAL PROCESSING ====================== //----------------------- Nonlinear filter ---------------------------- //nonlinearities are created by the nonlinear passive allpass ladder filter declared in miscfilter.lib //nonlinear filter order nlfOrder = 6; //attack - sustain - release envelope for nonlinearity (declared in instruments.lib) envelopeMod = en.asr(nonLinAttack,1,envelopeRelease,gate); //nonLinearModultor is declared in instruments.lib, it adapts allpassnn from miscfilter.lib //for using it with waveguide instruments NLFM = nonLinearModulator((nonLinearity : si.smoo),envelopeMod,freq, typeModulation,(frequencyMod : si.smoo),nlfOrder); //----------------------- Synthesis parameters computing and functions declaration ---------------------------- //reed table parameters reedTableOffset = 0.7; reedTableSlope = -0.44 + (0.26*reedStiffness); //the reed function is declared in instruments.lib reedTable = reed(reedTableOffset,reedTableSlope); //delay line with a length adapted in function of the order of nonlinear filter delayLength = ma.SR/freq*0.5 - 1.5 - (nlfOrder*nonLinearity)*(typeModulation < 2); delayLine = de.fdelay(4096,delayLength); //one zero filter used as a allpass: pole is set to -1 filter = oneZero0(0.5,0.5); //stereoizer is declared in instruments.lib and implement a stereo spacialisation in function of //the frequency period in number of samples stereo = stereoizer(ma.SR/freq); //----------------------- Algorithm implementation ---------------------------- //Breath pressure + vibrato + breath noise + envelope (Attack / Decay / Sustain / Release) envelope = en.adsr(envelopeAttack,envelopeDecay,1,envelopeRelease,gate)*pressure*0.9; vibrato = os.osc(vibratoFreq)*vibratoGain* envVibrato(0.1*2*vibratoAttack,0.9*2*vibratoAttack,100,vibratoRelease,gate); breath = envelope + envelope*no.noise*noiseGain; breathPressure = breath + breath*vibrato; process = //Commuted Loss Filtering (_,(breathPressure <: _,_) : (filter*-0.95 - _ <: //Non-Linear Scattering *(reedTable)) + _) ~ //Delay with Feedback (delayLine : NLFM) : //scaling and stereo *(gain)*2.5 : stereo : instrReverb : +(_) / 0.5;
https://raw.githubusercontent.com/lupu2022/phy2raw/2aa0ff6ac003b2dc63dbb6a89e4d0fe3d9941431/phy/clarinet.dsp
faust
==================== GUI SPECIFICATION ================ Reed stiffness (value between 0 and 1) Breath noise gain (value between 0 and 1) Breath pressure (value bewteen 0 and 1) 0=theta is modulated by the incoming signal; 1=theta is modulated by the averaged incoming signal; 2=theta is modulated by the squared incoming signal; 3=theta is modulated by a sine wave of frequency freqMod; 4=theta is modulated by a sine wave of frequency freq; Nonlinearity factor (value between 0 and 1) Frequency of the sine wave for the modulation of theta (works if Modulation Type=3) Attack duration of the nonlinearity (0 ~ 2 ) Vibrato_Freq, unit:hz Vibrato_Gain A value between 0 and 1 Vibrato attack duration, unit:s (0 ~ 2) Vibrato release duration, unit:s (0 ~ 2) Envelope attack duration Envelope decay duration Envelope release duration ==================== SIGNAL PROCESSING ====================== ----------------------- Nonlinear filter ---------------------------- nonlinearities are created by the nonlinear passive allpass ladder filter declared in miscfilter.lib nonlinear filter order attack - sustain - release envelope for nonlinearity (declared in instruments.lib) nonLinearModultor is declared in instruments.lib, it adapts allpassnn from miscfilter.lib for using it with waveguide instruments ----------------------- Synthesis parameters computing and functions declaration ---------------------------- reed table parameters the reed function is declared in instruments.lib delay line with a length adapted in function of the order of nonlinear filter one zero filter used as a allpass: pole is set to -1 stereoizer is declared in instruments.lib and implement a stereo spacialisation in function of the frequency period in number of samples ----------------------- Algorithm implementation ---------------------------- Breath pressure + vibrato + breath noise + envelope (Attack / Decay / Sustain / Release) Commuted Loss Filtering Non-Linear Scattering Delay with Feedback scaling and stereo
import("stdfaust.lib"); import("instruments.lib"); freq = nentry("h:Basic_Parameters/freq [1][unit:Hz] [tooltip:Tone frequency]",440,20,20000,1); gain = nentry("h:Basic_Parameters/gain [1][tooltip:Gain (value between 0 and 1)]",1,0,1,0.01); gate = button("h:Basic_Parameters/gate [1][tooltip:noteOn = 1, noteOff = 0]"); nlfOrder = 6; envelopeMod = en.asr(nonLinAttack,1,envelopeRelease,gate); NLFM = nonLinearModulator((nonLinearity : si.smoo),envelopeMod,freq, typeModulation,(frequencyMod : si.smoo),nlfOrder); reedTableOffset = 0.7; reedTableSlope = -0.44 + (0.26*reedStiffness); reedTable = reed(reedTableOffset,reedTableSlope); delayLength = ma.SR/freq*0.5 - 1.5 - (nlfOrder*nonLinearity)*(typeModulation < 2); delayLine = de.fdelay(4096,delayLength); filter = oneZero0(0.5,0.5); stereo = stereoizer(ma.SR/freq); envelope = en.adsr(envelopeAttack,envelopeDecay,1,envelopeRelease,gate)*pressure*0.9; vibrato = os.osc(vibratoFreq)*vibratoGain* envVibrato(0.1*2*vibratoAttack,0.9*2*vibratoAttack,100,vibratoRelease,gate); breath = envelope + envelope*no.noise*noiseGain; breathPressure = breath + breath*vibrato; process = (_,(breathPressure <: _,_) : (filter*-0.95 - _ <: *(reedTable)) + _) ~ (delayLine : NLFM) : *(gain)*2.5 : stereo : instrReverb : +(_) / 0.5;
3210ca4c4e48c13f745d591b5e2bccf45abe4bea7a7b9f7504cc4cafc4f045ab
lupu2022/LotusRiver
vibrato.dsp
import("stdfaust.lib"); //----------------------- VIBRATO ENVELOPE ---------------------------- // 4 phases envelope to control vibrato gain // // USAGE: // _ : *(envVibrato(b,a,s,r,t)) : _ // where // b = beginning duration (silence) in seconds // a = attack duration in seconds // s = sustain as a percentage of the amplitude to be modified // r = release duration in seconds // t = trigger signal envVibrato(b,a,s,r,t) = env ~ (_,_,_) : (!,!,_) // the 3 'state' signals are fed back with { env(p2,cnt,y) = (t>0) & (p2|(y>=1)), (cnt + 1)*(t>0), // counter for the first step "b" (y + p1*p3*u*(s/100) - p4*w*y)*((p4==0)|(y>=eps)) // y = envelop signal //*(y>=eps) // cut off tails to prevent denormals with { p1 = (p2==0) & (t>0) & (y<1) & (cnt>(b*ma.SR)); // p1 = attack phase p3 = 1-(cnt<(nb)); // p3 = beginning phase p4 = (t<=0) & (y>0); // p4 = release phase // #samples in attack, release, must be >0 nb = ma.SR*b+(b==0.0) ; na = ma.SR*a+(a==0.0); nr = ma.SR*r+(r==0.0); // attack and (-60dB) release rates z = s+(s==0.0)*ba.db2linear(-60); u = 1/na; w = 1-1/pow(z*ba.db2linear(60), 1/nr); // values below this threshold are considered zero in the release phase eps = ba.db2linear(-120); }; }; freq = nentry("freq", 0.1, 0, 1000, 0.01); phase = nentry("phase", 0.1, 0, 1000, 0.01); attack = nentry("attack", 0.1, 0, 10000, 0.01); release = nentry("release", 0.1, 0, 10000, 0.01); process = os.oscp(freq, phase) * envVibrato(0.2 * attack, 0.8 * attack, 60, release);
https://raw.githubusercontent.com/lupu2022/LotusRiver/1de6b2c5c790cb62e127f0447e93f12b87d0c238/fs/zz/vibrato.dsp
faust
----------------------- VIBRATO ENVELOPE ---------------------------- 4 phases envelope to control vibrato gain USAGE: _ : *(envVibrato(b,a,s,r,t)) : _ where b = beginning duration (silence) in seconds a = attack duration in seconds s = sustain as a percentage of the amplitude to be modified r = release duration in seconds t = trigger signal the 3 'state' signals are fed back counter for the first step "b" y = envelop signal *(y>=eps) // cut off tails to prevent denormals p1 = attack phase p3 = beginning phase p4 = release phase #samples in attack, release, must be >0 attack and (-60dB) release rates values below this threshold are considered zero in the release phase
import("stdfaust.lib"); with { env(p2,cnt,y) = (t>0) & (p2|(y>=1)), with { nb = ma.SR*b+(b==0.0) ; na = ma.SR*a+(a==0.0); nr = ma.SR*r+(r==0.0); z = s+(s==0.0)*ba.db2linear(-60); u = 1/na; w = 1-1/pow(z*ba.db2linear(60), 1/nr); eps = ba.db2linear(-120); }; }; freq = nentry("freq", 0.1, 0, 1000, 0.01); phase = nentry("phase", 0.1, 0, 1000, 0.01); attack = nentry("attack", 0.1, 0, 10000, 0.01); release = nentry("release", 0.1, 0, 10000, 0.01); process = os.oscp(freq, phase) * envVibrato(0.2 * attack, 0.8 * attack, 60, release);
fcf555b9e2e470b91ced68eb37f4b5b4d422ce7b3c222e828d344785a555b0f8
matthewcaren/faust-guitar
chain.dsp
import("stdfaust.lib"); // *** COMPRESSOR *** compressorParam = hslider("compressorParam", 6, 1, 20, 0.01) : si.smoo; compressorDepth = hslider("compressorDepth", 0, 0, 1, 0.01) : si.smoo; compressor = _*(1+compressorDepth) <: _*(1-compressorDepth), compressorDepth*co.compressor_mono(compressorParam,-20,0.08,0.3) :> _ ; // *** FUZZ *** fuzzDepth = hslider("fuzzDepth", 0.75, 0.75, 30, 0.01) : si.smoo; fuzzParam = hslider("fuzzParam", 0.4, 0.03, 0.7, 0.01) : si.smoo; divide(input) = ((((input*fuzzDepth-1)/(input+(0.5/fuzzDepth + fuzzParam) : max(0.0001)) : ef.cubicnl(0,1)))/2 + (0 : ef.cubicnl(2,-1))*0.1); fuzz = (divide+0.15)/(3+0.25*fuzzDepth); // *** PHASER *** phaserParam = hslider("phaserParam", 0.4, 0, 7, 0.001) : si.smoo; phaserDepth = hslider("phaserDepth", 1, 0, 1, 0.01) : si.smoo; phaser = _ : pf.phaser2_mono(2, 0, 1000, 50, 1.25, 1000, phaserParam, phaserDepth, .3, 0); // *** REVERB *** reverbParam = hslider("reverbParam", 15, 1, 40, 0.01) : si.smoo; reverbDepth = hslider("reverbDepth", 0.4, 0, 1, 0.01) : si.smoo; zita_rev_fdn(f1,f2,t60dc,t60m,fsmax) = ((si.bus(2*N) :> allpass_combs(N) : feedbackmatrix(N)) ~ (delayfilters(N,freqs,durs) : fbdelaylines(N))) with { N = 4; // Delay-line lengths in seconds: apdelays = (0.020346, 0.024421, 0.031604, 0.027333); // feedforward delays in seconds tdelays = ( 0.153129, 0.210389, 0.127837, 0.256891); // total delays in seconds tdelay(i) = floor(0.5 + ma.SR*ba.take(i+1,tdelays)); // samples apdelay(i) = floor(0.5 + ma.SR*ba.take(i+1,apdelays)); fbdelay(i) = tdelay(i) - apdelay(i); // NOTE: Since SR is not bounded at compile time, we can't use it to // allocate delay lines; hence, the fsmax parameter: tdelaymaxfs(i) = floor(0.5 + fsmax*ba.take(i+1,tdelays)); apdelaymaxfs(i) = floor(0.5 + fsmax*ba.take(i+1,apdelays)); fbdelaymaxfs(i) = tdelaymaxfs(i) - apdelaymaxfs(i); nextpow2(x) = ceil(log(x)/log(2.0)); maxapdelay(i) = int(2.0^max(1.0,nextpow2(apdelaymaxfs(i)))); maxfbdelay(i) = int(2.0^max(1.0,nextpow2(fbdelaymaxfs(i)))); apcoeff(i) = select2(i&1,0.6,-0.6); // allpass comb-filter coefficient allpass_combs(N) = par(i,N,(fi.allpass_comb(maxapdelay(i),apdelay(i),apcoeff(i)))); // filters.lib fbdelaylines(N) = par(i,N,(de.delay(1024,(fbdelay(i))))); freqs = (f1,f2); durs = (t60dc,t60m); delayfilters(N,freqs,durs) = par(i,N,filter(i,freqs,durs)); feedbackmatrix(N) = ro.hadamard(N); staynormal = 10.0^(-20); // let signals decay well below LSB, but not to zero special_lowpass(g,f) = si.smooth(p) with { // unity-dc-gain lowpass needs gain g at frequency f => quadratic formula: p = mbo2 - sqrt(max(0,mbo2*mbo2 - 1.0)); // other solution is unstable mbo2 = (1.0 - gs*c)/(1.0 - gs); // NOTE: must ensure |g|<1 (t60m finite) gs = g*g; c = cos(2.0*ma.PI*f/float(ma.SR)); }; filter(i,freqs,durs) = lowshelf_lowpass(i)/sqrt(float(N))+staynormal with { lowshelf_lowpass(i) = gM*low_shelf1_l(g0/gM,f(1)):special_lowpass(gM,f(2)); low_shelf1_l(G0,fx,x) = x + (G0-1)*fi.lowpass(1,fx,x); // filters.lib g0 = g(0,i); gM = g(1,i); f(k) = ba.take(k,freqs); dur(j) = ba.take(j+1,durs); n60(j) = dur(j)*ma.SR; // decay time in samples g(j,i) = exp(-3.0*log(10.0)*tdelay(i)/n60(j)); }; }; // Stereo input delay used by zita_rev1 in both stereo and ambisonics mode: zita_in_delay(rdel) = zita_delay_mono(rdel), zita_delay_mono(rdel) with { zita_delay_mono(rdel) = de.delay(50,ma.SR*rdel*0.001) * 0.3; }; // Stereo input mapping used by zita_rev1 in both stereo and ambisonics mode: zita_distrib2(N) = _,_ <: fanflip(N) with { fanflip(4) = _,_,*(-1),*(-1); fanflip(N) = fanflip(N/2),fanflip(N/2); }; zita_rev1_stereo(rdel,f1,f2,t60dc,t60m,fsmax) = zita_in_delay(rdel) : zita_distrib2(N) : zita_rev_fdn(f1,f2,t60dc,t60m,fsmax) : output2(N) with { N = 4; output2(N) = outmix(N) : *(t1),*(t1); t1 = 0.37; // zita-rev1 linearly ramps from 0 to t1 over one buffer outmix(4) = !,ro.butterfly(2),!; // probably the result of some experimenting! outmix(N) = outmix(N/2),par(i,N/2,!); }; reverb = _ <: (_,_ <: zita_rev1_stereo(50,200,6000,reverbParam*1.2,reverbParam,48000),_,_ : out_eq,_,_ : dry_wet) :> _ with{ 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 { 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 }; eq1f = 315; eq1l = 0; eq1q = 3; eq2f = 1500; eq2l = 0; eq2q = 3; dry_wet(x,y) = *(wet) + dry*x, *(wet) + dry*y with { wet = 0.5*(drywet+1.0); dry = 1.0-wet; }; drywet = 1-reverbDepth; }; process = compressor : fuzz : phaser : reverb;
https://raw.githubusercontent.com/matthewcaren/faust-guitar/5bbe6a0b4e0f348c570cd8dfc228a723bc85b87e/chain.dsp
faust
*** COMPRESSOR *** *** FUZZ *** *** PHASER *** *** REVERB *** Delay-line lengths in seconds: feedforward delays in seconds total delays in seconds samples NOTE: Since SR is not bounded at compile time, we can't use it to allocate delay lines; hence, the fsmax parameter: allpass comb-filter coefficient filters.lib let signals decay well below LSB, but not to zero unity-dc-gain lowpass needs gain g at frequency f => quadratic formula: other solution is unstable NOTE: must ensure |g|<1 (t60m finite) filters.lib decay time in samples Stereo input delay used by zita_rev1 in both stereo and ambisonics mode: Stereo input mapping used by zita_rev1 in both stereo and ambisonics mode: zita-rev1 linearly ramps from 0 to t1 over one buffer probably the result of some experimenting! tan(PI*B/SR), B bw in Hz (Q^2 ~ g/4) peak frequency in rad/sample peak gain
import("stdfaust.lib"); compressorParam = hslider("compressorParam", 6, 1, 20, 0.01) : si.smoo; compressorDepth = hslider("compressorDepth", 0, 0, 1, 0.01) : si.smoo; compressor = _*(1+compressorDepth) <: _*(1-compressorDepth), compressorDepth*co.compressor_mono(compressorParam,-20,0.08,0.3) :> _ ; fuzzDepth = hslider("fuzzDepth", 0.75, 0.75, 30, 0.01) : si.smoo; fuzzParam = hslider("fuzzParam", 0.4, 0.03, 0.7, 0.01) : si.smoo; divide(input) = ((((input*fuzzDepth-1)/(input+(0.5/fuzzDepth + fuzzParam) : max(0.0001)) : ef.cubicnl(0,1)))/2 + (0 : ef.cubicnl(2,-1))*0.1); fuzz = (divide+0.15)/(3+0.25*fuzzDepth); phaserParam = hslider("phaserParam", 0.4, 0, 7, 0.001) : si.smoo; phaserDepth = hslider("phaserDepth", 1, 0, 1, 0.01) : si.smoo; phaser = _ : pf.phaser2_mono(2, 0, 1000, 50, 1.25, 1000, phaserParam, phaserDepth, .3, 0); reverbParam = hslider("reverbParam", 15, 1, 40, 0.01) : si.smoo; reverbDepth = hslider("reverbDepth", 0.4, 0, 1, 0.01) : si.smoo; zita_rev_fdn(f1,f2,t60dc,t60m,fsmax) = ((si.bus(2*N) :> allpass_combs(N) : feedbackmatrix(N)) ~ (delayfilters(N,freqs,durs) : fbdelaylines(N))) with { N = 4; apdelay(i) = floor(0.5 + ma.SR*ba.take(i+1,apdelays)); fbdelay(i) = tdelay(i) - apdelay(i); tdelaymaxfs(i) = floor(0.5 + fsmax*ba.take(i+1,tdelays)); apdelaymaxfs(i) = floor(0.5 + fsmax*ba.take(i+1,apdelays)); fbdelaymaxfs(i) = tdelaymaxfs(i) - apdelaymaxfs(i); nextpow2(x) = ceil(log(x)/log(2.0)); maxapdelay(i) = int(2.0^max(1.0,nextpow2(apdelaymaxfs(i)))); maxfbdelay(i) = int(2.0^max(1.0,nextpow2(fbdelaymaxfs(i)))); allpass_combs(N) = fbdelaylines(N) = par(i,N,(de.delay(1024,(fbdelay(i))))); freqs = (f1,f2); durs = (t60dc,t60m); delayfilters(N,freqs,durs) = par(i,N,filter(i,freqs,durs)); feedbackmatrix(N) = ro.hadamard(N); special_lowpass(g,f) = si.smooth(p) with { gs = g*g; c = cos(2.0*ma.PI*f/float(ma.SR)); }; filter(i,freqs,durs) = lowshelf_lowpass(i)/sqrt(float(N))+staynormal with { lowshelf_lowpass(i) = gM*low_shelf1_l(g0/gM,f(1)):special_lowpass(gM,f(2)); g0 = g(0,i); gM = g(1,i); f(k) = ba.take(k,freqs); dur(j) = ba.take(j+1,durs); g(j,i) = exp(-3.0*log(10.0)*tdelay(i)/n60(j)); }; }; zita_in_delay(rdel) = zita_delay_mono(rdel), zita_delay_mono(rdel) with { zita_delay_mono(rdel) = de.delay(50,ma.SR*rdel*0.001) * 0.3; }; zita_distrib2(N) = _,_ <: fanflip(N) with { fanflip(4) = _,_,*(-1),*(-1); fanflip(N) = fanflip(N/2),fanflip(N/2); }; zita_rev1_stereo(rdel,f1,f2,t60dc,t60m,fsmax) = zita_in_delay(rdel) : zita_distrib2(N) : zita_rev_fdn(f1,f2,t60dc,t60m,fsmax) : output2(N) with { N = 4; output2(N) = outmix(N) : *(t1),*(t1); outmix(N) = outmix(N/2),par(i,N/2,!); }; reverb = _ <: (_,_ <: zita_rev1_stereo(50,200,6000,reverbParam*1.2,reverbParam,48000),_,_ : out_eq,_,_ : dry_wet) :> _ with{ 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 { }; eq1f = 315; eq1l = 0; eq1q = 3; eq2f = 1500; eq2l = 0; eq2q = 3; dry_wet(x,y) = *(wet) + dry*x, *(wet) + dry*y with { wet = 0.5*(drywet+1.0); dry = 1.0-wet; }; drywet = 1-reverbDepth; }; process = compressor : fuzz : phaser : reverb;
37c53f2a51a3f77b0431270536206ac69d98d71851f943d596cfb34c6f546e97
madskjeldgaard/komet
ekvi5.dsp
// Equalizer with 5 bells + low and high shelf import("stdfaust.lib"); import("lib/ekvi.lib"); num_bells = 5; process = ek.ekvi(num_bells);
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/ekvi5.dsp
faust
Equalizer with 5 bells + low and high shelf
import("stdfaust.lib"); import("lib/ekvi.lib"); num_bells = 5; process = ek.ekvi(num_bells);
ac282bc3e350ae317b795ee5301ae543dc3e7c6313e26eaa2ed68bc568c1d4ef
madskjeldgaard/komet
krossover2.dsp
// Linkwitz riley based band splitter import("stdfaust.lib"); process = fi.crossover2LR4(cf) with{ cf = vslider("crossoverFreq",1500,10,20000,0.001); };
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/krossover2.dsp
faust
Linkwitz riley based band splitter
import("stdfaust.lib"); process = fi.crossover2LR4(cf) with{ cf = vslider("crossoverFreq",1500,10,20000,0.001); };
e6ccfcc2db6b785f568ffbb742288da7c9bad4cadaff111de9fcc9bf144b1a69
madskjeldgaard/komet
guitar_streng.dsp
import("stdfaust.lib"); import("physmodels.lib"); // Based on guitar_ui_MIDI streng_guitar1 = pm.guitar(stringLength,pluckPosition,gain,gate) with{ f = hslider("freq",440,20,20000,0.0001); gain = hslider("gain",0.8,0,1,0.01); s = hslider("sustain",0,0,1,1); pluckPosition = hslider("pluckPosition" ,0.8,0,1,0.01) : si.smoo; t = button("gate"); gate = t+s : min(1); freq = f; stringLength = freq : f2l; }; process = streng_guitar1;
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/guitar_streng.dsp
faust
Based on guitar_ui_MIDI
import("stdfaust.lib"); import("physmodels.lib"); streng_guitar1 = pm.guitar(stringLength,pluckPosition,gain,gate) with{ f = hslider("freq",440,20,20000,0.0001); gain = hslider("gain",0.8,0,1,0.01); s = hslider("sustain",0,0,1,1); pluckPosition = hslider("pluckPosition" ,0.8,0,1,0.01) : si.smoo; t = button("gate"); gate = t+s : min(1); freq = f; stringLength = freq : f2l; }; process = streng_guitar1;
5c44649aa3948e5d937ba8569fdd5e9a390725368d2b4275e30238ec90ada63a
madskjeldgaard/komet
elektrisk_streng.dsp
import("stdfaust.lib"); import("physmodels.lib"); // Based on elecGuitar demo streng_guitar2 = pm.elecGuitar(stringLength,pluckPosition,1,gain,gate) with{ f = hslider("freq",440,20,20000,0.001); gain = hslider("gain",0.8,0,1,0.01); s = hslider("sustain",0,0,1,1); pluckPosition = hslider("pluckPosition",0.8,0,1,0.01) : si.smoo; t = button("gate"); gate = t+s : min(1); freq = f; stringLength = freq : f2l; }; process = streng_guitar2;
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/elektrisk_streng.dsp
faust
Based on elecGuitar demo
import("stdfaust.lib"); import("physmodels.lib"); streng_guitar2 = pm.elecGuitar(stringLength,pluckPosition,1,gain,gate) with{ f = hslider("freq",440,20,20000,0.001); gain = hslider("gain",0.8,0,1,0.01); s = hslider("sustain",0,0,1,1); pluckPosition = hslider("pluckPosition",0.8,0,1,0.01) : si.smoo; t = button("gate"); gate = t+s : min(1); freq = f; stringLength = freq : f2l; }; process = streng_guitar2;
d06fb7d76f885c69930242016493f91f73e901a3672e1414314d12b1c25487c9
madskjeldgaard/komet
modular_streng.dsp
import("stdfaust.lib"); import("physmodels.lib"); modular_streng = pm.modularInterpInstr(stringLength,pluckPosition,shape,scale,gain,tapBody,gate) with{ f = hslider("freq",440,20,20000,0.001); gain = hslider("gain",0.8,0,1,0.01); s = hslider("sustain",0,0,1,1); shape = hslider("shape",0,0,1,0.01)*2; scale = hslider("scale",0,0,1,0.011)*2; tapBody = button("tapGate"); pluckPosition = hslider("pluckPosition" ,0.8,0,1,0.01) : si.smoo; t = button("gate"); gate = t+s : min(1); freq = f; stringLength = freq : f2l; }; process = modular_streng;
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/modular_streng.dsp
faust
import("stdfaust.lib"); import("physmodels.lib"); modular_streng = pm.modularInterpInstr(stringLength,pluckPosition,shape,scale,gain,tapBody,gate) with{ f = hslider("freq",440,20,20000,0.001); gain = hslider("gain",0.8,0,1,0.01); s = hslider("sustain",0,0,1,1); shape = hslider("shape",0,0,1,0.01)*2; scale = hslider("scale",0,0,1,0.011)*2; tapBody = button("tapGate"); pluckPosition = hslider("pluckPosition" ,0.8,0,1,0.01) : si.smoo; t = button("gate"); gate = t+s : min(1); freq = f; stringLength = freq : f2l; }; process = modular_streng;
7efe2159a4af7fb8da201992d15d009ad06ec11f2031c1d9a595f42f5cea5284
madskjeldgaard/komet
floejte.dsp
import("stdfaust.lib"); import("physmodels.lib"); process = fluteModel(tubeLength,mouthPosition,blow) with{ f = hslider("freq",440,10,20000,0.00001); gain = hslider("gain",0.9,0,1,0.01); envAttack = hslider("envAttack",1,0,10,0.01)*0.001; s = hslider("sustain",0,0,1,1); mouthPosition = hslider("mouthPosition",0.5,0,1,0.0001) : si.smoo; vibratoFreq = hslider("vibratofreq",5,0.0001,1000,0.0001); vibratoGain = hslider("vibratogain",0.5,0,1,0.0001)*0.04; t = button("gate"); gate = t+s : min(1); freq = f; envelope = gate*gain : si.smooth(ba.tau2pole(envAttack)); tubeLength = freq : f2l; pressure = envelope; blow = blower(pressure,0.05,2000,vibratoFreq,vibratoGain); };
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/floejte.dsp
faust
import("stdfaust.lib"); import("physmodels.lib"); process = fluteModel(tubeLength,mouthPosition,blow) with{ f = hslider("freq",440,10,20000,0.00001); gain = hslider("gain",0.9,0,1,0.01); envAttack = hslider("envAttack",1,0,10,0.01)*0.001; s = hslider("sustain",0,0,1,1); mouthPosition = hslider("mouthPosition",0.5,0,1,0.0001) : si.smoo; vibratoFreq = hslider("vibratofreq",5,0.0001,1000,0.0001); vibratoGain = hslider("vibratogain",0.5,0,1,0.0001)*0.04; t = button("gate"); gate = t+s : min(1); freq = f; envelope = gate*gain : si.smooth(ba.tau2pole(envAttack)); tubeLength = freq : f2l; pressure = envelope; blow = blower(pressure,0.05,2000,vibratoFreq,vibratoGain); };
7df1b548072475b6765c34de5157e20c3b6066881b610df1ac2b39f17af0f53a
madskjeldgaard/komet
klimit.dsp
import("stdfaust.lib"); // process = co.limiter_1176_R4_mono; process = co.limiter_lad_mono(LD, ceiling, attack, hold, release) with { // * `LD` is the lookahead delay in seconds, known at compile-time LD=0.002; // * `ceiling` is the linear amplitude output limit ceiling = vslider("ceiling",0.95,0.00001,1,0.0001); // * `attack` is the attack time in seconds attack = vslider("attack",0.001,0.00000001,2,0.0001); // * `hold` is the hold time in seconds hold = vslider("hold",0.5,0.00000001,3,0.0001); // * `release` is the release time in seconds release = vslider("release",0.01,0.00000001,2,0.0001); };
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/klimit.dsp
faust
process = co.limiter_1176_R4_mono; * `LD` is the lookahead delay in seconds, known at compile-time * `ceiling` is the linear amplitude output limit * `attack` is the attack time in seconds * `hold` is the hold time in seconds * `release` is the release time in seconds
import("stdfaust.lib"); process = co.limiter_lad_mono(LD, ceiling, attack, hold, release) with { LD=0.002; ceiling = vslider("ceiling",0.95,0.00001,1,0.0001); attack = vslider("attack",0.001,0.00000001,2,0.0001); hold = vslider("hold",0.5,0.00000001,3,0.0001); release = vslider("release",0.01,0.00000001,2,0.0001); };
6c8dd8de2fed936d86f43a239c596632350bcee9d4969d9c1376212e56cd8ebb
madskjeldgaard/komet
messing.dsp
import("stdfaust.lib"); import("physmodels.lib"); process = brassModel(tubeLength,lipsTension,mute,pressure) with{ f = hslider("freq",440,10,20000,0.0001); gain = hslider("gain",0.5,0,1,0.01); envAttack = hslider("envAttack",1,0,30,0.01)*0.001; s = hslider("sustain",0,0,1,1); lipsTension = hslider("lipsTension",0.5,0,1,0.01) : si.smoo; mute = hslider("mute",0.5,0,1,0.01) : si.smoo; vibratoFreq = hslider("vibratoFreq",5,1,100,0.01); vibratoGain = hslider("vibratoGain",0.5,0,1,0.01)*0.04; t = button("gate"); gate = t+s : min(1); vibrato = 1+os.osc(vibratoFreq)*vibratoGain*envelope; freq = f; envelope = gate*gain : si.smooth(ba.tau2pole(envAttack)); tubeLength = freq : f2l; pressure = envelope*vibrato; };
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/drafts/messing.dsp
faust
import("stdfaust.lib"); import("physmodels.lib"); process = brassModel(tubeLength,lipsTension,mute,pressure) with{ f = hslider("freq",440,10,20000,0.0001); gain = hslider("gain",0.5,0,1,0.01); envAttack = hslider("envAttack",1,0,30,0.01)*0.001; s = hslider("sustain",0,0,1,1); lipsTension = hslider("lipsTension",0.5,0,1,0.01) : si.smoo; mute = hslider("mute",0.5,0,1,0.01) : si.smoo; vibratoFreq = hslider("vibratoFreq",5,1,100,0.01); vibratoGain = hslider("vibratoGain",0.5,0,1,0.01)*0.04; t = button("gate"); gate = t+s : min(1); vibrato = 1+os.osc(vibratoFreq)*vibratoGain*envelope; freq = f; envelope = gate*gain : si.smooth(ba.tau2pole(envAttack)); tubeLength = freq : f2l; pressure = envelope*vibrato; };
58b98b36948f78d8930b356cc8ebba1578ae1b1f5717b66066522598aa7e76cb
madskjeldgaard/komet
klarinet.dsp
import("stdfaust.lib"); import("physmodels.lib"); process = clarinetModel(tubeLength,blow,reedStiffness,bellOpening) with{ f = hslider("freq",440,10,20000,0.00001); gain = hslider("gain",0.6,0,1,0.01); envAttack = hslider("envAttack",1,0,30,0.01)*0.001; s = hslider("sustain",0,0,1,1); reedStiffness = hslider("reedStiffness",0.5,0,1,0.01); bellOpening = hslider("bellOpening",0.5,0,1,0.01); vibratoFreq = hslider("vibratoFreq",5,0.0001,1000,0.0001); vibratoGain = hslider("vibratoGain",0.25,0,1,0.01)*0.01; t = button("gate"); gate = t+s : min(1); vibrato = 1+os.osc(vibratoFreq)*vibratoGain*envelope; freq = f*vibrato; envelope = gate*gain : si.smooth(ba.tau2pole(envAttack)); tubeLength = freq : f2l; pressure = envelope; // TODO: double vibrato here!! blow = blower(pressure,0.05,2000,vibratoFreq,vibratoGain); };
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/drafts/klarinet.dsp
faust
TODO: double vibrato here!!
import("stdfaust.lib"); import("physmodels.lib"); process = clarinetModel(tubeLength,blow,reedStiffness,bellOpening) with{ f = hslider("freq",440,10,20000,0.00001); gain = hslider("gain",0.6,0,1,0.01); envAttack = hslider("envAttack",1,0,30,0.01)*0.001; s = hslider("sustain",0,0,1,1); reedStiffness = hslider("reedStiffness",0.5,0,1,0.01); bellOpening = hslider("bellOpening",0.5,0,1,0.01); vibratoFreq = hslider("vibratoFreq",5,0.0001,1000,0.0001); vibratoGain = hslider("vibratoGain",0.25,0,1,0.01)*0.01; t = button("gate"); gate = t+s : min(1); vibrato = 1+os.osc(vibratoFreq)*vibratoGain*envelope; freq = f*vibrato; envelope = gate*gain : si.smooth(ba.tau2pole(envAttack)); tubeLength = freq : f2l; blow = blower(pressure,0.05,2000,vibratoFreq,vibratoGain); };
32514681d66b88c48bb9a8a7762a9a1f672777068745f4e969a82016277a013b
madskjeldgaard/komet
mkdelay.dsp
import("stdfaust.lib"); import("lib/mkfilters.dsp"); mkd = environment { // "Natural comb" - aka a comb filter with a onepole LPF in the feedback path comblpf(order, maxdelay, delay, fb, lpfcutoff) = (+ : de.fdelayltv(order, maxdelay, delay)) ~ (* (fb) : mkf.onepolelpf(lpfcutoff)) : fi.dcblocker; // X number of parallel "natural combs". Multi channel out parallel_comb_lpf(numDelays, order, maxdelay, delay, delayOffset, fb, lpf) = par(delayNum, numDelays, delaySig(delayNum)) with{ delaySig(i) = comblpf(order, maxdelay * (i+1), delay * (i+1+delayOffset), fb, lpf) : *(1.0/numDelays); }; // Same as above but with each comb panned in stereo parallel_comb_lpf_splayed(numDelays, order, maxdelay, delay, delayOffset, fb, lpf, spread, rotate) = parallel_comb_lpf(numDelays, order, maxdelay, delay, delayOffset, fb, lpf) <: par(i,numDelays, pan(i, spread, rotate)) :> _, _ with{ pan(i, spread, rotate, input) = sp.panner(panval(i, spread, rotate)); panval(i, spread, rotate) = (i / numDelays) : *(spread) : +(rotate); }; };
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/lib/mkdelay.dsp
faust
"Natural comb" - aka a comb filter with a onepole LPF in the feedback path X number of parallel "natural combs". Multi channel out Same as above but with each comb panned in stereo
import("stdfaust.lib"); import("lib/mkfilters.dsp"); mkd = environment { comblpf(order, maxdelay, delay, fb, lpfcutoff) = (+ : de.fdelayltv(order, maxdelay, delay)) ~ (* (fb) : mkf.onepolelpf(lpfcutoff)) : fi.dcblocker; parallel_comb_lpf(numDelays, order, maxdelay, delay, delayOffset, fb, lpf) = par(delayNum, numDelays, delaySig(delayNum)) with{ delaySig(i) = comblpf(order, maxdelay * (i+1), delay * (i+1+delayOffset), fb, lpf) : *(1.0/numDelays); }; parallel_comb_lpf_splayed(numDelays, order, maxdelay, delay, delayOffset, fb, lpf, spread, rotate) = parallel_comb_lpf(numDelays, order, maxdelay, delay, delayOffset, fb, lpf) <: par(i,numDelays, pan(i, spread, rotate)) :> _, _ with{ pan(i, spread, rotate, input) = sp.panner(panval(i, spread, rotate)); panval(i, spread, rotate) = (i / numDelays) : *(spread) : +(rotate); }; };
e2e3fb172bbe099f2d1751254e1a17f0ff1a6af718458896c82d7aacc6c34dc4
madskjeldgaard/komet
multikomp3.dsp
// Multiband compressor import("stdfaust.lib"); numBands = 3; cf1 = vslider("crossoverFreq0",500,10,20000,0.01); cf2 = vslider("crossoverFreq1",2500,10,20000,0.01); process = _ : fi.crossover3LR4(cf1, cf2) : par(bandNum,numBands,bandcomp(bandNum)) :> _ with{ bandcomp(bandNum, sig) = makeupGain(bandNum) * co.compressor_mono( ratio(bandNum), thresh(bandNum), att(bandNum), rel(bandNum), sig // knee(bandNum), // prePost(bandNum), // abs(_) ); // TODO // According to: https://www.thomann.de/se/onlineexpert_page_mastering_dynamic_processing_the_compressor_and_other_tools.html autoGC = thresh(bandNum) - (thresh(bandNum) / ratio(bandNum)) : ba.db2linear : si.smoo; makeupGain(bandNum) = vslider("makeupGain%bandNum", 0, -96, 96, 0.1) : si.smoo : ba.db2linear; ratio(bandNum) = vslider("ratio%bandNum",4,1,40,0.000001); thresh(bandNum) = vslider("thresh%bandNum",-20,-128,0,0.0001); att(bandNum) = vslider("attack%bandNum",0.001,0,10,0.0001); rel(bandNum) = vslider("release%bandNum",0.01,0,10,0.0001); // knee(bandNum) = vslider("knee%bandNum",6,0,100,0.001); // prePost(bandNum) = vslider("prePost%bandNum",0,0,2,1); // FIXME: Not sure about this };
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/multikomp3.dsp
faust
Multiband compressor knee(bandNum), prePost(bandNum), abs(_) TODO According to: https://www.thomann.de/se/onlineexpert_page_mastering_dynamic_processing_the_compressor_and_other_tools.html knee(bandNum) = vslider("knee%bandNum",6,0,100,0.001); prePost(bandNum) = vslider("prePost%bandNum",0,0,2,1); // FIXME: Not sure about this
import("stdfaust.lib"); numBands = 3; cf1 = vslider("crossoverFreq0",500,10,20000,0.01); cf2 = vslider("crossoverFreq1",2500,10,20000,0.01); process = _ : fi.crossover3LR4(cf1, cf2) : par(bandNum,numBands,bandcomp(bandNum)) :> _ with{ bandcomp(bandNum, sig) = makeupGain(bandNum) * co.compressor_mono( ratio(bandNum), thresh(bandNum), att(bandNum), rel(bandNum), sig ); autoGC = thresh(bandNum) - (thresh(bandNum) / ratio(bandNum)) : ba.db2linear : si.smoo; makeupGain(bandNum) = vslider("makeupGain%bandNum", 0, -96, 96, 0.1) : si.smoo : ba.db2linear; ratio(bandNum) = vslider("ratio%bandNum",4,1,40,0.000001); thresh(bandNum) = vslider("thresh%bandNum",-20,-128,0,0.0001); att(bandNum) = vslider("attack%bandNum",0.001,0,10,0.0001); rel(bandNum) = vslider("release%bandNum",0.01,0,10,0.0001); };
41c556175bfa40f723e6242859bc5917e578a2be91b906f961b57552685de560
madskjeldgaard/komet
musli.dsp
/* Granola was made by Jean-Louis Paquelin. Thanks Jean-Louis! https://github.com/jlp6k/faust-things */ import("stdfaust.lib"); import("faust-things/Granola.dsp"); BUFFER_DURATION = 10; // Seconds CONCURRENT_GRAINS = 10; /*-------------------------------*/ // FREEZE / recording freeze_ctrl = button("Freeze"); // TODO: Not used. Remove somehow // writeIndex_disp = hbargraph("writeIndex", 0, ceil(BUFFER_DURATION * 48000) : int); writeIndex_disp = _; // Automatic triggering from 0.1 to 1000Hz density_ctrl = hslider("density", 1, 0.01, 1000, 0.01) : si.smoo; // Manual triggering seed_ctrl = button("SEED"); // Input Gain input_gain_ctrl = vslider("input_gain", 0, -1.5, 1, 0.01) : si.smoo : bipollin2exppos(100); // Feedback feedback_ctrl = vslider("feedback", 0, 0, 1, 0.01) : si.smoo; // Output gain output_gain_ctrl = vslider("output_gain", 0, -1, 1, 0.01) : si.smoo : bipollin2exppos(100); // dry (0) / wet (1) wetting_ctrl = 1; // position in the table time_ctrl = hslider("time", 0, 0, 1, 0.001) : si.smoo; // Grain size size_ctrl = hslider("size", 0.5, 0.03, BUFFER_DURATION, 0.01) : si.smoo; // Grain pitch // TODO: Drop semitone idea pitch_ctrl = hslider("pitch", 0, -48, 48, 0.5) : ba.semi2ratio; // Backward playback reverse_ctrl = button("reverse"); // Grain envelope shape shape_ctrl = hslider("shape", 0, 0, 1, 0.01); // In order to reduce the number of control knobs, the window plateau width and plateau position // are extrapolated from a single shape control. The shape control varies from 0 to 1, smoothly // morphing the window envelope from a constant 1, to a decreasing ramp, to a triangle and to an // increasing ramp/saw. plateau_width_ctrl = 1 - min(shape_ctrl * 3, 1); plateau_position_ctrl = max((3 * shape_ctrl / 2) - 0.5, 0); process = _ : Granola(BUFFER_DURATION,CONCURRENT_GRAINS).grains( freeze_ctrl, writeIndex_disp, density_ctrl, seed_ctrl, input_gain_ctrl, feedback_ctrl, output_gain_ctrl, wetting_ctrl, time_ctrl, size_ctrl, pitch_ctrl, reverse_ctrl, plateau_width_ctrl, plateau_position_ctrl ) : co.limiter_1176_R4_mono : _;
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/musli.dsp
faust
Granola was made by Jean-Louis Paquelin. Thanks Jean-Louis! https://github.com/jlp6k/faust-things Seconds ------------------------------- FREEZE / recording TODO: Not used. Remove somehow writeIndex_disp = hbargraph("writeIndex", 0, ceil(BUFFER_DURATION * 48000) : int); Automatic triggering from 0.1 to 1000Hz Manual triggering Input Gain Feedback Output gain dry (0) / wet (1) position in the table Grain size Grain pitch TODO: Drop semitone idea Backward playback Grain envelope shape In order to reduce the number of control knobs, the window plateau width and plateau position are extrapolated from a single shape control. The shape control varies from 0 to 1, smoothly morphing the window envelope from a constant 1, to a decreasing ramp, to a triangle and to an increasing ramp/saw.
import("stdfaust.lib"); import("faust-things/Granola.dsp"); CONCURRENT_GRAINS = 10; freeze_ctrl = button("Freeze"); writeIndex_disp = _; density_ctrl = hslider("density", 1, 0.01, 1000, 0.01) : si.smoo; seed_ctrl = button("SEED"); input_gain_ctrl = vslider("input_gain", 0, -1.5, 1, 0.01) : si.smoo : bipollin2exppos(100); feedback_ctrl = vslider("feedback", 0, 0, 1, 0.01) : si.smoo; output_gain_ctrl = vslider("output_gain", 0, -1, 1, 0.01) : si.smoo : bipollin2exppos(100); wetting_ctrl = 1; time_ctrl = hslider("time", 0, 0, 1, 0.001) : si.smoo; size_ctrl = hslider("size", 0.5, 0.03, BUFFER_DURATION, 0.01) : si.smoo; pitch_ctrl = hslider("pitch", 0, -48, 48, 0.5) : ba.semi2ratio; reverse_ctrl = button("reverse"); shape_ctrl = hslider("shape", 0, 0, 1, 0.01); plateau_width_ctrl = 1 - min(shape_ctrl * 3, 1); plateau_position_ctrl = max((3 * shape_ctrl / 2) - 0.5, 0); process = _ : Granola(BUFFER_DURATION,CONCURRENT_GRAINS).grains( freeze_ctrl, writeIndex_disp, density_ctrl, seed_ctrl, input_gain_ctrl, feedback_ctrl, output_gain_ctrl, wetting_ctrl, time_ctrl, size_ctrl, pitch_ctrl, reverse_ctrl, plateau_width_ctrl, plateau_position_ctrl ) : co.limiter_1176_R4_mono : _;
65aafce1090bd54b352aa1627debb30f81c274c96a938bbb83468a0fc5db6d8c
madskjeldgaard/komet
andromeda.dsp
import("stdfaust.lib"); // Modified version of Liam Wall's original from: https://raw.githubusercontent.com/ljwall/er-301-units/main/faustian/dsp/Andromeda.dsp declare andromeda author "Liam Wall"; declare andromeda license "MIT-style STK-4.3 license"; andromeda(decay, low_pass, high_pass) = _,_ : + : *(0.5) : diffusion_network : (+~chain) <: chain_l, chain_r with { // allpass using delay with fixed size allpass_f(t, a) = (+ <: @(t),*(a)) ~ *(-a) : mem,_ : +; i_diff1 = 0.75; i_diff2 = 0.625; diffusion_network = allpass_f(235, i_diff1) : allpass_f(177, i_diff1) : allpass_f(627, i_diff2) : allpass_f(458, i_diff2); line = de.fdelayltv(2, 28800); taps = (0.047, 0.120, 0.134, 0.146, 0.158, 0.169, 0.180, 0.190, 0.200, 0.209, 0.217, 0.233, 0.240, 0.244, 0.225, 0.247); mod = hslider("mod", 50, 0, 100, 0); min_mod = 31, 25, 19, 11; mid_mod = 130, 63, 43, 20; max_mod = 313, 310, 251, 250; epsilon = par(i, 4, (mod <= 50)*(ba.take(i+1, min_mod) + (mod/50) * (ba.take(i+1, mid_mod) - ba.take(i+1, min_mod))) + (mod > 50)*(ba.take(i+1, mid_mod) + (mod/50 - 1) * (ba.take(i+1, max_mod) - ba.take(i+1, mid_mod))) ); e1 = ba.take(1, epsilon) / 1000000; e2 = ba.take(2, epsilon) / 1000000; e3 = ba.take(3, epsilon) / 1000000; e4 = ba.take(4, epsilon) / 1000000; mods = x,xq,-x,-xq , y,yq,-y,-yq, z,zq,-z,-zq, a,aq,-a,-aq letrec { 'xq = os.impulse + xq - e1*x; 'x = e1 * (xq - e1 *x) + x; 'yq = os.impulse + yq - e2*y; 'y = e2 * (yq - e2 *y) + y; 'zq = os.impulse + zq - e3*z; 'z = e3 * (zq - e3 *z) + z; 'aq = os.impulse + aq - e4*a; 'a = e4 * (aq - e4 *a) + a; }; limiter(x) = 2 * x / sqrt(x*x +4); depth = ba.sec2samp(0.004); chain = _ <: par(i, ba.count(taps), line(ba.sec2samp(ba.take(i+1, taps)) + depth*ba.take(1 + (i % (ba.count(mods))), mods))) :> /(ba.count(taps)) : fi.lowpass(1, low_pass) : fi.highpass(1, high_pass) : *(decay) : limiter; line_out = de.delay(24000); taps_l = (0.060, 0.137, 0.175, 0.190); taps_r = (0.077, 0.112, 0.160, 0.212); chain_l = _ <: par(i, ba.count(taps_l), line_out(ba.take(i+1, taps_l) : ba.sec2samp)) :> /(ba.count(taps_l)); chain_r = _ <: par(i, ba.count(taps_r), line_out(ba.take(i+1, taps_r) : ba.sec2samp)) :> /(ba.count(taps_r)); }; process = _,_ : andromeda(decay_ctrl, low_ctrl, high_ctrl) with { decay_ctrl = hslider("Decay", 0.8, 0, 5, 0.001) : si.smoo; low_ctrl = hslider("HighCut", 20000, 100, 20000, 100) : min(20000) : max(100); high_ctrl = hslider("LowCut", 20, 20, 20000, 100) : min(20000) : max(20); };
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/andromeda.dsp
faust
Modified version of Liam Wall's original from: https://raw.githubusercontent.com/ljwall/er-301-units/main/faustian/dsp/Andromeda.dsp allpass using delay with fixed size
import("stdfaust.lib"); declare andromeda author "Liam Wall"; declare andromeda license "MIT-style STK-4.3 license"; andromeda(decay, low_pass, high_pass) = _,_ : + : *(0.5) : diffusion_network : (+~chain) <: chain_l, chain_r with { allpass_f(t, a) = (+ <: @(t),*(a)) ~ *(-a) : mem,_ : +; i_diff1 = 0.75; i_diff2 = 0.625; diffusion_network = allpass_f(235, i_diff1) : allpass_f(177, i_diff1) : allpass_f(627, i_diff2) : allpass_f(458, i_diff2); line = de.fdelayltv(2, 28800); taps = (0.047, 0.120, 0.134, 0.146, 0.158, 0.169, 0.180, 0.190, 0.200, 0.209, 0.217, 0.233, 0.240, 0.244, 0.225, 0.247); mod = hslider("mod", 50, 0, 100, 0); min_mod = 31, 25, 19, 11; mid_mod = 130, 63, 43, 20; max_mod = 313, 310, 251, 250; epsilon = par(i, 4, (mod <= 50)*(ba.take(i+1, min_mod) + (mod/50) * (ba.take(i+1, mid_mod) - ba.take(i+1, min_mod))) + (mod > 50)*(ba.take(i+1, mid_mod) + (mod/50 - 1) * (ba.take(i+1, max_mod) - ba.take(i+1, mid_mod))) ); e1 = ba.take(1, epsilon) / 1000000; e2 = ba.take(2, epsilon) / 1000000; e3 = ba.take(3, epsilon) / 1000000; e4 = ba.take(4, epsilon) / 1000000; mods = x,xq,-x,-xq , y,yq,-y,-yq, z,zq,-z,-zq, a,aq,-a,-aq letrec { 'xq = os.impulse + xq - e1*x; 'x = e1 * (xq - e1 *x) + x; 'yq = os.impulse + yq - e2*y; 'y = e2 * (yq - e2 *y) + y; 'zq = os.impulse + zq - e3*z; 'z = e3 * (zq - e3 *z) + z; 'aq = os.impulse + aq - e4*a; 'a = e4 * (aq - e4 *a) + a; }; limiter(x) = 2 * x / sqrt(x*x +4); depth = ba.sec2samp(0.004); chain = _ <: par(i, ba.count(taps), line(ba.sec2samp(ba.take(i+1, taps)) + depth*ba.take(1 + (i % (ba.count(mods))), mods))) :> /(ba.count(taps)) : fi.lowpass(1, low_pass) : fi.highpass(1, high_pass) : *(decay) : limiter; line_out = de.delay(24000); taps_l = (0.060, 0.137, 0.175, 0.190); taps_r = (0.077, 0.112, 0.160, 0.212); chain_l = _ <: par(i, ba.count(taps_l), line_out(ba.take(i+1, taps_l) : ba.sec2samp)) :> /(ba.count(taps_l)); chain_r = _ <: par(i, ba.count(taps_r), line_out(ba.take(i+1, taps_r) : ba.sec2samp)) :> /(ba.count(taps_r)); }; process = _,_ : andromeda(decay_ctrl, low_ctrl, high_ctrl) with { decay_ctrl = hslider("Decay", 0.8, 0, 5, 0.001) : si.smoo; low_ctrl = hslider("HighCut", 20000, 100, 20000, 100) : min(20000) : max(100); high_ctrl = hslider("LowCut", 20, 20, 20000, 100) : min(20000) : max(20); };
fb543e901904dd49d4b55a721f1c2220a99d00d9b3a9839173f7869450821e44
madskjeldgaard/komet
datorroplusplus.dsp
import("stdfaust.lib"); // Modified by Mads Kjeldgaard. Original is here: https://raw.githubusercontent.com/ljwall/er-301-units/main/faustian/dsp/DattorroPlusPlus.dsp declare dattorro_rev_2 author "Jakob Zerbian, Liam Wall"; declare dattorro_rev_2 license "MIT-style STK-4.3 license"; dattorro_rev_2(pre_delay, bw, i_diff1, i_diff2, decay, d_diff1, d_diff2, damping) = si.bus(2) : + : *(0.5) : predelay : bw_filter : diffusion_network : reverb_loop with { // allpass using delay with fixed size allpass_f(t, a) = (+ <: @(t),*(a)) ~ *(-a) : mem,_ : +; // allpass using delay with fixed size, and two extra taps allpass_f_taps(t, a, tap_1, tap_2) = (+ <: @(t),*(a),@(tap_1),@(tap_2)) ~ *(-a) : mem,_,_,_ : +,_,_; // allpass using delay with excursion allpass_exc(t, a, i) = (+ <: de.fdelayltv(2, t+20, t + 16*ba.take(i, mods)),*(a)) ~ *(-a) : mem,_ : + with { epsilon = 0.00013; // Around 1Hz mods = y,yq letrec { 'yq = os.impulse + yq - epsilon*y; 'y = epsilon * (yq - epsilon *y) + y; }; }; // input pre-delay and diffusion predelay = de.delay(9600, pre_delay); bw_filter = *(bw) : +~(mem : *(1-bw)); diffusion_network = allpass_f(235, i_diff1) : allpass_f(177, i_diff1) : allpass_f(627, i_diff2) : allpass_f(458, i_diff2); damp = (*(1-damping) : +~*(damping) : *(decay)), _,_; // /********* left output, all wet *********/ // [x] accumulator = 0.6 X node48_54[266] // [x] accumulator += 0.6 x node48_54[2974] // [x] accumulator -= 0.6 X node55_59[1913] // [x] accumulator += 0.6 X node59_63[1996] // [x] accumulator -= 0.6 X node24_30[1990] // [x] accumulator -= 0.6 x node31_33[187] // [x] YL = accumulator - 0.6 X node33_39[1066] // /********* right output, all wet *********/ // [x] accumulator = 0.6 X node24_30[353] // [x] accumulator += 0.6 X node24_30[3627] // [x] accumulator -= 0.6 X node31_33[1228] // [x] accumulator += 0.6 X node33_39[2673] // [x] accumulator -= 0.6 X node48_54[2111] // [x] accumulator -= 0.6 X node55_59[335] // [x] YR = accumulator - 0.6 X node59_63[121] // Contains node23_24 decay_diffusion_1a = allpass_exc(1112,-d_diff1, 1),_,_; // node24_30 z_4453 = (_ <: @(7370), @(3293), @(584), @(6003) : _,_,+ : _,*(-0.6),*(0.6)),_,_ : _,_,ro.cross(2),_ : _,+,+; // Contains node31_33 decay_diffusion_2a = (allpass_f_taps(2979, d_diff2, 309, 2032) : _,*(-0.6),*(-0.6)),_,_ : _,_,ro.cross(2),_ : _,+,+; // node33_39 z_3720 = (_ <: @(6157), @(1764), @(4424) : _,*(-0.6),*(0.6)),_,_ : _,_,ro.cross(2),_ : _,+,+; // Contains node46_48 decay_diffusion_1b = allpass_exc(1502,-d_diff1, 2),_,_; // node48_54 z_4217 = (_ <: @(6979), @(440), @(4922), @(3494) : _,+,_ : _,*(0.6),*(-0.6)),_,_ : _,_,ro.cross(2),_ : _,+,+; // Contains node55_59 decay_diffusion_2b = (allpass_f_taps(4396, d_diff2, 3166, 554): _,*(-0.6),*(-0.6)),_,_ : _,_,ro.cross(2),_ : _,+,+; // node59_63 z_3163 = (_ <: @(5235), @(3303), @(200) : _,*(0.6),*(-0.6)),_,_ : _,_,ro.cross(2),_ : _,+,+ ; // Three channels: (1) is the output to loop, (2) is Left, and (3) is right. reverb_chain(loop_in, in) = (loop_in+in) <: (_,_,_) : decay_diffusion_1a : z_4453 : damp : decay_diffusion_2a : z_3720 : (*(decay),_,_) : (+(in),_,_) : decay_diffusion_1b : z_4217 : damp : decay_diffusion_2b : z_3163 : (*(decay),_,_); reverb_loop = reverb_chain~_ : (si.block(1),_,_); }; // Dattorro reverb with difusion parameters as per https://ccrma.stanford.edu/~dattorro/EffectDesignPart1.pdf reverb(pre_delay, band_width, decay, damping) = dattorro_rev_2(pre_delay, band_width, 0.75, 0.625, decay, 0.7, 0.5, damping); // Controls (will become parameters in the er-301 object) pre_delay_ctrl = hslider("Predelay", 10, 0, 100, 0.5) : /(1000) : ba.sec2samp; band_width_ctrl = hslider("BandWidth", 0.6, 0, 1, 0.001) : si.smoo; decay_ctrl = hslider("Decay", 0.8, 0, 1, 0.001) : si.smoo; damping_ctr = hslider("Damping", 0.25, 0, 1, 0.001) : si.smoo; process = _,_ : reverb(pre_delay_ctrl, band_width_ctrl, decay_ctrl, damping_ctr);
https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/datorroplusplus.dsp
faust
Modified by Mads Kjeldgaard. Original is here: https://raw.githubusercontent.com/ljwall/er-301-units/main/faustian/dsp/DattorroPlusPlus.dsp allpass using delay with fixed size allpass using delay with fixed size, and two extra taps allpass using delay with excursion Around 1Hz input pre-delay and diffusion /********* left output, all wet *********/ [x] accumulator = 0.6 X node48_54[266] [x] accumulator += 0.6 x node48_54[2974] [x] accumulator -= 0.6 X node55_59[1913] [x] accumulator += 0.6 X node59_63[1996] [x] accumulator -= 0.6 X node24_30[1990] [x] accumulator -= 0.6 x node31_33[187] [x] YL = accumulator - 0.6 X node33_39[1066] /********* right output, all wet *********/ [x] accumulator = 0.6 X node24_30[353] [x] accumulator += 0.6 X node24_30[3627] [x] accumulator -= 0.6 X node31_33[1228] [x] accumulator += 0.6 X node33_39[2673] [x] accumulator -= 0.6 X node48_54[2111] [x] accumulator -= 0.6 X node55_59[335] [x] YR = accumulator - 0.6 X node59_63[121] Contains node23_24 node24_30 Contains node31_33 node33_39 Contains node46_48 node48_54 Contains node55_59 node59_63 Three channels: (1) is the output to loop, (2) is Left, and (3) is right. Dattorro reverb with difusion parameters as per https://ccrma.stanford.edu/~dattorro/EffectDesignPart1.pdf Controls (will become parameters in the er-301 object)
import("stdfaust.lib"); declare dattorro_rev_2 author "Jakob Zerbian, Liam Wall"; declare dattorro_rev_2 license "MIT-style STK-4.3 license"; dattorro_rev_2(pre_delay, bw, i_diff1, i_diff2, decay, d_diff1, d_diff2, damping) = si.bus(2) : + : *(0.5) : predelay : bw_filter : diffusion_network : reverb_loop with { allpass_f(t, a) = (+ <: @(t),*(a)) ~ *(-a) : mem,_ : +; allpass_f_taps(t, a, tap_1, tap_2) = (+ <: @(t),*(a),@(tap_1),@(tap_2)) ~ *(-a) : mem,_,_,_ : +,_,_; allpass_exc(t, a, i) = (+ <: de.fdelayltv(2, t+20, t + 16*ba.take(i, mods)),*(a)) ~ *(-a) : mem,_ : + with { mods = y,yq letrec { 'yq = os.impulse + yq - epsilon*y; 'y = epsilon * (yq - epsilon *y) + y; }; }; predelay = de.delay(9600, pre_delay); bw_filter = *(bw) : +~(mem : *(1-bw)); diffusion_network = allpass_f(235, i_diff1) : allpass_f(177, i_diff1) : allpass_f(627, i_diff2) : allpass_f(458, i_diff2); damp = (*(1-damping) : +~*(damping) : *(decay)), _,_; decay_diffusion_1a = allpass_exc(1112,-d_diff1, 1),_,_; z_4453 = (_ <: @(7370), @(3293), @(584), @(6003) : _,_,+ : _,*(-0.6),*(0.6)),_,_ : _,_,ro.cross(2),_ : _,+,+; decay_diffusion_2a = (allpass_f_taps(2979, d_diff2, 309, 2032) : _,*(-0.6),*(-0.6)),_,_ : _,_,ro.cross(2),_ : _,+,+; z_3720 = (_ <: @(6157), @(1764), @(4424) : _,*(-0.6),*(0.6)),_,_ : _,_,ro.cross(2),_ : _,+,+; decay_diffusion_1b = allpass_exc(1502,-d_diff1, 2),_,_; z_4217 = (_ <: @(6979), @(440), @(4922), @(3494) : _,+,_ : _,*(0.6),*(-0.6)),_,_ : _,_,ro.cross(2),_ : _,+,+; decay_diffusion_2b = (allpass_f_taps(4396, d_diff2, 3166, 554): _,*(-0.6),*(-0.6)),_,_ : _,_,ro.cross(2),_ : _,+,+; z_3163 = (_ <: @(5235), @(3303), @(200) : _,*(0.6),*(-0.6)),_,_ : _,_,ro.cross(2),_ : _,+,+ ; reverb_chain(loop_in, in) = (loop_in+in) <: (_,_,_) : decay_diffusion_1a : z_4453 : damp : decay_diffusion_2a : z_3720 : (*(decay),_,_) : (+(in),_,_) : decay_diffusion_1b : z_4217 : damp : decay_diffusion_2b : z_3163 : (*(decay),_,_); reverb_loop = reverb_chain~_ : (si.block(1),_,_); }; reverb(pre_delay, band_width, decay, damping) = dattorro_rev_2(pre_delay, band_width, 0.75, 0.625, decay, 0.7, 0.5, damping); pre_delay_ctrl = hslider("Predelay", 10, 0, 100, 0.5) : /(1000) : ba.sec2samp; band_width_ctrl = hslider("BandWidth", 0.6, 0, 1, 0.001) : si.smoo; decay_ctrl = hslider("Decay", 0.8, 0, 1, 0.001) : si.smoo; damping_ctr = hslider("Damping", 0.25, 0, 1, 0.001) : si.smoo; process = _,_ : reverb(pre_delay_ctrl, band_width_ctrl, decay_ctrl, damping_ctr);
97215c4ef02380296654c8ef0ff12a799b34132b14ed2a70db0274b1a9a69ce3
madskjeldgaard/mkfaustplugins
BowedString.dsp
declare name "BowedString"; declare author "James Leonard"; declare date "April 2020"; /* ========= DESCRITPION ============= A simple bowed string model - inputs: bow position (move it slowly to yield self-sustained oscillations!). - outputs: two listening points on the string. - controls: bow pressure and string stiffness. */ import("stdfaust.lib"); in1 = hslider("Bow Position", 0, -1, 1, 0.001):si.smoo:si.smoo:si.smoo; // nice and smooth position signal OutGain = 150.; low_M = 1.0; low_K = hslider("String Stiffness",0.3,0.001,0.7,0.0001) : si.smoo; low_Z = 0.001; nlZ = hslider("Bow Pressure",0.3,0.001,0.5,0.0001) : si.smoo; nlscale = 0.0005; model = ( mi.ground(0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.ground(0.), mi.posInput(1.): RoutingMassToLink : mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.nlBow(nlZ, nlscale, 0, 1., 0.), par(i, nbOut, _): RoutingLinkToMass )~par(i, nbMass, _): par(i, nbMass, !), par(i, nbOut , _) with{ RoutingMassToLink(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29, m30, m31, m32, m33, m34, m35, m36, m37, m38, m39, m40, m41, m42, m43, m44, m45, m46, m47, m48, m49, m50, m51, m52, m53, m54, m55, m56, m57, m58, m59, m60, m61, m62, m63, m64, m65, m66, m67, m68, m69, m70, m71, m72, m73, m74, m75, m76, m77, m78, m79, m80, m81, m82, m83, m84, m85, m86, m87, m88, m89, m90, m91, m92, m93, m94, m95, m96, m97, m98, m99, m100, m101, m102, m103, m104, m105, m106, m107, m108, m109, m110, m111, m112, m113, m114, m115, m116, m117, m118, m119, m120, m121, m122, m123, m124, m125, m126, m127, m128, m129, m130, m131, m132, m133, m134, m135, m136, m137, m138, m139, m140, m141, m142, m143, m144, m145, m146, m147, m148, m149, m150, m151, m152) = /* routed positions */ m0, m1, m1, m2, m2, m3, m3, m4, m4, m5, m5, m6, m6, m7, m7, m8, m8, m9, m9, m10, m10, m11, m11, m12, m12, m13, m13, m14, m14, m15, m15, m16, m16, m17, m17, m18, m18, m19, m19, m20, m20, m21, m21, m22, m22, m23, m23, m24, m24, m25, m25, m26, m26, m27, m27, m28, m28, m29, m29, m30, m30, m31, m31, m32, m32, m33, m33, m34, m34, m35, m35, m36, m36, m37, m37, m38, m38, m39, m39, m40, m40, m41, m41, m42, m42, m43, m43, m44, m44, m45, m45, m46, m46, m47, m47, m48, m48, m49, m49, m50, m50, m51, m51, m52, m52, m53, m53, m54, m54, m55, m55, m56, m56, m57, m57, m58, m58, m59, m59, m60, m60, m61, m61, m62, m62, m63, m63, m64, m64, m65, m65, m66, m66, m67, m67, m68, m68, m69, m69, m70, m70, m71, m71, m72, m72, m73, m73, m74, m74, m75, m75, m76, m76, m77, m77, m78, m78, m79, m79, m80, m80, m81, m81, m82, m82, m83, m83, m84, m84, m85, m85, m86, m86, m87, m87, m88, m88, m89, m89, m90, m90, m91, m91, m92, m92, m93, m93, m94, m94, m95, m95, m96, m96, m97, m97, m98, m98, m99, m99, m100, m100, m101, m101, m102, m102, m103, m103, m104, m104, m105, m105, m106, m106, m107, m107, m108, m108, m109, m109, m110, m110, m111, m111, m112, m112, m113, m113, m114, m114, m115, m115, m116, m116, m117, m117, m118, m118, m119, m119, m120, m120, m121, m121, m122, m122, m123, m123, m124, m124, m125, m125, m126, m126, m127, m127, m128, m128, m129, m129, m130, m130, m131, m131, m132, m132, m133, m133, m134, m134, m135, m135, m136, m136, m137, m137, m138, m138, m139, m139, m140, m140, m141, m141, m142, m142, m143, m143, m144, m144, m145, m145, m146, m146, m147, m147, m148, m148, m149, m149, m150, m150, m151, m152, m144, /* outputs */ m31, m41; RoutingLinkToMass(l0_f1, l0_f2, l1_f1, l1_f2, l2_f1, l2_f2, l3_f1, l3_f2, l4_f1, l4_f2, l5_f1, l5_f2, l6_f1, l6_f2, l7_f1, l7_f2, l8_f1, l8_f2, l9_f1, l9_f2, l10_f1, l10_f2, l11_f1, l11_f2, l12_f1, l12_f2, l13_f1, l13_f2, l14_f1, l14_f2, l15_f1, l15_f2, l16_f1, l16_f2, l17_f1, l17_f2, l18_f1, l18_f2, l19_f1, l19_f2, l20_f1, l20_f2, l21_f1, l21_f2, l22_f1, l22_f2, l23_f1, l23_f2, l24_f1, l24_f2, l25_f1, l25_f2, l26_f1, l26_f2, l27_f1, l27_f2, l28_f1, l28_f2, l29_f1, l29_f2, l30_f1, l30_f2, l31_f1, l31_f2, l32_f1, l32_f2, l33_f1, l33_f2, l34_f1, l34_f2, l35_f1, l35_f2, l36_f1, l36_f2, l37_f1, l37_f2, l38_f1, l38_f2, l39_f1, l39_f2, l40_f1, l40_f2, l41_f1, l41_f2, l42_f1, l42_f2, l43_f1, l43_f2, l44_f1, l44_f2, l45_f1, l45_f2, l46_f1, l46_f2, l47_f1, l47_f2, l48_f1, l48_f2, l49_f1, l49_f2, l50_f1, l50_f2, l51_f1, l51_f2, l52_f1, l52_f2, l53_f1, l53_f2, l54_f1, l54_f2, l55_f1, l55_f2, l56_f1, l56_f2, l57_f1, l57_f2, l58_f1, l58_f2, l59_f1, l59_f2, l60_f1, l60_f2, l61_f1, l61_f2, l62_f1, l62_f2, l63_f1, l63_f2, l64_f1, l64_f2, l65_f1, l65_f2, l66_f1, l66_f2, l67_f1, l67_f2, l68_f1, l68_f2, l69_f1, l69_f2, l70_f1, l70_f2, l71_f1, l71_f2, l72_f1, l72_f2, l73_f1, l73_f2, l74_f1, l74_f2, l75_f1, l75_f2, l76_f1, l76_f2, l77_f1, l77_f2, l78_f1, l78_f2, l79_f1, l79_f2, l80_f1, l80_f2, l81_f1, l81_f2, l82_f1, l82_f2, l83_f1, l83_f2, l84_f1, l84_f2, l85_f1, l85_f2, l86_f1, l86_f2, l87_f1, l87_f2, l88_f1, l88_f2, l89_f1, l89_f2, l90_f1, l90_f2, l91_f1, l91_f2, l92_f1, l92_f2, l93_f1, l93_f2, l94_f1, l94_f2, l95_f1, l95_f2, l96_f1, l96_f2, l97_f1, l97_f2, l98_f1, l98_f2, l99_f1, l99_f2, l100_f1, l100_f2, l101_f1, l101_f2, l102_f1, l102_f2, l103_f1, l103_f2, l104_f1, l104_f2, l105_f1, l105_f2, l106_f1, l106_f2, l107_f1, l107_f2, l108_f1, l108_f2, l109_f1, l109_f2, l110_f1, l110_f2, l111_f1, l111_f2, l112_f1, l112_f2, l113_f1, l113_f2, l114_f1, l114_f2, l115_f1, l115_f2, l116_f1, l116_f2, l117_f1, l117_f2, l118_f1, l118_f2, l119_f1, l119_f2, l120_f1, l120_f2, l121_f1, l121_f2, l122_f1, l122_f2, l123_f1, l123_f2, l124_f1, l124_f2, l125_f1, l125_f2, l126_f1, l126_f2, l127_f1, l127_f2, l128_f1, l128_f2, l129_f1, l129_f2, l130_f1, l130_f2, l131_f1, l131_f2, l132_f1, l132_f2, l133_f1, l133_f2, l134_f1, l134_f2, l135_f1, l135_f2, l136_f1, l136_f2, l137_f1, l137_f2, l138_f1, l138_f2, l139_f1, l139_f2, l140_f1, l140_f2, l141_f1, l141_f2, l142_f1, l142_f2, l143_f1, l143_f2, l144_f1, l144_f2, l145_f1, l145_f2, l146_f1, l146_f2, l147_f1, l147_f2, l148_f1, l148_f2, l149_f1, l149_f2, l150_f1, l150_f2, l151_f1, l151_f2, p_out1, p_out2) = /* routed forces */ l0_f1, l0_f2 + l1_f1, l1_f2 + l2_f1, l2_f2 + l3_f1, l3_f2 + l4_f1, l4_f2 + l5_f1, l5_f2 + l6_f1, l6_f2 + l7_f1, l7_f2 + l8_f1, l8_f2 + l9_f1, l9_f2 + l10_f1, l10_f2 + l11_f1, l11_f2 + l12_f1, l12_f2 + l13_f1, l13_f2 + l14_f1, l14_f2 + l15_f1, l15_f2 + l16_f1, l16_f2 + l17_f1, l17_f2 + l18_f1, l18_f2 + l19_f1, l19_f2 + l20_f1, l20_f2 + l21_f1, l21_f2 + l22_f1, l22_f2 + l23_f1, l23_f2 + l24_f1, l24_f2 + l25_f1, l25_f2 + l26_f1, l26_f2 + l27_f1, l27_f2 + l28_f1, l28_f2 + l29_f1, l29_f2 + l30_f1, l30_f2 + l31_f1, l31_f2 + l32_f1, l32_f2 + l33_f1, l33_f2 + l34_f1, l34_f2 + l35_f1, l35_f2 + l36_f1, l36_f2 + l37_f1, l37_f2 + l38_f1, l38_f2 + l39_f1, l39_f2 + l40_f1, l40_f2 + l41_f1, l41_f2 + l42_f1, l42_f2 + l43_f1, l43_f2 + l44_f1, l44_f2 + l45_f1, l45_f2 + l46_f1, l46_f2 + l47_f1, l47_f2 + l48_f1, l48_f2 + l49_f1, l49_f2 + l50_f1, l50_f2 + l51_f1, l51_f2 + l52_f1, l52_f2 + l53_f1, l53_f2 + l54_f1, l54_f2 + l55_f1, l55_f2 + l56_f1, l56_f2 + l57_f1, l57_f2 + l58_f1, l58_f2 + l59_f1, l59_f2 + l60_f1, l60_f2 + l61_f1, l61_f2 + l62_f1, l62_f2 + l63_f1, l63_f2 + l64_f1, l64_f2 + l65_f1, l65_f2 + l66_f1, l66_f2 + l67_f1, l67_f2 + l68_f1, l68_f2 + l69_f1, l69_f2 + l70_f1, l70_f2 + l71_f1, l71_f2 + l72_f1, l72_f2 + l73_f1, l73_f2 + l74_f1, l74_f2 + l75_f1, l75_f2 + l76_f1, l76_f2 + l77_f1, l77_f2 + l78_f1, l78_f2 + l79_f1, l79_f2 + l80_f1, l80_f2 + l81_f1, l81_f2 + l82_f1, l82_f2 + l83_f1, l83_f2 + l84_f1, l84_f2 + l85_f1, l85_f2 + l86_f1, l86_f2 + l87_f1, l87_f2 + l88_f1, l88_f2 + l89_f1, l89_f2 + l90_f1, l90_f2 + l91_f1, l91_f2 + l92_f1, l92_f2 + l93_f1, l93_f2 + l94_f1, l94_f2 + l95_f1, l95_f2 + l96_f1, l96_f2 + l97_f1, l97_f2 + l98_f1, l98_f2 + l99_f1, l99_f2 + l100_f1, l100_f2 + l101_f1, l101_f2 + l102_f1, l102_f2 + l103_f1, l103_f2 + l104_f1, l104_f2 + l105_f1, l105_f2 + l106_f1, l106_f2 + l107_f1, l107_f2 + l108_f1, l108_f2 + l109_f1, l109_f2 + l110_f1, l110_f2 + l111_f1, l111_f2 + l112_f1, l112_f2 + l113_f1, l113_f2 + l114_f1, l114_f2 + l115_f1, l115_f2 + l116_f1, l116_f2 + l117_f1, l117_f2 + l118_f1, l118_f2 + l119_f1, l119_f2 + l120_f1, l120_f2 + l121_f1, l121_f2 + l122_f1, l122_f2 + l123_f1, l123_f2 + l124_f1, l124_f2 + l125_f1, l125_f2 + l126_f1, l126_f2 + l127_f1, l127_f2 + l128_f1, l128_f2 + l129_f1, l129_f2 + l130_f1, l130_f2 + l131_f1, l131_f2 + l132_f1, l132_f2 + l133_f1, l133_f2 + l134_f1, l134_f2 + l135_f1, l135_f2 + l136_f1, l136_f2 + l137_f1, l137_f2 + l138_f1, l138_f2 + l139_f1, l139_f2 + l140_f1, l140_f2 + l141_f1, l141_f2 + l142_f1, l142_f2 + l143_f1, l143_f2 + l144_f1 + l151_f2, l144_f2 + l145_f1, l145_f2 + l146_f1, l146_f2 + l147_f1, l147_f2 + l148_f1, l148_f2 + l149_f1, l149_f2 + l150_f1, l150_f2, l151_f1, /* pass-through */ p_out1, p_out2; nbMass = 153; nbOut = 2; }; process = in1 : model:*(OutGain), *(OutGain); /* ========= MIMS SCRIPT USED FOR MODEL GENERATION ============= @low_M param 1.0 @low_K param 0.3 @low_Z param 0.001 @nlZ param 0.08 @nlscale param 0.00005 @low_s0 ground 0. @low_m0 mass low_M 0. 0. @low_m1 mass low_M 0. 0. @low_m2 mass low_M 0. 0. @low_m3 mass low_M 0. 0. @low_m4 mass low_M 0. 0. @low_m5 mass low_M 0. 0. @low_m6 mass low_M 0. 0. @low_m7 mass low_M 0. 0. @low_m8 mass low_M 0. 0. @low_m9 mass low_M 0. 0. @low_m10 mass low_M 0. 0. @low_m11 mass low_M 0. 0. @low_m12 mass low_M 0. 0. @low_m13 mass low_M 0. 0. @low_m14 mass low_M 0. 0. @low_m15 mass low_M 0. 0. @low_m16 mass low_M 0. 0. @low_m17 mass low_M 0. 0. @low_m18 mass low_M 0. 0. @low_m19 mass low_M 0. 0. @low_m20 mass low_M 0. 0. @low_m21 mass low_M 0. 0. @low_m22 mass low_M 0. 0. @low_m23 mass low_M 0. 0. @low_m24 mass low_M 0. 0. @low_m25 mass low_M 0. 0. @low_m26 mass low_M 0. 0. @low_m27 mass low_M 0. 0. @low_m28 mass low_M 0. 0. @low_m29 mass low_M 0. 0. @low_m30 mass low_M 0. 0. @low_m31 mass low_M 0. 0. @low_m32 mass low_M 0. 0. @low_m33 mass low_M 0. 0. @low_m34 mass low_M 0. 0. @low_m35 mass low_M 0. 0. @low_m36 mass low_M 0. 0. @low_m37 mass low_M 0. 0. @low_m38 mass low_M 0. 0. @low_m39 mass low_M 0. 0. @low_m40 mass low_M 0. 0. @low_m41 mass low_M 0. 0. @low_m42 mass low_M 0. 0. @low_m43 mass low_M 0. 0. @low_m44 mass low_M 0. 0. @low_m45 mass low_M 0. 0. @low_m46 mass low_M 0. 0. @low_m47 mass low_M 0. 0. @low_m48 mass low_M 0. 0. @low_m49 mass low_M 0. 0. @low_m50 mass low_M 0. 0. @low_m51 mass low_M 0. 0. @low_m52 mass low_M 0. 0. @low_m53 mass low_M 0. 0. @low_m54 mass low_M 0. 0. @low_m55 mass low_M 0. 0. @low_m56 mass low_M 0. 0. @low_m57 mass low_M 0. 0. @low_m58 mass low_M 0. 0. @low_m59 mass low_M 0. 0. @low_m60 mass low_M 0. 0. @low_m61 mass low_M 0. 0. @low_m62 mass low_M 0. 0. @low_m63 mass low_M 0. 0. @low_m64 mass low_M 0. 0. @low_m65 mass low_M 0. 0. @low_m66 mass low_M 0. 0. @low_m67 mass low_M 0. 0. @low_m68 mass low_M 0. 0. @low_m69 mass low_M 0. 0. @low_m70 mass low_M 0. 0. @low_m71 mass low_M 0. 0. @low_m72 mass low_M 0. 0. @low_m73 mass low_M 0. 0. @low_m74 mass low_M 0. 0. @low_m75 mass low_M 0. 0. @low_m76 mass low_M 0. 0. @low_m77 mass low_M 0. 0. @low_m78 mass low_M 0. 0. @low_m79 mass low_M 0. 0. @low_m80 mass low_M 0. 0. @low_m81 mass low_M 0. 0. @low_m82 mass low_M 0. 0. @low_m83 mass low_M 0. 0. @low_m84 mass low_M 0. 0. @low_m85 mass low_M 0. 0. @low_m86 mass low_M 0. 0. @low_m87 mass low_M 0. 0. @low_m88 mass low_M 0. 0. @low_m89 mass low_M 0. 0. @low_m90 mass low_M 0. 0. @low_m91 mass low_M 0. 0. @low_m92 mass low_M 0. 0. @low_m93 mass low_M 0. 0. @low_m94 mass low_M 0. 0. @low_m95 mass low_M 0. 0. @low_m96 mass low_M 0. 0. @low_m97 mass low_M 0. 0. @low_m98 mass low_M 0. 0. @low_m99 mass low_M 0. 0. @low_m100 mass low_M 0. 0. @low_m101 mass low_M 0. 0. @low_m102 mass low_M 0. 0. @low_m103 mass low_M 0. 0. @low_m104 mass low_M 0. 0. @low_m105 mass low_M 0. 0. @low_m106 mass low_M 0. 0. @low_m107 mass low_M 0. 0. @low_m108 mass low_M 0. 0. @low_m109 mass low_M 0. 0. @low_m110 mass low_M 0. 0. @low_m111 mass low_M 0. 0. @low_m112 mass low_M 0. 0. @low_m113 mass low_M 0. 0. @low_m114 mass low_M 0. 0. @low_m115 mass low_M 0. 0. @low_m116 mass low_M 0. 0. @low_m117 mass low_M 0. 0. @low_m118 mass low_M 0. 0. @low_m119 mass low_M 0. 0. @low_m120 mass low_M 0. 0. @low_m121 mass low_M 0. 0. @low_m122 mass low_M 0. 0. @low_m123 mass low_M 0. 0. @low_m124 mass low_M 0. 0. @low_m125 mass low_M 0. 0. @low_m126 mass low_M 0. 0. @low_m127 mass low_M 0. 0. @low_m128 mass low_M 0. 0. @low_m129 mass low_M 0. 0. @low_m130 mass low_M 0. 0. @low_m131 mass low_M 0. 0. @low_m132 mass low_M 0. 0. @low_m133 mass low_M 0. 0. @low_m134 mass low_M 0. 0. @low_m135 mass low_M 0. 0. @low_m136 mass low_M 0. 0. @low_m137 mass low_M 0. 0. @low_m138 mass low_M 0. 0. @low_m139 mass low_M 0. 0. @low_m140 mass low_M 0. 0. @low_m141 mass low_M 0. 0. @low_m142 mass low_M 0. 0. @low_m143 mass low_M 0. 0. @low_m144 mass low_M 0. 0. @low_m145 mass low_M 0. 0. @low_m146 mass low_M 0. 0. @low_m147 mass low_M 0. 0. @low_m148 mass low_M 0. 0. @low_m149 mass low_M 0. 0. @low_s1 ground 0. @low_r0 springDamper @low_s0 @low_m0 low_K low_Z @low_r1 springDamper @low_m0 @low_m1 low_K low_Z @low_r2 springDamper @low_m1 @low_m2 low_K low_Z @low_r3 springDamper @low_m2 @low_m3 low_K low_Z @low_r4 springDamper @low_m3 @low_m4 low_K low_Z @low_r5 springDamper @low_m4 @low_m5 low_K low_Z @low_r6 springDamper @low_m5 @low_m6 low_K low_Z @low_r7 springDamper @low_m6 @low_m7 low_K low_Z @low_r8 springDamper @low_m7 @low_m8 low_K low_Z @low_r9 springDamper @low_m8 @low_m9 low_K low_Z @low_r10 springDamper @low_m9 @low_m10 low_K low_Z @low_r11 springDamper @low_m10 @low_m11 low_K low_Z @low_r12 springDamper @low_m11 @low_m12 low_K low_Z @low_r13 springDamper @low_m12 @low_m13 low_K low_Z @low_r14 springDamper @low_m13 @low_m14 low_K low_Z @low_r15 springDamper @low_m14 @low_m15 low_K low_Z @low_r16 springDamper @low_m15 @low_m16 low_K low_Z @low_r17 springDamper @low_m16 @low_m17 low_K low_Z @low_r18 springDamper @low_m17 @low_m18 low_K low_Z @low_r19 springDamper @low_m18 @low_m19 low_K low_Z @low_r20 springDamper @low_m19 @low_m20 low_K low_Z @low_r21 springDamper @low_m20 @low_m21 low_K low_Z @low_r22 springDamper @low_m21 @low_m22 low_K low_Z @low_r23 springDamper @low_m22 @low_m23 low_K low_Z @low_r24 springDamper @low_m23 @low_m24 low_K low_Z @low_r25 springDamper @low_m24 @low_m25 low_K low_Z @low_r26 springDamper @low_m25 @low_m26 low_K low_Z @low_r27 springDamper @low_m26 @low_m27 low_K low_Z @low_r28 springDamper @low_m27 @low_m28 low_K low_Z @low_r29 springDamper @low_m28 @low_m29 low_K low_Z @low_r30 springDamper @low_m29 @low_m30 low_K low_Z @low_r31 springDamper @low_m30 @low_m31 low_K low_Z @low_r32 springDamper @low_m31 @low_m32 low_K low_Z @low_r33 springDamper @low_m32 @low_m33 low_K low_Z @low_r34 springDamper @low_m33 @low_m34 low_K low_Z @low_r35 springDamper @low_m34 @low_m35 low_K low_Z @low_r36 springDamper @low_m35 @low_m36 low_K low_Z @low_r37 springDamper @low_m36 @low_m37 low_K low_Z @low_r38 springDamper @low_m37 @low_m38 low_K low_Z @low_r39 springDamper @low_m38 @low_m39 low_K low_Z @low_r40 springDamper @low_m39 @low_m40 low_K low_Z @low_r41 springDamper @low_m40 @low_m41 low_K low_Z @low_r42 springDamper @low_m41 @low_m42 low_K low_Z @low_r43 springDamper @low_m42 @low_m43 low_K low_Z @low_r44 springDamper @low_m43 @low_m44 low_K low_Z @low_r45 springDamper @low_m44 @low_m45 low_K low_Z @low_r46 springDamper @low_m45 @low_m46 low_K low_Z @low_r47 springDamper @low_m46 @low_m47 low_K low_Z @low_r48 springDamper @low_m47 @low_m48 low_K low_Z @low_r49 springDamper @low_m48 @low_m49 low_K low_Z @low_r50 springDamper @low_m49 @low_m50 low_K low_Z @low_r51 springDamper @low_m50 @low_m51 low_K low_Z @low_r52 springDamper @low_m51 @low_m52 low_K low_Z @low_r53 springDamper @low_m52 @low_m53 low_K low_Z @low_r54 springDamper @low_m53 @low_m54 low_K low_Z @low_r55 springDamper @low_m54 @low_m55 low_K low_Z @low_r56 springDamper @low_m55 @low_m56 low_K low_Z @low_r57 springDamper @low_m56 @low_m57 low_K low_Z @low_r58 springDamper @low_m57 @low_m58 low_K low_Z @low_r59 springDamper @low_m58 @low_m59 low_K low_Z @low_r60 springDamper @low_m59 @low_m60 low_K low_Z @low_r61 springDamper @low_m60 @low_m61 low_K low_Z @low_r62 springDamper @low_m61 @low_m62 low_K low_Z @low_r63 springDamper @low_m62 @low_m63 low_K low_Z @low_r64 springDamper @low_m63 @low_m64 low_K low_Z @low_r65 springDamper @low_m64 @low_m65 low_K low_Z @low_r66 springDamper @low_m65 @low_m66 low_K low_Z @low_r67 springDamper @low_m66 @low_m67 low_K low_Z @low_r68 springDamper @low_m67 @low_m68 low_K low_Z @low_r69 springDamper @low_m68 @low_m69 low_K low_Z @low_r70 springDamper @low_m69 @low_m70 low_K low_Z @low_r71 springDamper @low_m70 @low_m71 low_K low_Z @low_r72 springDamper @low_m71 @low_m72 low_K low_Z @low_r73 springDamper @low_m72 @low_m73 low_K low_Z @low_r74 springDamper @low_m73 @low_m74 low_K low_Z @low_r75 springDamper @low_m74 @low_m75 low_K low_Z @low_r76 springDamper @low_m75 @low_m76 low_K low_Z @low_r77 springDamper @low_m76 @low_m77 low_K low_Z @low_r78 springDamper @low_m77 @low_m78 low_K low_Z @low_r79 springDamper @low_m78 @low_m79 low_K low_Z @low_r80 springDamper @low_m79 @low_m80 low_K low_Z @low_r81 springDamper @low_m80 @low_m81 low_K low_Z @low_r82 springDamper @low_m81 @low_m82 low_K low_Z @low_r83 springDamper @low_m82 @low_m83 low_K low_Z @low_r84 springDamper @low_m83 @low_m84 low_K low_Z @low_r85 springDamper @low_m84 @low_m85 low_K low_Z @low_r86 springDamper @low_m85 @low_m86 low_K low_Z @low_r87 springDamper @low_m86 @low_m87 low_K low_Z @low_r88 springDamper @low_m87 @low_m88 low_K low_Z @low_r89 springDamper @low_m88 @low_m89 low_K low_Z @low_r90 springDamper @low_m89 @low_m90 low_K low_Z @low_r91 springDamper @low_m90 @low_m91 low_K low_Z @low_r92 springDamper @low_m91 @low_m92 low_K low_Z @low_r93 springDamper @low_m92 @low_m93 low_K low_Z @low_r94 springDamper @low_m93 @low_m94 low_K low_Z @low_r95 springDamper @low_m94 @low_m95 low_K low_Z @low_r96 springDamper @low_m95 @low_m96 low_K low_Z @low_r97 springDamper @low_m96 @low_m97 low_K low_Z @low_r98 springDamper @low_m97 @low_m98 low_K low_Z @low_r99 springDamper @low_m98 @low_m99 low_K low_Z @low_r100 springDamper @low_m99 @low_m100 low_K low_Z @low_r101 springDamper @low_m100 @low_m101 low_K low_Z @low_r102 springDamper @low_m101 @low_m102 low_K low_Z @low_r103 springDamper @low_m102 @low_m103 low_K low_Z @low_r104 springDamper @low_m103 @low_m104 low_K low_Z @low_r105 springDamper @low_m104 @low_m105 low_K low_Z @low_r106 springDamper @low_m105 @low_m106 low_K low_Z @low_r107 springDamper @low_m106 @low_m107 low_K low_Z @low_r108 springDamper @low_m107 @low_m108 low_K low_Z @low_r109 springDamper @low_m108 @low_m109 low_K low_Z @low_r110 springDamper @low_m109 @low_m110 low_K low_Z @low_r111 springDamper @low_m110 @low_m111 low_K low_Z @low_r112 springDamper @low_m111 @low_m112 low_K low_Z @low_r113 springDamper @low_m112 @low_m113 low_K low_Z @low_r114 springDamper @low_m113 @low_m114 low_K low_Z @low_r115 springDamper @low_m114 @low_m115 low_K low_Z @low_r116 springDamper @low_m115 @low_m116 low_K low_Z @low_r117 springDamper @low_m116 @low_m117 low_K low_Z @low_r118 springDamper @low_m117 @low_m118 low_K low_Z @low_r119 springDamper @low_m118 @low_m119 low_K low_Z @low_r120 springDamper @low_m119 @low_m120 low_K low_Z @low_r121 springDamper @low_m120 @low_m121 low_K low_Z @low_r122 springDamper @low_m121 @low_m122 low_K low_Z @low_r123 springDamper @low_m122 @low_m123 low_K low_Z @low_r124 springDamper @low_m123 @low_m124 low_K low_Z @low_r125 springDamper @low_m124 @low_m125 low_K low_Z @low_r126 springDamper @low_m125 @low_m126 low_K low_Z @low_r127 springDamper @low_m126 @low_m127 low_K low_Z @low_r128 springDamper @low_m127 @low_m128 low_K low_Z @low_r129 springDamper @low_m128 @low_m129 low_K low_Z @low_r130 springDamper @low_m129 @low_m130 low_K low_Z @low_r131 springDamper @low_m130 @low_m131 low_K low_Z @low_r132 springDamper @low_m131 @low_m132 low_K low_Z @low_r133 springDamper @low_m132 @low_m133 low_K low_Z @low_r134 springDamper @low_m133 @low_m134 low_K low_Z @low_r135 springDamper @low_m134 @low_m135 low_K low_Z @low_r136 springDamper @low_m135 @low_m136 low_K low_Z @low_r137 springDamper @low_m136 @low_m137 low_K low_Z @low_r138 springDamper @low_m137 @low_m138 low_K low_Z @low_r139 springDamper @low_m138 @low_m139 low_K low_Z @low_r140 springDamper @low_m139 @low_m140 low_K low_Z @low_r141 springDamper @low_m140 @low_m141 low_K low_Z @low_r142 springDamper @low_m141 @low_m142 low_K low_Z @low_r143 springDamper @low_m142 @low_m143 low_K low_Z @low_r144 springDamper @low_m143 @low_m144 low_K low_Z @low_r145 springDamper @low_m144 @low_m145 low_K low_Z @low_r146 springDamper @low_m145 @low_m146 low_K low_Z @low_r147 springDamper @low_m146 @low_m147 low_K low_Z @low_r148 springDamper @low_m147 @low_m148 low_K low_Z @low_r149 springDamper @low_m148 @low_m149 low_K low_Z @low_r150 springDamper @low_m149 @low_s1 low_K low_Z @in1 posInput 1. @out1 posOutput @low_m30 @out2 posOutput @low_m40 @nlb0 nlBow @in1 @low_m143 nlZ nlscale */
https://raw.githubusercontent.com/madskjeldgaard/mkfaustplugins/fd7cf250788174b5efa6ae3294997609830875d1/plugins/BowedString/BowedString.dsp
faust
========= DESCRITPION ============= A simple bowed string model - inputs: bow position (move it slowly to yield self-sustained oscillations!). - outputs: two listening points on the string. - controls: bow pressure and string stiffness. nice and smooth position signal routed positions outputs routed forces pass-through ========= MIMS SCRIPT USED FOR MODEL GENERATION ============= @low_M param 1.0 @low_K param 0.3 @low_Z param 0.001 @nlZ param 0.08 @nlscale param 0.00005 @low_s0 ground 0. @low_m0 mass low_M 0. 0. @low_m1 mass low_M 0. 0. @low_m2 mass low_M 0. 0. @low_m3 mass low_M 0. 0. @low_m4 mass low_M 0. 0. @low_m5 mass low_M 0. 0. @low_m6 mass low_M 0. 0. @low_m7 mass low_M 0. 0. @low_m8 mass low_M 0. 0. @low_m9 mass low_M 0. 0. @low_m10 mass low_M 0. 0. @low_m11 mass low_M 0. 0. @low_m12 mass low_M 0. 0. @low_m13 mass low_M 0. 0. @low_m14 mass low_M 0. 0. @low_m15 mass low_M 0. 0. @low_m16 mass low_M 0. 0. @low_m17 mass low_M 0. 0. @low_m18 mass low_M 0. 0. @low_m19 mass low_M 0. 0. @low_m20 mass low_M 0. 0. @low_m21 mass low_M 0. 0. @low_m22 mass low_M 0. 0. @low_m23 mass low_M 0. 0. @low_m24 mass low_M 0. 0. @low_m25 mass low_M 0. 0. @low_m26 mass low_M 0. 0. @low_m27 mass low_M 0. 0. @low_m28 mass low_M 0. 0. @low_m29 mass low_M 0. 0. @low_m30 mass low_M 0. 0. @low_m31 mass low_M 0. 0. @low_m32 mass low_M 0. 0. @low_m33 mass low_M 0. 0. @low_m34 mass low_M 0. 0. @low_m35 mass low_M 0. 0. @low_m36 mass low_M 0. 0. @low_m37 mass low_M 0. 0. @low_m38 mass low_M 0. 0. @low_m39 mass low_M 0. 0. @low_m40 mass low_M 0. 0. @low_m41 mass low_M 0. 0. @low_m42 mass low_M 0. 0. @low_m43 mass low_M 0. 0. @low_m44 mass low_M 0. 0. @low_m45 mass low_M 0. 0. @low_m46 mass low_M 0. 0. @low_m47 mass low_M 0. 0. @low_m48 mass low_M 0. 0. @low_m49 mass low_M 0. 0. @low_m50 mass low_M 0. 0. @low_m51 mass low_M 0. 0. @low_m52 mass low_M 0. 0. @low_m53 mass low_M 0. 0. @low_m54 mass low_M 0. 0. @low_m55 mass low_M 0. 0. @low_m56 mass low_M 0. 0. @low_m57 mass low_M 0. 0. @low_m58 mass low_M 0. 0. @low_m59 mass low_M 0. 0. @low_m60 mass low_M 0. 0. @low_m61 mass low_M 0. 0. @low_m62 mass low_M 0. 0. @low_m63 mass low_M 0. 0. @low_m64 mass low_M 0. 0. @low_m65 mass low_M 0. 0. @low_m66 mass low_M 0. 0. @low_m67 mass low_M 0. 0. @low_m68 mass low_M 0. 0. @low_m69 mass low_M 0. 0. @low_m70 mass low_M 0. 0. @low_m71 mass low_M 0. 0. @low_m72 mass low_M 0. 0. @low_m73 mass low_M 0. 0. @low_m74 mass low_M 0. 0. @low_m75 mass low_M 0. 0. @low_m76 mass low_M 0. 0. @low_m77 mass low_M 0. 0. @low_m78 mass low_M 0. 0. @low_m79 mass low_M 0. 0. @low_m80 mass low_M 0. 0. @low_m81 mass low_M 0. 0. @low_m82 mass low_M 0. 0. @low_m83 mass low_M 0. 0. @low_m84 mass low_M 0. 0. @low_m85 mass low_M 0. 0. @low_m86 mass low_M 0. 0. @low_m87 mass low_M 0. 0. @low_m88 mass low_M 0. 0. @low_m89 mass low_M 0. 0. @low_m90 mass low_M 0. 0. @low_m91 mass low_M 0. 0. @low_m92 mass low_M 0. 0. @low_m93 mass low_M 0. 0. @low_m94 mass low_M 0. 0. @low_m95 mass low_M 0. 0. @low_m96 mass low_M 0. 0. @low_m97 mass low_M 0. 0. @low_m98 mass low_M 0. 0. @low_m99 mass low_M 0. 0. @low_m100 mass low_M 0. 0. @low_m101 mass low_M 0. 0. @low_m102 mass low_M 0. 0. @low_m103 mass low_M 0. 0. @low_m104 mass low_M 0. 0. @low_m105 mass low_M 0. 0. @low_m106 mass low_M 0. 0. @low_m107 mass low_M 0. 0. @low_m108 mass low_M 0. 0. @low_m109 mass low_M 0. 0. @low_m110 mass low_M 0. 0. @low_m111 mass low_M 0. 0. @low_m112 mass low_M 0. 0. @low_m113 mass low_M 0. 0. @low_m114 mass low_M 0. 0. @low_m115 mass low_M 0. 0. @low_m116 mass low_M 0. 0. @low_m117 mass low_M 0. 0. @low_m118 mass low_M 0. 0. @low_m119 mass low_M 0. 0. @low_m120 mass low_M 0. 0. @low_m121 mass low_M 0. 0. @low_m122 mass low_M 0. 0. @low_m123 mass low_M 0. 0. @low_m124 mass low_M 0. 0. @low_m125 mass low_M 0. 0. @low_m126 mass low_M 0. 0. @low_m127 mass low_M 0. 0. @low_m128 mass low_M 0. 0. @low_m129 mass low_M 0. 0. @low_m130 mass low_M 0. 0. @low_m131 mass low_M 0. 0. @low_m132 mass low_M 0. 0. @low_m133 mass low_M 0. 0. @low_m134 mass low_M 0. 0. @low_m135 mass low_M 0. 0. @low_m136 mass low_M 0. 0. @low_m137 mass low_M 0. 0. @low_m138 mass low_M 0. 0. @low_m139 mass low_M 0. 0. @low_m140 mass low_M 0. 0. @low_m141 mass low_M 0. 0. @low_m142 mass low_M 0. 0. @low_m143 mass low_M 0. 0. @low_m144 mass low_M 0. 0. @low_m145 mass low_M 0. 0. @low_m146 mass low_M 0. 0. @low_m147 mass low_M 0. 0. @low_m148 mass low_M 0. 0. @low_m149 mass low_M 0. 0. @low_s1 ground 0. @low_r0 springDamper @low_s0 @low_m0 low_K low_Z @low_r1 springDamper @low_m0 @low_m1 low_K low_Z @low_r2 springDamper @low_m1 @low_m2 low_K low_Z @low_r3 springDamper @low_m2 @low_m3 low_K low_Z @low_r4 springDamper @low_m3 @low_m4 low_K low_Z @low_r5 springDamper @low_m4 @low_m5 low_K low_Z @low_r6 springDamper @low_m5 @low_m6 low_K low_Z @low_r7 springDamper @low_m6 @low_m7 low_K low_Z @low_r8 springDamper @low_m7 @low_m8 low_K low_Z @low_r9 springDamper @low_m8 @low_m9 low_K low_Z @low_r10 springDamper @low_m9 @low_m10 low_K low_Z @low_r11 springDamper @low_m10 @low_m11 low_K low_Z @low_r12 springDamper @low_m11 @low_m12 low_K low_Z @low_r13 springDamper @low_m12 @low_m13 low_K low_Z @low_r14 springDamper @low_m13 @low_m14 low_K low_Z @low_r15 springDamper @low_m14 @low_m15 low_K low_Z @low_r16 springDamper @low_m15 @low_m16 low_K low_Z @low_r17 springDamper @low_m16 @low_m17 low_K low_Z @low_r18 springDamper @low_m17 @low_m18 low_K low_Z @low_r19 springDamper @low_m18 @low_m19 low_K low_Z @low_r20 springDamper @low_m19 @low_m20 low_K low_Z @low_r21 springDamper @low_m20 @low_m21 low_K low_Z @low_r22 springDamper @low_m21 @low_m22 low_K low_Z @low_r23 springDamper @low_m22 @low_m23 low_K low_Z @low_r24 springDamper @low_m23 @low_m24 low_K low_Z @low_r25 springDamper @low_m24 @low_m25 low_K low_Z @low_r26 springDamper @low_m25 @low_m26 low_K low_Z @low_r27 springDamper @low_m26 @low_m27 low_K low_Z @low_r28 springDamper @low_m27 @low_m28 low_K low_Z @low_r29 springDamper @low_m28 @low_m29 low_K low_Z @low_r30 springDamper @low_m29 @low_m30 low_K low_Z @low_r31 springDamper @low_m30 @low_m31 low_K low_Z @low_r32 springDamper @low_m31 @low_m32 low_K low_Z @low_r33 springDamper @low_m32 @low_m33 low_K low_Z @low_r34 springDamper @low_m33 @low_m34 low_K low_Z @low_r35 springDamper @low_m34 @low_m35 low_K low_Z @low_r36 springDamper @low_m35 @low_m36 low_K low_Z @low_r37 springDamper @low_m36 @low_m37 low_K low_Z @low_r38 springDamper @low_m37 @low_m38 low_K low_Z @low_r39 springDamper @low_m38 @low_m39 low_K low_Z @low_r40 springDamper @low_m39 @low_m40 low_K low_Z @low_r41 springDamper @low_m40 @low_m41 low_K low_Z @low_r42 springDamper @low_m41 @low_m42 low_K low_Z @low_r43 springDamper @low_m42 @low_m43 low_K low_Z @low_r44 springDamper @low_m43 @low_m44 low_K low_Z @low_r45 springDamper @low_m44 @low_m45 low_K low_Z @low_r46 springDamper @low_m45 @low_m46 low_K low_Z @low_r47 springDamper @low_m46 @low_m47 low_K low_Z @low_r48 springDamper @low_m47 @low_m48 low_K low_Z @low_r49 springDamper @low_m48 @low_m49 low_K low_Z @low_r50 springDamper @low_m49 @low_m50 low_K low_Z @low_r51 springDamper @low_m50 @low_m51 low_K low_Z @low_r52 springDamper @low_m51 @low_m52 low_K low_Z @low_r53 springDamper @low_m52 @low_m53 low_K low_Z @low_r54 springDamper @low_m53 @low_m54 low_K low_Z @low_r55 springDamper @low_m54 @low_m55 low_K low_Z @low_r56 springDamper @low_m55 @low_m56 low_K low_Z @low_r57 springDamper @low_m56 @low_m57 low_K low_Z @low_r58 springDamper @low_m57 @low_m58 low_K low_Z @low_r59 springDamper @low_m58 @low_m59 low_K low_Z @low_r60 springDamper @low_m59 @low_m60 low_K low_Z @low_r61 springDamper @low_m60 @low_m61 low_K low_Z @low_r62 springDamper @low_m61 @low_m62 low_K low_Z @low_r63 springDamper @low_m62 @low_m63 low_K low_Z @low_r64 springDamper @low_m63 @low_m64 low_K low_Z @low_r65 springDamper @low_m64 @low_m65 low_K low_Z @low_r66 springDamper @low_m65 @low_m66 low_K low_Z @low_r67 springDamper @low_m66 @low_m67 low_K low_Z @low_r68 springDamper @low_m67 @low_m68 low_K low_Z @low_r69 springDamper @low_m68 @low_m69 low_K low_Z @low_r70 springDamper @low_m69 @low_m70 low_K low_Z @low_r71 springDamper @low_m70 @low_m71 low_K low_Z @low_r72 springDamper @low_m71 @low_m72 low_K low_Z @low_r73 springDamper @low_m72 @low_m73 low_K low_Z @low_r74 springDamper @low_m73 @low_m74 low_K low_Z @low_r75 springDamper @low_m74 @low_m75 low_K low_Z @low_r76 springDamper @low_m75 @low_m76 low_K low_Z @low_r77 springDamper @low_m76 @low_m77 low_K low_Z @low_r78 springDamper @low_m77 @low_m78 low_K low_Z @low_r79 springDamper @low_m78 @low_m79 low_K low_Z @low_r80 springDamper @low_m79 @low_m80 low_K low_Z @low_r81 springDamper @low_m80 @low_m81 low_K low_Z @low_r82 springDamper @low_m81 @low_m82 low_K low_Z @low_r83 springDamper @low_m82 @low_m83 low_K low_Z @low_r84 springDamper @low_m83 @low_m84 low_K low_Z @low_r85 springDamper @low_m84 @low_m85 low_K low_Z @low_r86 springDamper @low_m85 @low_m86 low_K low_Z @low_r87 springDamper @low_m86 @low_m87 low_K low_Z @low_r88 springDamper @low_m87 @low_m88 low_K low_Z @low_r89 springDamper @low_m88 @low_m89 low_K low_Z @low_r90 springDamper @low_m89 @low_m90 low_K low_Z @low_r91 springDamper @low_m90 @low_m91 low_K low_Z @low_r92 springDamper @low_m91 @low_m92 low_K low_Z @low_r93 springDamper @low_m92 @low_m93 low_K low_Z @low_r94 springDamper @low_m93 @low_m94 low_K low_Z @low_r95 springDamper @low_m94 @low_m95 low_K low_Z @low_r96 springDamper @low_m95 @low_m96 low_K low_Z @low_r97 springDamper @low_m96 @low_m97 low_K low_Z @low_r98 springDamper @low_m97 @low_m98 low_K low_Z @low_r99 springDamper @low_m98 @low_m99 low_K low_Z @low_r100 springDamper @low_m99 @low_m100 low_K low_Z @low_r101 springDamper @low_m100 @low_m101 low_K low_Z @low_r102 springDamper @low_m101 @low_m102 low_K low_Z @low_r103 springDamper @low_m102 @low_m103 low_K low_Z @low_r104 springDamper @low_m103 @low_m104 low_K low_Z @low_r105 springDamper @low_m104 @low_m105 low_K low_Z @low_r106 springDamper @low_m105 @low_m106 low_K low_Z @low_r107 springDamper @low_m106 @low_m107 low_K low_Z @low_r108 springDamper @low_m107 @low_m108 low_K low_Z @low_r109 springDamper @low_m108 @low_m109 low_K low_Z @low_r110 springDamper @low_m109 @low_m110 low_K low_Z @low_r111 springDamper @low_m110 @low_m111 low_K low_Z @low_r112 springDamper @low_m111 @low_m112 low_K low_Z @low_r113 springDamper @low_m112 @low_m113 low_K low_Z @low_r114 springDamper @low_m113 @low_m114 low_K low_Z @low_r115 springDamper @low_m114 @low_m115 low_K low_Z @low_r116 springDamper @low_m115 @low_m116 low_K low_Z @low_r117 springDamper @low_m116 @low_m117 low_K low_Z @low_r118 springDamper @low_m117 @low_m118 low_K low_Z @low_r119 springDamper @low_m118 @low_m119 low_K low_Z @low_r120 springDamper @low_m119 @low_m120 low_K low_Z @low_r121 springDamper @low_m120 @low_m121 low_K low_Z @low_r122 springDamper @low_m121 @low_m122 low_K low_Z @low_r123 springDamper @low_m122 @low_m123 low_K low_Z @low_r124 springDamper @low_m123 @low_m124 low_K low_Z @low_r125 springDamper @low_m124 @low_m125 low_K low_Z @low_r126 springDamper @low_m125 @low_m126 low_K low_Z @low_r127 springDamper @low_m126 @low_m127 low_K low_Z @low_r128 springDamper @low_m127 @low_m128 low_K low_Z @low_r129 springDamper @low_m128 @low_m129 low_K low_Z @low_r130 springDamper @low_m129 @low_m130 low_K low_Z @low_r131 springDamper @low_m130 @low_m131 low_K low_Z @low_r132 springDamper @low_m131 @low_m132 low_K low_Z @low_r133 springDamper @low_m132 @low_m133 low_K low_Z @low_r134 springDamper @low_m133 @low_m134 low_K low_Z @low_r135 springDamper @low_m134 @low_m135 low_K low_Z @low_r136 springDamper @low_m135 @low_m136 low_K low_Z @low_r137 springDamper @low_m136 @low_m137 low_K low_Z @low_r138 springDamper @low_m137 @low_m138 low_K low_Z @low_r139 springDamper @low_m138 @low_m139 low_K low_Z @low_r140 springDamper @low_m139 @low_m140 low_K low_Z @low_r141 springDamper @low_m140 @low_m141 low_K low_Z @low_r142 springDamper @low_m141 @low_m142 low_K low_Z @low_r143 springDamper @low_m142 @low_m143 low_K low_Z @low_r144 springDamper @low_m143 @low_m144 low_K low_Z @low_r145 springDamper @low_m144 @low_m145 low_K low_Z @low_r146 springDamper @low_m145 @low_m146 low_K low_Z @low_r147 springDamper @low_m146 @low_m147 low_K low_Z @low_r148 springDamper @low_m147 @low_m148 low_K low_Z @low_r149 springDamper @low_m148 @low_m149 low_K low_Z @low_r150 springDamper @low_m149 @low_s1 low_K low_Z @in1 posInput 1. @out1 posOutput @low_m30 @out2 posOutput @low_m40 @nlb0 nlBow @in1 @low_m143 nlZ nlscale
declare name "BowedString"; declare author "James Leonard"; declare date "April 2020"; import("stdfaust.lib"); OutGain = 150.; low_M = 1.0; low_K = hslider("String Stiffness",0.3,0.001,0.7,0.0001) : si.smoo; low_Z = 0.001; nlZ = hslider("Bow Pressure",0.3,0.001,0.5,0.0001) : si.smoo; nlscale = 0.0005; model = ( mi.ground(0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.mass(low_M, 0, 0., 0.), mi.ground(0.), mi.posInput(1.): RoutingMassToLink : mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.springDamper(low_K, low_Z, 0., 0.), mi.nlBow(nlZ, nlscale, 0, 1., 0.), par(i, nbOut, _): RoutingLinkToMass )~par(i, nbMass, _): par(i, nbMass, !), par(i, nbOut , _) with{ nbMass = 153; nbOut = 2; }; process = in1 : model:*(OutGain), *(OutGain);
846ca6b1b9ad1a546566e02df3c69dc0de538b84c7730e047af622db2fe63d1a
madskjeldgaard/mkfaustplugins
PluckedString.dsp
declare name "PluckedString"; declare author "James Leonard"; declare date "April 2020"; /* ========= DESCRITPION ============= A plucked string with a few controls. - inputs: pick position. - outputs: two listening points on the string. - controls: pick stiffness and damping, string stiffness, damping and air friction. Note: the model block diagram is starting to look like a piece of modern art. */ import("stdfaust.lib"); in1 = _:si.smoo; OutGain = 5; str_M = 1.0; str_K = hslider("stiffness", 0.7, 0.001, 0.7, 0.001):si.smoo; str_Z = hslider("damping", 0.0009, 0.00, 0.01, 0.00001):si.smoo; str_Zo = hslider("friction", 0.00005, 0.00, 0.0002, 0.00001):si.smoo; nlK = hslider("pickstiffness", 0.5, 0., 0.8, 0.001); nlscale = 0.05; pZ = hslider("pickdamping", 0.04, 0., 0.1, 0.001); model = ( mi.ground(0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.ground(0.), mi.posInput(0.): RoutingMassToLink : mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.nlPluck(nlK, nlscale, pZ, 0., 0.), par(i, nbOut, _): RoutingLinkToMass )~par(i, nbMass, _): par(i, nbMass, !), par(i, nbOut , _) with{ RoutingMassToLink(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29, m30, m31, m32, m33, m34, m35, m36, m37, m38, m39, m40, m41, m42, m43, m44, m45, m46, m47, m48, m49, m50, m51, m52, m53, m54, m55, m56, m57, m58, m59, m60, m61, m62, m63, m64, m65, m66, m67, m68, m69, m70, m71, m72, m73, m74, m75, m76, m77, m78, m79, m80, m81, m82, m83, m84, m85, m86, m87, m88, m89, m90, m91, m92, m93, m94, m95, m96, m97, m98, m99, m100, m101, m102, m103, m104, m105, m106, m107, m108, m109, m110, m111, m112, m113, m114, m115, m116, m117, m118, m119, m120, m121, m122, m123, m124, m125, m126, m127, m128, m129, m130, m131, m132, m133, m134, m135, m136, m137, m138, m139, m140, m141, m142, m143, m144, m145, m146, m147, m148, m149, m150, m151, m152) = /* routed positions */ m0, m1, m1, m2, m2, m3, m3, m4, m4, m5, m5, m6, m6, m7, m7, m8, m8, m9, m9, m10, m10, m11, m11, m12, m12, m13, m13, m14, m14, m15, m15, m16, m16, m17, m17, m18, m18, m19, m19, m20, m20, m21, m21, m22, m22, m23, m23, m24, m24, m25, m25, m26, m26, m27, m27, m28, m28, m29, m29, m30, m30, m31, m31, m32, m32, m33, m33, m34, m34, m35, m35, m36, m36, m37, m37, m38, m38, m39, m39, m40, m40, m41, m41, m42, m42, m43, m43, m44, m44, m45, m45, m46, m46, m47, m47, m48, m48, m49, m49, m50, m50, m51, m51, m52, m52, m53, m53, m54, m54, m55, m55, m56, m56, m57, m57, m58, m58, m59, m59, m60, m60, m61, m61, m62, m62, m63, m63, m64, m64, m65, m65, m66, m66, m67, m67, m68, m68, m69, m69, m70, m70, m71, m71, m72, m72, m73, m73, m74, m74, m75, m75, m76, m76, m77, m77, m78, m78, m79, m79, m80, m80, m81, m81, m82, m82, m83, m83, m84, m84, m85, m85, m86, m86, m87, m87, m88, m88, m89, m89, m90, m90, m91, m91, m92, m92, m93, m93, m94, m94, m95, m95, m96, m96, m97, m97, m98, m98, m99, m99, m100, m100, m101, m101, m102, m102, m103, m103, m104, m104, m105, m105, m106, m106, m107, m107, m108, m108, m109, m109, m110, m110, m111, m111, m112, m112, m113, m113, m114, m114, m115, m115, m116, m116, m117, m117, m118, m118, m119, m119, m120, m120, m121, m121, m122, m122, m123, m123, m124, m124, m125, m125, m126, m126, m127, m127, m128, m128, m129, m129, m130, m130, m131, m131, m132, m132, m133, m133, m134, m134, m135, m135, m136, m136, m137, m137, m138, m138, m139, m139, m140, m140, m141, m141, m142, m142, m143, m143, m144, m144, m145, m145, m146, m146, m147, m147, m148, m148, m149, m149, m150, m150, m151, m152, m141, /* outputs */ m21, m11; RoutingLinkToMass(l0_f1, l0_f2, l1_f1, l1_f2, l2_f1, l2_f2, l3_f1, l3_f2, l4_f1, l4_f2, l5_f1, l5_f2, l6_f1, l6_f2, l7_f1, l7_f2, l8_f1, l8_f2, l9_f1, l9_f2, l10_f1, l10_f2, l11_f1, l11_f2, l12_f1, l12_f2, l13_f1, l13_f2, l14_f1, l14_f2, l15_f1, l15_f2, l16_f1, l16_f2, l17_f1, l17_f2, l18_f1, l18_f2, l19_f1, l19_f2, l20_f1, l20_f2, l21_f1, l21_f2, l22_f1, l22_f2, l23_f1, l23_f2, l24_f1, l24_f2, l25_f1, l25_f2, l26_f1, l26_f2, l27_f1, l27_f2, l28_f1, l28_f2, l29_f1, l29_f2, l30_f1, l30_f2, l31_f1, l31_f2, l32_f1, l32_f2, l33_f1, l33_f2, l34_f1, l34_f2, l35_f1, l35_f2, l36_f1, l36_f2, l37_f1, l37_f2, l38_f1, l38_f2, l39_f1, l39_f2, l40_f1, l40_f2, l41_f1, l41_f2, l42_f1, l42_f2, l43_f1, l43_f2, l44_f1, l44_f2, l45_f1, l45_f2, l46_f1, l46_f2, l47_f1, l47_f2, l48_f1, l48_f2, l49_f1, l49_f2, l50_f1, l50_f2, l51_f1, l51_f2, l52_f1, l52_f2, l53_f1, l53_f2, l54_f1, l54_f2, l55_f1, l55_f2, l56_f1, l56_f2, l57_f1, l57_f2, l58_f1, l58_f2, l59_f1, l59_f2, l60_f1, l60_f2, l61_f1, l61_f2, l62_f1, l62_f2, l63_f1, l63_f2, l64_f1, l64_f2, l65_f1, l65_f2, l66_f1, l66_f2, l67_f1, l67_f2, l68_f1, l68_f2, l69_f1, l69_f2, l70_f1, l70_f2, l71_f1, l71_f2, l72_f1, l72_f2, l73_f1, l73_f2, l74_f1, l74_f2, l75_f1, l75_f2, l76_f1, l76_f2, l77_f1, l77_f2, l78_f1, l78_f2, l79_f1, l79_f2, l80_f1, l80_f2, l81_f1, l81_f2, l82_f1, l82_f2, l83_f1, l83_f2, l84_f1, l84_f2, l85_f1, l85_f2, l86_f1, l86_f2, l87_f1, l87_f2, l88_f1, l88_f2, l89_f1, l89_f2, l90_f1, l90_f2, l91_f1, l91_f2, l92_f1, l92_f2, l93_f1, l93_f2, l94_f1, l94_f2, l95_f1, l95_f2, l96_f1, l96_f2, l97_f1, l97_f2, l98_f1, l98_f2, l99_f1, l99_f2, l100_f1, l100_f2, l101_f1, l101_f2, l102_f1, l102_f2, l103_f1, l103_f2, l104_f1, l104_f2, l105_f1, l105_f2, l106_f1, l106_f2, l107_f1, l107_f2, l108_f1, l108_f2, l109_f1, l109_f2, l110_f1, l110_f2, l111_f1, l111_f2, l112_f1, l112_f2, l113_f1, l113_f2, l114_f1, l114_f2, l115_f1, l115_f2, l116_f1, l116_f2, l117_f1, l117_f2, l118_f1, l118_f2, l119_f1, l119_f2, l120_f1, l120_f2, l121_f1, l121_f2, l122_f1, l122_f2, l123_f1, l123_f2, l124_f1, l124_f2, l125_f1, l125_f2, l126_f1, l126_f2, l127_f1, l127_f2, l128_f1, l128_f2, l129_f1, l129_f2, l130_f1, l130_f2, l131_f1, l131_f2, l132_f1, l132_f2, l133_f1, l133_f2, l134_f1, l134_f2, l135_f1, l135_f2, l136_f1, l136_f2, l137_f1, l137_f2, l138_f1, l138_f2, l139_f1, l139_f2, l140_f1, l140_f2, l141_f1, l141_f2, l142_f1, l142_f2, l143_f1, l143_f2, l144_f1, l144_f2, l145_f1, l145_f2, l146_f1, l146_f2, l147_f1, l147_f2, l148_f1, l148_f2, l149_f1, l149_f2, l150_f1, l150_f2, l151_f1, l151_f2, p_out1, p_out2) = /* routed forces */ l0_f1, l0_f2 + l1_f1, l1_f2 + l2_f1, l2_f2 + l3_f1, l3_f2 + l4_f1, l4_f2 + l5_f1, l5_f2 + l6_f1, l6_f2 + l7_f1, l7_f2 + l8_f1, l8_f2 + l9_f1, l9_f2 + l10_f1, l10_f2 + l11_f1, l11_f2 + l12_f1, l12_f2 + l13_f1, l13_f2 + l14_f1, l14_f2 + l15_f1, l15_f2 + l16_f1, l16_f2 + l17_f1, l17_f2 + l18_f1, l18_f2 + l19_f1, l19_f2 + l20_f1, l20_f2 + l21_f1, l21_f2 + l22_f1, l22_f2 + l23_f1, l23_f2 + l24_f1, l24_f2 + l25_f1, l25_f2 + l26_f1, l26_f2 + l27_f1, l27_f2 + l28_f1, l28_f2 + l29_f1, l29_f2 + l30_f1, l30_f2 + l31_f1, l31_f2 + l32_f1, l32_f2 + l33_f1, l33_f2 + l34_f1, l34_f2 + l35_f1, l35_f2 + l36_f1, l36_f2 + l37_f1, l37_f2 + l38_f1, l38_f2 + l39_f1, l39_f2 + l40_f1, l40_f2 + l41_f1, l41_f2 + l42_f1, l42_f2 + l43_f1, l43_f2 + l44_f1, l44_f2 + l45_f1, l45_f2 + l46_f1, l46_f2 + l47_f1, l47_f2 + l48_f1, l48_f2 + l49_f1, l49_f2 + l50_f1, l50_f2 + l51_f1, l51_f2 + l52_f1, l52_f2 + l53_f1, l53_f2 + l54_f1, l54_f2 + l55_f1, l55_f2 + l56_f1, l56_f2 + l57_f1, l57_f2 + l58_f1, l58_f2 + l59_f1, l59_f2 + l60_f1, l60_f2 + l61_f1, l61_f2 + l62_f1, l62_f2 + l63_f1, l63_f2 + l64_f1, l64_f2 + l65_f1, l65_f2 + l66_f1, l66_f2 + l67_f1, l67_f2 + l68_f1, l68_f2 + l69_f1, l69_f2 + l70_f1, l70_f2 + l71_f1, l71_f2 + l72_f1, l72_f2 + l73_f1, l73_f2 + l74_f1, l74_f2 + l75_f1, l75_f2 + l76_f1, l76_f2 + l77_f1, l77_f2 + l78_f1, l78_f2 + l79_f1, l79_f2 + l80_f1, l80_f2 + l81_f1, l81_f2 + l82_f1, l82_f2 + l83_f1, l83_f2 + l84_f1, l84_f2 + l85_f1, l85_f2 + l86_f1, l86_f2 + l87_f1, l87_f2 + l88_f1, l88_f2 + l89_f1, l89_f2 + l90_f1, l90_f2 + l91_f1, l91_f2 + l92_f1, l92_f2 + l93_f1, l93_f2 + l94_f1, l94_f2 + l95_f1, l95_f2 + l96_f1, l96_f2 + l97_f1, l97_f2 + l98_f1, l98_f2 + l99_f1, l99_f2 + l100_f1, l100_f2 + l101_f1, l101_f2 + l102_f1, l102_f2 + l103_f1, l103_f2 + l104_f1, l104_f2 + l105_f1, l105_f2 + l106_f1, l106_f2 + l107_f1, l107_f2 + l108_f1, l108_f2 + l109_f1, l109_f2 + l110_f1, l110_f2 + l111_f1, l111_f2 + l112_f1, l112_f2 + l113_f1, l113_f2 + l114_f1, l114_f2 + l115_f1, l115_f2 + l116_f1, l116_f2 + l117_f1, l117_f2 + l118_f1, l118_f2 + l119_f1, l119_f2 + l120_f1, l120_f2 + l121_f1, l121_f2 + l122_f1, l122_f2 + l123_f1, l123_f2 + l124_f1, l124_f2 + l125_f1, l125_f2 + l126_f1, l126_f2 + l127_f1, l127_f2 + l128_f1, l128_f2 + l129_f1, l129_f2 + l130_f1, l130_f2 + l131_f1, l131_f2 + l132_f1, l132_f2 + l133_f1, l133_f2 + l134_f1, l134_f2 + l135_f1, l135_f2 + l136_f1, l136_f2 + l137_f1, l137_f2 + l138_f1, l138_f2 + l139_f1, l139_f2 + l140_f1, l140_f2 + l141_f1 + l151_f2, l141_f2 + l142_f1, l142_f2 + l143_f1, l143_f2 + l144_f1, l144_f2 + l145_f1, l145_f2 + l146_f1, l146_f2 + l147_f1, l147_f2 + l148_f1, l148_f2 + l149_f1, l149_f2 + l150_f1, l150_f2, l151_f1, /* pass-through */ p_out1, p_out2; nbMass = 153; nbOut = 2; }; process = in1 : model:*(OutGain), *(OutGain); /* ========= MIMS SCRIPT USED FOR MODEL GENERATION ============= # Plucked string model # Script author : James Leonard @nlK param 0.8 @nlscale param 0.005 @pZ param 0.001 @str_M param 1 @str_K param 0.5 @str_Z param 0.001 @str_Zo param 0.00005 @str_s0 ground 0. @str_m0 osc str_M 0 str_Zo 0. 0. @str_m1 osc str_M 0 str_Zo 0. 0. @str_m2 osc str_M 0 str_Zo 0. 0. @str_m3 osc str_M 0 str_Zo 0. 0. @str_m4 osc str_M 0 str_Zo 0. 0. @str_m5 osc str_M 0 str_Zo 0. 0. @str_m6 osc str_M 0 str_Zo 0. 0. @str_m7 osc str_M 0 str_Zo 0. 0. @str_m8 osc str_M 0 str_Zo 0. 0. @str_m9 osc str_M 0 str_Zo 0. 0. @str_m10 osc str_M 0 str_Zo 0. 0. @str_m11 osc str_M 0 str_Zo 0. 0. @str_m12 osc str_M 0 str_Zo 0. 0. @str_m13 osc str_M 0 str_Zo 0. 0. @str_m14 osc str_M 0 str_Zo 0. 0. @str_m15 osc str_M 0 str_Zo 0. 0. @str_m16 osc str_M 0 str_Zo 0. 0. @str_m17 osc str_M 0 str_Zo 0. 0. @str_m18 osc str_M 0 str_Zo 0. 0. @str_m19 osc str_M 0 str_Zo 0. 0. @str_m20 osc str_M 0 str_Zo 0. 0. @str_m21 osc str_M 0 str_Zo 0. 0. @str_m22 osc str_M 0 str_Zo 0. 0. @str_m23 osc str_M 0 str_Zo 0. 0. @str_m24 osc str_M 0 str_Zo 0. 0. @str_m25 osc str_M 0 str_Zo 0. 0. @str_m26 osc str_M 0 str_Zo 0. 0. @str_m27 osc str_M 0 str_Zo 0. 0. @str_m28 osc str_M 0 str_Zo 0. 0. @str_m29 osc str_M 0 str_Zo 0. 0. @str_m30 osc str_M 0 str_Zo 0. 0. @str_m31 osc str_M 0 str_Zo 0. 0. @str_m32 osc str_M 0 str_Zo 0. 0. @str_m33 osc str_M 0 str_Zo 0. 0. @str_m34 osc str_M 0 str_Zo 0. 0. @str_m35 osc str_M 0 str_Zo 0. 0. @str_m36 osc str_M 0 str_Zo 0. 0. @str_m37 osc str_M 0 str_Zo 0. 0. @str_m38 osc str_M 0 str_Zo 0. 0. @str_m39 osc str_M 0 str_Zo 0. 0. @str_m40 osc str_M 0 str_Zo 0. 0. @str_m41 osc str_M 0 str_Zo 0. 0. @str_m42 osc str_M 0 str_Zo 0. 0. @str_m43 osc str_M 0 str_Zo 0. 0. @str_m44 osc str_M 0 str_Zo 0. 0. @str_m45 osc str_M 0 str_Zo 0. 0. @str_m46 osc str_M 0 str_Zo 0. 0. @str_m47 osc str_M 0 str_Zo 0. 0. @str_m48 osc str_M 0 str_Zo 0. 0. @str_m49 osc str_M 0 str_Zo 0. 0. @str_m50 osc str_M 0 str_Zo 0. 0. @str_m51 osc str_M 0 str_Zo 0. 0. @str_m52 osc str_M 0 str_Zo 0. 0. @str_m53 osc str_M 0 str_Zo 0. 0. @str_m54 osc str_M 0 str_Zo 0. 0. @str_m55 osc str_M 0 str_Zo 0. 0. @str_m56 osc str_M 0 str_Zo 0. 0. @str_m57 osc str_M 0 str_Zo 0. 0. @str_m58 osc str_M 0 str_Zo 0. 0. @str_m59 osc str_M 0 str_Zo 0. 0. @str_m60 osc str_M 0 str_Zo 0. 0. @str_m61 osc str_M 0 str_Zo 0. 0. @str_m62 osc str_M 0 str_Zo 0. 0. @str_m63 osc str_M 0 str_Zo 0. 0. @str_m64 osc str_M 0 str_Zo 0. 0. @str_m65 osc str_M 0 str_Zo 0. 0. @str_m66 osc str_M 0 str_Zo 0. 0. @str_m67 osc str_M 0 str_Zo 0. 0. @str_m68 osc str_M 0 str_Zo 0. 0. @str_m69 osc str_M 0 str_Zo 0. 0. @str_m70 osc str_M 0 str_Zo 0. 0. @str_m71 osc str_M 0 str_Zo 0. 0. @str_m72 osc str_M 0 str_Zo 0. 0. @str_m73 osc str_M 0 str_Zo 0. 0. @str_m74 osc str_M 0 str_Zo 0. 0. @str_m75 osc str_M 0 str_Zo 0. 0. @str_m76 osc str_M 0 str_Zo 0. 0. @str_m77 osc str_M 0 str_Zo 0. 0. @str_m78 osc str_M 0 str_Zo 0. 0. @str_m79 osc str_M 0 str_Zo 0. 0. @str_m80 osc str_M 0 str_Zo 0. 0. @str_m81 osc str_M 0 str_Zo 0. 0. @str_m82 osc str_M 0 str_Zo 0. 0. @str_m83 osc str_M 0 str_Zo 0. 0. @str_m84 osc str_M 0 str_Zo 0. 0. @str_m85 osc str_M 0 str_Zo 0. 0. @str_m86 osc str_M 0 str_Zo 0. 0. @str_m87 osc str_M 0 str_Zo 0. 0. @str_m88 osc str_M 0 str_Zo 0. 0. @str_m89 osc str_M 0 str_Zo 0. 0. @str_m90 osc str_M 0 str_Zo 0. 0. @str_m91 osc str_M 0 str_Zo 0. 0. @str_m92 osc str_M 0 str_Zo 0. 0. @str_m93 osc str_M 0 str_Zo 0. 0. @str_m94 osc str_M 0 str_Zo 0. 0. @str_m95 osc str_M 0 str_Zo 0. 0. @str_m96 osc str_M 0 str_Zo 0. 0. @str_m97 osc str_M 0 str_Zo 0. 0. @str_m98 osc str_M 0 str_Zo 0. 0. @str_m99 osc str_M 0 str_Zo 0. 0. @str_m100 osc str_M 0 str_Zo 0. 0. @str_m101 osc str_M 0 str_Zo 0. 0. @str_m102 osc str_M 0 str_Zo 0. 0. @str_m103 osc str_M 0 str_Zo 0. 0. @str_m104 osc str_M 0 str_Zo 0. 0. @str_m105 osc str_M 0 str_Zo 0. 0. @str_m106 osc str_M 0 str_Zo 0. 0. @str_m107 osc str_M 0 str_Zo 0. 0. @str_m108 osc str_M 0 str_Zo 0. 0. @str_m109 osc str_M 0 str_Zo 0. 0. @str_m110 osc str_M 0 str_Zo 0. 0. @str_m111 osc str_M 0 str_Zo 0. 0. @str_m112 osc str_M 0 str_Zo 0. 0. @str_m113 osc str_M 0 str_Zo 0. 0. @str_m114 osc str_M 0 str_Zo 0. 0. @str_m115 osc str_M 0 str_Zo 0. 0. @str_m116 osc str_M 0 str_Zo 0. 0. @str_m117 osc str_M 0 str_Zo 0. 0. @str_m118 osc str_M 0 str_Zo 0. 0. @str_m119 osc str_M 0 str_Zo 0. 0. @str_m120 osc str_M 0 str_Zo 0. 0. @str_m121 osc str_M 0 str_Zo 0. 0. @str_m122 osc str_M 0 str_Zo 0. 0. @str_m123 osc str_M 0 str_Zo 0. 0. @str_m124 osc str_M 0 str_Zo 0. 0. @str_m125 osc str_M 0 str_Zo 0. 0. @str_m126 osc str_M 0 str_Zo 0. 0. @str_m127 osc str_M 0 str_Zo 0. 0. @str_m128 osc str_M 0 str_Zo 0. 0. @str_m129 osc str_M 0 str_Zo 0. 0. @str_m130 osc str_M 0 str_Zo 0. 0. @str_m131 osc str_M 0 str_Zo 0. 0. @str_m132 osc str_M 0 str_Zo 0. 0. @str_m133 osc str_M 0 str_Zo 0. 0. @str_m134 osc str_M 0 str_Zo 0. 0. @str_m135 osc str_M 0 str_Zo 0. 0. @str_m136 osc str_M 0 str_Zo 0. 0. @str_m137 osc str_M 0 str_Zo 0. 0. @str_m138 osc str_M 0 str_Zo 0. 0. @str_m139 osc str_M 0 str_Zo 0. 0. @str_m140 osc str_M 0 str_Zo 0. 0. @str_m141 osc str_M 0 str_Zo 0. 0. @str_m142 osc str_M 0 str_Zo 0. 0. @str_m143 osc str_M 0 str_Zo 0. 0. @str_m144 osc str_M 0 str_Zo 0. 0. @str_m145 osc str_M 0 str_Zo 0. 0. @str_m146 osc str_M 0 str_Zo 0. 0. @str_m147 osc str_M 0 str_Zo 0. 0. @str_m148 osc str_M 0 str_Zo 0. 0. @str_m149 osc str_M 0 str_Zo 0. 0. @str_s1 ground 0. @str_r0 springDamper @str_s0 @str_m0 str_K str_Z @str_r1 springDamper @str_m0 @str_m1 str_K str_Z @str_r2 springDamper @str_m1 @str_m2 str_K str_Z @str_r3 springDamper @str_m2 @str_m3 str_K str_Z @str_r4 springDamper @str_m3 @str_m4 str_K str_Z @str_r5 springDamper @str_m4 @str_m5 str_K str_Z @str_r6 springDamper @str_m5 @str_m6 str_K str_Z @str_r7 springDamper @str_m6 @str_m7 str_K str_Z @str_r8 springDamper @str_m7 @str_m8 str_K str_Z @str_r9 springDamper @str_m8 @str_m9 str_K str_Z @str_r10 springDamper @str_m9 @str_m10 str_K str_Z @str_r11 springDamper @str_m10 @str_m11 str_K str_Z @str_r12 springDamper @str_m11 @str_m12 str_K str_Z @str_r13 springDamper @str_m12 @str_m13 str_K str_Z @str_r14 springDamper @str_m13 @str_m14 str_K str_Z @str_r15 springDamper @str_m14 @str_m15 str_K str_Z @str_r16 springDamper @str_m15 @str_m16 str_K str_Z @str_r17 springDamper @str_m16 @str_m17 str_K str_Z @str_r18 springDamper @str_m17 @str_m18 str_K str_Z @str_r19 springDamper @str_m18 @str_m19 str_K str_Z @str_r20 springDamper @str_m19 @str_m20 str_K str_Z @str_r21 springDamper @str_m20 @str_m21 str_K str_Z @str_r22 springDamper @str_m21 @str_m22 str_K str_Z @str_r23 springDamper @str_m22 @str_m23 str_K str_Z @str_r24 springDamper @str_m23 @str_m24 str_K str_Z @str_r25 springDamper @str_m24 @str_m25 str_K str_Z @str_r26 springDamper @str_m25 @str_m26 str_K str_Z @str_r27 springDamper @str_m26 @str_m27 str_K str_Z @str_r28 springDamper @str_m27 @str_m28 str_K str_Z @str_r29 springDamper @str_m28 @str_m29 str_K str_Z @str_r30 springDamper @str_m29 @str_m30 str_K str_Z @str_r31 springDamper @str_m30 @str_m31 str_K str_Z @str_r32 springDamper @str_m31 @str_m32 str_K str_Z @str_r33 springDamper @str_m32 @str_m33 str_K str_Z @str_r34 springDamper @str_m33 @str_m34 str_K str_Z @str_r35 springDamper @str_m34 @str_m35 str_K str_Z @str_r36 springDamper @str_m35 @str_m36 str_K str_Z @str_r37 springDamper @str_m36 @str_m37 str_K str_Z @str_r38 springDamper @str_m37 @str_m38 str_K str_Z @str_r39 springDamper @str_m38 @str_m39 str_K str_Z @str_r40 springDamper @str_m39 @str_m40 str_K str_Z @str_r41 springDamper @str_m40 @str_m41 str_K str_Z @str_r42 springDamper @str_m41 @str_m42 str_K str_Z @str_r43 springDamper @str_m42 @str_m43 str_K str_Z @str_r44 springDamper @str_m43 @str_m44 str_K str_Z @str_r45 springDamper @str_m44 @str_m45 str_K str_Z @str_r46 springDamper @str_m45 @str_m46 str_K str_Z @str_r47 springDamper @str_m46 @str_m47 str_K str_Z @str_r48 springDamper @str_m47 @str_m48 str_K str_Z @str_r49 springDamper @str_m48 @str_m49 str_K str_Z @str_r50 springDamper @str_m49 @str_m50 str_K str_Z @str_r51 springDamper @str_m50 @str_m51 str_K str_Z @str_r52 springDamper @str_m51 @str_m52 str_K str_Z @str_r53 springDamper @str_m52 @str_m53 str_K str_Z @str_r54 springDamper @str_m53 @str_m54 str_K str_Z @str_r55 springDamper @str_m54 @str_m55 str_K str_Z @str_r56 springDamper @str_m55 @str_m56 str_K str_Z @str_r57 springDamper @str_m56 @str_m57 str_K str_Z @str_r58 springDamper @str_m57 @str_m58 str_K str_Z @str_r59 springDamper @str_m58 @str_m59 str_K str_Z @str_r60 springDamper @str_m59 @str_m60 str_K str_Z @str_r61 springDamper @str_m60 @str_m61 str_K str_Z @str_r62 springDamper @str_m61 @str_m62 str_K str_Z @str_r63 springDamper @str_m62 @str_m63 str_K str_Z @str_r64 springDamper @str_m63 @str_m64 str_K str_Z @str_r65 springDamper @str_m64 @str_m65 str_K str_Z @str_r66 springDamper @str_m65 @str_m66 str_K str_Z @str_r67 springDamper @str_m66 @str_m67 str_K str_Z @str_r68 springDamper @str_m67 @str_m68 str_K str_Z @str_r69 springDamper @str_m68 @str_m69 str_K str_Z @str_r70 springDamper @str_m69 @str_m70 str_K str_Z @str_r71 springDamper @str_m70 @str_m71 str_K str_Z @str_r72 springDamper @str_m71 @str_m72 str_K str_Z @str_r73 springDamper @str_m72 @str_m73 str_K str_Z @str_r74 springDamper @str_m73 @str_m74 str_K str_Z @str_r75 springDamper @str_m74 @str_m75 str_K str_Z @str_r76 springDamper @str_m75 @str_m76 str_K str_Z @str_r77 springDamper @str_m76 @str_m77 str_K str_Z @str_r78 springDamper @str_m77 @str_m78 str_K str_Z @str_r79 springDamper @str_m78 @str_m79 str_K str_Z @str_r80 springDamper @str_m79 @str_m80 str_K str_Z @str_r81 springDamper @str_m80 @str_m81 str_K str_Z @str_r82 springDamper @str_m81 @str_m82 str_K str_Z @str_r83 springDamper @str_m82 @str_m83 str_K str_Z @str_r84 springDamper @str_m83 @str_m84 str_K str_Z @str_r85 springDamper @str_m84 @str_m85 str_K str_Z @str_r86 springDamper @str_m85 @str_m86 str_K str_Z @str_r87 springDamper @str_m86 @str_m87 str_K str_Z @str_r88 springDamper @str_m87 @str_m88 str_K str_Z @str_r89 springDamper @str_m88 @str_m89 str_K str_Z @str_r90 springDamper @str_m89 @str_m90 str_K str_Z @str_r91 springDamper @str_m90 @str_m91 str_K str_Z @str_r92 springDamper @str_m91 @str_m92 str_K str_Z @str_r93 springDamper @str_m92 @str_m93 str_K str_Z @str_r94 springDamper @str_m93 @str_m94 str_K str_Z @str_r95 springDamper @str_m94 @str_m95 str_K str_Z @str_r96 springDamper @str_m95 @str_m96 str_K str_Z @str_r97 springDamper @str_m96 @str_m97 str_K str_Z @str_r98 springDamper @str_m97 @str_m98 str_K str_Z @str_r99 springDamper @str_m98 @str_m99 str_K str_Z @str_r100 springDamper @str_m99 @str_m100 str_K str_Z @str_r101 springDamper @str_m100 @str_m101 str_K str_Z @str_r102 springDamper @str_m101 @str_m102 str_K str_Z @str_r103 springDamper @str_m102 @str_m103 str_K str_Z @str_r104 springDamper @str_m103 @str_m104 str_K str_Z @str_r105 springDamper @str_m104 @str_m105 str_K str_Z @str_r106 springDamper @str_m105 @str_m106 str_K str_Z @str_r107 springDamper @str_m106 @str_m107 str_K str_Z @str_r108 springDamper @str_m107 @str_m108 str_K str_Z @str_r109 springDamper @str_m108 @str_m109 str_K str_Z @str_r110 springDamper @str_m109 @str_m110 str_K str_Z @str_r111 springDamper @str_m110 @str_m111 str_K str_Z @str_r112 springDamper @str_m111 @str_m112 str_K str_Z @str_r113 springDamper @str_m112 @str_m113 str_K str_Z @str_r114 springDamper @str_m113 @str_m114 str_K str_Z @str_r115 springDamper @str_m114 @str_m115 str_K str_Z @str_r116 springDamper @str_m115 @str_m116 str_K str_Z @str_r117 springDamper @str_m116 @str_m117 str_K str_Z @str_r118 springDamper @str_m117 @str_m118 str_K str_Z @str_r119 springDamper @str_m118 @str_m119 str_K str_Z @str_r120 springDamper @str_m119 @str_m120 str_K str_Z @str_r121 springDamper @str_m120 @str_m121 str_K str_Z @str_r122 springDamper @str_m121 @str_m122 str_K str_Z @str_r123 springDamper @str_m122 @str_m123 str_K str_Z @str_r124 springDamper @str_m123 @str_m124 str_K str_Z @str_r125 springDamper @str_m124 @str_m125 str_K str_Z @str_r126 springDamper @str_m125 @str_m126 str_K str_Z @str_r127 springDamper @str_m126 @str_m127 str_K str_Z @str_r128 springDamper @str_m127 @str_m128 str_K str_Z @str_r129 springDamper @str_m128 @str_m129 str_K str_Z @str_r130 springDamper @str_m129 @str_m130 str_K str_Z @str_r131 springDamper @str_m130 @str_m131 str_K str_Z @str_r132 springDamper @str_m131 @str_m132 str_K str_Z @str_r133 springDamper @str_m132 @str_m133 str_K str_Z @str_r134 springDamper @str_m133 @str_m134 str_K str_Z @str_r135 springDamper @str_m134 @str_m135 str_K str_Z @str_r136 springDamper @str_m135 @str_m136 str_K str_Z @str_r137 springDamper @str_m136 @str_m137 str_K str_Z @str_r138 springDamper @str_m137 @str_m138 str_K str_Z @str_r139 springDamper @str_m138 @str_m139 str_K str_Z @str_r140 springDamper @str_m139 @str_m140 str_K str_Z @str_r141 springDamper @str_m140 @str_m141 str_K str_Z @str_r142 springDamper @str_m141 @str_m142 str_K str_Z @str_r143 springDamper @str_m142 @str_m143 str_K str_Z @str_r144 springDamper @str_m143 @str_m144 str_K str_Z @str_r145 springDamper @str_m144 @str_m145 str_K str_Z @str_r146 springDamper @str_m145 @str_m146 str_K str_Z @str_r147 springDamper @str_m146 @str_m147 str_K str_Z @str_r148 springDamper @str_m147 @str_m148 str_K str_Z @str_r149 springDamper @str_m148 @str_m149 str_K str_Z @str_r150 springDamper @str_m149 @str_s1 str_K str_Z @in1 posInput 0. @out1 posOutput @str_m20 @out2 posOutput @str_m10 @nlp0 nlPluck @in1 @str_m140 nlK nlscale pZ */
https://raw.githubusercontent.com/madskjeldgaard/mkfaustplugins/fd7cf250788174b5efa6ae3294997609830875d1/plugins/PluckedString/PluckedString.dsp
faust
========= DESCRITPION ============= A plucked string with a few controls. - inputs: pick position. - outputs: two listening points on the string. - controls: pick stiffness and damping, string stiffness, damping and air friction. Note: the model block diagram is starting to look like a piece of modern art. routed positions outputs routed forces pass-through ========= MIMS SCRIPT USED FOR MODEL GENERATION ============= # Plucked string model # Script author : James Leonard @nlK param 0.8 @nlscale param 0.005 @pZ param 0.001 @str_M param 1 @str_K param 0.5 @str_Z param 0.001 @str_Zo param 0.00005 @str_s0 ground 0. @str_m0 osc str_M 0 str_Zo 0. 0. @str_m1 osc str_M 0 str_Zo 0. 0. @str_m2 osc str_M 0 str_Zo 0. 0. @str_m3 osc str_M 0 str_Zo 0. 0. @str_m4 osc str_M 0 str_Zo 0. 0. @str_m5 osc str_M 0 str_Zo 0. 0. @str_m6 osc str_M 0 str_Zo 0. 0. @str_m7 osc str_M 0 str_Zo 0. 0. @str_m8 osc str_M 0 str_Zo 0. 0. @str_m9 osc str_M 0 str_Zo 0. 0. @str_m10 osc str_M 0 str_Zo 0. 0. @str_m11 osc str_M 0 str_Zo 0. 0. @str_m12 osc str_M 0 str_Zo 0. 0. @str_m13 osc str_M 0 str_Zo 0. 0. @str_m14 osc str_M 0 str_Zo 0. 0. @str_m15 osc str_M 0 str_Zo 0. 0. @str_m16 osc str_M 0 str_Zo 0. 0. @str_m17 osc str_M 0 str_Zo 0. 0. @str_m18 osc str_M 0 str_Zo 0. 0. @str_m19 osc str_M 0 str_Zo 0. 0. @str_m20 osc str_M 0 str_Zo 0. 0. @str_m21 osc str_M 0 str_Zo 0. 0. @str_m22 osc str_M 0 str_Zo 0. 0. @str_m23 osc str_M 0 str_Zo 0. 0. @str_m24 osc str_M 0 str_Zo 0. 0. @str_m25 osc str_M 0 str_Zo 0. 0. @str_m26 osc str_M 0 str_Zo 0. 0. @str_m27 osc str_M 0 str_Zo 0. 0. @str_m28 osc str_M 0 str_Zo 0. 0. @str_m29 osc str_M 0 str_Zo 0. 0. @str_m30 osc str_M 0 str_Zo 0. 0. @str_m31 osc str_M 0 str_Zo 0. 0. @str_m32 osc str_M 0 str_Zo 0. 0. @str_m33 osc str_M 0 str_Zo 0. 0. @str_m34 osc str_M 0 str_Zo 0. 0. @str_m35 osc str_M 0 str_Zo 0. 0. @str_m36 osc str_M 0 str_Zo 0. 0. @str_m37 osc str_M 0 str_Zo 0. 0. @str_m38 osc str_M 0 str_Zo 0. 0. @str_m39 osc str_M 0 str_Zo 0. 0. @str_m40 osc str_M 0 str_Zo 0. 0. @str_m41 osc str_M 0 str_Zo 0. 0. @str_m42 osc str_M 0 str_Zo 0. 0. @str_m43 osc str_M 0 str_Zo 0. 0. @str_m44 osc str_M 0 str_Zo 0. 0. @str_m45 osc str_M 0 str_Zo 0. 0. @str_m46 osc str_M 0 str_Zo 0. 0. @str_m47 osc str_M 0 str_Zo 0. 0. @str_m48 osc str_M 0 str_Zo 0. 0. @str_m49 osc str_M 0 str_Zo 0. 0. @str_m50 osc str_M 0 str_Zo 0. 0. @str_m51 osc str_M 0 str_Zo 0. 0. @str_m52 osc str_M 0 str_Zo 0. 0. @str_m53 osc str_M 0 str_Zo 0. 0. @str_m54 osc str_M 0 str_Zo 0. 0. @str_m55 osc str_M 0 str_Zo 0. 0. @str_m56 osc str_M 0 str_Zo 0. 0. @str_m57 osc str_M 0 str_Zo 0. 0. @str_m58 osc str_M 0 str_Zo 0. 0. @str_m59 osc str_M 0 str_Zo 0. 0. @str_m60 osc str_M 0 str_Zo 0. 0. @str_m61 osc str_M 0 str_Zo 0. 0. @str_m62 osc str_M 0 str_Zo 0. 0. @str_m63 osc str_M 0 str_Zo 0. 0. @str_m64 osc str_M 0 str_Zo 0. 0. @str_m65 osc str_M 0 str_Zo 0. 0. @str_m66 osc str_M 0 str_Zo 0. 0. @str_m67 osc str_M 0 str_Zo 0. 0. @str_m68 osc str_M 0 str_Zo 0. 0. @str_m69 osc str_M 0 str_Zo 0. 0. @str_m70 osc str_M 0 str_Zo 0. 0. @str_m71 osc str_M 0 str_Zo 0. 0. @str_m72 osc str_M 0 str_Zo 0. 0. @str_m73 osc str_M 0 str_Zo 0. 0. @str_m74 osc str_M 0 str_Zo 0. 0. @str_m75 osc str_M 0 str_Zo 0. 0. @str_m76 osc str_M 0 str_Zo 0. 0. @str_m77 osc str_M 0 str_Zo 0. 0. @str_m78 osc str_M 0 str_Zo 0. 0. @str_m79 osc str_M 0 str_Zo 0. 0. @str_m80 osc str_M 0 str_Zo 0. 0. @str_m81 osc str_M 0 str_Zo 0. 0. @str_m82 osc str_M 0 str_Zo 0. 0. @str_m83 osc str_M 0 str_Zo 0. 0. @str_m84 osc str_M 0 str_Zo 0. 0. @str_m85 osc str_M 0 str_Zo 0. 0. @str_m86 osc str_M 0 str_Zo 0. 0. @str_m87 osc str_M 0 str_Zo 0. 0. @str_m88 osc str_M 0 str_Zo 0. 0. @str_m89 osc str_M 0 str_Zo 0. 0. @str_m90 osc str_M 0 str_Zo 0. 0. @str_m91 osc str_M 0 str_Zo 0. 0. @str_m92 osc str_M 0 str_Zo 0. 0. @str_m93 osc str_M 0 str_Zo 0. 0. @str_m94 osc str_M 0 str_Zo 0. 0. @str_m95 osc str_M 0 str_Zo 0. 0. @str_m96 osc str_M 0 str_Zo 0. 0. @str_m97 osc str_M 0 str_Zo 0. 0. @str_m98 osc str_M 0 str_Zo 0. 0. @str_m99 osc str_M 0 str_Zo 0. 0. @str_m100 osc str_M 0 str_Zo 0. 0. @str_m101 osc str_M 0 str_Zo 0. 0. @str_m102 osc str_M 0 str_Zo 0. 0. @str_m103 osc str_M 0 str_Zo 0. 0. @str_m104 osc str_M 0 str_Zo 0. 0. @str_m105 osc str_M 0 str_Zo 0. 0. @str_m106 osc str_M 0 str_Zo 0. 0. @str_m107 osc str_M 0 str_Zo 0. 0. @str_m108 osc str_M 0 str_Zo 0. 0. @str_m109 osc str_M 0 str_Zo 0. 0. @str_m110 osc str_M 0 str_Zo 0. 0. @str_m111 osc str_M 0 str_Zo 0. 0. @str_m112 osc str_M 0 str_Zo 0. 0. @str_m113 osc str_M 0 str_Zo 0. 0. @str_m114 osc str_M 0 str_Zo 0. 0. @str_m115 osc str_M 0 str_Zo 0. 0. @str_m116 osc str_M 0 str_Zo 0. 0. @str_m117 osc str_M 0 str_Zo 0. 0. @str_m118 osc str_M 0 str_Zo 0. 0. @str_m119 osc str_M 0 str_Zo 0. 0. @str_m120 osc str_M 0 str_Zo 0. 0. @str_m121 osc str_M 0 str_Zo 0. 0. @str_m122 osc str_M 0 str_Zo 0. 0. @str_m123 osc str_M 0 str_Zo 0. 0. @str_m124 osc str_M 0 str_Zo 0. 0. @str_m125 osc str_M 0 str_Zo 0. 0. @str_m126 osc str_M 0 str_Zo 0. 0. @str_m127 osc str_M 0 str_Zo 0. 0. @str_m128 osc str_M 0 str_Zo 0. 0. @str_m129 osc str_M 0 str_Zo 0. 0. @str_m130 osc str_M 0 str_Zo 0. 0. @str_m131 osc str_M 0 str_Zo 0. 0. @str_m132 osc str_M 0 str_Zo 0. 0. @str_m133 osc str_M 0 str_Zo 0. 0. @str_m134 osc str_M 0 str_Zo 0. 0. @str_m135 osc str_M 0 str_Zo 0. 0. @str_m136 osc str_M 0 str_Zo 0. 0. @str_m137 osc str_M 0 str_Zo 0. 0. @str_m138 osc str_M 0 str_Zo 0. 0. @str_m139 osc str_M 0 str_Zo 0. 0. @str_m140 osc str_M 0 str_Zo 0. 0. @str_m141 osc str_M 0 str_Zo 0. 0. @str_m142 osc str_M 0 str_Zo 0. 0. @str_m143 osc str_M 0 str_Zo 0. 0. @str_m144 osc str_M 0 str_Zo 0. 0. @str_m145 osc str_M 0 str_Zo 0. 0. @str_m146 osc str_M 0 str_Zo 0. 0. @str_m147 osc str_M 0 str_Zo 0. 0. @str_m148 osc str_M 0 str_Zo 0. 0. @str_m149 osc str_M 0 str_Zo 0. 0. @str_s1 ground 0. @str_r0 springDamper @str_s0 @str_m0 str_K str_Z @str_r1 springDamper @str_m0 @str_m1 str_K str_Z @str_r2 springDamper @str_m1 @str_m2 str_K str_Z @str_r3 springDamper @str_m2 @str_m3 str_K str_Z @str_r4 springDamper @str_m3 @str_m4 str_K str_Z @str_r5 springDamper @str_m4 @str_m5 str_K str_Z @str_r6 springDamper @str_m5 @str_m6 str_K str_Z @str_r7 springDamper @str_m6 @str_m7 str_K str_Z @str_r8 springDamper @str_m7 @str_m8 str_K str_Z @str_r9 springDamper @str_m8 @str_m9 str_K str_Z @str_r10 springDamper @str_m9 @str_m10 str_K str_Z @str_r11 springDamper @str_m10 @str_m11 str_K str_Z @str_r12 springDamper @str_m11 @str_m12 str_K str_Z @str_r13 springDamper @str_m12 @str_m13 str_K str_Z @str_r14 springDamper @str_m13 @str_m14 str_K str_Z @str_r15 springDamper @str_m14 @str_m15 str_K str_Z @str_r16 springDamper @str_m15 @str_m16 str_K str_Z @str_r17 springDamper @str_m16 @str_m17 str_K str_Z @str_r18 springDamper @str_m17 @str_m18 str_K str_Z @str_r19 springDamper @str_m18 @str_m19 str_K str_Z @str_r20 springDamper @str_m19 @str_m20 str_K str_Z @str_r21 springDamper @str_m20 @str_m21 str_K str_Z @str_r22 springDamper @str_m21 @str_m22 str_K str_Z @str_r23 springDamper @str_m22 @str_m23 str_K str_Z @str_r24 springDamper @str_m23 @str_m24 str_K str_Z @str_r25 springDamper @str_m24 @str_m25 str_K str_Z @str_r26 springDamper @str_m25 @str_m26 str_K str_Z @str_r27 springDamper @str_m26 @str_m27 str_K str_Z @str_r28 springDamper @str_m27 @str_m28 str_K str_Z @str_r29 springDamper @str_m28 @str_m29 str_K str_Z @str_r30 springDamper @str_m29 @str_m30 str_K str_Z @str_r31 springDamper @str_m30 @str_m31 str_K str_Z @str_r32 springDamper @str_m31 @str_m32 str_K str_Z @str_r33 springDamper @str_m32 @str_m33 str_K str_Z @str_r34 springDamper @str_m33 @str_m34 str_K str_Z @str_r35 springDamper @str_m34 @str_m35 str_K str_Z @str_r36 springDamper @str_m35 @str_m36 str_K str_Z @str_r37 springDamper @str_m36 @str_m37 str_K str_Z @str_r38 springDamper @str_m37 @str_m38 str_K str_Z @str_r39 springDamper @str_m38 @str_m39 str_K str_Z @str_r40 springDamper @str_m39 @str_m40 str_K str_Z @str_r41 springDamper @str_m40 @str_m41 str_K str_Z @str_r42 springDamper @str_m41 @str_m42 str_K str_Z @str_r43 springDamper @str_m42 @str_m43 str_K str_Z @str_r44 springDamper @str_m43 @str_m44 str_K str_Z @str_r45 springDamper @str_m44 @str_m45 str_K str_Z @str_r46 springDamper @str_m45 @str_m46 str_K str_Z @str_r47 springDamper @str_m46 @str_m47 str_K str_Z @str_r48 springDamper @str_m47 @str_m48 str_K str_Z @str_r49 springDamper @str_m48 @str_m49 str_K str_Z @str_r50 springDamper @str_m49 @str_m50 str_K str_Z @str_r51 springDamper @str_m50 @str_m51 str_K str_Z @str_r52 springDamper @str_m51 @str_m52 str_K str_Z @str_r53 springDamper @str_m52 @str_m53 str_K str_Z @str_r54 springDamper @str_m53 @str_m54 str_K str_Z @str_r55 springDamper @str_m54 @str_m55 str_K str_Z @str_r56 springDamper @str_m55 @str_m56 str_K str_Z @str_r57 springDamper @str_m56 @str_m57 str_K str_Z @str_r58 springDamper @str_m57 @str_m58 str_K str_Z @str_r59 springDamper @str_m58 @str_m59 str_K str_Z @str_r60 springDamper @str_m59 @str_m60 str_K str_Z @str_r61 springDamper @str_m60 @str_m61 str_K str_Z @str_r62 springDamper @str_m61 @str_m62 str_K str_Z @str_r63 springDamper @str_m62 @str_m63 str_K str_Z @str_r64 springDamper @str_m63 @str_m64 str_K str_Z @str_r65 springDamper @str_m64 @str_m65 str_K str_Z @str_r66 springDamper @str_m65 @str_m66 str_K str_Z @str_r67 springDamper @str_m66 @str_m67 str_K str_Z @str_r68 springDamper @str_m67 @str_m68 str_K str_Z @str_r69 springDamper @str_m68 @str_m69 str_K str_Z @str_r70 springDamper @str_m69 @str_m70 str_K str_Z @str_r71 springDamper @str_m70 @str_m71 str_K str_Z @str_r72 springDamper @str_m71 @str_m72 str_K str_Z @str_r73 springDamper @str_m72 @str_m73 str_K str_Z @str_r74 springDamper @str_m73 @str_m74 str_K str_Z @str_r75 springDamper @str_m74 @str_m75 str_K str_Z @str_r76 springDamper @str_m75 @str_m76 str_K str_Z @str_r77 springDamper @str_m76 @str_m77 str_K str_Z @str_r78 springDamper @str_m77 @str_m78 str_K str_Z @str_r79 springDamper @str_m78 @str_m79 str_K str_Z @str_r80 springDamper @str_m79 @str_m80 str_K str_Z @str_r81 springDamper @str_m80 @str_m81 str_K str_Z @str_r82 springDamper @str_m81 @str_m82 str_K str_Z @str_r83 springDamper @str_m82 @str_m83 str_K str_Z @str_r84 springDamper @str_m83 @str_m84 str_K str_Z @str_r85 springDamper @str_m84 @str_m85 str_K str_Z @str_r86 springDamper @str_m85 @str_m86 str_K str_Z @str_r87 springDamper @str_m86 @str_m87 str_K str_Z @str_r88 springDamper @str_m87 @str_m88 str_K str_Z @str_r89 springDamper @str_m88 @str_m89 str_K str_Z @str_r90 springDamper @str_m89 @str_m90 str_K str_Z @str_r91 springDamper @str_m90 @str_m91 str_K str_Z @str_r92 springDamper @str_m91 @str_m92 str_K str_Z @str_r93 springDamper @str_m92 @str_m93 str_K str_Z @str_r94 springDamper @str_m93 @str_m94 str_K str_Z @str_r95 springDamper @str_m94 @str_m95 str_K str_Z @str_r96 springDamper @str_m95 @str_m96 str_K str_Z @str_r97 springDamper @str_m96 @str_m97 str_K str_Z @str_r98 springDamper @str_m97 @str_m98 str_K str_Z @str_r99 springDamper @str_m98 @str_m99 str_K str_Z @str_r100 springDamper @str_m99 @str_m100 str_K str_Z @str_r101 springDamper @str_m100 @str_m101 str_K str_Z @str_r102 springDamper @str_m101 @str_m102 str_K str_Z @str_r103 springDamper @str_m102 @str_m103 str_K str_Z @str_r104 springDamper @str_m103 @str_m104 str_K str_Z @str_r105 springDamper @str_m104 @str_m105 str_K str_Z @str_r106 springDamper @str_m105 @str_m106 str_K str_Z @str_r107 springDamper @str_m106 @str_m107 str_K str_Z @str_r108 springDamper @str_m107 @str_m108 str_K str_Z @str_r109 springDamper @str_m108 @str_m109 str_K str_Z @str_r110 springDamper @str_m109 @str_m110 str_K str_Z @str_r111 springDamper @str_m110 @str_m111 str_K str_Z @str_r112 springDamper @str_m111 @str_m112 str_K str_Z @str_r113 springDamper @str_m112 @str_m113 str_K str_Z @str_r114 springDamper @str_m113 @str_m114 str_K str_Z @str_r115 springDamper @str_m114 @str_m115 str_K str_Z @str_r116 springDamper @str_m115 @str_m116 str_K str_Z @str_r117 springDamper @str_m116 @str_m117 str_K str_Z @str_r118 springDamper @str_m117 @str_m118 str_K str_Z @str_r119 springDamper @str_m118 @str_m119 str_K str_Z @str_r120 springDamper @str_m119 @str_m120 str_K str_Z @str_r121 springDamper @str_m120 @str_m121 str_K str_Z @str_r122 springDamper @str_m121 @str_m122 str_K str_Z @str_r123 springDamper @str_m122 @str_m123 str_K str_Z @str_r124 springDamper @str_m123 @str_m124 str_K str_Z @str_r125 springDamper @str_m124 @str_m125 str_K str_Z @str_r126 springDamper @str_m125 @str_m126 str_K str_Z @str_r127 springDamper @str_m126 @str_m127 str_K str_Z @str_r128 springDamper @str_m127 @str_m128 str_K str_Z @str_r129 springDamper @str_m128 @str_m129 str_K str_Z @str_r130 springDamper @str_m129 @str_m130 str_K str_Z @str_r131 springDamper @str_m130 @str_m131 str_K str_Z @str_r132 springDamper @str_m131 @str_m132 str_K str_Z @str_r133 springDamper @str_m132 @str_m133 str_K str_Z @str_r134 springDamper @str_m133 @str_m134 str_K str_Z @str_r135 springDamper @str_m134 @str_m135 str_K str_Z @str_r136 springDamper @str_m135 @str_m136 str_K str_Z @str_r137 springDamper @str_m136 @str_m137 str_K str_Z @str_r138 springDamper @str_m137 @str_m138 str_K str_Z @str_r139 springDamper @str_m138 @str_m139 str_K str_Z @str_r140 springDamper @str_m139 @str_m140 str_K str_Z @str_r141 springDamper @str_m140 @str_m141 str_K str_Z @str_r142 springDamper @str_m141 @str_m142 str_K str_Z @str_r143 springDamper @str_m142 @str_m143 str_K str_Z @str_r144 springDamper @str_m143 @str_m144 str_K str_Z @str_r145 springDamper @str_m144 @str_m145 str_K str_Z @str_r146 springDamper @str_m145 @str_m146 str_K str_Z @str_r147 springDamper @str_m146 @str_m147 str_K str_Z @str_r148 springDamper @str_m147 @str_m148 str_K str_Z @str_r149 springDamper @str_m148 @str_m149 str_K str_Z @str_r150 springDamper @str_m149 @str_s1 str_K str_Z @in1 posInput 0. @out1 posOutput @str_m20 @out2 posOutput @str_m10 @nlp0 nlPluck @in1 @str_m140 nlK nlscale pZ
declare name "PluckedString"; declare author "James Leonard"; declare date "April 2020"; import("stdfaust.lib"); in1 = _:si.smoo; OutGain = 5; str_M = 1.0; str_K = hslider("stiffness", 0.7, 0.001, 0.7, 0.001):si.smoo; str_Z = hslider("damping", 0.0009, 0.00, 0.01, 0.00001):si.smoo; str_Zo = hslider("friction", 0.00005, 0.00, 0.0002, 0.00001):si.smoo; nlK = hslider("pickstiffness", 0.5, 0., 0.8, 0.001); nlscale = 0.05; pZ = hslider("pickdamping", 0.04, 0., 0.1, 0.001); model = ( mi.ground(0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.oscil(str_M, 0, str_Zo, 0, 0., 0.), mi.ground(0.), mi.posInput(0.): RoutingMassToLink : mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.springDamper(str_K, str_Z, 0., 0.), mi.nlPluck(nlK, nlscale, pZ, 0., 0.), par(i, nbOut, _): RoutingLinkToMass )~par(i, nbMass, _): par(i, nbMass, !), par(i, nbOut , _) with{ nbMass = 153; nbOut = 2; }; process = in1 : model:*(OutGain), *(OutGain);
09b881551495151f79d18d1cef8a0a4c02d05a7d498ef4b084b1aeef987c343c
madskjeldgaard/mkfaustplugins
StrangeConstruct.dsp
declare name "StrangeConstruct"; declare author "James Leonard"; declare date "April 2020"; /* ========= DESCRITPION ============= A triangle mesh (fixed corners) struck by a hammer, connected (through a slightly non-linear spring) to a resonant square mesh (fixed corners). - inputs: Force impulse applied to the hammer - outputs: one listening point on the triangle, another on the resonnant mesh. - controls: triangle stiffness and daming, square mesh stiffness and damping, hammer force impulse scaling. Note: the block diagram of the model will give you nightmares. */ import("stdfaust.lib"); in1 = _ : ba.impulsify * hslider("scaling", 0.9, 0.01, 0.9, 0.001) * -1; OutGain = 1; t_M = 1; t_K = hslider("stiffness", 0.1, 0.001, 0.2, 0.0001); t_Z = hslider("damping", 0.0001, 0.00, 0.0008, 0.000001); t_Zo = 0.00005; me_M = 1; me_K = hslider("stiffness", 0.1, 0.001, 0.2, 0.0001); me_Z = hslider("damping", 0.0001, 0.00, 0.0008, 0.000001); me_Zo = 0.00005; model = ( mi.mass(0.3, 0, 1., 1.), mi.ground(1.), mi.ground(0), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.ground(0), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.ground(0), mi.ground(0), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.ground(0), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.ground(0), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.ground(0), par(i, nbFrcIn,_): RoutingMassToLink , par(i, nbFrcIn,_): mi.springDamper(0.0001, 0.05, 1., 1.), mi.nlCollisionClipped(0.0, 0.01, 0.5, 0.001, 0, 0., 1.), mi.nlSpringDamperClipped(0.01, 0.01, 0.2, 0., 0., 0.), mi.springDamper(t_K, t_Z, 0, 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0, 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0, 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0), mi.springDamper(me_K, me_Z, 0, 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0, 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0), mi.springDamper(me_K, me_Z, 0, 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0, 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0), par(i, nbOut+nbFrcIn, _): RoutingLinkToMass )~par(i, nbMass, _): par(i, nbMass, !), par(i, nbOut , _) with{ RoutingMassToLink(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29, m30, m31, m32, m33, m34, m35, m36, m37, m38, m39, m40, m41, m42, m43, m44, m45, m46, m47, m48, m49, m50, m51, m52, m53, m54, m55, m56, m57, m58, m59, m60, m61, m62, m63, m64, m65, m66, m67, m68, m69, m70, m71, m72, m73, m74, m75, m76, m77, m78, m79, m80, m81, m82, m83, m84, m85, m86, m87, m88, m89, m90, m91, m92, m93, m94, m95, m96, m97, m98, m99, m100, m101, m102, m103, m104, m105, m106, m107, m108, m109, m110, m111, m112, m113, m114, m115, m116, m117, m118, m119, m120, m121, m122, m123, m124, m125, m126, m127, m128, m129, m130, m131, m132, m133, m134, m135, m136, m137, m138, m139, m140, m141, m142, m143, m144, m145, m146, m147, m148, m149, m150, m151, m152, m153, m154, m155, m156) = /* routed positions */ m1, m0, m39, m0, m49, m94, m2, m3, m3, m4, m4, m5, m5, m6, m6, m7, m7, m8, m8, m9, m9, m10, m10, m11, m12, m13, m13, m14, m14, m15, m15, m16, m16, m17, m17, m18, m18, m19, m19, m20, m21, m22, m22, m23, m23, m24, m24, m25, m25, m26, m26, m27, m27, m28, m29, m30, m30, m31, m31, m32, m32, m33, m33, m34, m34, m35, m36, m37, m37, m38, m38, m39, m39, m40, m40, m41, m42, m43, m43, m44, m44, m45, m45, m46, m47, m48, m48, m49, m49, m50, m51, m52, m52, m53, m54, m55, m2, m12, m3, m13, m4, m14, m5, m15, m6, m16, m7, m17, m8, m18, m9, m19, m10, m20, m12, m21, m13, m22, m14, m23, m15, m24, m16, m25, m17, m26, m18, m27, m19, m28, m21, m29, m22, m30, m23, m31, m24, m32, m25, m33, m26, m34, m27, m35, m29, m36, m30, m37, m31, m38, m32, m39, m33, m40, m34, m41, m36, m42, m37, m43, m38, m44, m39, m45, m40, m46, m42, m47, m43, m48, m44, m49, m45, m50, m47, m51, m48, m52, m49, m53, m51, m54, m52, m55, m54, m56, m3, m12, m4, m13, m5, m14, m6, m15, m7, m16, m8, m17, m9, m18, m10, m19, m11, m20, m13, m21, m14, m22, m15, m23, m16, m24, m17, m25, m18, m26, m19, m27, m20, m28, m22, m29, m23, m30, m24, m31, m25, m32, m26, m33, m27, m34, m28, m35, m30, m36, m31, m37, m32, m38, m33, m39, m34, m40, m35, m41, m37, m42, m38, m43, m39, m44, m40, m45, m41, m46, m43, m47, m44, m48, m45, m49, m46, m50, m48, m51, m49, m52, m50, m53, m52, m54, m53, m55, m55, m56, m57, m58, m58, m59, m59, m60, m60, m61, m61, m62, m62, m63, m63, m64, m64, m65, m65, m66, m67, m68, m68, m69, m69, m70, m70, m71, m71, m72, m72, m73, m73, m74, m74, m75, m75, m76, m77, m78, m78, m79, m79, m80, m80, m81, m81, m82, m82, m83, m83, m84, m84, m85, m85, m86, m87, m88, m88, m89, m89, m90, m90, m91, m91, m92, m92, m93, m93, m94, m94, m95, m95, m96, m97, m98, m98, m99, m99, m100, m100, m101, m101, m102, m102, m103, m103, m104, m104, m105, m105, m106, m107, m108, m108, m109, m109, m110, m110, m111, m111, m112, m112, m113, m113, m114, m114, m115, m115, m116, m117, m118, m118, m119, m119, m120, m120, m121, m121, m122, m122, m123, m123, m124, m124, m125, m125, m126, m127, m128, m128, m129, m129, m130, m130, m131, m131, m132, m132, m133, m133, m134, m134, m135, m135, m136, m137, m138, m138, m139, m139, m140, m140, m141, m141, m142, m142, m143, m143, m144, m144, m145, m145, m146, m147, m148, m148, m149, m149, m150, m150, m151, m151, m152, m152, m153, m153, m154, m154, m155, m155, m156, m57, m67, m58, m68, m59, m69, m60, m70, m61, m71, m62, m72, m63, m73, m64, m74, m65, m75, m66, m76, m67, m77, m68, m78, m69, m79, m70, m80, m71, m81, m72, m82, m73, m83, m74, m84, m75, m85, m76, m86, m77, m87, m78, m88, m79, m89, m80, m90, m81, m91, m82, m92, m83, m93, m84, m94, m85, m95, m86, m96, m87, m97, m88, m98, m89, m99, m90, m100, m91, m101, m92, m102, m93, m103, m94, m104, m95, m105, m96, m106, m97, m107, m98, m108, m99, m109, m100, m110, m101, m111, m102, m112, m103, m113, m104, m114, m105, m115, m106, m116, m107, m117, m108, m118, m109, m119, m110, m120, m111, m121, m112, m122, m113, m123, m114, m124, m115, m125, m116, m126, m117, m127, m118, m128, m119, m129, m120, m130, m121, m131, m122, m132, m123, m133, m124, m134, m125, m135, m126, m136, m127, m137, m128, m138, m129, m139, m130, m140, m131, m141, m132, m142, m133, m143, m134, m144, m135, m145, m136, m146, m137, m147, m138, m148, m139, m149, m140, m150, m141, m151, m142, m152, m143, m153, m144, m154, m145, m155, m146, m156, /* outputs */ m112, m22; RoutingLinkToMass(l0_f1, l0_f2, l1_f1, l1_f2, l2_f1, l2_f2, l3_f1, l3_f2, l4_f1, l4_f2, l5_f1, l5_f2, l6_f1, l6_f2, l7_f1, l7_f2, l8_f1, l8_f2, l9_f1, l9_f2, l10_f1, l10_f2, l11_f1, l11_f2, l12_f1, l12_f2, l13_f1, l13_f2, l14_f1, l14_f2, l15_f1, l15_f2, l16_f1, l16_f2, l17_f1, l17_f2, l18_f1, l18_f2, l19_f1, l19_f2, l20_f1, l20_f2, l21_f1, l21_f2, l22_f1, l22_f2, l23_f1, l23_f2, l24_f1, l24_f2, l25_f1, l25_f2, l26_f1, l26_f2, l27_f1, l27_f2, l28_f1, l28_f2, l29_f1, l29_f2, l30_f1, l30_f2, l31_f1, l31_f2, l32_f1, l32_f2, l33_f1, l33_f2, l34_f1, l34_f2, l35_f1, l35_f2, l36_f1, l36_f2, l37_f1, l37_f2, l38_f1, l38_f2, l39_f1, l39_f2, l40_f1, l40_f2, l41_f1, l41_f2, l42_f1, l42_f2, l43_f1, l43_f2, l44_f1, l44_f2, l45_f1, l45_f2, l46_f1, l46_f2, l47_f1, l47_f2, l48_f1, l48_f2, l49_f1, l49_f2, l50_f1, l50_f2, l51_f1, l51_f2, l52_f1, l52_f2, l53_f1, l53_f2, l54_f1, l54_f2, l55_f1, l55_f2, l56_f1, l56_f2, l57_f1, l57_f2, l58_f1, l58_f2, l59_f1, l59_f2, l60_f1, l60_f2, l61_f1, l61_f2, l62_f1, l62_f2, l63_f1, l63_f2, l64_f1, l64_f2, l65_f1, l65_f2, l66_f1, l66_f2, l67_f1, l67_f2, l68_f1, l68_f2, l69_f1, l69_f2, l70_f1, l70_f2, l71_f1, l71_f2, l72_f1, l72_f2, l73_f1, l73_f2, l74_f1, l74_f2, l75_f1, l75_f2, l76_f1, l76_f2, l77_f1, l77_f2, l78_f1, l78_f2, l79_f1, l79_f2, l80_f1, l80_f2, l81_f1, l81_f2, l82_f1, l82_f2, l83_f1, l83_f2, l84_f1, l84_f2, l85_f1, l85_f2, l86_f1, l86_f2, l87_f1, l87_f2, l88_f1, l88_f2, l89_f1, l89_f2, l90_f1, l90_f2, l91_f1, l91_f2, l92_f1, l92_f2, l93_f1, l93_f2, l94_f1, l94_f2, l95_f1, l95_f2, l96_f1, l96_f2, l97_f1, l97_f2, l98_f1, l98_f2, l99_f1, l99_f2, l100_f1, l100_f2, l101_f1, l101_f2, l102_f1, l102_f2, l103_f1, l103_f2, l104_f1, l104_f2, l105_f1, l105_f2, l106_f1, l106_f2, l107_f1, l107_f2, l108_f1, l108_f2, l109_f1, l109_f2, l110_f1, l110_f2, l111_f1, l111_f2, l112_f1, l112_f2, l113_f1, l113_f2, l114_f1, l114_f2, l115_f1, l115_f2, l116_f1, l116_f2, l117_f1, l117_f2, l118_f1, l118_f2, l119_f1, l119_f2, l120_f1, l120_f2, l121_f1, l121_f2, l122_f1, l122_f2, l123_f1, l123_f2, l124_f1, l124_f2, l125_f1, l125_f2, l126_f1, l126_f2, l127_f1, l127_f2, l128_f1, l128_f2, l129_f1, l129_f2, l130_f1, l130_f2, l131_f1, l131_f2, l132_f1, l132_f2, l133_f1, l133_f2, l134_f1, l134_f2, l135_f1, l135_f2, l136_f1, l136_f2, l137_f1, l137_f2, l138_f1, l138_f2, l139_f1, l139_f2, l140_f1, l140_f2, l141_f1, l141_f2, l142_f1, l142_f2, l143_f1, l143_f2, l144_f1, l144_f2, l145_f1, l145_f2, l146_f1, l146_f2, l147_f1, l147_f2, l148_f1, l148_f2, l149_f1, l149_f2, l150_f1, l150_f2, l151_f1, l151_f2, l152_f1, l152_f2, l153_f1, l153_f2, l154_f1, l154_f2, l155_f1, l155_f2, l156_f1, l156_f2, l157_f1, l157_f2, l158_f1, l158_f2, l159_f1, l159_f2, l160_f1, l160_f2, l161_f1, l161_f2, l162_f1, l162_f2, l163_f1, l163_f2, l164_f1, l164_f2, l165_f1, l165_f2, l166_f1, l166_f2, l167_f1, l167_f2, l168_f1, l168_f2, l169_f1, l169_f2, l170_f1, l170_f2, l171_f1, l171_f2, l172_f1, l172_f2, l173_f1, l173_f2, l174_f1, l174_f2, l175_f1, l175_f2, l176_f1, l176_f2, l177_f1, l177_f2, l178_f1, l178_f2, l179_f1, l179_f2, l180_f1, l180_f2, l181_f1, l181_f2, l182_f1, l182_f2, l183_f1, l183_f2, l184_f1, l184_f2, l185_f1, l185_f2, l186_f1, l186_f2, l187_f1, l187_f2, l188_f1, l188_f2, l189_f1, l189_f2, l190_f1, l190_f2, l191_f1, l191_f2, l192_f1, l192_f2, l193_f1, l193_f2, l194_f1, l194_f2, l195_f1, l195_f2, l196_f1, l196_f2, l197_f1, l197_f2, l198_f1, l198_f2, l199_f1, l199_f2, l200_f1, l200_f2, l201_f1, l201_f2, l202_f1, l202_f2, l203_f1, l203_f2, l204_f1, l204_f2, l205_f1, l205_f2, l206_f1, l206_f2, l207_f1, l207_f2, l208_f1, l208_f2, l209_f1, l209_f2, l210_f1, l210_f2, l211_f1, l211_f2, l212_f1, l212_f2, l213_f1, l213_f2, l214_f1, l214_f2, l215_f1, l215_f2, l216_f1, l216_f2, l217_f1, l217_f2, l218_f1, l218_f2, l219_f1, l219_f2, l220_f1, l220_f2, l221_f1, l221_f2, l222_f1, l222_f2, l223_f1, l223_f2, l224_f1, l224_f2, l225_f1, l225_f2, l226_f1, l226_f2, l227_f1, l227_f2, l228_f1, l228_f2, l229_f1, l229_f2, l230_f1, l230_f2, l231_f1, l231_f2, l232_f1, l232_f2, l233_f1, l233_f2, l234_f1, l234_f2, l235_f1, l235_f2, l236_f1, l236_f2, l237_f1, l237_f2, l238_f1, l238_f2, l239_f1, l239_f2, l240_f1, l240_f2, l241_f1, l241_f2, l242_f1, l242_f2, l243_f1, l243_f2, l244_f1, l244_f2, l245_f1, l245_f2, l246_f1, l246_f2, l247_f1, l247_f2, l248_f1, l248_f2, l249_f1, l249_f2, l250_f1, l250_f2, l251_f1, l251_f2, l252_f1, l252_f2, l253_f1, l253_f2, l254_f1, l254_f2, l255_f1, l255_f2, l256_f1, l256_f2, l257_f1, l257_f2, l258_f1, l258_f2, l259_f1, l259_f2, l260_f1, l260_f2, l261_f1, l261_f2, l262_f1, l262_f2, l263_f1, l263_f2, l264_f1, l264_f2, l265_f1, l265_f2, l266_f1, l266_f2, l267_f1, l267_f2, l268_f1, l268_f2, l269_f1, l269_f2, l270_f1, l270_f2, l271_f1, l271_f2, l272_f1, l272_f2, l273_f1, l273_f2, l274_f1, l274_f2, l275_f1, l275_f2, l276_f1, l276_f2, l277_f1, l277_f2, l278_f1, l278_f2, l279_f1, l279_f2, l280_f1, l280_f2, l281_f1, l281_f2, l282_f1, l282_f2, l283_f1, l283_f2, l284_f1, l284_f2, l285_f1, l285_f2, l286_f1, l286_f2, l287_f1, l287_f2, l288_f1, l288_f2, l289_f1, l289_f2, l290_f1, l290_f2, l291_f1, l291_f2, l292_f1, l292_f2, l293_f1, l293_f2, l294_f1, l294_f2, l295_f1, l295_f2, l296_f1, l296_f2, l297_f1, l297_f2, l298_f1, l298_f2, l299_f1, l299_f2, l300_f1, l300_f2, l301_f1, l301_f2, l302_f1, l302_f2, l303_f1, l303_f2, l304_f1, l304_f2, l305_f1, l305_f2, l306_f1, l306_f2, l307_f1, l307_f2, l308_f1, l308_f2, l309_f1, l309_f2, l310_f1, l310_f2, l311_f1, l311_f2, l312_f1, l312_f2, l313_f1, l313_f2, l314_f1, l314_f2, l315_f1, l315_f2, l316_f1, l316_f2, l317_f1, l317_f2, p_out1, p_out2, f_in1) = /* routed forces */ f_in1 + l0_f2 + l1_f2, l0_f1, l3_f1 + l48_f1, l3_f2 + l4_f1 + l49_f1 + l93_f1, l4_f2 + l5_f1 + l50_f1 + l94_f1, l5_f2 + l6_f1 + l51_f1 + l95_f1, l6_f2 + l7_f1 + l52_f1 + l96_f1, l7_f2 + l8_f1 + l53_f1 + l97_f1, l8_f2 + l9_f1 + l54_f1 + l98_f1, l9_f2 + l10_f1 + l55_f1 + l99_f1, l10_f2 + l11_f1 + l56_f1 + l100_f1, l11_f2 + l101_f1, l12_f1 + l48_f2 + l57_f1 + l93_f2, l12_f2 + l13_f1 + l49_f2 + l58_f1 + l94_f2 + l102_f1, l13_f2 + l14_f1 + l50_f2 + l59_f1 + l95_f2 + l103_f1, l14_f2 + l15_f1 + l51_f2 + l60_f1 + l96_f2 + l104_f1, l15_f2 + l16_f1 + l52_f2 + l61_f1 + l97_f2 + l105_f1, l16_f2 + l17_f1 + l53_f2 + l62_f1 + l98_f2 + l106_f1, l17_f2 + l18_f1 + l54_f2 + l63_f1 + l99_f2 + l107_f1, l18_f2 + l19_f1 + l55_f2 + l64_f1 + l100_f2 + l108_f1, l19_f2 + l56_f2 + l101_f2 + l109_f1, l20_f1 + l57_f2 + l65_f1 + l102_f2, l20_f2 + l21_f1 + l58_f2 + l66_f1 + l103_f2 + l110_f1, l21_f2 + l22_f1 + l59_f2 + l67_f1 + l104_f2 + l111_f1, l22_f2 + l23_f1 + l60_f2 + l68_f1 + l105_f2 + l112_f1, l23_f2 + l24_f1 + l61_f2 + l69_f1 + l106_f2 + l113_f1, l24_f2 + l25_f1 + l62_f2 + l70_f1 + l107_f2 + l114_f1, l25_f2 + l26_f1 + l63_f2 + l71_f1 + l108_f2 + l115_f1, l26_f2 + l64_f2 + l109_f2 + l116_f1, l27_f1 + l65_f2 + l72_f1 + l110_f2, l27_f2 + l28_f1 + l66_f2 + l73_f1 + l111_f2 + l117_f1, l28_f2 + l29_f1 + l67_f2 + l74_f1 + l112_f2 + l118_f1, l29_f2 + l30_f1 + l68_f2 + l75_f1 + l113_f2 + l119_f1, l30_f2 + l31_f1 + l69_f2 + l76_f1 + l114_f2 + l120_f1, l31_f2 + l32_f1 + l70_f2 + l77_f1 + l115_f2 + l121_f1, l32_f2 + l71_f2 + l116_f2 + l122_f1, l33_f1 + l72_f2 + l78_f1 + l117_f2, l33_f2 + l34_f1 + l73_f2 + l79_f1 + l118_f2 + l123_f1, l34_f2 + l35_f1 + l74_f2 + l80_f1 + l119_f2 + l124_f1, l1_f1 + l35_f2 + l36_f1 + l75_f2 + l81_f1 + l120_f2 + l125_f1, l36_f2 + l37_f1 + l76_f2 + l82_f1 + l121_f2 + l126_f1, l37_f2 + l77_f2 + l122_f2 + l127_f1, l38_f1 + l78_f2 + l83_f1 + l123_f2, l38_f2 + l39_f1 + l79_f2 + l84_f1 + l124_f2 + l128_f1, l39_f2 + l40_f1 + l80_f2 + l85_f1 + l125_f2 + l129_f1, l40_f2 + l41_f1 + l81_f2 + l86_f1 + l126_f2 + l130_f1, l41_f2 + l82_f2 + l127_f2 + l131_f1, l42_f1 + l83_f2 + l87_f1 + l128_f2, l42_f2 + l43_f1 + l84_f2 + l88_f1 + l129_f2 + l132_f1, l2_f1 + l43_f2 + l44_f1 + l85_f2 + l89_f1 + l130_f2 + l133_f1, l44_f2 + l86_f2 + l131_f2 + l134_f1, l45_f1 + l87_f2 + l90_f1 + l132_f2, l45_f2 + l46_f1 + l88_f2 + l91_f1 + l133_f2 + l135_f1, l46_f2 + l89_f2 + l134_f2 + l136_f1, l47_f1 + l90_f2 + l92_f1 + l135_f2, l47_f2 + l91_f2 + l136_f2 + l137_f1, l92_f2 + l137_f2, l138_f1 + l228_f1, l138_f2 + l139_f1 + l229_f1, l139_f2 + l140_f1 + l230_f1, l140_f2 + l141_f1 + l231_f1, l141_f2 + l142_f1 + l232_f1, l142_f2 + l143_f1 + l233_f1, l143_f2 + l144_f1 + l234_f1, l144_f2 + l145_f1 + l235_f1, l145_f2 + l146_f1 + l236_f1, l146_f2 + l237_f1, l147_f1 + l228_f2 + l238_f1, l147_f2 + l148_f1 + l229_f2 + l239_f1, l148_f2 + l149_f1 + l230_f2 + l240_f1, l149_f2 + l150_f1 + l231_f2 + l241_f1, l150_f2 + l151_f1 + l232_f2 + l242_f1, l151_f2 + l152_f1 + l233_f2 + l243_f1, l152_f2 + l153_f1 + l234_f2 + l244_f1, l153_f2 + l154_f1 + l235_f2 + l245_f1, l154_f2 + l155_f1 + l236_f2 + l246_f1, l155_f2 + l237_f2 + l247_f1, l156_f1 + l238_f2 + l248_f1, l156_f2 + l157_f1 + l239_f2 + l249_f1, l157_f2 + l158_f1 + l240_f2 + l250_f1, l158_f2 + l159_f1 + l241_f2 + l251_f1, l159_f2 + l160_f1 + l242_f2 + l252_f1, l160_f2 + l161_f1 + l243_f2 + l253_f1, l161_f2 + l162_f1 + l244_f2 + l254_f1, l162_f2 + l163_f1 + l245_f2 + l255_f1, l163_f2 + l164_f1 + l246_f2 + l256_f1, l164_f2 + l247_f2 + l257_f1, l165_f1 + l248_f2 + l258_f1, l165_f2 + l166_f1 + l249_f2 + l259_f1, l166_f2 + l167_f1 + l250_f2 + l260_f1, l167_f2 + l168_f1 + l251_f2 + l261_f1, l168_f2 + l169_f1 + l252_f2 + l262_f1, l169_f2 + l170_f1 + l253_f2 + l263_f1, l170_f2 + l171_f1 + l254_f2 + l264_f1, l2_f2 + l171_f2 + l172_f1 + l255_f2 + l265_f1, l172_f2 + l173_f1 + l256_f2 + l266_f1, l173_f2 + l257_f2 + l267_f1, l174_f1 + l258_f2 + l268_f1, l174_f2 + l175_f1 + l259_f2 + l269_f1, l175_f2 + l176_f1 + l260_f2 + l270_f1, l176_f2 + l177_f1 + l261_f2 + l271_f1, l177_f2 + l178_f1 + l262_f2 + l272_f1, l178_f2 + l179_f1 + l263_f2 + l273_f1, l179_f2 + l180_f1 + l264_f2 + l274_f1, l180_f2 + l181_f1 + l265_f2 + l275_f1, l181_f2 + l182_f1 + l266_f2 + l276_f1, l182_f2 + l267_f2 + l277_f1, l183_f1 + l268_f2 + l278_f1, l183_f2 + l184_f1 + l269_f2 + l279_f1, l184_f2 + l185_f1 + l270_f2 + l280_f1, l185_f2 + l186_f1 + l271_f2 + l281_f1, l186_f2 + l187_f1 + l272_f2 + l282_f1, l187_f2 + l188_f1 + l273_f2 + l283_f1, l188_f2 + l189_f1 + l274_f2 + l284_f1, l189_f2 + l190_f1 + l275_f2 + l285_f1, l190_f2 + l191_f1 + l276_f2 + l286_f1, l191_f2 + l277_f2 + l287_f1, l192_f1 + l278_f2 + l288_f1, l192_f2 + l193_f1 + l279_f2 + l289_f1, l193_f2 + l194_f1 + l280_f2 + l290_f1, l194_f2 + l195_f1 + l281_f2 + l291_f1, l195_f2 + l196_f1 + l282_f2 + l292_f1, l196_f2 + l197_f1 + l283_f2 + l293_f1, l197_f2 + l198_f1 + l284_f2 + l294_f1, l198_f2 + l199_f1 + l285_f2 + l295_f1, l199_f2 + l200_f1 + l286_f2 + l296_f1, l200_f2 + l287_f2 + l297_f1, l201_f1 + l288_f2 + l298_f1, l201_f2 + l202_f1 + l289_f2 + l299_f1, l202_f2 + l203_f1 + l290_f2 + l300_f1, l203_f2 + l204_f1 + l291_f2 + l301_f1, l204_f2 + l205_f1 + l292_f2 + l302_f1, l205_f2 + l206_f1 + l293_f2 + l303_f1, l206_f2 + l207_f1 + l294_f2 + l304_f1, l207_f2 + l208_f1 + l295_f2 + l305_f1, l208_f2 + l209_f1 + l296_f2 + l306_f1, l209_f2 + l297_f2 + l307_f1, l210_f1 + l298_f2 + l308_f1, l210_f2 + l211_f1 + l299_f2 + l309_f1, l211_f2 + l212_f1 + l300_f2 + l310_f1, l212_f2 + l213_f1 + l301_f2 + l311_f1, l213_f2 + l214_f1 + l302_f2 + l312_f1, l214_f2 + l215_f1 + l303_f2 + l313_f1, l215_f2 + l216_f1 + l304_f2 + l314_f1, l216_f2 + l217_f1 + l305_f2 + l315_f1, l217_f2 + l218_f1 + l306_f2 + l316_f1, l218_f2 + l307_f2 + l317_f1, l219_f1 + l308_f2, l219_f2 + l220_f1 + l309_f2, l220_f2 + l221_f1 + l310_f2, l221_f2 + l222_f1 + l311_f2, l222_f2 + l223_f1 + l312_f2, l223_f2 + l224_f1 + l313_f2, l224_f2 + l225_f1 + l314_f2, l225_f2 + l226_f1 + l315_f2, l226_f2 + l227_f1 + l316_f2, l227_f2 + l317_f2, /* pass-through */ p_out1, p_out2; nbMass = 157; nbFrcIn = 1; nbOut = 2; }; process = in1 : model:*(OutGain), *(OutGain); /* ========= MIMS SCRIPT USED FOR MODEL GENERATION ============= # A plucked triangular mesh model (fixed at corners) # Script author: James Leonard # A slow moving oscillator placed above the other # serving as a hammer @ham mass 0.3 1. 0. @g ground 1. @sp springDamper @g @ham 0.0001 0.05 # Add force input to the hammer @in1 frcInput @ham @c nlContact @t_m4_3 @ham 0. 0.01 0.5 0.001 @nls nlSpringDamper @t_m6_2 @me_m3_7 0.01 0.01 0.2 0. @t_M param 1 @t_K param 0.1 @t_Z param 0.001 @t_Zo param 0.00005 @t_m0_0 ground 0 @t_m0_1 osc t_M 0 t_Zo 0. 0. @t_m0_2 osc t_M 0 t_Zo 0. 0. @t_m0_3 osc t_M 0 t_Zo 0. 0. @t_m0_4 osc t_M 0 t_Zo 0. 0. @t_m0_5 osc t_M 0 t_Zo 0. 0. @t_m0_6 osc t_M 0 t_Zo 0. 0. @t_m0_7 osc t_M 0 t_Zo 0. 0. @t_m0_8 osc t_M 0 t_Zo 0. 0. @t_m0_9 ground 0 @t_m1_0 osc t_M 0 t_Zo 0. 0. @t_m1_1 osc t_M 0 t_Zo 0. 0. @t_m1_2 osc t_M 0 t_Zo 0. 0. @t_m1_3 osc t_M 0 t_Zo 0. 0. @t_m1_4 osc t_M 0 t_Zo 0. 0. @t_m1_5 osc t_M 0 t_Zo 0. 0. @t_m1_6 osc t_M 0 t_Zo 0. 0. @t_m1_7 osc t_M 0 t_Zo 0. 0. @t_m1_8 osc t_M 0 t_Zo 0. 0. @t_m2_0 osc t_M 0 t_Zo 0. 0. @t_m2_1 osc t_M 0 t_Zo 0. 0. @t_m2_2 osc t_M 0 t_Zo 0. 0. @t_m2_3 osc t_M 0 t_Zo 0. 0. @t_m2_4 osc t_M 0 t_Zo 0. 0. @t_m2_5 osc t_M 0 t_Zo 0. 0. @t_m2_6 osc t_M 0 t_Zo 0. 0. @t_m2_7 osc t_M 0 t_Zo 0. 0. @t_m3_0 osc t_M 0 t_Zo 0. 0. @t_m3_1 osc t_M 0 t_Zo 0. 0. @t_m3_2 osc t_M 0 t_Zo 0. 0. @t_m3_3 osc t_M 0 t_Zo 0. 0. @t_m3_4 osc t_M 0 t_Zo 0. 0. @t_m3_5 osc t_M 0 t_Zo 0. 0. @t_m3_6 osc t_M 0 t_Zo 0. 0. @t_m4_0 osc t_M 0 t_Zo 0. 0. @t_m4_1 osc t_M 0 t_Zo 0. 0. @t_m4_2 osc t_M 0 t_Zo 0. 0. @t_m4_3 osc t_M 0 t_Zo 0. 0. @t_m4_4 osc t_M 0 t_Zo 0. 0. @t_m4_5 osc t_M 0 t_Zo 0. 0. @t_m5_0 osc t_M 0 t_Zo 0. 0. @t_m5_1 osc t_M 0 t_Zo 0. 0. @t_m5_2 osc t_M 0 t_Zo 0. 0. @t_m5_3 osc t_M 0 t_Zo 0. 0. @t_m5_4 osc t_M 0 t_Zo 0. 0. @t_m6_0 osc t_M 0 t_Zo 0. 0. @t_m6_1 osc t_M 0 t_Zo 0. 0. @t_m6_2 osc t_M 0 t_Zo 0. 0. @t_m6_3 osc t_M 0 t_Zo 0. 0. @t_m7_0 osc t_M 0 t_Zo 0. 0. @t_m7_1 osc t_M 0 t_Zo 0. 0. @t_m7_2 osc t_M 0 t_Zo 0. 0. @t_m8_0 osc t_M 0 t_Zo 0. 0. @t_m8_1 osc t_M 0 t_Zo 0. 0. @t_m9_0 ground 0 @t_r0 springDamper @t_m0_0 @t_m0_1 t_K t_Z @t_r1 springDamper @t_m0_1 @t_m0_2 t_K t_Z @t_r2 springDamper @t_m0_2 @t_m0_3 t_K t_Z @t_r3 springDamper @t_m0_3 @t_m0_4 t_K t_Z @t_r4 springDamper @t_m0_4 @t_m0_5 t_K t_Z @t_r5 springDamper @t_m0_5 @t_m0_6 t_K t_Z @t_r6 springDamper @t_m0_6 @t_m0_7 t_K t_Z @t_r7 springDamper @t_m0_7 @t_m0_8 t_K t_Z @t_r8 springDamper @t_m0_8 @t_m0_9 t_K t_Z @t_r9 springDamper @t_m1_0 @t_m1_1 t_K t_Z @t_r10 springDamper @t_m1_1 @t_m1_2 t_K t_Z @t_r11 springDamper @t_m1_2 @t_m1_3 t_K t_Z @t_r12 springDamper @t_m1_3 @t_m1_4 t_K t_Z @t_r13 springDamper @t_m1_4 @t_m1_5 t_K t_Z @t_r14 springDamper @t_m1_5 @t_m1_6 t_K t_Z @t_r15 springDamper @t_m1_6 @t_m1_7 t_K t_Z @t_r16 springDamper @t_m1_7 @t_m1_8 t_K t_Z @t_r17 springDamper @t_m2_0 @t_m2_1 t_K t_Z @t_r18 springDamper @t_m2_1 @t_m2_2 t_K t_Z @t_r19 springDamper @t_m2_2 @t_m2_3 t_K t_Z @t_r20 springDamper @t_m2_3 @t_m2_4 t_K t_Z @t_r21 springDamper @t_m2_4 @t_m2_5 t_K t_Z @t_r22 springDamper @t_m2_5 @t_m2_6 t_K t_Z @t_r23 springDamper @t_m2_6 @t_m2_7 t_K t_Z @t_r24 springDamper @t_m3_0 @t_m3_1 t_K t_Z @t_r25 springDamper @t_m3_1 @t_m3_2 t_K t_Z @t_r26 springDamper @t_m3_2 @t_m3_3 t_K t_Z @t_r27 springDamper @t_m3_3 @t_m3_4 t_K t_Z @t_r28 springDamper @t_m3_4 @t_m3_5 t_K t_Z @t_r29 springDamper @t_m3_5 @t_m3_6 t_K t_Z @t_r30 springDamper @t_m4_0 @t_m4_1 t_K t_Z @t_r31 springDamper @t_m4_1 @t_m4_2 t_K t_Z @t_r32 springDamper @t_m4_2 @t_m4_3 t_K t_Z @t_r33 springDamper @t_m4_3 @t_m4_4 t_K t_Z @t_r34 springDamper @t_m4_4 @t_m4_5 t_K t_Z @t_r35 springDamper @t_m5_0 @t_m5_1 t_K t_Z @t_r36 springDamper @t_m5_1 @t_m5_2 t_K t_Z @t_r37 springDamper @t_m5_2 @t_m5_3 t_K t_Z @t_r38 springDamper @t_m5_3 @t_m5_4 t_K t_Z @t_r39 springDamper @t_m6_0 @t_m6_1 t_K t_Z @t_r40 springDamper @t_m6_1 @t_m6_2 t_K t_Z @t_r41 springDamper @t_m6_2 @t_m6_3 t_K t_Z @t_r42 springDamper @t_m7_0 @t_m7_1 t_K t_Z @t_r43 springDamper @t_m7_1 @t_m7_2 t_K t_Z @t_r44 springDamper @t_m8_0 @t_m8_1 t_K t_Z @t_r45 springDamper @t_m0_0 @t_m1_0 t_K t_Z @t_r46 springDamper @t_m0_1 @t_m1_1 t_K t_Z @t_r47 springDamper @t_m0_2 @t_m1_2 t_K t_Z @t_r48 springDamper @t_m0_3 @t_m1_3 t_K t_Z @t_r49 springDamper @t_m0_4 @t_m1_4 t_K t_Z @t_r50 springDamper @t_m0_5 @t_m1_5 t_K t_Z @t_r51 springDamper @t_m0_6 @t_m1_6 t_K t_Z @t_r52 springDamper @t_m0_7 @t_m1_7 t_K t_Z @t_r53 springDamper @t_m0_8 @t_m1_8 t_K t_Z @t_r54 springDamper @t_m1_0 @t_m2_0 t_K t_Z @t_r55 springDamper @t_m1_1 @t_m2_1 t_K t_Z @t_r56 springDamper @t_m1_2 @t_m2_2 t_K t_Z @t_r57 springDamper @t_m1_3 @t_m2_3 t_K t_Z @t_r58 springDamper @t_m1_4 @t_m2_4 t_K t_Z @t_r59 springDamper @t_m1_5 @t_m2_5 t_K t_Z @t_r60 springDamper @t_m1_6 @t_m2_6 t_K t_Z @t_r61 springDamper @t_m1_7 @t_m2_7 t_K t_Z @t_r62 springDamper @t_m2_0 @t_m3_0 t_K t_Z @t_r63 springDamper @t_m2_1 @t_m3_1 t_K t_Z @t_r64 springDamper @t_m2_2 @t_m3_2 t_K t_Z @t_r65 springDamper @t_m2_3 @t_m3_3 t_K t_Z @t_r66 springDamper @t_m2_4 @t_m3_4 t_K t_Z @t_r67 springDamper @t_m2_5 @t_m3_5 t_K t_Z @t_r68 springDamper @t_m2_6 @t_m3_6 t_K t_Z @t_r69 springDamper @t_m3_0 @t_m4_0 t_K t_Z @t_r70 springDamper @t_m3_1 @t_m4_1 t_K t_Z @t_r71 springDamper @t_m3_2 @t_m4_2 t_K t_Z @t_r72 springDamper @t_m3_3 @t_m4_3 t_K t_Z @t_r73 springDamper @t_m3_4 @t_m4_4 t_K t_Z @t_r74 springDamper @t_m3_5 @t_m4_5 t_K t_Z @t_r75 springDamper @t_m4_0 @t_m5_0 t_K t_Z @t_r76 springDamper @t_m4_1 @t_m5_1 t_K t_Z @t_r77 springDamper @t_m4_2 @t_m5_2 t_K t_Z @t_r78 springDamper @t_m4_3 @t_m5_3 t_K t_Z @t_r79 springDamper @t_m4_4 @t_m5_4 t_K t_Z @t_r80 springDamper @t_m5_0 @t_m6_0 t_K t_Z @t_r81 springDamper @t_m5_1 @t_m6_1 t_K t_Z @t_r82 springDamper @t_m5_2 @t_m6_2 t_K t_Z @t_r83 springDamper @t_m5_3 @t_m6_3 t_K t_Z @t_r84 springDamper @t_m6_0 @t_m7_0 t_K t_Z @t_r85 springDamper @t_m6_1 @t_m7_1 t_K t_Z @t_r86 springDamper @t_m6_2 @t_m7_2 t_K t_Z @t_r87 springDamper @t_m7_0 @t_m8_0 t_K t_Z @t_r88 springDamper @t_m7_1 @t_m8_1 t_K t_Z @t_r89 springDamper @t_m8_0 @t_m9_0 t_K t_Z @t_r90 springDamper @t_m0_1 @t_m1_0 t_K t_Z @t_r91 springDamper @t_m0_2 @t_m1_1 t_K t_Z @t_r92 springDamper @t_m0_3 @t_m1_2 t_K t_Z @t_r93 springDamper @t_m0_4 @t_m1_3 t_K t_Z @t_r94 springDamper @t_m0_5 @t_m1_4 t_K t_Z @t_r95 springDamper @t_m0_6 @t_m1_5 t_K t_Z @t_r96 springDamper @t_m0_7 @t_m1_6 t_K t_Z @t_r97 springDamper @t_m0_8 @t_m1_7 t_K t_Z @t_r98 springDamper @t_m0_9 @t_m1_8 t_K t_Z @t_r99 springDamper @t_m1_1 @t_m2_0 t_K t_Z @t_r100 springDamper @t_m1_2 @t_m2_1 t_K t_Z @t_r101 springDamper @t_m1_3 @t_m2_2 t_K t_Z @t_r102 springDamper @t_m1_4 @t_m2_3 t_K t_Z @t_r103 springDamper @t_m1_5 @t_m2_4 t_K t_Z @t_r104 springDamper @t_m1_6 @t_m2_5 t_K t_Z @t_r105 springDamper @t_m1_7 @t_m2_6 t_K t_Z @t_r106 springDamper @t_m1_8 @t_m2_7 t_K t_Z @t_r107 springDamper @t_m2_1 @t_m3_0 t_K t_Z @t_r108 springDamper @t_m2_2 @t_m3_1 t_K t_Z @t_r109 springDamper @t_m2_3 @t_m3_2 t_K t_Z @t_r110 springDamper @t_m2_4 @t_m3_3 t_K t_Z @t_r111 springDamper @t_m2_5 @t_m3_4 t_K t_Z @t_r112 springDamper @t_m2_6 @t_m3_5 t_K t_Z @t_r113 springDamper @t_m2_7 @t_m3_6 t_K t_Z @t_r114 springDamper @t_m3_1 @t_m4_0 t_K t_Z @t_r115 springDamper @t_m3_2 @t_m4_1 t_K t_Z @t_r116 springDamper @t_m3_3 @t_m4_2 t_K t_Z @t_r117 springDamper @t_m3_4 @t_m4_3 t_K t_Z @t_r118 springDamper @t_m3_5 @t_m4_4 t_K t_Z @t_r119 springDamper @t_m3_6 @t_m4_5 t_K t_Z @t_r120 springDamper @t_m4_1 @t_m5_0 t_K t_Z @t_r121 springDamper @t_m4_2 @t_m5_1 t_K t_Z @t_r122 springDamper @t_m4_3 @t_m5_2 t_K t_Z @t_r123 springDamper @t_m4_4 @t_m5_3 t_K t_Z @t_r124 springDamper @t_m4_5 @t_m5_4 t_K t_Z @t_r125 springDamper @t_m5_1 @t_m6_0 t_K t_Z @t_r126 springDamper @t_m5_2 @t_m6_1 t_K t_Z @t_r127 springDamper @t_m5_3 @t_m6_2 t_K t_Z @t_r128 springDamper @t_m5_4 @t_m6_3 t_K t_Z @t_r129 springDamper @t_m6_1 @t_m7_0 t_K t_Z @t_r130 springDamper @t_m6_2 @t_m7_1 t_K t_Z @t_r131 springDamper @t_m6_3 @t_m7_2 t_K t_Z @t_r132 springDamper @t_m7_1 @t_m8_0 t_K t_Z @t_r133 springDamper @t_m7_2 @t_m8_1 t_K t_Z @t_r134 springDamper @t_m8_1 @t_m9_0 t_K t_Z @me_M param 1 @me_K param 0.1 @me_Z param 0.001 @me_Zo param 0.00005 @me_m0_0 ground 0 @me_m0_1 osc me_M 0 me_Zo 0. 0. @me_m0_2 osc me_M 0 me_Zo 0. 0. @me_m0_3 osc me_M 0 me_Zo 0. 0. @me_m0_4 osc me_M 0 me_Zo 0. 0. @me_m0_5 osc me_M 0 me_Zo 0. 0. @me_m0_6 osc me_M 0 me_Zo 0. 0. @me_m0_7 osc me_M 0 me_Zo 0. 0. @me_m0_8 osc me_M 0 me_Zo 0. 0. @me_m0_9 ground 0 @me_m1_0 osc me_M 0 me_Zo 0. 0. @me_m1_1 osc me_M 0 me_Zo 0. 0. @me_m1_2 osc me_M 0 me_Zo 0. 0. @me_m1_3 osc me_M 0 me_Zo 0. 0. @me_m1_4 osc me_M 0 me_Zo 0. 0. @me_m1_5 osc me_M 0 me_Zo 0. 0. @me_m1_6 osc me_M 0 me_Zo 0. 0. @me_m1_7 osc me_M 0 me_Zo 0. 0. @me_m1_8 osc me_M 0 me_Zo 0. 0. @me_m1_9 osc me_M 0 me_Zo 0. 0. @me_m2_0 osc me_M 0 me_Zo 0. 0. @me_m2_1 osc me_M 0 me_Zo 0. 0. @me_m2_2 osc me_M 0 me_Zo 0. 0. @me_m2_3 osc me_M 0 me_Zo 0. 0. @me_m2_4 osc me_M 0 me_Zo 0. 0. @me_m2_5 osc me_M 0 me_Zo 0. 0. @me_m2_6 osc me_M 0 me_Zo 0. 0. @me_m2_7 osc me_M 0 me_Zo 0. 0. @me_m2_8 osc me_M 0 me_Zo 0. 0. @me_m2_9 osc me_M 0 me_Zo 0. 0. @me_m3_0 osc me_M 0 me_Zo 0. 0. @me_m3_1 osc me_M 0 me_Zo 0. 0. @me_m3_2 osc me_M 0 me_Zo 0. 0. @me_m3_3 osc me_M 0 me_Zo 0. 0. @me_m3_4 osc me_M 0 me_Zo 0. 0. @me_m3_5 osc me_M 0 me_Zo 0. 0. @me_m3_6 osc me_M 0 me_Zo 0. 0. @me_m3_7 osc me_M 0 me_Zo 0. 0. @me_m3_8 osc me_M 0 me_Zo 0. 0. @me_m3_9 osc me_M 0 me_Zo 0. 0. @me_m4_0 osc me_M 0 me_Zo 0. 0. @me_m4_1 osc me_M 0 me_Zo 0. 0. @me_m4_2 osc me_M 0 me_Zo 0. 0. @me_m4_3 osc me_M 0 me_Zo 0. 0. @me_m4_4 osc me_M 0 me_Zo 0. 0. @me_m4_5 osc me_M 0 me_Zo 0. 0. @me_m4_6 osc me_M 0 me_Zo 0. 0. @me_m4_7 osc me_M 0 me_Zo 0. 0. @me_m4_8 osc me_M 0 me_Zo 0. 0. @me_m4_9 osc me_M 0 me_Zo 0. 0. @me_m5_0 osc me_M 0 me_Zo 0. 0. @me_m5_1 osc me_M 0 me_Zo 0. 0. @me_m5_2 osc me_M 0 me_Zo 0. 0. @me_m5_3 osc me_M 0 me_Zo 0. 0. @me_m5_4 osc me_M 0 me_Zo 0. 0. @me_m5_5 osc me_M 0 me_Zo 0. 0. @me_m5_6 osc me_M 0 me_Zo 0. 0. @me_m5_7 osc me_M 0 me_Zo 0. 0. @me_m5_8 osc me_M 0 me_Zo 0. 0. @me_m5_9 osc me_M 0 me_Zo 0. 0. @me_m6_0 osc me_M 0 me_Zo 0. 0. @me_m6_1 osc me_M 0 me_Zo 0. 0. @me_m6_2 osc me_M 0 me_Zo 0. 0. @me_m6_3 osc me_M 0 me_Zo 0. 0. @me_m6_4 osc me_M 0 me_Zo 0. 0. @me_m6_5 osc me_M 0 me_Zo 0. 0. @me_m6_6 osc me_M 0 me_Zo 0. 0. @me_m6_7 osc me_M 0 me_Zo 0. 0. @me_m6_8 osc me_M 0 me_Zo 0. 0. @me_m6_9 osc me_M 0 me_Zo 0. 0. @me_m7_0 osc me_M 0 me_Zo 0. 0. @me_m7_1 osc me_M 0 me_Zo 0. 0. @me_m7_2 osc me_M 0 me_Zo 0. 0. @me_m7_3 osc me_M 0 me_Zo 0. 0. @me_m7_4 osc me_M 0 me_Zo 0. 0. @me_m7_5 osc me_M 0 me_Zo 0. 0. @me_m7_6 osc me_M 0 me_Zo 0. 0. @me_m7_7 osc me_M 0 me_Zo 0. 0. @me_m7_8 osc me_M 0 me_Zo 0. 0. @me_m7_9 osc me_M 0 me_Zo 0. 0. @me_m8_0 osc me_M 0 me_Zo 0. 0. @me_m8_1 osc me_M 0 me_Zo 0. 0. @me_m8_2 osc me_M 0 me_Zo 0. 0. @me_m8_3 osc me_M 0 me_Zo 0. 0. @me_m8_4 osc me_M 0 me_Zo 0. 0. @me_m8_5 osc me_M 0 me_Zo 0. 0. @me_m8_6 osc me_M 0 me_Zo 0. 0. @me_m8_7 osc me_M 0 me_Zo 0. 0. @me_m8_8 osc me_M 0 me_Zo 0. 0. @me_m8_9 osc me_M 0 me_Zo 0. 0. @me_m9_0 ground 0 @me_m9_1 osc me_M 0 me_Zo 0. 0. @me_m9_2 osc me_M 0 me_Zo 0. 0. @me_m9_3 osc me_M 0 me_Zo 0. 0. @me_m9_4 osc me_M 0 me_Zo 0. 0. @me_m9_5 osc me_M 0 me_Zo 0. 0. @me_m9_6 osc me_M 0 me_Zo 0. 0. @me_m9_7 osc me_M 0 me_Zo 0. 0. @me_m9_8 osc me_M 0 me_Zo 0. 0. @me_m9_9 ground 0 @me_r0 springDamper @me_m0_0 @me_m0_1 me_K me_Z @me_r1 springDamper @me_m0_1 @me_m0_2 me_K me_Z @me_r2 springDamper @me_m0_2 @me_m0_3 me_K me_Z @me_r3 springDamper @me_m0_3 @me_m0_4 me_K me_Z @me_r4 springDamper @me_m0_4 @me_m0_5 me_K me_Z @me_r5 springDamper @me_m0_5 @me_m0_6 me_K me_Z @me_r6 springDamper @me_m0_6 @me_m0_7 me_K me_Z @me_r7 springDamper @me_m0_7 @me_m0_8 me_K me_Z @me_r8 springDamper @me_m0_8 @me_m0_9 me_K me_Z @me_r9 springDamper @me_m1_0 @me_m1_1 me_K me_Z @me_r10 springDamper @me_m1_1 @me_m1_2 me_K me_Z @me_r11 springDamper @me_m1_2 @me_m1_3 me_K me_Z @me_r12 springDamper @me_m1_3 @me_m1_4 me_K me_Z @me_r13 springDamper @me_m1_4 @me_m1_5 me_K me_Z @me_r14 springDamper @me_m1_5 @me_m1_6 me_K me_Z @me_r15 springDamper @me_m1_6 @me_m1_7 me_K me_Z @me_r16 springDamper @me_m1_7 @me_m1_8 me_K me_Z @me_r17 springDamper @me_m1_8 @me_m1_9 me_K me_Z @me_r18 springDamper @me_m2_0 @me_m2_1 me_K me_Z @me_r19 springDamper @me_m2_1 @me_m2_2 me_K me_Z @me_r20 springDamper @me_m2_2 @me_m2_3 me_K me_Z @me_r21 springDamper @me_m2_3 @me_m2_4 me_K me_Z @me_r22 springDamper @me_m2_4 @me_m2_5 me_K me_Z @me_r23 springDamper @me_m2_5 @me_m2_6 me_K me_Z @me_r24 springDamper @me_m2_6 @me_m2_7 me_K me_Z @me_r25 springDamper @me_m2_7 @me_m2_8 me_K me_Z @me_r26 springDamper @me_m2_8 @me_m2_9 me_K me_Z @me_r27 springDamper @me_m3_0 @me_m3_1 me_K me_Z @me_r28 springDamper @me_m3_1 @me_m3_2 me_K me_Z @me_r29 springDamper @me_m3_2 @me_m3_3 me_K me_Z @me_r30 springDamper @me_m3_3 @me_m3_4 me_K me_Z @me_r31 springDamper @me_m3_4 @me_m3_5 me_K me_Z @me_r32 springDamper @me_m3_5 @me_m3_6 me_K me_Z @me_r33 springDamper @me_m3_6 @me_m3_7 me_K me_Z @me_r34 springDamper @me_m3_7 @me_m3_8 me_K me_Z @me_r35 springDamper @me_m3_8 @me_m3_9 me_K me_Z @me_r36 springDamper @me_m4_0 @me_m4_1 me_K me_Z @me_r37 springDamper @me_m4_1 @me_m4_2 me_K me_Z @me_r38 springDamper @me_m4_2 @me_m4_3 me_K me_Z @me_r39 springDamper @me_m4_3 @me_m4_4 me_K me_Z @me_r40 springDamper @me_m4_4 @me_m4_5 me_K me_Z @me_r41 springDamper @me_m4_5 @me_m4_6 me_K me_Z @me_r42 springDamper @me_m4_6 @me_m4_7 me_K me_Z @me_r43 springDamper @me_m4_7 @me_m4_8 me_K me_Z @me_r44 springDamper @me_m4_8 @me_m4_9 me_K me_Z @me_r45 springDamper @me_m5_0 @me_m5_1 me_K me_Z @me_r46 springDamper @me_m5_1 @me_m5_2 me_K me_Z @me_r47 springDamper @me_m5_2 @me_m5_3 me_K me_Z @me_r48 springDamper @me_m5_3 @me_m5_4 me_K me_Z @me_r49 springDamper @me_m5_4 @me_m5_5 me_K me_Z @me_r50 springDamper @me_m5_5 @me_m5_6 me_K me_Z @me_r51 springDamper @me_m5_6 @me_m5_7 me_K me_Z @me_r52 springDamper @me_m5_7 @me_m5_8 me_K me_Z @me_r53 springDamper @me_m5_8 @me_m5_9 me_K me_Z @me_r54 springDamper @me_m6_0 @me_m6_1 me_K me_Z @me_r55 springDamper @me_m6_1 @me_m6_2 me_K me_Z @me_r56 springDamper @me_m6_2 @me_m6_3 me_K me_Z @me_r57 springDamper @me_m6_3 @me_m6_4 me_K me_Z @me_r58 springDamper @me_m6_4 @me_m6_5 me_K me_Z @me_r59 springDamper @me_m6_5 @me_m6_6 me_K me_Z @me_r60 springDamper @me_m6_6 @me_m6_7 me_K me_Z @me_r61 springDamper @me_m6_7 @me_m6_8 me_K me_Z @me_r62 springDamper @me_m6_8 @me_m6_9 me_K me_Z @me_r63 springDamper @me_m7_0 @me_m7_1 me_K me_Z @me_r64 springDamper @me_m7_1 @me_m7_2 me_K me_Z @me_r65 springDamper @me_m7_2 @me_m7_3 me_K me_Z @me_r66 springDamper @me_m7_3 @me_m7_4 me_K me_Z @me_r67 springDamper @me_m7_4 @me_m7_5 me_K me_Z @me_r68 springDamper @me_m7_5 @me_m7_6 me_K me_Z @me_r69 springDamper @me_m7_6 @me_m7_7 me_K me_Z @me_r70 springDamper @me_m7_7 @me_m7_8 me_K me_Z @me_r71 springDamper @me_m7_8 @me_m7_9 me_K me_Z @me_r72 springDamper @me_m8_0 @me_m8_1 me_K me_Z @me_r73 springDamper @me_m8_1 @me_m8_2 me_K me_Z @me_r74 springDamper @me_m8_2 @me_m8_3 me_K me_Z @me_r75 springDamper @me_m8_3 @me_m8_4 me_K me_Z @me_r76 springDamper @me_m8_4 @me_m8_5 me_K me_Z @me_r77 springDamper @me_m8_5 @me_m8_6 me_K me_Z @me_r78 springDamper @me_m8_6 @me_m8_7 me_K me_Z @me_r79 springDamper @me_m8_7 @me_m8_8 me_K me_Z @me_r80 springDamper @me_m8_8 @me_m8_9 me_K me_Z @me_r81 springDamper @me_m9_0 @me_m9_1 me_K me_Z @me_r82 springDamper @me_m9_1 @me_m9_2 me_K me_Z @me_r83 springDamper @me_m9_2 @me_m9_3 me_K me_Z @me_r84 springDamper @me_m9_3 @me_m9_4 me_K me_Z @me_r85 springDamper @me_m9_4 @me_m9_5 me_K me_Z @me_r86 springDamper @me_m9_5 @me_m9_6 me_K me_Z @me_r87 springDamper @me_m9_6 @me_m9_7 me_K me_Z @me_r88 springDamper @me_m9_7 @me_m9_8 me_K me_Z @me_r89 springDamper @me_m9_8 @me_m9_9 me_K me_Z @me_r90 springDamper @me_m0_0 @me_m1_0 me_K me_Z @me_r91 springDamper @me_m0_1 @me_m1_1 me_K me_Z @me_r92 springDamper @me_m0_2 @me_m1_2 me_K me_Z @me_r93 springDamper @me_m0_3 @me_m1_3 me_K me_Z @me_r94 springDamper @me_m0_4 @me_m1_4 me_K me_Z @me_r95 springDamper @me_m0_5 @me_m1_5 me_K me_Z @me_r96 springDamper @me_m0_6 @me_m1_6 me_K me_Z @me_r97 springDamper @me_m0_7 @me_m1_7 me_K me_Z @me_r98 springDamper @me_m0_8 @me_m1_8 me_K me_Z @me_r99 springDamper @me_m0_9 @me_m1_9 me_K me_Z @me_r100 springDamper @me_m1_0 @me_m2_0 me_K me_Z @me_r101 springDamper @me_m1_1 @me_m2_1 me_K me_Z @me_r102 springDamper @me_m1_2 @me_m2_2 me_K me_Z @me_r103 springDamper @me_m1_3 @me_m2_3 me_K me_Z @me_r104 springDamper @me_m1_4 @me_m2_4 me_K me_Z @me_r105 springDamper @me_m1_5 @me_m2_5 me_K me_Z @me_r106 springDamper @me_m1_6 @me_m2_6 me_K me_Z @me_r107 springDamper @me_m1_7 @me_m2_7 me_K me_Z @me_r108 springDamper @me_m1_8 @me_m2_8 me_K me_Z @me_r109 springDamper @me_m1_9 @me_m2_9 me_K me_Z @me_r110 springDamper @me_m2_0 @me_m3_0 me_K me_Z @me_r111 springDamper @me_m2_1 @me_m3_1 me_K me_Z @me_r112 springDamper @me_m2_2 @me_m3_2 me_K me_Z @me_r113 springDamper @me_m2_3 @me_m3_3 me_K me_Z @me_r114 springDamper @me_m2_4 @me_m3_4 me_K me_Z @me_r115 springDamper @me_m2_5 @me_m3_5 me_K me_Z @me_r116 springDamper @me_m2_6 @me_m3_6 me_K me_Z @me_r117 springDamper @me_m2_7 @me_m3_7 me_K me_Z @me_r118 springDamper @me_m2_8 @me_m3_8 me_K me_Z @me_r119 springDamper @me_m2_9 @me_m3_9 me_K me_Z @me_r120 springDamper @me_m3_0 @me_m4_0 me_K me_Z @me_r121 springDamper @me_m3_1 @me_m4_1 me_K me_Z @me_r122 springDamper @me_m3_2 @me_m4_2 me_K me_Z @me_r123 springDamper @me_m3_3 @me_m4_3 me_K me_Z @me_r124 springDamper @me_m3_4 @me_m4_4 me_K me_Z @me_r125 springDamper @me_m3_5 @me_m4_5 me_K me_Z @me_r126 springDamper @me_m3_6 @me_m4_6 me_K me_Z @me_r127 springDamper @me_m3_7 @me_m4_7 me_K me_Z @me_r128 springDamper @me_m3_8 @me_m4_8 me_K me_Z @me_r129 springDamper @me_m3_9 @me_m4_9 me_K me_Z @me_r130 springDamper @me_m4_0 @me_m5_0 me_K me_Z @me_r131 springDamper @me_m4_1 @me_m5_1 me_K me_Z @me_r132 springDamper @me_m4_2 @me_m5_2 me_K me_Z @me_r133 springDamper @me_m4_3 @me_m5_3 me_K me_Z @me_r134 springDamper @me_m4_4 @me_m5_4 me_K me_Z @me_r135 springDamper @me_m4_5 @me_m5_5 me_K me_Z @me_r136 springDamper @me_m4_6 @me_m5_6 me_K me_Z @me_r137 springDamper @me_m4_7 @me_m5_7 me_K me_Z @me_r138 springDamper @me_m4_8 @me_m5_8 me_K me_Z @me_r139 springDamper @me_m4_9 @me_m5_9 me_K me_Z @me_r140 springDamper @me_m5_0 @me_m6_0 me_K me_Z @me_r141 springDamper @me_m5_1 @me_m6_1 me_K me_Z @me_r142 springDamper @me_m5_2 @me_m6_2 me_K me_Z @me_r143 springDamper @me_m5_3 @me_m6_3 me_K me_Z @me_r144 springDamper @me_m5_4 @me_m6_4 me_K me_Z @me_r145 springDamper @me_m5_5 @me_m6_5 me_K me_Z @me_r146 springDamper @me_m5_6 @me_m6_6 me_K me_Z @me_r147 springDamper @me_m5_7 @me_m6_7 me_K me_Z @me_r148 springDamper @me_m5_8 @me_m6_8 me_K me_Z @me_r149 springDamper @me_m5_9 @me_m6_9 me_K me_Z @me_r150 springDamper @me_m6_0 @me_m7_0 me_K me_Z @me_r151 springDamper @me_m6_1 @me_m7_1 me_K me_Z @me_r152 springDamper @me_m6_2 @me_m7_2 me_K me_Z @me_r153 springDamper @me_m6_3 @me_m7_3 me_K me_Z @me_r154 springDamper @me_m6_4 @me_m7_4 me_K me_Z @me_r155 springDamper @me_m6_5 @me_m7_5 me_K me_Z @me_r156 springDamper @me_m6_6 @me_m7_6 me_K me_Z @me_r157 springDamper @me_m6_7 @me_m7_7 me_K me_Z @me_r158 springDamper @me_m6_8 @me_m7_8 me_K me_Z @me_r159 springDamper @me_m6_9 @me_m7_9 me_K me_Z @me_r160 springDamper @me_m7_0 @me_m8_0 me_K me_Z @me_r161 springDamper @me_m7_1 @me_m8_1 me_K me_Z @me_r162 springDamper @me_m7_2 @me_m8_2 me_K me_Z @me_r163 springDamper @me_m7_3 @me_m8_3 me_K me_Z @me_r164 springDamper @me_m7_4 @me_m8_4 me_K me_Z @me_r165 springDamper @me_m7_5 @me_m8_5 me_K me_Z @me_r166 springDamper @me_m7_6 @me_m8_6 me_K me_Z @me_r167 springDamper @me_m7_7 @me_m8_7 me_K me_Z @me_r168 springDamper @me_m7_8 @me_m8_8 me_K me_Z @me_r169 springDamper @me_m7_9 @me_m8_9 me_K me_Z @me_r170 springDamper @me_m8_0 @me_m9_0 me_K me_Z @me_r171 springDamper @me_m8_1 @me_m9_1 me_K me_Z @me_r172 springDamper @me_m8_2 @me_m9_2 me_K me_Z @me_r173 springDamper @me_m8_3 @me_m9_3 me_K me_Z @me_r174 springDamper @me_m8_4 @me_m9_4 me_K me_Z @me_r175 springDamper @me_m8_5 @me_m9_5 me_K me_Z @me_r176 springDamper @me_m8_6 @me_m9_6 me_K me_Z @me_r177 springDamper @me_m8_7 @me_m9_7 me_K me_Z @me_r178 springDamper @me_m8_8 @me_m9_8 me_K me_Z @me_r179 springDamper @me_m8_9 @me_m9_9 me_K me_Z @out1 posOutput @me_m5_5 @out2 posOutput @t_m2_1 */
https://raw.githubusercontent.com/madskjeldgaard/mkfaustplugins/fd7cf250788174b5efa6ae3294997609830875d1/plugins/StrangeConstruct/StrangeConstruct.dsp
faust
========= DESCRITPION ============= A triangle mesh (fixed corners) struck by a hammer, connected (through a slightly non-linear spring) to a resonant square mesh (fixed corners). - inputs: Force impulse applied to the hammer - outputs: one listening point on the triangle, another on the resonnant mesh. - controls: triangle stiffness and daming, square mesh stiffness and damping, hammer force impulse scaling. Note: the block diagram of the model will give you nightmares. routed positions outputs routed forces pass-through ========= MIMS SCRIPT USED FOR MODEL GENERATION ============= # A plucked triangular mesh model (fixed at corners) # Script author: James Leonard # A slow moving oscillator placed above the other # serving as a hammer @ham mass 0.3 1. 0. @g ground 1. @sp springDamper @g @ham 0.0001 0.05 # Add force input to the hammer @in1 frcInput @ham @c nlContact @t_m4_3 @ham 0. 0.01 0.5 0.001 @nls nlSpringDamper @t_m6_2 @me_m3_7 0.01 0.01 0.2 0. @t_M param 1 @t_K param 0.1 @t_Z param 0.001 @t_Zo param 0.00005 @t_m0_0 ground 0 @t_m0_1 osc t_M 0 t_Zo 0. 0. @t_m0_2 osc t_M 0 t_Zo 0. 0. @t_m0_3 osc t_M 0 t_Zo 0. 0. @t_m0_4 osc t_M 0 t_Zo 0. 0. @t_m0_5 osc t_M 0 t_Zo 0. 0. @t_m0_6 osc t_M 0 t_Zo 0. 0. @t_m0_7 osc t_M 0 t_Zo 0. 0. @t_m0_8 osc t_M 0 t_Zo 0. 0. @t_m0_9 ground 0 @t_m1_0 osc t_M 0 t_Zo 0. 0. @t_m1_1 osc t_M 0 t_Zo 0. 0. @t_m1_2 osc t_M 0 t_Zo 0. 0. @t_m1_3 osc t_M 0 t_Zo 0. 0. @t_m1_4 osc t_M 0 t_Zo 0. 0. @t_m1_5 osc t_M 0 t_Zo 0. 0. @t_m1_6 osc t_M 0 t_Zo 0. 0. @t_m1_7 osc t_M 0 t_Zo 0. 0. @t_m1_8 osc t_M 0 t_Zo 0. 0. @t_m2_0 osc t_M 0 t_Zo 0. 0. @t_m2_1 osc t_M 0 t_Zo 0. 0. @t_m2_2 osc t_M 0 t_Zo 0. 0. @t_m2_3 osc t_M 0 t_Zo 0. 0. @t_m2_4 osc t_M 0 t_Zo 0. 0. @t_m2_5 osc t_M 0 t_Zo 0. 0. @t_m2_6 osc t_M 0 t_Zo 0. 0. @t_m2_7 osc t_M 0 t_Zo 0. 0. @t_m3_0 osc t_M 0 t_Zo 0. 0. @t_m3_1 osc t_M 0 t_Zo 0. 0. @t_m3_2 osc t_M 0 t_Zo 0. 0. @t_m3_3 osc t_M 0 t_Zo 0. 0. @t_m3_4 osc t_M 0 t_Zo 0. 0. @t_m3_5 osc t_M 0 t_Zo 0. 0. @t_m3_6 osc t_M 0 t_Zo 0. 0. @t_m4_0 osc t_M 0 t_Zo 0. 0. @t_m4_1 osc t_M 0 t_Zo 0. 0. @t_m4_2 osc t_M 0 t_Zo 0. 0. @t_m4_3 osc t_M 0 t_Zo 0. 0. @t_m4_4 osc t_M 0 t_Zo 0. 0. @t_m4_5 osc t_M 0 t_Zo 0. 0. @t_m5_0 osc t_M 0 t_Zo 0. 0. @t_m5_1 osc t_M 0 t_Zo 0. 0. @t_m5_2 osc t_M 0 t_Zo 0. 0. @t_m5_3 osc t_M 0 t_Zo 0. 0. @t_m5_4 osc t_M 0 t_Zo 0. 0. @t_m6_0 osc t_M 0 t_Zo 0. 0. @t_m6_1 osc t_M 0 t_Zo 0. 0. @t_m6_2 osc t_M 0 t_Zo 0. 0. @t_m6_3 osc t_M 0 t_Zo 0. 0. @t_m7_0 osc t_M 0 t_Zo 0. 0. @t_m7_1 osc t_M 0 t_Zo 0. 0. @t_m7_2 osc t_M 0 t_Zo 0. 0. @t_m8_0 osc t_M 0 t_Zo 0. 0. @t_m8_1 osc t_M 0 t_Zo 0. 0. @t_m9_0 ground 0 @t_r0 springDamper @t_m0_0 @t_m0_1 t_K t_Z @t_r1 springDamper @t_m0_1 @t_m0_2 t_K t_Z @t_r2 springDamper @t_m0_2 @t_m0_3 t_K t_Z @t_r3 springDamper @t_m0_3 @t_m0_4 t_K t_Z @t_r4 springDamper @t_m0_4 @t_m0_5 t_K t_Z @t_r5 springDamper @t_m0_5 @t_m0_6 t_K t_Z @t_r6 springDamper @t_m0_6 @t_m0_7 t_K t_Z @t_r7 springDamper @t_m0_7 @t_m0_8 t_K t_Z @t_r8 springDamper @t_m0_8 @t_m0_9 t_K t_Z @t_r9 springDamper @t_m1_0 @t_m1_1 t_K t_Z @t_r10 springDamper @t_m1_1 @t_m1_2 t_K t_Z @t_r11 springDamper @t_m1_2 @t_m1_3 t_K t_Z @t_r12 springDamper @t_m1_3 @t_m1_4 t_K t_Z @t_r13 springDamper @t_m1_4 @t_m1_5 t_K t_Z @t_r14 springDamper @t_m1_5 @t_m1_6 t_K t_Z @t_r15 springDamper @t_m1_6 @t_m1_7 t_K t_Z @t_r16 springDamper @t_m1_7 @t_m1_8 t_K t_Z @t_r17 springDamper @t_m2_0 @t_m2_1 t_K t_Z @t_r18 springDamper @t_m2_1 @t_m2_2 t_K t_Z @t_r19 springDamper @t_m2_2 @t_m2_3 t_K t_Z @t_r20 springDamper @t_m2_3 @t_m2_4 t_K t_Z @t_r21 springDamper @t_m2_4 @t_m2_5 t_K t_Z @t_r22 springDamper @t_m2_5 @t_m2_6 t_K t_Z @t_r23 springDamper @t_m2_6 @t_m2_7 t_K t_Z @t_r24 springDamper @t_m3_0 @t_m3_1 t_K t_Z @t_r25 springDamper @t_m3_1 @t_m3_2 t_K t_Z @t_r26 springDamper @t_m3_2 @t_m3_3 t_K t_Z @t_r27 springDamper @t_m3_3 @t_m3_4 t_K t_Z @t_r28 springDamper @t_m3_4 @t_m3_5 t_K t_Z @t_r29 springDamper @t_m3_5 @t_m3_6 t_K t_Z @t_r30 springDamper @t_m4_0 @t_m4_1 t_K t_Z @t_r31 springDamper @t_m4_1 @t_m4_2 t_K t_Z @t_r32 springDamper @t_m4_2 @t_m4_3 t_K t_Z @t_r33 springDamper @t_m4_3 @t_m4_4 t_K t_Z @t_r34 springDamper @t_m4_4 @t_m4_5 t_K t_Z @t_r35 springDamper @t_m5_0 @t_m5_1 t_K t_Z @t_r36 springDamper @t_m5_1 @t_m5_2 t_K t_Z @t_r37 springDamper @t_m5_2 @t_m5_3 t_K t_Z @t_r38 springDamper @t_m5_3 @t_m5_4 t_K t_Z @t_r39 springDamper @t_m6_0 @t_m6_1 t_K t_Z @t_r40 springDamper @t_m6_1 @t_m6_2 t_K t_Z @t_r41 springDamper @t_m6_2 @t_m6_3 t_K t_Z @t_r42 springDamper @t_m7_0 @t_m7_1 t_K t_Z @t_r43 springDamper @t_m7_1 @t_m7_2 t_K t_Z @t_r44 springDamper @t_m8_0 @t_m8_1 t_K t_Z @t_r45 springDamper @t_m0_0 @t_m1_0 t_K t_Z @t_r46 springDamper @t_m0_1 @t_m1_1 t_K t_Z @t_r47 springDamper @t_m0_2 @t_m1_2 t_K t_Z @t_r48 springDamper @t_m0_3 @t_m1_3 t_K t_Z @t_r49 springDamper @t_m0_4 @t_m1_4 t_K t_Z @t_r50 springDamper @t_m0_5 @t_m1_5 t_K t_Z @t_r51 springDamper @t_m0_6 @t_m1_6 t_K t_Z @t_r52 springDamper @t_m0_7 @t_m1_7 t_K t_Z @t_r53 springDamper @t_m0_8 @t_m1_8 t_K t_Z @t_r54 springDamper @t_m1_0 @t_m2_0 t_K t_Z @t_r55 springDamper @t_m1_1 @t_m2_1 t_K t_Z @t_r56 springDamper @t_m1_2 @t_m2_2 t_K t_Z @t_r57 springDamper @t_m1_3 @t_m2_3 t_K t_Z @t_r58 springDamper @t_m1_4 @t_m2_4 t_K t_Z @t_r59 springDamper @t_m1_5 @t_m2_5 t_K t_Z @t_r60 springDamper @t_m1_6 @t_m2_6 t_K t_Z @t_r61 springDamper @t_m1_7 @t_m2_7 t_K t_Z @t_r62 springDamper @t_m2_0 @t_m3_0 t_K t_Z @t_r63 springDamper @t_m2_1 @t_m3_1 t_K t_Z @t_r64 springDamper @t_m2_2 @t_m3_2 t_K t_Z @t_r65 springDamper @t_m2_3 @t_m3_3 t_K t_Z @t_r66 springDamper @t_m2_4 @t_m3_4 t_K t_Z @t_r67 springDamper @t_m2_5 @t_m3_5 t_K t_Z @t_r68 springDamper @t_m2_6 @t_m3_6 t_K t_Z @t_r69 springDamper @t_m3_0 @t_m4_0 t_K t_Z @t_r70 springDamper @t_m3_1 @t_m4_1 t_K t_Z @t_r71 springDamper @t_m3_2 @t_m4_2 t_K t_Z @t_r72 springDamper @t_m3_3 @t_m4_3 t_K t_Z @t_r73 springDamper @t_m3_4 @t_m4_4 t_K t_Z @t_r74 springDamper @t_m3_5 @t_m4_5 t_K t_Z @t_r75 springDamper @t_m4_0 @t_m5_0 t_K t_Z @t_r76 springDamper @t_m4_1 @t_m5_1 t_K t_Z @t_r77 springDamper @t_m4_2 @t_m5_2 t_K t_Z @t_r78 springDamper @t_m4_3 @t_m5_3 t_K t_Z @t_r79 springDamper @t_m4_4 @t_m5_4 t_K t_Z @t_r80 springDamper @t_m5_0 @t_m6_0 t_K t_Z @t_r81 springDamper @t_m5_1 @t_m6_1 t_K t_Z @t_r82 springDamper @t_m5_2 @t_m6_2 t_K t_Z @t_r83 springDamper @t_m5_3 @t_m6_3 t_K t_Z @t_r84 springDamper @t_m6_0 @t_m7_0 t_K t_Z @t_r85 springDamper @t_m6_1 @t_m7_1 t_K t_Z @t_r86 springDamper @t_m6_2 @t_m7_2 t_K t_Z @t_r87 springDamper @t_m7_0 @t_m8_0 t_K t_Z @t_r88 springDamper @t_m7_1 @t_m8_1 t_K t_Z @t_r89 springDamper @t_m8_0 @t_m9_0 t_K t_Z @t_r90 springDamper @t_m0_1 @t_m1_0 t_K t_Z @t_r91 springDamper @t_m0_2 @t_m1_1 t_K t_Z @t_r92 springDamper @t_m0_3 @t_m1_2 t_K t_Z @t_r93 springDamper @t_m0_4 @t_m1_3 t_K t_Z @t_r94 springDamper @t_m0_5 @t_m1_4 t_K t_Z @t_r95 springDamper @t_m0_6 @t_m1_5 t_K t_Z @t_r96 springDamper @t_m0_7 @t_m1_6 t_K t_Z @t_r97 springDamper @t_m0_8 @t_m1_7 t_K t_Z @t_r98 springDamper @t_m0_9 @t_m1_8 t_K t_Z @t_r99 springDamper @t_m1_1 @t_m2_0 t_K t_Z @t_r100 springDamper @t_m1_2 @t_m2_1 t_K t_Z @t_r101 springDamper @t_m1_3 @t_m2_2 t_K t_Z @t_r102 springDamper @t_m1_4 @t_m2_3 t_K t_Z @t_r103 springDamper @t_m1_5 @t_m2_4 t_K t_Z @t_r104 springDamper @t_m1_6 @t_m2_5 t_K t_Z @t_r105 springDamper @t_m1_7 @t_m2_6 t_K t_Z @t_r106 springDamper @t_m1_8 @t_m2_7 t_K t_Z @t_r107 springDamper @t_m2_1 @t_m3_0 t_K t_Z @t_r108 springDamper @t_m2_2 @t_m3_1 t_K t_Z @t_r109 springDamper @t_m2_3 @t_m3_2 t_K t_Z @t_r110 springDamper @t_m2_4 @t_m3_3 t_K t_Z @t_r111 springDamper @t_m2_5 @t_m3_4 t_K t_Z @t_r112 springDamper @t_m2_6 @t_m3_5 t_K t_Z @t_r113 springDamper @t_m2_7 @t_m3_6 t_K t_Z @t_r114 springDamper @t_m3_1 @t_m4_0 t_K t_Z @t_r115 springDamper @t_m3_2 @t_m4_1 t_K t_Z @t_r116 springDamper @t_m3_3 @t_m4_2 t_K t_Z @t_r117 springDamper @t_m3_4 @t_m4_3 t_K t_Z @t_r118 springDamper @t_m3_5 @t_m4_4 t_K t_Z @t_r119 springDamper @t_m3_6 @t_m4_5 t_K t_Z @t_r120 springDamper @t_m4_1 @t_m5_0 t_K t_Z @t_r121 springDamper @t_m4_2 @t_m5_1 t_K t_Z @t_r122 springDamper @t_m4_3 @t_m5_2 t_K t_Z @t_r123 springDamper @t_m4_4 @t_m5_3 t_K t_Z @t_r124 springDamper @t_m4_5 @t_m5_4 t_K t_Z @t_r125 springDamper @t_m5_1 @t_m6_0 t_K t_Z @t_r126 springDamper @t_m5_2 @t_m6_1 t_K t_Z @t_r127 springDamper @t_m5_3 @t_m6_2 t_K t_Z @t_r128 springDamper @t_m5_4 @t_m6_3 t_K t_Z @t_r129 springDamper @t_m6_1 @t_m7_0 t_K t_Z @t_r130 springDamper @t_m6_2 @t_m7_1 t_K t_Z @t_r131 springDamper @t_m6_3 @t_m7_2 t_K t_Z @t_r132 springDamper @t_m7_1 @t_m8_0 t_K t_Z @t_r133 springDamper @t_m7_2 @t_m8_1 t_K t_Z @t_r134 springDamper @t_m8_1 @t_m9_0 t_K t_Z @me_M param 1 @me_K param 0.1 @me_Z param 0.001 @me_Zo param 0.00005 @me_m0_0 ground 0 @me_m0_1 osc me_M 0 me_Zo 0. 0. @me_m0_2 osc me_M 0 me_Zo 0. 0. @me_m0_3 osc me_M 0 me_Zo 0. 0. @me_m0_4 osc me_M 0 me_Zo 0. 0. @me_m0_5 osc me_M 0 me_Zo 0. 0. @me_m0_6 osc me_M 0 me_Zo 0. 0. @me_m0_7 osc me_M 0 me_Zo 0. 0. @me_m0_8 osc me_M 0 me_Zo 0. 0. @me_m0_9 ground 0 @me_m1_0 osc me_M 0 me_Zo 0. 0. @me_m1_1 osc me_M 0 me_Zo 0. 0. @me_m1_2 osc me_M 0 me_Zo 0. 0. @me_m1_3 osc me_M 0 me_Zo 0. 0. @me_m1_4 osc me_M 0 me_Zo 0. 0. @me_m1_5 osc me_M 0 me_Zo 0. 0. @me_m1_6 osc me_M 0 me_Zo 0. 0. @me_m1_7 osc me_M 0 me_Zo 0. 0. @me_m1_8 osc me_M 0 me_Zo 0. 0. @me_m1_9 osc me_M 0 me_Zo 0. 0. @me_m2_0 osc me_M 0 me_Zo 0. 0. @me_m2_1 osc me_M 0 me_Zo 0. 0. @me_m2_2 osc me_M 0 me_Zo 0. 0. @me_m2_3 osc me_M 0 me_Zo 0. 0. @me_m2_4 osc me_M 0 me_Zo 0. 0. @me_m2_5 osc me_M 0 me_Zo 0. 0. @me_m2_6 osc me_M 0 me_Zo 0. 0. @me_m2_7 osc me_M 0 me_Zo 0. 0. @me_m2_8 osc me_M 0 me_Zo 0. 0. @me_m2_9 osc me_M 0 me_Zo 0. 0. @me_m3_0 osc me_M 0 me_Zo 0. 0. @me_m3_1 osc me_M 0 me_Zo 0. 0. @me_m3_2 osc me_M 0 me_Zo 0. 0. @me_m3_3 osc me_M 0 me_Zo 0. 0. @me_m3_4 osc me_M 0 me_Zo 0. 0. @me_m3_5 osc me_M 0 me_Zo 0. 0. @me_m3_6 osc me_M 0 me_Zo 0. 0. @me_m3_7 osc me_M 0 me_Zo 0. 0. @me_m3_8 osc me_M 0 me_Zo 0. 0. @me_m3_9 osc me_M 0 me_Zo 0. 0. @me_m4_0 osc me_M 0 me_Zo 0. 0. @me_m4_1 osc me_M 0 me_Zo 0. 0. @me_m4_2 osc me_M 0 me_Zo 0. 0. @me_m4_3 osc me_M 0 me_Zo 0. 0. @me_m4_4 osc me_M 0 me_Zo 0. 0. @me_m4_5 osc me_M 0 me_Zo 0. 0. @me_m4_6 osc me_M 0 me_Zo 0. 0. @me_m4_7 osc me_M 0 me_Zo 0. 0. @me_m4_8 osc me_M 0 me_Zo 0. 0. @me_m4_9 osc me_M 0 me_Zo 0. 0. @me_m5_0 osc me_M 0 me_Zo 0. 0. @me_m5_1 osc me_M 0 me_Zo 0. 0. @me_m5_2 osc me_M 0 me_Zo 0. 0. @me_m5_3 osc me_M 0 me_Zo 0. 0. @me_m5_4 osc me_M 0 me_Zo 0. 0. @me_m5_5 osc me_M 0 me_Zo 0. 0. @me_m5_6 osc me_M 0 me_Zo 0. 0. @me_m5_7 osc me_M 0 me_Zo 0. 0. @me_m5_8 osc me_M 0 me_Zo 0. 0. @me_m5_9 osc me_M 0 me_Zo 0. 0. @me_m6_0 osc me_M 0 me_Zo 0. 0. @me_m6_1 osc me_M 0 me_Zo 0. 0. @me_m6_2 osc me_M 0 me_Zo 0. 0. @me_m6_3 osc me_M 0 me_Zo 0. 0. @me_m6_4 osc me_M 0 me_Zo 0. 0. @me_m6_5 osc me_M 0 me_Zo 0. 0. @me_m6_6 osc me_M 0 me_Zo 0. 0. @me_m6_7 osc me_M 0 me_Zo 0. 0. @me_m6_8 osc me_M 0 me_Zo 0. 0. @me_m6_9 osc me_M 0 me_Zo 0. 0. @me_m7_0 osc me_M 0 me_Zo 0. 0. @me_m7_1 osc me_M 0 me_Zo 0. 0. @me_m7_2 osc me_M 0 me_Zo 0. 0. @me_m7_3 osc me_M 0 me_Zo 0. 0. @me_m7_4 osc me_M 0 me_Zo 0. 0. @me_m7_5 osc me_M 0 me_Zo 0. 0. @me_m7_6 osc me_M 0 me_Zo 0. 0. @me_m7_7 osc me_M 0 me_Zo 0. 0. @me_m7_8 osc me_M 0 me_Zo 0. 0. @me_m7_9 osc me_M 0 me_Zo 0. 0. @me_m8_0 osc me_M 0 me_Zo 0. 0. @me_m8_1 osc me_M 0 me_Zo 0. 0. @me_m8_2 osc me_M 0 me_Zo 0. 0. @me_m8_3 osc me_M 0 me_Zo 0. 0. @me_m8_4 osc me_M 0 me_Zo 0. 0. @me_m8_5 osc me_M 0 me_Zo 0. 0. @me_m8_6 osc me_M 0 me_Zo 0. 0. @me_m8_7 osc me_M 0 me_Zo 0. 0. @me_m8_8 osc me_M 0 me_Zo 0. 0. @me_m8_9 osc me_M 0 me_Zo 0. 0. @me_m9_0 ground 0 @me_m9_1 osc me_M 0 me_Zo 0. 0. @me_m9_2 osc me_M 0 me_Zo 0. 0. @me_m9_3 osc me_M 0 me_Zo 0. 0. @me_m9_4 osc me_M 0 me_Zo 0. 0. @me_m9_5 osc me_M 0 me_Zo 0. 0. @me_m9_6 osc me_M 0 me_Zo 0. 0. @me_m9_7 osc me_M 0 me_Zo 0. 0. @me_m9_8 osc me_M 0 me_Zo 0. 0. @me_m9_9 ground 0 @me_r0 springDamper @me_m0_0 @me_m0_1 me_K me_Z @me_r1 springDamper @me_m0_1 @me_m0_2 me_K me_Z @me_r2 springDamper @me_m0_2 @me_m0_3 me_K me_Z @me_r3 springDamper @me_m0_3 @me_m0_4 me_K me_Z @me_r4 springDamper @me_m0_4 @me_m0_5 me_K me_Z @me_r5 springDamper @me_m0_5 @me_m0_6 me_K me_Z @me_r6 springDamper @me_m0_6 @me_m0_7 me_K me_Z @me_r7 springDamper @me_m0_7 @me_m0_8 me_K me_Z @me_r8 springDamper @me_m0_8 @me_m0_9 me_K me_Z @me_r9 springDamper @me_m1_0 @me_m1_1 me_K me_Z @me_r10 springDamper @me_m1_1 @me_m1_2 me_K me_Z @me_r11 springDamper @me_m1_2 @me_m1_3 me_K me_Z @me_r12 springDamper @me_m1_3 @me_m1_4 me_K me_Z @me_r13 springDamper @me_m1_4 @me_m1_5 me_K me_Z @me_r14 springDamper @me_m1_5 @me_m1_6 me_K me_Z @me_r15 springDamper @me_m1_6 @me_m1_7 me_K me_Z @me_r16 springDamper @me_m1_7 @me_m1_8 me_K me_Z @me_r17 springDamper @me_m1_8 @me_m1_9 me_K me_Z @me_r18 springDamper @me_m2_0 @me_m2_1 me_K me_Z @me_r19 springDamper @me_m2_1 @me_m2_2 me_K me_Z @me_r20 springDamper @me_m2_2 @me_m2_3 me_K me_Z @me_r21 springDamper @me_m2_3 @me_m2_4 me_K me_Z @me_r22 springDamper @me_m2_4 @me_m2_5 me_K me_Z @me_r23 springDamper @me_m2_5 @me_m2_6 me_K me_Z @me_r24 springDamper @me_m2_6 @me_m2_7 me_K me_Z @me_r25 springDamper @me_m2_7 @me_m2_8 me_K me_Z @me_r26 springDamper @me_m2_8 @me_m2_9 me_K me_Z @me_r27 springDamper @me_m3_0 @me_m3_1 me_K me_Z @me_r28 springDamper @me_m3_1 @me_m3_2 me_K me_Z @me_r29 springDamper @me_m3_2 @me_m3_3 me_K me_Z @me_r30 springDamper @me_m3_3 @me_m3_4 me_K me_Z @me_r31 springDamper @me_m3_4 @me_m3_5 me_K me_Z @me_r32 springDamper @me_m3_5 @me_m3_6 me_K me_Z @me_r33 springDamper @me_m3_6 @me_m3_7 me_K me_Z @me_r34 springDamper @me_m3_7 @me_m3_8 me_K me_Z @me_r35 springDamper @me_m3_8 @me_m3_9 me_K me_Z @me_r36 springDamper @me_m4_0 @me_m4_1 me_K me_Z @me_r37 springDamper @me_m4_1 @me_m4_2 me_K me_Z @me_r38 springDamper @me_m4_2 @me_m4_3 me_K me_Z @me_r39 springDamper @me_m4_3 @me_m4_4 me_K me_Z @me_r40 springDamper @me_m4_4 @me_m4_5 me_K me_Z @me_r41 springDamper @me_m4_5 @me_m4_6 me_K me_Z @me_r42 springDamper @me_m4_6 @me_m4_7 me_K me_Z @me_r43 springDamper @me_m4_7 @me_m4_8 me_K me_Z @me_r44 springDamper @me_m4_8 @me_m4_9 me_K me_Z @me_r45 springDamper @me_m5_0 @me_m5_1 me_K me_Z @me_r46 springDamper @me_m5_1 @me_m5_2 me_K me_Z @me_r47 springDamper @me_m5_2 @me_m5_3 me_K me_Z @me_r48 springDamper @me_m5_3 @me_m5_4 me_K me_Z @me_r49 springDamper @me_m5_4 @me_m5_5 me_K me_Z @me_r50 springDamper @me_m5_5 @me_m5_6 me_K me_Z @me_r51 springDamper @me_m5_6 @me_m5_7 me_K me_Z @me_r52 springDamper @me_m5_7 @me_m5_8 me_K me_Z @me_r53 springDamper @me_m5_8 @me_m5_9 me_K me_Z @me_r54 springDamper @me_m6_0 @me_m6_1 me_K me_Z @me_r55 springDamper @me_m6_1 @me_m6_2 me_K me_Z @me_r56 springDamper @me_m6_2 @me_m6_3 me_K me_Z @me_r57 springDamper @me_m6_3 @me_m6_4 me_K me_Z @me_r58 springDamper @me_m6_4 @me_m6_5 me_K me_Z @me_r59 springDamper @me_m6_5 @me_m6_6 me_K me_Z @me_r60 springDamper @me_m6_6 @me_m6_7 me_K me_Z @me_r61 springDamper @me_m6_7 @me_m6_8 me_K me_Z @me_r62 springDamper @me_m6_8 @me_m6_9 me_K me_Z @me_r63 springDamper @me_m7_0 @me_m7_1 me_K me_Z @me_r64 springDamper @me_m7_1 @me_m7_2 me_K me_Z @me_r65 springDamper @me_m7_2 @me_m7_3 me_K me_Z @me_r66 springDamper @me_m7_3 @me_m7_4 me_K me_Z @me_r67 springDamper @me_m7_4 @me_m7_5 me_K me_Z @me_r68 springDamper @me_m7_5 @me_m7_6 me_K me_Z @me_r69 springDamper @me_m7_6 @me_m7_7 me_K me_Z @me_r70 springDamper @me_m7_7 @me_m7_8 me_K me_Z @me_r71 springDamper @me_m7_8 @me_m7_9 me_K me_Z @me_r72 springDamper @me_m8_0 @me_m8_1 me_K me_Z @me_r73 springDamper @me_m8_1 @me_m8_2 me_K me_Z @me_r74 springDamper @me_m8_2 @me_m8_3 me_K me_Z @me_r75 springDamper @me_m8_3 @me_m8_4 me_K me_Z @me_r76 springDamper @me_m8_4 @me_m8_5 me_K me_Z @me_r77 springDamper @me_m8_5 @me_m8_6 me_K me_Z @me_r78 springDamper @me_m8_6 @me_m8_7 me_K me_Z @me_r79 springDamper @me_m8_7 @me_m8_8 me_K me_Z @me_r80 springDamper @me_m8_8 @me_m8_9 me_K me_Z @me_r81 springDamper @me_m9_0 @me_m9_1 me_K me_Z @me_r82 springDamper @me_m9_1 @me_m9_2 me_K me_Z @me_r83 springDamper @me_m9_2 @me_m9_3 me_K me_Z @me_r84 springDamper @me_m9_3 @me_m9_4 me_K me_Z @me_r85 springDamper @me_m9_4 @me_m9_5 me_K me_Z @me_r86 springDamper @me_m9_5 @me_m9_6 me_K me_Z @me_r87 springDamper @me_m9_6 @me_m9_7 me_K me_Z @me_r88 springDamper @me_m9_7 @me_m9_8 me_K me_Z @me_r89 springDamper @me_m9_8 @me_m9_9 me_K me_Z @me_r90 springDamper @me_m0_0 @me_m1_0 me_K me_Z @me_r91 springDamper @me_m0_1 @me_m1_1 me_K me_Z @me_r92 springDamper @me_m0_2 @me_m1_2 me_K me_Z @me_r93 springDamper @me_m0_3 @me_m1_3 me_K me_Z @me_r94 springDamper @me_m0_4 @me_m1_4 me_K me_Z @me_r95 springDamper @me_m0_5 @me_m1_5 me_K me_Z @me_r96 springDamper @me_m0_6 @me_m1_6 me_K me_Z @me_r97 springDamper @me_m0_7 @me_m1_7 me_K me_Z @me_r98 springDamper @me_m0_8 @me_m1_8 me_K me_Z @me_r99 springDamper @me_m0_9 @me_m1_9 me_K me_Z @me_r100 springDamper @me_m1_0 @me_m2_0 me_K me_Z @me_r101 springDamper @me_m1_1 @me_m2_1 me_K me_Z @me_r102 springDamper @me_m1_2 @me_m2_2 me_K me_Z @me_r103 springDamper @me_m1_3 @me_m2_3 me_K me_Z @me_r104 springDamper @me_m1_4 @me_m2_4 me_K me_Z @me_r105 springDamper @me_m1_5 @me_m2_5 me_K me_Z @me_r106 springDamper @me_m1_6 @me_m2_6 me_K me_Z @me_r107 springDamper @me_m1_7 @me_m2_7 me_K me_Z @me_r108 springDamper @me_m1_8 @me_m2_8 me_K me_Z @me_r109 springDamper @me_m1_9 @me_m2_9 me_K me_Z @me_r110 springDamper @me_m2_0 @me_m3_0 me_K me_Z @me_r111 springDamper @me_m2_1 @me_m3_1 me_K me_Z @me_r112 springDamper @me_m2_2 @me_m3_2 me_K me_Z @me_r113 springDamper @me_m2_3 @me_m3_3 me_K me_Z @me_r114 springDamper @me_m2_4 @me_m3_4 me_K me_Z @me_r115 springDamper @me_m2_5 @me_m3_5 me_K me_Z @me_r116 springDamper @me_m2_6 @me_m3_6 me_K me_Z @me_r117 springDamper @me_m2_7 @me_m3_7 me_K me_Z @me_r118 springDamper @me_m2_8 @me_m3_8 me_K me_Z @me_r119 springDamper @me_m2_9 @me_m3_9 me_K me_Z @me_r120 springDamper @me_m3_0 @me_m4_0 me_K me_Z @me_r121 springDamper @me_m3_1 @me_m4_1 me_K me_Z @me_r122 springDamper @me_m3_2 @me_m4_2 me_K me_Z @me_r123 springDamper @me_m3_3 @me_m4_3 me_K me_Z @me_r124 springDamper @me_m3_4 @me_m4_4 me_K me_Z @me_r125 springDamper @me_m3_5 @me_m4_5 me_K me_Z @me_r126 springDamper @me_m3_6 @me_m4_6 me_K me_Z @me_r127 springDamper @me_m3_7 @me_m4_7 me_K me_Z @me_r128 springDamper @me_m3_8 @me_m4_8 me_K me_Z @me_r129 springDamper @me_m3_9 @me_m4_9 me_K me_Z @me_r130 springDamper @me_m4_0 @me_m5_0 me_K me_Z @me_r131 springDamper @me_m4_1 @me_m5_1 me_K me_Z @me_r132 springDamper @me_m4_2 @me_m5_2 me_K me_Z @me_r133 springDamper @me_m4_3 @me_m5_3 me_K me_Z @me_r134 springDamper @me_m4_4 @me_m5_4 me_K me_Z @me_r135 springDamper @me_m4_5 @me_m5_5 me_K me_Z @me_r136 springDamper @me_m4_6 @me_m5_6 me_K me_Z @me_r137 springDamper @me_m4_7 @me_m5_7 me_K me_Z @me_r138 springDamper @me_m4_8 @me_m5_8 me_K me_Z @me_r139 springDamper @me_m4_9 @me_m5_9 me_K me_Z @me_r140 springDamper @me_m5_0 @me_m6_0 me_K me_Z @me_r141 springDamper @me_m5_1 @me_m6_1 me_K me_Z @me_r142 springDamper @me_m5_2 @me_m6_2 me_K me_Z @me_r143 springDamper @me_m5_3 @me_m6_3 me_K me_Z @me_r144 springDamper @me_m5_4 @me_m6_4 me_K me_Z @me_r145 springDamper @me_m5_5 @me_m6_5 me_K me_Z @me_r146 springDamper @me_m5_6 @me_m6_6 me_K me_Z @me_r147 springDamper @me_m5_7 @me_m6_7 me_K me_Z @me_r148 springDamper @me_m5_8 @me_m6_8 me_K me_Z @me_r149 springDamper @me_m5_9 @me_m6_9 me_K me_Z @me_r150 springDamper @me_m6_0 @me_m7_0 me_K me_Z @me_r151 springDamper @me_m6_1 @me_m7_1 me_K me_Z @me_r152 springDamper @me_m6_2 @me_m7_2 me_K me_Z @me_r153 springDamper @me_m6_3 @me_m7_3 me_K me_Z @me_r154 springDamper @me_m6_4 @me_m7_4 me_K me_Z @me_r155 springDamper @me_m6_5 @me_m7_5 me_K me_Z @me_r156 springDamper @me_m6_6 @me_m7_6 me_K me_Z @me_r157 springDamper @me_m6_7 @me_m7_7 me_K me_Z @me_r158 springDamper @me_m6_8 @me_m7_8 me_K me_Z @me_r159 springDamper @me_m6_9 @me_m7_9 me_K me_Z @me_r160 springDamper @me_m7_0 @me_m8_0 me_K me_Z @me_r161 springDamper @me_m7_1 @me_m8_1 me_K me_Z @me_r162 springDamper @me_m7_2 @me_m8_2 me_K me_Z @me_r163 springDamper @me_m7_3 @me_m8_3 me_K me_Z @me_r164 springDamper @me_m7_4 @me_m8_4 me_K me_Z @me_r165 springDamper @me_m7_5 @me_m8_5 me_K me_Z @me_r166 springDamper @me_m7_6 @me_m8_6 me_K me_Z @me_r167 springDamper @me_m7_7 @me_m8_7 me_K me_Z @me_r168 springDamper @me_m7_8 @me_m8_8 me_K me_Z @me_r169 springDamper @me_m7_9 @me_m8_9 me_K me_Z @me_r170 springDamper @me_m8_0 @me_m9_0 me_K me_Z @me_r171 springDamper @me_m8_1 @me_m9_1 me_K me_Z @me_r172 springDamper @me_m8_2 @me_m9_2 me_K me_Z @me_r173 springDamper @me_m8_3 @me_m9_3 me_K me_Z @me_r174 springDamper @me_m8_4 @me_m9_4 me_K me_Z @me_r175 springDamper @me_m8_5 @me_m9_5 me_K me_Z @me_r176 springDamper @me_m8_6 @me_m9_6 me_K me_Z @me_r177 springDamper @me_m8_7 @me_m9_7 me_K me_Z @me_r178 springDamper @me_m8_8 @me_m9_8 me_K me_Z @me_r179 springDamper @me_m8_9 @me_m9_9 me_K me_Z @out1 posOutput @me_m5_5 @out2 posOutput @t_m2_1
declare name "StrangeConstruct"; declare author "James Leonard"; declare date "April 2020"; import("stdfaust.lib"); in1 = _ : ba.impulsify * hslider("scaling", 0.9, 0.01, 0.9, 0.001) * -1; OutGain = 1; t_M = 1; t_K = hslider("stiffness", 0.1, 0.001, 0.2, 0.0001); t_Z = hslider("damping", 0.0001, 0.00, 0.0008, 0.000001); t_Zo = 0.00005; me_M = 1; me_K = hslider("stiffness", 0.1, 0.001, 0.2, 0.0001); me_Z = hslider("damping", 0.0001, 0.00, 0.0008, 0.000001); me_Zo = 0.00005; model = ( mi.mass(0.3, 0, 1., 1.), mi.ground(1.), mi.ground(0), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.ground(0), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.oscil(t_M, 0, t_Zo, 0, 0., 0.), mi.ground(0), mi.ground(0), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.ground(0), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.ground(0), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.oscil(me_M, 0, me_Zo, 0, 0., 0.), mi.ground(0), par(i, nbFrcIn,_): RoutingMassToLink , par(i, nbFrcIn,_): mi.springDamper(0.0001, 0.05, 1., 1.), mi.nlCollisionClipped(0.0, 0.01, 0.5, 0.001, 0, 0., 1.), mi.nlSpringDamperClipped(0.01, 0.01, 0.2, 0., 0., 0.), mi.springDamper(t_K, t_Z, 0, 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0, 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0, 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0.), mi.springDamper(t_K, t_Z, 0., 0), mi.springDamper(me_K, me_Z, 0, 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0, 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0), mi.springDamper(me_K, me_Z, 0, 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0, 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0.), mi.springDamper(me_K, me_Z, 0., 0), par(i, nbOut+nbFrcIn, _): RoutingLinkToMass )~par(i, nbMass, _): par(i, nbMass, !), par(i, nbOut , _) with{ nbMass = 157; nbFrcIn = 1; nbOut = 2; }; process = in1 : model:*(OutGain), *(OutGain);
089cd416e9856d3170222f580f81afb2d448dcda3829520bf58d2731083f1755
JoeWrightMusic/QuickNDirtyFaustSynths
Water.dsp
import("stdfaust.lib"); //Utilities----------- lfNoise(freq) = no.lfnoise0(freq):si.smooth(ba.tau2pole(1/freq)); randRangeNoInt(freq, lo, hi) = no.lfnoise0(freq)*((hi-lo)*0.5)+(lo+((hi-lo)*0.5)); dust(freq, thresh) = no.lfnoise(freq) >(thresh); clip(in, thresh) = in : min(thresh) : max(thresh * -1); waterflow = hslider("waterflow", 140, 100, 400,0.01); trigs = dust(waterflow, 0.7); env = en.ar(0.015,1,trigs); freq = ba.midikey2hz(randRangeNoInt(waterflow, 70, 98)) + (lfNoise(20)*300) + (env*17); someWater = os.osc(freq)*0.3*env:fi.lowpass(1, 700); stream = someWater+someWater+someWater+someWater*0.2; vol = hslider("vol", 0, 0,1,0.01); process = someWater*vol;
https://raw.githubusercontent.com/JoeWrightMusic/QuickNDirtyFaustSynths/ea69cff586c41aabd9e057c7171fa9a5043fd79b/Textures/Water/Water.dsp
faust
Utilities-----------
import("stdfaust.lib"); lfNoise(freq) = no.lfnoise0(freq):si.smooth(ba.tau2pole(1/freq)); randRangeNoInt(freq, lo, hi) = no.lfnoise0(freq)*((hi-lo)*0.5)+(lo+((hi-lo)*0.5)); dust(freq, thresh) = no.lfnoise(freq) >(thresh); clip(in, thresh) = in : min(thresh) : max(thresh * -1); waterflow = hslider("waterflow", 140, 100, 400,0.01); trigs = dust(waterflow, 0.7); env = en.ar(0.015,1,trigs); freq = ba.midikey2hz(randRangeNoInt(waterflow, 70, 98)) + (lfNoise(20)*300) + (env*17); someWater = os.osc(freq)*0.3*env:fi.lowpass(1, 700); stream = someWater+someWater+someWater+someWater*0.2; vol = hslider("vol", 0, 0,1,0.01); process = someWater*vol;
1c3f0e8900a64961a6dcbee4b9fc57b0906be8033914727084362c2baf770384
JoeWrightMusic/QuickNDirtyFaustSynths
Simple2opFM.dsp
import("stdfaust.lib"); //____________________________________________________________________________________FM2OSC trig = button("trig"); freq = hslider("freq",200,10,20000,0.01):si.smoo; mMul = hslider("mMul",0.5,0.0,100,0.0001):si.smoo; dMul = hslider("dMul",0.5,0.00,10,0.0001):si.smoo; aM = hslider("aM",0.1,0.01,10,0.01); dM = hslider("dM",0.1,0.01,10,0.01); sM = hslider("sM",0.8,0.0,1,0.01); rM = hslider("rM",0.1,0.01,10,0.01); aC = hslider("aC",0.1,0.01,10,0.01); dC = hslider("dC",0.1,0.01,10,0.01); sC = hslider("sC",0.8,0.0,1,0.01); rC = hslider("rC",0.1,0.01,10,0.01); fm2op(freq,mMul,dMul,trig, am,dm,sm,rm, ac,dc,sc,rc) = os.osc( freq+(os.osc(freq*mMul)*freq*dMul*en.adsr(am,dm,sm,rm,trig)) )*en.adsr(ac,dc,sc,rc, trig); process = fm2op(freq,mMul,dMul,trig, aM,dM,sM,rM, aC,dC,sC,rC); // re.mono_freeverb(0.5,0.9,0.1,0.5)
https://raw.githubusercontent.com/JoeWrightMusic/QuickNDirtyFaustSynths/995047809aaaa0083340cdbcb727ceae0fc01a88/Basic/Simple2opFM.dsp
faust
____________________________________________________________________________________FM2OSC re.mono_freeverb(0.5,0.9,0.1,0.5)
import("stdfaust.lib"); trig = button("trig"); freq = hslider("freq",200,10,20000,0.01):si.smoo; mMul = hslider("mMul",0.5,0.0,100,0.0001):si.smoo; dMul = hslider("dMul",0.5,0.00,10,0.0001):si.smoo; aM = hslider("aM",0.1,0.01,10,0.01); dM = hslider("dM",0.1,0.01,10,0.01); sM = hslider("sM",0.8,0.0,1,0.01); rM = hslider("rM",0.1,0.01,10,0.01); aC = hslider("aC",0.1,0.01,10,0.01); dC = hslider("dC",0.1,0.01,10,0.01); sC = hslider("sC",0.8,0.0,1,0.01); rC = hslider("rC",0.1,0.01,10,0.01); fm2op(freq,mMul,dMul,trig, am,dm,sm,rm, ac,dc,sc,rc) = os.osc( freq+(os.osc(freq*mMul)*freq*dMul*en.adsr(am,dm,sm,rm,trig)) )*en.adsr(ac,dc,sc,rc, trig); process = fm2op(freq,mMul,dMul,trig, aM,dM,sM,rM, aC,dC,sC,rC);
6940ac792ec2bbbc94dcf46c6afd907b69052db078a42732d941b1af1ec96b14
JoeWrightMusic/QuickNDirtyFaustSynths
PMTrombone.dsp
import("stdfaust.lib"); //volume / vibrato / smoothing vol = hslider("vol",35,0,100,0.01); vib = hslider("vib",0,-1,1,0.01); smoo = hslider("smoo",0.1,0,1,0.1); //brass model parameters tubeLength = hslider("length",3.3,0,5,0.01); lipsTension = hslider("lipsTension",0.62,0,1,0.01); mute = hslider("mute",0,0,1,0.01); pressure = hslider("pressure",0.05,0,1,0.01); //non-player vibrato autoVibHz = hslider("autoVibHz", 4, 0, 10, 0.01); autoVibWidth = hslider("autoVibWidth", 0.05, 0, 1, 0.01); //phasor phasor(freq) = (+(freq/ma.SR) ~ ma.decimal); //sine osc(freq, amp) = sin(phasor(freq)*2*ma.PI)*amp; //autovib autoVib = 1+(osc(autoVibHz, autoVibWidth)); //envelopes toneGate = button("toneGate"); toneEnv = en.adsr(0.01,0.01,0.7,0.15,toneGate); pressEnv = en.adsr(0.01,0.01,0.9,0.15,toneGate)+0.1; tbLen=(tubeLength+(vib*0.1)) : si.smooth(ba.tau2pole(smoo)); tbTens=(lipsTension) : si.smooth(ba.tau2pole(smoo)); tbMute=(mute) : si.smooth(ba.tau2pole(smoo)); tbPress=((pressure+(vib*0.02))*autoVib)*pressEnv : si.smooth(ba.tau2pole(smoo)); //brass PM trombone = pm.brassModel(tbLen,tbTens,tbMute,tbPress); process = trombone*autoVib*vol*toneEnv;
https://raw.githubusercontent.com/JoeWrightMusic/QuickNDirtyFaustSynths/ea69cff586c41aabd9e057c7171fa9a5043fd79b/Instruments/Trombone/PMTrombone.dsp
faust
volume / vibrato / smoothing brass model parameters non-player vibrato phasor sine autovib envelopes brass PM
import("stdfaust.lib"); vol = hslider("vol",35,0,100,0.01); vib = hslider("vib",0,-1,1,0.01); smoo = hslider("smoo",0.1,0,1,0.1); tubeLength = hslider("length",3.3,0,5,0.01); lipsTension = hslider("lipsTension",0.62,0,1,0.01); mute = hslider("mute",0,0,1,0.01); pressure = hslider("pressure",0.05,0,1,0.01); autoVibHz = hslider("autoVibHz", 4, 0, 10, 0.01); autoVibWidth = hslider("autoVibWidth", 0.05, 0, 1, 0.01); phasor(freq) = (+(freq/ma.SR) ~ ma.decimal); osc(freq, amp) = sin(phasor(freq)*2*ma.PI)*amp; autoVib = 1+(osc(autoVibHz, autoVibWidth)); toneGate = button("toneGate"); toneEnv = en.adsr(0.01,0.01,0.7,0.15,toneGate); pressEnv = en.adsr(0.01,0.01,0.9,0.15,toneGate)+0.1; tbLen=(tubeLength+(vib*0.1)) : si.smooth(ba.tau2pole(smoo)); tbTens=(lipsTension) : si.smooth(ba.tau2pole(smoo)); tbMute=(mute) : si.smooth(ba.tau2pole(smoo)); tbPress=((pressure+(vib*0.02))*autoVib)*pressEnv : si.smooth(ba.tau2pole(smoo)); trombone = pm.brassModel(tbLen,tbTens,tbMute,tbPress); process = trombone*autoVib*vol*toneEnv;
df786edd66c1cee11f9221e97074e589fbcc0f93aaf68246a251cf5e744e7a8a
JoeWrightMusic/QuickNDirtyFaustSynths
Fire.dsp
import("stdfaust.lib"); //Utilities----------- lfNoise(freq) = no.lfnoise0(freq):si.smooth(ba.tau2pole(1/freq)); randRange(freq, lo, hi) = lfNoise(freq)*((hi-lo)*0.5)+(hi-(lo)); dust(freq, thresh) = no.lfnoise(freq) >(thresh); clip(in, thresh) = in : min(thresh) : max(thresh * -1); //FIRE------------------ phutBalance=0.4; popBalance=1; hissBalance=0.05; woofBalance=0.3; hiss(freq) = no.noise * lfNoise(freq)*lfNoise(freq): fi.resonhp(randRange(freq*0.4,2500,10000),3,0.5)*hissBalance; phut(freq) = en.ar(0.00001, randRange(5, 0.0,0.02), dust(freq, 0.7))*no.noise : fi.resonlp(randRange(freq,900,3000),4,0.5) * phutBalance * lfNoise(freq); pop(freq) = en.ar(0.000001,0.00001,dust(freq, 0.7)):fi.resonlp(randRange(freq*10,600,15000),1,1) * popBalance * lfNoise(freq*0.2)*lfNoise(freq*0.5); woof(freq) = no.pink_noise * lfNoise(freq)*lfNoise(freq)*100: fi.resonlp(randRange(freq*0.4,80,150),3,0.5) : clip(_, 1): fi.resonlp(2000,1,1); fire(dens) = woof(1) + woof(1 + dens*0.4) + hiss(dens*0.05 ) + phut(dens*0.9) + pop(1 +(dens*100) ) : clip(_, 1): co.limiter_1176_R4_mono; fireDens = hslider("firedens", 1, 0.5, 100, 0.01); vol = hslider("vol", 0, 0,1,0.01); // process = vol*hiss; // process = phut(0.9)+pop(10)+hiss(1)+hiss(0.7),phut(0.9)+pop(10)+hiss(1)+hiss(0.7): _*vol,_*vol; process = fire(fireDens)*vol;
https://raw.githubusercontent.com/JoeWrightMusic/QuickNDirtyFaustSynths/ea69cff586c41aabd9e057c7171fa9a5043fd79b/Textures/Fire/Fire.dsp
faust
Utilities----------- FIRE------------------ process = vol*hiss; process = phut(0.9)+pop(10)+hiss(1)+hiss(0.7),phut(0.9)+pop(10)+hiss(1)+hiss(0.7): _*vol,_*vol;
import("stdfaust.lib"); lfNoise(freq) = no.lfnoise0(freq):si.smooth(ba.tau2pole(1/freq)); randRange(freq, lo, hi) = lfNoise(freq)*((hi-lo)*0.5)+(hi-(lo)); dust(freq, thresh) = no.lfnoise(freq) >(thresh); clip(in, thresh) = in : min(thresh) : max(thresh * -1); phutBalance=0.4; popBalance=1; hissBalance=0.05; woofBalance=0.3; hiss(freq) = no.noise * lfNoise(freq)*lfNoise(freq): fi.resonhp(randRange(freq*0.4,2500,10000),3,0.5)*hissBalance; phut(freq) = en.ar(0.00001, randRange(5, 0.0,0.02), dust(freq, 0.7))*no.noise : fi.resonlp(randRange(freq,900,3000),4,0.5) * phutBalance * lfNoise(freq); pop(freq) = en.ar(0.000001,0.00001,dust(freq, 0.7)):fi.resonlp(randRange(freq*10,600,15000),1,1) * popBalance * lfNoise(freq*0.2)*lfNoise(freq*0.5); woof(freq) = no.pink_noise * lfNoise(freq)*lfNoise(freq)*100: fi.resonlp(randRange(freq*0.4,80,150),3,0.5) : clip(_, 1): fi.resonlp(2000,1,1); fire(dens) = woof(1) + woof(1 + dens*0.4) + hiss(dens*0.05 ) + phut(dens*0.9) + pop(1 +(dens*100) ) : clip(_, 1): co.limiter_1176_R4_mono; fireDens = hslider("firedens", 1, 0.5, 100, 0.01); vol = hslider("vol", 0, 0,1,0.01); process = fire(fireDens)*vol;
5e4d80e508bc1d045ee1ae88d2081afa7a00f54682ae5be42360070bad69f445
JoeWrightMusic/QuickNDirtyFaustSynths
FireWater.dsp
import("stdfaust.lib"); smthFactor = hslider("smthFactor",0.2,0,2,0.01); volSmth = hslider("volSmth",0.2,0,2,0.01); fireWater = hslider("fireWater",0,0,1,0.01);//:si.smooth(ba.tau2pole(smthFactor)); vol = hslider("vol", 0, 0,1,0.01):si.smooth(ba.tau2pole(volSmth)); waterSmth = hslider("waterSmth",0.2,0,4,0.01); waterVol = (0.33-(fireWater)) : max(0) *3 : si.smooth(ba.tau2pole(waterSmth)); maxWater = hslider("maxWater", 300, 0,900,0.01); waterflow = waterVol*waterVol*maxWater +1; fireAmt = (-0.3+(fireWater)) : max(0.1); //Volumes phutBalance=hslider("phut",0.4,0,1,0.01); popBalance=hslider("pop",0.4,0,1,0.01 ); maxPop=hslider("maxPop",30,20,200,0.01); hissBalance=hslider("hiss",0.05,0,1,0.01); woofBalance=hslider("woof",0.1,0,1,0.01); waterBalance=hslider("water",0.2,0,1,0.01); //Utilities----------- lfNoise(freq) = no.lfnoise0(freq):si.smooth(ba.tau2pole(1/freq)); randRange0(freq, lo, hi) = no.lfnoise0(freq)*((hi-lo)*0.5)+(lo+((hi-lo)*0.5)); randRange1(freq, lo, hi) = lfNoise(freq)*((hi-lo)*0.5)+(hi-(lo)); dust(freq, thresh) = no.lfnoise0(freq) >(thresh); clip(in, thresh) = in : min(thresh) : max(thresh * -1); //WATER trigs = dust(waterflow, 0.7); env = en.ar(0.015,1,trigs); freq = ba.midikey2hz(randRange0(waterflow, 70, 98)) + (lfNoise(20)*300) + (env*17); someWater = os.osc(freq)*0.3*env:fi.fi.lowpass3e(800); stream = (someWater+someWater)*0.2*waterVol; //FIRE hiss(freq) = no.noise * lfNoise(freq)*lfNoise(freq): fi.resonhp(randRange1(freq*0.4,2500,10000),3,0.5)*hissBalance; phut(freq) = en.ar(0.00001, randRange1(5, 0.0001,0.02), dust(freq, 0.7))*no.noise : fi.resonlp(randRange1(freq,900,3000),4,0.5) * lfNoise(freq) * phutBalance; pop(freq) = en.ar(0.000001,0.00001,dust(freq, 0.7)):fi.resonlp(randRange1(freq*10,600,15000),1,1) * lfNoise(freq*0.2)*lfNoise(freq*0.5) * popBalance; woof(freq) = no.pink_noise * lfNoise(freq)*lfNoise(freq)*100: fi.resonlp(randRange1(freq*0.4,80,150),3,0.5) : clip(_, 1): fi.resonlp(2000,1,1)*woofBalance; fire = woof(1) + woof(1 + fireAmt*20) + hiss(fireAmt) + phut(1 + fireAmt*(maxPop*0.1)) + pop(fireAmt*maxPop) : clip(_, 1): co.limiter_1176_R4_mono*fireWater; process = (stream+(fire))*vol; // process = (stream+(fire))*vol;
https://raw.githubusercontent.com/JoeWrightMusic/QuickNDirtyFaustSynths/ea69cff586c41aabd9e057c7171fa9a5043fd79b/Textures/FireWater/FireWater.dsp
faust
:si.smooth(ba.tau2pole(smthFactor)); Volumes Utilities----------- WATER FIRE process = (stream+(fire))*vol;
import("stdfaust.lib"); smthFactor = hslider("smthFactor",0.2,0,2,0.01); volSmth = hslider("volSmth",0.2,0,2,0.01); vol = hslider("vol", 0, 0,1,0.01):si.smooth(ba.tau2pole(volSmth)); waterSmth = hslider("waterSmth",0.2,0,4,0.01); waterVol = (0.33-(fireWater)) : max(0) *3 : si.smooth(ba.tau2pole(waterSmth)); maxWater = hslider("maxWater", 300, 0,900,0.01); waterflow = waterVol*waterVol*maxWater +1; fireAmt = (-0.3+(fireWater)) : max(0.1); phutBalance=hslider("phut",0.4,0,1,0.01); popBalance=hslider("pop",0.4,0,1,0.01 ); maxPop=hslider("maxPop",30,20,200,0.01); hissBalance=hslider("hiss",0.05,0,1,0.01); woofBalance=hslider("woof",0.1,0,1,0.01); waterBalance=hslider("water",0.2,0,1,0.01); lfNoise(freq) = no.lfnoise0(freq):si.smooth(ba.tau2pole(1/freq)); randRange0(freq, lo, hi) = no.lfnoise0(freq)*((hi-lo)*0.5)+(lo+((hi-lo)*0.5)); randRange1(freq, lo, hi) = lfNoise(freq)*((hi-lo)*0.5)+(hi-(lo)); dust(freq, thresh) = no.lfnoise0(freq) >(thresh); clip(in, thresh) = in : min(thresh) : max(thresh * -1); trigs = dust(waterflow, 0.7); env = en.ar(0.015,1,trigs); freq = ba.midikey2hz(randRange0(waterflow, 70, 98)) + (lfNoise(20)*300) + (env*17); someWater = os.osc(freq)*0.3*env:fi.fi.lowpass3e(800); stream = (someWater+someWater)*0.2*waterVol; hiss(freq) = no.noise * lfNoise(freq)*lfNoise(freq): fi.resonhp(randRange1(freq*0.4,2500,10000),3,0.5)*hissBalance; phut(freq) = en.ar(0.00001, randRange1(5, 0.0001,0.02), dust(freq, 0.7))*no.noise : fi.resonlp(randRange1(freq,900,3000),4,0.5) * lfNoise(freq) * phutBalance; pop(freq) = en.ar(0.000001,0.00001,dust(freq, 0.7)):fi.resonlp(randRange1(freq*10,600,15000),1,1) * lfNoise(freq*0.2)*lfNoise(freq*0.5) * popBalance; woof(freq) = no.pink_noise * lfNoise(freq)*lfNoise(freq)*100: fi.resonlp(randRange1(freq*0.4,80,150),3,0.5) : clip(_, 1): fi.resonlp(2000,1,1)*woofBalance; fire = woof(1) + woof(1 + fireAmt*20) + hiss(fireAmt) + phut(1 + fireAmt*(maxPop*0.1)) + pop(fireAmt*maxPop) : clip(_, 1): co.limiter_1176_R4_mono*fireWater; process = (stream+(fire))*vol;
9df0aa9c23ec6afe25e5b851f24ff90648bd3f2a8722435df5eca7da2f0b0df2
JoeWrightMusic/QuickNDirtyFaustSynths
AddSynthOboe.dsp
import("stdfaust.lib"); //OBOE ARGUMENTS //choose note & define range (Bb3-Bb5) fund = hslider("fundFreq", 60, 60, 72, 0.001):ba.midikey2hz; vibratoHz = hslider("vibratoHz", 4, 0, 10, 0.01)+(randomize(0.7)); trigger = button("trigger"); legatoTrigger = button("legatoTrig"); loShelfFreq = hslider("loShelfFreq",1000,10,20000,1); loShelfGain = hslider("loShelfGain",-36,-64,64,0.1); randomize(amt)=no.sparse_noise(5)*amt+(amt)+(0.002); //amp envs vSlowEnv = en.adsr(2*randomize(2),0.01,0.8,0.03,trigger-legatoTrigger); fastEnv1 = en.adsr(0.01*randomize(1.5),0.01,0.5,0.23,trigger); fastEnv2 = en.adsr(0.02*randomize(1.5),0.02,0.8,0.09,trigger); fastEnv3 = en.adsr(0.04*randomize(2.5),0.04,0.8,0.03,trigger); fastEnv4 = en.adsr(0.08*randomize(2.5),0.08,0.8,0.03,trigger); fastEnv7 = en.adsr(0.2*randomize(3.5),0.2,0.8,0.03,trigger); medEnv = en.adsr(0.2*randomize(1.5),0.05,0.8,0.03,trigger); //legato amp Envs legatoEnv = en.adsr(0.1*randomize(1.5),0.05,1,0.1,legatoTrigger); legatoDip(amt) = 1-(legatoEnv*amt); vibratoWidth = hslider("vibratoWidth", 0.45, 0, 1, 0.01)*vSlowEnv*randomize(0.4); vol = hslider("vol", 1, 0, 1, 0.001); //phasor phasor(freq) = (+(freq/ma.SR) ~ ma.decimal); //sine osc(freq, amp) = sin(phasor(freq)*2*ma.PI)*amp; //AM am(freq, amt) = 1 - ((osc(freq,0.5)+0.5) * amt); //FM fm(freq, amt) = 1 + (osc(freq,amt)); //partial partial(fund, ratio, amp) = sin( phasor(fund*ratio*fm(vibratoHz, vibratoWidth*.0028*ratio) )*2*ma.PI)*amp; pulse = os.pulsetrain(fund*fm(vibratoHz, vibratoWidth*.0018),0.88):fi.bandpass( 3,110,1720 ); oboeComponents(fund, amp) = ( no.noise*0.009*fastEnv1 + partial(fund, 1, 0.2) * fastEnv7*vol *legatoDip(0.8) + partial(fund, 2, 0.380)* fastEnv2*vol *legatoDip(0.4) + partial(fund, 3, 0.780)* fastEnv2*vol *legatoDip(0.3) + partial(fund, 4, 0.20) * fastEnv3*vol *legatoDip(0.4) + partial(fund, 5, 0.090)* fastEnv4*vol *legatoDip(0.6) + partial(fund, 6, 0.030)* fastEnv7*vol *legatoDip(0.6) + partial(fund, 7, 0.025)* medEnv*vol *legatoDip(0.6) + partial(fund, 8, 0.025)* medEnv*vol *legatoDip(0.6) + partial(fund, 9, 0.02) * medEnv*vol *legatoDip(0.6) + partial(fund, 10, 0.02) * medEnv*vol *legatoDip(0.6) + (pulse*0.2)*en.adsr(0.01,0.01,0.8,0.03,trigger) )*amp*am(vibratoHz, vibratoWidth):fi.resonbp(fund*fm(vibratoHz, vibratoWidth*.0018),0.025,200)*vol*fastEnv2; oboe = oboeComponents:pm.modalModel(5, (233.88, 467.6, 935.52, 1871.04, 3742.08), (0.15, 0.05,0.02,0.01,0.01), ( ba.db2linear(-3), ba.db2linear(-1), ba.db2linear(-2), ba.db2linear(-5), ba.db2linear(-12) ) )*0.01 +(no.noise*0.003*fastEnv1); process = oboe(fund, 0.1):fi.low_shelf(loShelfGain,loShelfFreq)<:_,_;
https://raw.githubusercontent.com/JoeWrightMusic/QuickNDirtyFaustSynths/ea69cff586c41aabd9e057c7171fa9a5043fd79b/Instruments/AddSynthOboe/AddSynthOboe.dsp
faust
OBOE ARGUMENTS choose note & define range (Bb3-Bb5) amp envs legato amp Envs phasor sine AM FM partial
import("stdfaust.lib"); fund = hslider("fundFreq", 60, 60, 72, 0.001):ba.midikey2hz; vibratoHz = hslider("vibratoHz", 4, 0, 10, 0.01)+(randomize(0.7)); trigger = button("trigger"); legatoTrigger = button("legatoTrig"); loShelfFreq = hslider("loShelfFreq",1000,10,20000,1); loShelfGain = hslider("loShelfGain",-36,-64,64,0.1); randomize(amt)=no.sparse_noise(5)*amt+(amt)+(0.002); vSlowEnv = en.adsr(2*randomize(2),0.01,0.8,0.03,trigger-legatoTrigger); fastEnv1 = en.adsr(0.01*randomize(1.5),0.01,0.5,0.23,trigger); fastEnv2 = en.adsr(0.02*randomize(1.5),0.02,0.8,0.09,trigger); fastEnv3 = en.adsr(0.04*randomize(2.5),0.04,0.8,0.03,trigger); fastEnv4 = en.adsr(0.08*randomize(2.5),0.08,0.8,0.03,trigger); fastEnv7 = en.adsr(0.2*randomize(3.5),0.2,0.8,0.03,trigger); medEnv = en.adsr(0.2*randomize(1.5),0.05,0.8,0.03,trigger); legatoEnv = en.adsr(0.1*randomize(1.5),0.05,1,0.1,legatoTrigger); legatoDip(amt) = 1-(legatoEnv*amt); vibratoWidth = hslider("vibratoWidth", 0.45, 0, 1, 0.01)*vSlowEnv*randomize(0.4); vol = hslider("vol", 1, 0, 1, 0.001); phasor(freq) = (+(freq/ma.SR) ~ ma.decimal); osc(freq, amp) = sin(phasor(freq)*2*ma.PI)*amp; am(freq, amt) = 1 - ((osc(freq,0.5)+0.5) * amt); fm(freq, amt) = 1 + (osc(freq,amt)); partial(fund, ratio, amp) = sin( phasor(fund*ratio*fm(vibratoHz, vibratoWidth*.0028*ratio) )*2*ma.PI)*amp; pulse = os.pulsetrain(fund*fm(vibratoHz, vibratoWidth*.0018),0.88):fi.bandpass( 3,110,1720 ); oboeComponents(fund, amp) = ( no.noise*0.009*fastEnv1 + partial(fund, 1, 0.2) * fastEnv7*vol *legatoDip(0.8) + partial(fund, 2, 0.380)* fastEnv2*vol *legatoDip(0.4) + partial(fund, 3, 0.780)* fastEnv2*vol *legatoDip(0.3) + partial(fund, 4, 0.20) * fastEnv3*vol *legatoDip(0.4) + partial(fund, 5, 0.090)* fastEnv4*vol *legatoDip(0.6) + partial(fund, 6, 0.030)* fastEnv7*vol *legatoDip(0.6) + partial(fund, 7, 0.025)* medEnv*vol *legatoDip(0.6) + partial(fund, 8, 0.025)* medEnv*vol *legatoDip(0.6) + partial(fund, 9, 0.02) * medEnv*vol *legatoDip(0.6) + partial(fund, 10, 0.02) * medEnv*vol *legatoDip(0.6) + (pulse*0.2)*en.adsr(0.01,0.01,0.8,0.03,trigger) )*amp*am(vibratoHz, vibratoWidth):fi.resonbp(fund*fm(vibratoHz, vibratoWidth*.0018),0.025,200)*vol*fastEnv2; oboe = oboeComponents:pm.modalModel(5, (233.88, 467.6, 935.52, 1871.04, 3742.08), (0.15, 0.05,0.02,0.01,0.01), ( ba.db2linear(-3), ba.db2linear(-1), ba.db2linear(-2), ba.db2linear(-5), ba.db2linear(-12) ) )*0.01 +(no.noise*0.003*fastEnv1); process = oboe(fund, 0.1):fi.low_shelf(loShelfGain,loShelfFreq)<:_,_;
634b12f53472b3aca809762899afb698b409066968fa2d5a6d4279efd4a03b3c
JoeWrightMusic/QuickNDirtyFaustSynths
RumbleBox.dsp
import("stdfaust.lib"); wobWob = hslider("wobWob",0,0,10,0.01):si.smoo; wobFreq = hslider("wobFreq",1, 0.5,10,0.01); aMinVol = hslider("aMinVol",0,0,1,0.01):si.smoo; aMinEno = hslider("aMinEno",0,0,1,0.01):si.smoo; aMinLPF = hslider("aMinLPF",250,5,800,0.01); aMinDist = hslider("aMinDist",0.01,0,1,0.001); techno = hslider("techno",0,0,1,0.01):si.smoo; setPip = hslider("setPip",81, 80,110,1); pipVol = hslider("pipVol",0.03, 0,10,0.01); pipLP = hslider("pipLP",800,5,800,0.01); pipDist = hslider("pipDist",0.01,0,1,0.001); kickVol = hslider("kickVol",1.2,0,10,0.01):si.smoo; rscal = hslider("rscal",0.2, 0,1,0.01):si.smoo; mvol = hslider("mvol",0,0,1,0.01):si.smoo; mcomp = hslider("mcomp",-10,-50,0,0.01):si.smoo; mcompra = hslider("mcompra",100,1,100,0.01):si.smoo; kikSpd = hslider("kikSpd",0.1,0.1,2,0.01); // //WOBWOB freqGen(freq, mul, add) = os.osc(freq)*mul + add; wobWobOut = ( os.osc(freqGen(2.07*wobFreq,wobFreq,35+wobFreq*20))*0.5 + os.osc(freqGen(3.32*wobFreq,wobFreq,35+wobFreq*21))*0.5 + os.osc(freqGen(5*wobFreq,wobFreq,25+wobFreq*10))*0.5 )*wobWob:ef.cubicnl(0.01,0):fi.lowpass3e(200) : co.compressor_mono(100,-2,0.01,0.05); //AMINENO dust(freq, thresh) = no.lfnoise0(freq) >(thresh); drone(freq, dens) = os.osc(freq)*(en.ar(1/(dens*dens*5),1/(dens*dens*5), dust(dens*200, 0.99)):si.smoo); aMDens = 5; aMinor = ( drone(110, aMinEno*1.1) + drone(130.81, aMinEno*1.01) + drone(164.81, aMinEno*1.02) + drone(196, aMinEno*1.21) + drone(293.66, aMinEno*1.05) ):ef.cubicnl(aMinDist,0):fi.lowpass3e(aMinLPF) :co.compressor_mono(100,-5,0.01,0.05)*aMinVol; //TECHNO kickFreq = 0.7+(techno*kikSpd); kickTrig = os.lf_imptrain(kickFreq); kickFM = kickTrig:si.lag_ud(0.0,0.02)*400; kickOsc = os.osc(27.5+kickFM)+os.osc(55+kickFM); kickEnv = en.ar( 0.025, (1/kickFreq)*0.9, kickTrig ); kick = kickOsc*kickEnv:co.compressor_mono(100,-10,0.005,0.01); pipNote = setPip:ba.sAndH(os.lf_imptrain(kickFreq*4)); timePip(note, freq, thresh) = os.osc(ba.midikey2hz(note))* en.asr( (1/freq)*0.01, 1, (1/freq)*0.99, (no.noise+(1))*os.lf_imptrain(freq):ba.sAndH(os.lf_imptrain(freq)) > (thresh) ) ; timePips=( timePip(pipNote, kickFreq*4, 0.8) ):ef.cubicnl(pipDist,0):fi.lowpass3e(pipLP)*pipVol; technoL = kick*kickVol:co.compressor_mono(100,-5,0.005,0.01)*techno:fi.lowpass3e(500); technoR = (timePips+(technoL)):co.compressor_mono(100,-5,0.005,0.01)*techno; //OUTPUT left = technoL + (aMinor + (wobWobOut)) : co.compressor_mono(mcompra, mcomp, 0.01,0.02)*mvol; //+ wobWobOut; right = (technoR+ (aMinor*0.5)+ (wobWobOut))*rscal : co.compressor_mono(mcompra, mcomp, 0.01,0.02)*mvol; // process = left*mvol,right*mvol; process = left,right;
https://raw.githubusercontent.com/JoeWrightMusic/QuickNDirtyFaustSynths/aab452c99976a17d2dfb7e688fc046c823af8eb0/RumbleBox/RumbleBox_V1.1/RumbleBox.dsp
faust
//WOBWOB AMINENO TECHNO OUTPUT + wobWobOut; process = left*mvol,right*mvol;
import("stdfaust.lib"); wobWob = hslider("wobWob",0,0,10,0.01):si.smoo; wobFreq = hslider("wobFreq",1, 0.5,10,0.01); aMinVol = hslider("aMinVol",0,0,1,0.01):si.smoo; aMinEno = hslider("aMinEno",0,0,1,0.01):si.smoo; aMinLPF = hslider("aMinLPF",250,5,800,0.01); aMinDist = hslider("aMinDist",0.01,0,1,0.001); techno = hslider("techno",0,0,1,0.01):si.smoo; setPip = hslider("setPip",81, 80,110,1); pipVol = hslider("pipVol",0.03, 0,10,0.01); pipLP = hslider("pipLP",800,5,800,0.01); pipDist = hslider("pipDist",0.01,0,1,0.001); kickVol = hslider("kickVol",1.2,0,10,0.01):si.smoo; rscal = hslider("rscal",0.2, 0,1,0.01):si.smoo; mvol = hslider("mvol",0,0,1,0.01):si.smoo; mcomp = hslider("mcomp",-10,-50,0,0.01):si.smoo; mcompra = hslider("mcompra",100,1,100,0.01):si.smoo; kikSpd = hslider("kikSpd",0.1,0.1,2,0.01); freqGen(freq, mul, add) = os.osc(freq)*mul + add; wobWobOut = ( os.osc(freqGen(2.07*wobFreq,wobFreq,35+wobFreq*20))*0.5 + os.osc(freqGen(3.32*wobFreq,wobFreq,35+wobFreq*21))*0.5 + os.osc(freqGen(5*wobFreq,wobFreq,25+wobFreq*10))*0.5 )*wobWob:ef.cubicnl(0.01,0):fi.lowpass3e(200) : co.compressor_mono(100,-2,0.01,0.05); dust(freq, thresh) = no.lfnoise0(freq) >(thresh); drone(freq, dens) = os.osc(freq)*(en.ar(1/(dens*dens*5),1/(dens*dens*5), dust(dens*200, 0.99)):si.smoo); aMDens = 5; aMinor = ( drone(110, aMinEno*1.1) + drone(130.81, aMinEno*1.01) + drone(164.81, aMinEno*1.02) + drone(196, aMinEno*1.21) + drone(293.66, aMinEno*1.05) ):ef.cubicnl(aMinDist,0):fi.lowpass3e(aMinLPF) :co.compressor_mono(100,-5,0.01,0.05)*aMinVol; kickFreq = 0.7+(techno*kikSpd); kickTrig = os.lf_imptrain(kickFreq); kickFM = kickTrig:si.lag_ud(0.0,0.02)*400; kickOsc = os.osc(27.5+kickFM)+os.osc(55+kickFM); kickEnv = en.ar( 0.025, (1/kickFreq)*0.9, kickTrig ); kick = kickOsc*kickEnv:co.compressor_mono(100,-10,0.005,0.01); pipNote = setPip:ba.sAndH(os.lf_imptrain(kickFreq*4)); timePip(note, freq, thresh) = os.osc(ba.midikey2hz(note))* en.asr( (1/freq)*0.01, 1, (1/freq)*0.99, (no.noise+(1))*os.lf_imptrain(freq):ba.sAndH(os.lf_imptrain(freq)) > (thresh) ) ; timePips=( timePip(pipNote, kickFreq*4, 0.8) ):ef.cubicnl(pipDist,0):fi.lowpass3e(pipLP)*pipVol; technoL = kick*kickVol:co.compressor_mono(100,-5,0.005,0.01)*techno:fi.lowpass3e(500); technoR = (timePips+(technoL)):co.compressor_mono(100,-5,0.005,0.01)*techno; right = (technoR+ (aMinor*0.5)+ (wobWobOut))*rscal : co.compressor_mono(mcompra, mcomp, 0.01,0.02)*mvol; process = left,right;
c67407ffa4c9e8d2dac36756b411743fe878e19c761e6f7933296e55734f45ba
JoeWrightMusic/S2B-SolarSail
Synth3.dsp
// SPACE TO BE RESONATOR INSTRUMENT v3.0 import("stdfaust.lib"); //-------------------------------------------CLOCKS bpm=hslider("bpm",81,1,400,1); barHz=bpm/(60*6); step=os.phasor(48,barHz):int+1; //-------------------------------------------UTILS //___________________SELF BLOCKING ENV envAR(att,rel,gate) = (_:1,_>0:- <: en.ar((_*gate,att:ba.sAndH),(_*gate,rel:ba.sAndH),(_*gate))) ~ _; osc(freq) = rdtable(tablesize, os.sinwaveform(tablesize), int(os.phasor(tablesize,freq))) with{ tablesize = 1 << 15; // instead of 1 << 16 }; //-------------------------------------------FM-2OPs //___________________VARIABLES fmVol = hslider("fmVol",0.5,0,1,0.001):si.smoo; fmVerb = hslider("fmVerb", 0.14,0,1,0.001):si.smoo; //fm synth 1 fm1vol=hslider("fm1vol",1,0,1,0.001); fmNxtFreq1 = hslider("fmFreq1",92,0,127,0.01):ba.midikey2hz; fmNxtFreq2 = hslider("fmFreq2",92,0,127,0.01):ba.midikey2hz; fmMm1 = hslider("fmMm1",0.666,0.0,100,0.0001):si.smoo; fmDp1 = hslider("fmDp1",0.3,0.00,10,0.0001):si.smoo; fmAM1 = hslider("fmAM1",0.02,0.001,10,0.01); fmRM1 = hslider("fmRM1",0.2,0.001,10,0.01); fmAC1 = hslider("fmAC1",0.03,0.001,10,0.01); fmRC1 = hslider("fmRC1",0.1,0.001,10,0.01); fmTrigD1 = button("fmTrigD1"); fmGateT1 = checkbox("fmGateT1"); fmEucNo1 = hslider("fmEucNo1", 19, 0, 24, 1); fmEucNo2 = hslider("fmEucNo2", 19, 0, 24, 1); fmModWheel1 = hslider("fmModWheel1", 1, 0.1, 100, 0.001):si.smoo; //fm synth 1 fmEuc1 = ((step*fmEucNo1) % 48) < fmEucNo1 : en.ar(0,0.001); fmRawTrig1 = fmTrigD1+(fmEuc1*fmGateT1); fmTrig1 = envAR(0, fmAC1+fmRC1, fmRawTrig1):en.ar(0,0.001); fmFreq1 = fmNxtFreq1:ba.sAndH(fmTrig1); fmac1 = fmAC1:ba.sAndH(fmTrig1); fmrc1 = fmRC1:ba.sAndH(fmTrig1); fmam1 = fmAM1:ba.sAndH(fmTrig1); fmrm1 = fmRM1:ba.sAndH(fmTrig1); fm2op1(freq,mMul,dMul,trig,am,rm,ac,rc) = osc( freq+( osc(freq*mMul)*freq*dMul*en.ar(am,rm,trig) ) )*envAR(ac,rc, trig)*fm1vol; fmDpm1 = fmDp1*fmModWheel1; //fm synth 1 fmEuc2 = ((step*fmEucNo2) % 48) < fmEucNo2 : en.ar(0,0.001); fmRawTrig2 = fmTrigD1+(fmEuc2*fmGateT1); fmTrig2 = envAR(0, fmAC1+fmRC1, fmRawTrig2):en.ar(0,0.001); fmFreq2 = fmNxtFreq2:ba.sAndH(fmTrig2); //fm group dry = 1-(fmVerb); fmSynths = fmVol*( fm2op1(fmFreq1,fmMm1,fmDpm1,fmTrig1, fmam1,fmrm1,fmac1,fmrc1)+ fm2op1(fmFreq2,fmMm1,fmDpm1,fmTrig2, fmam1,fmrm1,fmac1,fmrc1) )<: (_*dry),(_*fmVerb) : _,(_ : re.mono_freeverb(0.88,0.88,0.8,0)) :+; // re.mono_freeverb(0.88,0.2,0.8,0) //-------------------------------------------KICK/DRONEs //___________________VARIABLES kroneVol = hslider("kroneVol",0.5,0,1,0.001); //krone1 kd1vol=hslider("kd1vol",1,0,1,0.001); kdTrig1 = button("kdTrig1"); kdNxtFreq1 = hslider("kdNxtFreq1", 40, 0, 127, 1):ba.midikey2hz; kdDelta1 = hslider("kdDelta1", -.79,-0.99,5,0.001); kdA1 = hslider("kdA1", 0.02, 0, 15, 0.01); kdR1 = hslider("kdR1", 0.15, 0, 15, 0.01); kdTrigD1 = button("kdTrigD1"); kdGateT1 = checkbox("kdGateT1"); kdEucNo1 = hslider("kdEucNo1", 6, 0, 24, 1); //krone2 kd2vol=hslider("kd2vol",1,0,1,0.001); kdTrig2 = button("kdTrig2"); kdNxtFreq2 = hslider("kdNxtFreq2", 38, 0, 127, 1):ba.midikey2hz; kdDelta2 = hslider("kdDelta2", 0,-0.99,5,0.001); kdA2 = hslider("kdA2", 0.02, 0, 15, 0.01); kdR2 = hslider("kdR2", 3, 0, 15, 0.01); kdTrigD2 = button("kdTrigD2"); kdGateT2 = checkbox("kdGateT2"); kdEucNo2 = hslider("kdEucNo2", 1, 0, 24, 1); //___________________DSP //krone1 kdEuc1 = ((step*kdEucNo1) % 48) < kdEucNo1 : en.ar(0,0.001); kdRawTrig1 = kdTrig1+(kdEuc1*kdGateT1); kdEnvT1 = envAR(kdA1+kdR1, 0, kdRawTrig1); kdGate1 = 1-en.ar(0,0.001,kdEnvT1); kdFreq1 = kdNxtFreq1:ba.sAndH(kdGate1); kddelta1 = kdDelta1:ba.sAndH(kdGate1); kdRamp1 = kdFreq1+(kdFreq1*kddelta1*kdEnvT1); kdEnv1 = envAR(kdA1, kdR1, kdRawTrig1); krone1 = os.triangle(kdRamp1)*kdEnv1*kd1vol; //krone2 kdEuc2 = ((step*kdEucNo2) % 48) < kdEucNo2 : en.ar(0,0.001); kdRawTrig2 = kdTrig2+(kdEuc2*kdGateT2); kdEnvT2 = envAR(kdA2+kdR2, 0, kdRawTrig2); kdGate2 = 1-en.ar(0,0.001,kdEnvT2); kdFreq2 = kdNxtFreq2:ba.sAndH(kdGate2); kddelta2 = kdDelta2:ba.sAndH(kdGate2); kdRamp2 = kdFreq2+(kdFreq2*kddelta2*kdEnvT2); kdEnv2 = envAR(kdA2, kdR2, kdRawTrig2); krone2 = (os.triangle(kdRamp2*2)+os.triangle(kdRamp2))*kdEnv2*kd2vol:fi.lowpass(1, 600); //-------------------------------------------ADRIFT adriftVol = hslider("adriftVol", 0, 0, 1, 0.001)^2:si.smooth(ba.tau2pole(1)); adriftFreq = hslider("adriftFreq", 0, 0, 1, 0.001)*1000+120:si.smoo; noise = no.noise*0.1; filtNoise1 = noise:fi.lowpass6e(adriftFreq):fi.highpass6e(100); adrift = filtNoise1*adriftVol; //-------------------------------------------OUTPUT masterVol = hslider("masterVol", 0.5, 0, 1, 0.001):si.smoo; high = fmSynths+adrift:co.compressor_mono(8,-8,0.02,0.02); low = krone1+(krone1+krone2+(high:fi.lowpass6e(600)*0.7):co.compressor_mono(8,-15,0.02,0.02)):co.compressor_mono(8,-8,0.02,0.02); process = high*masterVol, low*masterVol;
https://raw.githubusercontent.com/JoeWrightMusic/S2B-SolarSail/82d3a76181e5cd6ffee1d33772d6d185ba991eb8/Faust/Synth3.dsp
faust
SPACE TO BE RESONATOR INSTRUMENT v3.0 -------------------------------------------CLOCKS -------------------------------------------UTILS ___________________SELF BLOCKING ENV instead of 1 << 16 -------------------------------------------FM-2OPs ___________________VARIABLES fm synth 1 fm synth 1 fm synth 1 fm group re.mono_freeverb(0.88,0.2,0.8,0) -------------------------------------------KICK/DRONEs ___________________VARIABLES krone1 krone2 ___________________DSP krone1 krone2 -------------------------------------------ADRIFT -------------------------------------------OUTPUT
import("stdfaust.lib"); bpm=hslider("bpm",81,1,400,1); barHz=bpm/(60*6); step=os.phasor(48,barHz):int+1; envAR(att,rel,gate) = (_:1,_>0:- <: en.ar((_*gate,att:ba.sAndH),(_*gate,rel:ba.sAndH),(_*gate))) ~ _; osc(freq) = rdtable(tablesize, os.sinwaveform(tablesize), int(os.phasor(tablesize,freq))) with{ }; fmVol = hslider("fmVol",0.5,0,1,0.001):si.smoo; fmVerb = hslider("fmVerb", 0.14,0,1,0.001):si.smoo; fm1vol=hslider("fm1vol",1,0,1,0.001); fmNxtFreq1 = hslider("fmFreq1",92,0,127,0.01):ba.midikey2hz; fmNxtFreq2 = hslider("fmFreq2",92,0,127,0.01):ba.midikey2hz; fmMm1 = hslider("fmMm1",0.666,0.0,100,0.0001):si.smoo; fmDp1 = hslider("fmDp1",0.3,0.00,10,0.0001):si.smoo; fmAM1 = hslider("fmAM1",0.02,0.001,10,0.01); fmRM1 = hslider("fmRM1",0.2,0.001,10,0.01); fmAC1 = hslider("fmAC1",0.03,0.001,10,0.01); fmRC1 = hslider("fmRC1",0.1,0.001,10,0.01); fmTrigD1 = button("fmTrigD1"); fmGateT1 = checkbox("fmGateT1"); fmEucNo1 = hslider("fmEucNo1", 19, 0, 24, 1); fmEucNo2 = hslider("fmEucNo2", 19, 0, 24, 1); fmModWheel1 = hslider("fmModWheel1", 1, 0.1, 100, 0.001):si.smoo; fmEuc1 = ((step*fmEucNo1) % 48) < fmEucNo1 : en.ar(0,0.001); fmRawTrig1 = fmTrigD1+(fmEuc1*fmGateT1); fmTrig1 = envAR(0, fmAC1+fmRC1, fmRawTrig1):en.ar(0,0.001); fmFreq1 = fmNxtFreq1:ba.sAndH(fmTrig1); fmac1 = fmAC1:ba.sAndH(fmTrig1); fmrc1 = fmRC1:ba.sAndH(fmTrig1); fmam1 = fmAM1:ba.sAndH(fmTrig1); fmrm1 = fmRM1:ba.sAndH(fmTrig1); fm2op1(freq,mMul,dMul,trig,am,rm,ac,rc) = osc( freq+( osc(freq*mMul)*freq*dMul*en.ar(am,rm,trig) ) )*envAR(ac,rc, trig)*fm1vol; fmDpm1 = fmDp1*fmModWheel1; fmEuc2 = ((step*fmEucNo2) % 48) < fmEucNo2 : en.ar(0,0.001); fmRawTrig2 = fmTrigD1+(fmEuc2*fmGateT1); fmTrig2 = envAR(0, fmAC1+fmRC1, fmRawTrig2):en.ar(0,0.001); fmFreq2 = fmNxtFreq2:ba.sAndH(fmTrig2); dry = 1-(fmVerb); fmSynths = fmVol*( fm2op1(fmFreq1,fmMm1,fmDpm1,fmTrig1, fmam1,fmrm1,fmac1,fmrc1)+ fm2op1(fmFreq2,fmMm1,fmDpm1,fmTrig2, fmam1,fmrm1,fmac1,fmrc1) )<: (_*dry),(_*fmVerb) : _,(_ : re.mono_freeverb(0.88,0.88,0.8,0)) :+; kroneVol = hslider("kroneVol",0.5,0,1,0.001); kd1vol=hslider("kd1vol",1,0,1,0.001); kdTrig1 = button("kdTrig1"); kdNxtFreq1 = hslider("kdNxtFreq1", 40, 0, 127, 1):ba.midikey2hz; kdDelta1 = hslider("kdDelta1", -.79,-0.99,5,0.001); kdA1 = hslider("kdA1", 0.02, 0, 15, 0.01); kdR1 = hslider("kdR1", 0.15, 0, 15, 0.01); kdTrigD1 = button("kdTrigD1"); kdGateT1 = checkbox("kdGateT1"); kdEucNo1 = hslider("kdEucNo1", 6, 0, 24, 1); kd2vol=hslider("kd2vol",1,0,1,0.001); kdTrig2 = button("kdTrig2"); kdNxtFreq2 = hslider("kdNxtFreq2", 38, 0, 127, 1):ba.midikey2hz; kdDelta2 = hslider("kdDelta2", 0,-0.99,5,0.001); kdA2 = hslider("kdA2", 0.02, 0, 15, 0.01); kdR2 = hslider("kdR2", 3, 0, 15, 0.01); kdTrigD2 = button("kdTrigD2"); kdGateT2 = checkbox("kdGateT2"); kdEucNo2 = hslider("kdEucNo2", 1, 0, 24, 1); kdEuc1 = ((step*kdEucNo1) % 48) < kdEucNo1 : en.ar(0,0.001); kdRawTrig1 = kdTrig1+(kdEuc1*kdGateT1); kdEnvT1 = envAR(kdA1+kdR1, 0, kdRawTrig1); kdGate1 = 1-en.ar(0,0.001,kdEnvT1); kdFreq1 = kdNxtFreq1:ba.sAndH(kdGate1); kddelta1 = kdDelta1:ba.sAndH(kdGate1); kdRamp1 = kdFreq1+(kdFreq1*kddelta1*kdEnvT1); kdEnv1 = envAR(kdA1, kdR1, kdRawTrig1); krone1 = os.triangle(kdRamp1)*kdEnv1*kd1vol; kdEuc2 = ((step*kdEucNo2) % 48) < kdEucNo2 : en.ar(0,0.001); kdRawTrig2 = kdTrig2+(kdEuc2*kdGateT2); kdEnvT2 = envAR(kdA2+kdR2, 0, kdRawTrig2); kdGate2 = 1-en.ar(0,0.001,kdEnvT2); kdFreq2 = kdNxtFreq2:ba.sAndH(kdGate2); kddelta2 = kdDelta2:ba.sAndH(kdGate2); kdRamp2 = kdFreq2+(kdFreq2*kddelta2*kdEnvT2); kdEnv2 = envAR(kdA2, kdR2, kdRawTrig2); krone2 = (os.triangle(kdRamp2*2)+os.triangle(kdRamp2))*kdEnv2*kd2vol:fi.lowpass(1, 600); adriftVol = hslider("adriftVol", 0, 0, 1, 0.001)^2:si.smooth(ba.tau2pole(1)); adriftFreq = hslider("adriftFreq", 0, 0, 1, 0.001)*1000+120:si.smoo; noise = no.noise*0.1; filtNoise1 = noise:fi.lowpass6e(adriftFreq):fi.highpass6e(100); adrift = filtNoise1*adriftVol; masterVol = hslider("masterVol", 0.5, 0, 1, 0.001):si.smoo; high = fmSynths+adrift:co.compressor_mono(8,-8,0.02,0.02); low = krone1+(krone1+krone2+(high:fi.lowpass6e(600)*0.7):co.compressor_mono(8,-15,0.02,0.02)):co.compressor_mono(8,-8,0.02,0.02); process = high*masterVol, low*masterVol;
764a3257fd299d75980888d3d81f9eebe124dcd484a7536c05c3efa9753941da
JoeWrightMusic/ResonatorInst-v2
Synth.dsp
// SPACE TO BE RESONATOR INSTRUMENT v2.0 import("stdfaust.lib"); //-------------------------------------------CLOCKS bpm=hslider("bpm",120,1,400,1); barHz=bpm/(60*6); step=os.phasor(48,barHz):int+1; //-------------------------------------------UTILS //___________________SELF BLOCKING ENV envAR(att,rel,gate) = (_:1,_>0:- <: en.ar((_*gate,att:ba.sAndH),(_*gate,rel:ba.sAndH),(_*gate))) ~ _; //-------------------------------------------FM-2OPs //___________________VARIABLES fmVol = hslider("fmVol",0.5,0,1,0.001):si.smoo; fmVerb = hslider("fmVerb", 0.5,0,1,0.001):si.smoo; //fm synth 1 fm1vol=hslider("fm1vol",1,0,1,0.001); fmNxtFreq1 = hslider("fmFreq1",69,0,127,0.01):ba.midikey2hz; fmMm1 = hslider("fmMm1",0.5,0.0,100,0.0001):si.smoo; fmDp1 = hslider("fmDp1",0.5,0.00,10,0.0001):si.smoo; fmAM1 = hslider("fmAM1",0.1,0.001,10,0.01); fmRM1 = hslider("fmRM1",0.3,0.001,10,0.01); fmAC1 = hslider("fmAC1",0.1,0.001,10,0.01); fmRC1 = hslider("fmRC1",0.3,0.001,10,0.01); fmTrigD1 = button("fmTrigD1"); fmGateT1 = checkbox("fmGateT1"); fmEucNo1 = hslider("fmEucNo1", 7, 0, 24, 1); fmModWheel1 = hslider("fmModWheel1", 1, 0.1, 100, 0.001):si.smoo; //fm synth 2 fm2vol=hslider("fm2vol",1,0,1,0.001); fmNxtFreq2 = hslider("fmFreq2",62,0,127,0.01):ba.midikey2hz; fmMm2 = hslider("fmMm2",0.5,0.0,100,0.0001):si.smoo; fmDp2 = hslider("fmDp2",0.5,0.00,10,0.0001):si.smoo; fmAM2 = hslider("fmAM2",0.1,0.001,10,0.01); fmRM2 = hslider("fmRM2",0.3,0.001,10,0.01); fmAC2 = hslider("fmAC2",0.1,0.001,10,0.01); fmRC2 = hslider("fmRC2",0.3,0.001,10,0.01); fmTrigD2 = button("fmTrigD2"); fmGateT2 = checkbox("fmGateT2"); fmEucNo2 = hslider("fmEucNo2", 9, 0, 24, 1); fmModWheel2 = hslider("fmModWheel2", 1, 0.1, 100, 0.001):si.smoo; //fm synth 3 fm3vol=hslider("fm3vol",1,0,1,0.001); fmNxtFreq3 = hslider("fmFreq3",52,0,127,0.01):ba.midikey2hz; fmMm3 = hslider("fmMm3",0.5,0.0,100,0.0001):si.smoo; fmDp3 = hslider("fmDp3",0.5,0.00,10,0.0001):si.smoo; fmAM3 = hslider("fmAM3",0.1,0.001,10,0.01); fmRM3 = hslider("fmRM3",0.3,0.001,10,0.01); fmAC3 = hslider("fmAC3",0.1,0.001,10,0.01); fmRC3 = hslider("fmRC3",0.3,0.001,10,0.01); fmTrigD3 = button("fmTrigD3"); fmGateT3 = checkbox("fmGateT3"); fmEucNo3 = hslider("fmEucNo3", 16, 0, 24, 1); fmModWheel3 = hslider("fmModWheel3", 1, 0.1, 100, 0.001):si.smoo; //___________________DSP //fm synth 1 fmEuc1 = ((step*fmEucNo1) % 48) < fmEucNo1 : en.ar(0,0.001); fmRawTrig1 = fmTrigD1+(fmEuc1*fmGateT1); fmTrig1 = envAR(0, fmAC1+fmRC1, fmRawTrig1):en.ar(0,0.001); fmFreq1 = fmNxtFreq1:ba.sAndH(fmTrig1); fmac1 = fmAC1:ba.sAndH(fmTrig1); fmrc1 = fmRC1:ba.sAndH(fmTrig1); fmam1 = fmAM1:ba.sAndH(fmTrig1); fmrm1 = fmRM1:ba.sAndH(fmTrig1); fm2op1(freq,mMul,dMul,trig,am,rm,ac,rc) = os.osc( freq+( os.osc(freq*mMul)*freq*dMul*en.ar(am,rm,trig) ) )*envAR(ac,rc, trig)*fm1vol; fmDpm1 = fmDp1*fmModWheel1; //fm synth 2 fmEuc2 = ((step*fmEucNo2) % 48) < fmEucNo2 : en.ar(0,0.001); fmRawTrig2 = fmTrigD2+(fmEuc2*fmGateT2); fmTrig2 = envAR(0, fmAC2+fmRC2, fmRawTrig2):en.ar(0,0.001); fmFreq2 = fmNxtFreq2:ba.sAndH(fmTrig2); fmac2 = fmAC2:ba.sAndH(fmTrig2); fmrc2 = fmRC2:ba.sAndH(fmTrig2); fmam2 = fmAM2:ba.sAndH(fmTrig2); fmrm2 = fmRM2:ba.sAndH(fmTrig2); fm2op2(freq,mMul,dMul,trig,am,rm,ac,rc) = os.osc( freq+( os.osc(freq*mMul)*freq*dMul*en.ar(am,rm,trig) ) )*envAR(ac,rc, trig)*fm2vol; fmDpm2 = fmDp2*fmModWheel2; //fm synth 3 fmEuc3 = ((step*fmEucNo3) % 48) < fmEucNo3 : en.ar(0,0.001); fmRawTrig3 = fmTrigD3+(fmEuc3*fmGateT3); fmTrig3 = envAR(0, fmAC3+fmRC3, fmRawTrig3):en.ar(0,0.001); fmFreq3 = fmNxtFreq3:ba.sAndH(fmTrig3); fmac3 = fmAC3:ba.sAndH(fmTrig3); fmrc3 = fmRC3:ba.sAndH(fmTrig3); fmam3 = fmAM3:ba.sAndH(fmTrig3); fmrm3 = fmRM3:ba.sAndH(fmTrig3); fm2op3(freq,mMul,dMul,trig,am,rm,ac,rc) = os.osc( freq+( os.osc(freq*mMul)*freq*dMul*en.ar(am,rm,trig) ) )*envAR(ac,rc, trig)*fm3vol; fmDpm3 = fmDp3*fmModWheel3; //fm group dry = 1-(fmVerb); fmSynths = ( fm2op1(fmFreq1,fmMm1,fmDpm1,fmTrig1, fmam1,fmrm1,fmac1,fmrc1)+ fm2op2(fmFreq2,fmMm2,fmDpm2,fmTrig2, fmam2,fmrm2,fmac2,fmrc2)+ fm2op3(fmFreq3,fmMm3,fmDpm3,fmTrig3, fmam3,fmrm3,fmac3,fmrc3) )<: (_*dry),(_*fmVerb) : _,(_:re.mono_freeverb(0.88,0.2,0.8,0)) :+; // re.mono_freeverb(0.5,0.9,0.1,0.5) //-------------------------------------------KICK/DRONEs //___________________VARIABLES kroneVol = hslider("kroneVol",0.5,0,1,0.001); //krone1 kd1vol=hslider("kd1vol",1,0,1,0.001); kdTrig1 = button("kdTrig1"); kdNxtFreq1 = hslider("kdNxtFreq1", 30, 0, 127, 1):ba.midikey2hz; kdDelta1 = hslider("kdDelta1", -0.9,-0.99,5,0.001); kdA1 = hslider("kdA1", 0.01, 0, 15, 0.01); kdR1 = hslider("kdR1", 0.09, 0, 15, 0.01); kdTrigD1 = button("kdTrigD1"); kdGateT1 = checkbox("kdGateT1"); kdEucNo1 = hslider("kdEucNo1", 16, 0, 24, 1); //krone2 kd2vol=hslider("kd2vol",1,0,1,0.001); kdTrig2 = button("kdTrig2"); kdNxtFreq2 = hslider("kdNxtFreq2", 34, 0, 127, 1):ba.midikey2hz; kdDelta2 = hslider("kdDelta2", -0.1,-0.99,5,0.001); kdA2 = hslider("kdA2", 2, 0, 15, 0.01); kdR2 = hslider("kdR2", 2, 0, 15, 0.01); kdTrigD2 = button("kdTrigD2"); kdGateT2 = checkbox("kdGateT2"); kdEucNo2 = hslider("kdEucNo2", 1, 0, 24, 1); //___________________DSP //krone1 kdEuc1 = ((step*kdEucNo1) % 48) < kdEucNo1 : en.ar(0,0.001); kdRawTrig1 = kdTrig1+(kdEuc1*kdGateT1); kdEnvT1 = envAR(kdA1+kdR1, 0, kdRawTrig1); kdGate1 = 1-en.ar(0,0.001,kdEnvT1); kdFreq1 = kdNxtFreq1:ba.sAndH(kdGate1); kddelta1 = kdDelta1:ba.sAndH(kdGate1); kdRamp1 = kdFreq1+(kdFreq1*kddelta1*kdEnvT1); kdEnv1 = envAR(kdA1, kdR1, kdRawTrig1); krone1 = os.triangle(kdRamp1)*kdEnv1*kd1vol; //krone2 kdEuc2 = ((step*kdEucNo2) % 48) < kdEucNo2 : en.ar(0,0.001); kdRawTrig2 = kdTrig2+(kdEuc2*kdGateT2); kdEnvT2 = envAR(kdA2+kdR2, 0, kdRawTrig2); kdGate2 = 1-en.ar(0,0.001,kdEnvT2); kdFreq2 = kdNxtFreq2:ba.sAndH(kdGate2); kddelta2 = kdDelta2:ba.sAndH(kdGate2); kdRamp2 = kdFreq2+(kdFreq2*kddelta2*kdEnvT2); kdEnv2 = envAR(kdA2, kdR2, kdRawTrig2); krone2 = os.triangle(kdRamp2)*kdEnv2*kd2vol; //-------------------------------------------OUTPUT high = fmSynths:co.compressor_mono(20,-15,0.01,0.02)*fmVol; low = krone1+krone2+(high:fi.lowpass6e(150)*0.2):co.compressor_mono(20,-15,0.01,0.02)*kroneVol; process = high, low; //-------------------------------------------TESTING // process = fmEuc1; // process = fmSynths:co.compressor_mono(20, -15, 0.01, 0.02); // process = krone1+krone2:co.limiter_1176_R4_mono; // process = kdFreq1; // process = swerc1+swerc2:co.limiter_1176_R4_mono;s
https://raw.githubusercontent.com/JoeWrightMusic/ResonatorInst-v2/a231ad325d8f13c1e3b3ce582ffedd95081200e8/FAUST/Synth.dsp
faust
SPACE TO BE RESONATOR INSTRUMENT v2.0 -------------------------------------------CLOCKS -------------------------------------------UTILS ___________________SELF BLOCKING ENV -------------------------------------------FM-2OPs ___________________VARIABLES fm synth 1 fm synth 2 fm synth 3 ___________________DSP fm synth 1 fm synth 2 fm synth 3 fm group re.mono_freeverb(0.5,0.9,0.1,0.5) -------------------------------------------KICK/DRONEs ___________________VARIABLES krone1 krone2 ___________________DSP krone1 krone2 -------------------------------------------OUTPUT -------------------------------------------TESTING process = fmEuc1; process = fmSynths:co.compressor_mono(20, -15, 0.01, 0.02); process = krone1+krone2:co.limiter_1176_R4_mono; process = kdFreq1; process = swerc1+swerc2:co.limiter_1176_R4_mono;s
import("stdfaust.lib"); bpm=hslider("bpm",120,1,400,1); barHz=bpm/(60*6); step=os.phasor(48,barHz):int+1; envAR(att,rel,gate) = (_:1,_>0:- <: en.ar((_*gate,att:ba.sAndH),(_*gate,rel:ba.sAndH),(_*gate))) ~ _; fmVol = hslider("fmVol",0.5,0,1,0.001):si.smoo; fmVerb = hslider("fmVerb", 0.5,0,1,0.001):si.smoo; fm1vol=hslider("fm1vol",1,0,1,0.001); fmNxtFreq1 = hslider("fmFreq1",69,0,127,0.01):ba.midikey2hz; fmMm1 = hslider("fmMm1",0.5,0.0,100,0.0001):si.smoo; fmDp1 = hslider("fmDp1",0.5,0.00,10,0.0001):si.smoo; fmAM1 = hslider("fmAM1",0.1,0.001,10,0.01); fmRM1 = hslider("fmRM1",0.3,0.001,10,0.01); fmAC1 = hslider("fmAC1",0.1,0.001,10,0.01); fmRC1 = hslider("fmRC1",0.3,0.001,10,0.01); fmTrigD1 = button("fmTrigD1"); fmGateT1 = checkbox("fmGateT1"); fmEucNo1 = hslider("fmEucNo1", 7, 0, 24, 1); fmModWheel1 = hslider("fmModWheel1", 1, 0.1, 100, 0.001):si.smoo; fm2vol=hslider("fm2vol",1,0,1,0.001); fmNxtFreq2 = hslider("fmFreq2",62,0,127,0.01):ba.midikey2hz; fmMm2 = hslider("fmMm2",0.5,0.0,100,0.0001):si.smoo; fmDp2 = hslider("fmDp2",0.5,0.00,10,0.0001):si.smoo; fmAM2 = hslider("fmAM2",0.1,0.001,10,0.01); fmRM2 = hslider("fmRM2",0.3,0.001,10,0.01); fmAC2 = hslider("fmAC2",0.1,0.001,10,0.01); fmRC2 = hslider("fmRC2",0.3,0.001,10,0.01); fmTrigD2 = button("fmTrigD2"); fmGateT2 = checkbox("fmGateT2"); fmEucNo2 = hslider("fmEucNo2", 9, 0, 24, 1); fmModWheel2 = hslider("fmModWheel2", 1, 0.1, 100, 0.001):si.smoo; fm3vol=hslider("fm3vol",1,0,1,0.001); fmNxtFreq3 = hslider("fmFreq3",52,0,127,0.01):ba.midikey2hz; fmMm3 = hslider("fmMm3",0.5,0.0,100,0.0001):si.smoo; fmDp3 = hslider("fmDp3",0.5,0.00,10,0.0001):si.smoo; fmAM3 = hslider("fmAM3",0.1,0.001,10,0.01); fmRM3 = hslider("fmRM3",0.3,0.001,10,0.01); fmAC3 = hslider("fmAC3",0.1,0.001,10,0.01); fmRC3 = hslider("fmRC3",0.3,0.001,10,0.01); fmTrigD3 = button("fmTrigD3"); fmGateT3 = checkbox("fmGateT3"); fmEucNo3 = hslider("fmEucNo3", 16, 0, 24, 1); fmModWheel3 = hslider("fmModWheel3", 1, 0.1, 100, 0.001):si.smoo; fmEuc1 = ((step*fmEucNo1) % 48) < fmEucNo1 : en.ar(0,0.001); fmRawTrig1 = fmTrigD1+(fmEuc1*fmGateT1); fmTrig1 = envAR(0, fmAC1+fmRC1, fmRawTrig1):en.ar(0,0.001); fmFreq1 = fmNxtFreq1:ba.sAndH(fmTrig1); fmac1 = fmAC1:ba.sAndH(fmTrig1); fmrc1 = fmRC1:ba.sAndH(fmTrig1); fmam1 = fmAM1:ba.sAndH(fmTrig1); fmrm1 = fmRM1:ba.sAndH(fmTrig1); fm2op1(freq,mMul,dMul,trig,am,rm,ac,rc) = os.osc( freq+( os.osc(freq*mMul)*freq*dMul*en.ar(am,rm,trig) ) )*envAR(ac,rc, trig)*fm1vol; fmDpm1 = fmDp1*fmModWheel1; fmEuc2 = ((step*fmEucNo2) % 48) < fmEucNo2 : en.ar(0,0.001); fmRawTrig2 = fmTrigD2+(fmEuc2*fmGateT2); fmTrig2 = envAR(0, fmAC2+fmRC2, fmRawTrig2):en.ar(0,0.001); fmFreq2 = fmNxtFreq2:ba.sAndH(fmTrig2); fmac2 = fmAC2:ba.sAndH(fmTrig2); fmrc2 = fmRC2:ba.sAndH(fmTrig2); fmam2 = fmAM2:ba.sAndH(fmTrig2); fmrm2 = fmRM2:ba.sAndH(fmTrig2); fm2op2(freq,mMul,dMul,trig,am,rm,ac,rc) = os.osc( freq+( os.osc(freq*mMul)*freq*dMul*en.ar(am,rm,trig) ) )*envAR(ac,rc, trig)*fm2vol; fmDpm2 = fmDp2*fmModWheel2; fmEuc3 = ((step*fmEucNo3) % 48) < fmEucNo3 : en.ar(0,0.001); fmRawTrig3 = fmTrigD3+(fmEuc3*fmGateT3); fmTrig3 = envAR(0, fmAC3+fmRC3, fmRawTrig3):en.ar(0,0.001); fmFreq3 = fmNxtFreq3:ba.sAndH(fmTrig3); fmac3 = fmAC3:ba.sAndH(fmTrig3); fmrc3 = fmRC3:ba.sAndH(fmTrig3); fmam3 = fmAM3:ba.sAndH(fmTrig3); fmrm3 = fmRM3:ba.sAndH(fmTrig3); fm2op3(freq,mMul,dMul,trig,am,rm,ac,rc) = os.osc( freq+( os.osc(freq*mMul)*freq*dMul*en.ar(am,rm,trig) ) )*envAR(ac,rc, trig)*fm3vol; fmDpm3 = fmDp3*fmModWheel3; dry = 1-(fmVerb); fmSynths = ( fm2op1(fmFreq1,fmMm1,fmDpm1,fmTrig1, fmam1,fmrm1,fmac1,fmrc1)+ fm2op2(fmFreq2,fmMm2,fmDpm2,fmTrig2, fmam2,fmrm2,fmac2,fmrc2)+ fm2op3(fmFreq3,fmMm3,fmDpm3,fmTrig3, fmam3,fmrm3,fmac3,fmrc3) )<: (_*dry),(_*fmVerb) : _,(_:re.mono_freeverb(0.88,0.2,0.8,0)) :+; kroneVol = hslider("kroneVol",0.5,0,1,0.001); kd1vol=hslider("kd1vol",1,0,1,0.001); kdTrig1 = button("kdTrig1"); kdNxtFreq1 = hslider("kdNxtFreq1", 30, 0, 127, 1):ba.midikey2hz; kdDelta1 = hslider("kdDelta1", -0.9,-0.99,5,0.001); kdA1 = hslider("kdA1", 0.01, 0, 15, 0.01); kdR1 = hslider("kdR1", 0.09, 0, 15, 0.01); kdTrigD1 = button("kdTrigD1"); kdGateT1 = checkbox("kdGateT1"); kdEucNo1 = hslider("kdEucNo1", 16, 0, 24, 1); kd2vol=hslider("kd2vol",1,0,1,0.001); kdTrig2 = button("kdTrig2"); kdNxtFreq2 = hslider("kdNxtFreq2", 34, 0, 127, 1):ba.midikey2hz; kdDelta2 = hslider("kdDelta2", -0.1,-0.99,5,0.001); kdA2 = hslider("kdA2", 2, 0, 15, 0.01); kdR2 = hslider("kdR2", 2, 0, 15, 0.01); kdTrigD2 = button("kdTrigD2"); kdGateT2 = checkbox("kdGateT2"); kdEucNo2 = hslider("kdEucNo2", 1, 0, 24, 1); kdEuc1 = ((step*kdEucNo1) % 48) < kdEucNo1 : en.ar(0,0.001); kdRawTrig1 = kdTrig1+(kdEuc1*kdGateT1); kdEnvT1 = envAR(kdA1+kdR1, 0, kdRawTrig1); kdGate1 = 1-en.ar(0,0.001,kdEnvT1); kdFreq1 = kdNxtFreq1:ba.sAndH(kdGate1); kddelta1 = kdDelta1:ba.sAndH(kdGate1); kdRamp1 = kdFreq1+(kdFreq1*kddelta1*kdEnvT1); kdEnv1 = envAR(kdA1, kdR1, kdRawTrig1); krone1 = os.triangle(kdRamp1)*kdEnv1*kd1vol; kdEuc2 = ((step*kdEucNo2) % 48) < kdEucNo2 : en.ar(0,0.001); kdRawTrig2 = kdTrig2+(kdEuc2*kdGateT2); kdEnvT2 = envAR(kdA2+kdR2, 0, kdRawTrig2); kdGate2 = 1-en.ar(0,0.001,kdEnvT2); kdFreq2 = kdNxtFreq2:ba.sAndH(kdGate2); kddelta2 = kdDelta2:ba.sAndH(kdGate2); kdRamp2 = kdFreq2+(kdFreq2*kddelta2*kdEnvT2); kdEnv2 = envAR(kdA2, kdR2, kdRawTrig2); krone2 = os.triangle(kdRamp2)*kdEnv2*kd2vol; high = fmSynths:co.compressor_mono(20,-15,0.01,0.02)*fmVol; low = krone1+krone2+(high:fi.lowpass6e(150)*0.2):co.compressor_mono(20,-15,0.01,0.02)*kroneVol; process = high, low;
30387c322220ed374b7d869c83ca3347a2e89bd5140e149aa621c121286542d1
nickgang/AFDN-reverb
afdnRev3rd.dsp
declare name "afdnRev3rd"; declare version "0.0"; declare author "Nick Gang & Wisam Reid"; declare description "A feedback delay network reverb for 3rd order ambisonics"; import("stdfaust.lib"); import("AFDN.lib"); //-------------------------`afdnrev3_demo`--------------------------- // A reverb application using `afdnrev0`. // // #### Usage // // ``` // _ : afdnrev1_demo(N,M,NB) : _ // ``` // // Where: // // * `N`: Feedback Delay Network (FDN) order / number of delay lines used = // order of feedback matrix / 2, 4, 8, or 16 [extend primes array below for // 32, 64, ...] // * `M`: Number of delays for early reflections, should have M<=N // * `NB`: Number of frequency bands / Number of (nearly) independent T60 controls // / Integer 3 or greater //------------------------------------------------------------ afdnrev3_demo(N,M,NB) = par(i,A, afdnEarly0(MAXDELAY,delEarly,3,freqs,durs,loopgainmax,nonl)) : hoaRotate3rd(theta) : ( _ : afdnrev0(MAXDELAY,delays,3,freqs,durs,loopgainmax,nonl):> *(gain)) , (si.bus(A-1)) with{ A = 16; // Number of Ambisonics channels MAXDELAY = 8192; // sync w delays and prime_power_delays above defdurs = (8.4,6.5,5.0,3.8,2.7); // NB default durations (sec) deffreqs = (500,1000,2000,4000); // NB-1 default crossover frequencies (Hz) deflens = (56.3,63.0); // 2 default min and max path lengths (same for early and late for now) fdn_group(x) = vgroup("Ambisonics FDN, ORDER 16 [tooltip: See Faust's reverbs.lib for documentation and references]", x); theta_group(x) = fdn_group(hgroup("[1] Reflection Width",x)); freq_group(x) = fdn_group(vgroup("[1] Band Crossover Frequencies", x)); t60_group(x) = fdn_group(hgroup("[2] Band Decay Times (T60)", x)); path_group(x) = fdn_group(vgroup("[3] Room Dimensions", x)); revin_group(x) = fdn_group(hgroup("[4] Input Controls", x)); nonl_group(x) = revin_group(vgroup("[4] Nonlinearity",x)); quench_group(x) = revin_group(vgroup("[3] Reverb State",x)); theta = theta_group(hslider("[1] Rotation of early reflections (radians)", ma.PI/6,0,2*ma.PI,.001)); nonl = nonl_group(hslider("[style:knob] [tooltip: nonlinear mode coupling]", 0, -0.999, 0.999, 0.001)); loopgainmax = 1.0-0.5*quench_group(button("[1] Quench [tooltip: Hold down 'Quench' to clear the reverberator]")); pathmin = path_group(hslider("[1] min acoustic ray length [unit:m] [scale:log] [tooltip: This length (in meters) determines the shortest delay-line used in the FDN reverberator. Think of it as the shortest wall-to-wall separation in the room.]", 46, 0.1, 63, 0.1)); pathmax = path_group(hslider("[2] max acoustic ray length [unit:m] [scale:log] [tooltip: This length (in meters) determines the longest delay-line used in the FDN reverberator. Think of it as the largest wall-to-wall separation in the room.]", 63, 0.1, 63, 0.1)); durvals(i) = t60_group(vslider("[%i] %i [unit:s] [scale:log][tooltip: T60 is the 60dB decay-time in seconds. For concert halls, an overall reverberation time (T60) near 1.9 seconds is typical [Beranek 2004]. Here we may set T60 independently in each frequency band. In real rooms, higher frequency bands generally decay faster due to absorption and scattering.]",ba.take(i+1,defdurs), 0.1, 100, 0.1)); durs = par(i,NB,durvals(NB-1-i)); freqvals(i) = freq_group(hslider("[%i] Band %i upper edge in Hz [unit:Hz] [scale:log] [tooltip: Each delay-line signal is split into frequency-bands for separate decay-time control in each band]",ba.take(i+1,deffreqs), 100, 10000, 1)); freqs = par(i,NB-1,freqvals(i)); delays = de.prime_power_delays(N,pathmin,pathmax); delEarly = de.prime_power_delays(M,pathmin,pathmax); // Early delay times gain = hslider("[3] Wet Level (dB) [unit:dB][tooltip: Output scale factor]", -20, -70, 20, 0.1) : ba.db2linear; // (can cause infinite loop:) with { db2linear(x) = pow(10, x/20.0); }; }; process = afdnrev3_demo(16,8,5);
https://raw.githubusercontent.com/nickgang/AFDN-reverb/48224a4de72617adef0c36ceec0814af611f2582/Source/Faust/afdnRev3rd.dsp
faust
-------------------------`afdnrev3_demo`--------------------------- A reverb application using `afdnrev0`. #### Usage ``` _ : afdnrev1_demo(N,M,NB) : _ ``` Where: * `N`: Feedback Delay Network (FDN) order / number of delay lines used = order of feedback matrix / 2, 4, 8, or 16 [extend primes array below for 32, 64, ...] * `M`: Number of delays for early reflections, should have M<=N * `NB`: Number of frequency bands / Number of (nearly) independent T60 controls / Integer 3 or greater ------------------------------------------------------------ Number of Ambisonics channels sync w delays and prime_power_delays above NB default durations (sec) NB-1 default crossover frequencies (Hz) 2 default min and max path lengths (same for early and late for now) Early delay times (can cause infinite loop:) with { db2linear(x) = pow(10, x/20.0); };
declare name "afdnRev3rd"; declare version "0.0"; declare author "Nick Gang & Wisam Reid"; declare description "A feedback delay network reverb for 3rd order ambisonics"; import("stdfaust.lib"); import("AFDN.lib"); afdnrev3_demo(N,M,NB) = par(i,A, afdnEarly0(MAXDELAY,delEarly,3,freqs,durs,loopgainmax,nonl)) : hoaRotate3rd(theta) : ( _ : afdnrev0(MAXDELAY,delays,3,freqs,durs,loopgainmax,nonl):> *(gain)) , (si.bus(A-1)) with{ fdn_group(x) = vgroup("Ambisonics FDN, ORDER 16 [tooltip: See Faust's reverbs.lib for documentation and references]", x); theta_group(x) = fdn_group(hgroup("[1] Reflection Width",x)); freq_group(x) = fdn_group(vgroup("[1] Band Crossover Frequencies", x)); t60_group(x) = fdn_group(hgroup("[2] Band Decay Times (T60)", x)); path_group(x) = fdn_group(vgroup("[3] Room Dimensions", x)); revin_group(x) = fdn_group(hgroup("[4] Input Controls", x)); nonl_group(x) = revin_group(vgroup("[4] Nonlinearity",x)); quench_group(x) = revin_group(vgroup("[3] Reverb State",x)); theta = theta_group(hslider("[1] Rotation of early reflections (radians)", ma.PI/6,0,2*ma.PI,.001)); nonl = nonl_group(hslider("[style:knob] [tooltip: nonlinear mode coupling]", 0, -0.999, 0.999, 0.001)); loopgainmax = 1.0-0.5*quench_group(button("[1] Quench [tooltip: Hold down 'Quench' to clear the reverberator]")); pathmin = path_group(hslider("[1] min acoustic ray length [unit:m] [scale:log] [tooltip: This length (in meters) determines the shortest delay-line used in the FDN reverberator. Think of it as the shortest wall-to-wall separation in the room.]", 46, 0.1, 63, 0.1)); pathmax = path_group(hslider("[2] max acoustic ray length [unit:m] [scale:log] [tooltip: This length (in meters) determines the longest delay-line used in the FDN reverberator. Think of it as the largest wall-to-wall separation in the room.]", 63, 0.1, 63, 0.1)); durvals(i) = t60_group(vslider("[%i] %i [unit:s] [scale:log][tooltip: T60 is the 60dB decay-time in seconds. For concert halls, an overall reverberation time (T60) near 1.9 seconds is typical [Beranek 2004]. Here we may set T60 independently in each frequency band. In real rooms, higher frequency bands generally decay faster due to absorption and scattering.]",ba.take(i+1,defdurs), 0.1, 100, 0.1)); durs = par(i,NB,durvals(NB-1-i)); freqvals(i) = freq_group(hslider("[%i] Band %i upper edge in Hz [unit:Hz] [scale:log] [tooltip: Each delay-line signal is split into frequency-bands for separate decay-time control in each band]",ba.take(i+1,deffreqs), 100, 10000, 1)); freqs = par(i,NB-1,freqvals(i)); delays = de.prime_power_delays(N,pathmin,pathmax); gain = hslider("[3] Wet Level (dB) [unit:dB][tooltip: Output scale factor]", -20, -70, 20, 0.1) : ba.db2linear; }; process = afdnrev3_demo(16,8,5);
2d6da10f4c550bad42242cf97c060d35a65a1c0f35bf0f8095e3ddf765726847
nickgang/AFDN-reverb
afdnRev2nd.dsp
declare name "afdnRev2nd"; declare version "0.0"; declare author "Nick Gang & Wisam Reid"; declare description "A feedback delay network reverb for 2nd order ambisonics"; import("stdfaust.lib"); import("AFDN.lib"); //-------------------------`afdnrev2_demo`--------------------------- // A reverb application using `afdnrev0`. // // #### Usage // // ``` // _ : afdnrev1_demo(N,M,NB) : _ // ``` // // Where: // // * `N`: Feedback Delay Network (FDN) order / number of delay lines used = // order of feedback matrix / 2, 4, 8, or 16 [extend primes array below for // 32, 64, ...] // * `M`: Number of delays for early reflections, should have M<=N // * `NB`: Number of frequency bands / Number of (nearly) independent T60 controls // / Integer 3 or greater //------------------------------------------------------------ afdnrev2_demo(N,M,NB) = par(i,A, afdnEarly0(MAXDELAY,delEarly,3,freqs,durs,loopgainmax,nonl)) : hoaRotate2nd(theta) : ( _ : afdnrev0(MAXDELAY,delays,3,freqs,durs,loopgainmax,nonl):> *(gain)) , (si.bus(A-1)) with{ A = 9; // Number of Ambisonics channels MAXDELAY = 8192; // sync w delays and prime_power_delays above defdurs = (8.4,6.5,5.0,3.8,2.7); // NB default durations (sec) deffreqs = (500,1000,2000,4000); // NB-1 default crossover frequencies (Hz) deflens = (56.3,63.0); // 2 default min and max path lengths (same for early and late for now) fdn_group(x) = vgroup("Ambisonics FDN, ORDER 16 [tooltip: See Faust's reverbs.lib for documentation and references]", x); theta_group(x) = fdn_group(hgroup("[1] Reflection Width",x)); freq_group(x) = fdn_group(vgroup("[1] Band Crossover Frequencies", x)); t60_group(x) = fdn_group(hgroup("[2] Band Decay Times (T60)", x)); path_group(x) = fdn_group(vgroup("[3] Room Dimensions", x)); revin_group(x) = fdn_group(hgroup("[4] Input Controls", x)); nonl_group(x) = revin_group(vgroup("[4] Nonlinearity",x)); quench_group(x) = revin_group(vgroup("[3] Reverb State",x)); theta = theta_group(hslider("[1] Rotation of early reflections (radians)", ma.PI/6,0,2*ma.PI,.001)); nonl = nonl_group(hslider("[style:knob] [tooltip: nonlinear mode coupling]", 0, -0.999, 0.999, 0.001)); loopgainmax = 1.0-0.5*quench_group(button("[1] Quench [tooltip: Hold down 'Quench' to clear the reverberator]")); pathmin = path_group(hslider("[1] min acoustic ray length [unit:m] [scale:log] [tooltip: This length (in meters) determines the shortest delay-line used in the FDN reverberator. Think of it as the shortest wall-to-wall separation in the room.]", 46, 0.1, 63, 0.1)); pathmax = path_group(hslider("[2] max acoustic ray length [unit:m] [scale:log] [tooltip: This length (in meters) determines the longest delay-line used in the FDN reverberator. Think of it as the largest wall-to-wall separation in the room.]", 63, 0.1, 63, 0.1)); durvals(i) = t60_group(vslider("[%i] %i [unit:s] [scale:log][tooltip: T60 is the 60dB decay-time in seconds. For concert halls, an overall reverberation time (T60) near 1.9 seconds is typical [Beranek 2004]. Here we may set T60 independently in each frequency band. In real rooms, higher frequency bands generally decay faster due to absorption and scattering.]",ba.take(i+1,defdurs), 0.1, 100, 0.1)); durs = par(i,NB,durvals(NB-1-i)); freqvals(i) = freq_group(hslider("[%i] Band %i upper edge in Hz [unit:Hz] [scale:log] [tooltip: Each delay-line signal is split into frequency-bands for separate decay-time control in each band]",ba.take(i+1,deffreqs), 100, 10000, 1)); freqs = par(i,NB-1,freqvals(i)); delays = de.prime_power_delays(N,pathmin,pathmax); delEarly = de.prime_power_delays(M,pathmin,pathmax); // Early delay times gain = hslider("[3] Wet Level (dB) [unit:dB][tooltip: Output scale factor]", -20, -70, 20, 0.1) : ba.db2linear; // (can cause infinite loop:) with { db2linear(x) = pow(10, x/20.0); }; }; process = afdnrev2_demo(16,8,5);
https://raw.githubusercontent.com/nickgang/AFDN-reverb/48224a4de72617adef0c36ceec0814af611f2582/Source/Faust/afdnRev2nd.dsp
faust
-------------------------`afdnrev2_demo`--------------------------- A reverb application using `afdnrev0`. #### Usage ``` _ : afdnrev1_demo(N,M,NB) : _ ``` Where: * `N`: Feedback Delay Network (FDN) order / number of delay lines used = order of feedback matrix / 2, 4, 8, or 16 [extend primes array below for 32, 64, ...] * `M`: Number of delays for early reflections, should have M<=N * `NB`: Number of frequency bands / Number of (nearly) independent T60 controls / Integer 3 or greater ------------------------------------------------------------ Number of Ambisonics channels sync w delays and prime_power_delays above NB default durations (sec) NB-1 default crossover frequencies (Hz) 2 default min and max path lengths (same for early and late for now) Early delay times (can cause infinite loop:) with { db2linear(x) = pow(10, x/20.0); };
declare name "afdnRev2nd"; declare version "0.0"; declare author "Nick Gang & Wisam Reid"; declare description "A feedback delay network reverb for 2nd order ambisonics"; import("stdfaust.lib"); import("AFDN.lib"); afdnrev2_demo(N,M,NB) = par(i,A, afdnEarly0(MAXDELAY,delEarly,3,freqs,durs,loopgainmax,nonl)) : hoaRotate2nd(theta) : ( _ : afdnrev0(MAXDELAY,delays,3,freqs,durs,loopgainmax,nonl):> *(gain)) , (si.bus(A-1)) with{ fdn_group(x) = vgroup("Ambisonics FDN, ORDER 16 [tooltip: See Faust's reverbs.lib for documentation and references]", x); theta_group(x) = fdn_group(hgroup("[1] Reflection Width",x)); freq_group(x) = fdn_group(vgroup("[1] Band Crossover Frequencies", x)); t60_group(x) = fdn_group(hgroup("[2] Band Decay Times (T60)", x)); path_group(x) = fdn_group(vgroup("[3] Room Dimensions", x)); revin_group(x) = fdn_group(hgroup("[4] Input Controls", x)); nonl_group(x) = revin_group(vgroup("[4] Nonlinearity",x)); quench_group(x) = revin_group(vgroup("[3] Reverb State",x)); theta = theta_group(hslider("[1] Rotation of early reflections (radians)", ma.PI/6,0,2*ma.PI,.001)); nonl = nonl_group(hslider("[style:knob] [tooltip: nonlinear mode coupling]", 0, -0.999, 0.999, 0.001)); loopgainmax = 1.0-0.5*quench_group(button("[1] Quench [tooltip: Hold down 'Quench' to clear the reverberator]")); pathmin = path_group(hslider("[1] min acoustic ray length [unit:m] [scale:log] [tooltip: This length (in meters) determines the shortest delay-line used in the FDN reverberator. Think of it as the shortest wall-to-wall separation in the room.]", 46, 0.1, 63, 0.1)); pathmax = path_group(hslider("[2] max acoustic ray length [unit:m] [scale:log] [tooltip: This length (in meters) determines the longest delay-line used in the FDN reverberator. Think of it as the largest wall-to-wall separation in the room.]", 63, 0.1, 63, 0.1)); durvals(i) = t60_group(vslider("[%i] %i [unit:s] [scale:log][tooltip: T60 is the 60dB decay-time in seconds. For concert halls, an overall reverberation time (T60) near 1.9 seconds is typical [Beranek 2004]. Here we may set T60 independently in each frequency band. In real rooms, higher frequency bands generally decay faster due to absorption and scattering.]",ba.take(i+1,defdurs), 0.1, 100, 0.1)); durs = par(i,NB,durvals(NB-1-i)); freqvals(i) = freq_group(hslider("[%i] Band %i upper edge in Hz [unit:Hz] [scale:log] [tooltip: Each delay-line signal is split into frequency-bands for separate decay-time control in each band]",ba.take(i+1,deffreqs), 100, 10000, 1)); freqs = par(i,NB-1,freqvals(i)); delays = de.prime_power_delays(N,pathmin,pathmax); gain = hslider("[3] Wet Level (dB) [unit:dB][tooltip: Output scale factor]", -20, -70, 20, 0.1) : ba.db2linear; }; process = afdnrev2_demo(16,8,5);
c062bf9969aec8491cdb06dd6496e5e8e9452ab4a67d8b28a1c1d0ddeeef2556
nickgang/AFDN-reverb
afdnRev1st.dsp
declare name "afdnRev1st"; declare version "0.0"; declare author "Nick Gang & Wisam Reid"; declare description "A feedback delay network reverb for 1st order ambisonics"; import("stdfaust.lib"); import("AFDN.lib"); //-------------------------`afdnrev1_demo`--------------------------- // A reverb application using `afdnrev0`. // // #### Usage // // ``` // _ : afdnrev1_demo(N,M,NB) : _ // ``` // // Where: // // * `N`: Feedback Delay Network (FDN) order / number of delay lines used = // order of feedback matrix / 2, 4, 8, or 16 [extend primes array below for // 32, 64, ...] // * `M`: Number of delays for early reflections, should have M<=N // * `NB`: Number of frequency bands / Number of (nearly) independent T60 controls // / Integer 3 or greater //------------------------------------------------------------ afdnrev1_demo(N,M,NB) = par(i,A, afdnEarly0(MAXDELAY,delEarly,3,freqs,durs,loopgainmax,nonl)) : hoaRotate1st(theta) : ( _ : afdnrev0(MAXDELAY,delays,3,freqs,durs,loopgainmax,nonl):> *(gain)) , (si.bus(A-1)) with{ A = 4; // Number of Ambisonics channels MAXDELAY = 8192; // sync w delays and prime_power_delays above defdurs = (8.4,6.5,5.0,3.8,2.7); // NB default durations (sec) deffreqs = (500,1000,2000,4000); // NB-1 default crossover frequencies (Hz) deflens = (56.3,63.0); // 2 default min and max path lengths (same for early and late for now) fdn_group(x) = vgroup("Ambisonics FDN, ORDER 16 [tooltip: See Faust's reverbs.lib for documentation and references]", x); theta_group(x) = fdn_group(hgroup("[1] Reflection Width",x)); freq_group(x) = fdn_group(vgroup("[1] Band Crossover Frequencies", x)); t60_group(x) = fdn_group(hgroup("[2] Band Decay Times (T60)", x)); path_group(x) = fdn_group(vgroup("[3] Room Dimensions", x)); revin_group(x) = fdn_group(hgroup("[4] Input Controls", x)); nonl_group(x) = revin_group(vgroup("[4] Nonlinearity",x)); quench_group(x) = revin_group(vgroup("[3] Reverb State",x)); theta = theta_group(hslider("[1] Rotation of early reflections (radians)", ma.PI/6,0,2*ma.PI,.001)); nonl = nonl_group(hslider("[style:knob] [tooltip: nonlinear mode coupling]", 0, -0.999, 0.999, 0.001)); loopgainmax = 1.0-0.5*quench_group(button("[1] Quench [tooltip: Hold down 'Quench' to clear the reverberator]")); pathmin = path_group(hslider("[1] min acoustic ray length [unit:m] [scale:log] [tooltip: This length (in meters) determines the shortest delay-line used in the FDN reverberator. Think of it as the shortest wall-to-wall separation in the room.]", 46, 0.1, 63, 0.1)); pathmax = path_group(hslider("[2] max acoustic ray length [unit:m] [scale:log] [tooltip: This length (in meters) determines the longest delay-line used in the FDN reverberator. Think of it as the largest wall-to-wall separation in the room.]", 63, 0.1, 63, 0.1)); durvals(i) = t60_group(vslider("[%i] %i [unit:s] [scale:log][tooltip: T60 is the 60dB decay-time in seconds. For concert halls, an overall reverberation time (T60) near 1.9 seconds is typical [Beranek 2004]. Here we may set T60 independently in each frequency band. In real rooms, higher frequency bands generally decay faster due to absorption and scattering.]",ba.take(i+1,defdurs), 0.1, 100, 0.1)); durs = par(i,NB,durvals(NB-1-i)); freqvals(i) = freq_group(hslider("[%i] Band %i upper edge in Hz [unit:Hz] [scale:log] [tooltip: Each delay-line signal is split into frequency-bands for separate decay-time control in each band]",ba.take(i+1,deffreqs), 100, 10000, 1)); freqs = par(i,NB-1,freqvals(i)); delays = de.prime_power_delays(N,pathmin,pathmax); delEarly = de.prime_power_delays(M,pathmin,pathmax); // Early delay times gain = hslider("[3] Wet Level (dB) [unit:dB][tooltip: Output scale factor]", -20, -70, 20, 0.1) : ba.db2linear; // (can cause infinite loop:) with { db2linear(x) = pow(10, x/20.0); }; }; process = afdnrev1_demo(16,8,5);
https://raw.githubusercontent.com/nickgang/AFDN-reverb/48224a4de72617adef0c36ceec0814af611f2582/Source/Faust/afdnRev1st.dsp
faust
-------------------------`afdnrev1_demo`--------------------------- A reverb application using `afdnrev0`. #### Usage ``` _ : afdnrev1_demo(N,M,NB) : _ ``` Where: * `N`: Feedback Delay Network (FDN) order / number of delay lines used = order of feedback matrix / 2, 4, 8, or 16 [extend primes array below for 32, 64, ...] * `M`: Number of delays for early reflections, should have M<=N * `NB`: Number of frequency bands / Number of (nearly) independent T60 controls / Integer 3 or greater ------------------------------------------------------------ Number of Ambisonics channels sync w delays and prime_power_delays above NB default durations (sec) NB-1 default crossover frequencies (Hz) 2 default min and max path lengths (same for early and late for now) Early delay times (can cause infinite loop:) with { db2linear(x) = pow(10, x/20.0); };
declare name "afdnRev1st"; declare version "0.0"; declare author "Nick Gang & Wisam Reid"; declare description "A feedback delay network reverb for 1st order ambisonics"; import("stdfaust.lib"); import("AFDN.lib"); afdnrev1_demo(N,M,NB) = par(i,A, afdnEarly0(MAXDELAY,delEarly,3,freqs,durs,loopgainmax,nonl)) : hoaRotate1st(theta) : ( _ : afdnrev0(MAXDELAY,delays,3,freqs,durs,loopgainmax,nonl):> *(gain)) , (si.bus(A-1)) with{ fdn_group(x) = vgroup("Ambisonics FDN, ORDER 16 [tooltip: See Faust's reverbs.lib for documentation and references]", x); theta_group(x) = fdn_group(hgroup("[1] Reflection Width",x)); freq_group(x) = fdn_group(vgroup("[1] Band Crossover Frequencies", x)); t60_group(x) = fdn_group(hgroup("[2] Band Decay Times (T60)", x)); path_group(x) = fdn_group(vgroup("[3] Room Dimensions", x)); revin_group(x) = fdn_group(hgroup("[4] Input Controls", x)); nonl_group(x) = revin_group(vgroup("[4] Nonlinearity",x)); quench_group(x) = revin_group(vgroup("[3] Reverb State",x)); theta = theta_group(hslider("[1] Rotation of early reflections (radians)", ma.PI/6,0,2*ma.PI,.001)); nonl = nonl_group(hslider("[style:knob] [tooltip: nonlinear mode coupling]", 0, -0.999, 0.999, 0.001)); loopgainmax = 1.0-0.5*quench_group(button("[1] Quench [tooltip: Hold down 'Quench' to clear the reverberator]")); pathmin = path_group(hslider("[1] min acoustic ray length [unit:m] [scale:log] [tooltip: This length (in meters) determines the shortest delay-line used in the FDN reverberator. Think of it as the shortest wall-to-wall separation in the room.]", 46, 0.1, 63, 0.1)); pathmax = path_group(hslider("[2] max acoustic ray length [unit:m] [scale:log] [tooltip: This length (in meters) determines the longest delay-line used in the FDN reverberator. Think of it as the largest wall-to-wall separation in the room.]", 63, 0.1, 63, 0.1)); durvals(i) = t60_group(vslider("[%i] %i [unit:s] [scale:log][tooltip: T60 is the 60dB decay-time in seconds. For concert halls, an overall reverberation time (T60) near 1.9 seconds is typical [Beranek 2004]. Here we may set T60 independently in each frequency band. In real rooms, higher frequency bands generally decay faster due to absorption and scattering.]",ba.take(i+1,defdurs), 0.1, 100, 0.1)); durs = par(i,NB,durvals(NB-1-i)); freqvals(i) = freq_group(hslider("[%i] Band %i upper edge in Hz [unit:Hz] [scale:log] [tooltip: Each delay-line signal is split into frequency-bands for separate decay-time control in each band]",ba.take(i+1,deffreqs), 100, 10000, 1)); freqs = par(i,NB-1,freqvals(i)); delays = de.prime_power_delays(N,pathmin,pathmax); gain = hslider("[3] Wet Level (dB) [unit:dB][tooltip: Output scale factor]", -20, -70, 20, 0.1) : ba.db2linear; }; process = afdnrev1_demo(16,8,5);
e36847046ee5f54b4769df542080551d645119b873685b78eac81ad56a051ade
JaoRamos/Faust
11_Led.dsp
/* Detector estilo LED (interfaz grafica) Al mismo medidor del ejemplo anterior podemos cambiarle el estilo para verlo estilo LED que se enciende segun la señal. Para ello le agregamos [style:led] en la etiqueta. Suele ser mas util como detector de señal. A veces hay que ajustar el minimo y maximo hasta tener una visualizacion mas adecuada. [Se aplican todas las mismas ideas y advertencias que antes] Poner un audio en la entrada! || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); led = abs : ba.linear2db : vbargraph("Señal [style:led]", -50, 0); process = _ <: attach(_, led);
https://raw.githubusercontent.com/JaoRamos/Faust/c8895c672104b10729ddc06b42e2169a2943d839/unq/Clase%209/11_Led.dsp
faust
Detector estilo LED (interfaz grafica) Al mismo medidor del ejemplo anterior podemos cambiarle el estilo para verlo estilo LED que se enciende segun la señal. Para ello le agregamos [style:led] en la etiqueta. Suele ser mas util como detector de señal. A veces hay que ajustar el minimo y maximo hasta tener una visualizacion mas adecuada. [Se aplican todas las mismas ideas y advertencias que antes] Poner un audio en la entrada! || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] ||
import("stdfaust.lib"); led = abs : ba.linear2db : vbargraph("Señal [style:led]", -50, 0); process = _ <: attach(_, led);
15469226b82cbecbdff36f81d15d8f87baa6df84777ab2a08b2f9416dd4da3ee
JaoRamos/Faust
2_Rotador.dsp
/* Efecto super elemental de rotador estereo (paneador) automatizado, a partir de una señal mono. Al final sumamos la señal original para obtener una suerte de control de profundidad. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); rate = hslider("Rate (Hz) [scale:exp]", 1, 0.01, 30, 0.01); profundidad = hslider("Profundidad", 0.5, 0, 1, 0.01); oscilador = os.osc(rate)*0.5 + 0.5; rotador = sp.panner(oscilador); // aplicamos el rotador, y luego sumamos por separado la señal original // a cada canal (ya que el original era MONO, y el paneado ESTEREO) // al usar un parametro (entrada) podemos generar copias reutilizables // de la señal, y asi las dirigiremos a distintos lugares. process(entrada) = (entrada*profundidad : rotador) : (+(entrada*(1-profundidad)), // canal L +(entrada*(1-profundidad)) ); // canal R
https://raw.githubusercontent.com/JaoRamos/Faust/c8895c672104b10729ddc06b42e2169a2943d839/unq/Clase_8/2_Rotador.dsp
faust
Efecto super elemental de rotador estereo (paneador) automatizado, a partir de una señal mono. Al final sumamos la señal original para obtener una suerte de control de profundidad. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || aplicamos el rotador, y luego sumamos por separado la señal original a cada canal (ya que el original era MONO, y el paneado ESTEREO) al usar un parametro (entrada) podemos generar copias reutilizables de la señal, y asi las dirigiremos a distintos lugares. canal L canal R
import("stdfaust.lib"); rate = hslider("Rate (Hz) [scale:exp]", 1, 0.01, 30, 0.01); profundidad = hslider("Profundidad", 0.5, 0, 1, 0.01); oscilador = os.osc(rate)*0.5 + 0.5; rotador = sp.panner(oscilador); process(entrada) = (entrada*profundidad : rotador) :
e8d76db0330ec89af1bac4f20b9b52ceef396f2d59a62cdeebb542c32f532835
JaoRamos/Faust
4_Achurador.dsp
/* Efecto casi comico de distorsion achuradora destructora... Hacemos la señal totalmente cuadrada, y luego la hacemos seguir la amplitud de la señal original mediante un seguidor de envolvente. De no hacerlo, la amplitud seria siempre entre 1 y -1 totalmente saturado. Es necesario añadir un filtro de agudos porque la señal 100% saturada es... insoportable! Si observamos el osciloscopio, veremos señales casi cuadradas como resultado. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); // hacemos cuadrada la señal, muy cuadrada!, utilizando un condicional if(): // si la señal es mayor que cero, el resultado es +1 // si la señal es menor que cero, el resultado es -1 // resultado: señal achurada con un hacha desafilada!! achurador(x) = ba.if(x > 0, 1, -1) * 0.5; filtroAgudos = fi.lowpass(10, 10000); process(x) = x : achurador : filtroAgudos *(x : an.amp_follower(0.01)) // seguimos la amplitud original <: _, _;
https://raw.githubusercontent.com/JaoRamos/Faust/c8895c672104b10729ddc06b42e2169a2943d839/unq/Clase_8/4_Achurador.dsp
faust
Efecto casi comico de distorsion achuradora destructora... Hacemos la señal totalmente cuadrada, y luego la hacemos seguir la amplitud de la señal original mediante un seguidor de envolvente. De no hacerlo, la amplitud seria siempre entre 1 y -1 totalmente saturado. Es necesario añadir un filtro de agudos porque la señal 100% saturada es... insoportable! Si observamos el osciloscopio, veremos señales casi cuadradas como resultado. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || hacemos cuadrada la señal, muy cuadrada!, utilizando un condicional if(): si la señal es mayor que cero, el resultado es +1 si la señal es menor que cero, el resultado es -1 resultado: señal achurada con un hacha desafilada!! seguimos la amplitud original
import("stdfaust.lib"); achurador(x) = ba.if(x > 0, 1, -1) * 0.5; filtroAgudos = fi.lowpass(10, 10000); process(x) = x : achurador : filtroAgudos <: _, _;
923f771bc42de8e56bc671bba6002f5462daaa9b8dfbe28fac39051441540d07
JaoRamos/Faust
15_Menu.dsp
/* Selector estilo menu (interfaz grafica) Otra alternativa que tenemos para los sliders es utilizarlos como menu de opciones. Funciona exactamente igual que los ejemplos anteriores, pero como un grupo desplegable de opciones. Para ello utilizamos la etiqueta: "Nombre[style:menu{'Opcion A':0;'Opcion B':1}]" Nuevamente, podemos incluir tantas opciones como necesitemos. Aqui lo limitaremos a solo 3 porque utilizaremos select3 para conmutarlas. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); // "slider" estilo menu (si.. ya no es un slider, pero siempre es un numero) formaOnda = vslider("Forma de onda[style:menu{'Triangular':0;'Diente de sierra':1;'Cuadrada':2}]", 0, 0, 2, 1); triangular = os.triangle(220); sierra = os.sawtooth(220); cuadrada = os.square(220); modulador = os.osc(0.5) * 0.5 + 0.5; // modulamos para que sea mas amena la nota fija // esta vez utilizamos select3 para tener 3 opciones process = select3(formaOnda, triangular, sierra, cuadrada) * modulador * 0.3 <: _, _;
https://raw.githubusercontent.com/JaoRamos/Faust/c8895c672104b10729ddc06b42e2169a2943d839/unq/Clase%209/15_Menu.dsp
faust
Selector estilo menu (interfaz grafica) Otra alternativa que tenemos para los sliders es utilizarlos como menu de opciones. Funciona exactamente igual que los ejemplos anteriores, pero como un grupo desplegable de opciones. Para ello utilizamos la etiqueta: "Nombre[style:menu{'Opcion A':0;'Opcion B':1}]" Nuevamente, podemos incluir tantas opciones como necesitemos. Aqui lo limitaremos a solo 3 porque utilizaremos select3 para conmutarlas. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || "slider" estilo menu (si.. ya no es un slider, pero siempre es un numero) modulamos para que sea mas amena la nota fija esta vez utilizamos select3 para tener 3 opciones
import("stdfaust.lib"); formaOnda = vslider("Forma de onda[style:menu{'Triangular':0;'Diente de sierra':1;'Cuadrada':2}]", 0, 0, 2, 1); triangular = os.triangle(220); sierra = os.sawtooth(220); cuadrada = os.square(220); process = select3(formaOnda, triangular, sierra, cuadrada) * modulador * 0.3 <: _, _;
ae633f5fdd2b708b752e852eb0cc311e5d619a5d9c822cc9d79acf43c566c7e6
JaoRamos/Faust
14_Conmutador.dsp
/* Conmutador y selectores de opciones (interfaz grafica) Teniendo un panel de opciones (o cualquier numero en realidad) podemos crear un conmutador entre DOS o TRES señales utilizando la primitiva select2(x, señal1, señal2). Si x vale 0, se utilizara la primer señal, si vale 1 la segunda señal. Tenemos otro selector llamado select3, exactamente igual a select2 pero con 3 señales conmutables. select3(x, señal1, señal2, señal3) || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); // cuidado con los valores que ponemos de inicio/minimo/maximo/paso en el slider // necesitamos configurar el "slider" para que SOLO nos devuelva 0 - 1 (0 - 1 - 2 para select3) formaOnda = vslider("Forma de onda[style:radio{'Triangular':0;'Diente de sierra':1}]", 0, 0, 1, 1); modulacion = vslider("Velocidad de modulacion [style:radio{'Lenta':0;'Media':1;'Rapida':2;'Maxima':3}]", 0, 0, 3, 1); triangular = os.triangle(220); sierra = os.sawtooth(220); modulador = os.osc(0.5 + modulacion) * 0.5 + 0.5; // modulamos para que sea mas amena la nota fija // select2 dejara pasar solo la señal que diga su primer argumento (0 o 1) // podriamos tener 3 señales utilizando select3 process = hgroup("Conmutadores", select2(formaOnda, triangular, sierra) * modulador * 0.5);
https://raw.githubusercontent.com/JaoRamos/Faust/c8895c672104b10729ddc06b42e2169a2943d839/unq/Clase%209/14_Conmutador.dsp
faust
Conmutador y selectores de opciones (interfaz grafica) Teniendo un panel de opciones (o cualquier numero en realidad) podemos crear un conmutador entre DOS o TRES señales utilizando la primitiva select2(x, señal1, señal2). Si x vale 0, se utilizara la primer señal, si vale 1 la segunda señal. Tenemos otro selector llamado select3, exactamente igual a select2 pero con 3 señales conmutables. select3(x, señal1, señal2, señal3) || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || cuidado con los valores que ponemos de inicio/minimo/maximo/paso en el slider necesitamos configurar el "slider" para que SOLO nos devuelva 0 - 1 (0 - 1 - 2 para select3) modulamos para que sea mas amena la nota fija select2 dejara pasar solo la señal que diga su primer argumento (0 o 1) podriamos tener 3 señales utilizando select3
import("stdfaust.lib"); formaOnda = vslider("Forma de onda[style:radio{'Triangular':0;'Diente de sierra':1}]", 0, 0, 1, 1); modulacion = vslider("Velocidad de modulacion [style:radio{'Lenta':0;'Media':1;'Rapida':2;'Maxima':3}]", 0, 0, 3, 1); triangular = os.triangle(220); sierra = os.sawtooth(220); process = hgroup("Conmutadores", select2(formaOnda, triangular, sierra) * modulador * 0.5);
fa37e740c2bd7e59c4bbd0515dae4332e23aa8672df926adaf04c223066ef0b9
JaoRamos/Faust
6_ChorusMono.dsp
/* Efecto de Chorus MONO de una voz Basicamente generamos un delay con tiempo variable, lo que cambiará el pich/afinación de la señal. La variación la realizamos con un oscilador senoidal, aunque podríamos usar otras formas de onda para distintos colores de chorus. Luego añadimos la señal original a la modificada e incorporamos un filtro de agudos (pasabajos...). || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); // controles rate = hslider("Rate (Hz) [scale:exp]", 0.5, 0.1, 20, 0.1); mix = hslider("Dry/Wet %", 40, 0, 100, 1) / 100; tiempo = ma.SR * hslider("Tiempo (ms) [scale:exp]", 6, 0.1, 20, 0.1) / 1000; // ms corteAgudos = hslider("Corte agudos (Hz) [scale:exp]", 5000, 1000, 20000, 100); // Generamos la envolvente senoidal para el tiempo de delay delayVariante = (os.osc(rate)*0.5 + 0.5) * tiempo; // Al usar un parámetro (x) podemos generar "copias" de la señal ingresante, // que luego podemos dirigir a diferentes secciones. chorus(x) = x * (1-mix) + // señal original ((x : de.fdelay(tiempo, delayVariante) * mix) : // señal con delay variable fi.lowpass(1, corteAgudos)); // filtro // "x" representara a la primera entrada (puede tener cualquier nombre, no solo x) process(x) = chorus(x) <: _, _;
https://raw.githubusercontent.com/JaoRamos/Faust/c8895c672104b10729ddc06b42e2169a2943d839/unq/Clase_8/6_ChorusMono.dsp
faust
Efecto de Chorus MONO de una voz Basicamente generamos un delay con tiempo variable, lo que cambiará el pich/afinación de la señal. La variación la realizamos con un oscilador senoidal, aunque podríamos usar otras formas de onda para distintos colores de chorus. Luego añadimos la señal original a la modificada e incorporamos un filtro de agudos (pasabajos...). || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || controles ms Generamos la envolvente senoidal para el tiempo de delay Al usar un parámetro (x) podemos generar "copias" de la señal ingresante, que luego podemos dirigir a diferentes secciones. señal original señal con delay variable filtro "x" representara a la primera entrada (puede tener cualquier nombre, no solo x)
import("stdfaust.lib"); rate = hslider("Rate (Hz) [scale:exp]", 0.5, 0.1, 20, 0.1); mix = hslider("Dry/Wet %", 40, 0, 100, 1) / 100; corteAgudos = hslider("Corte agudos (Hz) [scale:exp]", 5000, 1000, 20000, 100); delayVariante = (os.osc(rate)*0.5 + 0.5) * tiempo; process(x) = chorus(x) <: _, _;
8b0b2d78c71232782aa8606970d1508afe19d8e7dc53616cbaf89f560ae7825a
JaoRamos/Faust
13_Opciones.dsp
/* Selector de opciones (interfaz grafica) Los "sliders" pueden configurarse para mostrarse como botones de opciones, con cada una representando un numero. Recordemos que "un slider es solo un numero" !!. Para ello incluiremos lo siguiente en su etiqueta de nombre: "Nombre [style:radio{'Opcion A':0;'Opcion B':1}]" Aqui tenemos dos opciones, 'Opcion A' y 'Opcion B' (notar las comillas simples ' ), separadas por el caracter de punto y coma ; A cada opcion se le asigna un valor fijo numerico, 0 y 1 con el caracter dos puntos : Del mismo modo podemos añadir multiples opciones. [Advertencia: el control no funciona si añadimos espacios entre las opciones] De esta forma podemos crear un panel de opciones numericas con un texto indicativo. En el ejemplo siguiente veremos otra aplicacion util de esto. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); notaMidi = vslider("Nota [style:radio{'Do':60;'Mi':64;'Sol':67;'Si':71}]", 60, 0, 100, 1); modulador = os.osc(0.5) * 0.5 + 0.5; // modulamos para que sea mas amena la nota fija // usamos ba.midikey2hz para convertir un numero de nota MIDI en frecuencia process = os.triangle(ba.midikey2hz(notaMidi)) * modulador * 0.5 <: _, _;
https://raw.githubusercontent.com/JaoRamos/Faust/c8895c672104b10729ddc06b42e2169a2943d839/unq/Clase%209/13_Opciones.dsp
faust
Selector de opciones (interfaz grafica) Los "sliders" pueden configurarse para mostrarse como botones de opciones, con cada una representando un numero. Recordemos que "un slider es solo un numero" !!. Para ello incluiremos lo siguiente en su etiqueta de nombre: "Nombre [style:radio{'Opcion A':0;'Opcion B':1}]" Aqui tenemos dos opciones, 'Opcion A' y 'Opcion B' (notar las comillas simples ' ), separadas por el caracter de punto y coma ; A cada opcion se le asigna un valor fijo numerico, 0 y 1 con el caracter dos puntos : Del mismo modo podemos añadir multiples opciones. [Advertencia: el control no funciona si añadimos espacios entre las opciones] De esta forma podemos crear un panel de opciones numericas con un texto indicativo. En el ejemplo siguiente veremos otra aplicacion util de esto. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || modulamos para que sea mas amena la nota fija usamos ba.midikey2hz para convertir un numero de nota MIDI en frecuencia
import("stdfaust.lib"); notaMidi = vslider("Nota [style:radio{'Do':60;'Mi':64;'Sol':67;'Si':71}]", 60, 0, 100, 1); process = os.triangle(ba.midikey2hz(notaMidi)) * modulador * 0.5 <: _, _;
1aae70c2068102aecdc7da9ebf149eef9314026c53597175ef0741ddcf87f87f
JaoRamos/Faust
11_Flanger.dsp
/* Efecto de Flanger estereo simple. El flanger mas elemental se compone de un filtro comb (peine) modulado aplicado a una señal. Tradicionalmente se lo obtiene sumando al original, una copia retrasada en el tiempo. Esto produce una serie de valles en el espectro, cuyas posiciones guardan una relación armónica. Es habitual que estas posiciones sean moduladas por un LFO. Aquí tenemos un ejemplo rudimentario de flanger estereo, mediante una sencilla modulación del tiempo de retardo (en samples, realmente) mencionado. Mas info en: https://en.wikipedia.org/wiki/Flanging || Juan Ramos 2021 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); retardo = vslider("Retardo", 20, 10, 100, 0.01) + (rango*lfo); rate = vslider("Rate LFO", 0.3, 0.1, 5, 0.01); est = vslider("Estereo", 40, 0, 100, 1); feedback = vslider("Feedback", 0.5, 0, 0.99, 0.01); depth = vslider("Profundidad", 0.75, 0.0, 1.0, 0.01); rango = vslider("Rango retardo", 15, 10, 100, 0.01); master = vslider("Volumen", 0.8, 0.0, 1.5, 0.01); // se pueden usar otros osciladores como LFO lfo = (os.osc(rate) + 1)*0.5; flanger(in, del, est, feedb, depth) = ((@(del + est)) ~ (in + *(feedb)) // bardo ) *(depth) + in; process(in) = hgroup("Super flanger", flanger(in, retardo, 0, feedback, depth)*master, flanger(in, retardo, est, feedback, depth)*master);
https://raw.githubusercontent.com/JaoRamos/Faust/d3c8edcd42f44f37975d1fe80064be98434706cc/unq/Clase_8/11_Flanger.dsp
faust
Efecto de Flanger estereo simple. El flanger mas elemental se compone de un filtro comb (peine) modulado aplicado a una señal. Tradicionalmente se lo obtiene sumando al original, una copia retrasada en el tiempo. Esto produce una serie de valles en el espectro, cuyas posiciones guardan una relación armónica. Es habitual que estas posiciones sean moduladas por un LFO. Aquí tenemos un ejemplo rudimentario de flanger estereo, mediante una sencilla modulación del tiempo de retardo (en samples, realmente) mencionado. Mas info en: https://en.wikipedia.org/wiki/Flanging || Juan Ramos 2021 - Universidad Nacional de Quilmes || || [email protected] || se pueden usar otros osciladores como LFO bardo
import("stdfaust.lib"); retardo = vslider("Retardo", 20, 10, 100, 0.01) + (rango*lfo); rate = vslider("Rate LFO", 0.3, 0.1, 5, 0.01); est = vslider("Estereo", 40, 0, 100, 1); feedback = vslider("Feedback", 0.5, 0, 0.99, 0.01); depth = vslider("Profundidad", 0.75, 0.0, 1.0, 0.01); rango = vslider("Rango retardo", 15, 10, 100, 0.01); master = vslider("Volumen", 0.8, 0.0, 1.5, 0.01); lfo = (os.osc(rate) + 1)*0.5; flanger(in, del, est, feedb, depth) = ((@(del + est)) ) *(depth) + in; process(in) = hgroup("Super flanger", flanger(in, retardo, 0, feedback, depth)*master, flanger(in, retardo, est, feedback, depth)*master);
58f429087825678e94ceb76af7862c6b4c0aa89b67771f4ca0502e84bf2fbe53
JaoRamos/Faust
karplus.dsp
import("stdfaust.lib"); // frecuencia desde MIDI o teclado frecuencia = nentry("freq", 120, 60, 20000, 1); // cantidad de muestras de retardo segun la fundamental deseada // puede haber desafinaciones porque los retardos son numeros enteros! retardo = int(ma.SR / frecuencia); // Controles del ruido del Karplus-Strong GAIN_MINIMO = 0.7; // Cuanto menor sea, mas se parecera al ruido blanco GAIN_MAXIMO = 0.999; // Cuidado no llegar a 1, ¡o el sonido no se detendra! invertir = (checkbox("Invertir ruido") * 2 - 1) * -1; // -1 a 1 ¡ver el efecto! gainRealimentacion = hslider("Gain", GAIN_MAXIMO * 0.99, GAIN_MINIMO, GAIN_MAXIMO, 0.0001); envolvente = en.ar(0.003, 0.01, button("gate")) ; // envolvente para el ruido, experimentar! // Filtro. Probar cambiar sus parametros filtroKarplus = fi.lowpass(2, 5000); // Generamos el retardo con el filtro retardoFiltrado = @ (retardo) : filtroKarplus : *(gainRealimentacion * invertir); // Componemos el algoritmo, con la recursion ~ para que se vaya sumando al original karplusStrong = no.noise * envolvente : + ~ retardoFiltrado; // si se dispone de un control de modulacion MIDI, jugar con este filtro frecResonante = hslider("Resonante Wah (¡mover!)[midi:ctrl 1]", 1, 0, 1, 0.01) : si.smoo; filtroRes = fi.resonlp(frecResonante * 4000 + 300, hslider("Q del filtro Resonante", 10, 1, 100, 0.01), 0.5); // Gain fijo de 0.5 // incorporamos el velocity MIDI velocity = nentry("gain", 0, 0, 1, 0.0001); // Karplus Strong! (mono duplicado en L y R mediante la bifurcacion <: ) process = karplusStrong * velocity : filtroRes <: _, _;
https://raw.githubusercontent.com/JaoRamos/Faust/4659e248a42dfcb8e623283ce4e6e60dd8b3ca59/unq/Clase_6/karplus.dsp
faust
frecuencia desde MIDI o teclado cantidad de muestras de retardo segun la fundamental deseada puede haber desafinaciones porque los retardos son numeros enteros! Controles del ruido del Karplus-Strong Cuanto menor sea, mas se parecera al ruido blanco Cuidado no llegar a 1, ¡o el sonido no se detendra! -1 a 1 ¡ver el efecto! envolvente para el ruido, experimentar! Filtro. Probar cambiar sus parametros Generamos el retardo con el filtro Componemos el algoritmo, con la recursion ~ para que se vaya sumando al original si se dispone de un control de modulacion MIDI, jugar con este filtro Gain fijo de 0.5 incorporamos el velocity MIDI Karplus Strong! (mono duplicado en L y R mediante la bifurcacion <: )
import("stdfaust.lib"); frecuencia = nentry("freq", 120, 60, 20000, 1); retardo = int(ma.SR / frecuencia); gainRealimentacion = hslider("Gain", GAIN_MAXIMO * 0.99, GAIN_MINIMO, GAIN_MAXIMO, 0.0001); filtroKarplus = fi.lowpass(2, 5000); retardoFiltrado = @ (retardo) : filtroKarplus : *(gainRealimentacion * invertir); karplusStrong = no.noise * envolvente : + ~ retardoFiltrado; frecResonante = hslider("Resonante Wah (¡mover!)[midi:ctrl 1]", 1, 0, 1, 0.01) : si.smoo; filtroRes = fi.resonlp(frecResonante * 4000 + 300, hslider("Q del filtro Resonante", 10, 1, 100, 0.01), velocity = nentry("gain", 0, 0, 1, 0.0001); process = karplusStrong * velocity : filtroRes <: _, _;
f2e30d686f1696557c64f5427e8c47793e716936b6fefed7f024e4e95c2d50e4
JaoRamos/Faust
karplus_wah.dsp
/* NOTA: para que suene hay que poner poly voices en 1 o mas (mono no sirve) y darle RUN*/ import("stdfaust.lib"); // frecuencia desde MIDI o teclado frecuencia = nentry("freq", 120, 60, 20000, 1); // cantidad de muestras de retardo segun la fundamental deseada // puede haber desafinaciones porque los retardos son numeros enteros! retardo = int(ma.SR / frecuencia); // Controles del ruido del Karplus-Strong GAIN_MINIMO = 0.7; // Cuanto menor sea, mas se parecera al ruido blanco GAIN_MAXIMO = 0.999; // Cuidado no llegar a 1, ¡o el sonido no se detendra! invertir = (checkbox("Invertir ruido") * 2 - 1) * -1; // -1 a 1 ¡ver el efecto! gainRealimentacion = hslider("Gain", GAIN_MAXIMO * 0.99, GAIN_MINIMO, GAIN_MAXIMO, 0.0001); envolvente = en.ar(0.003, 0.01, button("gate")) ; // envolvente para el ruido, experimentar! // Filtro. Probar cambiar sus parametros filtroKarplus = fi.lowpass(2, 5000); // Generamos el retardo con el filtro retardoFiltrado = @ (retardo) : filtroKarplus : *(gainRealimentacion * invertir); // Componemos el algoritmo, con la recursion ~ para que se vaya sumando al original karplusStrong = no.noise * envolvente : + ~ retardoFiltrado; // si se dispone de un control de modulacion MIDI, jugar con este filtro frecResonante = hslider("Resonante Wah (¡mover!)[midi:ctrl 1]", 1, 0, 1, 0.01) : si.smoo; filtroRes = fi.resonlp(frecResonante * 4000 + 300, hslider("Q del filtro Resonante", 10, 1, 100, 0.01), 0.5); // Gain fijo de 0.5 // incorporamos el velocity MIDI velocity = nentry("gain", 0, 0, 1, 0.0001); // Karplus Strong! (mono duplicado en L y R mediante la bifurcacion <: ) process = karplusStrong * velocity : filtroRes <: _, _;
https://raw.githubusercontent.com/JaoRamos/Faust/10dc7845e80940bf82549a0ad8ede97abfd2f7f7/sueltos/karplus_wah.dsp
faust
NOTA: para que suene hay que poner poly voices en 1 o mas (mono no sirve) y darle RUN frecuencia desde MIDI o teclado cantidad de muestras de retardo segun la fundamental deseada puede haber desafinaciones porque los retardos son numeros enteros! Controles del ruido del Karplus-Strong Cuanto menor sea, mas se parecera al ruido blanco Cuidado no llegar a 1, ¡o el sonido no se detendra! -1 a 1 ¡ver el efecto! envolvente para el ruido, experimentar! Filtro. Probar cambiar sus parametros Generamos el retardo con el filtro Componemos el algoritmo, con la recursion ~ para que se vaya sumando al original si se dispone de un control de modulacion MIDI, jugar con este filtro Gain fijo de 0.5 incorporamos el velocity MIDI Karplus Strong! (mono duplicado en L y R mediante la bifurcacion <: )
import("stdfaust.lib"); frecuencia = nentry("freq", 120, 60, 20000, 1); retardo = int(ma.SR / frecuencia); gainRealimentacion = hslider("Gain", GAIN_MAXIMO * 0.99, GAIN_MINIMO, GAIN_MAXIMO, 0.0001); filtroKarplus = fi.lowpass(2, 5000); retardoFiltrado = @ (retardo) : filtroKarplus : *(gainRealimentacion * invertir); karplusStrong = no.noise * envolvente : + ~ retardoFiltrado; frecResonante = hslider("Resonante Wah (¡mover!)[midi:ctrl 1]", 1, 0, 1, 0.01) : si.smoo; filtroRes = fi.resonlp(frecResonante * 4000 + 300, hslider("Q del filtro Resonante", 10, 1, 100, 0.01), velocity = nentry("gain", 0, 0, 1, 0.0001); process = karplusStrong * velocity : filtroRes <: _, _;
1831d32d39b65aa12559bfa2a3f7be588b00efdebe7cb265db97bb207e775143
JaoRamos/Faust
7_ChorusEstereo.dsp
/* Efecto de Chorus ESTEREO simple Partiendo del Chorus MONO, generamos el efecto en ambos canales, pero a uno (R) le invertimos la fase del oscilador. El resultado es que la "desafinación" queda invertida en R respecto de L, cuando uno está al máximo, el otro al mínimo. Es crudo pero efectivo...! Un chorus estereo más sofisticado podría tener voces independientes con parámetros distintos... veremos eso en el siguiente ejemplo. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); rate = hslider("Rate (Hz) [scale:exp]", 1, 0.01, 20, 0.01); mix = hslider("Dry/Wet %", 50, 0, 100, 1) / 100; tiempoMax = ma.SR * hslider("Tiempo máximo (ms) [scale:exp]", 2, 0.01, 20, 0.01) / 1000; // ms corteAgudos = hslider("Corte agudos (Hz) [scale:exp]", 8000, 100, 20000, 100); // Generamos la envolvente senoidal para el tiempo de delay // Icorporamos el parámetro inversor de fase (1 o -1) delayVariante(fase) = (fase * os.osc(rate) * 0.5 + 0.5) * tiempoMax; // Al usar un parámetro (x) podemos generar "copias" de la señal ingresante, // que luego podemos dirigir a diferentes secciones. chorus(x, fase) = x * (1-mix) + // señal original ((x : de.fdelay(tiempoMax, delayVariante(fase)) * mix) : // delay variable fi.lowpass(1, corteAgudos)); // filtro inversor = (checkbox("Bypass estereo!") * 2) - 1; // Acá está la clave de la inversión de fase: si ambos canales tienen la misma fase, // no habrá efecto estereo, sonarán iguales (mono), por eso también le podemos llamar // "bypass" al inversor del canal derecho. Al izquierdo le damos fase *1 (sin cambios). // Ponemos (x) en process, porque necesitamos copiar la entrada L a ambos chorus process(x) = chorus(x, 1), chorus(x, inversor);
https://raw.githubusercontent.com/JaoRamos/Faust/c8895c672104b10729ddc06b42e2169a2943d839/unq/Clase_8/7_ChorusEstereo.dsp
faust
Efecto de Chorus ESTEREO simple Partiendo del Chorus MONO, generamos el efecto en ambos canales, pero a uno (R) le invertimos la fase del oscilador. El resultado es que la "desafinación" queda invertida en R respecto de L, cuando uno está al máximo, el otro al mínimo. Es crudo pero efectivo...! Un chorus estereo más sofisticado podría tener voces independientes con parámetros distintos... veremos eso en el siguiente ejemplo. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || ms Generamos la envolvente senoidal para el tiempo de delay Icorporamos el parámetro inversor de fase (1 o -1) Al usar un parámetro (x) podemos generar "copias" de la señal ingresante, que luego podemos dirigir a diferentes secciones. señal original delay variable filtro Acá está la clave de la inversión de fase: si ambos canales tienen la misma fase, no habrá efecto estereo, sonarán iguales (mono), por eso también le podemos llamar "bypass" al inversor del canal derecho. Al izquierdo le damos fase *1 (sin cambios). Ponemos (x) en process, porque necesitamos copiar la entrada L a ambos chorus
import("stdfaust.lib"); rate = hslider("Rate (Hz) [scale:exp]", 1, 0.01, 20, 0.01); mix = hslider("Dry/Wet %", 50, 0, 100, 1) / 100; corteAgudos = hslider("Corte agudos (Hz) [scale:exp]", 8000, 100, 20000, 100); delayVariante(fase) = (fase * os.osc(rate) * 0.5 + 0.5) * tiempoMax; inversor = (checkbox("Bypass estereo!") * 2) - 1; process(x) = chorus(x, 1), chorus(x, inversor);
4b233b7f94a0b85a04bf95eb170238c49d2b6f7e9decb8a4c4b77d3d0a562750
JaoRamos/Faust
16_TabsSinte.dsp
/* Tabs/pestañas (interfaz grafica) Podemos mejorar notablemente la interfaz grafica utilizando pestañas para agrupar los distintos controles, por ejempo segun categorias. Para ello utilizamos la primitiva: tgroup("nombre", elementos); Aqui "elementos" seran elementos que utilicen conjuntos de vgroup o hgroup, y automaticamente se organizaran en pestañas. [Advertencia: a veces las pestañas se amontonan si la ventana del DSP es muy pequeña, conviene agrandarla o seleccionar Popup UI en el panel de la izquierda!] || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); // GRUPOS DEFINIDOS de oscilador, salida y reverb numOscilador = hgroup("[0]Oscilador", formaOnda); // "slider" estilo menu (si.. ya no es un slider, pero siempre es un numero) formaOnda = vslider( "Forma de onda[style:menu{'Triangular':0;'Diente de sierra':1;'Cuadrada':2}]", 1, 0, 2, 1 ); // (recordemos que con un numero entre corchetes [x] forzamos un orden en particular para los elementos) salida = hgroup("[2]Salida", filtro : volumen); volumen = * (hslider("Volumen", 50, 0, 100, 0.1) / 100); filtro = fi.lowpass(2, hslider("Corte agudos (Hz)[scale:exp]", 2000, 500, 20000, 1)); reverb = hgroup("[1]Reverb", dm.freeverb_demo); // reverb estereo // GRUPO/PESTAÑA "FORZADA" // Con h:xxxx/ o v:xxxx/ podemos forzar un grupo horizontal o vertical a donde pertenecera cada control // este "grupo" se transformara en una pestaña // Lo escribimos usando / como si fueran carpetas o una direccion web velocity = nentry("h:[3]MIDI/gain", 0, 0, 1, 0.01); frecuencia = nentry("h:[3]MIDI/freq", 220, 1, 4000, 0.01); gate = nentry("h:[3]MIDI/gate", 0, 0, 1, 1) : si.smoo; // smoo para evitar clics de audio (envolvente) // los osciladores que van a sonar triangular = os.triangle(frecuencia); sierra = os.sawtooth(frecuencia); cuadrada = os.square(frecuencia); // esta vez utilizamos select3 para tener 3 opciones sinte = select3(numOscilador, triangular, sierra, cuadrada) * velocity * gate : salida <: reverb; // creamos el grupo de pestañas, definidas segun cada hgroup (o vgroup) process = tgroup("Super sinte genial", sinte);
https://raw.githubusercontent.com/JaoRamos/Faust/c8895c672104b10729ddc06b42e2169a2943d839/unq/Clase%209/16_TabsSinte.dsp
faust
Tabs/pestañas (interfaz grafica) Podemos mejorar notablemente la interfaz grafica utilizando pestañas para agrupar los distintos controles, por ejempo segun categorias. Para ello utilizamos la primitiva: tgroup("nombre", elementos); Aqui "elementos" seran elementos que utilicen conjuntos de vgroup o hgroup, y automaticamente se organizaran en pestañas. [Advertencia: a veces las pestañas se amontonan si la ventana del DSP es muy pequeña, conviene agrandarla o seleccionar Popup UI en el panel de la izquierda!] || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || GRUPOS DEFINIDOS de oscilador, salida y reverb "slider" estilo menu (si.. ya no es un slider, pero siempre es un numero) (recordemos que con un numero entre corchetes [x] forzamos un orden en particular para los elementos) reverb estereo GRUPO/PESTAÑA "FORZADA" Con h:xxxx/ o v:xxxx/ podemos forzar un grupo horizontal o vertical a donde pertenecera cada control este "grupo" se transformara en una pestaña Lo escribimos usando / como si fueran carpetas o una direccion web smoo para evitar clics de audio (envolvente) los osciladores que van a sonar esta vez utilizamos select3 para tener 3 opciones creamos el grupo de pestañas, definidas segun cada hgroup (o vgroup)
import("stdfaust.lib"); numOscilador = hgroup("[0]Oscilador", formaOnda); formaOnda = vslider( "Forma de onda[style:menu{'Triangular':0;'Diente de sierra':1;'Cuadrada':2}]", 1, 0, 2, 1 ); salida = hgroup("[2]Salida", filtro : volumen); volumen = * (hslider("Volumen", 50, 0, 100, 0.1) / 100); filtro = fi.lowpass(2, hslider("Corte agudos (Hz)[scale:exp]", 2000, 500, 20000, 1)); velocity = nentry("h:[3]MIDI/gain", 0, 0, 1, 0.01); frecuencia = nentry("h:[3]MIDI/freq", 220, 1, 4000, 0.01); triangular = os.triangle(frecuencia); sierra = os.sawtooth(frecuencia); cuadrada = os.square(frecuencia); sinte = select3(numOscilador, triangular, sierra, cuadrada) * velocity * gate : salida <: reverb; process = tgroup("Super sinte genial", sinte);
9a6d7221b0ac94b1663ee939b10a96ce70f48da574b55a25df7d2b50c3e0ee4d
JaoRamos/Faust
8_ChorusVoces.dsp
import("stdfaust.lib"); /* Efecto de Chorus ESTEREO de multiples voces Este efecto es mas complejo: definiremos un "coro" compuesto de "voces". Cada voz será aproximadamente lo mismo que el chorus mono, pero con parámetros que nos permitirán replicarla muchas veces y asignarle un valor de Paneo. Utilizaremos la expresión with{...}, que nos permite especificar un ámbito particular para alguna definición. Por lo general esto lo hacíamos por fuera, pero para que cada voz tenga su propio grupo de parámetros es necesario with{} */ nVoces = 8; // se puede cambiar... enteros mayores a 1 unaVoz(entr, j) = vgroup("[%j] Voz %j", voz) with { voz = entr : de.fdelay(tiempoMax, delayVariable) * vol : sp.panner(pan); // aprovecharemos la funcion sin() para generar variedad en los valores por defecto!! vol = vslider("[2]Nivel[style:knob]", abs(sin(j*10)) / 2 + 0.25, 0, 1, 0.01) : si.smoo; tiempoMax = ma.SR * hslider("[1]Tiempo (ms) [scale:exp][style:knob]", 0.2 + abs(sin(j*5)*2), 0.01, 20, 0.01) / 1000; rate = vslider("[0]Rate (Hz) [scale:exp] [style:knob]", 0.2 + abs(sin(j*10)), 0.1, 10, 0.1) : si.smoo; pan = vslider("[3]Pan[style:knob]", sin(j*5), -1, 1, 0.01) * 0.5 + 0.5 : si.smoo; delayVariable = (os.osc(rate) * 0.5 + 1) * tiempoMax; }; coro(audioIn, nVoces) = hgroup("Chorus de %nVoces voces", par(i, nVoces, unaVoz(audioIn, i+1))); corteAgudos = fi.lowpass(1, vslider("[0]HiCut (Hz) [scale:exp]", 8000, 100, 20000, 100) : si.smoo); wet = vslider("[1]Wet % [scale:exp]", 50, 0, 200, 1) / 100 : si.smoo; dry = vslider("[2]Dry % [scale:exp]", 50, 0, 200, 1) / 100 : si.smoo; master = vslider("[3]Volumen % [scale:exp]", 100, 0, 200, 1) / 100 : si.smoo; process(entrada) = hgroup("Efecto chorus", coro(entrada, nVoces) :> // bajamos a 2 canales hgroup("Controles", (_ : corteAgudos : *(wet) : +(entrada*dry)) * master, (_ : corteAgudos : *(wet) : +(entrada*dry)) * master ) );
https://raw.githubusercontent.com/JaoRamos/Faust/c8895c672104b10729ddc06b42e2169a2943d839/unq/Clase_8/8_ChorusVoces.dsp
faust
Efecto de Chorus ESTEREO de multiples voces Este efecto es mas complejo: definiremos un "coro" compuesto de "voces". Cada voz será aproximadamente lo mismo que el chorus mono, pero con parámetros que nos permitirán replicarla muchas veces y asignarle un valor de Paneo. Utilizaremos la expresión with{...}, que nos permite especificar un ámbito particular para alguna definición. Por lo general esto lo hacíamos por fuera, pero para que cada voz tenga su propio grupo de parámetros es necesario with{} se puede cambiar... enteros mayores a 1 aprovecharemos la funcion sin() para generar variedad en los valores por defecto!! bajamos a 2 canales
import("stdfaust.lib"); unaVoz(entr, j) = vgroup("[%j] Voz %j", voz) with { voz = entr : de.fdelay(tiempoMax, delayVariable) * vol : sp.panner(pan); vol = vslider("[2]Nivel[style:knob]", abs(sin(j*10)) / 2 + 0.25, 0, 1, 0.01) : si.smoo; tiempoMax = ma.SR * hslider("[1]Tiempo (ms) [scale:exp][style:knob]", 0.2 + abs(sin(j*5)*2), 0.01, 20, 0.01) / 1000; rate = vslider("[0]Rate (Hz) [scale:exp] [style:knob]", 0.2 + abs(sin(j*10)), 0.1, 10, 0.1) : si.smoo; pan = vslider("[3]Pan[style:knob]", sin(j*5), -1, 1, 0.01) * 0.5 + 0.5 : si.smoo; delayVariable = (os.osc(rate) * 0.5 + 1) * tiempoMax; }; coro(audioIn, nVoces) = hgroup("Chorus de %nVoces voces", par(i, nVoces, unaVoz(audioIn, i+1))); corteAgudos = fi.lowpass(1, vslider("[0]HiCut (Hz) [scale:exp]", 8000, 100, 20000, 100) : si.smoo); wet = vslider("[1]Wet % [scale:exp]", 50, 0, 200, 1) / 100 : si.smoo; dry = vslider("[2]Dry % [scale:exp]", 50, 0, 200, 1) / 100 : si.smoo; master = vslider("[3]Volumen % [scale:exp]", 100, 0, 200, 1) / 100 : si.smoo; hgroup("Controles", (_ : corteAgudos : *(wet) : +(entrada*dry)) * master, (_ : corteAgudos : *(wet) : +(entrada*dry)) * master ) );
e4027c9ae6f18feddad0ce8646f6e87eae050b6896e85a4c147355c871d72908
JaoRamos/Faust
5_Phaser.dsp
/* Efecto de Phaser estereo simple. El phaser mas elemental se compone de un filtro all-pass (pasa todo), que (en teoria) no modifica la amplitud de las frecuencias (a diferencia de los demas filtros), pero cambia las relaciones de FASE de estas frecuencias. Si luego sumamos su resultado con la señal original, produciremos cancelaciones y todo tipo de efectos de fase en distintas partes del espectro. Finalmente, si incorporamos una modulación en el parametro de retardo del filtro all-pass, haremos que estas cancelaciones cambien constantemente, produciendo el efecto que conocemos como PHASER. A diferencia de un flanger, por lo general un phaser no guarda una relación específica (ni armónica...) entre las posiciones de los valles que se producen en el espectro; el efecto es similar, pero presenta "otro color". Aquí tenemos un ejemplo de un phaser de 5 etapas, pero en dos canales independientes para tener un pseudo phaser estereo. Simplemente reusamos la misma definicion y le ponemos una pequeña diferencia de frecuencia en el canal derecho. Mas info en: https://en.wikipedia.org/wiki/Phaser_(effect) || Juan Ramos 2021 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); frecuencia = vslider("Frec minima", 100, 50, 10000, 0.01) + (rango*lfo); rate = vslider("Rate LFO", 0.3, 0.1, 5, 0.01); est = vslider("Estereo", 75, 0, 100, 1)*6; feedback = vslider("Feedback", 0.5, 0, 0.9, 0.01); depth = vslider("Profundidad", 1.0, 0.0, 1.0, 0.01); rango = vslider("Rango frec", 300, 100, 2000, 0.01); //q = vslider("Q de filtros", 1, 0.5, 5, 0.01); q = 1; // se pueden usar otros osciladores como LFO lfo = (os.osc(rate) + 1)*0.5; phaser(in, f, det, feedb, depth, q) = ( (wa.allpass2(f*1.0, q, det) : wa.allpass2(f*2.3, q, det) : wa.allpass2(f*3.7, q, det) : wa.allpass2(f*5.0, q, det) : wa.allpass2(f*6.3, q, det) ) ~ (in + *(feedb)) // bardo ) *(depth) + in; //in = no.noise; process(in) = hgroup("Super phaser", phaser(in, frecuencia, 0.0, feedback, depth, q), phaser(in, frecuencia, est, feedback, depth, q));
https://raw.githubusercontent.com/JaoRamos/Faust/197e891722ae3630e54ae2eac38b3752570bf8c7/unq/Clase_8/5_Phaser.dsp
faust
Efecto de Phaser estereo simple. El phaser mas elemental se compone de un filtro all-pass (pasa todo), que (en teoria) no modifica la amplitud de las frecuencias (a diferencia de los demas filtros), pero cambia las relaciones de FASE de estas frecuencias. Si luego sumamos su resultado con la señal original, produciremos cancelaciones y todo tipo de efectos de fase en distintas partes del espectro. Finalmente, si incorporamos una modulación en el parametro de retardo del filtro all-pass, haremos que estas cancelaciones cambien constantemente, produciendo el efecto que conocemos como PHASER. A diferencia de un flanger, por lo general un phaser no guarda una relación específica (ni armónica...) entre las posiciones de los valles que se producen en el espectro; el efecto es similar, pero presenta "otro color". Aquí tenemos un ejemplo de un phaser de 5 etapas, pero en dos canales independientes para tener un pseudo phaser estereo. Simplemente reusamos la misma definicion y le ponemos una pequeña diferencia de frecuencia en el canal derecho. Mas info en: https://en.wikipedia.org/wiki/Phaser_(effect) || Juan Ramos 2021 - Universidad Nacional de Quilmes || || [email protected] || q = vslider("Q de filtros", 1, 0.5, 5, 0.01); se pueden usar otros osciladores como LFO bardo in = no.noise;
import("stdfaust.lib"); frecuencia = vslider("Frec minima", 100, 50, 10000, 0.01) + (rango*lfo); rate = vslider("Rate LFO", 0.3, 0.1, 5, 0.01); est = vslider("Estereo", 75, 0, 100, 1)*6; feedback = vslider("Feedback", 0.5, 0, 0.9, 0.01); depth = vslider("Profundidad", 1.0, 0.0, 1.0, 0.01); rango = vslider("Rango frec", 300, 100, 2000, 0.01); q = 1; lfo = (os.osc(rate) + 1)*0.5; phaser(in, f, det, feedb, depth, q) = ( (wa.allpass2(f*1.0, q, det) : wa.allpass2(f*2.3, q, det) : wa.allpass2(f*3.7, q, det) : wa.allpass2(f*5.0, q, det) : wa.allpass2(f*6.3, q, det) ) ) *(depth) + in; process(in) = hgroup("Super phaser", phaser(in, frecuencia, 0.0, feedback, depth, q), phaser(in, frecuencia, est, feedback, depth, q));
57620ebe1767bf03c12062df93be08155ed1660a3871b2e6ba7e860a9cd9e0ff
JaoRamos/Faust
9_DelayEstereo.dsp
import("stdfaust.lib"); /* Efecto de Delay ESTEREO de multiples taps Para este efecto solo simplificaremos el funcionamiento del Chorus de voces multiples (¡ver primero los ejemplos de chorus!) Eliminaremos la modulacion y demas factores innecesarios Y agregaremos un control de feedback || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || */ nTaps = 4; // se puede cambiar... enteros mayores a 1 // Nuestra definicion de lo que es "un" tap del delay // la variable "n" aqui sera el numero de tap, esto lo produce el par() en la definicion delay (mas abajo) // usaremos esta variable para nombrar cada elemento y generar algo de variedad en los valores unTap(entr, n) = hgroup("[%n] Tap %n", tap) with { tap = entr : eco * vol : sp.panner(pan); // delay completo con filtros, pan y volumen eco = filtroHP : filtroLP : + @(tiempoDelay) ~ *(feedBack) ; // eco con feedback y filtro // aprovecharemos la funcion sin() para generar variedad en los valores por defecto!! filtroLP = fi.lowpass(2, hslider("[1]Hi Cut[unit:Hz][style:knob][scale:exp]", int(abs(sin(n*5)) * 5000 + 5000), 100, 20000, 100)); filtroHP = fi.highpass(2, hslider("[0]Lo Cut[unit:Hz][style:knob][scale:exp]", int(abs(sin(n*5)) * 50 + 10), 10, 20000, 10)); vol = vslider("[5]Nivel[unit:%][style:knob]", int(abs(sin(n*10))*75 + 25), 0, 100, 1) / 100 : si.smoo; tiempoDelay = ma.SR * hslider("[2]Tiempo [unit:ms][style:knob]", int(20 + abs(sin(n*5))*500), 1, 1000, 1) / 1000; feedBack = vslider("[3]Feedback [unit:%][style:knob]", int(abs(sin(n*10)) * 20), 0, 100, 1) / 100 : si.smoo; pan = vslider("[4]Pan[style:knob]", sin(n*5), -1, 1, 0.01) * 0.5 + 0.5 : si.smoo; }; // Nuestra definicion del delay completo, suma de varios "taps" utilizando par(), que replica un elemento // (en este caso "tap") en paralelo cierta cantidad de veces. par() nos generara una multitud de salidas estereo, // una por cada elemento (tap) que contenga. En process deberemos unificar estos canales en L y R. // La variable "n" en par() sera el numero de iteracion, en este caso, el numero de cada tap generado delay(entrada, nTaps) = vgroup("Delay de %nTaps taps", par(n, nTaps, unTap(entrada, n+1))); // controles wet = vslider("[1]Wet [unit:%][scale:exp]", 20, 0, 200, 1) / 100 : si.smoo; dry = vslider("[2]Dry [unit:%][scale:exp]", 80, 0, 200, 1) / 100 : si.smoo; master = vslider("[3]Volumen [unit:%][scale:exp]", 100, 0, 200, 1) / 100 : si.smoo; // aqui unificamos la multitud de canales estereo en solo un par L-R process(entrada) = hgroup("Efecto delay estereo", delay(entrada, nTaps) :> // bajamos a 2 canales hgroup("Controles", (_ : *(wet) : +(entrada*dry)) * master, (_ : *(wet) : +(entrada*dry)) * master ) );
https://raw.githubusercontent.com/JaoRamos/Faust/c8895c672104b10729ddc06b42e2169a2943d839/unq/Clase_8/9_DelayEstereo.dsp
faust
Efecto de Delay ESTEREO de multiples taps Para este efecto solo simplificaremos el funcionamiento del Chorus de voces multiples (¡ver primero los ejemplos de chorus!) Eliminaremos la modulacion y demas factores innecesarios Y agregaremos un control de feedback || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || se puede cambiar... enteros mayores a 1 Nuestra definicion de lo que es "un" tap del delay la variable "n" aqui sera el numero de tap, esto lo produce el par() en la definicion delay (mas abajo) usaremos esta variable para nombrar cada elemento y generar algo de variedad en los valores delay completo con filtros, pan y volumen eco con feedback y filtro aprovecharemos la funcion sin() para generar variedad en los valores por defecto!! Nuestra definicion del delay completo, suma de varios "taps" utilizando par(), que replica un elemento (en este caso "tap") en paralelo cierta cantidad de veces. par() nos generara una multitud de salidas estereo, una por cada elemento (tap) que contenga. En process deberemos unificar estos canales en L y R. La variable "n" en par() sera el numero de iteracion, en este caso, el numero de cada tap generado controles aqui unificamos la multitud de canales estereo en solo un par L-R bajamos a 2 canales
import("stdfaust.lib"); unTap(entr, n) = hgroup("[%n] Tap %n", tap) with { filtroLP = fi.lowpass(2, hslider("[1]Hi Cut[unit:Hz][style:knob][scale:exp]", int(abs(sin(n*5)) * 5000 + 5000), 100, 20000, 100)); filtroHP = fi.highpass(2, hslider("[0]Lo Cut[unit:Hz][style:knob][scale:exp]", int(abs(sin(n*5)) * 50 + 10), 10, 20000, 10)); vol = vslider("[5]Nivel[unit:%][style:knob]", int(abs(sin(n*10))*75 + 25), 0, 100, 1) / 100 : si.smoo; tiempoDelay = ma.SR * hslider("[2]Tiempo [unit:ms][style:knob]", int(20 + abs(sin(n*5))*500), 1, 1000, 1) / 1000; feedBack = vslider("[3]Feedback [unit:%][style:knob]", int(abs(sin(n*10)) * 20), 0, 100, 1) / 100 : si.smoo; pan = vslider("[4]Pan[style:knob]", sin(n*5), -1, 1, 0.01) * 0.5 + 0.5 : si.smoo; }; delay(entrada, nTaps) = vgroup("Delay de %nTaps taps", par(n, nTaps, unTap(entrada, n+1))); wet = vslider("[1]Wet [unit:%][scale:exp]", 20, 0, 200, 1) / 100 : si.smoo; dry = vslider("[2]Dry [unit:%][scale:exp]", 80, 0, 200, 1) / 100 : si.smoo; master = vslider("[3]Volumen [unit:%][scale:exp]", 100, 0, 200, 1) / 100 : si.smoo; hgroup("Controles", (_ : *(wet) : +(entrada*dry)) * master, (_ : *(wet) : +(entrada*dry)) * master ) );
2a4d4ec0f47b56734ea10fc8f8e683383a949978bf62ff1d92a1126202283cf9
JaoRamos/Faust
3_Distorsion.dsp
/* Efecto de distorsion En este ejemplo saturamos la señal con un control de ganancia para producir un efecto tipo distorsion muy elemental. Existen maneras simples de distorsionar una señal, por ejemplo haciendo un recorte directo una vez pasado cierto nivel (tambien llamado clip). Sin embargo para tener un sonido algo mas natural, es conveniente utilizar un recorte progresivo. Para ello existen muchas tecnicas. Aqui realizaremos un recorte aprovechando la funcion trigonometrica tanh (tangente hiperbolica). En este caso no es tan relevante que es la tangente hiperbolica... sino que lo importante es la curva que produce, podemos verla en: https://es.wikipedia.org/wiki/Tangente_hiperb%C3%B3lica Podemos utilizar esta curva como un "reductor de amplitud" con un maximo de 1, pero que llega GRADUALMENTE al 1. Si pensamos el eje X como nivel de entrada (nuestra señal de origen), entonces el eje Y es el resultado de la funcion. A medida que aumenta el nivel (X) el resultado se limita en 1. De un modo similar funcionan los distorsionadores analogicos para instrumentos musicales, pero en lugar de una funcion como tanh, este recorte lo producen valvulas, transistores, diodos, etc... Para producir la distorsion le añadimos un control de ganancia (amplificador) para que luego tanh recorte la señal. A mayor ganancia, mas distorsionado el resultado. Podemos conectar una guitarra en la entrada (o una grabacion de linea), pero el timbre sera similar a un Fuzz y poco agradable, ya que no estamos incluyendo la simulacion de un parlante y otros componentes cruciales para el sonido caracteristico de una guitarra distorsionada. Esto lo veremos mas adelante. Para un efecto mas extraño podemos incorporar una asimetria en la señal a distorsionar. Las valvulas, por ejemplo, producen una distorsion ligeramente asimetrica. Sumando un valor fijo podemos correr la señal "hacia el lado positivo o negativo", y tras distorsionarla escucharemos efectos muy particulares, al extremo de parecer una señal de pulsos. Incluso podemos generar un pseudo estereo generando una minima diferencia de asimetria en ambos canales. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); // controles volumen = hslider("[5]Volumen", 0.5, 0, 1, 0.01); separacion = hslider("[2]Diferencia estereo", 0.3, 0, 1, 0.01); offset = hslider("[1]Asimetria", 0, 0, 2, 0.01); gain = hslider("[0]Ganancia [scale:exp]", 5, 0, 100, 0.01); graves = hslider("[3]Graves", 70, 0, 100, 1) / 100; agudos = hslider("[4]Agudos", 50, 0, 100, 1) / 100; distorsion(in, difEstereo) = ma.tanh(in * gain : // amplificamos la entrada por el gain fi.highpass(1, 1020 - graves*1000) // "graves" + offset + difEstereo) // asimetria y diferencia extra estereo : fi.highpass(1, 5) // para corregir el descentrado del offset : fi.lowpass(1, 1000 + agudos*10000) // "agudos" * volumen; process(x) = distorsion(x, 0 ), // canal izquierdo distorsion(x, separacion); // canal derecho
https://raw.githubusercontent.com/JaoRamos/Faust/c8895c672104b10729ddc06b42e2169a2943d839/unq/Clase_8/3_Distorsion.dsp
faust
Efecto de distorsion En este ejemplo saturamos la señal con un control de ganancia para producir un efecto tipo distorsion muy elemental. Existen maneras simples de distorsionar una señal, por ejemplo haciendo un recorte directo una vez pasado cierto nivel (tambien llamado clip). Sin embargo para tener un sonido algo mas natural, es conveniente utilizar un recorte progresivo. Para ello existen muchas tecnicas. Aqui realizaremos un recorte aprovechando la funcion trigonometrica tanh (tangente hiperbolica). En este caso no es tan relevante que es la tangente hiperbolica... sino que lo importante es la curva que produce, podemos verla en: https://es.wikipedia.org/wiki/Tangente_hiperb%C3%B3lica Podemos utilizar esta curva como un "reductor de amplitud" con un maximo de 1, pero que llega GRADUALMENTE al 1. Si pensamos el eje X como nivel de entrada (nuestra señal de origen), entonces el eje Y es el resultado de la funcion. A medida que aumenta el nivel (X) el resultado se limita en 1. De un modo similar funcionan los distorsionadores analogicos para instrumentos musicales, pero en lugar de una funcion como tanh, este recorte lo producen valvulas, transistores, diodos, etc... Para producir la distorsion le añadimos un control de ganancia (amplificador) para que luego tanh recorte la señal. A mayor ganancia, mas distorsionado el resultado. Podemos conectar una guitarra en la entrada (o una grabacion de linea), pero el timbre sera similar a un Fuzz y poco agradable, ya que no estamos incluyendo la simulacion de un parlante y otros componentes cruciales para el sonido caracteristico de una guitarra distorsionada. Esto lo veremos mas adelante. Para un efecto mas extraño podemos incorporar una asimetria en la señal a distorsionar. Las valvulas, por ejemplo, producen una distorsion ligeramente asimetrica. Sumando un valor fijo podemos correr la señal "hacia el lado positivo o negativo", y tras distorsionarla escucharemos efectos muy particulares, al extremo de parecer una señal de pulsos. Incluso podemos generar un pseudo estereo generando una minima diferencia de asimetria en ambos canales. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || controles amplificamos la entrada por el gain "graves" asimetria y diferencia extra estereo para corregir el descentrado del offset "agudos" canal izquierdo canal derecho
import("stdfaust.lib"); volumen = hslider("[5]Volumen", 0.5, 0, 1, 0.01); separacion = hslider("[2]Diferencia estereo", 0.3, 0, 1, 0.01); offset = hslider("[1]Asimetria", 0, 0, 2, 0.01); gain = hslider("[0]Ganancia [scale:exp]", 5, 0, 100, 0.01); graves = hslider("[3]Graves", 70, 0, 100, 1) / 100; agudos = hslider("[4]Agudos", 50, 0, 100, 1) / 100; * volumen;
4f2995a79a97dfe73723846eff1815dcc2bf4c108a550f14bb80b9bb8b93ef72
JaoRamos/Faust
10_Vumetro.dsp
/* Vumetro (interfaz grafica) Advertencia: explicacion larga, pero uso muy facil!!! Podemos crear un "vumetro" para tener una indicacion visual de -por ejemplo- el nivel de una señal (¡pero podria ser otra cosa!). Para ello podemos utilizar las primitivas hbargraph y vbargraph (horizontal/vertical). Toman tres parametros: - Etiqueta / nombre - Minimo - Maximo Necesitaremos algunos pasos mas para usar estos medidores. En primer lugar adaptar la señal a la escala adecuada (por ejemplo pasarla a dB). Ya que normalmente las señales de audio varian entre numeros negativos y positivos, es conveniente utilizar abs para obtener el valor absoluto (descartando el signo), y tener solo numeros positivos. Todo dependera de como sea la señal de origen. Luego, si deseamos convertir señales lineales (-1 a +1) a valores en dB, utilizamos la funcion ba.linear2db que nos devolvera un valor en dB entre -infinito y 0 o mas. Por ultimo, y muy importante: si deseamos tanto VER el nivel, como ESCUCHAR (o seguir procesando) la señal original, requerimos dos copias de esta señal. Pero debido al funcionamiento interno del compilador de Faust, cualquier señal que no siga el camino hacia el final de process, sera ignorada. La señal del vumetro.. morira en el vumetro. En el editor puede que esto no influya en nada, pero si deseamos compilar nuestro DSP para otras plataformas, es posible que no funcione como esperamos. La solucion para esto es utilizar la funcion attach, que tiene dos entradas, dos parametros, y UNA salida. Es mas simple de lo que parece: le pasamos una señal "duplicada", y attach dirigira una copia directo a la salida (para continuar los procesos de audio) y la otra hacia -por ejemplo- hbargraph. Aunque podemos hacer esto sin attach, esta funcion asegura que el compilador siempre respete al vumetro, por mas que su señal no llegue hasta process (ya que el vumetro no tiene salidas...). Tras toda esta explicacion.... simplemente podemos copiar el ejemplo y replicarlo en nuestros proyectos. Nada mas! Poner un audio en la entrada y probar los tres medidores! || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); // medidor lineal, nivel entre 0 y 1 medidor_0a1 = abs : hbargraph("Nivel (lineal)", 0, 1); // medidor logaritmico en dB entre -60 y 0 medidor_db = abs : ba.linear2db : hbargraph("Nivel (dB)", -60, 0); // podemos ver cualquier numero en realidad, no solo señales de audio // aqui no necesitamos abs, solo un slider o cualquier otro numero medidor_slider = slider : hbargraph("La barra de poder", 0, 100); slider = hslider("Funciona no solo con audio!", 50, 0, 100, 1); // attach fuerza que la segunda señal (hacia el vumetro) se compile aunque no "suene" // en su primer argumento, dejamos _ para que la señal pase directo a la salida // en el segundo ponemos "algo", en este caso nuestro medidor // cambiar por cualquiera de los tres medidores! process = _ <: attach(_, medidor_db ) ;
https://raw.githubusercontent.com/JaoRamos/Faust/c8895c672104b10729ddc06b42e2169a2943d839/unq/Clase%209/10_Vumetro.dsp
faust
Vumetro (interfaz grafica) Advertencia: explicacion larga, pero uso muy facil!!! Podemos crear un "vumetro" para tener una indicacion visual de -por ejemplo- el nivel de una señal (¡pero podria ser otra cosa!). Para ello podemos utilizar las primitivas hbargraph y vbargraph (horizontal/vertical). Toman tres parametros: - Etiqueta / nombre - Minimo - Maximo Necesitaremos algunos pasos mas para usar estos medidores. En primer lugar adaptar la señal a la escala adecuada (por ejemplo pasarla a dB). Ya que normalmente las señales de audio varian entre numeros negativos y positivos, es conveniente utilizar abs para obtener el valor absoluto (descartando el signo), y tener solo numeros positivos. Todo dependera de como sea la señal de origen. Luego, si deseamos convertir señales lineales (-1 a +1) a valores en dB, utilizamos la funcion ba.linear2db que nos devolvera un valor en dB entre -infinito y 0 o mas. Por ultimo, y muy importante: si deseamos tanto VER el nivel, como ESCUCHAR (o seguir procesando) la señal original, requerimos dos copias de esta señal. Pero debido al funcionamiento interno del compilador de Faust, cualquier señal que no siga el camino hacia el final de process, sera ignorada. La señal del vumetro.. morira en el vumetro. En el editor puede que esto no influya en nada, pero si deseamos compilar nuestro DSP para otras plataformas, es posible que no funcione como esperamos. La solucion para esto es utilizar la funcion attach, que tiene dos entradas, dos parametros, y UNA salida. Es mas simple de lo que parece: le pasamos una señal "duplicada", y attach dirigira una copia directo a la salida (para continuar los procesos de audio) y la otra hacia -por ejemplo- hbargraph. Aunque podemos hacer esto sin attach, esta funcion asegura que el compilador siempre respete al vumetro, por mas que su señal no llegue hasta process (ya que el vumetro no tiene salidas...). Tras toda esta explicacion.... simplemente podemos copiar el ejemplo y replicarlo en nuestros proyectos. Nada mas! Poner un audio en la entrada y probar los tres medidores! || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || medidor lineal, nivel entre 0 y 1 medidor logaritmico en dB entre -60 y 0 podemos ver cualquier numero en realidad, no solo señales de audio aqui no necesitamos abs, solo un slider o cualquier otro numero attach fuerza que la segunda señal (hacia el vumetro) se compile aunque no "suene" en su primer argumento, dejamos _ para que la señal pase directo a la salida en el segundo ponemos "algo", en este caso nuestro medidor cambiar por cualquiera de los tres medidores!
import("stdfaust.lib"); medidor_0a1 = abs : hbargraph("Nivel (lineal)", 0, 1); medidor_db = abs : ba.linear2db : hbargraph("Nivel (dB)", -60, 0); medidor_slider = slider : hbargraph("La barra de poder", 0, 100); slider = hslider("Funciona no solo con audio!", 50, 0, 100, 1); process = _ <: attach(_, medidor_db ) ;
3de2128af2a9a3f0ecd3ee5e04b4babe4305b6db0c33cef0948345c024898756
JaoRamos/Faust
10_CompresorSimple.dsp
/* Ejemplo de compresor/limitador MONO parametrizable El funcionamiento elemental de este compresor se basa en hacer un analisis de la amplitud de la señal ingresante, aplicando un pequeño retardo, para poder determinar un nivel de reduccion de ganancia segun los parametros elegidos por el usuario. Esta basado en "compressor_lad_mono" de las librerias de Faust. https://github.com/grame-cncm/faustlibraries/blob/master/compressors.lib Como es algo complejo su funcionamiento, esta organizado en un solo bloque muy comentado, que se puede "copiar y pegar" en otro proyecto directamente. Los controles son opcionales segun cada caso, no es necesario ofrecer todos los sliders siempre al usuario, algunos valores se pueden fijar en codigo. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || */ import("stdfaust.lib"); // comienzo del codigo del compresor ---------------------------------------- compresorSimple(lad, rat, thr, att, rel, preGain, postGain, entrada) = entrada * ba.db2linear(preGain) @ max(0, floor(0.5 + ma.SR * lad)) * compGain(rat, thr, att, rel, entrada * ba.db2linear(preGain)) * ba.db2linear(postGain) /* lad: look ahead delay, necesario para analizar y aplicar el cambio de gain rat: ratio de compresion x:1 thr: threshold, umbral **en dB** (normalmente es un numero negativo) att/rel: attack y release en SEGUNDOS (ojo la conversion a ms !) pre/postGain: gain **en dB** antes y despues de la compresion entrada: señal de entrada a comprimir. Si se deja vacio, Faust usa la señal que llegue desde el elemento anterior, o una entrada de audio. */ // En un with{..} analizamos y calculamos el gain para reducir la señal with { // todo este bloque se encarga de analizar la señal para obtener un // valor de reduccion del gain, segun los parametros del usuario compGain(rat, thr, att, rel) = an.amp_follower_ar(att, rel) : ba.linear2db : outminusindb(rat, thr) : kneesmooth(att) : ba.db2linear; // kneesmooth(att) installs a "knee" in the dynamic-range compression, // where knee smoothness is set equal to half that of the compression-attack. // A general 'knee' parameter could be used instead of tying it to att/2: kneesmooth(att) = si.smooth(ba.tau2pole(att/2.0)); // compression gain in dB: // level esta implicito y es el valor "conectado" desde ba.linear2db outminusindb(rat, thr, level) = max(level-thr,0.0) * (1.0/max(ma.EPSILON, float(rat))-1.0); }; // fin del codigo del compresor ---------------------------------------------- // Controles, todo esto es personalizable segun la necesidad particular // Algunos sliders pueden eliminarse, y dejar numeros fijos en el compresor ampl = hslider("[0]Pre gain (dB)", 0, -18, 18, 0.1); makeup = hslider("[5]Post gain (dB)", 0, -18, 18, 0.1); thresh = hslider("[1]Threshold (dB)", 0, -80, 0, 1); ataque = hslider("[2]Ataque (ms) [scale:exp]", 5, 0.1, 500, 0.1) / 1000; release = hslider("[3]Release (ms) [scale:exp]", 100, 0.1, 500, 0.1) / 1000; ratio = hslider("[4]Ratio X:1 [scale:exp]", 3, 1, 50, 0.1); // Conviene elegir un valor fijo de Look Ahead y dejarlo ahi... // Ni siquiera deberia ofrecerse al usuario como slider! laDel = hslider("[6]Look ahead (ms) [scale:exp]", 1, 0.1, 20, 0.1) / 1000; // lo duplicamos para hacerlo estereo, pero usando los mismos parametros // en caso de usar una entrada de audio (no un wav estereo), no necesitamos duplicar process = compresorSimple(laDel, ratio, thresh, ataque, release, ampl, makeup), compresorSimple(laDel, ratio, thresh, ataque, release, ampl, makeup);
https://raw.githubusercontent.com/JaoRamos/Faust/197e891722ae3630e54ae2eac38b3752570bf8c7/unq/Clase_8/10_CompresorSimple.dsp
faust
Ejemplo de compresor/limitador MONO parametrizable El funcionamiento elemental de este compresor se basa en hacer un analisis de la amplitud de la señal ingresante, aplicando un pequeño retardo, para poder determinar un nivel de reduccion de ganancia segun los parametros elegidos por el usuario. Esta basado en "compressor_lad_mono" de las librerias de Faust. https://github.com/grame-cncm/faustlibraries/blob/master/compressors.lib Como es algo complejo su funcionamiento, esta organizado en un solo bloque muy comentado, que se puede "copiar y pegar" en otro proyecto directamente. Los controles son opcionales segun cada caso, no es necesario ofrecer todos los sliders siempre al usuario, algunos valores se pueden fijar en codigo. || Juan Ramos 2020 - Universidad Nacional de Quilmes || || [email protected] || comienzo del codigo del compresor ---------------------------------------- lad: look ahead delay, necesario para analizar y aplicar el cambio de gain rat: ratio de compresion x:1 thr: threshold, umbral **en dB** (normalmente es un numero negativo) att/rel: attack y release en SEGUNDOS (ojo la conversion a ms !) pre/postGain: gain **en dB** antes y despues de la compresion entrada: señal de entrada a comprimir. Si se deja vacio, Faust usa la señal que llegue desde el elemento anterior, o una entrada de audio. En un with{..} analizamos y calculamos el gain para reducir la señal todo este bloque se encarga de analizar la señal para obtener un valor de reduccion del gain, segun los parametros del usuario kneesmooth(att) installs a "knee" in the dynamic-range compression, where knee smoothness is set equal to half that of the compression-attack. A general 'knee' parameter could be used instead of tying it to att/2: compression gain in dB: level esta implicito y es el valor "conectado" desde ba.linear2db fin del codigo del compresor ---------------------------------------------- Controles, todo esto es personalizable segun la necesidad particular Algunos sliders pueden eliminarse, y dejar numeros fijos en el compresor Conviene elegir un valor fijo de Look Ahead y dejarlo ahi... Ni siquiera deberia ofrecerse al usuario como slider! lo duplicamos para hacerlo estereo, pero usando los mismos parametros en caso de usar una entrada de audio (no un wav estereo), no necesitamos duplicar
import("stdfaust.lib"); compresorSimple(lad, rat, thr, att, rel, preGain, postGain, entrada) = entrada * ba.db2linear(preGain) @ max(0, floor(0.5 + ma.SR * lad)) * compGain(rat, thr, att, rel, entrada * ba.db2linear(preGain)) * ba.db2linear(postGain) with { compGain(rat, thr, att, rel) = an.amp_follower_ar(att, rel) : ba.linear2db : outminusindb(rat, thr) : kneesmooth(att) : ba.db2linear; kneesmooth(att) = si.smooth(ba.tau2pole(att/2.0)); outminusindb(rat, thr, level) = max(level-thr,0.0) * (1.0/max(ma.EPSILON, float(rat))-1.0); }; ampl = hslider("[0]Pre gain (dB)", 0, -18, 18, 0.1); makeup = hslider("[5]Post gain (dB)", 0, -18, 18, 0.1); thresh = hslider("[1]Threshold (dB)", 0, -80, 0, 1); ataque = hslider("[2]Ataque (ms) [scale:exp]", 5, 0.1, 500, 0.1) / 1000; release = hslider("[3]Release (ms) [scale:exp]", 100, 0.1, 500, 0.1) / 1000; ratio = hslider("[4]Ratio X:1 [scale:exp]", 3, 1, 50, 0.1); laDel = hslider("[6]Look ahead (ms) [scale:exp]", 1, 0.1, 20, 0.1) / 1000; process = compresorSimple(laDel, ratio, thresh, ataque, release, ampl, makeup), compresorSimple(laDel, ratio, thresh, ataque, release, ampl, makeup);
51cf0cea720b6ea1e36c2477508ab2190f7ef2c97669f20ac76e4d6d494f6db8
JaoRamos/Faust
JaoAmpIR_64.dsp
declare name "Simulador de Amp Jao 64bit"; declare version "0.1"; declare author "Jao Corporation"; declare description "Simulador de Amp Jao 64bit"; import("stdfaust.lib"); impulso = fi.fir(RESPUESTA_IMPULSO) * (0.2); mixImpulso = _ <: ( *(1 - impulsoSlider) , impulso *(impulsoSlider) ) : +; gain = hslider("Gain", 100, 1, 200, 0.1); prefiltro = hslider("Pasaaltos pre", 1000, 20, 1500, 10); agudos = hslider("Parlante (pasabajos)", 3000, 100, 5000, 10); delaySlider = hslider("Delay", 0.2, 0, 0.9, 0.01); blend = hslider("Blend Clean", 2, 0, 10, 0.01); master = hslider("Volumen Master", 0.3, 0, 1, 0.01); impulsoSlider = hslider("IR mix", 0.5, 0, 1, 0.01); pre = ((fi.highpass(1, prefiltro)) * gain : ma .tanh) / (gain/10 : ma.tanh : *(2)); cleanMezcla = fi.highpass(1, 100) : medios : *(blend); medios = fi.peak_eq(-15, 1200, 400) : fi.peak_eq(9, 2500, 1000); delay = @(ma.SR / 3) : *(delaySlider) : fi.lowpass(1, 500); tono = fi.lowpass(3, agudos); cadena = _ <: cleanMezcla, (pre : medios) :> tono : + ~ delay : mixImpulso : *(master); process = cadena <: _, _; RESPUESTA_IMPULSO = 0.167663574218750,0.569000244140625,0.891204833984375,0.858764648437500,0.591705322265625,0.264221191406250,-0.095092773437500,-0.415100097656250, -0.595367431640625,-0.623260498046875,-0.498718261718750,-0.250671386718750,0.040313720703125,0.284973144531250,0.448089599609375,0.456054687500000, 0.290435791015625,0.086944580078125,-0.002929687500000,0.012512207031250,0.044982910156250,0.053588867187500,0.055358886718750,0.047760009765625, 0.027191162109375,-0.024291992187500,-0.103546142578125,-0.140716552734375,-0.079162597656250,-0.001373291015625,0.022094726562500,0.022186279296875, 0.026947021484375,0.001129150390625,-0.052246093750000,-0.071319580078125,-0.014404296875000,0.072631835937500,0.137145996093750,0.161773681640625, 0.158142089843750,0.131072998046875,0.074981689453125,-0.013397216796875,-0.087402343750000,-0.115142822265625,-0.118835449218750,-0.135070800781250, -0.136322021484375,-0.095214843750000,-0.020263671875000,0.043640136718750,0.077514648437500,0.083679199218750,0.086059570312500,0.081817626953125, 0.058166503906250,0.013183593750000,-0.017303466796875,-0.026489257812500,-0.045013427734375,-0.092071533203125,-0.131072998046875,-0.137420654296875, -0.112701416015625,-0.086608886718750,-0.067779541015625,-0.050048828125000,-0.012939453125000,0.015289306640625,0.014801025390625,-0.002288818359375, -0.005035400390625,-0.005645751953125,-0.016571044921875,-0.040893554687500,-0.055847167968750,-0.058380126953125,-0.053558349609375,-0.054260253906250, -0.045166015625000,-0.027465820312500,-0.010925292968750,-0.013000488281250,-0.021057128906250,-0.027679443359375,-0.033966064453125,-0.058746337890625, -0.091644287109375,-0.118927001953125,-0.124053955078125,-0.119506835937500,-0.108001708984375,-0.098327636718750,-0.077178955078125,-0.045654296875000, -0.013641357421875,-0.003540039062500,-0.010559082031250,-0.029113769531250,-0.046600341796875,-0.065429687500000,-0.076599121093750,-0.079040527343750, -0.069000244140625,-0.059600830078125,-0.046539306640625,-0.032958984375000,-0.017944335937500,-0.015777587890625,-0.026977539062500,-0.046264648437500, -0.058105468750000,-0.064178466796875,-0.064941406250000,-0.065155029296875,-0.053192138671875,-0.034576416015625,-0.011566162109375,0.000335693359375, 0.004577636718750,0.000793457031250,-0.004058837890625,-0.018951416015625,-0.040863037109375,-0.069915771484375,-0.087860107421875,-0.093719482421875, -0.084747314453125,-0.070556640625000,-0.049926757812500,-0.031921386718750,-0.019409179687500,-0.014678955078125,-0.008697509765625,-0.001159667968750, 0.007720947265625,0.009185791015625,0.003570556640625,-0.008575439453125,-0.019470214843750,-0.032562255859375,-0.041961669921875,-0.049468994140625, -0.048370361328125,-0.046325683593750,-0.037597656250000,-0.029541015625000,-0.017150878906250,-0.009979248046875,-0.004821777343750,-0.004150390625000, 0.001281738281250,0.006011962890625,0.013244628906250,0.013885498046875,0.011535644531250,0.001495361328125,-0.011871337890625,-0.029144287109375, -0.041198730468750,-0.048248291015625,-0.045562744140625,-0.039031982421875,-0.025177001953125,-0.013153076171875,-0.002136230468750,-0.000427246093750, -0.000793457031250,-0.004821777343750,-0.006469726562500,-0.010559082031250,-0.011993408203125,-0.014739990234375,-0.015411376953125,-0.017974853515625, -0.018249511718750,-0.021575927734375,-0.023620605468750,-0.028778076171875,-0.029876708984375,-0.030761718750000,-0.025115966796875,-0.019317626953125, -0.010192871093750,-0.004882812500000,0.000640869140625,0.000518798828125,0.000061035156250,-0.004913330078125,-0.004608154296875,-0.000976562500000, 0.009643554687500,0.015655517578125,0.019165039062500,0.016052246093750,0.011352539062500,0.003082275390625,-0.001953125000000,-0.006256103515625, -0.002716064453125,-0.001434326171875,0.000671386718750,-0.001739501953125,-0.000762939453125,-0.001525878906250,-0.000701904296875,-0.002960205078125, -0.001556396484375,-0.000305175781250,0.003143310546875,0.004516601562500,0.009033203125000,0.012908935546875,0.020019531250000,0.021575927734375, 0.024322509765625,0.022888183593750,0.024902343750000,0.022003173828125,0.019012451171875,0.011688232421875,0.007202148437500,0.002227783203125, 0.001251220703125,0.001037597656250,0.006683349609375,0.012786865234375,0.022186279296875,0.026123046875000,0.029663085937500,0.028869628906250, 0.028808593750000,0.026062011718750,0.025421142578125,0.022888183593750,0.021911621093750,0.016632080078125,0.012237548828125,0.005767822265625, 0.004364013671875,0.003723144531250,0.006988525390625,0.008239746093750,0.012420654296875,0.014923095703125,0.019348144531250,0.021270751953125, 0.022918701171875,0.022277832031250,0.021453857421875,0.016387939453125,0.011779785156250,0.004516601562500,0.001037597656250,-0.001922607421875, -0.001220703125000,-0.000366210937500,0.003448486328125,0.006835937500000,0.011505126953125,0.012817382812500,0.014251708984375,0.013793945312500, 0.015563964843750,0.016296386718750,0.017395019531250,0.017761230468750,0.019866943359375,0.021087646484375,0.021606445312500,0.019317626953125, 0.019195556640625,0.018829345703125,0.020568847656250,0.019317626953125,0.019805908203125,0.019470214843750,0.020996093750000,0.019744873046875, 0.019561767578125,0.019287109375000,0.021575927734375,0.021209716796875,0.021575927734375,0.019592285156250,0.019866943359375,0.018890380859375, 0.018981933593750,0.018218994140625,0.020050048828125,0.021057128906250,0.023071289062500,0.021759033203125,0.021575927734375,0.018402099609375, 0.017944335937500,0.014892578125000,0.014831542968750,0.014587402343750,0.017730712890625,0.020324707031250,0.023773193359375,0.024627685546875, 0.025543212890625,0.023742675781250,0.023712158203125,0.021484375000000,0.021209716796875,0.019073486328125,0.019317626953125,0.018371582031250, 0.016876220703125,0.012908935546875,0.010803222656250,0.009429931640625,0.010955810546875,0.009124755859375,0.009704589843750,0.010467529296875, 0.014587402343750,0.015197753906250,0.015472412109375,0.014587402343750,0.017089843750000,0.016967773437500,0.015533447265625,0.011566162109375, 0.011260986328125,0.009765625000000,0.007110595703125,0.001464843750000,-0.000183105468750,-0.000244140625000,0.002014160156250,0.000274658203125, 0.000885009765625,0.003936767578125,0.009368896484375,0.010345458984375,0.008941650390625,0.008483886718750,0.011566162109375,0.012237548828125, 0.009857177734375,0.006561279296875,0.008605957031250,0.011047363281250,0.010253906250000,0.006317138671875,0.006774902343750,0.009521484375000, 0.010803222656250,0.007476806640625,0.006683349609375,0.009826660156250,0.015106201171875,0.014038085937500,0.013244628906250,0.013885498046875, 0.017944335937500,0.016479492187500,0.012817382812500,0.009063720703125,0.010437011718750,0.010559082031250,0.008422851562500,0.005187988281250, 0.006408691406250,0.008819580078125,0.009979248046875,0.007843017578125,0.008026123046875,0.010131835937500,0.011901855468750,0.009490966796875, 0.006744384765625,0.005767822265625,0.007934570312500,0.006469726562500,0.003967285156250,0.002899169921875,0.005340576171875,0.006744384765625, 0.006103515625000,0.003448486328125,0.004821777343750,0.005462646484375,0.004638671875000,0.002044677734375,0.002044677734375,0.003692626953125, 0.005371093750000,0.003540039062500,0.003479003906250,0.003417968750000,0.003875732421875,0.002319335937500,0.000976562500000,0.000183105468750, 0.001495361328125,0.000396728515625,0.000366210937500,-0.001342773437500,-0.000640869140625,-0.001068115234375,-0.000915527343750,-0.001922607421875, -0.002136230468750,-0.002166748046875,-0.001770019531250,-0.002410888671875,-0.002929687500000,-0.003295898437500,-0.003143310546875,-0.003753662109375, -0.003692626953125,-0.004516601562500,-0.003692626953125,-0.003570556640625,-0.003448486328125,-0.002868652343750,-0.002166748046875,-0.001708984375000, -0.001159667968750,-0.001098632812500,-0.000793457031250,-0.000976562500000,-0.000915527343750,-0.000854492187500,-0.000274658203125,-0.000549316406250, -0.000213623046875,-0.000305175781250,0.000640869140625,0.000030517578125,-0.000274658203125,-0.000854492187500,-0.000518798828125,-0.000915527343750, -0.000640869140625,-0.001068115234375,0.000488281250000,0.000640869140625,0.001007080078125,0.000122070312500,0.000061035156250,0.000000000000000, -0.000122070312500,-0.000732421875000,-0.001281738281250,-0.001678466796875,-0.001586914062500,-0.002044677734375,-0.002166748046875,-0.002288818359375, -0.001647949218750,-0.001586914062500,-0.001922607421875,-0.003112792968750,-0.003692626953125,-0.004577636718750,-0.004882812500000,-0.005950927734375, -0.005767822265625,-0.005462646484375,-0.004241943359375,-0.004302978515625,-0.003753662109375,-0.003936767578125,-0.003204345703125,-0.003417968750000, -0.003784179687500,-0.004425048828125,-0.004150390625000,-0.004730224609375,-0.004699707031250,-0.005432128906250,-0.005096435546875,-0.005035400390625, -0.004608154296875,-0.005004882812500,-0.004425048828125,-0.004760742187500,-0.003967285156250,-0.005157470703125,-0.005157470703125,-0.005950927734375, -0.005493164062500,-0.006042480468750,-0.005950927734375,-0.006683349609375,-0.006378173828125,-0.006439208984375,-0.006164550781250,-0.006134033203125, -0.005737304687500,-0.005889892578125,-0.005645751953125,-0.006256103515625,-0.006652832031250,-0.006866455078125,-0.006591796875000,-0.006378173828125, -0.005706787109375,-0.005645751953125,-0.004516601562500,-0.004241943359375,-0.003936767578125,-0.004577636718750,-0.004730224609375,-0.004943847656250, -0.004882812500000,-0.004974365234375,-0.005004882812500,-0.004211425781250,-0.004028320312500,-0.003570556640625,-0.003723144531250,-0.003540039062500, -0.002746582031250,-0.002838134765625,-0.002502441406250,-0.002807617187500,-0.002868652343750,-0.002655029296875,-0.002807617187500,-0.003204345703125, -0.003082275390625,-0.003356933593750,-0.002899169921875,-0.003417968750000,-0.003326416015625,-0.003723144531250,-0.003112792968750,-0.003723144531250, -0.003723144531250,-0.004638671875000,-0.004455566406250,-0.005096435546875,-0.005371093750000,-0.005676269531250,-0.005279541015625,-0.004760742187500, -0.004455566406250,-0.004547119140625,-0.004516601562500,-0.004241943359375,-0.004364013671875,-0.004425048828125,-0.004089355468750,-0.003784179687500, -0.002960205078125,-0.003540039062500,-0.003143310546875,-0.003875732421875,-0.003570556640625,-0.004333496093750,-0.004425048828125,-0.004730224609375, -0.004455566406250,-0.004516601562500,-0.004516601562500,-0.004608154296875,-0.004455566406250,-0.004516601562500,-0.004547119140625,-0.004943847656250, -0.004699707031250,-0.004974365234375,-0.004852294921875,-0.005035400390625,-0.004608154296875,-0.004333496093750,-0.003875732421875,-0.003906250000000, -0.003631591796875,-0.003570556640625,-0.003356933593750,-0.003814697265625,-0.003417968750000,-0.004028320312500,-0.003601074218750,-0.003997802734375, -0.003906250000000,-0.003875732421875,-0.003417968750000,-0.003234863281250,-0.002929687500000,-0.002593994140625,-0.002502441406250,-0.002136230468750, -0.002807617187500,-0.002563476562500,-0.003356933593750,-0.002532958984375,-0.002777099609375,-0.002197265625000,-0.001770019531250,-0.001373291015625, -0.000640869140625,-0.000885009765625,-0.000427246093750,-0.000610351562500,-0.000518798828125,-0.000823974609375,-0.001586914062500,-0.001434326171875, -0.001800537109375,-0.001678466796875,-0.001556396484375,-0.001586914062500,-0.001007080078125,-0.001220703125000,-0.001159667968750,-0.001098632812500, -0.001098632812500,-0.000946044921875,-0.001007080078125,-0.001220703125000,-0.001281738281250,-0.001617431640625,-0.002197265625000,-0.002258300781250, -0.002380371093750,-0.001617431640625,-0.001098632812500,-0.000610351562500,-0.000427246093750,-0.000915527343750,-0.000976562500000,-0.001342773437500, -0.001739501953125,-0.001068115234375,-0.001129150390625,-0.000152587890625,-0.000061035156250,-0.000549316406250,-0.000488281250000,-0.001129150390625, -0.001007080078125,-0.001312255859375,-0.001403808593750,-0.000885009765625,-0.001129150390625,-0.001098632812500,-0.001770019531250,-0.001922607421875, -0.001647949218750,-0.001434326171875,-0.000976562500000,-0.000976562500000,-0.000854492187500,-0.001159667968750,-0.001495361328125,-0.001800537109375, -0.002105712890625,-0.002288818359375,-0.001861572265625,-0.002136230468750,-0.001312255859375,-0.001861572265625,-0.002075195312500,-0.002075195312500, -0.002044677734375,-0.001068115234375,-0.000549316406250,0.000091552734375,0.000701904296875,0.000549316406250,0.000915527343750,-0.000091552734375, -0.000152587890625,-0.000946044921875,-0.000091552734375,0.000030517578125,0.001037597656250,0.000732421875000,0.000610351562500,0.000152587890625, -0.000091552734375,-0.000610351562500,-0.000518798828125,-0.000549316406250,0.000274658203125,0.000183105468750,0.000823974609375,0.000946044921875, 0.000915527343750,0.000701904296875,-0.000122070312500,-0.000061035156250,-0.000152587890625,0.000213623046875,-0.000061035156250,-0.000061035156250, -0.000518798828125,-0.000885009765625,-0.000823974609375,-0.000549316406250,-0.000122070312500,0.000488281250000,0.000701904296875,0.001068115234375, 0.000854492187500,0.000335693359375,0.000488281250000,-0.000091552734375,0.000305175781250,-0.000305175781250,-0.000030517578125,0.000122070312500, 0.000396728515625,0.000427246093750,0.000640869140625,0.000671386718750,0.000885009765625,0.000335693359375,0.000549316406250,0.000335693359375, 0.000762939453125,0.000427246093750,0.000976562500000,0.000549316406250,0.000823974609375,-0.000213623046875,-0.000579833984375,-0.001037597656250, -0.000640869140625,-0.000518798828125,0.000366210937500,0.000000000000000,0.000244140625000,-0.000396728515625,-0.000274658203125,-0.000183105468750, -0.000244140625000,-0.000152587890625,-0.000274658203125,0.000091552734375,0.000305175781250,0.000946044921875,0.000549316406250,0.000549316406250, -0.000396728515625,-0.000366210937500,0.000152587890625,0.000610351562500,0.000732421875000,0.000640869140625,0.000549316406250,0.000732421875000, 0.000823974609375,0.000518798828125,0.001007080078125,0.000823974609375,0.001098632812500,0.001159667968750,0.001342773437500,0.001586914062500, 0.001403808593750,0.000854492187500,0.000854492187500,0.000823974609375,0.000488281250000,0.000946044921875,0.000671386718750,0.001708984375000, 0.001251220703125,0.001281738281250,0.000671386718750,0.000640869140625,0.000671386718750,0.000549316406250,0.000732421875000,0.001190185546875, 0.001068115234375,0.001129150390625,0.000762939453125,0.000488281250000,0.000701904296875,0.000274658203125,0.000305175781250,0.000335693359375, 0.000457763671875,0.000396728515625,0.000549316406250,0.000396728515625,0.000610351562500,0.000579833984375,0.000732421875000,0.000305175781250, 0.000885009765625,0.000335693359375,0.000640869140625,0.000244140625000,0.000213623046875,0.000457763671875,0.000427246093750,0.000640869140625, 0.000427246093750,0.000701904296875,0.000732421875000,0.000701904296875,0.000244140625000,0.000213623046875,0.000152587890625,0.000091552734375, -0.000030517578125,-0.000244140625000,0.000244140625000,0.000183105468750,0.000061035156250,-0.000427246093750,-0.000274658203125,-0.000091552734375, -0.000061035156250,-0.000183105468750,0.000061035156250,0.000305175781250,0.000671386718750,0.000122070312500,0.000030517578125,-0.000061035156250, -0.000122070312500,-0.000091552734375,-0.000579833984375,-0.000030517578125,-0.000122070312500,0.000335693359375,-0.000122070312500,0.000244140625000, 0.000518798828125,0.000915527343750,0.000915527343750,0.000366210937500,0.000488281250000,0.000213623046875,0.000030517578125,-0.000183105468750, -0.000579833984375,0.000213623046875,0.000579833984375,0.000579833984375,0.000823974609375,0.000518798828125,0.000976562500000,0.000518798828125, 0.000213623046875,-0.000122070312500,0.000213623046875,0.000244140625000,0.000183105468750,0.000122070312500,0.000091552734375,0.000549316406250, 0.000152587890625,0.000274658203125,0.000061035156250,0.000274658203125,0.000579833984375,-0.000152587890625,0.000244140625000,-0.000213623046875, 0.000000000000000,-0.000183105468750,-0.000549316406250,-0.000549316406250,-0.000244140625000,-0.000579833984375,-0.000091552734375,-0.000823974609375, -0.000122070312500,-0.000335693359375,-0.000244140625000,-0.000366210937500,-0.000549316406250,-0.000518798828125,-0.000061035156250,-0.000427246093750, -0.000183105468750,-0.000366210937500,-0.000122070312500,-0.000396728515625,-0.000366210937500,-0.000915527343750,-0.000335693359375,-0.000762939453125, -0.000183105468750,-0.000762939453125,-0.000061035156250,-0.000579833984375,0.000122070312500,-0.000549316406250,0.000000000000000,-0.000488281250000, 0.000122070312500,-0.000518798828125,-0.000061035156250,-0.000518798828125,-0.000244140625000,-0.000366210937500,-0.000244140625000,-0.000183105468750, -0.000213623046875,-0.000061035156250,-0.000335693359375,-0.000305175781250,-0.000366210937500,-0.000335693359375,-0.000244140625000,-0.000213623046875, -0.000244140625000,-0.000152587890625,-0.000152587890625,-0.000305175781250,-0.000274658203125,-0.000457763671875,-0.000335693359375,-0.000396728515625, -0.000274658203125,-0.000366210937500,-0.000427246093750,-0.000274658203125,-0.000579833984375,-0.000366210937500,-0.000518798828125,-0.000335693359375, -0.000366210937500,-0.000335693359375,-0.000305175781250,-0.000518798828125,-0.000366210937500,-0.000549316406250,-0.000427246093750,-0.000488281250000, -0.000427246093750,-0.000488281250000,-0.000518798828125,-0.000457763671875,-0.000488281250000,-0.000549316406250,-0.000244140625000,-0.000701904296875, -0.000152587890625,-0.000762939453125,-0.000274658203125,-0.000732421875000,-0.000457763671875,-0.000671386718750,-0.000427246093750,-0.000610351562500, -0.000274658203125,-0.000579833984375,-0.000152587890625,-0.000518798828125,-0.000213623046875,-0.000488281250000,-0.000335693359375,-0.000518798828125, -0.000488281250000,-0.000518798828125,-0.000518798828125,-0.000488281250000,-0.000488281250000,-0.000366210937500,-0.000549316406250,-0.000305175781250, -0.000549316406250,-0.000396728515625,-0.000488281250000,-0.000427246093750,-0.000549316406250,-0.000396728515625,-0.000549316406250,-0.000488281250000, -0.000488281250000,-0.000671386718750,-0.000366210937500,-0.000579833984375,-0.000549316406250,-0.000396728515625,-0.000610351562500,-0.000457763671875, -0.000457763671875,-0.000640869140625;
https://raw.githubusercontent.com/JaoRamos/Faust/dffd281724d8941aa1efa7b8abeb09c6b2f7dee0/sueltos/JaoAmpIR_64.dsp
faust
declare name "Simulador de Amp Jao 64bit"; declare version "0.1"; declare author "Jao Corporation"; declare description "Simulador de Amp Jao 64bit"; import("stdfaust.lib"); impulso = fi.fir(RESPUESTA_IMPULSO) * (0.2); mixImpulso = _ <: ( *(1 - impulsoSlider) , impulso *(impulsoSlider) ) : +; gain = hslider("Gain", 100, 1, 200, 0.1); prefiltro = hslider("Pasaaltos pre", 1000, 20, 1500, 10); agudos = hslider("Parlante (pasabajos)", 3000, 100, 5000, 10); delaySlider = hslider("Delay", 0.2, 0, 0.9, 0.01); blend = hslider("Blend Clean", 2, 0, 10, 0.01); master = hslider("Volumen Master", 0.3, 0, 1, 0.01); impulsoSlider = hslider("IR mix", 0.5, 0, 1, 0.01); pre = ((fi.highpass(1, prefiltro)) * gain : ma .tanh) / (gain/10 : ma.tanh : *(2)); cleanMezcla = fi.highpass(1, 100) : medios : *(blend); medios = fi.peak_eq(-15, 1200, 400) : fi.peak_eq(9, 2500, 1000); delay = @(ma.SR / 3) : *(delaySlider) : fi.lowpass(1, 500); tono = fi.lowpass(3, agudos); cadena = _ <: cleanMezcla, (pre : medios) :> tono : + ~ delay : mixImpulso : *(master); process = cadena <: _, _; RESPUESTA_IMPULSO = 0.167663574218750,0.569000244140625,0.891204833984375,0.858764648437500,0.591705322265625,0.264221191406250,-0.095092773437500,-0.415100097656250, -0.595367431640625,-0.623260498046875,-0.498718261718750,-0.250671386718750,0.040313720703125,0.284973144531250,0.448089599609375,0.456054687500000, 0.290435791015625,0.086944580078125,-0.002929687500000,0.012512207031250,0.044982910156250,0.053588867187500,0.055358886718750,0.047760009765625, 0.027191162109375,-0.024291992187500,-0.103546142578125,-0.140716552734375,-0.079162597656250,-0.001373291015625,0.022094726562500,0.022186279296875, 0.026947021484375,0.001129150390625,-0.052246093750000,-0.071319580078125,-0.014404296875000,0.072631835937500,0.137145996093750,0.161773681640625, 0.158142089843750,0.131072998046875,0.074981689453125,-0.013397216796875,-0.087402343750000,-0.115142822265625,-0.118835449218750,-0.135070800781250, -0.136322021484375,-0.095214843750000,-0.020263671875000,0.043640136718750,0.077514648437500,0.083679199218750,0.086059570312500,0.081817626953125, 0.058166503906250,0.013183593750000,-0.017303466796875,-0.026489257812500,-0.045013427734375,-0.092071533203125,-0.131072998046875,-0.137420654296875, -0.112701416015625,-0.086608886718750,-0.067779541015625,-0.050048828125000,-0.012939453125000,0.015289306640625,0.014801025390625,-0.002288818359375, -0.005035400390625,-0.005645751953125,-0.016571044921875,-0.040893554687500,-0.055847167968750,-0.058380126953125,-0.053558349609375,-0.054260253906250, -0.045166015625000,-0.027465820312500,-0.010925292968750,-0.013000488281250,-0.021057128906250,-0.027679443359375,-0.033966064453125,-0.058746337890625, -0.091644287109375,-0.118927001953125,-0.124053955078125,-0.119506835937500,-0.108001708984375,-0.098327636718750,-0.077178955078125,-0.045654296875000, -0.013641357421875,-0.003540039062500,-0.010559082031250,-0.029113769531250,-0.046600341796875,-0.065429687500000,-0.076599121093750,-0.079040527343750, -0.069000244140625,-0.059600830078125,-0.046539306640625,-0.032958984375000,-0.017944335937500,-0.015777587890625,-0.026977539062500,-0.046264648437500, -0.058105468750000,-0.064178466796875,-0.064941406250000,-0.065155029296875,-0.053192138671875,-0.034576416015625,-0.011566162109375,0.000335693359375, 0.004577636718750,0.000793457031250,-0.004058837890625,-0.018951416015625,-0.040863037109375,-0.069915771484375,-0.087860107421875,-0.093719482421875, -0.084747314453125,-0.070556640625000,-0.049926757812500,-0.031921386718750,-0.019409179687500,-0.014678955078125,-0.008697509765625,-0.001159667968750, 0.007720947265625,0.009185791015625,0.003570556640625,-0.008575439453125,-0.019470214843750,-0.032562255859375,-0.041961669921875,-0.049468994140625, -0.048370361328125,-0.046325683593750,-0.037597656250000,-0.029541015625000,-0.017150878906250,-0.009979248046875,-0.004821777343750,-0.004150390625000, 0.001281738281250,0.006011962890625,0.013244628906250,0.013885498046875,0.011535644531250,0.001495361328125,-0.011871337890625,-0.029144287109375, -0.041198730468750,-0.048248291015625,-0.045562744140625,-0.039031982421875,-0.025177001953125,-0.013153076171875,-0.002136230468750,-0.000427246093750, -0.000793457031250,-0.004821777343750,-0.006469726562500,-0.010559082031250,-0.011993408203125,-0.014739990234375,-0.015411376953125,-0.017974853515625, -0.018249511718750,-0.021575927734375,-0.023620605468750,-0.028778076171875,-0.029876708984375,-0.030761718750000,-0.025115966796875,-0.019317626953125, -0.010192871093750,-0.004882812500000,0.000640869140625,0.000518798828125,0.000061035156250,-0.004913330078125,-0.004608154296875,-0.000976562500000, 0.009643554687500,0.015655517578125,0.019165039062500,0.016052246093750,0.011352539062500,0.003082275390625,-0.001953125000000,-0.006256103515625, -0.002716064453125,-0.001434326171875,0.000671386718750,-0.001739501953125,-0.000762939453125,-0.001525878906250,-0.000701904296875,-0.002960205078125, -0.001556396484375,-0.000305175781250,0.003143310546875,0.004516601562500,0.009033203125000,0.012908935546875,0.020019531250000,0.021575927734375, 0.024322509765625,0.022888183593750,0.024902343750000,0.022003173828125,0.019012451171875,0.011688232421875,0.007202148437500,0.002227783203125, 0.001251220703125,0.001037597656250,0.006683349609375,0.012786865234375,0.022186279296875,0.026123046875000,0.029663085937500,0.028869628906250, 0.028808593750000,0.026062011718750,0.025421142578125,0.022888183593750,0.021911621093750,0.016632080078125,0.012237548828125,0.005767822265625, 0.004364013671875,0.003723144531250,0.006988525390625,0.008239746093750,0.012420654296875,0.014923095703125,0.019348144531250,0.021270751953125, 0.022918701171875,0.022277832031250,0.021453857421875,0.016387939453125,0.011779785156250,0.004516601562500,0.001037597656250,-0.001922607421875, -0.001220703125000,-0.000366210937500,0.003448486328125,0.006835937500000,0.011505126953125,0.012817382812500,0.014251708984375,0.013793945312500, 0.015563964843750,0.016296386718750,0.017395019531250,0.017761230468750,0.019866943359375,0.021087646484375,0.021606445312500,0.019317626953125, 0.019195556640625,0.018829345703125,0.020568847656250,0.019317626953125,0.019805908203125,0.019470214843750,0.020996093750000,0.019744873046875, 0.019561767578125,0.019287109375000,0.021575927734375,0.021209716796875,0.021575927734375,0.019592285156250,0.019866943359375,0.018890380859375, 0.018981933593750,0.018218994140625,0.020050048828125,0.021057128906250,0.023071289062500,0.021759033203125,0.021575927734375,0.018402099609375, 0.017944335937500,0.014892578125000,0.014831542968750,0.014587402343750,0.017730712890625,0.020324707031250,0.023773193359375,0.024627685546875, 0.025543212890625,0.023742675781250,0.023712158203125,0.021484375000000,0.021209716796875,0.019073486328125,0.019317626953125,0.018371582031250, 0.016876220703125,0.012908935546875,0.010803222656250,0.009429931640625,0.010955810546875,0.009124755859375,0.009704589843750,0.010467529296875, 0.014587402343750,0.015197753906250,0.015472412109375,0.014587402343750,0.017089843750000,0.016967773437500,0.015533447265625,0.011566162109375, 0.011260986328125,0.009765625000000,0.007110595703125,0.001464843750000,-0.000183105468750,-0.000244140625000,0.002014160156250,0.000274658203125, 0.000885009765625,0.003936767578125,0.009368896484375,0.010345458984375,0.008941650390625,0.008483886718750,0.011566162109375,0.012237548828125, 0.009857177734375,0.006561279296875,0.008605957031250,0.011047363281250,0.010253906250000,0.006317138671875,0.006774902343750,0.009521484375000, 0.010803222656250,0.007476806640625,0.006683349609375,0.009826660156250,0.015106201171875,0.014038085937500,0.013244628906250,0.013885498046875, 0.017944335937500,0.016479492187500,0.012817382812500,0.009063720703125,0.010437011718750,0.010559082031250,0.008422851562500,0.005187988281250, 0.006408691406250,0.008819580078125,0.009979248046875,0.007843017578125,0.008026123046875,0.010131835937500,0.011901855468750,0.009490966796875, 0.006744384765625,0.005767822265625,0.007934570312500,0.006469726562500,0.003967285156250,0.002899169921875,0.005340576171875,0.006744384765625, 0.006103515625000,0.003448486328125,0.004821777343750,0.005462646484375,0.004638671875000,0.002044677734375,0.002044677734375,0.003692626953125, 0.005371093750000,0.003540039062500,0.003479003906250,0.003417968750000,0.003875732421875,0.002319335937500,0.000976562500000,0.000183105468750, 0.001495361328125,0.000396728515625,0.000366210937500,-0.001342773437500,-0.000640869140625,-0.001068115234375,-0.000915527343750,-0.001922607421875, -0.002136230468750,-0.002166748046875,-0.001770019531250,-0.002410888671875,-0.002929687500000,-0.003295898437500,-0.003143310546875,-0.003753662109375, -0.003692626953125,-0.004516601562500,-0.003692626953125,-0.003570556640625,-0.003448486328125,-0.002868652343750,-0.002166748046875,-0.001708984375000, -0.001159667968750,-0.001098632812500,-0.000793457031250,-0.000976562500000,-0.000915527343750,-0.000854492187500,-0.000274658203125,-0.000549316406250, -0.000213623046875,-0.000305175781250,0.000640869140625,0.000030517578125,-0.000274658203125,-0.000854492187500,-0.000518798828125,-0.000915527343750, -0.000640869140625,-0.001068115234375,0.000488281250000,0.000640869140625,0.001007080078125,0.000122070312500,0.000061035156250,0.000000000000000, -0.000122070312500,-0.000732421875000,-0.001281738281250,-0.001678466796875,-0.001586914062500,-0.002044677734375,-0.002166748046875,-0.002288818359375, -0.001647949218750,-0.001586914062500,-0.001922607421875,-0.003112792968750,-0.003692626953125,-0.004577636718750,-0.004882812500000,-0.005950927734375, -0.005767822265625,-0.005462646484375,-0.004241943359375,-0.004302978515625,-0.003753662109375,-0.003936767578125,-0.003204345703125,-0.003417968750000, -0.003784179687500,-0.004425048828125,-0.004150390625000,-0.004730224609375,-0.004699707031250,-0.005432128906250,-0.005096435546875,-0.005035400390625, -0.004608154296875,-0.005004882812500,-0.004425048828125,-0.004760742187500,-0.003967285156250,-0.005157470703125,-0.005157470703125,-0.005950927734375, -0.005493164062500,-0.006042480468750,-0.005950927734375,-0.006683349609375,-0.006378173828125,-0.006439208984375,-0.006164550781250,-0.006134033203125, -0.005737304687500,-0.005889892578125,-0.005645751953125,-0.006256103515625,-0.006652832031250,-0.006866455078125,-0.006591796875000,-0.006378173828125, -0.005706787109375,-0.005645751953125,-0.004516601562500,-0.004241943359375,-0.003936767578125,-0.004577636718750,-0.004730224609375,-0.004943847656250, -0.004882812500000,-0.004974365234375,-0.005004882812500,-0.004211425781250,-0.004028320312500,-0.003570556640625,-0.003723144531250,-0.003540039062500, -0.002746582031250,-0.002838134765625,-0.002502441406250,-0.002807617187500,-0.002868652343750,-0.002655029296875,-0.002807617187500,-0.003204345703125, -0.003082275390625,-0.003356933593750,-0.002899169921875,-0.003417968750000,-0.003326416015625,-0.003723144531250,-0.003112792968750,-0.003723144531250, -0.003723144531250,-0.004638671875000,-0.004455566406250,-0.005096435546875,-0.005371093750000,-0.005676269531250,-0.005279541015625,-0.004760742187500, -0.004455566406250,-0.004547119140625,-0.004516601562500,-0.004241943359375,-0.004364013671875,-0.004425048828125,-0.004089355468750,-0.003784179687500, -0.002960205078125,-0.003540039062500,-0.003143310546875,-0.003875732421875,-0.003570556640625,-0.004333496093750,-0.004425048828125,-0.004730224609375, -0.004455566406250,-0.004516601562500,-0.004516601562500,-0.004608154296875,-0.004455566406250,-0.004516601562500,-0.004547119140625,-0.004943847656250, -0.004699707031250,-0.004974365234375,-0.004852294921875,-0.005035400390625,-0.004608154296875,-0.004333496093750,-0.003875732421875,-0.003906250000000, -0.003631591796875,-0.003570556640625,-0.003356933593750,-0.003814697265625,-0.003417968750000,-0.004028320312500,-0.003601074218750,-0.003997802734375, -0.003906250000000,-0.003875732421875,-0.003417968750000,-0.003234863281250,-0.002929687500000,-0.002593994140625,-0.002502441406250,-0.002136230468750, -0.002807617187500,-0.002563476562500,-0.003356933593750,-0.002532958984375,-0.002777099609375,-0.002197265625000,-0.001770019531250,-0.001373291015625, -0.000640869140625,-0.000885009765625,-0.000427246093750,-0.000610351562500,-0.000518798828125,-0.000823974609375,-0.001586914062500,-0.001434326171875, -0.001800537109375,-0.001678466796875,-0.001556396484375,-0.001586914062500,-0.001007080078125,-0.001220703125000,-0.001159667968750,-0.001098632812500, -0.001098632812500,-0.000946044921875,-0.001007080078125,-0.001220703125000,-0.001281738281250,-0.001617431640625,-0.002197265625000,-0.002258300781250, -0.002380371093750,-0.001617431640625,-0.001098632812500,-0.000610351562500,-0.000427246093750,-0.000915527343750,-0.000976562500000,-0.001342773437500, -0.001739501953125,-0.001068115234375,-0.001129150390625,-0.000152587890625,-0.000061035156250,-0.000549316406250,-0.000488281250000,-0.001129150390625, -0.001007080078125,-0.001312255859375,-0.001403808593750,-0.000885009765625,-0.001129150390625,-0.001098632812500,-0.001770019531250,-0.001922607421875, -0.001647949218750,-0.001434326171875,-0.000976562500000,-0.000976562500000,-0.000854492187500,-0.001159667968750,-0.001495361328125,-0.001800537109375, -0.002105712890625,-0.002288818359375,-0.001861572265625,-0.002136230468750,-0.001312255859375,-0.001861572265625,-0.002075195312500,-0.002075195312500, -0.002044677734375,-0.001068115234375,-0.000549316406250,0.000091552734375,0.000701904296875,0.000549316406250,0.000915527343750,-0.000091552734375, -0.000152587890625,-0.000946044921875,-0.000091552734375,0.000030517578125,0.001037597656250,0.000732421875000,0.000610351562500,0.000152587890625, -0.000091552734375,-0.000610351562500,-0.000518798828125,-0.000549316406250,0.000274658203125,0.000183105468750,0.000823974609375,0.000946044921875, 0.000915527343750,0.000701904296875,-0.000122070312500,-0.000061035156250,-0.000152587890625,0.000213623046875,-0.000061035156250,-0.000061035156250, -0.000518798828125,-0.000885009765625,-0.000823974609375,-0.000549316406250,-0.000122070312500,0.000488281250000,0.000701904296875,0.001068115234375, 0.000854492187500,0.000335693359375,0.000488281250000,-0.000091552734375,0.000305175781250,-0.000305175781250,-0.000030517578125,0.000122070312500, 0.000396728515625,0.000427246093750,0.000640869140625,0.000671386718750,0.000885009765625,0.000335693359375,0.000549316406250,0.000335693359375, 0.000762939453125,0.000427246093750,0.000976562500000,0.000549316406250,0.000823974609375,-0.000213623046875,-0.000579833984375,-0.001037597656250, -0.000640869140625,-0.000518798828125,0.000366210937500,0.000000000000000,0.000244140625000,-0.000396728515625,-0.000274658203125,-0.000183105468750, -0.000244140625000,-0.000152587890625,-0.000274658203125,0.000091552734375,0.000305175781250,0.000946044921875,0.000549316406250,0.000549316406250, -0.000396728515625,-0.000366210937500,0.000152587890625,0.000610351562500,0.000732421875000,0.000640869140625,0.000549316406250,0.000732421875000, 0.000823974609375,0.000518798828125,0.001007080078125,0.000823974609375,0.001098632812500,0.001159667968750,0.001342773437500,0.001586914062500, 0.001403808593750,0.000854492187500,0.000854492187500,0.000823974609375,0.000488281250000,0.000946044921875,0.000671386718750,0.001708984375000, 0.001251220703125,0.001281738281250,0.000671386718750,0.000640869140625,0.000671386718750,0.000549316406250,0.000732421875000,0.001190185546875, 0.001068115234375,0.001129150390625,0.000762939453125,0.000488281250000,0.000701904296875,0.000274658203125,0.000305175781250,0.000335693359375, 0.000457763671875,0.000396728515625,0.000549316406250,0.000396728515625,0.000610351562500,0.000579833984375,0.000732421875000,0.000305175781250, 0.000885009765625,0.000335693359375,0.000640869140625,0.000244140625000,0.000213623046875,0.000457763671875,0.000427246093750,0.000640869140625, 0.000427246093750,0.000701904296875,0.000732421875000,0.000701904296875,0.000244140625000,0.000213623046875,0.000152587890625,0.000091552734375, -0.000030517578125,-0.000244140625000,0.000244140625000,0.000183105468750,0.000061035156250,-0.000427246093750,-0.000274658203125,-0.000091552734375, -0.000061035156250,-0.000183105468750,0.000061035156250,0.000305175781250,0.000671386718750,0.000122070312500,0.000030517578125,-0.000061035156250, -0.000122070312500,-0.000091552734375,-0.000579833984375,-0.000030517578125,-0.000122070312500,0.000335693359375,-0.000122070312500,0.000244140625000, 0.000518798828125,0.000915527343750,0.000915527343750,0.000366210937500,0.000488281250000,0.000213623046875,0.000030517578125,-0.000183105468750, -0.000579833984375,0.000213623046875,0.000579833984375,0.000579833984375,0.000823974609375,0.000518798828125,0.000976562500000,0.000518798828125, 0.000213623046875,-0.000122070312500,0.000213623046875,0.000244140625000,0.000183105468750,0.000122070312500,0.000091552734375,0.000549316406250, 0.000152587890625,0.000274658203125,0.000061035156250,0.000274658203125,0.000579833984375,-0.000152587890625,0.000244140625000,-0.000213623046875, 0.000000000000000,-0.000183105468750,-0.000549316406250,-0.000549316406250,-0.000244140625000,-0.000579833984375,-0.000091552734375,-0.000823974609375, -0.000122070312500,-0.000335693359375,-0.000244140625000,-0.000366210937500,-0.000549316406250,-0.000518798828125,-0.000061035156250,-0.000427246093750, -0.000183105468750,-0.000366210937500,-0.000122070312500,-0.000396728515625,-0.000366210937500,-0.000915527343750,-0.000335693359375,-0.000762939453125, -0.000183105468750,-0.000762939453125,-0.000061035156250,-0.000579833984375,0.000122070312500,-0.000549316406250,0.000000000000000,-0.000488281250000, 0.000122070312500,-0.000518798828125,-0.000061035156250,-0.000518798828125,-0.000244140625000,-0.000366210937500,-0.000244140625000,-0.000183105468750, -0.000213623046875,-0.000061035156250,-0.000335693359375,-0.000305175781250,-0.000366210937500,-0.000335693359375,-0.000244140625000,-0.000213623046875, -0.000244140625000,-0.000152587890625,-0.000152587890625,-0.000305175781250,-0.000274658203125,-0.000457763671875,-0.000335693359375,-0.000396728515625, -0.000274658203125,-0.000366210937500,-0.000427246093750,-0.000274658203125,-0.000579833984375,-0.000366210937500,-0.000518798828125,-0.000335693359375, -0.000366210937500,-0.000335693359375,-0.000305175781250,-0.000518798828125,-0.000366210937500,-0.000549316406250,-0.000427246093750,-0.000488281250000, -0.000427246093750,-0.000488281250000,-0.000518798828125,-0.000457763671875,-0.000488281250000,-0.000549316406250,-0.000244140625000,-0.000701904296875, -0.000152587890625,-0.000762939453125,-0.000274658203125,-0.000732421875000,-0.000457763671875,-0.000671386718750,-0.000427246093750,-0.000610351562500, -0.000274658203125,-0.000579833984375,-0.000152587890625,-0.000518798828125,-0.000213623046875,-0.000488281250000,-0.000335693359375,-0.000518798828125, -0.000488281250000,-0.000518798828125,-0.000518798828125,-0.000488281250000,-0.000488281250000,-0.000366210937500,-0.000549316406250,-0.000305175781250, -0.000549316406250,-0.000396728515625,-0.000488281250000,-0.000427246093750,-0.000549316406250,-0.000396728515625,-0.000549316406250,-0.000488281250000, -0.000488281250000,-0.000671386718750,-0.000366210937500,-0.000579833984375,-0.000549316406250,-0.000396728515625,-0.000610351562500,-0.000457763671875, -0.000457763671875,-0.000640869140625;
4a188bef8ff5589f5ccb504fd5cba6f6b26eedc4dfba132395771a5c2509b6c0
Msc-program/Jacklink
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 //----------------------------------`(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/Msc-program/Jacklink/70b8634173e66d89884bb77b70b7b3ed01f71f79/faust-src/zitarevdsp.dsp
faust
Modified version from Faust Libraries demos.lib same as dm.zita_rev1 but for wetness control and some defaults ----------------------------------`(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; };
5cc498c9f11bba81c0c8c6859c93cf0a6b89d98bd403e821b649750e93ec7676
micbuffa/FaustPowerAmp
PowerAmpNeo.dsp
import("stdfaust.lib"); wa = library("webaudio.lib"); // Modified version of https://github.com/creativeintent/temper/blob/master/Dsp/temper.dsp // Adapted for PowerAmp simulation (addition of presence filter, param adaptation, small changes...) // Distortion parameters pdrive = hslider("Drive gain[style:knob]", 4.0, -10.0, 10.0, 0.001) : si.smooth(0.995); psat = hslider("Saturation dry wet[style:knob]", 1.0, 0.0, 1.0, 0.001) : si.smooth(0.995); pcurve = hslider("Curve k[style:knob]", 1.0, 0.1, 4.0, 0.001) : si.smooth(0.995); // Output parameters plevel = hslider("Level[style:knob]", -3, -24, 24, 1) : ba.db2linear : si.smooth(0.995); // A fairly standard wave shaping curve; we use this to shape the input signal // before modulating the filter coefficients by this signal. Which shaping curve // we use here is pretty unimportant; as long as we can introduce higher harmonics, // the coefficient modulation will react. Which harmonics we introduce here seems // to affect the resulting sound pretty minimally. // // Also note here that we use an approximation of the `tanh` function for computational // improvement. See `http://www.musicdsp.org/showone.php?id=238`. tanh(x) = x * (27 + x * x) / (27 + 9 * x * x); transfer(x) = tanh(pcurve * x) / tanh(pcurve); // The allpass filter is stable for `|m(x)| <= 1`, but should not linger // near +/-1.0 for very long. We therefore clamp the driven signal with a tanh // function to ensure smooth coefficient calculation. We also here introduce // a modulated DC offset in the signal before the curve. drive(x) = x : *(pdrive) : +(fol(x)) : max(-3) : min(3) with { fol = an.amp_follower(0.04); }; // Our modulated filter is an allpass with coefficients governed by the input // signal applied through our wave shaper. Before the filter, we mix the dry // input signal with the raw waveshaper output according to the `psat` parameter. // Note the constant gain coefficient on the waveshaper; that number is to offset // the global gain from the waveshaper to make sure the shaping process stays // under unity gain. The maximum differential gain of the waveshaper can be found // by evaluating the derivative of the transfer function at x0 where x0 is the // steepest part of the slope. Here that number is ~4, so we multiply by ~1/4. waveshaper(x) = x <: _, tap(x) : *(1.0 - psat), *(psat) : + : fi.tf1(b0(x), b1(x), a1(x)) with { b0(x) = m(x); b1(x) = 1.0; a1(x) = m(x); m(x) = drive(x) : transfer : *(0.24); tap(x) = m(x); }; // A fork of the `tf2s` function from the standard filter library which uses a // smoothing function after the `tan` computation to move that expensive call // outside of the inner loop of the filter function. tf2s(b2,b1,b0,a1,a0,w1) = fi.tf2(b0d,b1d,b2d,a1d,a2d) with { c = 1/tan(w1*0.5/ma.SR) : si.smooth(0.995); // 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; }; // A fork of the `resonlp` function from the standard filter library which uses // a local `tf2s` implementation. resonlp(fc,Q,gain) = tf2s(b2,b1,b0,a1,a0,wc) with { wc = 2*ma.PI*fc; a1 = 1/Q; a0 = 1; b2 = 0; b1 = 0; b0 = gain; }; feedbackCircuit = presence:*(gainNFL) with { p1gain = hslider("Presence[name:p1Gain][style:knob]", 0, -15, 15, 0.1); presence =wa.peaking(2000, p1gain, 1, 1) : wa.peaking(4000, p1gain, 1, 1); gainNFL = hslider("Negative gain[name:Level][style:knob]", -0.4, -0.8, 1, 0.01) : si.smoo; }; // Our main processing block. main = *(masterVolume) :(+ : waveshaper : fi.dcblocker) ~ feedbackCircuit : gain with { // This explicit gain multiplier of 4.0 accounts for the loss of gain that // occurs from oversampling by a factor of 2, and for the loss of gain that // occurs from the prefilter and modulation step. Then we apply the output // level parameter. gain = *(4.0) : *(plevel); masterVolume = hslider("Master Volume[name:MV][style:knob]", 1, 0, 4, 0.1) : si.smoo; }; // And the overall process declaration. poweramp = main; finalPWAMono = hgroup("PowerAmp FAUST / WebAudio",ba.bypass_fade(ma.SR/10, checkbox("bypass"), poweramp)); process = finalPWAMono, finalPWAMono;
https://raw.githubusercontent.com/micbuffa/FaustPowerAmp/415435288c32efad3d0de64b18004ebca3d3c06d/dsp/PowerAmpNeo.dsp
faust
Modified version of https://github.com/creativeintent/temper/blob/master/Dsp/temper.dsp Adapted for PowerAmp simulation (addition of presence filter, param adaptation, small changes...) Distortion parameters Output parameters A fairly standard wave shaping curve; we use this to shape the input signal before modulating the filter coefficients by this signal. Which shaping curve we use here is pretty unimportant; as long as we can introduce higher harmonics, the coefficient modulation will react. Which harmonics we introduce here seems to affect the resulting sound pretty minimally. Also note here that we use an approximation of the `tanh` function for computational improvement. See `http://www.musicdsp.org/showone.php?id=238`. The allpass filter is stable for `|m(x)| <= 1`, but should not linger near +/-1.0 for very long. We therefore clamp the driven signal with a tanh function to ensure smooth coefficient calculation. We also here introduce a modulated DC offset in the signal before the curve. Our modulated filter is an allpass with coefficients governed by the input signal applied through our wave shaper. Before the filter, we mix the dry input signal with the raw waveshaper output according to the `psat` parameter. Note the constant gain coefficient on the waveshaper; that number is to offset the global gain from the waveshaper to make sure the shaping process stays under unity gain. The maximum differential gain of the waveshaper can be found by evaluating the derivative of the transfer function at x0 where x0 is the steepest part of the slope. Here that number is ~4, so we multiply by ~1/4. A fork of the `tf2s` function from the standard filter library which uses a smoothing function after the `tan` computation to move that expensive call outside of the inner loop of the filter function. bilinear-transform scale-factor A fork of the `resonlp` function from the standard filter library which uses a local `tf2s` implementation. Our main processing block. This explicit gain multiplier of 4.0 accounts for the loss of gain that occurs from oversampling by a factor of 2, and for the loss of gain that occurs from the prefilter and modulation step. Then we apply the output level parameter. And the overall process declaration.
import("stdfaust.lib"); wa = library("webaudio.lib"); pdrive = hslider("Drive gain[style:knob]", 4.0, -10.0, 10.0, 0.001) : si.smooth(0.995); psat = hslider("Saturation dry wet[style:knob]", 1.0, 0.0, 1.0, 0.001) : si.smooth(0.995); pcurve = hslider("Curve k[style:knob]", 1.0, 0.1, 4.0, 0.001) : si.smooth(0.995); plevel = hslider("Level[style:knob]", -3, -24, 24, 1) : ba.db2linear : si.smooth(0.995); tanh(x) = x * (27 + x * x) / (27 + 9 * x * x); transfer(x) = tanh(pcurve * x) / tanh(pcurve); drive(x) = x : *(pdrive) : +(fol(x)) : max(-3) : min(3) with { fol = an.amp_follower(0.04); }; waveshaper(x) = x <: _, tap(x) : *(1.0 - psat), *(psat) : + : fi.tf1(b0(x), b1(x), a1(x)) with { b0(x) = m(x); b1(x) = 1.0; a1(x) = m(x); m(x) = drive(x) : transfer : *(0.24); tap(x) = m(x); }; tf2s(b2,b1,b0,a1,a0,w1) = fi.tf2(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; }; resonlp(fc,Q,gain) = tf2s(b2,b1,b0,a1,a0,wc) with { wc = 2*ma.PI*fc; a1 = 1/Q; a0 = 1; b2 = 0; b1 = 0; b0 = gain; }; feedbackCircuit = presence:*(gainNFL) with { p1gain = hslider("Presence[name:p1Gain][style:knob]", 0, -15, 15, 0.1); presence =wa.peaking(2000, p1gain, 1, 1) : wa.peaking(4000, p1gain, 1, 1); gainNFL = hslider("Negative gain[name:Level][style:knob]", -0.4, -0.8, 1, 0.01) : si.smoo; }; main = *(masterVolume) :(+ : waveshaper : fi.dcblocker) ~ feedbackCircuit : gain with { gain = *(4.0) : *(plevel); masterVolume = hslider("Master Volume[name:MV][style:knob]", 1, 0, 4, 0.1) : si.smoo; }; poweramp = main; finalPWAMono = hgroup("PowerAmp FAUST / WebAudio",ba.bypass_fade(ma.SR/10, checkbox("bypass"), poweramp)); process = finalPWAMono, finalPWAMono;
ba3d5f92348c377085dd190144f024a392317acf02280c8d4c2353f130b0d83b
tognitete/BJT
freeverbTEST.dsp
// Created from flange.dsp 2015/06/21 import("stdfaust.lib"); flanger_mono(dmax,curdel,depth,fb,invert,lfoshape) = _ <: _, (-:de.fdelay(dmax,curdel)) ~ *(fb) : _, *(select2(invert,depth,0-depth)) : + : *(1/(1+depth)); // ideal for dc and reinforced sinusoids (in-phase summed signals) process = ba.bypass1(fbp,flanger_mono_gui); // Kill the groups to save vertical space: meter_group(x) = flsg(x); ctl_group(x) = flkg(x); del_group(x) = flkg(x); lvl_group(x) = flkf(x); flangeview = lfo(freq); flanger_mono_gui = attach(flangeview) : flanger_mono(dmax,curdel,depth,fb,invert,lfoshape); sinlfo(freq) = (1 + os.oscrs(freq))/2; trilfo(freq) = 1.0-abs(os.saw1(freq)); lfo(f) = (lfoshape * trilfo(f)) + ((1-lfoshape) * sinlfo(f)); dmax = 2048; odflange = 44; // ~1 ms at 44.1 kHz = min delay dflange = ((dmax-1)-odflange)*del_group(vslider("[1] Delay [midi:ctrl 50][style:knob]", 0.22, 0, 1, 1)); freq = ctl_group(vslider("[1] Rate [midi:ctrl 2] [unit:Hz] [style:knob]", 0.5, 0, 10, 0.01)) : si.smooth(ba.tau2pole(freqT60/6.91)); freqT60 = 0.15661; depth = ctl_group(vslider("[3] Depth [midi:ctrl 3] [style:knob]", .75, 0, 1, 0.001)) : si.smooth(ba.tau2pole(depthT60/6.91)); depthT60 = 0.15661; fb = ctl_group(vslider("[5] Feedback [midi:ctrl 4] [style:knob]", 0, -0.995, 0.99, 0.001)) : si.smooth(ba.tau2pole(fbT60/6.91)); fbT60 = 0.15661; lfoshape = ctl_group(vslider("[7] Waveshape [midi:ctrl 54] [style:knob]", 0, 0, 1, 0.001)); curdel = odflange+dflange*lfo(freq); fbp = int(rsg(checkbox("[0] Enable [midi:ctrl 105]"))); invert = flsg(vslider("[1] Invert [midi:ctrl 49][style:knob]",0,0,1,1):int); // This layout loosely follows the MiniMoog-V // Arturia-only features are labeled // Original versions also added where different // Need vrocker and hrocker toggle switches in Faust! // Need orange and blue color choices // Orange => Connect modulation sources to their destinations // Blue => Turn audio sources On and Off // - and later - // White => Turn performance features On and Off // Black => Select between modulation sources // Julius Smith for Analog Devices 3/1/2017 vrocker(x) = checkbox("%%x [style:vrocker]"); hrocker(x) = checkbox("%%x [style:hrocker]"); vrockerblue(x) = checkbox("%x [style:vrocker] [color:blue]"); vrockerblue(x) = checkbox("%x [style:vrocker] [color:blue]"); // USAGE: vrockerorange("[0] ModulationEnable"); hrockerblue(x) = checkbox("%%x [style:hrocker] [color:blue]"); vrockerred(x) = checkbox("%%x [style:vrocker] [color:red]"); hrockerred(x) = checkbox("%%x [style:hrocker] [color:red]"); declare designer "Robert A. Moog"; mmg(x) = hgroup("",x); // Minimoog + Effects synthg(x) = mmg(vgroup("[0] Minimoog",x)); fxg(x) = mmg(hgroup("[1] Effects",x)); mg(x) = synthg(hgroup("[0]",x)); cg(x) = mg(vgroup("[0] Controllers",x)); // Formerly named "Modules" but "Minimoog" group-title is enough vg(x) = cg(hgroup("[0] Master Volume", x)); dg(x) = cg(hgroup("[1] Oscillator Tuning & Switching", x)); // Tune knob = master tune dsg(x) = dg(vgroup("[1] Switches", x)); // Oscillator Modulation HrockerRed => apply Modulation Mix output to osc1&2 pitches // [MOVED here from osc3 group] Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3 gmmg(x) = cg(hgroup("[2] Glide and ModMix", x)); // Glide knob [0:10] = portamento speed // Modulation Mix knob [0:10] (between Osc3 and Noise) = mix of noise and osc3 modulating osc1&2 pitch and/or VCF freq og(x) = mg(vgroup("[1] Oscillator Bank", x)); osc1(x) = og(hgroup("[1] Oscillator 1", x)); // UNUSED Control switch (for alignment) - Could put Oscillator Modulation switch there // Range rotary switch: LO (slow pulses or rhythm), 32', 16', 8', 4', 2' // Frequency <something> switch: LED to right // Waveform rotary switch: tri, impulse/bent-triangle, saw, pulseWide, pulseMed, pulseNarrow osc2(x) = og(hgroup("[2] Oscillator 2", x)); // UNUSED (originall) or Osc 2 Control VrockerRed // Range rotary switch: LO, 32', 16', 8', 4', 2' // Detuning knob: -7 to 7 [NO SWITCH] // Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow osc3(x) = og(hgroup("[3] Oscillator 3", x)); // Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3 // Range rotary switch: LO, 32', 16', 8', 4', 2' // Detuning knob: -7 to 7 [NO SWITCH] // Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow mixg(x) = mg(vgroup("[2] Mixer", x)); // Each row 5 slots to maintain alignment and include red rockers joining VCF area: mr1(x) = mixg(hgroup("[0] Osc1", x)); // mixer row 1 = // Osc1 Volume and Osc1 HrockerBlue & _ & _ & Filter Modulation HrockerRed // Filter Modulation => Modulation Mix output to VCF freq mr2(x) = mixg(hgroup("[1] Ext In, KeyCtl", x)); // row 2 = Ext In HrockerBlue and Vol and Overload LED and Keyboard Ctl HrockerRed 1 mr3(x) = mixg(hgroup("[2] Osc2", x)); // = Osc2 Volume and Osc2 HrockerBlue and Keyboard Ctl HrockerRed 2 // Keyboard Control Modulation 1&2 => 0, 1/3, 2/3, all of Keyboard Control Signal ("gate?") applied to VCF freq mr4(x) = mixg(hgroup("[3] Noise", x)); // = Noise HrockerBlue and Volume and Noise Type VrockerBlue mr4cbg(x) = mr4(vgroup("[1]", x)); // = Noise Off and White/Pink selection // two rockers mr5(x) = mixg(hgroup("[4] Osc3", x)); // Osc3 Volume and Osc3 HrockerBlue modg(x) = mg(vgroup("[3] Modifiers", x)); vcfg(x) = modg(vgroup("[0] Filter", x)); vcf1(x) = vcfg(hgroup("[0] [tooltip:freq, Q, ContourScale]", x)); vcf1cbg(x) = vcf1(vgroup("[0] [tooltip:two checkboxes]", x)); // Filter Modulation switch // VCF Off switch // Corner Frequency knob // Filter Emphasis knob // Amount of Contour knob vcf2(x) = vcfg(hgroup("[1] Filter Contour [tooltip:AttFilt, DecFilt, Sustain Level for Filter Contour]", x)); // Attack Time knob // Decay Time knob // Sustain Level knob ng(x) = modg(hgroup("[1] Loudness Contour", x)); // Attack Time knob // Decay Time knob // Sustain Level knob echog(x) = fxg(hgroup("[4] Echo",x)); ekg(x) = echog(vgroup("[0] Knobs",x)); esg(x) = echog(vgroup("[1] Switches",x)); flg(x) = fxg(hgroup("[5] Flanger",x)); flkg(x) = flg(vgroup("[0] Knobs",x)); flsg(x) = flg(vgroup("[1] Switches",x)); chg(x) = fxg(hgroup("[6] Chorus",x)); ckg(x) = chg(vgroup("[0] Knobs",x)); csg(x) = chg(vgroup("[1] Switches",x)); rg(x) = fxg(hgroup("[7] Reverb",x)); rkg(x) = rg(vgroup("[0] Knobs",x)); rsg(x) = rg(vgroup("[1] Switches",x)); outg(x) = fxg(vgroup("[8] Output", x)); volg(x) = outg(hgroup("[0] Volume Main Output", x)); // Volume knob [0-10] // Unison switch (Arturia) or Output connect/disconnect switch (original) // When set, all voices are stacked and instrument is in mono mode tunerg(x) = outg(hgroup("[1] A-440 Switch", x)); vdtpolyg(x) = outg(hgroup("[2] Voice Detune / Poly", x)); // Voice Detune knob [0-10] (Arturia) or // Polyphonic switch [red LED below] (Arturia) // When set, instrument is in polyphonic mode with one oscillator per key clipg(x) = fxg(vgroup("[9] Soft Clip", x)); // Soft Clipping switch [red LED above] kg(x) = synthg(hgroup("[1] Keyboard Group", x)); // Keyboard was 3 1/2 octaves ws(x) = kg(vgroup("[0] Wheels and Switches", x)); s1g(x) = ws(hgroup("[0] Jacks and Rockers", x)); jg(x) = s1g(vgroup("[0] MiniJacks",x)); gdlg(x) = s1g(vgroup("[1] Glide/Decay/Legato Enables",x)); // Arturia // Glide Hrocker (see original Button version below) // Decay Hrocker (see original Button version below) => Sets Release (R) of ADSR to either 0 or Decay (R) // Legato Hrocker (not in original) s2g(x) = ws(hgroup("[1] [tooltip:Wheels+]", x)); bg(x) = s2g(vgroup("[0] [tooltip:Bend Enable and Range]", x)); wg(x) = s2g(hgroup("[1] [tooltip:Bend and Mod Wheels]", x)); // Using Glide/Decay/Legato enables above following Arturia: // dg(x) = s2g(hgroup("[2] Glide and Decay momentary pushbuttons", x)); // Glide Button injects portamento as set by Glide knob // Decay Button uses decay of Loudness Contour (else 0) keys(x) = kg(hgroup("[1] [tooltip:Keys]", x)); gg(x) = keys(hgroup("[0] [tooltip: Gates]",x)); // leave slot 1 open for sustain (below)
https://raw.githubusercontent.com/tognitete/BJT/2818b850f2531bb8a0e84ab0f53f66b33bb256d0/server-side/plugin-services/plugins/freeverbTEST/freeverbTEST.dsp
faust
Created from flange.dsp 2015/06/21 ideal for dc and reinforced sinusoids (in-phase summed signals) Kill the groups to save vertical space: ~1 ms at 44.1 kHz = min delay This layout loosely follows the MiniMoog-V Arturia-only features are labeled Original versions also added where different Need vrocker and hrocker toggle switches in Faust! Need orange and blue color choices Orange => Connect modulation sources to their destinations Blue => Turn audio sources On and Off - and later - White => Turn performance features On and Off Black => Select between modulation sources Julius Smith for Analog Devices 3/1/2017 USAGE: vrockerorange("[0] ModulationEnable"); Minimoog + Effects Formerly named "Modules" but "Minimoog" group-title is enough Tune knob = master tune Oscillator Modulation HrockerRed => apply Modulation Mix output to osc1&2 pitches [MOVED here from osc3 group] Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3 Glide knob [0:10] = portamento speed Modulation Mix knob [0:10] (between Osc3 and Noise) = mix of noise and osc3 modulating osc1&2 pitch and/or VCF freq UNUSED Control switch (for alignment) - Could put Oscillator Modulation switch there Range rotary switch: LO (slow pulses or rhythm), 32', 16', 8', 4', 2' Frequency <something> switch: LED to right Waveform rotary switch: tri, impulse/bent-triangle, saw, pulseWide, pulseMed, pulseNarrow UNUSED (originall) or Osc 2 Control VrockerRed Range rotary switch: LO, 32', 16', 8', 4', 2' Detuning knob: -7 to 7 [NO SWITCH] Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow Osc 3 Control VrockerRed => use osc3 as LFO instead of osc3 Range rotary switch: LO, 32', 16', 8', 4', 2' Detuning knob: -7 to 7 [NO SWITCH] Waveform rotary switch: tri, impulse(?), saw, pulseWide, pulseMed, pulseNarrow Each row 5 slots to maintain alignment and include red rockers joining VCF area: mixer row 1 = Osc1 Volume and Osc1 HrockerBlue & _ & _ & Filter Modulation HrockerRed Filter Modulation => Modulation Mix output to VCF freq row 2 = Ext In HrockerBlue and Vol and Overload LED and Keyboard Ctl HrockerRed 1 = Osc2 Volume and Osc2 HrockerBlue and Keyboard Ctl HrockerRed 2 Keyboard Control Modulation 1&2 => 0, 1/3, 2/3, all of Keyboard Control Signal ("gate?") applied to VCF freq = Noise HrockerBlue and Volume and Noise Type VrockerBlue = Noise Off and White/Pink selection two rockers Osc3 Volume and Osc3 HrockerBlue Filter Modulation switch VCF Off switch Corner Frequency knob Filter Emphasis knob Amount of Contour knob Attack Time knob Decay Time knob Sustain Level knob Attack Time knob Decay Time knob Sustain Level knob Volume knob [0-10] Unison switch (Arturia) or Output connect/disconnect switch (original) When set, all voices are stacked and instrument is in mono mode Voice Detune knob [0-10] (Arturia) or Polyphonic switch [red LED below] (Arturia) When set, instrument is in polyphonic mode with one oscillator per key Soft Clipping switch [red LED above] Keyboard was 3 1/2 octaves Arturia Glide Hrocker (see original Button version below) Decay Hrocker (see original Button version below) => Sets Release (R) of ADSR to either 0 or Decay (R) Legato Hrocker (not in original) Using Glide/Decay/Legato enables above following Arturia: dg(x) = s2g(hgroup("[2] Glide and Decay momentary pushbuttons", x)); Glide Button injects portamento as set by Glide knob Decay Button uses decay of Loudness Contour (else 0) leave slot 1 open for sustain (below)
import("stdfaust.lib"); flanger_mono(dmax,curdel,depth,fb,invert,lfoshape) = _ <: _, (-:de.fdelay(dmax,curdel)) ~ *(fb) : _, *(select2(invert,depth,0-depth)) process = ba.bypass1(fbp,flanger_mono_gui); meter_group(x) = flsg(x); ctl_group(x) = flkg(x); del_group(x) = flkg(x); lvl_group(x) = flkf(x); flangeview = lfo(freq); flanger_mono_gui = attach(flangeview) : flanger_mono(dmax,curdel,depth,fb,invert,lfoshape); sinlfo(freq) = (1 + os.oscrs(freq))/2; trilfo(freq) = 1.0-abs(os.saw1(freq)); lfo(f) = (lfoshape * trilfo(f)) + ((1-lfoshape) * sinlfo(f)); dmax = 2048; dflange = ((dmax-1)-odflange)*del_group(vslider("[1] Delay [midi:ctrl 50][style:knob]", 0.22, 0, 1, 1)); freq = ctl_group(vslider("[1] Rate [midi:ctrl 2] [unit:Hz] [style:knob]", 0.5, 0, 10, 0.01)) : si.smooth(ba.tau2pole(freqT60/6.91)); freqT60 = 0.15661; depth = ctl_group(vslider("[3] Depth [midi:ctrl 3] [style:knob]", .75, 0, 1, 0.001)) : si.smooth(ba.tau2pole(depthT60/6.91)); depthT60 = 0.15661; fb = ctl_group(vslider("[5] Feedback [midi:ctrl 4] [style:knob]", 0, -0.995, 0.99, 0.001)) : si.smooth(ba.tau2pole(fbT60/6.91)); fbT60 = 0.15661; lfoshape = ctl_group(vslider("[7] Waveshape [midi:ctrl 54] [style:knob]", 0, 0, 1, 0.001)); curdel = odflange+dflange*lfo(freq); fbp = int(rsg(checkbox("[0] Enable [midi:ctrl 105]"))); invert = flsg(vslider("[1] Invert [midi:ctrl 49][style:knob]",0,0,1,1):int); vrocker(x) = checkbox("%%x [style:vrocker]"); hrocker(x) = checkbox("%%x [style:hrocker]"); vrockerblue(x) = checkbox("%x [style:vrocker] [color:blue]"); vrockerblue(x) = checkbox("%x [style:vrocker] [color:blue]"); hrockerblue(x) = checkbox("%%x [style:hrocker] [color:blue]"); vrockerred(x) = checkbox("%%x [style:vrocker] [color:red]"); hrockerred(x) = checkbox("%%x [style:hrocker] [color:red]"); declare designer "Robert A. Moog"; synthg(x) = mmg(vgroup("[0] Minimoog",x)); fxg(x) = mmg(hgroup("[1] Effects",x)); mg(x) = synthg(hgroup("[0]",x)); vg(x) = cg(hgroup("[0] Master Volume", x)); dg(x) = cg(hgroup("[1] Oscillator Tuning & Switching", x)); dsg(x) = dg(vgroup("[1] Switches", x)); gmmg(x) = cg(hgroup("[2] Glide and ModMix", x)); og(x) = mg(vgroup("[1] Oscillator Bank", x)); osc1(x) = og(hgroup("[1] Oscillator 1", x)); osc2(x) = og(hgroup("[2] Oscillator 2", x)); osc3(x) = og(hgroup("[3] Oscillator 3", x)); mixg(x) = mg(vgroup("[2] Mixer", x)); modg(x) = mg(vgroup("[3] Modifiers", x)); vcfg(x) = modg(vgroup("[0] Filter", x)); vcf1(x) = vcfg(hgroup("[0] [tooltip:freq, Q, ContourScale]", x)); vcf1cbg(x) = vcf1(vgroup("[0] [tooltip:two checkboxes]", x)); vcf2(x) = vcfg(hgroup("[1] Filter Contour [tooltip:AttFilt, DecFilt, Sustain Level for Filter Contour]", x)); ng(x) = modg(hgroup("[1] Loudness Contour", x)); echog(x) = fxg(hgroup("[4] Echo",x)); ekg(x) = echog(vgroup("[0] Knobs",x)); esg(x) = echog(vgroup("[1] Switches",x)); flg(x) = fxg(hgroup("[5] Flanger",x)); flkg(x) = flg(vgroup("[0] Knobs",x)); flsg(x) = flg(vgroup("[1] Switches",x)); chg(x) = fxg(hgroup("[6] Chorus",x)); ckg(x) = chg(vgroup("[0] Knobs",x)); csg(x) = chg(vgroup("[1] Switches",x)); rg(x) = fxg(hgroup("[7] Reverb",x)); rkg(x) = rg(vgroup("[0] Knobs",x)); rsg(x) = rg(vgroup("[1] Switches",x)); outg(x) = fxg(vgroup("[8] Output", x)); volg(x) = outg(hgroup("[0] Volume Main Output", x)); tunerg(x) = outg(hgroup("[1] A-440 Switch", x)); vdtpolyg(x) = outg(hgroup("[2] Voice Detune / Poly", x)); clipg(x) = fxg(vgroup("[9] Soft Clip", x)); ws(x) = kg(vgroup("[0] Wheels and Switches", x)); s1g(x) = ws(hgroup("[0] Jacks and Rockers", x)); jg(x) = s1g(vgroup("[0] MiniJacks",x)); s2g(x) = ws(hgroup("[1] [tooltip:Wheels+]", x)); bg(x) = s2g(vgroup("[0] [tooltip:Bend Enable and Range]", x)); wg(x) = s2g(hgroup("[1] [tooltip:Bend and Mod Wheels]", x)); keys(x) = kg(hgroup("[1] [tooltip:Keys]", x)); gg(x) = keys(hgroup("[0] [tooltip: Gates]",x));
57b8bb1885cf0efb29f58a8cda4477cb17b8b9860de2256cf232a7f3a9283e78
rottingsounds/bitDSP-faust
intDivision.dsp
import("stdfaust.lib"); a = int(os.osc(440) * 20); b = 7; process = int(a/b);
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/test/intDivision.dsp
faust
import("stdfaust.lib"); a = int(os.osc(440) * 20); b = 7; process = int(a/b);
be8c4797d0a4610f1ea8316da193c7a5bdb592b0da9fe16813b7c5e569a97645
rottingsounds/bitDSP-faust
test_bitDAC.dsp
import("stdfaust.lib"); b = library("bitDSP.lib"); process = b.bitDAC(6, 0, int(no.noise * b.int_max));
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/test/test_bitDAC.dsp
faust
import("stdfaust.lib"); b = library("bitDSP.lib"); process = b.bitDAC(6, 0, int(no.noise * b.int_max));
39436de19b94128381fb594c1de6b7f294a15eabdb802dcbde05ca282f7ff4f1
rottingsounds/bitDSP-faust
literals.dsp
import("stdfaust.lib"); b = library("bitDSP.lib"); // CXXFLAGS="-I ../lib" faust2csvplot -I ../lib literals.dsp s_count = (1:+~_) - 1; a = (4:b.left_shift(1)) | (6:b.left_shift(1)) | (31:b.left_shift(1)); process = a : b.print2(0, s_count);
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/c436ecad29c57d46d5e3e59110c25e71a3761fc5/test/literals.dsp
faust
CXXFLAGS="-I ../lib" faust2csvplot -I ../lib literals.dsp
import("stdfaust.lib"); b = library("bitDSP.lib"); s_count = (1:+~_) - 1; a = (4:b.left_shift(1)) | (6:b.left_shift(1)) | (31:b.left_shift(1)); process = a : b.print2(0, s_count);
b71de14860dd2b3c4de71fcd658484a509e00fe48bbc465e6b8771a82c9b78c6
rottingsounds/bitDSP-faust
test_bitMask.dsp
import("stdfaust.lib"); b = library("bitDSP.lib"); // compile // CXXFLAGS="-I ../lib" faust2csvplot -I ../lib bitMask.dsp // ./bitMask -n 10 s_count = (1:+~_) - 1; // a = (4:b.left_shift(1)) | (6:b.left_shift(1)) | (31:b.left_shift(1)); a = b.bit_mask((s_count % 32, 6, 31)); process = a : b.print2(0, s_count);
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/test/test_bitMask.dsp
faust
compile CXXFLAGS="-I ../lib" faust2csvplot -I ../lib bitMask.dsp ./bitMask -n 10 a = (4:b.left_shift(1)) | (6:b.left_shift(1)) | (31:b.left_shift(1));
import("stdfaust.lib"); b = library("bitDSP.lib"); s_count = (1:+~_) - 1; a = b.bit_mask((s_count % 32, 6, 31)); process = a : b.print2(0, s_count);
f423129d22908ded20b96825c25996bf953db681faf951ef5c6e2e33506e3f3b
rottingsounds/bitDSP-faust
tillRBN.dsp
import("stdfaust.lib"); bitConv = library("bitDSP_conversion"); // conversion between formats library node(function_seed, select_seed, N, K) = si.bus(N) : r_select(select_seed, K) : si.bus(K) : s_node(function_seed) with { s_node(seed, K) = si.bus(K) : bitConv.bitBus_to_int(K) : sc.hasher(seed + _) > 0.5 : _; };
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/c436ecad29c57d46d5e3e59110c25e71a3761fc5/test/tillRBN.dsp
faust
conversion between formats library
import("stdfaust.lib"); node(function_seed, select_seed, N, K) = si.bus(N) : r_select(select_seed, K) : si.bus(K) : s_node(function_seed) with { s_node(seed, K) = si.bus(K) : bitConv.bitBus_to_int(K) : sc.hasher(seed + _) > 0.5 : _; };
cf0007e362c4be271cb38dd587b1f464c51188d01687bdd5fdea34bf35fa9f85
rottingsounds/bitDSP-faust
test_autoparam.dsp
import("stdfaust.lib"); inspect(i) = bit.inspect(i, -1, 1); bit = library("bitDSP.lib"); gen = library("bitDSP_gen.lib"); fb1 = hslider("fb1", 0.1, -1, 1, .000001); fb2 = hslider("fb2", 0.1, -1, 1, .000001); process = gen.gen3 ~ (ro.cross(2) : par(i, 2, bit.autoparam + .54233) : par(i, 2, inspect(i))) : par(i, 2, fi.highpass(1, 20)); //process = gen.gen3(fb1, fb2) <: par(i, 2, fi.highpass(1, 20)) , (par(i, 2, bit.autoparam) : par(i, 2, inspect(i)));
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/c436ecad29c57d46d5e3e59110c25e71a3761fc5/test/test_autoparam.dsp
faust
process = gen.gen3(fb1, fb2) <: par(i, 2, fi.highpass(1, 20)) , (par(i, 2, bit.autoparam) : par(i, 2, inspect(i)));
import("stdfaust.lib"); inspect(i) = bit.inspect(i, -1, 1); bit = library("bitDSP.lib"); gen = library("bitDSP_gen.lib"); fb1 = hslider("fb1", 0.1, -1, 1, .000001); fb2 = hslider("fb2", 0.1, -1, 1, .000001); process = gen.gen3 ~ (ro.cross(2) : par(i, 2, bit.autoparam + .54233) : par(i, 2, inspect(i))) : par(i, 2, fi.highpass(1, 20));
667404401f6ce6ff4907a13daa1f34b17bb65f68461003bbb19b5735d01e98e7
rottingsounds/bitDSP-faust
LowPressure.dsp
declare name "LowPressure"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); // bit = library("bitDSP.lib"); bit_gen = library("bitDSP_gen.lib"); // SuperCollider // export SUPERCOLLIDER_HEADERS=/localvol/sound/src/supercollider/include/ // faust2supercollider -I ../../lib -noprefix LowPressure.dsp c1 = hslider("c1",0,0,1,0.001); c2 = hslider("c2",0.5,0,1,0.001); // Final output process = bit_gen.lowPressure(c1, c2) : si.bus(2);
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/d70843492b65bb2cb9cf97c2240905fefacc7383/synths/_sc/LowPressure.dsp
faust
bit = library("bitDSP.lib"); SuperCollider export SUPERCOLLIDER_HEADERS=/localvol/sound/src/supercollider/include/ faust2supercollider -I ../../lib -noprefix LowPressure.dsp Final output
declare name "LowPressure"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); bit_gen = library("bitDSP_gen.lib"); c1 = hslider("c1",0,0,1,0.001); c2 = hslider("c2",0.5,0,1,0.001); process = bit_gen.lowPressure(c1, c2) : si.bus(2);
dce143bcf25e22fd8bcf1596afa9100eea95bb60cecc0143adca5077970095fe
rottingsounds/bitDSP-faust
test_lfsr.dsp
declare name "lfsr printVals"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); bit32 = library("bitDSP_int32.lib"); // plot // CXXFLAGS="-I ../include" faust2csvplot -I ../lib lfsr.dsp // ./lfsr -n 10 // compile // CXXFLAGS="-I ../../../include" faust2caqt -I ../lib lfsr.dsp // ./lfsr s_count = (1:+~_) - 1; // a = (4:b.left_shift(1)) | (6:bit32.left_shift(1)) | (31:bit32.left_shift(1)); a = 1: bit32.lfsr32(b.bit_mask((3, 6, 31))); process = a : bit32.print2(0, s_count);
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/test/test_lfsr.dsp
faust
plot CXXFLAGS="-I ../include" faust2csvplot -I ../lib lfsr.dsp ./lfsr -n 10 compile CXXFLAGS="-I ../../../include" faust2caqt -I ../lib lfsr.dsp ./lfsr a = (4:b.left_shift(1)) | (6:bit32.left_shift(1)) | (31:bit32.left_shift(1));
declare name "lfsr printVals"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); bit32 = library("bitDSP_int32.lib"); s_count = (1:+~_) - 1; a = 1: bit32.lfsr32(b.bit_mask((3, 6, 31))); process = a : bit32.print2(0, s_count);
346c286b39fe636e9a1850935e185458a5f6cd9cc12cd77256bee8939f9b4b0d
rottingsounds/bitDSP-faust
test_bit_delay.dsp
import("stdfaust.lib"); b = library("bitDSP.lib"); // bit_delay(0, x) = x; // bit_delay(32, x) = x'; // bit_delay(delta, x) = ((x >> delta) | (x' << (32-delta))); line = 1:+~_; input = select2(1', -1216614433, 1216614432); s_count = (1:+~_) - 1; // parallel execution of the 32 cases for the bit_delay, // I'd like to feed all of them the two values I defined in `input`, // where the first value (-1216614433) is x' and the second value (1216614432) is x process = input <: par(i,32,b.delay32(i) : b.print2(s_count, i)); // process = input <: par(i,32,b.delay32(i));
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/test/test_bit_delay.dsp
faust
bit_delay(0, x) = x; bit_delay(32, x) = x'; bit_delay(delta, x) = ((x >> delta) | (x' << (32-delta))); parallel execution of the 32 cases for the bit_delay, I'd like to feed all of them the two values I defined in `input`, where the first value (-1216614433) is x' and the second value (1216614432) is x process = input <: par(i,32,b.delay32(i));
import("stdfaust.lib"); b = library("bitDSP.lib"); line = 1:+~_; input = select2(1', -1216614433, 1216614432); s_count = (1:+~_) - 1; process = input <: par(i,32,b.delay32(i) : b.print2(s_count, i));
281990af0fdfb3df950ddcf5752a21ae3086f5b4d9c8204252f5d398f1d48564
rottingsounds/bitDSP-faust
boolOsc0.dsp
declare name "boolOsc0"; declare description "bool_osc_0 - example"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); bit = library("bitDSP.lib"); // plot // CXXFLAGS="-I ../include" faust2csvplot -I ../lib boolOsc0.dsp // ./boolOsc0 -n 10 // compile // CXXFLAGS="-I ../../../include" faust2caqt -I ../lib boolOsc0.dsp // ./boolOsc0 dt1 = int(hslider("dt1",0,0,1,0) * ma.SR); dt2 = int(hslider("dt2",0,0,1,0) * ma.SR); dt3 = int(hslider("dt3",0,0,1,0) * ma.SR); dt4 = int(hslider("dt4",0,0,1,0) * ma.SR); // stereo out process = bit.bool_osc0(dt1, dt2, dt3, dt4) <: _, _;
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/c436ecad29c57d46d5e3e59110c25e71a3761fc5/synths/boolOsc0.dsp
faust
plot CXXFLAGS="-I ../include" faust2csvplot -I ../lib boolOsc0.dsp ./boolOsc0 -n 10 compile CXXFLAGS="-I ../../../include" faust2caqt -I ../lib boolOsc0.dsp ./boolOsc0 stereo out
declare name "boolOsc0"; declare description "bool_osc_0 - example"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); bit = library("bitDSP.lib"); dt1 = int(hslider("dt1",0,0,1,0) * ma.SR); dt2 = int(hslider("dt2",0,0,1,0) * ma.SR); dt3 = int(hslider("dt3",0,0,1,0) * ma.SR); dt4 = int(hslider("dt4",0,0,1,0) * ma.SR); process = bit.bool_osc0(dt1, dt2, dt3, dt4) <: _, _;
0ee641e2491ecdd6510d2b72dc72f0568fee0ee6e281fc52974c482e0381b300
rottingsounds/bitDSP-faust
boolOsc1.dsp
declare name "boolOsc1"; declare description "bool_osc_0 - example"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); bit = library("bitDSP.lib"); // SuperCollider // CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix boolOsc1.dsp // plot // CXXFLAGS="-I ../include" faust2csvplot -I ../lib boolOsc1.dsp // ./boolOsc1 -n 10 // compile // CXXFLAGS="-I ../../../include" faust2caqt -I ../lib boolOsc1.dsp // ./boolOsc1 dt1 = int(hslider("dt1",0,0,1,0) * ma.SR); dt2 = int(hslider("dt2",0,0,1,0) * ma.SR); // mono out process = bit.bool_osc1(dt1, dt2);
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/examples/_sc/boolOsc1.dsp
faust
SuperCollider CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix boolOsc1.dsp plot CXXFLAGS="-I ../include" faust2csvplot -I ../lib boolOsc1.dsp ./boolOsc1 -n 10 compile CXXFLAGS="-I ../../../include" faust2caqt -I ../lib boolOsc1.dsp ./boolOsc1 mono out
declare name "boolOsc1"; declare description "bool_osc_0 - example"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); bit = library("bitDSP.lib"); dt1 = int(hslider("dt1",0,0,1,0) * ma.SR); dt2 = int(hslider("dt2",0,0,1,0) * ma.SR); process = bit.bool_osc1(dt1, dt2);
b6c4c49ae609cb59593c0b03ef11d753585354fd4ffe8186237ac1ef25a903d3
rottingsounds/bitDSP-faust
boolOsc2.dsp
declare name "boolOsc2"; declare description "bool_osc_0 - example"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); bit = library("bitDSP.lib"); // SuperCollider // CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix boolOsc2.dsp // plot // CXXFLAGS="-I ../include" faust2csvplot -I ../lib boolOsc2.dsp // ./boolOsc2 -n 10 // compile // CXXFLAGS="-I ../../../include" faust2caqt -I ../lib boolOsc2.dsp // ./boolOsc2 dt1 = int(hslider("dt1",0,0,1,0) * ma.SR); dt2 = int(hslider("dt2",0,0,1,0) * ma.SR); // mono out process = bit.bool_osc2(dt1, dt2);
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/examples/_sc/boolOsc2.dsp
faust
SuperCollider CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix boolOsc2.dsp plot CXXFLAGS="-I ../include" faust2csvplot -I ../lib boolOsc2.dsp ./boolOsc2 -n 10 compile CXXFLAGS="-I ../../../include" faust2caqt -I ../lib boolOsc2.dsp ./boolOsc2 mono out
declare name "boolOsc2"; declare description "bool_osc_0 - example"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); bit = library("bitDSP.lib"); dt1 = int(hslider("dt1",0,0,1,0) * ma.SR); dt2 = int(hslider("dt2",0,0,1,0) * ma.SR); process = bit.bool_osc2(dt1, dt2);
e3079457d2410632da3a4d43390890865233c90af7963893ff3cc775117b960c
rottingsounds/bitDSP-faust
lfsr.dsp
declare name "LFSR"; declare author "Till Bovermann"; declare description "linear feedback shift register example"; declare reference "http://rottingsounds.org"; // compute lfsr on an n-bit integer bitset (assuming it to be unsigned, [0 < n <= 32] ). // see https://en.wikipedia.org/wiki/Linear-feedback_shift_register import("stdfaust.lib"); bit32 = library("bitDSP_int32.lib"); // SuperCollider // CXXFLAGS="-I ../../../../include" faust2supercollider -d -I ../lib -noprefix lfsr32.dsp // plot // CXXFLAGS="-I ../include" faust2csvplot -I ../lib lfsr.dsp // ./lfsr -n 10 // compile // CXXFLAGS="-I ../../../include" faust2caqt -I ../lib lfsr.dsp // // open lfsr.app dac_bits = int(nentry("dacBits",1,1,32,1)); dac_offset = min(int(nentry("dacOffset",0,0,31,1)), 32-dac_bits); // how many bits the LFSR runs on (1-32) lfsr_num_bits = int(nentry("lfsrBits",1,1,32,1)); // initial state of the LFSR as 32bit (!=0) // change to reset LFSR to start with that new value lfsr_init_state = nentry("init",1,1,492000,1); lfsr_parity_mask = bit32.bit_mask( par(i,32, nentry("pBit%i",i,0,31,1) ) ); // lfsr = ( // bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state), // bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state + 1) // ); lfsr = bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state); // select which bit range should be used to create the PCM signal process = lfsr : par(i, outputs(lfsr), bit32.bitDAC(dac_offset, dac_bits));
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/examples/_sc/lfsr.dsp
faust
compute lfsr on an n-bit integer bitset (assuming it to be unsigned, [0 < n <= 32] ). see https://en.wikipedia.org/wiki/Linear-feedback_shift_register SuperCollider CXXFLAGS="-I ../../../../include" faust2supercollider -d -I ../lib -noprefix lfsr32.dsp plot CXXFLAGS="-I ../include" faust2csvplot -I ../lib lfsr.dsp ./lfsr -n 10 compile CXXFLAGS="-I ../../../include" faust2caqt -I ../lib lfsr.dsp // open lfsr.app how many bits the LFSR runs on (1-32) initial state of the LFSR as 32bit (!=0) change to reset LFSR to start with that new value lfsr = ( bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state), bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state + 1) ); select which bit range should be used to create the PCM signal
declare name "LFSR"; declare author "Till Bovermann"; declare description "linear feedback shift register example"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); bit32 = library("bitDSP_int32.lib"); dac_bits = int(nentry("dacBits",1,1,32,1)); dac_offset = min(int(nentry("dacOffset",0,0,31,1)), 32-dac_bits); lfsr_num_bits = int(nentry("lfsrBits",1,1,32,1)); lfsr_init_state = nentry("init",1,1,492000,1); lfsr_parity_mask = bit32.bit_mask( par(i,32, nentry("pBit%i",i,0,31,1) ) ); lfsr = bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state); process = lfsr : par(i, outputs(lfsr), bit32.bitDAC(dac_offset, dac_bits));
cc161ea792dbc0a9879f5fd82eb89880d6a1945976a4d1b7ddb0001e36df1229
rottingsounds/bitDSP-faust
BoolOscFB.dsp
declare name "BoolOscFB"; declare description "bool_osc FB"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); bit = library("bitDSP.lib"); // SuperCollider // CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix BoolOscFB.dsp // plot // CXXFLAGS="-I ../include" faust2csvplot -I ../lib boolOsc_fb.dsp // ./boolOsc_fb -n 10 // compile // CXXFLAGS="-I ../../../include" faust2caqt -I ../lib boolOsc_fb.dsp // ./boolOsc_fb // bool_osc1(del1, del2) = node1 // letrec { // 'node1 = not(node1 xor node2 & node1) @ max(0, min(ma.SR, del1)); // 'node2 = not(node2 xor node1 xor node2) @ max(0, min(ma.SR, del2)); // } // with { // not(x) = 1 - x; // }; // bool_osc2(del1, del2) = node1 // letrec { // 'node1 = not(node1 & node2) @ max(0, min(ma.SR, del1)); // 'node2 = not(node1 & node2) @ max(0, min(ma.SR, del2)); // } // with { // not(x) = rint(1 - x); // }; // lp1p (Dario) // One-pole lowpass (design by Chamberlin). // // 2 inputs: // CF[n], cut-off frequency in Hz; // x[n]. // // 1 outputs: // y[n], lowpassed x[n]. lp1p(cf, in) = + (in * a0) ~ * (b1) with { a0 = 1 - b1; b1 = exp(w(cf) * -1); w(x) = x * twopi / ma.SR; twopi = 2 * ma.PI; }; // rms (dario) rms(window, in) = in <: * : lp1p(window) : sqrt; // sc-like leakdc leakdc(coef, x) = y letrec { 'y = x - x' + coef * y; }; feedbackOsc(cutoff, dt1, dt2, leakcoef, att,rel) = loop ~ (_, _) with { loop(fb1, fb2) = bit.bool_osc1(amp(fb2), amp(fb1))@(dt1), (bit.bool_osc2(amp(fb1), amp(fb2))@(dt2)); rmsN(sig) = leakdc(leakcoef, rms(cutoff, sig)); amp(sig) = 40 * leakdc(leakcoef, sig) : an.amp_follower_ud(att,rel); // amp(sig) = leakdc(leakcoef, sig) : an.amp_follower(att); }; dt1 = hslider("dt1",0,0,20000,1); dt2 = hslider("dt2",0,0,20000,1); cutoff = hslider("cutoff",100,100,1000,0); leakcoef = hslider("leakcoef",0.99,0.99, 1, 0.000001); att = hslider("att",0,0, 1, 0.000001); rel = hslider("rel",0,0, 1, 0.000001); // stereo out process = feedbackOsc(cutoff, dt1, dt2, leakcoef, att, rel); // process = leakdc(leakcoef, os.impulse);
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/examples/_sc/BoolOscFB.dsp
faust
SuperCollider CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix BoolOscFB.dsp plot CXXFLAGS="-I ../include" faust2csvplot -I ../lib boolOsc_fb.dsp ./boolOsc_fb -n 10 compile CXXFLAGS="-I ../../../include" faust2caqt -I ../lib boolOsc_fb.dsp ./boolOsc_fb bool_osc1(del1, del2) = node1 letrec { 'node1 = not(node1 xor node2 & node1) @ max(0, min(ma.SR, del1)); 'node2 = not(node2 xor node1 xor node2) @ max(0, min(ma.SR, del2)); } with { not(x) = 1 - x; }; bool_osc2(del1, del2) = node1 letrec { 'node1 = not(node1 & node2) @ max(0, min(ma.SR, del1)); 'node2 = not(node1 & node2) @ max(0, min(ma.SR, del2)); } with { not(x) = rint(1 - x); }; lp1p (Dario) One-pole lowpass (design by Chamberlin). 2 inputs: CF[n], cut-off frequency in Hz; x[n]. 1 outputs: y[n], lowpassed x[n]. rms (dario) sc-like leakdc amp(sig) = leakdc(leakcoef, sig) : an.amp_follower(att); stereo out process = leakdc(leakcoef, os.impulse);
declare name "BoolOscFB"; declare description "bool_osc FB"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); bit = library("bitDSP.lib"); lp1p(cf, in) = + (in * a0) ~ * (b1) with { a0 = 1 - b1; b1 = exp(w(cf) * -1); w(x) = x * twopi / ma.SR; twopi = 2 * ma.PI; }; rms(window, in) = in <: * : lp1p(window) : sqrt; leakdc(coef, x) = y letrec { 'y = x - x' + coef * y; }; feedbackOsc(cutoff, dt1, dt2, leakcoef, att,rel) = loop ~ (_, _) with { loop(fb1, fb2) = bit.bool_osc1(amp(fb2), amp(fb1))@(dt1), (bit.bool_osc2(amp(fb1), amp(fb2))@(dt2)); rmsN(sig) = leakdc(leakcoef, rms(cutoff, sig)); amp(sig) = 40 * leakdc(leakcoef, sig) : an.amp_follower_ud(att,rel); }; dt1 = hslider("dt1",0,0,20000,1); dt2 = hslider("dt2",0,0,20000,1); cutoff = hslider("cutoff",100,100,1000,0); leakcoef = hslider("leakcoef",0.99,0.99, 1, 0.000001); att = hslider("att",0,0, 1, 0.000001); rel = hslider("rel",0,0, 1, 0.000001); process = feedbackOsc(cutoff, dt1, dt2, leakcoef, att, rel);
af3dc5426fb20e40a6aee2a79ddee5d551af0f2a1f39aed0192a7a8aef8f89ff
rottingsounds/bitDSP-faust
BoolOscFB1.dsp
declare name "BoolOscFB1"; declare description "bool_osc FB alternative 1"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); // bit = library("bitDSP.lib"); // SuperCollider // CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix BoolOscFB1.dsp // plot // CXXFLAGS="-I ../include" faust2csvplot -I ../lib boolOsc_fb.dsp // ./boolOsc_fb -n 10 // compile // CXXFLAGS="-I ../../../include" faust2caqt -I ../lib boolOsc_fb.dsp // ./boolOsc_fb bool_osc1_mod(del1, del2) = node1 letrec { 'node1 = not(node1 xor node2 & node1) @ min(ma.SR,(del1 % ma.SR)); 'node2 = not(node2 xor node1 xor node2) @ min(ma.SR,(del2 % ma.SR)); } with { not(x) = 1 - x; }; bool_osc2_mod(del1, del2) = node1 letrec { 'node1 = not(node1 & node2) @ min(ma.SR,(del1 % ma.SR)); 'node2 = not(node1 & node2) @ min(ma.SR,(del2 % ma.SR)); } with { not(x) = rint(1 - x); }; oscfb1(leakcoef, bias1, bias2, mod1, mod2) = loop ~ _ with { loop(fb) = bool_osc1_mod( (fb : map(bias1, mod2)), (fb : map(bias2, mod1)) ) : leakdc(leakcoef); }; oscfb2(leakcoef, bias1, bias2, mod1, mod2) = loop ~ _ with { loop(fb) = bool_osc2_mod( (fb : map(bias1, mod1)), (fb : map(bias2, mod2)) ) : leakdc(leakcoef); }; map(bias, scale, in) = max(0, (bias * biasfac) + (scale * in * modfac)) with { biasfac = 15000; modfac = 15000; }; // sc-like leakdc leakdc(coef, x) = y letrec { 'y = x - x' + coef * y; }; // MS processor // ms(x, y, width) = (x + y) * 0.5, (x-y) * 0.5 * width; ms(1, midIn, sideIn) = (midIn + sideIn) * 0.5, (midIn-sideIn) * 0.5; ms(width, midIn, sideIn) = (mid + side) * 0.5, (mid-side) * 0.5 with { mid = midIn; side = sideIn * width; }; rotate2(r, x, y) = xout, yout with { xout = cos(r) * x + sin(r) * y; yout = cos(r) * y - sin(r) * x; }; // stereo out process = oscfb1(leakcoef, bias1, bias2, mod1, mod2), oscfb2(leakcoef, bias1, bias2, mod1, mod2) : leak : rotate2(rot) : ms(1) : ms(width) : vca(distort) : tanh : vca(amp) : fi.lowpass(lporder, lpfreq), fi.lowpass(lporder, lpfreq) <: si.bus(2) with { distort = hslider("m_distort[scale:exp]", 1, 1, 100, 0.001) : si.smoo; amp = hslider("m_amp", 0, 0, 4, 0.001) : si.smoo; width = hslider("m_width", 0, 0, 1, 0.001) : si.smoo; rot = hslider("m_rot", 0, 0, 1, 0.001) : si.smoo * ma.PI; lpfreq = hslider("m_lpfreq[scale:exp]", 2400, 10, 20000, 1) : si.smoo; coef_in = hslider("d_leak", 0, 0, 1, 0.0001) : si.smoo; leakcoef = 1 - (coef_in * 0.001); mod1 = hslider("d_mod1[scale:exp]", 0.0001, 0.0001, 1, 0.00001) : si.smoo; mod2 = hslider("d_mod2[scale:exp]", 0.0001, 0.0001, 1, 0.00001) : si.smoo; bias1 = hslider("d_bias1[scale:exp]", 0.0001, 0.0001, 1, 0.00001) : si.smoo; bias2 = hslider("d_bias2[scale:exp]", 0.0001, 0.0001, 1, 0.00001) : si.smoo; lporder = 4; tanh = ma.tanh(_), ma.tanh(_); leak = leakdc(0.999), leakdc(0.999); vca(amp) = _ * amp, _ * amp; }; // process = ma.SR / 100000;
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/examples/_sc/BoolOscFB1.dsp
faust
bit = library("bitDSP.lib"); SuperCollider CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix BoolOscFB1.dsp plot CXXFLAGS="-I ../include" faust2csvplot -I ../lib boolOsc_fb.dsp ./boolOsc_fb -n 10 compile CXXFLAGS="-I ../../../include" faust2caqt -I ../lib boolOsc_fb.dsp ./boolOsc_fb sc-like leakdc MS processor ms(x, y, width) = (x + y) * 0.5, (x-y) * 0.5 * width; stereo out process = ma.SR / 100000;
declare name "BoolOscFB1"; declare description "bool_osc FB alternative 1"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); bool_osc1_mod(del1, del2) = node1 letrec { 'node1 = not(node1 xor node2 & node1) @ min(ma.SR,(del1 % ma.SR)); 'node2 = not(node2 xor node1 xor node2) @ min(ma.SR,(del2 % ma.SR)); } with { not(x) = 1 - x; }; bool_osc2_mod(del1, del2) = node1 letrec { 'node1 = not(node1 & node2) @ min(ma.SR,(del1 % ma.SR)); 'node2 = not(node1 & node2) @ min(ma.SR,(del2 % ma.SR)); } with { not(x) = rint(1 - x); }; oscfb1(leakcoef, bias1, bias2, mod1, mod2) = loop ~ _ with { loop(fb) = bool_osc1_mod( (fb : map(bias1, mod2)), (fb : map(bias2, mod1)) ) : leakdc(leakcoef); }; oscfb2(leakcoef, bias1, bias2, mod1, mod2) = loop ~ _ with { loop(fb) = bool_osc2_mod( (fb : map(bias1, mod1)), (fb : map(bias2, mod2)) ) : leakdc(leakcoef); }; map(bias, scale, in) = max(0, (bias * biasfac) + (scale * in * modfac)) with { biasfac = 15000; modfac = 15000; }; leakdc(coef, x) = y letrec { 'y = x - x' + coef * y; }; ms(1, midIn, sideIn) = (midIn + sideIn) * 0.5, (midIn-sideIn) * 0.5; ms(width, midIn, sideIn) = (mid + side) * 0.5, (mid-side) * 0.5 with { mid = midIn; side = sideIn * width; }; rotate2(r, x, y) = xout, yout with { xout = cos(r) * x + sin(r) * y; yout = cos(r) * y - sin(r) * x; }; process = oscfb1(leakcoef, bias1, bias2, mod1, mod2), oscfb2(leakcoef, bias1, bias2, mod1, mod2) : leak : rotate2(rot) : ms(1) : ms(width) : vca(distort) : tanh : vca(amp) : fi.lowpass(lporder, lpfreq), fi.lowpass(lporder, lpfreq) <: si.bus(2) with { distort = hslider("m_distort[scale:exp]", 1, 1, 100, 0.001) : si.smoo; amp = hslider("m_amp", 0, 0, 4, 0.001) : si.smoo; width = hslider("m_width", 0, 0, 1, 0.001) : si.smoo; rot = hslider("m_rot", 0, 0, 1, 0.001) : si.smoo * ma.PI; lpfreq = hslider("m_lpfreq[scale:exp]", 2400, 10, 20000, 1) : si.smoo; coef_in = hslider("d_leak", 0, 0, 1, 0.0001) : si.smoo; leakcoef = 1 - (coef_in * 0.001); mod1 = hslider("d_mod1[scale:exp]", 0.0001, 0.0001, 1, 0.00001) : si.smoo; mod2 = hslider("d_mod2[scale:exp]", 0.0001, 0.0001, 1, 0.00001) : si.smoo; bias1 = hslider("d_bias1[scale:exp]", 0.0001, 0.0001, 1, 0.00001) : si.smoo; bias2 = hslider("d_bias2[scale:exp]", 0.0001, 0.0001, 1, 0.00001) : si.smoo; lporder = 4; tanh = ma.tanh(_), ma.tanh(_); leak = leakdc(0.999), leakdc(0.999); vca(amp) = _ * amp, _ * amp; };
77864491586143a53df1d9dc111d36eb9d855526f54565e922dafe2cb5521e8e
rottingsounds/bitDSP-faust
BoolOscFB3.dsp
declare name "BoolOscFB1"; declare description "bool_osc FB alternative 1"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); // bit = library("bitDSP.lib"); // SuperCollider // CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix BoolOscFB1.dsp // plot // CXXFLAGS="-I ../include" faust2csvplot -I ../lib boolOsc_fb.dsp // ./boolOsc_fb -n 10 // compile // CXXFLAGS="-I ../../../include" faust2caqt -I ../lib boolOsc_fb.dsp // ./boolOsc_fb // sc-type mod (always >= 0) mod(a, 0) = 0; mod(a, b) = ba.if(a > 0, a % b, a % b + b); bool_osc1_mod(d1, d2) = node1 letrec { 'node1 = not(node1 xor node2 & node1) @ min(ma.SR,mod(d1, ma.SR)); 'node2 = not(node2 xor node1 xor node2) @ min(ma.SR,mod(d2, ma.SR)); } with { not(x) = rint(1 - x); }; bool_osc2_mod(d1, d2) = node1 letrec { 'node1 = not(node1 & node2) @ min(ma.SR,mod(d1, ma.SR)); 'node2 = not(node1 & node2) @ min(ma.SR,mod(d2, ma.SR)); } with { not(x) = rint(1 - x); }; // bitrot(noise, chance, type) = _ <: select3(type-1, low(noise, chance, _), flip(noise, chance, _), high(noise, chance, _)) with { // low(noise, chance, x) = select2(coin(noise, chance), x, 0); // high(noise, chance, x) = select2(coin(noise, chance), x, 1); // flip(noise, chance, x) = select2(coin(noise, chance), x, 1-x); // coin(noise, chance) = noise < chance; // }; // rms (dario) rms(window, in) = in <: * : lp1p(window) : sqrt with { // lp1p (Dario) // One-pole lowpass (design by Chamberlin). lp1p(cf, in) = + (in * a0) ~ * (b1) with { a0 = 1 - b1; b1 = exp(w(cf) * -1); w(x) = x * twopi / ma.SR; twopi = 2 * ma.PI; }; }; // sc-like leakdc leakdc(coef, x) = y letrec { 'y = x - x' + coef * y; }; selectx(which, x, y) = (which * x) + ((1-which) * y); // MS processor ms(width, x, y) = (x + y) * 0.5, (x-y) * 0.5 * width; coef_in = hslider("coefIn", 0, 0, 1, 0.0001) : si.smoo; d11bias = hslider("d11bias", 24, 0, 2000, 1); d11 = hslider("d11", 95/1000, 0, 1, 0.0001) : si.smoo; d12bias = hslider("d12bias", 49, 0, 2000, 1); d12 = hslider("d12", 116/1000, 0, 1, 0.0001) : si.smoo; d21bias = hslider("d21bias", 24, 0, 2000, 1); d21 = hslider("d21", 95/1000, 0, 1, 0.0001) : si.smoo; d22bias = hslider("d22bias", 49, 0, 2000, 1); d22 = hslider("d22", 116/1000, 0, 1, 0.0001) : si.smoo; lpfreq = hslider("lpfreq", 2400, 0, 10000, 1) : si.smoo; lporder = 5; // low=pass order amp = hslider("amp", 0, 0, 1, 0.01) : si.smoo; xfb = hslider("xfb", 0, 0, 1, 0.01) : si.smoo; // d1 = 0.03843526787654; // d2 = 0.421234567658; // d1off = 280; // d2off = 334; // stereo out process = oscfb(leakcoef, xfb, d11bias, d11, d12bias, d12, d21bias, d21, d22bias, d22) : leakdc(0.99999), leakdc(0.99999) : ms(1) : fi.lowpass(lporder, lpfreq), fi.lowpass(lporder, lpfreq) : _ * amp, _ * amp with { leakcoef = 1 - ((1-coef_in) * 0.0001); oscfb(leakcoef, xfb, d11bias, d11, d12bias, d12, d21bias, d21, d22bias, d22) = (loop ~ (_, _)) with { loop(fb1, fb2) = loop1( selectx(xfb, fb1, fb2), leakcoef, d11bias, d11, d12bias, d12 ), loop2( selectx(xfb, fb2, fb1), leakcoef, d21bias, d21, d22bias, d22 ); loop1(fb, coef, d1off, d1, d2off, d2) = bool_osc1_mod( max(0, d1off + (fb * 5000 * d1)), max(0, d2off + (fb * 5000 * d2)) ) : leakdc(coef); loop2(fb, coef, d1off, d1, d2off, d2) = bool_osc2_mod( max(0, d1off + (fb * 5000 * d1)), max(0, d2off + (fb * 5000 * d2)) ) : leakdc(coef); }; };
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/c436ecad29c57d46d5e3e59110c25e71a3761fc5/synths/BoolOscFB3.dsp
faust
bit = library("bitDSP.lib"); SuperCollider CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix BoolOscFB1.dsp plot CXXFLAGS="-I ../include" faust2csvplot -I ../lib boolOsc_fb.dsp ./boolOsc_fb -n 10 compile CXXFLAGS="-I ../../../include" faust2caqt -I ../lib boolOsc_fb.dsp ./boolOsc_fb sc-type mod (always >= 0) bitrot(noise, chance, type) = _ <: select3(type-1, low(noise, chance, _), flip(noise, chance, _), high(noise, chance, _)) with { low(noise, chance, x) = select2(coin(noise, chance), x, 0); high(noise, chance, x) = select2(coin(noise, chance), x, 1); flip(noise, chance, x) = select2(coin(noise, chance), x, 1-x); coin(noise, chance) = noise < chance; }; rms (dario) lp1p (Dario) One-pole lowpass (design by Chamberlin). sc-like leakdc MS processor low=pass order d1 = 0.03843526787654; d2 = 0.421234567658; d1off = 280; d2off = 334; stereo out
declare name "BoolOscFB1"; declare description "bool_osc FB alternative 1"; declare author "Till Bovermann"; declare reference "http://rottingsounds.org"; import("stdfaust.lib"); mod(a, 0) = 0; mod(a, b) = ba.if(a > 0, a % b, a % b + b); bool_osc1_mod(d1, d2) = node1 letrec { 'node1 = not(node1 xor node2 & node1) @ min(ma.SR,mod(d1, ma.SR)); 'node2 = not(node2 xor node1 xor node2) @ min(ma.SR,mod(d2, ma.SR)); } with { not(x) = rint(1 - x); }; bool_osc2_mod(d1, d2) = node1 letrec { 'node1 = not(node1 & node2) @ min(ma.SR,mod(d1, ma.SR)); 'node2 = not(node1 & node2) @ min(ma.SR,mod(d2, ma.SR)); } with { not(x) = rint(1 - x); }; rms(window, in) = in <: * : lp1p(window) : sqrt with { lp1p(cf, in) = + (in * a0) ~ * (b1) with { a0 = 1 - b1; b1 = exp(w(cf) * -1); w(x) = x * twopi / ma.SR; twopi = 2 * ma.PI; }; }; leakdc(coef, x) = y letrec { 'y = x - x' + coef * y; }; selectx(which, x, y) = (which * x) + ((1-which) * y); ms(width, x, y) = (x + y) * 0.5, (x-y) * 0.5 * width; coef_in = hslider("coefIn", 0, 0, 1, 0.0001) : si.smoo; d11bias = hslider("d11bias", 24, 0, 2000, 1); d11 = hslider("d11", 95/1000, 0, 1, 0.0001) : si.smoo; d12bias = hslider("d12bias", 49, 0, 2000, 1); d12 = hslider("d12", 116/1000, 0, 1, 0.0001) : si.smoo; d21bias = hslider("d21bias", 24, 0, 2000, 1); d21 = hslider("d21", 95/1000, 0, 1, 0.0001) : si.smoo; d22bias = hslider("d22bias", 49, 0, 2000, 1); d22 = hslider("d22", 116/1000, 0, 1, 0.0001) : si.smoo; lpfreq = hslider("lpfreq", 2400, 0, 10000, 1) : si.smoo; amp = hslider("amp", 0, 0, 1, 0.01) : si.smoo; xfb = hslider("xfb", 0, 0, 1, 0.01) : si.smoo; process = oscfb(leakcoef, xfb, d11bias, d11, d12bias, d12, d21bias, d21, d22bias, d22) : leakdc(0.99999), leakdc(0.99999) : ms(1) : fi.lowpass(lporder, lpfreq), fi.lowpass(lporder, lpfreq) : _ * amp, _ * amp with { leakcoef = 1 - ((1-coef_in) * 0.0001); oscfb(leakcoef, xfb, d11bias, d11, d12bias, d12, d21bias, d21, d22bias, d22) = (loop ~ (_, _)) with { loop(fb1, fb2) = loop1( selectx(xfb, fb1, fb2), leakcoef, d11bias, d11, d12bias, d12 ), loop2( selectx(xfb, fb2, fb1), leakcoef, d21bias, d21, d22bias, d22 ); loop1(fb, coef, d1off, d1, d2off, d2) = bool_osc1_mod( max(0, d1off + (fb * 5000 * d1)), max(0, d2off + (fb * 5000 * d2)) ) : leakdc(coef); loop2(fb, coef, d1off, d1, d2off, d2) = bool_osc2_mod( max(0, d1off + (fb * 5000 * d1)), max(0, d2off + (fb * 5000 * d2)) ) : leakdc(coef); }; };
acde87b5a36b3a67b65ae0f1400d4da53215211b0134b75ad53d972f674cda48
rottingsounds/bitDSP-faust
BASP.dsp
/******************************************************************************* * BASP is a project for the creative use of bitstream musical DSP in Faust. * The work relies on a several library modules developed over almost a year * by Dario Sanfilippo and Till Bovermann. The library includes standard * functions for delta-sigma modulation and processing as well as original * algorithms for information processing and audio manipulation. * Part of the library modules are described in the following publication: * https://ifc20.sciencesconf.org/332745/document. * * The code below was developed by Dario Sanfilippo and it is a music * piece based on an adaptive, self-organising bitstream network. The work * includes four interdependent adaptive agents deploying different * techniques for the analysis, adaptation, and manipulation of single-bit * audio streams. * * Specifically, the adaptation infrastructure includes * statistical samplewise processing for the measurement of polarity * tendency, and an experimental algorithm for the approximation of * noisiness through fixed-latency autocorrelation. The adaptation mechanisms * operate both at timbral and formal time-scales for short and long-term * evolutions, and deploy hysteresis for low and high-level activation * functions for enhanced complexity. * * The algorithms for audio generation and manupilation include chaotic * self-oscillating systems based on bitwise operations, cross-coupled * delta-sigma filters, and nonlinear distortion through bitstream * audio pattern-matching. * * Even though the system has been designed to operate autonomously, the * user interface provides parameters to alter the adaptation infrustructure * to experience the work through different self-organising dynamics. * * PARAMETERS: * * - Gate de/activation rate (.001-.125 Hz): this parameter affects * affects the responsiveness of the statistical analysis that opens * and closes the outputs of the individual agents. The collective * behaviour of this gating de/activation results in an autonomous * regulation of the agents' presence over time. * * - Stepped changes rate (.001-.125 Hz): this parameter affects the * responsiveness of the adaptation mechanism dedicated to stepped * self-modulation. The input of each agent is analysed and the condition * to trigger a new parameter is given by a change of direction of the * signal, whereas the target value is determined by a time-variant * function that is given by integration of the magnitude of the * derivative. * * - Continuous changes rate (.001-.125 Hz): this parameter sets the * cut-off of a set of cascaded one-pole lowpass filters that act upon * the input signal of each agent. Slow cut-off values result in slower * continuous variations of the parameters, as the derivartive of the * input is decreased. * * - On/Off relay threshold: - these parameters set the lower and upper * boundaries of a one-bit hysteresis function, that is the deactivation * and activation thresholds, respectively. This hysteresis function * controls the parameter self-modulation modality: stepped, or continuous. * *******************************************************************************/ import("stdfaust.lib"); declare name "BASP – Boolean Audio Signal Processing"; declare author "Dario Sanfilippo"; declare copyright "Copyright (C) 2021 Dario Sanfilippo <[email protected]>"; declare version "1.0"; declare license "MIT license"; bit = library("bitDSP.lib"); gen = library("bitDSP_gen.lib"); vol = hslider("[05]Vol", 0, 0, 1, .000001); stmix = si.bus(8) : par(i, 8, bit.meter(i, -60, 0)) :> si.bus(2) : par(i, 2, /(4) : bit.onebit2mbit * vol); gates = par(i, 8, bit.autogate(gate_rate)); params = par(i, 2, bit.autoparam(step_rate, incr_rate, alpha, beta) + init); init = .1890809373898301; gate_rate = hslider("[00]Gate de/activation rate (.001-.125 Hz)", .01, .001, .125, .000001); step_rate = hslider("[01]Stepped changes rate (.001-.125 Hz)", .01, .001, .125, .000001); incr_rate = hslider("[02]Continuous changes rate (.001-.125 Hz)", .01, .001, .125, .000001); alpha = hslider("[03]Off relay threshold", .3, 0, 1, .000001); beta = hslider("[04]On relay threshold", .7, 0, 1, .000001); circular = route(8, 8, (1,3), (2,4), (3,5), (4,6), (5,7), (6,8), (7,1), (8,2)); agent1 = params : gen.gen1; agent2 = params : gen.gen2; agent3 = params : gen.gen3; agent4 = params : gen.gen4; network = ( agent1 , agent2 , agent3 , agent4) ~ circular : gates : stmix; process = network;
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/c436ecad29c57d46d5e3e59110c25e71a3761fc5/works/BASP.dsp
faust
****************************************************************************** * BASP is a project for the creative use of bitstream musical DSP in Faust. * The work relies on a several library modules developed over almost a year * by Dario Sanfilippo and Till Bovermann. The library includes standard * functions for delta-sigma modulation and processing as well as original * algorithms for information processing and audio manipulation. * Part of the library modules are described in the following publication: * https://ifc20.sciencesconf.org/332745/document. * * The code below was developed by Dario Sanfilippo and it is a music * piece based on an adaptive, self-organising bitstream network. The work * includes four interdependent adaptive agents deploying different * techniques for the analysis, adaptation, and manipulation of single-bit * audio streams. * * Specifically, the adaptation infrastructure includes * statistical samplewise processing for the measurement of polarity * tendency, and an experimental algorithm for the approximation of * noisiness through fixed-latency autocorrelation. The adaptation mechanisms * operate both at timbral and formal time-scales for short and long-term * evolutions, and deploy hysteresis for low and high-level activation * functions for enhanced complexity. * * The algorithms for audio generation and manupilation include chaotic * self-oscillating systems based on bitwise operations, cross-coupled * delta-sigma filters, and nonlinear distortion through bitstream * audio pattern-matching. * * Even though the system has been designed to operate autonomously, the * user interface provides parameters to alter the adaptation infrustructure * to experience the work through different self-organising dynamics. * * PARAMETERS: * * - Gate de/activation rate (.001-.125 Hz): this parameter affects * affects the responsiveness of the statistical analysis that opens * and closes the outputs of the individual agents. The collective * behaviour of this gating de/activation results in an autonomous * regulation of the agents' presence over time. * * - Stepped changes rate (.001-.125 Hz): this parameter affects the * responsiveness of the adaptation mechanism dedicated to stepped * self-modulation. The input of each agent is analysed and the condition * to trigger a new parameter is given by a change of direction of the * signal, whereas the target value is determined by a time-variant * function that is given by integration of the magnitude of the * derivative. * * - Continuous changes rate (.001-.125 Hz): this parameter sets the * cut-off of a set of cascaded one-pole lowpass filters that act upon * the input signal of each agent. Slow cut-off values result in slower * continuous variations of the parameters, as the derivartive of the * input is decreased. * * - On/Off relay threshold: - these parameters set the lower and upper * boundaries of a one-bit hysteresis function, that is the deactivation * and activation thresholds, respectively. This hysteresis function * controls the parameter self-modulation modality: stepped, or continuous. * ******************************************************************************
import("stdfaust.lib"); declare name "BASP – Boolean Audio Signal Processing"; declare author "Dario Sanfilippo"; declare copyright "Copyright (C) 2021 Dario Sanfilippo <[email protected]>"; declare version "1.0"; declare license "MIT license"; bit = library("bitDSP.lib"); gen = library("bitDSP_gen.lib"); vol = hslider("[05]Vol", 0, 0, 1, .000001); stmix = si.bus(8) : par(i, 8, bit.meter(i, -60, 0)) :> si.bus(2) : par(i, 2, /(4) : bit.onebit2mbit * vol); gates = par(i, 8, bit.autogate(gate_rate)); params = par(i, 2, bit.autoparam(step_rate, incr_rate, alpha, beta) + init); init = .1890809373898301; gate_rate = hslider("[00]Gate de/activation rate (.001-.125 Hz)", .01, .001, .125, .000001); step_rate = hslider("[01]Stepped changes rate (.001-.125 Hz)", .01, .001, .125, .000001); incr_rate = hslider("[02]Continuous changes rate (.001-.125 Hz)", .01, .001, .125, .000001); alpha = hslider("[03]Off relay threshold", .3, 0, 1, .000001); beta = hslider("[04]On relay threshold", .7, 0, 1, .000001); circular = route(8, 8, (1,3), (2,4), (3,5), (4,6), (5,7), (6,8), (7,1), (8,2)); agent1 = params : gen.gen1; agent2 = params : gen.gen2; agent3 = params : gen.gen3; agent4 = params : gen.gen4; network = ( agent1 , agent2 , agent3 , agent4) ~ circular : gates : stmix; process = network;
e3653ca9b15baca8b24a1f4c8ea8df808ab75f97b5b6190b49933b6c2f22569f
rottingsounds/bitDSP-faust
rbn.dsp
// ============================================================================= // Preliminary tests for random Boolean networks. // reference paper: https://arxiv.org/pdf/0706.3351v2.pdf // quick introduction: http://www.complexityexplorer.org/system/explore/models/writeup_files/000/000/040/original/random-boolean.pdf // ============================================================================= declare author "Dario Sanfilippo"; declare copyright "Copyright (C) 2020 Dario Sanfilippo <[email protected]>"; declare lcg_par license "GPL v3 license"; import("stdfaust.lib"); // AUXILIARY FUNCTIONS //------------------------------------------------------------------------------ // Linear congruential generator for streams of integer values based on // the equation: y[n] = (A * y[n - 1] + C) % M. // See https://en.wikipedia.org/wiki/Linear_congruential_generator. // // For a period-(M-1) LCG, with C != 0, we must satisfy the following conditions: // // 1: M and C are relatively prime, // 2: A-1 is divisible by all prime factors of M, // 3: A-1 is divisible by 4 if M is divisible by 4. // // This way, full-period cycles are guaranteed with any seeds != 0. // // For example, we can use lcg(14, 15, 5, S) to select the update functions // with uniform probability. // // For power-of-two Ms, C should be coprime to M and A should 1+4K, where K // is an int, to have a full-cycle LCG. // // #### Usage // // ```` // lcg(M, A, C, S) : _ // ```` // // Where: // // * M is the divisor in the modulo operation. // * A is the multiplier. // * C is the offset. // * S is the seed. // // #### Reference: // // L’ecuyer, P. (1999). Tables of linear congruential generators of different // sizes and good lattice structure. Mathematics of Computation, 68(225), // 249-260. // // Steele, G., & Vigna, S. (2020). Computationally easy, spectrally good // multipliers for congruential pseudorandom number generators. arXiv // preprint arXiv:2001.05304. // lcg(M, A, C, S) = ((+ (S - S') * A + C) % M) ~ _; //------------------------------------------------------------------------------ // ----------------------------------------------------------------------------- // Linear congruential list generator // lcg_par(1, M, A, C, S) = (A * S + C) % M; lcg_par(N, M, A, C, S) = (A * S + C) % M , lcg_par(N - 1, M, A, C, (A * S + C) % M); // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // Negation for single-digit binary values. // not(N) = rint(1 - N); // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // UPDATE FUNCTIONS // The input cases for K = 2 (i.e., two-input genes) are: 00 - 01 - 10 - 11. // Four input cases and binary updates, hence 2^4 update functions. // The update functions below determine the next state of each gene depending // on the inputs. // The 'frozen' update functions 1111 and 0000 are not considered. // uf(1) = &; // 0001 uf(2) = si.bus(2) <: uf(3) & uf(6); // 0010 uf(3) = _ , (_ : !); // 0011 uf(4) = si.bus(2) <: uf(6) & uf(12); // 0100 uf(5) = (_ : !) , _; // 0101 uf(6) = xor; // 0110 uf(7) = |; // 0111 uf(8) = not(|); // 1000 uf(9) = not(xor); // 1001 uf(10) = not(uf(5)); // 1010 uf(12) = not(uf(3)); // 1100 uf(11) = not(uf(4)); // 1011 uf(13) = not(uf(2)); // 1101 uf(14) = not(&); // 1110 // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // This function creates a list with the digits of an integer number. // digits_par(0) = 0 : !; digits_par(N) = digits_par(int(N / 10)) , N % 10; // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // This function converts from binary to decimal. // bin2dec(0) = 0; bin2dec(B) = digits_par(B) : par(i, elem, *(2 ^ (elem - (i + 1)))) :> _ with { elem = outputs(digits_par(B)); }; // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // Genes array generation through randomly chosen update functions. // This function takes an int, N, indicating the array size, and a seed, S, for // an LCG function that generates N seeds for N LCG functions. // The gene selection has a uniform probability distribution p = 1/14. // Roughly, the given seed should be a positive int between 1 and 2^16. // genes(N, S) = par(i, N, uf(lcg_par(1, 14, 15, 5, ba.take(i + 1, seeds) + 1) + 1)) with { seeds = lcg_par(N, 65521, 17364, 0, S); }; // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // This function generates uniformely distributed (or almost) positive random // ints between 0 and M-1. The function also takes a seed, S. // rand_int(M, S) = abs(random) % M with { mask = 4294967295; // 2^32-1 random = (+(S) : *(1103515245) & mask) ~ _; // "linear congruential" }; // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // This recursive function generates a gene with arbitrary K (inputs) based on // a seed between 1 and 2^16, roughly. The genes are generated as homogeneous // combinations of the 14 K=2 update functions defined above. // gene(2, S) = uf(ba.take(1, org) + 1) with { org = lcg_par(1, 14, 15, 5, S); }; gene(K, S) = uf(ba.take(K - 1, org) + 1, gene(K - 1, S)) with { org = lcg_par(K - 1, 14, 15, 5, S); }; // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // This function generates a genes array of size N with arbitrary K based on // a seed between 1 and 2^16, roughly. // genes2(N, K, S) = par(i, N, gene(K, ba.take(i + 1, seeds) + 1)) with { seeds = lcg_par(N, 65521, 17364, 0, S); }; // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // This function creates a list of N elements with random ints between // 0 and M-1. The function also takes increment (C) and seed parameters (S). // The increment should be odd to increase uniformity. // rand_int_par(1, M, C, S) = (S + C) * 1103515245 & 4294967295 : abs : %(M); rand_int_par(N, M, C, S) = (S + C) * 1103515245 & 4294967295 : abs : %(M) , rand_int_par(N - 1, M, C, (S + C) * 1103515245 & 4294967295); // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // Topology selection for genes interactions. This function takes an int, N, // representing the order of the network, the inputs number in each gene, K, // and a seed, S. The function generates homogeneous topologies, that is, // genes interactions where individual gene contributions are equally but // randomly distributed throughout the network. N and K should be pow-of-2 // for maximum homogeneity. // The seed should be a positive int roughly below 2^16. // topology(N, K, S) = si.bus(N) <: par(i, N * K, si.bus(N) <: ba.selector(ba.take(i + 1, routes), N * K)) with { routes = lcg_par(N * K, N * K, 5, 15, S); }; // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // Random Boolean networks generator. The function takes four ints, N, K, S_1, // and S_2, respectively for the network order (pow-of-2), genes inputs, // the seed for the genes array, the seed for the topology type, and a list // of numbers determining the delays in samples for each feedback path. The function also // provides a slider to expand or compress the delays. // rbn(N, K, S_1, S_2, del_seq) = genes2(N, K, S_1) ~ (delays(N, del_seq) : topology(N, K, S_2)); // ----------------------------------------------------------------------------- // full_adder(x1[n], x2[n], c_in[n]); ------------------------------------------ // // (author: Dario Sanfilippo) // // Adder for binary values. It adds two operands as well as a carrier // input. It outputs the sum as well as the carrier output. // // 3 inputs: // x1[n], first operand; // x2[n], second operand; // c_in[n], carrier input. // // 2 outputs: // s_out[n], resulting sum; // c_out[n], carrier output. // full_adder(x1, x2, c_in) = s_out , c_out with { s_out = xor(rint(c_in), xor(rint(x1), rint(x2))); c_out = (rint(c_in) & xor(rint(x1), rint(x2))) | (rint(x1) & rint(x2)); }; // ----------------------------------------------------------------------------- // bitstream_adder(x1[n], x2[n]); ---------------------------------------------- // // (author: Dario Sanfilippo) // // Adder for delta-sigma-modulated streams. // // 2 inputs: // x1[n], first bitstream; // x2[n], second bitstream. // // 1 outputs: // y[n], resulting bitstream summation. // bitstream_adder(x1, x2) = loop ~ _ : ! , _ with { loop(fb) = full_adder(x1, x2, fb); }; // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // Binary summing bus of N inputs. // bitstream_adderN(1) = _; bitstream_adderN(2) = bitstream_adder; bitstream_adderN(N) = bitstream_adderN(N - 1) , _ : bitstream_adder; // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // N-delay array. // delays(N, sequence) = par(i, N, rint(de.fdelay(ba.take(i + 1, sequence), abs((ba.take(i + 1, sequence) * factor) % ba.take(i + 1, sequence))))) with { factor = 16 ^ hslider("delays stretching", 0, -1, 1, .001); }; // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // Lists of number sequences for delay lines. // seq_primes = (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53); seq_fibonacci = (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987); seq_hexagonal = (1, 6, 15, 28, 45, 66, 91, 120, 153, 190, 231, 276, 325, 378, 435, 496); seq_lazycaterer = (1, 2, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79, 92, 106, 121); seq_magic = (15, 34, 65, 111, 175, 260, 369, 505, 671, 870, 1105, 1379, 1695, 2056, 2465, 2925); seq_pentagonal = (1, 2, 5, 7, 12, 15, 22, 26, 35, 40, 51, 57, 70, 77, 92, 100); seq_square = (1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256); seq_triangular = (1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136); // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // Process example. // // Try stretch values 0.042 or -0.037. // // N = 8; // K = 8; // process = // rbn(N, K, 316, 153, seq_hexagonal) : par(i, 2, bitstream_adderN(N / 2)); // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // Process example. // N = 16; // genes array size K = 8; // genes input size process = rbn(N, K, 231, 415, seq_fibonacci) : par(i, 2, bitstream_adderN(N / 2)); // -----------------------------------------------------------------------------
https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/c436ecad29c57d46d5e3e59110c25e71a3761fc5/test/rbn.dsp
faust
============================================================================= Preliminary tests for random Boolean networks. reference paper: https://arxiv.org/pdf/0706.3351v2.pdf quick introduction: http://www.complexityexplorer.org/system/explore/models/writeup_files/000/000/040/original/random-boolean.pdf ============================================================================= AUXILIARY FUNCTIONS ------------------------------------------------------------------------------ Linear congruential generator for streams of integer values based on the equation: y[n] = (A * y[n - 1] + C) % M. See https://en.wikipedia.org/wiki/Linear_congruential_generator. For a period-(M-1) LCG, with C != 0, we must satisfy the following conditions: 1: M and C are relatively prime, 2: A-1 is divisible by all prime factors of M, 3: A-1 is divisible by 4 if M is divisible by 4. This way, full-period cycles are guaranteed with any seeds != 0. For example, we can use lcg(14, 15, 5, S) to select the update functions with uniform probability. For power-of-two Ms, C should be coprime to M and A should 1+4K, where K is an int, to have a full-cycle LCG. #### Usage ```` lcg(M, A, C, S) : _ ```` Where: * M is the divisor in the modulo operation. * A is the multiplier. * C is the offset. * S is the seed. #### Reference: L’ecuyer, P. (1999). Tables of linear congruential generators of different sizes and good lattice structure. Mathematics of Computation, 68(225), 249-260. Steele, G., & Vigna, S. (2020). Computationally easy, spectrally good multipliers for congruential pseudorandom number generators. arXiv preprint arXiv:2001.05304. ------------------------------------------------------------------------------ ----------------------------------------------------------------------------- Linear congruential list generator ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Negation for single-digit binary values. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- UPDATE FUNCTIONS The input cases for K = 2 (i.e., two-input genes) are: 00 - 01 - 10 - 11. Four input cases and binary updates, hence 2^4 update functions. The update functions below determine the next state of each gene depending on the inputs. The 'frozen' update functions 1111 and 0000 are not considered. 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1100 1011 1101 1110 ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- This function creates a list with the digits of an integer number. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- This function converts from binary to decimal. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Genes array generation through randomly chosen update functions. This function takes an int, N, indicating the array size, and a seed, S, for an LCG function that generates N seeds for N LCG functions. The gene selection has a uniform probability distribution p = 1/14. Roughly, the given seed should be a positive int between 1 and 2^16. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- This function generates uniformely distributed (or almost) positive random ints between 0 and M-1. The function also takes a seed, S. 2^32-1 "linear congruential" ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- This recursive function generates a gene with arbitrary K (inputs) based on a seed between 1 and 2^16, roughly. The genes are generated as homogeneous combinations of the 14 K=2 update functions defined above. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- This function generates a genes array of size N with arbitrary K based on a seed between 1 and 2^16, roughly. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- This function creates a list of N elements with random ints between 0 and M-1. The function also takes increment (C) and seed parameters (S). The increment should be odd to increase uniformity. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Topology selection for genes interactions. This function takes an int, N, representing the order of the network, the inputs number in each gene, K, and a seed, S. The function generates homogeneous topologies, that is, genes interactions where individual gene contributions are equally but randomly distributed throughout the network. N and K should be pow-of-2 for maximum homogeneity. The seed should be a positive int roughly below 2^16. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Random Boolean networks generator. The function takes four ints, N, K, S_1, and S_2, respectively for the network order (pow-of-2), genes inputs, the seed for the genes array, the seed for the topology type, and a list of numbers determining the delays in samples for each feedback path. The function also provides a slider to expand or compress the delays. ----------------------------------------------------------------------------- full_adder(x1[n], x2[n], c_in[n]); ------------------------------------------ (author: Dario Sanfilippo) Adder for binary values. It adds two operands as well as a carrier input. It outputs the sum as well as the carrier output. 3 inputs: x1[n], first operand; x2[n], second operand; c_in[n], carrier input. 2 outputs: s_out[n], resulting sum; c_out[n], carrier output. ----------------------------------------------------------------------------- bitstream_adder(x1[n], x2[n]); ---------------------------------------------- (author: Dario Sanfilippo) Adder for delta-sigma-modulated streams. 2 inputs: x1[n], first bitstream; x2[n], second bitstream. 1 outputs: y[n], resulting bitstream summation. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Binary summing bus of N inputs. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- N-delay array. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Lists of number sequences for delay lines. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Process example. Try stretch values 0.042 or -0.037. N = 8; K = 8; process = rbn(N, K, 316, 153, seq_hexagonal) : par(i, 2, bitstream_adderN(N / 2)); ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Process example. genes array size genes input size -----------------------------------------------------------------------------
declare author "Dario Sanfilippo"; declare copyright "Copyright (C) 2020 Dario Sanfilippo <[email protected]>"; declare lcg_par license "GPL v3 license"; import("stdfaust.lib"); lcg(M, A, C, S) = ((+ (S - S') * A + C) % M) ~ _; lcg_par(1, M, A, C, S) = (A * S + C) % M; lcg_par(N, M, A, C, S) = (A * S + C) % M , lcg_par(N - 1, M, A, C, (A * S + C) % M); not(N) = rint(1 - N); uf(3) = _ , uf(5) = (_ : !) , digits_par(0) = 0 : !; digits_par(N) = digits_par(int(N / 10)) , N % 10; bin2dec(0) = 0; bin2dec(B) = digits_par(B) : par(i, elem, *(2 ^ (elem - (i + 1)))) :> _ with { elem = outputs(digits_par(B)); }; genes(N, S) = par(i, N, uf(lcg_par(1, 14, 15, 5, ba.take(i + 1, seeds) + 1) + 1)) with { seeds = lcg_par(N, 65521, 17364, 0, S); }; rand_int(M, S) = abs(random) % M with { random = (+(S) : *(1103515245) & mask) }; gene(2, S) = uf(ba.take(1, org) + 1) with { org = lcg_par(1, 14, 15, 5, S); }; gene(K, S) = uf(ba.take(K - 1, org) + 1, gene(K - 1, S)) with { org = lcg_par(K - 1, 14, 15, 5, S); }; genes2(N, K, S) = par(i, N, gene(K, ba.take(i + 1, seeds) + 1)) with { seeds = lcg_par(N, 65521, 17364, 0, S); }; rand_int_par(1, M, C, S) = (S + C) * 1103515245 & 4294967295 : abs : %(M); rand_int_par(N, M, C, S) = (S + C) * 1103515245 & 4294967295 : abs : %(M) , rand_int_par(N - 1, M, C, (S + C) * 1103515245 & 4294967295); topology(N, K, S) = si.bus(N) <: par(i, N * K, si.bus(N) <: ba.selector(ba.take(i + 1, routes), N * K)) with { routes = lcg_par(N * K, N * K, 5, 15, S); }; rbn(N, K, S_1, S_2, del_seq) = genes2(N, K, S_1) ~ (delays(N, del_seq) : topology(N, K, S_2)); full_adder(x1, x2, c_in) = s_out , c_out with { s_out = xor(rint(c_in), xor(rint(x1), rint(x2))); c_out = (rint(c_in) & xor(rint(x1), rint(x2))) | (rint(x1) & rint(x2)); }; bitstream_adder(x1, x2) = loop ~ _ : ! , _ with { loop(fb) = full_adder(x1, x2, fb); }; bitstream_adderN(1) = _; bitstream_adderN(2) = bitstream_adder; bitstream_adderN(N) = bitstream_adderN(N - 1) , _ : bitstream_adder; delays(N, sequence) = par(i, N, rint(de.fdelay(ba.take(i + 1, sequence), abs((ba.take(i + 1, sequence) * factor) % ba.take(i + 1, sequence))))) with { factor = 16 ^ hslider("delays stretching", 0, -1, 1, .001); }; seq_primes = (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53); seq_fibonacci = (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987); seq_hexagonal = (1, 6, 15, 28, 45, 66, 91, 120, 153, 190, 231, 276, 325, 378, 435, 496); seq_lazycaterer = (1, 2, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79, 92, 106, 121); seq_magic = (15, 34, 65, 111, 175, 260, 369, 505, 671, 870, 1105, 1379, 1695, 2056, 2465, 2925); seq_pentagonal = (1, 2, 5, 7, 12, 15, 22, 26, 35, 40, 51, 57, 70, 77, 92, 100); seq_square = (1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256); seq_triangular = (1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136); process = rbn(N, K, 231, 415, seq_fibonacci) : par(i, 2, bitstream_adderN(N / 2));
0f16a86df869072cfc71d2e9c8fe67d7b3926ba4852024012a1f1a71d8b82de0
Sylcantor/wam-web-components
StereoEnhancer.dsp
declare id "panoram_enhancer"; declare name "Panoram Enhancer"; declare shortname "Panoram"; declare category "Misc"; //------------------------------------ //Based at: //ECE542 T. Tran; Rice University; Spring 2005 //"Title: Stereo Enhancement Algorithm" //------------------------------------ import("stdfaust.lib"); //Controls delay_width = hslider("Delay width[name:Delay][tooltip:Delay Width] [style:knob]",0,0,1,0.01):si.smooth(0.999); freq_width = hslider("Frequency width[name:Frequency][tooltip:Frequency Width] [style:knob]",0,0,1,0.01); //Constants dt_max_const = 65536; //Max length of all de.delay lines, to provide 200 ms at 192 kHz dt_max = 0.2 * ma.SR; //Real max length, 200 ms filters_order = 6; //Filters order in filter-banks fmain = 1800; //Main filter fhi f1 = 3600; f2 = 6400; f3 = 20000; //Border freqs of filters in filter-banks freq_shift = 1500; //Filters freq difference between filter-banks fbank_coef_gap = 0.6; //Filters in filter-banks gain coefs min value //Random changed values emulation rv1 = _; rv2 = _*0.7; rv3 = _ + 0.3:sqrt(_); rv4 = _*3.14:sin; rv5 = _*1.23:cos; rv6 = _+9:log10; pa_filter(dt,flo,fhi,coef) = de.fdelay(dt_max_const,dt):fi.highpass(filters_order,flo):fi.lowpass(filters_order,fhi):_*coef; gain_coef = _*(1 - fbank_coef_gap):_+fbank_coef_gap; pa_filter_bank1(delay_width,filter_width) = _<: pa_filter(dt_max:rv1:_*delay_width,fmain,f1,freq_width:rv5:gain_coef), pa_filter(dt_max:rv3:_*delay_width,f1,f2, freq_width:rv2:gain_coef), pa_filter(dt_max:rv2:_*delay_width,f2,f3, freq_width:rv4:gain_coef) :>_; pa_filter_bank2(delay_width,filter_width) = _<: pa_filter(dt_max:rv5:_*delay_width,fmain - freq_shift*freq_width,f1 - freq_shift*freq_width,freq_width:rv3:gain_coef), pa_filter(dt_max:rv1:_*delay_width,f1 - freq_shift*freq_width,f2 - freq_shift*freq_width,freq_width:rv4:gain_coef), pa_filter(dt_max:rv6:_*delay_width,f2 - freq_shift*freq_width,f3 - freq_shift*freq_width,freq_width:rv2:gain_coef) :>_; stereoenhancer = _,_<: pa_filter_bank1(delay_width,freq_width), (_,_:(_*0.5,_*0.5:>fi.lowpass(4,fmain))<:_,_), pa_filter_bank2(delay_width,freq_width) :>_,_; process = ba.bypass_fade(ma.SR/10, checkbox("bypass"), stereoenhancer);
https://raw.githubusercontent.com/Sylcantor/wam-web-components/c54352dae5b80bcf6d8d4c306ea22e2c91a12b08/plugins/StereoEnhancer/StereoEnhancer.dsp
faust
------------------------------------ Based at: ECE542 T. Tran; Rice University; Spring 2005 "Title: Stereo Enhancement Algorithm" ------------------------------------ Controls Constants Max length of all de.delay lines, to provide 200 ms at 192 kHz Real max length, 200 ms Filters order in filter-banks Main filter fhi Border freqs of filters in filter-banks Filters freq difference between filter-banks Filters in filter-banks gain coefs min value Random changed values emulation
declare id "panoram_enhancer"; declare name "Panoram Enhancer"; declare shortname "Panoram"; declare category "Misc"; import("stdfaust.lib"); delay_width = hslider("Delay width[name:Delay][tooltip:Delay Width] [style:knob]",0,0,1,0.01):si.smooth(0.999); freq_width = hslider("Frequency width[name:Frequency][tooltip:Frequency Width] [style:knob]",0,0,1,0.01); rv1 = _; rv2 = _*0.7; rv3 = _ + 0.3:sqrt(_); rv4 = _*3.14:sin; rv5 = _*1.23:cos; rv6 = _+9:log10; pa_filter(dt,flo,fhi,coef) = de.fdelay(dt_max_const,dt):fi.highpass(filters_order,flo):fi.lowpass(filters_order,fhi):_*coef; gain_coef = _*(1 - fbank_coef_gap):_+fbank_coef_gap; pa_filter_bank1(delay_width,filter_width) = _<: pa_filter(dt_max:rv1:_*delay_width,fmain,f1,freq_width:rv5:gain_coef), pa_filter(dt_max:rv3:_*delay_width,f1,f2, freq_width:rv2:gain_coef), pa_filter(dt_max:rv2:_*delay_width,f2,f3, freq_width:rv4:gain_coef) :>_; pa_filter_bank2(delay_width,filter_width) = _<: pa_filter(dt_max:rv5:_*delay_width,fmain - freq_shift*freq_width,f1 - freq_shift*freq_width,freq_width:rv3:gain_coef), pa_filter(dt_max:rv1:_*delay_width,f1 - freq_shift*freq_width,f2 - freq_shift*freq_width,freq_width:rv4:gain_coef), pa_filter(dt_max:rv6:_*delay_width,f2 - freq_shift*freq_width,f3 - freq_shift*freq_width,freq_width:rv2:gain_coef) :>_; stereoenhancer = _,_<: pa_filter_bank1(delay_width,freq_width), (_,_:(_*0.5,_*0.5:>fi.lowpass(4,fmain))<:_,_), pa_filter_bank2(delay_width,freq_width) :>_,_; process = ba.bypass_fade(ma.SR/10, checkbox("bypass"), stereoenhancer);
1f45bdc88ff2b3b3b3c0396bda37ccde2281cae429e192317e2279c78b80900e
Sylcantor/wam-web-components
temper.dsp
import("stdfaust.lib"); bypass = checkbox("99_bypass"); // Pre-filter parameters pfilterfc = hslider("Cutoff[style:knobs]", 20000, 100, 20000, 1.0); pfilterq = hslider("Resonance[style:knobs]", 1.0, 1.0, 8, 0.001) : si.smooth(0.995); // Distortion parameters pdrive = hslider("Drive[style:knobs]", 4.0, -10.0, 10.0, 0.001) : si.smooth(0.995); psat = hslider("Saturation[style:knobs]", 1.0, 0.0, 1.0, 0.001) : si.smooth(0.995); pcurve = hslider("Curve[style:knobs]", 1.0, 0.1, 4.0, 0.001) : si.smooth(0.995); // Output parameters pfeedback = hslider("Feedback[style:knobs]", -60, -60, -24, 1) : ba.db2linear : si.smooth(0.995); plevel = hslider("Level[style:knobs]", -3, -24, 24, 1) : ba.db2linear : si.smooth(0.995); // A fairly standard wave shaping curve; we use this to shape the input signal // before modulating the filter coefficients by this signal. Which shaping curve // we use here is pretty unimportant; as long as we can introduce higher harmonics, // the coefficient modulation will react. Which harmonics we introduce here seems // to affect the resulting sound pretty minimally. // // Also note here that we use an approximation of the `tanh` function for computational // improvement. See `http://www.musicdsp.org/showone.php?id=238`. tanh(x) = x * (27 + x * x) / (27 + 9 * x * x); transfer(x) = tanh(pcurve * x) / tanh(pcurve); // The allpass filter is stable for `|m(x)| <= 1`, but should not linger // near +/-1.0 for very long. We therefore clamp the driven signal with a tanh // function to ensure smooth coefficient calculation. We also here introduce // a modulated DC offset in the signal before the curve. drive(x) = x : *(pdrive) : +(fol(x)) : max(-3) : min(3) with { fol = an.amp_follower(0.04); }; // Our modulated filter is an allpass with coefficients governed by the input // signal applied through our wave shaper. Before the filter, we mix the dry // input signal with the raw waveshaper output according to the `psat` parameter. // Note the constant gain coefficient on the waveshaper; that number is to offset // the global gain from the waveshaper to make sure the shaping process stays // under unity gain. The maximum differential gain of the waveshaper can be found // by evaluating the derivative of the transfer function at x0 where x0 is the // steepest part of the slope. Here that number is ~4, so we multiply by ~1/4. modfilter(x) = x <: _, tap(x) : *(1.0 - psat), *(psat) : + : fi.tf1(b0(x), b1(x), a1(x)) with { b0(x) = m(x); b1(x) = 1.0; a1(x) = m(x); m(x) = drive(x) : transfer : *(0.24); tap(x) = m(x); }; // A fork of the `tf2s` function from the standard filter library which uses a // smoothing function after the `tan` computation to move that expensive call // outside of the inner loop of the filter function. tf2s(b2,b1,b0,a1,a0,w1) = fi.tf2(b0d,b1d,b2d,a1d,a2d) with { c = 1/tan(w1*0.5/ma.SR) : si.smooth(0.995); // 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; }; // A fork of the `resonlp` function from the standard filter library which uses // a local `tf2s` implementation. resonlp(fc,Q,gain) = tf2s(b2,b1,b0,a1,a0,wc) with { wc = 2*ma.PI*fc; a1 = 1/Q; a0 = 1; b2 = 0; b1 = 0; b0 = gain; }; // We have a resonant lowpass filter at the beginning of our signal chain // to control what part of the input signal becomes the modulating signal. filter = resonlp(pfilterfc, pfilterq, 1.0); // Our main processing block. main = (+ : modfilter : fi.dcblocker) ~ *(pfeedback) : gain with { // This explicit gain multiplier of 4.0 accounts for the loss of gain that // occurs from oversampling by a factor of 2, and for the loss of gain that // occurs from the prefilter and modulation step. Then we apply the output // level parameter. gain = *(4.0) : *(plevel); }; // And the overall process declaration. output = _,_ : + : ba.bypass1(bypass, filter,main) <: _,_; process = output;
https://raw.githubusercontent.com/Sylcantor/wam-web-components/c54352dae5b80bcf6d8d4c306ea22e2c91a12b08/plugins/temper/temper.dsp
faust
Pre-filter parameters Distortion parameters Output parameters A fairly standard wave shaping curve; we use this to shape the input signal before modulating the filter coefficients by this signal. Which shaping curve we use here is pretty unimportant; as long as we can introduce higher harmonics, the coefficient modulation will react. Which harmonics we introduce here seems to affect the resulting sound pretty minimally. Also note here that we use an approximation of the `tanh` function for computational improvement. See `http://www.musicdsp.org/showone.php?id=238`. The allpass filter is stable for `|m(x)| <= 1`, but should not linger near +/-1.0 for very long. We therefore clamp the driven signal with a tanh function to ensure smooth coefficient calculation. We also here introduce a modulated DC offset in the signal before the curve. Our modulated filter is an allpass with coefficients governed by the input signal applied through our wave shaper. Before the filter, we mix the dry input signal with the raw waveshaper output according to the `psat` parameter. Note the constant gain coefficient on the waveshaper; that number is to offset the global gain from the waveshaper to make sure the shaping process stays under unity gain. The maximum differential gain of the waveshaper can be found by evaluating the derivative of the transfer function at x0 where x0 is the steepest part of the slope. Here that number is ~4, so we multiply by ~1/4. A fork of the `tf2s` function from the standard filter library which uses a smoothing function after the `tan` computation to move that expensive call outside of the inner loop of the filter function. bilinear-transform scale-factor A fork of the `resonlp` function from the standard filter library which uses a local `tf2s` implementation. We have a resonant lowpass filter at the beginning of our signal chain to control what part of the input signal becomes the modulating signal. Our main processing block. This explicit gain multiplier of 4.0 accounts for the loss of gain that occurs from oversampling by a factor of 2, and for the loss of gain that occurs from the prefilter and modulation step. Then we apply the output level parameter. And the overall process declaration.
import("stdfaust.lib"); bypass = checkbox("99_bypass"); pfilterfc = hslider("Cutoff[style:knobs]", 20000, 100, 20000, 1.0); pfilterq = hslider("Resonance[style:knobs]", 1.0, 1.0, 8, 0.001) : si.smooth(0.995); pdrive = hslider("Drive[style:knobs]", 4.0, -10.0, 10.0, 0.001) : si.smooth(0.995); psat = hslider("Saturation[style:knobs]", 1.0, 0.0, 1.0, 0.001) : si.smooth(0.995); pcurve = hslider("Curve[style:knobs]", 1.0, 0.1, 4.0, 0.001) : si.smooth(0.995); pfeedback = hslider("Feedback[style:knobs]", -60, -60, -24, 1) : ba.db2linear : si.smooth(0.995); plevel = hslider("Level[style:knobs]", -3, -24, 24, 1) : ba.db2linear : si.smooth(0.995); tanh(x) = x * (27 + x * x) / (27 + 9 * x * x); transfer(x) = tanh(pcurve * x) / tanh(pcurve); drive(x) = x : *(pdrive) : +(fol(x)) : max(-3) : min(3) with { fol = an.amp_follower(0.04); }; modfilter(x) = x <: _, tap(x) : *(1.0 - psat), *(psat) : + : fi.tf1(b0(x), b1(x), a1(x)) with { b0(x) = m(x); b1(x) = 1.0; a1(x) = m(x); m(x) = drive(x) : transfer : *(0.24); tap(x) = m(x); }; tf2s(b2,b1,b0,a1,a0,w1) = fi.tf2(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; }; resonlp(fc,Q,gain) = tf2s(b2,b1,b0,a1,a0,wc) with { wc = 2*ma.PI*fc; a1 = 1/Q; a0 = 1; b2 = 0; b1 = 0; b0 = gain; }; filter = resonlp(pfilterfc, pfilterq, 1.0); main = (+ : modfilter : fi.dcblocker) ~ *(pfeedback) : gain with { gain = *(4.0) : *(plevel); }; output = _,_ : + : ba.bypass1(bypass, filter,main) <: _,_; process = output;
bf36a575268543e26b068e7bbe237f9046ac09ffc270426c078d46efc38208be
Sylcantor/wam-web-components
greyhole.dsp
declare name "GreyholeRaw"; declare version "1.0"; declare author "Julian Parker, bug fixes by Till Bovermann"; declare license "GPL2+"; declare copyright "(c) Julian Parker 2013"; import("stdfaust.lib"); fb = hslider("feedback [style:knob]",0.9,0.0,1.0,0.01):linear_interp; depth = ((ma.SR/44100)*50*hslider("modDepth [style:knob]",0.1,0.0,1.0,0.001)):linear_interp; freq = hslider("modFreq[style:knob]",2.0,0.0,10.0,0.01):linear_interp; diff = hslider("diffusion[style:knob]",0.5,0.0,0.99,0.0001):linear_interp; dt = min(65533,ma.SR*hslider("delayTime[style:knob]",0.2,0.001,1.45,0.0001)): si.smooth(0.9999); size = hslider("size[style:knob]",1.0,0.5,3.0,0.0001): si.smooth(0.9999); damp = hslider("damping[style:knob]", 0.0, 0.0, 0.99,0.001):linear_interp; linear_interp = _<:(mem,_):+:*(0.5):_; smooth_init(s,default) = *(1.0 - s) : + ~ (+(default*init(1)):*(s)) with { init(value) = value - value'; }; // using exteral function to access list of prime numbers is slightly faster than an inline approach (as of 428bf3b) //prime_delays = ffunction(int primes (int),<jprev.h>,"primes"); prime_delays(x) = (waveform {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667}, int(x)) : rdtable; diffuser_nested(1,angle,g,scale) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm)) : (( si.bus(4) :> si.bus(2) :rotator(angle) : ( de.fdelay1a(8192, prime_delays(size*scale):smooth_init(0.9999,prime_delays(size*scale)) -1 ), de.fdelay1a(8192, prime_delays(size*scale +10):smooth_init(0.9999,prime_delays(size*scale + 10)) -1 ) ) )~par(i,2,*(-s_norm))) : par(i,2,mem:*(c_norm)) ) , par(i,2,*(s_norm))) :> si.bus(2) with { rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2) with{ c = cos(angle); s = sin(angle); }; c_norm = cos(g); s_norm = sin(g); }; diffuser_nested(N,angle,g,scale) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm)) : (( si.bus(4) :> si.bus(2) : diffuser_nested(N-1,angle,g,scale+13) : rotator(angle) : ( de.fdelay1a(8192, prime_delays(size*scale):smooth_init(0.999,prime_delays(size*scale)) -1 ), de.fdelay1a(8192, prime_delays(size*scale +10):smooth_init(0.999,prime_delays(size*scale + 10)) -1 ) ) )~par(i,2,*(-s_norm))) : par(i,2,mem:*(c_norm)) ) , par(i,2,*(s_norm))) :> si.bus(2) with { rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2) with{ c = cos(angle); s = sin(angle); }; c_norm = cos(g); s_norm = sin(g); }; // blackhole = greyhole = ( si.bus(4) :> seq(i,3,diffuser_nested(4,ma.PI/2,(-1^i)*diff,10+19*i) ):par(i,2,si.smooth(damp)) ) ~( (de.fdelay4(512, 10+depth + depth*os.oscrc(freq)),de.fdelay4(512, 10+ depth + depth*os.oscrs(freq)) ) : (de.sdelay(65536,44100/2,floor(dt)),de.sdelay(65536,44100/2,floor(dt))) : par(i,2,*(fb)) ); process = ba.bypass_fade(ma.SR/10, checkbox("bypass"), greyhole);
https://raw.githubusercontent.com/Sylcantor/wam-web-components/c54352dae5b80bcf6d8d4c306ea22e2c91a12b08/plugins/greyhole/greyhole.dsp
faust
using exteral function to access list of prime numbers is slightly faster than an inline approach (as of 428bf3b) prime_delays = ffunction(int primes (int),<jprev.h>,"primes"); blackhole =
declare name "GreyholeRaw"; declare version "1.0"; declare author "Julian Parker, bug fixes by Till Bovermann"; declare license "GPL2+"; declare copyright "(c) Julian Parker 2013"; import("stdfaust.lib"); fb = hslider("feedback [style:knob]",0.9,0.0,1.0,0.01):linear_interp; depth = ((ma.SR/44100)*50*hslider("modDepth [style:knob]",0.1,0.0,1.0,0.001)):linear_interp; freq = hslider("modFreq[style:knob]",2.0,0.0,10.0,0.01):linear_interp; diff = hslider("diffusion[style:knob]",0.5,0.0,0.99,0.0001):linear_interp; dt = min(65533,ma.SR*hslider("delayTime[style:knob]",0.2,0.001,1.45,0.0001)): si.smooth(0.9999); size = hslider("size[style:knob]",1.0,0.5,3.0,0.0001): si.smooth(0.9999); damp = hslider("damping[style:knob]", 0.0, 0.0, 0.99,0.001):linear_interp; linear_interp = _<:(mem,_):+:*(0.5):_; smooth_init(s,default) = *(1.0 - s) : + ~ (+(default*init(1)):*(s)) with { init(value) = value - value'; }; prime_delays(x) = (waveform {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667}, int(x)) : rdtable; diffuser_nested(1,angle,g,scale) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm)) : (( si.bus(4) :> si.bus(2) :rotator(angle) : ( de.fdelay1a(8192, prime_delays(size*scale):smooth_init(0.9999,prime_delays(size*scale)) -1 ), de.fdelay1a(8192, prime_delays(size*scale +10):smooth_init(0.9999,prime_delays(size*scale + 10)) -1 ) ) )~par(i,2,*(-s_norm))) : par(i,2,mem:*(c_norm)) ) , par(i,2,*(s_norm))) :> si.bus(2) with { rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2) with{ c = cos(angle); s = sin(angle); }; c_norm = cos(g); s_norm = sin(g); }; diffuser_nested(N,angle,g,scale) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm)) : (( si.bus(4) :> si.bus(2) : diffuser_nested(N-1,angle,g,scale+13) : rotator(angle) : ( de.fdelay1a(8192, prime_delays(size*scale):smooth_init(0.999,prime_delays(size*scale)) -1 ), de.fdelay1a(8192, prime_delays(size*scale +10):smooth_init(0.999,prime_delays(size*scale + 10)) -1 ) ) )~par(i,2,*(-s_norm))) : par(i,2,mem:*(c_norm)) ) , par(i,2,*(s_norm))) :> si.bus(2) with { rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2) with{ c = cos(angle); s = sin(angle); }; c_norm = cos(g); s_norm = sin(g); }; greyhole = ( si.bus(4) :> seq(i,3,diffuser_nested(4,ma.PI/2,(-1^i)*diff,10+19*i) ):par(i,2,si.smooth(damp)) ) ~( (de.fdelay4(512, 10+depth + depth*os.oscrc(freq)),de.fdelay4(512, 10+ depth + depth*os.oscrs(freq)) ) : (de.sdelay(65536,44100/2,floor(dt)),de.sdelay(65536,44100/2,floor(dt))) : par(i,2,*(fb)) ); process = ba.bypass_fade(ma.SR/10, checkbox("bypass"), greyhole);
7e88aed13515a8a6203d79a919a1b3c613cfbbfc5b5bb7e163f5d1aa882f39d3
Sylcantor/wam-web-components
kbverb.dsp
import("stdfaust.lib"); // Simple bypass mecanism // Bypass an effect (fx:n->n). Once bypassed the effect is replaced by par(i,n,_). // Bypassed effects can be chained. // Example: _,_ : bypass(checkbox("bypass reverb"), freeverb) : _,_ bypass_fx(b, fx) = par(i, inputs(fx), _) <: ((block_on(b, fx):fx), block_off(b, fx)) :> par(i, outputs(fx), _) with { block_on(b, fx) = par(i, inputs(fx), _*(1-b)); block_off(b, fx) = par(i, inputs(fx), _*b); }; // Bypass an effect (fx:n->n) with 's' samples crossfades. Once bypassed the // effect is replaced by par(i,n,_). Bypassed effects can be chained. // Example: _,_ : bypass_fx_fade(checkbox("bypass reverb"), ma.SR/10, freeverb) : _,_ bypass_fade(b, s, fx) = par(i, inputs(fx), _) <: (par(i, inputs(fx), *(1-xb)) : fx : par(i, outputs(fx), *(1-xb))) , par(i, inputs(fx), *(xb)) :> par(i, outputs(fx), _) with { xb = ramp(s, b); ramp(n) = \(y,x).(if (y+1.0/n < x, y+1.0/n, if(y-1.0/n > x, y-1.0/n, x))) ~ _; if (c,t,e) = select2(c,e,t); }; // Bypass an effect (fx:n->n) with crossfades expressed in seconds. bypass_fade_sec(b, d, fx) = bypass_fx_fade(b, ba.sec2samp(d), fx); // faust -a supercollider.cpp KBVerb.dsp -o KBVerb.cpp // g++ -O3 -DNO_LIBSNDFILE -DSC_DARWIN -DSC_FAUST_PREFIX="\"\"" -bundle -I./include -I/Users/corey/Development/supercollider/include/{plugin_interface,common,server} -I/usr/local/lib/faust/ -Dmydsp=KBVERB -o KBVerb.scx KBVerb.cpp declare name "KBVerb"; declare author "Corey Kereliuk"; declare copyright "Corey Kereliuk"; declare version "0.0"; declare license "MIT"; import("maths.lib"); import("signals.lib"); import("delays.lib"); // for testing os = library("oscillators.lib"); prime_nums = waveform {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667}; primes(n) = (prime_nums, int(n)) : rdtable; fb = hslider("feedback[style:knob]",0.5,0.0,1.0,0.01):smooth(0.99); allpass(N,n,g) = (+ <: (delay(N, n), *(g))) ~ *(-g) : mem, _: +; section((n1, n2)) = allpass(2048, n1, 0.7) : allpass(2048, n2, 0.7) : delay(4096, int(0.75*(n1+n2))); allpass_chain(((n1, n2), ns), x) = _ : section((n1, n2)) <: R(x, ns), _ with { R(x, ((n1, n2), ns)) = _,x : + : section((n1, n2)) <: R(x, ns), _; R(x, (n1, n2)) = _,x : + : section((n1, n2)); }; procMono(feedfwd_delays, feedback_delays, feedback_gain, x) = x : (+ : allpass_chain(feedfwd_delays, x)) ~ (_,x : + : section(feedback_delays) : *(feedback_gain)) :> _; kBVerb = bus(2) : mix(PI/2) : *(0.5), *(0.5) : procLeft, procRight : bus(2) with { mix(theta) = bus(2) <: (*(c), *(-s), *(s), *(c)) : (+,+) : bus(2) with { c = cos(theta); s = sin(theta); }; ind_left(i) = 100 + 10*pow(2,i); feedfwd_delays_left = par(i, 5, (primes(ind_left(i)), primes(ind_left(i)+1))); feedback_delays_left = (primes(100), primes(101)); procLeft = procMono(feedfwd_delays_left, feedback_delays_left, fb); ind_right(i) = 100 + 11*pow(2,i); feedfwd_delays_right = par(i, 4, (primes(ind_right(i)), primes(ind_right(i)+1))); feedback_delays_right = (primes(97), primes(99)); procRight = procMono(feedfwd_delays_right, feedback_delays_right, fb); }; // impulse (test) /* process = os.lf_imptrain(0.25) <: procLeft, procRight with { ind_left(i) = 100 + 10*pow(2,i); feedfwd_delays_left = par(i, 5, (primes(ind_left(i)), primes(ind_left(i)+1))); feedback_delays_left = (primes(100), primes(101)); procLeft = procMono(feedfwd_delays_left, feedback_delays_left, fb); ind_right(i) = 100 + 11*pow(2,i); feedfwd_delays_right = par(i, 4, (primes(ind_right(i)), primes(ind_right(i)+1))); feedback_delays_right = (primes(97), primes(99)); procRight = procMono(feedfwd_delays_right, feedback_delays_right, fb); }; */ process = bypass_fade(checkbox("bypass"), ma.SR/10, kBVerb);
https://raw.githubusercontent.com/Sylcantor/wam-web-components/c54352dae5b80bcf6d8d4c306ea22e2c91a12b08/plugins/kbverb/kbverb.dsp
faust
Simple bypass mecanism Bypass an effect (fx:n->n). Once bypassed the effect is replaced by par(i,n,_). Bypassed effects can be chained. Example: _,_ : bypass(checkbox("bypass reverb"), freeverb) : _,_ Bypass an effect (fx:n->n) with 's' samples crossfades. Once bypassed the effect is replaced by par(i,n,_). Bypassed effects can be chained. Example: _,_ : bypass_fx_fade(checkbox("bypass reverb"), ma.SR/10, freeverb) : _,_ Bypass an effect (fx:n->n) with crossfades expressed in seconds. faust -a supercollider.cpp KBVerb.dsp -o KBVerb.cpp g++ -O3 -DNO_LIBSNDFILE -DSC_DARWIN -DSC_FAUST_PREFIX="\"\"" -bundle -I./include -I/Users/corey/Development/supercollider/include/{plugin_interface,common,server} -I/usr/local/lib/faust/ -Dmydsp=KBVERB -o KBVerb.scx KBVerb.cpp for testing impulse (test) process = os.lf_imptrain(0.25) <: procLeft, procRight with { ind_left(i) = 100 + 10*pow(2,i); feedfwd_delays_left = par(i, 5, (primes(ind_left(i)), primes(ind_left(i)+1))); feedback_delays_left = (primes(100), primes(101)); procLeft = procMono(feedfwd_delays_left, feedback_delays_left, fb); ind_right(i) = 100 + 11*pow(2,i); feedfwd_delays_right = par(i, 4, (primes(ind_right(i)), primes(ind_right(i)+1))); feedback_delays_right = (primes(97), primes(99)); procRight = procMono(feedfwd_delays_right, feedback_delays_right, fb); };
import("stdfaust.lib"); bypass_fx(b, fx) = par(i, inputs(fx), _) <: ((block_on(b, fx):fx), block_off(b, fx)) :> par(i, outputs(fx), _) with { block_on(b, fx) = par(i, inputs(fx), _*(1-b)); block_off(b, fx) = par(i, inputs(fx), _*b); }; bypass_fade(b, s, fx) = par(i, inputs(fx), _) <: (par(i, inputs(fx), *(1-xb)) : fx : par(i, outputs(fx), *(1-xb))) , par(i, inputs(fx), *(xb)) :> par(i, outputs(fx), _) with { xb = ramp(s, b); ramp(n) = \(y,x).(if (y+1.0/n < x, y+1.0/n, if(y-1.0/n > x, y-1.0/n, x))) ~ _; if (c,t,e) = select2(c,e,t); }; bypass_fade_sec(b, d, fx) = bypass_fx_fade(b, ba.sec2samp(d), fx); declare name "KBVerb"; declare author "Corey Kereliuk"; declare copyright "Corey Kereliuk"; declare version "0.0"; declare license "MIT"; import("maths.lib"); import("signals.lib"); import("delays.lib"); os = library("oscillators.lib"); prime_nums = waveform {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667}; primes(n) = (prime_nums, int(n)) : rdtable; fb = hslider("feedback[style:knob]",0.5,0.0,1.0,0.01):smooth(0.99); allpass(N,n,g) = (+ <: (delay(N, n), *(g))) ~ *(-g) : mem, _: +; section((n1, n2)) = allpass(2048, n1, 0.7) : allpass(2048, n2, 0.7) : delay(4096, int(0.75*(n1+n2))); allpass_chain(((n1, n2), ns), x) = _ : section((n1, n2)) <: R(x, ns), _ with { R(x, ((n1, n2), ns)) = _,x : + : section((n1, n2)) <: R(x, ns), _; R(x, (n1, n2)) = _,x : + : section((n1, n2)); }; procMono(feedfwd_delays, feedback_delays, feedback_gain, x) = x : (+ : allpass_chain(feedfwd_delays, x)) ~ (_,x : + : section(feedback_delays) : *(feedback_gain)) :> _; kBVerb = bus(2) : mix(PI/2) : *(0.5), *(0.5) : procLeft, procRight : bus(2) with { mix(theta) = bus(2) <: (*(c), *(-s), *(s), *(c)) : (+,+) : bus(2) with { c = cos(theta); s = sin(theta); }; ind_left(i) = 100 + 10*pow(2,i); feedfwd_delays_left = par(i, 5, (primes(ind_left(i)), primes(ind_left(i)+1))); feedback_delays_left = (primes(100), primes(101)); procLeft = procMono(feedfwd_delays_left, feedback_delays_left, fb); ind_right(i) = 100 + 11*pow(2,i); feedfwd_delays_right = par(i, 4, (primes(ind_right(i)), primes(ind_right(i)+1))); feedback_delays_right = (primes(97), primes(99)); procRight = procMono(feedfwd_delays_right, feedback_delays_right, fb); }; process = bypass_fade(checkbox("bypass"), ma.SR/10, kBVerb);
b46762b6478cb07eb0bb87608b26975e5612f8558e6877e2eb5c7a0b269b92ec
clearly-broken-software/Uprising
ur_oscillator.dsp
import("stdfaust.lib"); gate = 1-button("gate"); // starts the ramp envelope // general purpose ramp envelope env(start,end,len) = urRamp with { urRamp = ba.countup(len,gate): ba.bpf.start(0,start): ba.bpf.end(len,end);//:si.smoo; }; // constant power panning ; reference The Audio Programming Book p.236 piOver2 = ma.PI/2; root2over2 = (2 : sqrt) * 0.5; angle = pan * piOver2 * 0.5; posLeft = root2over2 * (cos(angle) - sin(angle)); posRight = root2over2 * (cos(angle) + sin(angle)); panStartPos = hslider("panStartPosition",0,-1,1,0.001); panEndPos = hslider("panEndPosition", 0,-1,1,0.001); pan = env(panStartPos,panEndPos,bufferSize); // oscilator oscType = hslider("oscType",0,0,4,1); oscStartFreq = hslider("oscStartFreq", 440, 20, 20000,0.01); oscEndFreq = hslider("oscEndFreq", 440, 20, 20000, 0.01); bufferSize = hslider("bufferSize", 1024, 1, 10 * 44100,1); oscStartGain = hslider("oscStartGain", 1, 0, 1, 0.001); oscEndGain = hslider("oscEndGain",1,0,1,0.001); oscAmp = env(oscStartGain,oscEndGain,bufferSize); oscPitchRamp = env(oscStartFreq,oscEndFreq,bufferSize); oscFreq = oscPitchRamp + LFO; urOsc = ba.selectmulti(ma.SR/10,(os.osc(oscFreq),os.triangle(oscFreq),os.sawtooth(oscFreq),os.square(oscFreq),no.noise),oscType)*oscAmp; // lfo lfoStartFreq = hslider("lfoStartFreq", 6, 0, 15, 0.001); lfoEndFreq = hslider("lfoEndFreq", 6, 0.001, 15, 0.001); lfoStartDepth = hslider("lfoStartDepth", 0, 0,1, 0.001); lfoEndDepth = hslider("lfoEndDepth", 0, 0,1, 0.001); lfoPitchRamp = env(lfoStartFreq,lfoEndFreq,bufferSize); lfoDepthRamp = env(lfoStartDepth,lfoEndDepth,bufferSize); LFO = os.lf_triangle(lfoPitchRamp)*lfoDepthRamp*20; // filter filterType = hslider ("filterType",0,0,3,1); filterGain = hslider ("filterGain",1,0,1,0.001); filterQ = hslider("filterQ",1,1,20,1); filterFreq = hslider("filterFreq",20000,20,20000,0.001); lpf = fi.resonlp(filterFreq,filterQ,filterGain); process = 1 - gate : si.smoo * urOsc:lpf<:_*posLeft,_*posRight;
https://raw.githubusercontent.com/clearly-broken-software/Uprising/89f5b49d90cd47611da7e7dc2009061768716b4c/plugins/uprising/dsp/faust/ur_oscillator.dsp
faust
starts the ramp envelope general purpose ramp envelope :si.smoo; constant power panning ; reference The Audio Programming Book p.236 oscilator lfo filter
import("stdfaust.lib"); env(start,end,len) = urRamp with { }; piOver2 = ma.PI/2; root2over2 = (2 : sqrt) * 0.5; angle = pan * piOver2 * 0.5; posLeft = root2over2 * (cos(angle) - sin(angle)); posRight = root2over2 * (cos(angle) + sin(angle)); panStartPos = hslider("panStartPosition",0,-1,1,0.001); panEndPos = hslider("panEndPosition", 0,-1,1,0.001); pan = env(panStartPos,panEndPos,bufferSize); oscType = hslider("oscType",0,0,4,1); oscStartFreq = hslider("oscStartFreq", 440, 20, 20000,0.01); oscEndFreq = hslider("oscEndFreq", 440, 20, 20000, 0.01); bufferSize = hslider("bufferSize", 1024, 1, 10 * 44100,1); oscStartGain = hslider("oscStartGain", 1, 0, 1, 0.001); oscEndGain = hslider("oscEndGain",1,0,1,0.001); oscAmp = env(oscStartGain,oscEndGain,bufferSize); oscPitchRamp = env(oscStartFreq,oscEndFreq,bufferSize); oscFreq = oscPitchRamp + LFO; urOsc = ba.selectmulti(ma.SR/10,(os.osc(oscFreq),os.triangle(oscFreq),os.sawtooth(oscFreq),os.square(oscFreq),no.noise),oscType)*oscAmp; lfoStartFreq = hslider("lfoStartFreq", 6, 0, 15, 0.001); lfoEndFreq = hslider("lfoEndFreq", 6, 0.001, 15, 0.001); lfoStartDepth = hslider("lfoStartDepth", 0, 0,1, 0.001); lfoEndDepth = hslider("lfoEndDepth", 0, 0,1, 0.001); lfoPitchRamp = env(lfoStartFreq,lfoEndFreq,bufferSize); lfoDepthRamp = env(lfoStartDepth,lfoEndDepth,bufferSize); LFO = os.lf_triangle(lfoPitchRamp)*lfoDepthRamp*20; filterType = hslider ("filterType",0,0,3,1); filterGain = hslider ("filterGain",1,0,1,0.001); filterQ = hslider("filterQ",1,1,20,1); filterFreq = hslider("filterFreq",20000,20,20000,0.001); lpf = fi.resonlp(filterFreq,filterQ,filterGain); process = 1 - gate : si.smoo * urOsc:lpf<:_*posLeft,_*posRight;
66b9259a69479fdb9e905d8f9cc58f283b9d3fd9bf2db4753fc2163afaa4ba01
VCVRack/VCV-Prototype
physicalmodel.dsp
import("stdfaust.lib"); import("rack.lib"); frenchBell_ui = pm.frenchBell(strikePosition,strikeCutoff,strikeSharpness,gain,gate) with { strikePosition = nentry("v:frenchBell/[0]strikePosition", 0,0,4,1); strikeCutoff = hslider("v:frenchBell/[1]strikeCutOff", 6500,20,20000,1); strikeSharpness = hslider("v:frenchBell/[2]strikeSharpness", 0.5,0.01,5,0.01); // Connection with VCV knob and switch gain = hslider("v:frenchBell/[3]gain [knob:1]",1,0,1,0.01); gate = button("v:frenchBell/[4]gate [switch:1]"); }; freeverb_demo = _,_ <: (*(g)*fixedgain,*(g)*fixedgain : re.stereo_freeverb(combfeed, allpassfeed, damping, spatSpread)), *(1-g), *(1-g) :> _,_ with{ scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = 44100; parameters(x) = hgroup("Freeverb",x); knobGroup(x) = parameters(vgroup("[0]",x)); // Connection with VCV knobs damping = knobGroup(vslider("[0] Damp [knob:2] [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[1] RoomSize [knob:3] [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom* origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[2] Stereo Spread [knob:4] [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR : int); g = parameters(vslider("[1] Wet [knob:5] [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0, 1, 0.025)); }; process = frenchBell_ui <: freeverb_demo;
https://raw.githubusercontent.com/VCVRack/VCV-Prototype/6980f0f0aca2517ea4a44e749515fe868d4ff532/examples/physicalmodel.dsp
faust
Connection with VCV knob and switch Connection with VCV knobs
import("stdfaust.lib"); import("rack.lib"); frenchBell_ui = pm.frenchBell(strikePosition,strikeCutoff,strikeSharpness,gain,gate) with { strikePosition = nentry("v:frenchBell/[0]strikePosition", 0,0,4,1); strikeCutoff = hslider("v:frenchBell/[1]strikeCutOff", 6500,20,20000,1); strikeSharpness = hslider("v:frenchBell/[2]strikeSharpness", 0.5,0.01,5,0.01); gain = hslider("v:frenchBell/[3]gain [knob:1]",1,0,1,0.01); gate = button("v:frenchBell/[4]gate [switch:1]"); }; freeverb_demo = _,_ <: (*(g)*fixedgain,*(g)*fixedgain : re.stereo_freeverb(combfeed, allpassfeed, damping, spatSpread)), *(1-g), *(1-g) :> _,_ with{ scaleroom = 0.28; offsetroom = 0.7; allpassfeed = 0.5; scaledamp = 0.4; fixedgain = 0.1; origSR = 44100; parameters(x) = hgroup("Freeverb",x); knobGroup(x) = parameters(vgroup("[0]",x)); damping = knobGroup(vslider("[0] Damp [knob:2] [style: knob] [tooltip: Somehow control the density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); combfeed = knobGroup(vslider("[1] RoomSize [knob:3] [style: knob] [tooltip: The room size between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom* origSR/ma.SR + offsetroom); spatSpread = knobGroup(vslider("[2] Stereo Spread [knob:4] [style: knob] [tooltip: Spatial spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR : int); g = parameters(vslider("[1] Wet [knob:5] [tooltip: The amount of reverb applied to the signal between 0 and 1 with 1 for the maximum amount of reverb.]", 0.3333, 0, 1, 0.025)); }; process = frenchBell_ui <: freeverb_demo;
659e065e0f76408145ad478d228e846ba5910f29ea92739422251fdb8df3e7b6
guizmo2000/WebAudioPluginBank
stereoChorus.dsp
/* Stereo chorus. */ declare name "chorus"; declare description "stereo chorus effect"; declare author "Albert Graef"; declare version "1.1"; import("stdfaust.lib"); level = hslider("level [style: knob]", 0.5, 0, 1, 0.01); freq = hslider("freq [style: knob]", 3, 0, 10, 0.01); // Both must be filtered to avoid artefact when changing the values dtime = hslider("delay [style: knob]", 0.025, 0, 0.2, 0.001) : si.smooth(0.9999); depth = hslider("depth [style: knob]", 0.02, 0, 0.5, 0.001) : si.smooth(0.9999); tblosc(n, f, freq, mod) = (1-d)*rdtable(n, wave, i&(n-1)) + d*rdtable(n, wave, (i+1)&(n-1)) with { wave = ba.time*(2*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); }; chorus(dtime, freq, depth, phase, x) = x+level*de.fdelay(1<<16, t, x) with { t = ma.SR*dtime/2*(1+depth*tblosc(1<<16, sin, freq, phase)); }; stereoChorus = (left, right) with { left = chorus(dtime,freq,depth,0); right = chorus(dtime,freq,depth,ma.PI/2); }; process = ba.bypass_fade( ma.SR/10, checkbox("bypass"), stereoChorus);
https://raw.githubusercontent.com/guizmo2000/WebAudioPluginBank/9d7a3c1bd0977d57316046c116c217dccd6caa10/jordan-SINTES/stereoChorus/assets/dsp_src/stereoChorus.dsp
faust
Stereo chorus. Both must be filtered to avoid artefact when changing the values
declare name "chorus"; declare description "stereo chorus effect"; declare author "Albert Graef"; declare version "1.1"; import("stdfaust.lib"); level = hslider("level [style: knob]", 0.5, 0, 1, 0.01); freq = hslider("freq [style: knob]", 3, 0, 10, 0.01); dtime = hslider("delay [style: knob]", 0.025, 0, 0.2, 0.001) : si.smooth(0.9999); depth = hslider("depth [style: knob]", 0.02, 0, 0.5, 0.001) : si.smooth(0.9999); tblosc(n, f, freq, mod) = (1-d)*rdtable(n, wave, i&(n-1)) + d*rdtable(n, wave, (i+1)&(n-1)) with { wave = ba.time*(2*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); }; chorus(dtime, freq, depth, phase, x) = x+level*de.fdelay(1<<16, t, x) with { t = ma.SR*dtime/2*(1+depth*tblosc(1<<16, sin, freq, phase)); }; stereoChorus = (left, right) with { left = chorus(dtime,freq,depth,0); right = chorus(dtime,freq,depth,ma.PI/2); }; process = ba.bypass_fade( ma.SR/10, checkbox("bypass"), stereoChorus);
6958e0b08c2145cb69841c102ba572977987ab444a184237e76d2ea4da1ede1a
guizmo2000/WebAudioPluginBank
SmoothDelay.dsp
declare name "SmoothDelay"; declare author "Yann Orlarey"; declare copyright "Grame"; declare version "1.0"; declare license "STK-4.3"; //--------------------------process---------------------------- // // A stereo smooth delay with a feedback control // // This example shows how to use sdelay, a delay that doesn't // click and doesn't transpose when the delay time is changed //------------------------------------------------------------- import("stdfaust.lib"); // Simple bypass mecanism // Bypass an effect (fx:n->n). Once bypassed the effect is replaced by par(i,n,_). // Bypassed effects can be chained. // Example: _,_ : bypass(checkbox("bypass reverb"), freeverb) : _,_ bypass_fx(b, fx) = par(i, inputs(fx), _) <: ((block_on(b, fx):fx), block_off(b, fx)) :> par(i, outputs(fx), _) with { block_on(b, fx) = par(i, inputs(fx), _*(1-b)); block_off(b, fx) = par(i, inputs(fx), _*b); }; // Bypass an effect (fx:n->n) with 's' samples crossfades. Once bypassed the // effect is replaced by par(i,n,_). Bypassed effects can be chained. // Example: _,_ : bypass_fx_fade(checkbox("bypass reverb"), ma.SR/10, freeverb) : _,_ bypass_fade(b, s, fx) = par(i, inputs(fx), _) <: (par(i, inputs(fx), *(1-xb)) : fx : par(i, outputs(fx), *(1-xb))) , par(i, inputs(fx), *(xb)) :> par(i, outputs(fx), _) with { xb = ramp(s, b); ramp(n) = \(y,x).(if (y+1.0/n < x, y+1.0/n, if(y-1.0/n > x, y-1.0/n, x))) ~ _; if (c,t,e) = select2(c,e,t); }; // Bypass an effect (fx:n->n) with crossfades expressed in seconds. bypass_fade_sec(b, d, fx) = bypass_fx_fade(b, ba.sec2samp(d), fx); smoothdelay = (+ :de.sdelay(N, interp, dtime)) ~ *(fback) with { s = 0.999; // smoothing parameter (one-fi.pole fi.pole location) N = int(2^17); dtime = hslider("Delay[unit:ms][style:knob][OWL:PARAMETER_A]", 1, 0.0001, 500, 0.1)*ma.SR/1000.0 : si.smooth(s); fback = hslider("Feedback[style:knob][OWL:PARAMETER_B]",0,0,100,0.1)/100.0; interp = hslider("Interpolation[unit:ms][style:knob][OWL:PARAMETER_C]",10,1,100,0.1)*ma.SR/1000.0; }; dry = 1 - hslider("Dry/Wet[style:knob][OWL:PARAMETER_D]", 0.3333, 0, 1, 0.025); wet = 1 - dry + hslider("Super Wet[style:knob][OWL:PARAMETER_E]", 0.0, 0, 0.5, 0.025); SmoothDelay = _<:*(dry),(*(wet) : smoothdelay ) :>_; process = bypass_fade(checkbox("bypass"), ma.SR/10, SmoothDelay);
https://raw.githubusercontent.com/guizmo2000/WebAudioPluginBank/9d7a3c1bd0977d57316046c116c217dccd6caa10/jordan-SINTES/SmoothDelay/assets/dsp_src/SmoothDelay.dsp
faust
--------------------------process---------------------------- A stereo smooth delay with a feedback control This example shows how to use sdelay, a delay that doesn't click and doesn't transpose when the delay time is changed ------------------------------------------------------------- Simple bypass mecanism Bypass an effect (fx:n->n). Once bypassed the effect is replaced by par(i,n,_). Bypassed effects can be chained. Example: _,_ : bypass(checkbox("bypass reverb"), freeverb) : _,_ Bypass an effect (fx:n->n) with 's' samples crossfades. Once bypassed the effect is replaced by par(i,n,_). Bypassed effects can be chained. Example: _,_ : bypass_fx_fade(checkbox("bypass reverb"), ma.SR/10, freeverb) : _,_ Bypass an effect (fx:n->n) with crossfades expressed in seconds. smoothing parameter (one-fi.pole fi.pole location)
declare name "SmoothDelay"; declare author "Yann Orlarey"; declare copyright "Grame"; declare version "1.0"; declare license "STK-4.3"; import("stdfaust.lib"); bypass_fx(b, fx) = par(i, inputs(fx), _) <: ((block_on(b, fx):fx), block_off(b, fx)) :> par(i, outputs(fx), _) with { block_on(b, fx) = par(i, inputs(fx), _*(1-b)); block_off(b, fx) = par(i, inputs(fx), _*b); }; bypass_fade(b, s, fx) = par(i, inputs(fx), _) <: (par(i, inputs(fx), *(1-xb)) : fx : par(i, outputs(fx), *(1-xb))) , par(i, inputs(fx), *(xb)) :> par(i, outputs(fx), _) with { xb = ramp(s, b); ramp(n) = \(y,x).(if (y+1.0/n < x, y+1.0/n, if(y-1.0/n > x, y-1.0/n, x))) ~ _; if (c,t,e) = select2(c,e,t); }; bypass_fade_sec(b, d, fx) = bypass_fx_fade(b, ba.sec2samp(d), fx); smoothdelay = (+ :de.sdelay(N, interp, dtime)) ~ *(fback) with { N = int(2^17); dtime = hslider("Delay[unit:ms][style:knob][OWL:PARAMETER_A]", 1, 0.0001, 500, 0.1)*ma.SR/1000.0 : si.smooth(s); fback = hslider("Feedback[style:knob][OWL:PARAMETER_B]",0,0,100,0.1)/100.0; interp = hslider("Interpolation[unit:ms][style:knob][OWL:PARAMETER_C]",10,1,100,0.1)*ma.SR/1000.0; }; dry = 1 - hslider("Dry/Wet[style:knob][OWL:PARAMETER_D]", 0.3333, 0, 1, 0.025); wet = 1 - dry + hslider("Super Wet[style:knob][OWL:PARAMETER_E]", 0.0, 0, 0.5, 0.025); SmoothDelay = _<:*(dry),(*(wet) : smoothdelay ) :>_; process = bypass_fade(checkbox("bypass"), ma.SR/10, SmoothDelay);
56995712586b9a5120f2ff8dfa7ace2c2cf9bc016378f52174bbfcce8f64f199
guizmo2000/WebAudioPluginBank
kpp_bluedream_without_bypass.dsp
/* * Copyright (C) 2018 Oleg Kapitonov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU 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 General Public License for more details. * * You should have received a copy of the GNU 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. * -------------------------------------------------------------------------- */ /* * This plugin is a booster/overdrive pedal emulator with equalizer. * When the _voice_ knob is in the left position the pedal works as a booster * When the _voice_ knob is in the right position the pedal works as a "tube screamer" * * Process chain: * * input->pre_filter->*drive_knob->overdrive->equalizer->post-filter->*volume_knob->output * ->---voice---> ->---voice----> * * * pre-filter - highpass, 1 order, 720 Hz. Bypassed when _voice_ is in right position. * overdrive - nonlinear element, emulation of the push-pull tube amplifier. * equalizer - tonestack, bass-middle-treble. * post-filter - lowpass, 1 order, 720 Hz. Bypassed when _voice_ is in right position. */ declare name "kpp_bluedream"; declare author "Oleg Kapitonov"; declare license "GPLv3"; declare version "0.1b"; import("stdfaust.lib"); process = output with { // Bypass button, 0 - pedal on, 1 -pedal off (bypass on) bypass = checkbox("99_bypass"); drive = vslider("drive",63,0,100,0.01); volume = vslider("volume",0.5,0,1,0.001); voice = vslider("voice",0.5,0,1,0.001); tonestack_low = vslider("bass",-6.9,-15,15,0.1); tonestack_middle = vslider("middle",-3.9,-15,15,0.1); tonestack_high = vslider("treble",0.6,-15,15,0.1); tonestack_low_freq = 20; tonestack_middle_freq = 500; tonestack_high_freq = 10000; tonestack_low_band = 400; tonestack_middle_band = 700; tonestack_high_band = 18000; /*-----Model of the tube in a push-pull amplifier-------*/ // Bias of each half-wave so that they better match bias = 0.2; // Grid resistor Rg = 50000; // Grid capacitor Cgb = 100; // Distortion threshold, if the signal is bigger // it starts to get distorted Upor = 0.2; // Softness of distortion Kreg = 0.427; tau = 1/ma.SR; Cg = Cgb*1e-9; // Grid leak resistor (between the grid and the ground) Remax = 200000; // Model of the tube cascade, 0.5 is a hard clipping threshold tube(Rg,Cg,Kreg,Upor,bias,cut) = main ~ _ : min(0.5) : +(bias) : max(cut) with { Ks(x) = 1/(max((x-Upor)*(Kreg),0)+1); Ksplus(x) = Upor - x*Upor; main(Uout,Uin) = (Ug * Ks(Ug) + Ksplus(Ks(Ug))) * Remax/(Remax+Rg) with { Ug = Uin - Uc letrec { 'Uc = Uc + (Uin - Uc - Uout)/Rg/Cg*tau; }; }; }; /*--------Processing chain-----------------*/ // Used 2 tubes - for positive and negative half-waves (push-pull). // Stereo input and output, but during processing the signal is // converted to mono. pre_filter = _ <: fi.highpass(1, 720) * min((1 - voice + 0.75 * drive / 100), 1), *(max((voice - 0.75 * drive / 100), 0)) : + ; post_filter = _ <: fi.lowpass(1, 720) * min((1 - voice + 0.75 * drive / 100), 1), *(max((voice - 0.75 * drive / 100), 0)) : + ; stage_stomp = pre_filter : fi.lowpass(1,9000) : _<: _,*(-1.0) : tube(Rg,Cg,Kreg,Upor,bias,0), tube(Rg,Cg,Kreg,Upor,bias,0) : - : fi.peak_eq(tonestack_low,tonestack_low_freq,tonestack_low_band) : fi.peak_eq(tonestack_middle,tonestack_middle_freq,tonestack_middle_band) : fi.peak_eq(tonestack_high,tonestack_high_freq,tonestack_high_band) : post_filter ; stomp = fi.highpass(1,20) : *(ba.db2linear(drive * 0.4 * (1 - voice * 0.5))) : stage_stomp : *(ba.db2linear(volume * 60.0 * (1 - voice * 0.25) ) / 100.0) ; output = _,_ : + : ba.bypass1(bypass, stomp) <: _,_; };
https://raw.githubusercontent.com/guizmo2000/WebAudioPluginBank/9d7a3c1bd0977d57316046c116c217dccd6caa10/Faust/BlueDream/Original%20Faust%20Code/kpp_bluedream_without_bypass.dsp
faust
* Copyright (C) 2018 Oleg Kapitonov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU 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 General Public License for more details. * * You should have received a copy of the GNU 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. * -------------------------------------------------------------------------- * This plugin is a booster/overdrive pedal emulator with equalizer. * When the _voice_ knob is in the left position the pedal works as a booster * When the _voice_ knob is in the right position the pedal works as a "tube screamer" * * Process chain: * * input->pre_filter->*drive_knob->overdrive->equalizer->post-filter->*volume_knob->output * ->---voice---> ->---voice----> * * * pre-filter - highpass, 1 order, 720 Hz. Bypassed when _voice_ is in right position. * overdrive - nonlinear element, emulation of the push-pull tube amplifier. * equalizer - tonestack, bass-middle-treble. * post-filter - lowpass, 1 order, 720 Hz. Bypassed when _voice_ is in right position. Bypass button, 0 - pedal on, 1 -pedal off (bypass on) -----Model of the tube in a push-pull amplifier------- Bias of each half-wave so that they better match Grid resistor Grid capacitor Distortion threshold, if the signal is bigger it starts to get distorted Softness of distortion Grid leak resistor (between the grid and the ground) Model of the tube cascade, 0.5 is a hard clipping threshold --------Processing chain----------------- Used 2 tubes - for positive and negative half-waves (push-pull). Stereo input and output, but during processing the signal is converted to mono.
declare name "kpp_bluedream"; declare author "Oleg Kapitonov"; declare license "GPLv3"; declare version "0.1b"; import("stdfaust.lib"); process = output with { bypass = checkbox("99_bypass"); drive = vslider("drive",63,0,100,0.01); volume = vslider("volume",0.5,0,1,0.001); voice = vslider("voice",0.5,0,1,0.001); tonestack_low = vslider("bass",-6.9,-15,15,0.1); tonestack_middle = vslider("middle",-3.9,-15,15,0.1); tonestack_high = vslider("treble",0.6,-15,15,0.1); tonestack_low_freq = 20; tonestack_middle_freq = 500; tonestack_high_freq = 10000; tonestack_low_band = 400; tonestack_middle_band = 700; tonestack_high_band = 18000; bias = 0.2; Rg = 50000; Cgb = 100; Upor = 0.2; Kreg = 0.427; tau = 1/ma.SR; Cg = Cgb*1e-9; Remax = 200000; tube(Rg,Cg,Kreg,Upor,bias,cut) = main ~ _ : min(0.5) : +(bias) : max(cut) with { Ks(x) = 1/(max((x-Upor)*(Kreg),0)+1); Ksplus(x) = Upor - x*Upor; main(Uout,Uin) = (Ug * Ks(Ug) + Ksplus(Ks(Ug))) * Remax/(Remax+Rg) with { Ug = Uin - Uc letrec { 'Uc = Uc + (Uin - Uc - Uout)/Rg/Cg*tau; }; }; }; pre_filter = _ <: fi.highpass(1, 720) * min((1 - voice + 0.75 * drive / 100), 1), *(max((voice - 0.75 * drive / 100), 0)) : + ; post_filter = _ <: fi.lowpass(1, 720) * min((1 - voice + 0.75 * drive / 100), 1), *(max((voice - 0.75 * drive / 100), 0)) : + ; stage_stomp = pre_filter : fi.lowpass(1,9000) : _<: _,*(-1.0) : tube(Rg,Cg,Kreg,Upor,bias,0), tube(Rg,Cg,Kreg,Upor,bias,0) : - : fi.peak_eq(tonestack_low,tonestack_low_freq,tonestack_low_band) : fi.peak_eq(tonestack_middle,tonestack_middle_freq,tonestack_middle_band) : fi.peak_eq(tonestack_high,tonestack_high_freq,tonestack_high_band) : post_filter ; stomp = fi.highpass(1,20) : *(ba.db2linear(drive * 0.4 * (1 - voice * 0.5))) : stage_stomp : *(ba.db2linear(volume * 60.0 * (1 - voice * 0.25) ) / 100.0) ; output = _,_ : + : ba.bypass1(bypass, stomp) <: _,_; };
60c512a3ef5dfcb25139dc7e5f49e364c8e78c7525d4f0c77d0a8fea124d9c41
guizmo2000/WebAudioPluginBank
stonephaser.dsp
declare name "Stone Phaser"; declare author "Jean Pierre Cimalando"; declare version "1.2.2"; declare license "CC0-1.0"; // Référence : // Kiiski, R., Esqueda, F., & Välimäki, V. (2016). // Time-variant gray-box modeling of a phaser pedal. // In 19th International Conference on Digital Audio Effects (DAFx-16). import("stdfaust.lib"); ///////////// // Control // ///////////// bypass = checkbox("[0] Bypass [symbol:bypass]"); color = checkbox("[1] Color [symbol:color]"); lf = hslider("[2] LFO frequency [symbol:lfo_frequency] [unit:Hz] [scale:log] [style:knob]", 0.2, 0.01, 5., 0.01) : tsmooth; fb = hslider("[3] Feedback depth [symbol:feedback_depth] [unit:%] [integer] [style:knob]", 75, 0, 99, 1) : *(0.01) : tsmooth; fbHf = hslider("[4] Feedback bass cut [abbrev:Fb bass cut] [symbol:feedback_hpf_cutoff] [unit:Hz] [scale:log] [style:knob]", 500., 10., 5000., 1.) : tsmooth; dw = hslider("[5] Dry/wet mix [symbol:mix] [unit:%] [integer] [style:knob]", 50, 0, 100, 1) : *(0.01); w = sin(dw*(ma.PI/2)) : tsmooth; d = cos(dw*(ma.PI/2)) : tsmooth; ph = hslider("[6] Stereo phase [symbol:stereo_phase] [unit:deg] [integer] [style:knob]", 0., -180., +180., 1.) : /(360.) : +(1.) : tsmooth; ////////////////////////// // All-pass filter unit // ////////////////////////// allpass1(f) = fi.iir((a,1.),(a)) with { a = -1.+2.*ma.PI*f/ma.SR; }; ////////////////////// // High-pass filter // ////////////////////// highpass1(f) = fi.iir((0.5*(1.+p), -0.5*(1.+p)), (-p)) with { p = exp(-2.*ma.PI*f/ma.SR); }; ////////////////////// // Low-pass filter // ////////////////////// lowpass1(f) = fi.iir((1.-p), (-p)) with { p = exp(-2.*ma.PI*f/ma.SR); }; //////////////////////////////////////////// // Smooth filter with fixed time constant // //////////////////////////////////////////// tsmooth = si.smooth(ba.tau2pole(t)) with { t = 100e-3; }; ////////// // LFOs // ////////// lfoTriangle(pos, y1, y2) = val*(y2-y1)+y1 with { val = 1.-abs(2.*pos-1.); }; lfoRectifiedSine(pos, y1, y2) = val*(y2-y1)+y1 with { val = rsin(pos); }; lfoAnalogTriangle(roundness, pos, y1, y2) = val*(y2-y1)+y1 with { val = sineTri(roundness, pos); }; lfoExponentialTriangle(roundness, slopeUp, slopeDown, pos, y1, y2) = val*(y2-y1)+y1 with { val = expTri(roundness, slopeUp, slopeDown, pos); }; //////////// // Phaser // //////////// mono_phaser(x, lfo_pos) = (fadeBypass * x) + (1. - fadeBypass) * (dry + wet) with { dry = x*d; wet = (x <: highpass1(33.0) : (+:a1:a2:a3:a4)~feedback)*w; fadeBypass = bypass : tsmooth; colorFb = ba.if(color, fb, 0.1*fb) : tsmooth; feedback = highpass1(fbHf) : *(colorFb); lfoLoF = ba.if(color, ba.hz2midikey(80.), ba.hz2midikey(300.)) : tsmooth; lfoHiF = ba.if(color, ba.hz2midikey(2200.), ba.hz2midikey(6000.)) : tsmooth; modFreq = ba.midikey2hz(lfoAnalogTriangle(0.95, lfo_pos, lfoLoF, lfoHiF)); //modFreq = ba.midikey2hz(lfoExponentialTriangle(128., 0.6, 0.9, lfo_pos, lfoLoF, lfoHiF)); a1 = allpass1(modFreq); a2 = allpass1(modFreq); a3 = allpass1(modFreq); a4 = allpass1(modFreq); }; stereo_phaser(x1, x2, lfo_pos) = mono_phaser(x1, lfo_pos), mono_phaser(x2, lfo_pos2) with { lfo_pos2 = wrap(lfo_pos + ph); wrap(p) = p-float(int(p)); }; ///////////// // Utility // ///////////// lerp(tab, pos, size) = (tab(i1), tab(i2)) : si.interpolate(mu) with { fracIndex = pos*size; i1 = int(fracIndex); i2 = (i1+1)%size; mu = fracIndex-float(i1); }; rsin(pos) = lerp(tab, pos, ts) with { ts = 128; tab(i) = rdtable(ts, abs(os.sinwaveform(ts)), i); }; sineTriWaveform(roundness, tablesize) = 1.-sin(2.*ba.if(x<0.5, x, 1.-x)*asin(a))/a with { a = max(0., min(1., roundness * 0.5 + 0.5)); x = wrap(float(ba.time)/float(tablesize)); wrap(p) = p-float(int(p)); }; sineTri(roundness, pos) = lerp(tab, pos, ts) with { ts = 128; tab(i) = rdtable(ts, sineTriWaveform(roundness, ts), i); }; /* # Gnuplot code of the sineTri function sineTri(r, x)=sineTri_(r, wrap(x+0.5)) sineTri_(r, x)=1.-sin(((x<0.5)?x:(1.-x))*2.*asin(r))/r wrap(x)=x-floor(x) set xrange [0:1] plot(sineTri(0.99, x)) */ expTriWaveform(roundness, slopeUp, slopeDown, tablesize) = ba.if(x<0.5, expUp, expDown) with { normExp(a, b, x) = (1.-pow(a, -b*x))/(1.-pow(a, -b)); expUp = 1.-normExp(roundness, slopeUp, (-x+0.5)*2); expDown = 1.-normExp(roundness, slopeDown, (x-0.5)*2); x = wrap(float(ba.time)/float(tablesize)); wrap(p) = p-float(int(p)); }; expTri(roundness, slopeUp, slopeDown, pos) = lerp(tab, pos, ts) with { ts = 128; tab(i) = rdtable(ts, expTriWaveform(roundness, slopeUp, slopeDown, ts), i); }; /* # Gnuplot code of the expTri function roundness=128 slopeUp = 0.6 slopeDown = 0.9 normExp(a,b,x)=(1.-a**-(b*x))/(1.-a**-b) set xrange [0:1] plot (x<0.5) ? (1.-normExp(roundness, slopeUp, (-x+0.5)*2)) : (1.-normExp(roundness, slopeDown, (x-0.5)*2)) */ ////////// // Main // ////////// process_mono(x) = mono_phaser(x, os.lf_sawpos(lf)); process_stereo(x1, x2) = stereo_phaser(x1, x2, os.lf_sawpos(lf)); process = process_mono;
https://raw.githubusercontent.com/guizmo2000/WebAudioPluginBank/9d7a3c1bd0977d57316046c116c217dccd6caa10/jordan-SINTES/stonephaser/stonephaser.dsp
faust
Référence : Kiiski, R., Esqueda, F., & Välimäki, V. (2016). Time-variant gray-box modeling of a phaser pedal. In 19th International Conference on Digital Audio Effects (DAFx-16). /////////// Control // /////////// //////////////////////// All-pass filter unit // //////////////////////// //////////////////// High-pass filter // //////////////////// //////////////////// Low-pass filter // //////////////////// ////////////////////////////////////////// Smooth filter with fixed time constant // ////////////////////////////////////////// //////// LFOs // //////// ////////// Phaser // ////////// modFreq = ba.midikey2hz(lfoExponentialTriangle(128., 0.6, 0.9, lfo_pos, lfoLoF, lfoHiF)); /////////// Utility // /////////// # Gnuplot code of the sineTri function sineTri(r, x)=sineTri_(r, wrap(x+0.5)) sineTri_(r, x)=1.-sin(((x<0.5)?x:(1.-x))*2.*asin(r))/r wrap(x)=x-floor(x) set xrange [0:1] plot(sineTri(0.99, x)) # Gnuplot code of the expTri function roundness=128 slopeUp = 0.6 slopeDown = 0.9 normExp(a,b,x)=(1.-a**-(b*x))/(1.-a**-b) set xrange [0:1] plot (x<0.5) ? (1.-normExp(roundness, slopeUp, (-x+0.5)*2)) : (1.-normExp(roundness, slopeDown, (x-0.5)*2)) //////// Main // ////////
declare name "Stone Phaser"; declare author "Jean Pierre Cimalando"; declare version "1.2.2"; declare license "CC0-1.0"; import("stdfaust.lib"); bypass = checkbox("[0] Bypass [symbol:bypass]"); color = checkbox("[1] Color [symbol:color]"); lf = hslider("[2] LFO frequency [symbol:lfo_frequency] [unit:Hz] [scale:log] [style:knob]", 0.2, 0.01, 5., 0.01) : tsmooth; fb = hslider("[3] Feedback depth [symbol:feedback_depth] [unit:%] [integer] [style:knob]", 75, 0, 99, 1) : *(0.01) : tsmooth; fbHf = hslider("[4] Feedback bass cut [abbrev:Fb bass cut] [symbol:feedback_hpf_cutoff] [unit:Hz] [scale:log] [style:knob]", 500., 10., 5000., 1.) : tsmooth; dw = hslider("[5] Dry/wet mix [symbol:mix] [unit:%] [integer] [style:knob]", 50, 0, 100, 1) : *(0.01); w = sin(dw*(ma.PI/2)) : tsmooth; d = cos(dw*(ma.PI/2)) : tsmooth; ph = hslider("[6] Stereo phase [symbol:stereo_phase] [unit:deg] [integer] [style:knob]", 0., -180., +180., 1.) : /(360.) : +(1.) : tsmooth; allpass1(f) = fi.iir((a,1.),(a)) with { a = -1.+2.*ma.PI*f/ma.SR; }; highpass1(f) = fi.iir((0.5*(1.+p), -0.5*(1.+p)), (-p)) with { p = exp(-2.*ma.PI*f/ma.SR); }; lowpass1(f) = fi.iir((1.-p), (-p)) with { p = exp(-2.*ma.PI*f/ma.SR); }; tsmooth = si.smooth(ba.tau2pole(t)) with { t = 100e-3; }; lfoTriangle(pos, y1, y2) = val*(y2-y1)+y1 with { val = 1.-abs(2.*pos-1.); }; lfoRectifiedSine(pos, y1, y2) = val*(y2-y1)+y1 with { val = rsin(pos); }; lfoAnalogTriangle(roundness, pos, y1, y2) = val*(y2-y1)+y1 with { val = sineTri(roundness, pos); }; lfoExponentialTriangle(roundness, slopeUp, slopeDown, pos, y1, y2) = val*(y2-y1)+y1 with { val = expTri(roundness, slopeUp, slopeDown, pos); }; mono_phaser(x, lfo_pos) = (fadeBypass * x) + (1. - fadeBypass) * (dry + wet) with { dry = x*d; wet = (x <: highpass1(33.0) : (+:a1:a2:a3:a4)~feedback)*w; fadeBypass = bypass : tsmooth; colorFb = ba.if(color, fb, 0.1*fb) : tsmooth; feedback = highpass1(fbHf) : *(colorFb); lfoLoF = ba.if(color, ba.hz2midikey(80.), ba.hz2midikey(300.)) : tsmooth; lfoHiF = ba.if(color, ba.hz2midikey(2200.), ba.hz2midikey(6000.)) : tsmooth; modFreq = ba.midikey2hz(lfoAnalogTriangle(0.95, lfo_pos, lfoLoF, lfoHiF)); a1 = allpass1(modFreq); a2 = allpass1(modFreq); a3 = allpass1(modFreq); a4 = allpass1(modFreq); }; stereo_phaser(x1, x2, lfo_pos) = mono_phaser(x1, lfo_pos), mono_phaser(x2, lfo_pos2) with { lfo_pos2 = wrap(lfo_pos + ph); wrap(p) = p-float(int(p)); }; lerp(tab, pos, size) = (tab(i1), tab(i2)) : si.interpolate(mu) with { fracIndex = pos*size; i1 = int(fracIndex); i2 = (i1+1)%size; mu = fracIndex-float(i1); }; rsin(pos) = lerp(tab, pos, ts) with { ts = 128; tab(i) = rdtable(ts, abs(os.sinwaveform(ts)), i); }; sineTriWaveform(roundness, tablesize) = 1.-sin(2.*ba.if(x<0.5, x, 1.-x)*asin(a))/a with { a = max(0., min(1., roundness * 0.5 + 0.5)); x = wrap(float(ba.time)/float(tablesize)); wrap(p) = p-float(int(p)); }; sineTri(roundness, pos) = lerp(tab, pos, ts) with { ts = 128; tab(i) = rdtable(ts, sineTriWaveform(roundness, ts), i); }; expTriWaveform(roundness, slopeUp, slopeDown, tablesize) = ba.if(x<0.5, expUp, expDown) with { normExp(a, b, x) = (1.-pow(a, -b*x))/(1.-pow(a, -b)); expUp = 1.-normExp(roundness, slopeUp, (-x+0.5)*2); expDown = 1.-normExp(roundness, slopeDown, (x-0.5)*2); x = wrap(float(ba.time)/float(tablesize)); wrap(p) = p-float(int(p)); }; expTri(roundness, slopeUp, slopeDown, pos) = lerp(tab, pos, ts) with { ts = 128; tab(i) = rdtable(ts, expTriWaveform(roundness, slopeUp, slopeDown, ts), i); }; process_mono(x) = mono_phaser(x, os.lf_sawpos(lf)); process_stereo(x1, x2) = stereo_phaser(x1, x2, os.lf_sawpos(lf)); process = process_mono;
a9550b04cf21e0ba1e158444dcb20c75deaf434cc8a3ea10e3f58a286a5c1c1d
guizmo2000/WebAudioPluginBank
stonePhaserJari.dsp
declare name "Stone Phaser"; declare author "Jean Pierre Cimalando"; declare version "1.2.2"; declare license "CC0-1.0"; // Référence : // Kiiski, R., Esqueda, F., & Välimäki, V. (2016). // Time-variant gray-box modeling of a phaser pedal. // In 19th International Conference on Digital Audio Effects (DAFx-16). import("stdfaust.lib"); ///////////// // Control // ///////////// bypass = checkbox("[0] Bypass [symbol:bypass]"); color = hslider("[1] Color [symbol:color] [boolean] [style:knob]", 1, 0, 1, 1); lf = hslider("[2] LFO frequency [symbol:lfo_frequency] [unit:Hz] [scale:log][style:knob]", 0.2, 0.01, 5., 0.01) : tsmooth; fb = hslider("[3] Feedback depth [symbol:feedback_depth] [unit:%] [integer][style:knob]", 75, 0, 99, 1) : *(0.01) : tsmooth; fbHf = hslider("[4] Feedback bass cut [abbrev:Fb bass cut] [symbol:feedback_hpf_cutoff] [style:knob][unit:Hz] [scale:log]", 500., 10., 5000., 1.) : tsmooth; dw = hslider("[5] Dry wet mix [symbol:mix] [unit:%] [integer][style:knob]", 50, 0, 100, 1) : *(0.01); w = sin(dw*(ma.PI/2)) : tsmooth; d = cos(dw*(ma.PI/2)) : tsmooth; ph = hslider("[6] Stereo phase [symbol:stereo_phase] [unit:deg][style:knob] [integer]", 0., -180., +180., 1.) : /(360.) : +(1.) : tsmooth; ////////////////////////// // All-pass filter unit // ////////////////////////// allpass1(f) = fi.iir((a,1.),(a)) with { a = -1.+2.*ma.PI*f/ma.SR; }; ////////////////////// // High-pass filter // ////////////////////// highpass1(f) = fi.iir((0.5*(1.+p), -0.5*(1.+p)), (-p)) with { p = exp(-2.*ma.PI*f/ma.SR); }; ////////////////////// // Low-pass filter // ////////////////////// lowpass1(f) = fi.iir((1.-p), (-p)) with { p = exp(-2.*ma.PI*f/ma.SR); }; //////////////////////////////////////////// // Smooth filter with fixed time constant // //////////////////////////////////////////// tsmooth = si.smooth(ba.tau2pole(t)) with { t = 100e-3; }; ////////// // LFOs // ////////// lfoTriangle(pos, y1, y2) = val*(y2-y1)+y1 with { val = 1.-abs(2.*pos-1.); }; lfoRectifiedSine(pos, y1, y2) = val*(y2-y1)+y1 with { val = rsin(pos); }; lfoAnalogTriangle(roundness, pos, y1, y2) = val*(y2-y1)+y1 with { val = sineTri(roundness, pos); }; lfoExponentialTriangle(roundness, slopeUp, slopeDown, pos, y1, y2) = val*(y2-y1)+y1 with { val = expTri(roundness, slopeUp, slopeDown, pos); }; //////////// // Phaser // //////////// mono_phaser(x, lfo_pos) = (fadeBypass * x) + (1. - fadeBypass) * (dry + wet) with { dry = x*d; wet = (x <: highpass1(33.0) : (+:a1:a2:a3:a4)~feedback)*w; fadeBypass = bypass : tsmooth; colorFb = ba.if(color, fb, 0.1*fb) : tsmooth; feedback = highpass1(fbHf) : *(colorFb); lfoLoF = ba.if(color, ba.hz2midikey(80.), ba.hz2midikey(300.)) : tsmooth; lfoHiF = ba.if(color, ba.hz2midikey(2200.), ba.hz2midikey(6000.)) : tsmooth; modFreq = ba.midikey2hz(lfoAnalogTriangle(0.95, lfo_pos, lfoLoF, lfoHiF)); //modFreq = ba.midikey2hz(lfoExponentialTriangle(128., 0.6, 0.9, lfo_pos, lfoLoF, lfoHiF)); a1 = allpass1(modFreq); a2 = allpass1(modFreq); a3 = allpass1(modFreq); a4 = allpass1(modFreq); }; stereo_phaser(x1, x2, lfo_pos) = mono_phaser(x1, lfo_pos), mono_phaser(x2, lfo_pos2) with { lfo_pos2 = wrap(lfo_pos + ph); wrap(p) = p-float(int(p)); }; ///////////// // Utility // ///////////// lerp(tab, pos, size) = (tab(i1), tab(i2)) : si.interpolate(mu) with { fracIndex = pos*size; i1 = int(fracIndex); i2 = (i1+1)%size; mu = fracIndex-float(i1); }; rsin(pos) = lerp(tab, pos, ts) with { ts = 128; tab(i) = rdtable(ts, abs(os.sinwaveform(ts)), i); }; sineTriWaveform(roundness, tablesize) = 1.-sin(2.*ba.if(x<0.5, x, 1.-x)*asin(a))/a with { a = max(0., min(1., roundness * 0.5 + 0.5)); x = wrap(float(ba.time)/float(tablesize)); wrap(p) = p-float(int(p)); }; sineTri(roundness, pos) = lerp(tab, pos, ts) with { ts = 128; tab(i) = rdtable(ts, sineTriWaveform(roundness, ts), i); }; /* # Gnuplot code of the sineTri function sineTri(r, x)=sineTri_(r, wrap(x+0.5)) sineTri_(r, x)=1.-sin(((x<0.5)?x:(1.-x))*2.*asin(r))/r wrap(x)=x-floor(x) set xrange [0:1] plot(sineTri(0.99, x)) */ expTriWaveform(roundness, slopeUp, slopeDown, tablesize) = ba.if(x<0.5, expUp, expDown) with { normExp(a, b, x) = (1.-pow(a, -b*x))/(1.-pow(a, -b)); expUp = 1.-normExp(roundness, slopeUp, (-x+0.5)*2); expDown = 1.-normExp(roundness, slopeDown, (x-0.5)*2); x = wrap(float(ba.time)/float(tablesize)); wrap(p) = p-float(int(p)); }; expTri(roundness, slopeUp, slopeDown, pos) = lerp(tab, pos, ts) with { ts = 128; tab(i) = rdtable(ts, expTriWaveform(roundness, slopeUp, slopeDown, ts), i); }; /* # Gnuplot code of the expTri function roundness=128 slopeUp = 0.6 slopeDown = 0.9 normExp(a,b,x)=(1.-a**-(b*x))/(1.-a**-b) set xrange [0:1] plot (x<0.5) ? (1.-normExp(roundness, slopeUp, (-x+0.5)*2)) : (1.-normExp(roundness, slopeDown, (x-0.5)*2)) */ ////////// // Main // ////////// process_mono(x) = mono_phaser(x, os.lf_sawpos(lf)); process_stereo(x1, x2) = stereo_phaser(x1, x2, os.lf_sawpos(lf)); process = process_mono;
https://raw.githubusercontent.com/guizmo2000/WebAudioPluginBank/9d7a3c1bd0977d57316046c116c217dccd6caa10/Buffa/stonePhaserJari/stonePhaserJari.dsp
faust
Référence : Kiiski, R., Esqueda, F., & Välimäki, V. (2016). Time-variant gray-box modeling of a phaser pedal. In 19th International Conference on Digital Audio Effects (DAFx-16). /////////// Control // /////////// //////////////////////// All-pass filter unit // //////////////////////// //////////////////// High-pass filter // //////////////////// //////////////////// Low-pass filter // //////////////////// ////////////////////////////////////////// Smooth filter with fixed time constant // ////////////////////////////////////////// //////// LFOs // //////// ////////// Phaser // ////////// modFreq = ba.midikey2hz(lfoExponentialTriangle(128., 0.6, 0.9, lfo_pos, lfoLoF, lfoHiF)); /////////// Utility // /////////// # Gnuplot code of the sineTri function sineTri(r, x)=sineTri_(r, wrap(x+0.5)) sineTri_(r, x)=1.-sin(((x<0.5)?x:(1.-x))*2.*asin(r))/r wrap(x)=x-floor(x) set xrange [0:1] plot(sineTri(0.99, x)) # Gnuplot code of the expTri function roundness=128 slopeUp = 0.6 slopeDown = 0.9 normExp(a,b,x)=(1.-a**-(b*x))/(1.-a**-b) set xrange [0:1] plot (x<0.5) ? (1.-normExp(roundness, slopeUp, (-x+0.5)*2)) : (1.-normExp(roundness, slopeDown, (x-0.5)*2)) //////// Main // ////////
declare name "Stone Phaser"; declare author "Jean Pierre Cimalando"; declare version "1.2.2"; declare license "CC0-1.0"; import("stdfaust.lib"); bypass = checkbox("[0] Bypass [symbol:bypass]"); color = hslider("[1] Color [symbol:color] [boolean] [style:knob]", 1, 0, 1, 1); lf = hslider("[2] LFO frequency [symbol:lfo_frequency] [unit:Hz] [scale:log][style:knob]", 0.2, 0.01, 5., 0.01) : tsmooth; fb = hslider("[3] Feedback depth [symbol:feedback_depth] [unit:%] [integer][style:knob]", 75, 0, 99, 1) : *(0.01) : tsmooth; fbHf = hslider("[4] Feedback bass cut [abbrev:Fb bass cut] [symbol:feedback_hpf_cutoff] [style:knob][unit:Hz] [scale:log]", 500., 10., 5000., 1.) : tsmooth; dw = hslider("[5] Dry wet mix [symbol:mix] [unit:%] [integer][style:knob]", 50, 0, 100, 1) : *(0.01); w = sin(dw*(ma.PI/2)) : tsmooth; d = cos(dw*(ma.PI/2)) : tsmooth; ph = hslider("[6] Stereo phase [symbol:stereo_phase] [unit:deg][style:knob] [integer]", 0., -180., +180., 1.) : /(360.) : +(1.) : tsmooth; allpass1(f) = fi.iir((a,1.),(a)) with { a = -1.+2.*ma.PI*f/ma.SR; }; highpass1(f) = fi.iir((0.5*(1.+p), -0.5*(1.+p)), (-p)) with { p = exp(-2.*ma.PI*f/ma.SR); }; lowpass1(f) = fi.iir((1.-p), (-p)) with { p = exp(-2.*ma.PI*f/ma.SR); }; tsmooth = si.smooth(ba.tau2pole(t)) with { t = 100e-3; }; lfoTriangle(pos, y1, y2) = val*(y2-y1)+y1 with { val = 1.-abs(2.*pos-1.); }; lfoRectifiedSine(pos, y1, y2) = val*(y2-y1)+y1 with { val = rsin(pos); }; lfoAnalogTriangle(roundness, pos, y1, y2) = val*(y2-y1)+y1 with { val = sineTri(roundness, pos); }; lfoExponentialTriangle(roundness, slopeUp, slopeDown, pos, y1, y2) = val*(y2-y1)+y1 with { val = expTri(roundness, slopeUp, slopeDown, pos); }; mono_phaser(x, lfo_pos) = (fadeBypass * x) + (1. - fadeBypass) * (dry + wet) with { dry = x*d; wet = (x <: highpass1(33.0) : (+:a1:a2:a3:a4)~feedback)*w; fadeBypass = bypass : tsmooth; colorFb = ba.if(color, fb, 0.1*fb) : tsmooth; feedback = highpass1(fbHf) : *(colorFb); lfoLoF = ba.if(color, ba.hz2midikey(80.), ba.hz2midikey(300.)) : tsmooth; lfoHiF = ba.if(color, ba.hz2midikey(2200.), ba.hz2midikey(6000.)) : tsmooth; modFreq = ba.midikey2hz(lfoAnalogTriangle(0.95, lfo_pos, lfoLoF, lfoHiF)); a1 = allpass1(modFreq); a2 = allpass1(modFreq); a3 = allpass1(modFreq); a4 = allpass1(modFreq); }; stereo_phaser(x1, x2, lfo_pos) = mono_phaser(x1, lfo_pos), mono_phaser(x2, lfo_pos2) with { lfo_pos2 = wrap(lfo_pos + ph); wrap(p) = p-float(int(p)); }; lerp(tab, pos, size) = (tab(i1), tab(i2)) : si.interpolate(mu) with { fracIndex = pos*size; i1 = int(fracIndex); i2 = (i1+1)%size; mu = fracIndex-float(i1); }; rsin(pos) = lerp(tab, pos, ts) with { ts = 128; tab(i) = rdtable(ts, abs(os.sinwaveform(ts)), i); }; sineTriWaveform(roundness, tablesize) = 1.-sin(2.*ba.if(x<0.5, x, 1.-x)*asin(a))/a with { a = max(0., min(1., roundness * 0.5 + 0.5)); x = wrap(float(ba.time)/float(tablesize)); wrap(p) = p-float(int(p)); }; sineTri(roundness, pos) = lerp(tab, pos, ts) with { ts = 128; tab(i) = rdtable(ts, sineTriWaveform(roundness, ts), i); }; expTriWaveform(roundness, slopeUp, slopeDown, tablesize) = ba.if(x<0.5, expUp, expDown) with { normExp(a, b, x) = (1.-pow(a, -b*x))/(1.-pow(a, -b)); expUp = 1.-normExp(roundness, slopeUp, (-x+0.5)*2); expDown = 1.-normExp(roundness, slopeDown, (x-0.5)*2); x = wrap(float(ba.time)/float(tablesize)); wrap(p) = p-float(int(p)); }; expTri(roundness, slopeUp, slopeDown, pos) = lerp(tab, pos, ts) with { ts = 128; tab(i) = rdtable(ts, expTriWaveform(roundness, slopeUp, slopeDown, ts), i); }; process_mono(x) = mono_phaser(x, os.lf_sawpos(lf)); process_stereo(x1, x2) = stereo_phaser(x1, x2, os.lf_sawpos(lf)); process = process_mono;
c186683087ad93c23f300d192ebb8bc4abf155ed42f23304108df9801f6a8fcf
guizmo2000/WebAudioPluginBank
GreyHoleRaw.dsp
declare name "GreyholeRaw"; declare version "1.0"; declare author "Julian Parker, bug fixes by Till Bovermann"; declare license "GPL2+"; declare copyright "(c) Julian Parker 2013"; import("stdfaust.lib"); fb = hslider("feedback [style:knob]",0.9,0.0,1.0,0.01):linear_interp; depth = ((ma.SR/44100)*50*hslider("modDepth [style:knob]",0.1,0.0,1.0,0.001)):linear_interp; freq = hslider("modFreq[style:knob]",2.0,0.0,10.0,0.01):linear_interp; diff = hslider("diffusion[style:knob]",0.5,0.0,0.99,0.0001):linear_interp; dt = min(65533,ma.SR*hslider("delayTime[style:knob]",0.2,0.001,1.45,0.0001)): si.smooth(0.9999); size = hslider("size[style:knob]",1.0,0.5,3.0,0.0001): si.smooth(0.9999); damp = hslider("damping[style:knob]", 0.0, 0.0, 0.99,0.001):linear_interp; linear_interp = _<:(mem,_):+:*(0.5):_; smooth_init(s,default) = *(1.0 - s) : + ~ (+(default*init(1)):*(s)) with { init(value) = value - value'; }; // using exteral function to access list of prime numbers is slightly faster than an inline approach (as of 428bf3b) //prime_delays = ffunction(int primes (int),<jprev.h>,"primes"); prime_delays(x) = (waveform {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667}, int(x)) : rdtable; diffuser_nested(1,angle,g,scale) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm)) : (( si.bus(4) :> si.bus(2) :rotator(angle) : ( de.fdelay1a(8192, prime_delays(size*scale):smooth_init(0.9999,prime_delays(size*scale)) -1 ), de.fdelay1a(8192, prime_delays(size*scale +10):smooth_init(0.9999,prime_delays(size*scale + 10)) -1 ) ) )~par(i,2,*(-s_norm))) : par(i,2,mem:*(c_norm)) ) , par(i,2,*(s_norm))) :> si.bus(2) with { rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2) with{ c = cos(angle); s = sin(angle); }; c_norm = cos(g); s_norm = sin(g); }; diffuser_nested(N,angle,g,scale) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm)) : (( si.bus(4) :> si.bus(2) : diffuser_nested(N-1,angle,g,scale+13) : rotator(angle) : ( de.fdelay1a(8192, prime_delays(size*scale):smooth_init(0.999,prime_delays(size*scale)) -1 ), de.fdelay1a(8192, prime_delays(size*scale +10):smooth_init(0.999,prime_delays(size*scale + 10)) -1 ) ) )~par(i,2,*(-s_norm))) : par(i,2,mem:*(c_norm)) ) , par(i,2,*(s_norm))) :> si.bus(2) with { rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2) with{ c = cos(angle); s = sin(angle); }; c_norm = cos(g); s_norm = sin(g); }; // blackhole = process = ( si.bus(4) :> seq(i,3,diffuser_nested(4,ma.PI/2,(-1^i)*diff,10+19*i) ):par(i,2,si.smooth(damp)) ) ~( (de.fdelay4(512, 10+depth + depth*os.oscrc(freq)),de.fdelay4(512, 10+ depth + depth*os.oscrs(freq)) ) : (de.sdelay(65536,44100/2,floor(dt)),de.sdelay(65536,44100/2,floor(dt))) : par(i,2,*(fb)) );
https://raw.githubusercontent.com/guizmo2000/WebAudioPluginBank/9d7a3c1bd0977d57316046c116c217dccd6caa10/jordan-SINTES/GreyHoleRaw/GreyHoleRaw.dsp
faust
using exteral function to access list of prime numbers is slightly faster than an inline approach (as of 428bf3b) prime_delays = ffunction(int primes (int),<jprev.h>,"primes"); blackhole =
declare name "GreyholeRaw"; declare version "1.0"; declare author "Julian Parker, bug fixes by Till Bovermann"; declare license "GPL2+"; declare copyright "(c) Julian Parker 2013"; import("stdfaust.lib"); fb = hslider("feedback [style:knob]",0.9,0.0,1.0,0.01):linear_interp; depth = ((ma.SR/44100)*50*hslider("modDepth [style:knob]",0.1,0.0,1.0,0.001)):linear_interp; freq = hslider("modFreq[style:knob]",2.0,0.0,10.0,0.01):linear_interp; diff = hslider("diffusion[style:knob]",0.5,0.0,0.99,0.0001):linear_interp; dt = min(65533,ma.SR*hslider("delayTime[style:knob]",0.2,0.001,1.45,0.0001)): si.smooth(0.9999); size = hslider("size[style:knob]",1.0,0.5,3.0,0.0001): si.smooth(0.9999); damp = hslider("damping[style:knob]", 0.0, 0.0, 0.99,0.001):linear_interp; linear_interp = _<:(mem,_):+:*(0.5):_; smooth_init(s,default) = *(1.0 - s) : + ~ (+(default*init(1)):*(s)) with { init(value) = value - value'; }; prime_delays(x) = (waveform {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667}, int(x)) : rdtable; diffuser_nested(1,angle,g,scale) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm)) : (( si.bus(4) :> si.bus(2) :rotator(angle) : ( de.fdelay1a(8192, prime_delays(size*scale):smooth_init(0.9999,prime_delays(size*scale)) -1 ), de.fdelay1a(8192, prime_delays(size*scale +10):smooth_init(0.9999,prime_delays(size*scale + 10)) -1 ) ) )~par(i,2,*(-s_norm))) : par(i,2,mem:*(c_norm)) ) , par(i,2,*(s_norm))) :> si.bus(2) with { rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2) with{ c = cos(angle); s = sin(angle); }; c_norm = cos(g); s_norm = sin(g); }; diffuser_nested(N,angle,g,scale) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm)) : (( si.bus(4) :> si.bus(2) : diffuser_nested(N-1,angle,g,scale+13) : rotator(angle) : ( de.fdelay1a(8192, prime_delays(size*scale):smooth_init(0.999,prime_delays(size*scale)) -1 ), de.fdelay1a(8192, prime_delays(size*scale +10):smooth_init(0.999,prime_delays(size*scale + 10)) -1 ) ) )~par(i,2,*(-s_norm))) : par(i,2,mem:*(c_norm)) ) , par(i,2,*(s_norm))) :> si.bus(2) with { rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2) with{ c = cos(angle); s = sin(angle); }; c_norm = cos(g); s_norm = sin(g); }; process = ( si.bus(4) :> seq(i,3,diffuser_nested(4,ma.PI/2,(-1^i)*diff,10+19*i) ):par(i,2,si.smooth(damp)) ) ~( (de.fdelay4(512, 10+depth + depth*os.oscrc(freq)),de.fdelay4(512, 10+ depth + depth*os.oscrs(freq)) ) : (de.sdelay(65536,44100/2,floor(dt)),de.sdelay(65536,44100/2,floor(dt))) : par(i,2,*(fb)) );
42de1c72c846faa7e49b4ada4a9992bdfcc489d6d6c8baa654a4d341b025d951
guizmo2000/WebAudioPluginBank
ReverbRaw.dsp
declare name "JPverbRaw"; declare version "1.1"; declare author "Julian Parker, bug fixes by Till Bovermann"; declare license "GPL2+"; declare copyright "(c) Julian Parker 2013"; import("stdfaust.lib"); allpass_stretched(maxdel,N,a) = (+ <: de.fdelay1a(maxdel,N-1),*(a)) ~ *(-a) : mem, _ : + ; // using exteral function to access list of prime numbers is slightly faster than an inline approach (as of 428bf3b) //prime_delays = ffunction(int primes (int),<jprev.h>,"primes"); prime_delays(x) = (waveform {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667}, int(x)) : rdtable; // gi = 1.618; depth = 50*hslider("mDepth[style:knob]",0.1,0.0,1.0,0.001); freq = hslider("mFreq[style:knob]",2.0,0.0,10.0,0.01); wet = hslider("wet[style:knob]",0.5,0.0,1.0,0.01); low = hslider("lowX[style:knob]",1.0,0.0,1.0,0.01); mid = hslider("midX[style:knob]",1.0,0.0,1.0,0.01); high = hslider("highX[style:knob]",1.0,0.0,1.0,0.01); early_diff = hslider("earlyDiff[style:knob]", 0.707, 0.0 ,0.99,0.001); low_cutoff = hslider("lowBand[style:knob]",500,100.0,6000.0,0.1); high_cutoff = hslider("highBand[style:knob]",2000,1000.0,10000.0,0.1); size = hslider("size[style:knob]",1.0, 0.5,3.0,0.01): si.smooth(0.9999); T60 = hslider("t60[style:knob]",1.0,0.1,60.0,0.1): si.smooth(0.9999); damping = hslider("damp[style:knob]",0.0,0.0,0.999,0.0001); calib = 1.7; // Calibration constant given by T60 in seconds when fb = 0.5 total_length = calib*0.1*(size*5/4 -1/4); fb = 10^(-3/((T60)/(total_length))); smooth_init(s,default) = *(1.0 - s) : + ~ (+(default*init(1)):*(s)) with { init(value) = value - value'; }; diffuser(angle,g,scale1,scale2) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm)) : (( si.bus(4) :> si.bus(2) :rotator(angle) : ( de.fdelay1a(8192, prime_delays(size*scale1):smooth_init(0.9999,prime_delays(size*scale1)) -1 ), de.fdelay1a(8192, prime_delays(size*scale2):smooth_init(0.9999,prime_delays(size*scale2)) -1 ) ) )~par(i,2,*(-s_norm))) : par(i,2,mem:*(c_norm)) ) , par(i,2,*(s_norm))) :> si.bus(2) with { rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2) with{ c = cos(angle); s = sin(angle); }; c_norm = cos(g); s_norm = sin(g); }; reverb = ( ( si.bus(4) :> (de.fdelay4(512, depth + depth*os.oscrs(freq) +5 ),de.fdelay4(512, depth + depth*os.oscrc(freq)+ 5 ) ) : par(i,2,si.smooth(damping)) : diffuser(ma.PI/4,early_diff,55,240) :diffuser(ma.PI/4,early_diff,215,85):diffuser(ma.PI/4,early_diff,115,190):diffuser(ma.PI/4,early_diff,175,145) ) ~( seq(i,5,diffuser(ma.PI/4,0.707,10+30*i,110 + 30*i) ): par(i,2,de.fdelay4(512, depth + (-1^i)*depth*os.oscrc(freq)+5):de.fdelay1a(8192,(prime_delays(size*(54+150*i)):smooth_init(0.995,prime_delays(size*(54+150*i)))) -1 )) : seq(i,5,diffuser(ma.PI/4,0.707,125+30*i, 25+30*i) ): par(i,2,de.fdelay4(8192, depth + (-1^i)*depth*os.oscrs(freq) + 5) : de.fdelay1a(8192,(prime_delays(size*(134-100*i)):smooth_init(0.995,prime_delays(size*(134-100*i)))) -1 )) : par(i,2, fi.filterbank(5,(low_cutoff,high_cutoff) ):(_*(high),_*(mid),_*(low)) :> _ ): par(i,2,*(fb)) )); //Alesis Style 2-channel // with wet control // process = (_,_) <: ((reverb:par(i,2,_*(wet))), par(i,2,_*(1-wet))) :> (_,_); // without wet control process = (_,_) : reverb : (_,_);
https://raw.githubusercontent.com/guizmo2000/WebAudioPluginBank/9d7a3c1bd0977d57316046c116c217dccd6caa10/jordan-SINTES/ReverbRaw/ReverbRaw.dsp
faust
using exteral function to access list of prime numbers is slightly faster than an inline approach (as of 428bf3b) prime_delays = ffunction(int primes (int),<jprev.h>,"primes"); gi = 1.618; Calibration constant given by T60 in seconds when fb = 0.5 Alesis Style 2-channel with wet control process = (_,_) <: ((reverb:par(i,2,_*(wet))), par(i,2,_*(1-wet))) :> (_,_); without wet control
declare name "JPverbRaw"; declare version "1.1"; declare author "Julian Parker, bug fixes by Till Bovermann"; declare license "GPL2+"; declare copyright "(c) Julian Parker 2013"; import("stdfaust.lib"); allpass_stretched(maxdel,N,a) = (+ <: de.fdelay1a(maxdel,N-1),*(a)) ~ *(-a) : mem, _ : + ; prime_delays(x) = (waveform {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667}, int(x)) : rdtable; depth = 50*hslider("mDepth[style:knob]",0.1,0.0,1.0,0.001); freq = hslider("mFreq[style:knob]",2.0,0.0,10.0,0.01); wet = hslider("wet[style:knob]",0.5,0.0,1.0,0.01); low = hslider("lowX[style:knob]",1.0,0.0,1.0,0.01); mid = hslider("midX[style:knob]",1.0,0.0,1.0,0.01); high = hslider("highX[style:knob]",1.0,0.0,1.0,0.01); early_diff = hslider("earlyDiff[style:knob]", 0.707, 0.0 ,0.99,0.001); low_cutoff = hslider("lowBand[style:knob]",500,100.0,6000.0,0.1); high_cutoff = hslider("highBand[style:knob]",2000,1000.0,10000.0,0.1); size = hslider("size[style:knob]",1.0, 0.5,3.0,0.01): si.smooth(0.9999); T60 = hslider("t60[style:knob]",1.0,0.1,60.0,0.1): si.smooth(0.9999); damping = hslider("damp[style:knob]",0.0,0.0,0.999,0.0001); total_length = calib*0.1*(size*5/4 -1/4); fb = 10^(-3/((T60)/(total_length))); smooth_init(s,default) = *(1.0 - s) : + ~ (+(default*init(1)):*(s)) with { init(value) = value - value'; }; diffuser(angle,g,scale1,scale2) = si.bus(2) <: ( (si.bus(2) :par(i,2,*(c_norm)) : (( si.bus(4) :> si.bus(2) :rotator(angle) : ( de.fdelay1a(8192, prime_delays(size*scale1):smooth_init(0.9999,prime_delays(size*scale1)) -1 ), de.fdelay1a(8192, prime_delays(size*scale2):smooth_init(0.9999,prime_delays(size*scale2)) -1 ) ) )~par(i,2,*(-s_norm))) : par(i,2,mem:*(c_norm)) ) , par(i,2,*(s_norm))) :> si.bus(2) with { rotator(angle) = si.bus(2) <: (*(c),*(-s),*(s),*(c)) :(+,+) : si.bus(2) with{ c = cos(angle); s = sin(angle); }; c_norm = cos(g); s_norm = sin(g); }; reverb = ( ( si.bus(4) :> (de.fdelay4(512, depth + depth*os.oscrs(freq) +5 ),de.fdelay4(512, depth + depth*os.oscrc(freq)+ 5 ) ) : par(i,2,si.smooth(damping)) : diffuser(ma.PI/4,early_diff,55,240) :diffuser(ma.PI/4,early_diff,215,85):diffuser(ma.PI/4,early_diff,115,190):diffuser(ma.PI/4,early_diff,175,145) ) ~( seq(i,5,diffuser(ma.PI/4,0.707,10+30*i,110 + 30*i) ): par(i,2,de.fdelay4(512, depth + (-1^i)*depth*os.oscrc(freq)+5):de.fdelay1a(8192,(prime_delays(size*(54+150*i)):smooth_init(0.995,prime_delays(size*(54+150*i)))) -1 )) : seq(i,5,diffuser(ma.PI/4,0.707,125+30*i, 25+30*i) ): par(i,2,de.fdelay4(8192, depth + (-1^i)*depth*os.oscrs(freq) + 5) : de.fdelay1a(8192,(prime_delays(size*(134-100*i)):smooth_init(0.995,prime_delays(size*(134-100*i)))) -1 )) : par(i,2, fi.filterbank(5,(low_cutoff,high_cutoff) ):(_*(high),_*(mid),_*(low)) :> _ ): par(i,2,*(fb)) )); process = (_,_) : reverb : (_,_);
ddb75dc12593cd7376b74428a1e06f679d315ea9e1a14782e4510e8a6da418c9
polyeffects/PolyLV2
vibrato_ext.dsp
import("stdfaust.lib"); vibrato2_mono(sections,fb,width,frqmin,fratio,frqmax, lfo) = (+ : seq(i,sections,ap2p(R,th(i)))) ~ *(fb) with { //tf2 = component("filters.lib").tf2; // second-order resonant digital allpass given pole radius and angle: ap2p(R,th) = fi.tf2(a2,a1,1,a1,a2) with { a2 = R^2; a1 = -2*R*cos(th); }; R = exp(-pi*width/ma.SR); pi = 4*atan(1); thmin = 2*pi*frqmin/ma.SR; thmax = 2*pi*frqmax/ma.SR; th1 = thmin + (thmax-thmin)*lfo; th(i) = (fratio^(i+1))*th1; }; phaser2_mono(Notches,width,frqmin,fratio,frqmax,depth,fb,invert, lfo) = _ <: *(g1) + g2mi*vibrato2_mono(Notches, fb,width,frqmin,fratio,frqmax, lfo) with { // depth=0 => direct-signal only g1 = 1-depth/2; // depth=1 => phaser mode (equal sum of direct and allpass-chain) g2 = depth/2; // depth=2 => vibrato mode (allpass-chain signal only) g2mi = select2(invert,g2,-g2); // inversion negates the allpass-chain signal }; process = phaser2_demo; phaser2_demo(lfo) = phaser2_mono(Notches, width,frqmin,fratio,frqmax, mdepth,fb,invert, lfo); phaser2_group(x) = vgroup("PHASER2 [tooltip: Reference: https://ccrma.stanford.edu/~jos/pasp/Flanging.html]", x); meter_group(x) = phaser2_group(hgroup("[0]", x)); ctl_group(x) = phaser2_group(hgroup("[1]", x)); nch_group(x) = phaser2_group(hgroup("[2]", x)); lvl_group(x) = phaser2_group(hgroup("[3]", x)); invert = meter_group(checkbox("[1] Invert Internal Phaser Sum")); vibr = meter_group(checkbox("[2] Vibrato Mode")); // In this mode you can hear any "Doppler" Notches = 6; // Compile-time parameter: 4 is typical for analog phaser stomp-boxes depth = ctl_group(hslider("[2] Notch Depth (Intensity) [style:knob]", 1, 0, 1, 0.001)); fb = ctl_group(hslider("[3] Feedback Gain [style:knob]", 0, -0.999, 0.999, 0.001)); width = nch_group(hslider("[1] Notch width [unit:Hz] [style:knob] [scale:log]", 1000, 10, 5000, 1)); frqmin = nch_group(hslider("[2] Min Notch1 Freq [unit:Hz] [style:knob] [scale:log]", 100, 20, 5000, 1)); frqmax = nch_group(hslider("[3] Max Notch1 Freq [unit:Hz] [style:knob] [scale:log]", 800, 20, 10000, 1)) : max(frqmin); fratio = nch_group(hslider("[4] Notch Freq Ratio [style:knob]", 1.5, 1.1, 4, 0.001)); mdepth = select2(vibr,depth,2); // Improve "ease of use"
https://raw.githubusercontent.com/polyeffects/PolyLV2/a363599f74fd1bce0b3744221e1883fdbe89c557/poly_vibrato_ext/vibrato_ext.dsp
faust
tf2 = component("filters.lib").tf2; second-order resonant digital allpass given pole radius and angle: depth=0 => direct-signal only depth=1 => phaser mode (equal sum of direct and allpass-chain) depth=2 => vibrato mode (allpass-chain signal only) inversion negates the allpass-chain signal ccrma.stanford.edu/~jos/pasp/Flanging.html]", x); In this mode you can hear any "Doppler" Compile-time parameter: 4 is typical for analog phaser stomp-boxes Improve "ease of use"
import("stdfaust.lib"); vibrato2_mono(sections,fb,width,frqmin,fratio,frqmax, lfo) = (+ : seq(i,sections,ap2p(R,th(i)))) ~ *(fb) with { ap2p(R,th) = fi.tf2(a2,a1,1,a1,a2) with { a2 = R^2; a1 = -2*R*cos(th); }; R = exp(-pi*width/ma.SR); pi = 4*atan(1); thmin = 2*pi*frqmin/ma.SR; thmax = 2*pi*frqmax/ma.SR; th1 = thmin + (thmax-thmin)*lfo; th(i) = (fratio^(i+1))*th1; }; phaser2_mono(Notches,width,frqmin,fratio,frqmax,depth,fb,invert, lfo) = _ <: *(g1) + g2mi*vibrato2_mono(Notches, fb,width,frqmin,fratio,frqmax, lfo) }; process = phaser2_demo; phaser2_demo(lfo) = phaser2_mono(Notches, width,frqmin,fratio,frqmax, mdepth,fb,invert, lfo); phaser2_group(x) = vgroup("PHASER2 [tooltip: Reference: meter_group(x) = phaser2_group(hgroup("[0]", x)); ctl_group(x) = phaser2_group(hgroup("[1]", x)); nch_group(x) = phaser2_group(hgroup("[2]", x)); lvl_group(x) = phaser2_group(hgroup("[3]", x)); invert = meter_group(checkbox("[1] Invert Internal Phaser Sum")); depth = ctl_group(hslider("[2] Notch Depth (Intensity) [style:knob]", 1, 0, 1, 0.001)); fb = ctl_group(hslider("[3] Feedback Gain [style:knob]", 0, -0.999, 0.999, 0.001)); width = nch_group(hslider("[1] Notch width [unit:Hz] [style:knob] [scale:log]", 1000, 10, 5000, 1)); frqmin = nch_group(hslider("[2] Min Notch1 Freq [unit:Hz] [style:knob] [scale:log]", 100, 20, 5000, 1)); frqmax = nch_group(hslider("[3] Max Notch1 Freq [unit:Hz] [style:knob] [scale:log]", 800, 20, 10000, 1)) : max(frqmin); fratio = nch_group(hslider("[4] Notch Freq Ratio [style:knob]", 1.5, 1.1, 4, 0.001));
2221f6062cbdeda146590d6a4c89f9a01070af21fa7d2fe776dcea432b193709
polyeffects/PolyLV2
vibrato.dsp
import("stdfaust.lib"); vibrato2_mono(sections,phase01,fb,width,frqmin,fratio,frqmax,speed) = (+ : seq(i,sections,ap2p(R,th(i)))) ~ *(fb) with { //tf2 = component("filters.lib").tf2; // second-order resonant digital allpass given pole radius and angle: ap2p(R,th) = fi.tf2(a2,a1,1,a1,a2) with { a2 = R^2; a1 = -2*R*cos(th); }; R = exp(-pi*width/ma.SR); cososc = os.oscrc; // oscillators.lib sinosc = os.oscrs; // oscillators.lib osc = cososc(speed) * phase01 + sinosc(speed) * (1-phase01); lfo = (1-osc)/2; // in [0,1] pi = 4*atan(1); thmin = 2*pi*frqmin/ma.SR; thmax = 2*pi*frqmax/ma.SR; th1 = thmin + (thmax-thmin)*lfo; th(i) = (fratio^(i+1))*th1; }; phaser2_mono(Notches,phase01,width,frqmin,fratio,frqmax,speed,depth,fb,invert) = _ <: *(g1) + g2mi*vibrato2_mono(Notches,phase01,fb,width,frqmin,fratio,frqmax,speed) with { // depth=0 => direct-signal only g1 = 1-depth/2; // depth=1 => phaser mode (equal sum of direct and allpass-chain) g2 = depth/2; // depth=2 => vibrato mode (allpass-chain signal only) g2mi = select2(invert,g2,-g2); // inversion negates the allpass-chain signal }; process = phaser2_demo; phaser2_demo = pf.phaser2_mono(Notches,phase01, width,frqmin,fratio,frqmax,rate,mdepth,fb,invert); phaser2_group(x) = vgroup("PHASER2 [tooltip: Reference: https://ccrma.stanford.edu/~jos/pasp/Flanging.html]", x); meter_group(x) = phaser2_group(hgroup("[0]", x)); ctl_group(x) = phaser2_group(hgroup("[1]", x)); nch_group(x) = phaser2_group(hgroup("[2]", x)); lvl_group(x) = phaser2_group(hgroup("[3]", x)); invert = meter_group(checkbox("[1] Invert Internal Phaser Sum")); vibr = meter_group(checkbox("[2] Vibrato Mode")); // In this mode you can hear any "Doppler" Notches = 6; // Compile-time parameter: 4 is typical for analog phaser stomp-boxes bpm = vslider("[1] BPM [midi:ctrl 2] [style:knob]", 30, 4, 300, 0.01); rateT60 = 0.15661; rate = bpm / 60 : si.smooth(ba.tau2pole(rateT60/6.91)); depth = ctl_group(hslider("[2] Notch Depth (Intensity) [style:knob]", 1, 0, 1, 0.001)); fb = ctl_group(hslider("[3] Feedback Gain [style:knob]", 0, -0.999, 0.999, 0.001)); phase01 = ctl_group(hslider("[5] Phase [style:knob]", 0, 0, 1, 0.001)); width = nch_group(hslider("[1] Notch width [unit:Hz] [style:knob] [scale:log]", 1000, 10, 5000, 1)); frqmin = nch_group(hslider("[2] Min Notch1 Freq [unit:Hz] [style:knob] [scale:log]", 100, 20, 5000, 1)); frqmax = nch_group(hslider("[3] Max Notch1 Freq [unit:Hz] [style:knob] [scale:log]", 800, 20, 10000, 1)) : max(frqmin); fratio = nch_group(hslider("[4] Notch Freq Ratio [style:knob]", 1.5, 1.1, 4, 0.001)); mdepth = select2(vibr,depth,2); // Improve "ease of use"
https://raw.githubusercontent.com/polyeffects/PolyLV2/a363599f74fd1bce0b3744221e1883fdbe89c557/poly_vibrato/vibrato.dsp
faust
tf2 = component("filters.lib").tf2; second-order resonant digital allpass given pole radius and angle: oscillators.lib oscillators.lib in [0,1] depth=0 => direct-signal only depth=1 => phaser mode (equal sum of direct and allpass-chain) depth=2 => vibrato mode (allpass-chain signal only) inversion negates the allpass-chain signal ccrma.stanford.edu/~jos/pasp/Flanging.html]", x); In this mode you can hear any "Doppler" Compile-time parameter: 4 is typical for analog phaser stomp-boxes Improve "ease of use"
import("stdfaust.lib"); vibrato2_mono(sections,phase01,fb,width,frqmin,fratio,frqmax,speed) = (+ : seq(i,sections,ap2p(R,th(i)))) ~ *(fb) with { ap2p(R,th) = fi.tf2(a2,a1,1,a1,a2) with { a2 = R^2; a1 = -2*R*cos(th); }; R = exp(-pi*width/ma.SR); osc = cososc(speed) * phase01 + sinosc(speed) * (1-phase01); pi = 4*atan(1); thmin = 2*pi*frqmin/ma.SR; thmax = 2*pi*frqmax/ma.SR; th1 = thmin + (thmax-thmin)*lfo; th(i) = (fratio^(i+1))*th1; }; phaser2_mono(Notches,phase01,width,frqmin,fratio,frqmax,speed,depth,fb,invert) = _ <: *(g1) + g2mi*vibrato2_mono(Notches,phase01,fb,width,frqmin,fratio,frqmax,speed) }; process = phaser2_demo; phaser2_demo = pf.phaser2_mono(Notches,phase01, width,frqmin,fratio,frqmax,rate,mdepth,fb,invert); phaser2_group(x) = vgroup("PHASER2 [tooltip: Reference: meter_group(x) = phaser2_group(hgroup("[0]", x)); ctl_group(x) = phaser2_group(hgroup("[1]", x)); nch_group(x) = phaser2_group(hgroup("[2]", x)); lvl_group(x) = phaser2_group(hgroup("[3]", x)); invert = meter_group(checkbox("[1] Invert Internal Phaser Sum")); bpm = vslider("[1] BPM [midi:ctrl 2] [style:knob]", 30, 4, 300, 0.01); rateT60 = 0.15661; rate = bpm / 60 : si.smooth(ba.tau2pole(rateT60/6.91)); depth = ctl_group(hslider("[2] Notch Depth (Intensity) [style:knob]", 1, 0, 1, 0.001)); fb = ctl_group(hslider("[3] Feedback Gain [style:knob]", 0, -0.999, 0.999, 0.001)); phase01 = ctl_group(hslider("[5] Phase [style:knob]", 0, 0, 1, 0.001)); width = nch_group(hslider("[1] Notch width [unit:Hz] [style:knob] [scale:log]", 1000, 10, 5000, 1)); frqmin = nch_group(hslider("[2] Min Notch1 Freq [unit:Hz] [style:knob] [scale:log]", 100, 20, 5000, 1)); frqmax = nch_group(hslider("[3] Max Notch1 Freq [unit:Hz] [style:knob] [scale:log]", 800, 20, 10000, 1)) : max(frqmin); fratio = nch_group(hslider("[4] Notch Freq Ratio [style:knob]", 1.5, 1.1, 4, 0.001));
f38f1d88ba70c2017b55ff432e8f3cef51c779a4996c8762808e0d5a70b539fb
polyeffects/digit_carla
digit_delay.dsp
import("stdfaust.lib"); echo_group(x) = x; knobs_group(x) = vgroup("[0] Knobs",x); switches_group(x) = vgroup("[1] Switches",x); dmax = 1048576; // 21 seconds dmaxs = float(dmax)/48000.0; Nnines = 1.8; // Increase until you get the desired maximum amount of smoothing when fbs==1 fastpow2 = ffunction(float fastpow2(float), "fast_pow2.h", ""); fbspr(fbs) = 1.0 - fastpow2(-3.33219*Nnines*fbs); // pole radius of feedback smoother inputSelect(gi) = _,0 : select2(gi); echo_mono(dmax,curdel,tapdel,fb,fbspr,gi) = inputSelect(gi) : (+:si.smooth(fbspr) <: de.fdelay(dmax,curdel), de.fdelay(dmax,tapdel)) ~(*(fb),!) : !,_; tau2pole(tau) = ba.if(tau>0, exp(-1.0/(tau*ma.SR)), 0.0); t60smoother(dEchoT60) = si.smooth(tau2pole(dEchoT60/6.91)); bpmT60 = 0.15661; dBPM = knobs_group(vslider("[0] BPM [midi:ctrl 63] [style:knob]", 120.0, 30.00, 300, 0.1)); dEchoT60 = knobs_group(vslider("[1] DelayT60 [midi:ctrl 60] [style:knob]", 0.5, 0, 100, 0.001)); dEchoBeats = knobs_group(vslider("[0] Delay [midi:ctrl 61] [style:knob]", 0.5, 0.001, 16.0, 0.001)); dEchoSamplesRaw = (60.0 / dBPM) * dEchoBeats * ma.SR; // beats to sample time dEchoSamples = dEchoSamplesRaw : t60smoother(dEchoT60); warpRaw = knobs_group(vslider("[0] Warp [midi:ctrl 62] [style:knob]", 0, -1.0, 1.0, 0.001)); scrubAmpRaw = 0; scrubPhaseRaw = 0; fb = knobs_group(vslider("[2] Feedback [midi:ctrl 2] [style:knob]", .3, 0.0, 1.0, 0.0001)); amp = knobs_group(vslider("[3] Amp [midi:ctrl 75] [style:knob]", .5, 0, 1, 0.001)) : si.smooth(ba.tau2pole(ampT60/6.91)); ampT60 = 0.15661; fbs = knobs_group(vslider("[5] [midi:ctrl 76] FeedbackSm [style:knob]", 0, 0, 1, 0.00001)); gi = switches_group(1-vslider("[7] [midi:ctrl 105] EnableEcho[style:knob]",0,0,1,1)); // "ground input" switches input to zeros // Warp and Scrubber stuff: enableEcho = (scrubAmpRaw > 0.00001); triggerScrubOn = (enableEcho - enableEcho') > 0; // enableEcho went 0 to 1 triggerScrubOff = (enableEcho - enableEcho') < 0; // enableEcho went 1 to 0 // Ramps up only during scrub "hold" time and is otherwise zero: counter = (enableEcho * (triggerScrubOn : + ~ +(1) * enableEcho : -(2))) & (dmax-1); // implementation that continues scrubbing where it left off: scrubPhase = scrubPhaseRaw : t60smoother(dEchoT60*(1-triggerScrubOff)); scrubAmp = scrubAmpRaw : t60smoother(dEchoT60*(1-triggerScrubOff)); warp = warpRaw : t60smoother(dEchoT60); dTapSamplesRaw = dEchoSamplesRaw * (1.0 + warp + scrubPhase * scrubAmp) + float(counter); dTapSamples = dTapSamplesRaw : t60smoother(dEchoT60*(1-triggerScrubOff)); // process = _ <: _, amp * echo_mono(dmax,dEchoSamples,dTapSamples,fb,fbspr(fbs),gi) : +; process = _ : amp * echo_mono(dmax,dEchoSamples,dTapSamples,fb,fbspr(fbs),gi);
https://raw.githubusercontent.com/polyeffects/digit_carla/75609d7dd365628fca044f64a7141686853e7945/LV2/digit_delay/digit_delay.dsp
faust
21 seconds Increase until you get the desired maximum amount of smoothing when fbs==1 pole radius of feedback smoother beats to sample time "ground input" switches input to zeros Warp and Scrubber stuff: enableEcho went 0 to 1 enableEcho went 1 to 0 Ramps up only during scrub "hold" time and is otherwise zero: implementation that continues scrubbing where it left off: process = _ <: _, amp * echo_mono(dmax,dEchoSamples,dTapSamples,fb,fbspr(fbs),gi) : +;
import("stdfaust.lib"); echo_group(x) = x; knobs_group(x) = vgroup("[0] Knobs",x); switches_group(x) = vgroup("[1] Switches",x); dmaxs = float(dmax)/48000.0; fastpow2 = ffunction(float fastpow2(float), "fast_pow2.h", ""); inputSelect(gi) = _,0 : select2(gi); echo_mono(dmax,curdel,tapdel,fb,fbspr,gi) = inputSelect(gi) : (+:si.smooth(fbspr) <: de.fdelay(dmax,curdel), de.fdelay(dmax,tapdel)) ~(*(fb),!) : !,_; tau2pole(tau) = ba.if(tau>0, exp(-1.0/(tau*ma.SR)), 0.0); t60smoother(dEchoT60) = si.smooth(tau2pole(dEchoT60/6.91)); bpmT60 = 0.15661; dBPM = knobs_group(vslider("[0] BPM [midi:ctrl 63] [style:knob]", 120.0, 30.00, 300, 0.1)); dEchoT60 = knobs_group(vslider("[1] DelayT60 [midi:ctrl 60] [style:knob]", 0.5, 0, 100, 0.001)); dEchoBeats = knobs_group(vslider("[0] Delay [midi:ctrl 61] [style:knob]", 0.5, 0.001, 16.0, 0.001)); dEchoSamples = dEchoSamplesRaw : t60smoother(dEchoT60); warpRaw = knobs_group(vslider("[0] Warp [midi:ctrl 62] [style:knob]", 0, -1.0, 1.0, 0.001)); scrubAmpRaw = 0; scrubPhaseRaw = 0; fb = knobs_group(vslider("[2] Feedback [midi:ctrl 2] [style:knob]", .3, 0.0, 1.0, 0.0001)); amp = knobs_group(vslider("[3] Amp [midi:ctrl 75] [style:knob]", .5, 0, 1, 0.001)) : si.smooth(ba.tau2pole(ampT60/6.91)); ampT60 = 0.15661; fbs = knobs_group(vslider("[5] [midi:ctrl 76] FeedbackSm [style:knob]", 0, 0, 1, 0.00001)); enableEcho = (scrubAmpRaw > 0.00001); counter = (enableEcho * (triggerScrubOn : + ~ +(1) * enableEcho : -(2))) & (dmax-1); scrubPhase = scrubPhaseRaw : t60smoother(dEchoT60*(1-triggerScrubOff)); scrubAmp = scrubAmpRaw : t60smoother(dEchoT60*(1-triggerScrubOff)); warp = warpRaw : t60smoother(dEchoT60); dTapSamplesRaw = dEchoSamplesRaw * (1.0 + warp + scrubPhase * scrubAmp) + float(counter); dTapSamples = dTapSamplesRaw : t60smoother(dEchoT60*(1-triggerScrubOff)); process = _ : amp * echo_mono(dmax,dEchoSamples,dTapSamples,fb,fbspr(fbs),gi);
3a377f95dca22d5166169f22898867ecc96ccc94ef8ea544ffb6f4be85b55243
polyeffects/digit_carla
echo.dsp
import("stdfaust.lib"); echo_group(x) = x; knobs_group(x) = vgroup("[0] Knobs",x); switches_group(x) = vgroup("[1] Switches",x); dmax = 1048576; // 21 seconds dmaxs = float(dmax)/48000.0; Nnines = 1.8; // Increase until you get the desired maximum amount of smoothing when fbs==1 fastpow2 = ffunction(float fastpow2(float), "fast_pow2.h", ""); fbspr(fbs) = 1.0 - fastpow2(-3.33219*Nnines*fbs); // pole radius of feedback smoother inputSelect(gi) = _,0 : select2(gi); echo_mono(dmax,curdel,tapdel,fb,fbspr,gi) = inputSelect(gi) : (+:si.smooth(fbspr) <: de.fdelay(dmax,curdel), de.fdelay(dmax,tapdel)) ~(*(fb),!) : !,_; tau2pole(tau) = ba.if(tau>0, exp(-1.0/(tau*ma.SR)), 0.0); t60smoother(dEchoT60) = si.smooth(tau2pole(dEchoT60/6.91)); bpmT60 = 0.15661; dBPM = knobs_group(vslider("[0] BPM [midi:ctrl 63] [style:knob]", 120.0, 30.00, 300, 0.1)); dEchoT60 = knobs_group(vslider("[1] DelayT60 [midi:ctrl 60] [style:knob]", 0.5, 0, 100, 0.001)); dEchoBeats = knobs_group(vslider("[0] Delay [midi:ctrl 61] [style:knob]", 0.5, 0.001, 16.0, 0.001)); dEchoSamplesRaw = (60.0 / dBPM) * dEchoBeats * ma.SR; // beats to sample time dEchoSamples = dEchoSamplesRaw : t60smoother(dEchoT60); warpRaw = knobs_group(vslider("[0] Warp [midi:ctrl 62] [style:knob]", 0, -1.0, 1.0, 0.001)); scrubAmpRaw = 0; scrubPhaseRaw = 0; fb = knobs_group(vslider("[2] Feedback [midi:ctrl 2] [style:knob]", .3, 0.0, 1.0, 0.0001)); amp = knobs_group(vslider("[3] Amp [midi:ctrl 75] [style:knob]", .5, 0, 1, 0.001)) : si.smooth(ba.tau2pole(ampT60/6.91)); ampT60 = 0.15661; fbs = knobs_group(vslider("[5] [midi:ctrl 76] FeedbackSm [style:knob]", 0, 0, 1, 0.00001)); gi = switches_group(1-vslider("[7] [midi:ctrl 105] EnableEcho[style:knob]",0,0,1,1)); // "ground input" switches input to zeros // Warp and Scrubber stuff: enableEcho = (scrubAmpRaw > 0.00001); triggerScrubOn = (enableEcho - enableEcho') > 0; // enableEcho went 0 to 1 triggerScrubOff = (enableEcho - enableEcho') < 0; // enableEcho went 1 to 0 // Ramps up only during scrub "hold" time and is otherwise zero: counter = (enableEcho * (triggerScrubOn : + ~ +(1) * enableEcho : -(2))) & (dmax-1); // implementation that continues scrubbing where it left off: scrubPhase = scrubPhaseRaw : t60smoother(dEchoT60*(1-triggerScrubOff)); scrubAmp = scrubAmpRaw : t60smoother(dEchoT60*(1-triggerScrubOff)); warp = warpRaw : t60smoother(dEchoT60); dTapSamplesRaw = dEchoSamplesRaw * (1.0 + warp + scrubPhase * scrubAmp) + float(counter); dTapSamples = dTapSamplesRaw : t60smoother(dEchoT60*(1-triggerScrubOff)); // process = _ <: _, amp * echo_mono(dmax,dEchoSamples,dTapSamples,fb,fbspr(fbs),gi) : +; process = _ <: _, amp * echo_mono(dmax,dEchoSamples,dTapSamples,fb,fbspr(fbs),gi) : +;
https://raw.githubusercontent.com/polyeffects/digit_carla/75609d7dd365628fca044f64a7141686853e7945/LV2/digit_delay/echo.dsp
faust
21 seconds Increase until you get the desired maximum amount of smoothing when fbs==1 pole radius of feedback smoother beats to sample time "ground input" switches input to zeros Warp and Scrubber stuff: enableEcho went 0 to 1 enableEcho went 1 to 0 Ramps up only during scrub "hold" time and is otherwise zero: implementation that continues scrubbing where it left off: process = _ <: _, amp * echo_mono(dmax,dEchoSamples,dTapSamples,fb,fbspr(fbs),gi) : +;
import("stdfaust.lib"); echo_group(x) = x; knobs_group(x) = vgroup("[0] Knobs",x); switches_group(x) = vgroup("[1] Switches",x); dmaxs = float(dmax)/48000.0; fastpow2 = ffunction(float fastpow2(float), "fast_pow2.h", ""); inputSelect(gi) = _,0 : select2(gi); echo_mono(dmax,curdel,tapdel,fb,fbspr,gi) = inputSelect(gi) : (+:si.smooth(fbspr) <: de.fdelay(dmax,curdel), de.fdelay(dmax,tapdel)) ~(*(fb),!) : !,_; tau2pole(tau) = ba.if(tau>0, exp(-1.0/(tau*ma.SR)), 0.0); t60smoother(dEchoT60) = si.smooth(tau2pole(dEchoT60/6.91)); bpmT60 = 0.15661; dBPM = knobs_group(vslider("[0] BPM [midi:ctrl 63] [style:knob]", 120.0, 30.00, 300, 0.1)); dEchoT60 = knobs_group(vslider("[1] DelayT60 [midi:ctrl 60] [style:knob]", 0.5, 0, 100, 0.001)); dEchoBeats = knobs_group(vslider("[0] Delay [midi:ctrl 61] [style:knob]", 0.5, 0.001, 16.0, 0.001)); dEchoSamples = dEchoSamplesRaw : t60smoother(dEchoT60); warpRaw = knobs_group(vslider("[0] Warp [midi:ctrl 62] [style:knob]", 0, -1.0, 1.0, 0.001)); scrubAmpRaw = 0; scrubPhaseRaw = 0; fb = knobs_group(vslider("[2] Feedback [midi:ctrl 2] [style:knob]", .3, 0.0, 1.0, 0.0001)); amp = knobs_group(vslider("[3] Amp [midi:ctrl 75] [style:knob]", .5, 0, 1, 0.001)) : si.smooth(ba.tau2pole(ampT60/6.91)); ampT60 = 0.15661; fbs = knobs_group(vslider("[5] [midi:ctrl 76] FeedbackSm [style:knob]", 0, 0, 1, 0.00001)); enableEcho = (scrubAmpRaw > 0.00001); counter = (enableEcho * (triggerScrubOn : + ~ +(1) * enableEcho : -(2))) & (dmax-1); scrubPhase = scrubPhaseRaw : t60smoother(dEchoT60*(1-triggerScrubOff)); scrubAmp = scrubAmpRaw : t60smoother(dEchoT60*(1-triggerScrubOff)); warp = warpRaw : t60smoother(dEchoT60); dTapSamplesRaw = dEchoSamplesRaw * (1.0 + warp + scrubPhase * scrubAmp) + float(counter); dTapSamples = dTapSamplesRaw : t60smoother(dEchoT60*(1-triggerScrubOff)); process = _ <: _, amp * echo_mono(dmax,dEchoSamples,dTapSamples,fb,fbspr(fbs),gi) : +;
ddb74d90a44ae869d0598074521cda5d91d414d4193ed2d4643d973bf0b799ff
maximalexanian/guitarix-vst
highbooster.dsp
declare name "Treble boost"; declare category "Tone Control"; import("stdfaust.lib"); level = vslider("Level", 0, 0.5, 20, 0.5) ; hfboost(level,fx,x) = x + (ba.db2linear(level)-1)*fi.highpass(1,fx,x); process = hfboost(level, 1500);
https://raw.githubusercontent.com/maximalexanian/guitarix-vst/83fd0cbec9588fb2ef47d80f7c6cb0775bfb9f89/guitarix/src/LV2/faust/highbooster.dsp
faust
declare name "Treble boost"; declare category "Tone Control"; import("stdfaust.lib"); level = vslider("Level", 0, 0.5, 20, 0.5) ; hfboost(level,fx,x) = x + (ba.db2linear(level)-1)*fi.highpass(1,fx,x); process = hfboost(level, 1500);
2ffd10d988ce72dc41dfbc9d68ce6fbe3a122221b3553311205513b51a71406a
maximalexanian/guitarix-vst
gxtubedelay.dsp
declare name "Tube Delay"; declare category "Echo / Delay"; import("stdfaust.lib"); import("guitarix.lib"); import("redeye.lib"); LogPot(a, x) = ba.if(a, (exp(a * x) - 1) / (exp(a) - 1), x); level = vslider("level[style:knob]", 0, 0, 1, 0.1):LogPot(1):smoothi(0.993); feedback = vslider("feedback[style:knob]", 0, 0.0, 1, 0.01); dtime = vslider("de.delay[unit:ms][style:knob]", 0, 0.1, 2500, 0.1)*ma.SR/1000.0; interp = 100*ma.SR/1000.0; // for a 2.5 sec de.delay N = int( 2^17 ) ; delayed = de.sdelay(N, interp, dtime) ; // added a de.delay bypass output to get a real tape de.delay, // and a low/fi.highpass filter section in the feedback loop // to avoid self oscillation process = input12au7:*(0.1):_<:((+:_<:_ ,( delayed:*(level)) :>_)~(*(feedback): fi.highpass(1,120):fi.lowpass(1,12000))):>_:output12au7;
https://raw.githubusercontent.com/maximalexanian/guitarix-vst/83fd0cbec9588fb2ef47d80f7c6cb0775bfb9f89/guitarix/src/LV2/faust/gxtubedelay.dsp
faust
for a 2.5 sec de.delay added a de.delay bypass output to get a real tape de.delay, and a low/fi.highpass filter section in the feedback loop to avoid self oscillation
declare name "Tube Delay"; declare category "Echo / Delay"; import("stdfaust.lib"); import("guitarix.lib"); import("redeye.lib"); LogPot(a, x) = ba.if(a, (exp(a * x) - 1) / (exp(a) - 1), x); level = vslider("level[style:knob]", 0, 0, 1, 0.1):LogPot(1):smoothi(0.993); feedback = vslider("feedback[style:knob]", 0, 0.0, 1, 0.01); dtime = vslider("de.delay[unit:ms][style:knob]", 0, 0.1, 2500, 0.1)*ma.SR/1000.0; interp = 100*ma.SR/1000.0; N = int( 2^17 ) ; delayed = de.sdelay(N, interp, dtime) ; process = input12au7:*(0.1):_<:((+:_<:_ ,( delayed:*(level)) :>_)~(*(feedback): fi.highpass(1,120):fi.lowpass(1,12000))):>_:output12au7;
1b2bb0e1589b44d7dfd1df3f857a626a8db929e4c57efed723b5a70692dd3120
maximalexanian/guitarix-vst
expander.dsp
/* Expander unit. */ /* This is pretty much the same as compressor.dsp, but here the given ratio is applied to *attenuate* levels *below* the threshold. */ declare name "Expander"; declare category "Guitar Effects"; declare description "expander unit"; declare author "Albert Graef"; declare version "1.0"; import("stdfaust.lib"); import("reducemaps.lib"); /* Controls. */ ratio = nentry("ratio", 2, 1, 20, 0.1); threshold = nentry("threshold", -40, -96, 10, 0.1); knee = nentry("knee", 3, 0, 20, 0.1); attack = hslider("attack", 0.001, 0, 1, 0.001) : max(1/ma.SR); release = hslider("release", 0.1, 0, 10, 0.01) : max(1/ma.SR); 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)); expand(env) = level*(1-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)); envelop = abs : max ~ (1.0/ma.SR) : mean(4096); // : max(ba.db2linear(-70)) : ba.linear2db; process(x) = (g(x)*x) with { g = env2(x) : expand : vmeter1 : ba.db2linear; };
https://raw.githubusercontent.com/maximalexanian/guitarix-vst/83fd0cbec9588fb2ef47d80f7c6cb0775bfb9f89/guitarix/src/faust/expander.dsp
faust
Expander unit. This is pretty much the same as compressor.dsp, but here the given ratio is applied to *attenuate* levels *below* the threshold. Controls. : max(ba.db2linear(-70)) : ba.linear2db;
declare name "Expander"; declare category "Guitar Effects"; declare description "expander unit"; declare author "Albert Graef"; declare version "1.0"; import("stdfaust.lib"); import("reducemaps.lib"); ratio = nentry("ratio", 2, 1, 20, 0.1); threshold = nentry("threshold", -40, -96, 10, 0.1); knee = nentry("knee", 3, 0, 20, 0.1); attack = hslider("attack", 0.001, 0, 1, 0.001) : max(1/ma.SR); release = hslider("release", 0.1, 0, 10, 0.01) : max(1/ma.SR); 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)); expand(env) = level*(1-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 = env2(x) : expand : vmeter1 : ba.db2linear; };
186b63b8a8a9554c301adeef60306d75bee4279b5ce74d74f2037430aa1f867f
maximalexanian/guitarix-vst
graphiceq.dsp
declare id "graphiceq"; declare name "Graphic EQ"; declare category "Tone Control"; declare description "Graphic EQ"; import("stdfaust.lib"); import("reducemaps.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) : mean(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/maximalexanian/guitarix-vst/83fd0cbec9588fb2ef47d80f7c6cb0775bfb9f89/guitarix/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("reducemaps.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) : mean(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) :>_;
52a9b4657b028af9b720bc4b4877e0228770f68455184e14ace3782be941c8d2
maximalexanian/guitarix-vst
graphiceq.dsp
declare id "graphiceq"; declare name "Graphic EQ"; declare category "Tone Control"; declare description "Graphic EQ"; import("stdfaust.lib"); import("reducemaps.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) : mean(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/maximalexanian/guitarix-vst/83fd0cbec9588fb2ef47d80f7c6cb0775bfb9f89/guitarix/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("reducemaps.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) : mean(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) :>_;
b53066b9d7f470390e22a1fe5b763dbce8e832f75949fb30e064e5915480f7de
maximalexanian/guitarix-vst
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("reducemaps.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) : mean(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/maximalexanian/guitarix-vst/83fd0cbec9588fb2ef47d80f7c6cb0775bfb9f89/guitarix/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("reducemaps.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 ; };