_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
|
---|---|---|---|---|---|---|---|
5a78fa94189b37392308c9a3e3f0b2b71acea47d1ef74a2a8934e862fea8a9b5 | rmichon/cph-fall22 | logic.dsp | import("stdfaust.lib");
import("static.dsp");
/**
* Cochlear implant simulation setup
*/
// setup of noise-band processor
noise(N) = _,no.noise <: s :> fi.lowpass6e(5000)
with {
n(f,bw) = noiseband(f,bw), bandpass(f,bw) : *;
s = run_par(n,N);
};
// setup of sinewave processor
sine(N) = _ <: s :> _
with {
s = run_par(sinewave,N);
};
// modulate envelope of signal with noise
noiseband(f,bw) = lowpass(6,1200) : bandpass(f,bw) : envelope : lowpass(2,160);
// modulate envelope of signal with sinewave
sinewave(f,bw) = lowpass(6,1200) : bandpass(f,bw) : envelope : lowpass(2,400) : *(os.osc(f));
/**
* Helper functions and algorithms
*/
// lowpass filter
lowpass(o,f) = fi.lowpass(o,f);
// bandpass filter
bandpass(f,bw) = fi.bandpass(Nh,fl,fu)
with {
Nh = 3;
fl = f - (bw/2);
fu = f + (bw/2);
};
// Envelope extraction
envelope = an.rms_envelope_rect(0.004);
/**
* General util functions
*/
take(n,values) = ba.take(index, values)
with {
index = (n % ba.count(values)) + 1;
};
// run stuff in parallel
run_par(s,N) = par(i,N,run(i))
with {
run(j) = s(f,bw)
with {
f = take(j,fN(N));
bw = take(j,bwN(N));
};
};
| https://raw.githubusercontent.com/rmichon/cph-fall22/b60a72e34af35709c92dfd3bb559d9b1c1a546d4/final-projects/ch_steinhauer/logic.dsp | faust | *
* Cochlear implant simulation setup
setup of noise-band processor
setup of sinewave processor
modulate envelope of signal with noise
modulate envelope of signal with sinewave
*
* Helper functions and algorithms
lowpass filter
bandpass filter
Envelope extraction
*
* General util functions
run stuff in parallel | import("stdfaust.lib");
import("static.dsp");
noise(N) = _,no.noise <: s :> fi.lowpass6e(5000)
with {
n(f,bw) = noiseband(f,bw), bandpass(f,bw) : *;
s = run_par(n,N);
};
sine(N) = _ <: s :> _
with {
s = run_par(sinewave,N);
};
noiseband(f,bw) = lowpass(6,1200) : bandpass(f,bw) : envelope : lowpass(2,160);
sinewave(f,bw) = lowpass(6,1200) : bandpass(f,bw) : envelope : lowpass(2,400) : *(os.osc(f));
lowpass(o,f) = fi.lowpass(o,f);
bandpass(f,bw) = fi.bandpass(Nh,fl,fu)
with {
Nh = 3;
fl = f - (bw/2);
fu = f + (bw/2);
};
envelope = an.rms_envelope_rect(0.004);
take(n,values) = ba.take(index, values)
with {
index = (n % ba.count(values)) + 1;
};
run_par(s,N) = par(i,N,run(i))
with {
run(j) = s(f,bw)
with {
f = take(j,fN(N));
bw = take(j,bwN(N));
};
};
|
4aff6a104bdae7cddfdfbb7ce4bc28d56765cdb54bda1e145670551edcbc188a | JoeWrightMusic/QuickNDirtyFaustSynths | Descending-Swoosh-Flutter.dsp | import("stdfaust.lib");
//____________________________________________________________________________________SubtractiveSwoosh/Perc
darkness = hslider("darkness", 1500, 100, 15000, 1);
trig = button("trig");
freqDelta = hslider("freqDeltaMult",-1400,-14000,14000,1);
att = hslider("att", 0.01, 0, 15, 0.01);
rel = hslider("rel", 0.01, 0, 15, 0.01);
rampT = att+rel;
switchRampT = rampT*trig;
line = darkness+(freqDelta*trig):si.smooth(ba.tau2pole(switchRampT));
env = en.ar(att, rel, trig);
process = no.noise:fi.resonlp(line,5,0.5)*env; | https://raw.githubusercontent.com/JoeWrightMusic/QuickNDirtyFaustSynths/995047809aaaa0083340cdbcb727ceae0fc01a88/Basic/Descending-Swoosh-Flutter.dsp | faust | ____________________________________________________________________________________SubtractiveSwoosh/Perc | import("stdfaust.lib");
darkness = hslider("darkness", 1500, 100, 15000, 1);
trig = button("trig");
freqDelta = hslider("freqDeltaMult",-1400,-14000,14000,1);
att = hslider("att", 0.01, 0, 15, 0.01);
rel = hslider("rel", 0.01, 0, 15, 0.01);
rampT = att+rel;
switchRampT = rampT*trig;
line = darkness+(freqDelta*trig):si.smooth(ba.tau2pole(switchRampT));
env = en.ar(att, rel, trig);
process = no.noise:fi.resonlp(line,5,0.5)*env; |
7303d20f469d63249474cc5696fce5493522428158e29129b5c13b6640d38d44 | JDCAudio/Stray_virtual-synth | inprog.dsp | import("stdfaust.lib");
dirac = 1-1';
//@ is a delay, delaying by the sample rate makes the click happen
//at one second after opening program
process = dirac, ma.SR : @;
| https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/inprog.dsp | faust | @ is a delay, delaying by the sample rate makes the click happen
at one second after opening program | import("stdfaust.lib");
dirac = 1-1';
process = dirac, ma.SR : @;
|
a87c3cf0f535c7c47daa7c2fbe34a767bc9c0d4461221ee10d9b71a9066281c7 | JDCAudio/Stray_virtual-synth | meter.dsp | import("stdfaust.lib");
meter = _ <: _, display : attach
with {
envelope = abs: min(1.00) : max ~ -(1.0/ma.SR);
display = envelope : hbargraph("meter", 0, 1);
};
process = os.osc(440) : _ * hslider("level",0,0,1,0.001) : meter;
| https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/meter.dsp | faust | import("stdfaust.lib");
meter = _ <: _, display : attach
with {
envelope = abs: min(1.00) : max ~ -(1.0/ma.SR);
display = envelope : hbargraph("meter", 0, 1);
};
process = os.osc(440) : _ * hslider("level",0,0,1,0.001) : meter;
|
|
6e5004019380803ca57c7283b810af8a2506edabbe00a41dad8a746f81763bdb | DISTRHO/Fadeli | delayEcho-tapiir.dsp | declare name "tapiir";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
//======================================================
//
// TAPIIR
// (from Maarten de Boer's Tapiir)
//
//======================================================
import("stdfaust.lib");
dsize = 524288;
// user interface
//---------------
tap(n) = vslider("tap %n", 0,0,1,0.1);
in(n) = vslider("input %n", 1,0,1,0.1);
gain = vslider("gain", 1,0,1,0.1);
del = vslider("delay (sec)", 0, 0, 5, 0.01) * ma.SR;
// mixer and matrix
//-----------------------------------------------------------
mixer(taps,lines) = par(i,taps,*(tap(i))), par(i,lines,*(in(i))) :> *(gain);
matrix(taps,lines) = (si.bus(lines+taps)
<: tgroup("",
par(i, taps, hgroup("Tap %i", mixer(taps,lines) : de.delay(dsize,del))))
) ~ si.bus(taps);
// tapiir
//--------
tapiir(taps,lines) = vgroup("Tapiir",
si.bus(lines)
<: (matrix(taps,lines), si.bus(lines))
<: vgroup("outputs", par(i, lines, hgroup("output %i", mixer(taps,lines))))
);
process = tapiir(6,2);
| https://raw.githubusercontent.com/DISTRHO/Fadeli/055c3ce39d95046fafa492a50b9e9a6ca597d7a4/dsp/delayEcho-tapiir.dsp | faust | ======================================================
TAPIIR
(from Maarten de Boer's Tapiir)
======================================================
user interface
---------------
mixer and matrix
-----------------------------------------------------------
tapiir
-------- | declare name "tapiir";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
import("stdfaust.lib");
dsize = 524288;
tap(n) = vslider("tap %n", 0,0,1,0.1);
in(n) = vslider("input %n", 1,0,1,0.1);
gain = vslider("gain", 1,0,1,0.1);
del = vslider("delay (sec)", 0, 0, 5, 0.01) * ma.SR;
mixer(taps,lines) = par(i,taps,*(tap(i))), par(i,lines,*(in(i))) :> *(gain);
matrix(taps,lines) = (si.bus(lines+taps)
<: tgroup("",
par(i, taps, hgroup("Tap %i", mixer(taps,lines) : de.delay(dsize,del))))
) ~ si.bus(taps);
tapiir(taps,lines) = vgroup("Tapiir",
si.bus(lines)
<: (matrix(taps,lines), si.bus(lines))
<: vgroup("outputs", par(i, lines, hgroup("output %i", mixer(taps,lines))))
);
process = tapiir(6,2);
|
67f5abf96b1dd765430662fa980c4ad72d05d71414431aa31e8085190d26214d | madskjeldgaard/komet | hhylde.dsp | // High shelf filter
import("stdfaust.lib");
import("filters.lib");
high_freq = vslider("freq",8000,10,20000,0.01);
high_level = vslider("level",0,-96,96,0.01);
process = high_shelf(high_level, high_freq);
| https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/hhylde.dsp | faust | High shelf filter | import("stdfaust.lib");
import("filters.lib");
high_freq = vslider("freq",8000,10,20000,0.01);
high_level = vslider("level",0,-96,96,0.01);
process = high_shelf(high_level, high_freq);
|
581aca50c9153dd3f3255c4261e4ecc2ca56b16e4d368a691fd946d4b8e620fb | madskjeldgaard/komet | lhylde.dsp | // Low shelf filter
import("stdfaust.lib");
import("filters.lib");
low_freq = vslider("freq",8000,10,20000,0.01);
low_level = vslider("level",0,-96,96,0.01);
process = low_shelf(low_level, low_freq);
| https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/lhylde.dsp | faust | Low shelf filter | import("stdfaust.lib");
import("filters.lib");
low_freq = vslider("freq",8000,10,20000,0.01);
low_level = vslider("level",0,-96,96,0.01);
process = low_shelf(low_level, low_freq);
|
181d701a9eedd428dfed46a3a27eb368a6145c1520e9b51111c273ee05e80b8f | JDCAudio/Stray_virtual-synth | organ.dsp | import("stdfaust.lib");
freq = hslider("freq",440,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
timbre(f) = os.osc(f)*0.5 + os.osc(f*2)*0.25 + os.osc(f*3)*0.125;
process = gain*timbre(freq); | https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/organ.dsp | faust | import("stdfaust.lib");
freq = hslider("freq",440,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
timbre(f) = os.osc(f)*0.5 + os.osc(f*2)*0.25 + os.osc(f*3)*0.125;
process = gain*timbre(freq); |
|
c9c246e05a390d36cbb06b1dc0e24d6b46a6ad85a17bfac79849b0ea90a927c5 | ChekPuk/chekpuk_pedals | truescreamer.dsp | import("stdfaust.lib");
declare name "TrueScreamer";
declare version "0.1";
declare author "ChekPuk";
declare description "Tebubescreamerish pedal, closest to my dreams of right pedal";
declare license "GPL 3.0+";
bias = hslider("t:[2]/v:advanced/[0]Bias voltage",0,-4.5,4.5,0.001);
boost = hslider("t:[2]/v:advanced/[1]pre Boost",10,1,10,0.001);
trig = hslider("t:[2]/v:advanced/[2]Diode voltage",1,0,2,0.001);
loopback_c = hslider("t:[2]/v:advanced/[3]Loopback correction",0,-0.5,0.5,0.001);
l_const = 0.232;
gain = vslider("t:[0]/h:main/[1]Gain",1,1,100,0.001);
tone = vslider("t:[0]/h:main/[2]Tone",1,0,1,0.001);
volume= vslider("t:[0]/h:main/[3]Volume",1,0,1,0.001);
bpc = checkbox("On/Off");
hpass(a,b) = fi.highpass(a,b);
lopass(a,b) = fi.lowpass(a,b);
amp= (negative,positive:opamp) ~*(loopback)
with{
loopback = l_const + l_const*loopback_c;
negative = hpass(1,720):lopass(1,6000);
positive = +(1*bias): *(boost);
diodes = atan: max(trig*-1):min(trig);
acfilter = fi.peak_eq(10*(db),freq,bw);
opamp(x,y)= y-x:gainsag(x):diodes: fi.dcblocker;
gainsag(x) = *(gain*(1+abs(x)*gain));
};
filter = lopass(1,723*(1+tone)): _<: lowtone*(2-tone),hitone*tone:>_
with{
lowtone = lopass(1,breakfreq);
hitone = lopass(2,5000*(1+tone)):hpass(1,breakfreq);
breakfreq = 100*(1+tone);
};
post = /(boost):*(volume);
process = _<: select2(bpc,_): _<: _,(amp:filter:post): select2(bpc,_);
| https://raw.githubusercontent.com/ChekPuk/chekpuk_pedals/0bacb082952e0c8ab3d15e57b97a6fced8b20f77/truescreamer.dsp | faust | import("stdfaust.lib");
declare name "TrueScreamer";
declare version "0.1";
declare author "ChekPuk";
declare description "Tebubescreamerish pedal, closest to my dreams of right pedal";
declare license "GPL 3.0+";
bias = hslider("t:[2]/v:advanced/[0]Bias voltage",0,-4.5,4.5,0.001);
boost = hslider("t:[2]/v:advanced/[1]pre Boost",10,1,10,0.001);
trig = hslider("t:[2]/v:advanced/[2]Diode voltage",1,0,2,0.001);
loopback_c = hslider("t:[2]/v:advanced/[3]Loopback correction",0,-0.5,0.5,0.001);
l_const = 0.232;
gain = vslider("t:[0]/h:main/[1]Gain",1,1,100,0.001);
tone = vslider("t:[0]/h:main/[2]Tone",1,0,1,0.001);
volume= vslider("t:[0]/h:main/[3]Volume",1,0,1,0.001);
bpc = checkbox("On/Off");
hpass(a,b) = fi.highpass(a,b);
lopass(a,b) = fi.lowpass(a,b);
amp= (negative,positive:opamp) ~*(loopback)
with{
loopback = l_const + l_const*loopback_c;
negative = hpass(1,720):lopass(1,6000);
positive = +(1*bias): *(boost);
diodes = atan: max(trig*-1):min(trig);
acfilter = fi.peak_eq(10*(db),freq,bw);
opamp(x,y)= y-x:gainsag(x):diodes: fi.dcblocker;
gainsag(x) = *(gain*(1+abs(x)*gain));
};
filter = lopass(1,723*(1+tone)): _<: lowtone*(2-tone),hitone*tone:>_
with{
lowtone = lopass(1,breakfreq);
hitone = lopass(2,5000*(1+tone)):hpass(1,breakfreq);
breakfreq = 100*(1+tone);
};
post = /(boost):*(volume);
process = _<: select2(bpc,_): _<: _,(amp:filter:post): select2(bpc,_);
|
|
c789f5beb4c136a1afc81f63d24a963e1c81a98010ebe4862b8c59e238b6c8b5 | Sylcantor/wam-web-components | DualPitchShifter.dsp | declare name "Dual Pitch Shifter";
declare description "Dual Channel pitch shifter, based on Faust pitch_shifter.dsp by Grame";
declare author "Oli Larkin ([email protected])";
declare copyright "Oliver Larkin";
declare version "0.1";
declare licence "GPL";
import("stdfaust.lib");
msec = ma.SR/1000.0;
shiftl = hslider("ShiftL[style:knob][unit:semitones][OWL:PARAMETER_A]", 0, -12, +12, 0.1);
shiftr = hslider("ShiftR[style:knob][unit:semitones][OWL:PARAMETER_B]", 0, -12, +12, 0.1);
ws = hslider("WindowSize[style:knob][unit:ms][OWL:PARAMETER_C]", 50, 20, 1000, 1) * msec : si.smooth(ba.tau2pole(0.005));
mix = hslider("Mix[style:knob][OWL:PARAMETER_D]", 0.5, 0, 1, 0.01) : si.smooth(ba.tau2pole(0.005));
xf = 20 * msec;
transpose (w, x, s, sig) = de.fdelay(65536, d,sig)*ma.fmin(d/x,1) + de.fdelay(65536,d+w,sig)*(1-ma.fmin(d/x,1))
with {
i = 1 - pow(2, s/12);
d = i : (+ : +(w) : fmod(_,w)) ~ _;
};
dualpitch(l,r) = l,r <: *(1-mix), *(1-mix), transpose(ws, xf, shiftl, l)*mix, transpose(ws, xf, shiftr, r)*mix :> _,_;
process = ba.bypass_fade(ma.SR/10, checkbox("bypass"), dualpitch); | https://raw.githubusercontent.com/Sylcantor/wam-web-components/c54352dae5b80bcf6d8d4c306ea22e2c91a12b08/plugins/DualPitchShifter/DualPitchShifter.dsp | faust | declare name "Dual Pitch Shifter";
declare description "Dual Channel pitch shifter, based on Faust pitch_shifter.dsp by Grame";
declare author "Oli Larkin ([email protected])";
declare copyright "Oliver Larkin";
declare version "0.1";
declare licence "GPL";
import("stdfaust.lib");
msec = ma.SR/1000.0;
shiftl = hslider("ShiftL[style:knob][unit:semitones][OWL:PARAMETER_A]", 0, -12, +12, 0.1);
shiftr = hslider("ShiftR[style:knob][unit:semitones][OWL:PARAMETER_B]", 0, -12, +12, 0.1);
ws = hslider("WindowSize[style:knob][unit:ms][OWL:PARAMETER_C]", 50, 20, 1000, 1) * msec : si.smooth(ba.tau2pole(0.005));
mix = hslider("Mix[style:knob][OWL:PARAMETER_D]", 0.5, 0, 1, 0.01) : si.smooth(ba.tau2pole(0.005));
xf = 20 * msec;
transpose (w, x, s, sig) = de.fdelay(65536, d,sig)*ma.fmin(d/x,1) + de.fdelay(65536,d+w,sig)*(1-ma.fmin(d/x,1))
with {
i = 1 - pow(2, s/12);
d = i : (+ : +(w) : fmod(_,w)) ~ _;
};
dualpitch(l,r) = l,r <: *(1-mix), *(1-mix), transpose(ws, xf, shiftl, l)*mix, transpose(ws, xf, shiftr, r)*mix :> _,_;
process = ba.bypass_fade(ma.SR/10, checkbox("bypass"), dualpitch); |
|
d06104dec41500364c23e3d7ebc01ce2591578a1ac3606287cc4358ba30123fb | Sylcantor/wam-web-components | blipper.dsp | declare name "Blipper";
declare description "Envelope Follower controlling pitch of a triangle oscillator, good with percussive input";
declare author "Oli Larkin ([email protected])";
declare copyright "Oliver Larkin";
declare version "0.2";
declare licence "GPL";
import("stdfaust.lib");
basepitch = hslider("BasePitch [unit:semitones] [style:knob][OWL:PARAMETER_A]", 60, 24, 96, 0.1) : si.smooth(ba.tau2pole(0.01));
pitchmod = hslider("PitchMod [unit:semitones] [style:knob][OWL:PARAMETER_B]", 24, -64, 64, 1) : si.smooth(ba.tau2pole(0.005));
//attack = hslider("Attack [unit:ms] [OWL:PARAMETER_C]", 2, 2, 1000, 1) : *(0.001) : max(1.0/float(ma.SR));
release = hslider("Release [style:knob][unit:ms] [OWL:PARAMETER_C]", 20, 2, 100, 1) : *(0.001) : max(1.0/float(ma.SR));
attack = 0.005;
mix = hslider("Mix [style:knob][OWL:PARAMETER_D]", 0.5, 0, 1, 0.01) : si.smooth(ba.tau2pole(0.005));
blipper(l, r) = l, r <: *(1-mix), *(1-mix), mono2stereo :> _,_
with {
mono2stereo = + : pc2 * mix <: _,_;
pc2 = an.amp_follower_ud(attack, release) <: (ba.midikey2hz(basepitch + (pitchmod * _)): os.triangle), _ : *;
};
process = ba.bypass_fade(ma.SR/10, checkbox("bypass"), blipper); | https://raw.githubusercontent.com/Sylcantor/wam-web-components/c54352dae5b80bcf6d8d4c306ea22e2c91a12b08/plugins/blipper/blipper.dsp | faust | attack = hslider("Attack [unit:ms] [OWL:PARAMETER_C]", 2, 2, 1000, 1) : *(0.001) : max(1.0/float(ma.SR)); | declare name "Blipper";
declare description "Envelope Follower controlling pitch of a triangle oscillator, good with percussive input";
declare author "Oli Larkin ([email protected])";
declare copyright "Oliver Larkin";
declare version "0.2";
declare licence "GPL";
import("stdfaust.lib");
basepitch = hslider("BasePitch [unit:semitones] [style:knob][OWL:PARAMETER_A]", 60, 24, 96, 0.1) : si.smooth(ba.tau2pole(0.01));
pitchmod = hslider("PitchMod [unit:semitones] [style:knob][OWL:PARAMETER_B]", 24, -64, 64, 1) : si.smooth(ba.tau2pole(0.005));
release = hslider("Release [style:knob][unit:ms] [OWL:PARAMETER_C]", 20, 2, 100, 1) : *(0.001) : max(1.0/float(ma.SR));
attack = 0.005;
mix = hslider("Mix [style:knob][OWL:PARAMETER_D]", 0.5, 0, 1, 0.01) : si.smooth(ba.tau2pole(0.005));
blipper(l, r) = l, r <: *(1-mix), *(1-mix), mono2stereo :> _,_
with {
mono2stereo = + : pc2 * mix <: _,_;
pc2 = an.amp_follower_ud(attack, release) <: (ba.midikey2hz(basepitch + (pitchmod * _)): os.triangle), _ : *;
};
process = ba.bypass_fade(ma.SR/10, checkbox("bypass"), blipper); |
2d3656114807e4fa5ff252f65e9e5bf3453e4ccc28fbb785a1eb06497cf25929 | JaoRamos/Faust | jaoAmp.dsp | declare name "Simulador de Amp Jao medio bit";
declare version "0.1";
declare author "Jao Corporation";
declare description "Simulador de Amp Jao medio bit";
import("stdfaust.lib");
gain = hslider("Gain", 40, 1, 200, 0.1);
prefiltro = hslider("Pasaaltos pre", 1400, 20, 1500, 10);
agudos = hslider("Parlante (pasabajos)", 3500, 100, 8000, 10);
delaySlider = hslider("Delay", 0.5, 0, 0.9, 0.01);
blend = hslider("Blend Clean", 5, 0, 10, 0.01);
master = hslider("Volumen Master", 0.3, 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(-6, 1200, 400) : fi.peak_eq(3, 2500, 1000);
delay = @(ma.SR / 3) : *(delaySlider) : fi.lowpass(1, 500);
tono = fi.lowpass(3, agudos);
cadena = _ <: cleanMezcla, (pre : medios) :> tono : + ~ delay : *(master);
process = cadena <: _, _; | https://raw.githubusercontent.com/JaoRamos/Faust/eb06f70ff4cf2765c23b12d0d6ce5f93b4ee468c/sueltos/jaoAmp.dsp | faust | declare name "Simulador de Amp Jao medio bit";
declare version "0.1";
declare author "Jao Corporation";
declare description "Simulador de Amp Jao medio bit";
import("stdfaust.lib");
gain = hslider("Gain", 40, 1, 200, 0.1);
prefiltro = hslider("Pasaaltos pre", 1400, 20, 1500, 10);
agudos = hslider("Parlante (pasabajos)", 3500, 100, 8000, 10);
delaySlider = hslider("Delay", 0.5, 0, 0.9, 0.01);
blend = hslider("Blend Clean", 5, 0, 10, 0.01);
master = hslider("Volumen Master", 0.3, 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(-6, 1200, 400) : fi.peak_eq(3, 2500, 1000);
delay = @(ma.SR / 3) : *(delaySlider) : fi.lowpass(1, 500);
tono = fi.lowpass(3, agudos);
cadena = _ <: cleanMezcla, (pre : medios) :> tono : + ~ delay : *(master);
process = cadena <: _, _; |
|
475c7431c8fe2b87db0b71cb8cfba81b1df75bbc046a8510e7bacc514d7bee43 | JuanSaudio/Blog | SNRTest.dsp | import("stdfaust.lib");
rmsEst = _ <: * : si.smooth(ba.tau2pole(1)) : sqrt : ba.linear2db;
oscRmsMeter = _ <: attach(_, vbargraph("Osc RMS[unit:dB]", -30, 6));
noiseRmsMeter = _ <: attach(_, vbargraph("Noise RMS[unit:dB]", -30, 6));
snrMeter = _ <: attach(_, vbargraph("SNR", -40, 40));
oscGain = vslider("[1]Gain", 0, -40, 0, 1) : ba.db2linear : si.smoo;
noiseGain = vslider("[1]Gain", 0, -40, 0, 1) : ba.db2linear : si.smoo;
outGain = vslider("[3]Out Gain", -20, -60, 0, 1) : ba.db2linear : si.smoo;
oscGate = checkbox("[2]On") : si.smoo;
noiseGate = checkbox("[2]On") : si.smoo;
source1 = vgroup("Osc", os.osc(1000) * oscGain * oscGate * ba.db2linear(3));
source2 = vgroup("Noise", no.pink_noise * ba.db2linear(26) * noiseGain * noiseGate);
analyzer = _, _ <: si.bus(4) : + , rmsEst, rmsEst : _, oscRmsMeter, noiseRmsMeter : _, - : _, snrMeter : attach(_, _);
process = hgroup("SNR Test", source1, source2 : analyzer : _ * outGain);
| https://raw.githubusercontent.com/JuanSaudio/Blog/c447373273a251fc66985781e30245401dfcfa37/SNR/SNRTest.dsp | faust | import("stdfaust.lib");
rmsEst = _ <: * : si.smooth(ba.tau2pole(1)) : sqrt : ba.linear2db;
oscRmsMeter = _ <: attach(_, vbargraph("Osc RMS[unit:dB]", -30, 6));
noiseRmsMeter = _ <: attach(_, vbargraph("Noise RMS[unit:dB]", -30, 6));
snrMeter = _ <: attach(_, vbargraph("SNR", -40, 40));
oscGain = vslider("[1]Gain", 0, -40, 0, 1) : ba.db2linear : si.smoo;
noiseGain = vslider("[1]Gain", 0, -40, 0, 1) : ba.db2linear : si.smoo;
outGain = vslider("[3]Out Gain", -20, -60, 0, 1) : ba.db2linear : si.smoo;
oscGate = checkbox("[2]On") : si.smoo;
noiseGate = checkbox("[2]On") : si.smoo;
source1 = vgroup("Osc", os.osc(1000) * oscGain * oscGate * ba.db2linear(3));
source2 = vgroup("Noise", no.pink_noise * ba.db2linear(26) * noiseGain * noiseGate);
analyzer = _, _ <: si.bus(4) : + , rmsEst, rmsEst : _, oscRmsMeter, noiseRmsMeter : _, - : _, snrMeter : attach(_, _);
process = hgroup("SNR Test", source1, source2 : analyzer : _ * outGain);
|
|
e2964611f58c4ba7f794b351aa29ccea019e3d876ab7d9915d90bed73a518325 | JoeWrightMusic/QuickNDirtyFaustSynths | Kick-or-Drone.dsp | import("stdfaust.lib");
//____________________________________________________________________________________KICK / DRONE-GLISS
trig = button("trig");
rampT = hslider("rampT", 0.1, 0, 20, 0.01);
freq = hslider("freq", 370, 10, 600, 1);
freqDelta = hslider("freqDelta", -300, -1000,1000,1);
att = hslider("att", 0.01, 0, 15, 0.01);
rel = hslider("rel", 0.01, 0, 15, 0.01);
switchRampT = rampT*trig;
line = freq+(freqDelta*trig):si.smooth(ba.tau2pole(switchRampT));
env = en.ar(att, rel, trig);
krone = os.triangle(line)*env;
process = krone;
| https://raw.githubusercontent.com/JoeWrightMusic/QuickNDirtyFaustSynths/91c683e6af748334f66403775d7bce617c15f11f/Basic/Kick-or-Drone.dsp | faust | ____________________________________________________________________________________KICK / DRONE-GLISS | import("stdfaust.lib");
trig = button("trig");
rampT = hslider("rampT", 0.1, 0, 20, 0.01);
freq = hslider("freq", 370, 10, 600, 1);
freqDelta = hslider("freqDelta", -300, -1000,1000,1);
att = hslider("att", 0.01, 0, 15, 0.01);
rel = hslider("rel", 0.01, 0, 15, 0.01);
switchRampT = rampT*trig;
line = freq+(freqDelta*trig):si.smooth(ba.tau2pole(switchRampT));
env = en.ar(att, rel, trig);
krone = os.triangle(line)*env;
process = krone;
|
8a196017e12654711be3ac19bb17bf8164d259d98b58aaab3939f3482b848dd5 | inria-emeraude/syfala | flanger.dsp |
import("stdfaust.lib");
process = dm.flanger_demo;
| https://raw.githubusercontent.com/inria-emeraude/syfala/95ed6765d73520362f6a1ad35e4a3b2a5e16fbc9/examples/flanger.dsp | faust |
import("stdfaust.lib");
process = dm.flanger_demo;
|
|
7da5376f9f0d4213b15e5a30a5070142e9853fa7d8e9b73df6c63d61c17f6ec9 | tomara-x/magi | nested-pars.dsp | import("stdfaust.lib");
//perfuma my darling!
clkmult(f,l) = par(i,N,ba.take(i+1,l)*f) : par(i,N,ba.beat)
with {
N = ba.count(l);
};
// process = clkmult(137, (0.001,1,2,4));
//one-line witch
list = par(j,4,par(i,4, (0,1,i+j,3)));
// (0,1,0,3,0,1,1,3,0,1,2,3,0,1,3,3,
// 0,1,1,3,0,1,2,3,0,1,3,3,0,1,4,3,
// 0,1,2,3,0,1,3,3,0,1,4,3,0,1,5,3,
// 0,1,3,3,0,1,4,3,0,1,5,3,0,1,6,3)
process = list :> _;
//nah, bad idea
trig = ba.beat(137);
trace(t,l) = ba.if(c==1,n,trace(t,n))
with {
i = ba.counter(t);
n = l : ba.selectn(ba.count(l),i);
c = ba.count(n);
};
// process = trace(trig, (0,3,1,3,4,4,(4,4,5),5));
| https://raw.githubusercontent.com/tomara-x/magi/bcf22a4ef23899cd8ce3bf5e08e374994907f81a/practice/nested-pars.dsp | faust | perfuma my darling!
process = clkmult(137, (0.001,1,2,4));
one-line witch
(0,1,0,3,0,1,1,3,0,1,2,3,0,1,3,3,
0,1,1,3,0,1,2,3,0,1,3,3,0,1,4,3,
0,1,2,3,0,1,3,3,0,1,4,3,0,1,5,3,
0,1,3,3,0,1,4,3,0,1,5,3,0,1,6,3)
nah, bad idea
process = trace(trig, (0,3,1,3,4,4,(4,4,5),5)); | import("stdfaust.lib");
clkmult(f,l) = par(i,N,ba.take(i+1,l)*f) : par(i,N,ba.beat)
with {
N = ba.count(l);
};
list = par(j,4,par(i,4, (0,1,i+j,3)));
process = list :> _;
trig = ba.beat(137);
trace(t,l) = ba.if(c==1,n,trace(t,n))
with {
i = ba.counter(t);
n = l : ba.selectn(ba.count(l),i);
c = ba.count(n);
};
|
60ba9b739847a214d5860ce88e25a616e49ab31589a433315a40e02c4c88d634 | inria-emeraude/syfala | fir.dsp | import("stdfaust.lib");
N=100;
process = fi.fir(par(i,N,i/N)) ;
| https://raw.githubusercontent.com/inria-emeraude/syfala/95ed6765d73520362f6a1ad35e4a3b2a5e16fbc9/examples/fir.dsp | faust | import("stdfaust.lib");
N=100;
process = fi.fir(par(i,N,i/N)) ;
|
|
64a6395c4acedcbe0b0d8ba8151d57389ad8c09f2d36560d1ca8e5d433865199 | inria-emeraude/syfala | firN.dsp | import("stdfaust.lib");
N = 350;
process = fi.fir(par(i,N,i/N));
| https://raw.githubusercontent.com/inria-emeraude/syfala/95ed6765d73520362f6a1ad35e4a3b2a5e16fbc9/tools/multiN/dsp/firN.dsp | faust | import("stdfaust.lib");
N = 350;
process = fi.fir(par(i,N,i/N));
|
|
af8efbcde198ce57d09a7a299ef4f9b93dd592a13e20eeafc410a4808320e154 | chevremaudite/zosimos | filterUI.dsp | //-----------------FILTER----------------//
//Multimode resonant filter, available for all 8 voices
//--------------PARAMETERS:
// 1 - Filter Type : Type of filter (LP, HP, BP ,???)
// 2 - Cutoff : Filter cutoff
// 3 - Resonance : Filter resonance
// 4 - Mix : Filter mix
import("stdfaust.lib");
import("filter.lib");
process = filter(type, cutoff, res, mix)
with{
type = hslider("[0]Filter Type[style:menu{'LP':0;'HP':1;'BP':2}]", 0, 0,2,1);
cutoff = exp(vslider("[1]Cutoff[style:knob]", log(10000),log(1),log((48000/2)-2000),0.01):si.smoo);
res = vslider("[2]Resonance[style:knob]", 1,1,10,0.01):si.smoo;
mix = hslider("[4]Filter Mix [style:knob]", 0, 0, 1, 0.001):si.smoo;
};
| https://raw.githubusercontent.com/chevremaudite/zosimos/0da322fb7df2f7a86f568cdc3dfe416a69be8b5b/SOFTWARE/FAUST/ui/filterUI.dsp | faust | -----------------FILTER----------------//
Multimode resonant filter, available for all 8 voices
--------------PARAMETERS:
1 - Filter Type : Type of filter (LP, HP, BP ,???)
2 - Cutoff : Filter cutoff
3 - Resonance : Filter resonance
4 - Mix : Filter mix |
import("stdfaust.lib");
import("filter.lib");
process = filter(type, cutoff, res, mix)
with{
type = hslider("[0]Filter Type[style:menu{'LP':0;'HP':1;'BP':2}]", 0, 0,2,1);
cutoff = exp(vslider("[1]Cutoff[style:knob]", log(10000),log(1),log((48000/2)-2000),0.01):si.smoo);
res = vslider("[2]Resonance[style:knob]", 1,1,10,0.01):si.smoo;
mix = hslider("[4]Filter Mix [style:knob]", 0, 0, 1, 0.001):si.smoo;
};
|
9171684359706b352e6094fd3ff4e2c94297303eb76d37346f0cc1eb746cf1f2 | inria-emeraude/syfala | phasor.dsp | import("stdfaust.lib");
counter = +(0.01) ~ _;
process = fmod(counter, 1) * 0.125 <: _,_;
| https://raw.githubusercontent.com/inria-emeraude/syfala/95ed6765d73520362f6a1ad35e4a3b2a5e16fbc9/examples/phasor.dsp | faust | import("stdfaust.lib");
counter = +(0.01) ~ _;
process = fmod(counter, 1) * 0.125 <: _,_;
|
|
3dae30d7c7f74ee77065db8d62e57f1f0c6795c8fc8067249327bd088848ea69 | johannphilippe/grame_cnsmd_2023 | ixa.dsp | import("stdfaust.lib");
round(sig) = floor(sig), ceil(sig) : select2( (sig -floor(sig)) > 0.5 );
wavefolder(sig) = 4 * (abs(0.25 * sig + 0.25 - round(0.25 * sig + 0.25))-0.25);
pulse(x, t) = 0, 1 :select2( t >= (x*0.5) & t < x );
weird_wave(t) = (2 * pulse(0.5, t) - 1)*sin( 2*ma.PI * fmod(t, 0.5))
+ 2 * pulse(0.5, t + 0.25)
+ 2 * pulse(1, t + 0.5)
+ 0.5;
tri(t) = t, 2-t, t-4 : select3( (t > 1) + (t > 3) );
ixa(n, r, t) = tri(weird_wave(t)+n*sin(2*ma.PI*r*t)) : wavefolder;
freq = hslider("frequency", 100, 50, 1000, 1);
amp = hslider("amp", 0.1, 0, 1, 0.01) : si.smoo;
index = hslider("index", 0, 0, 10, 0.001) : si.smoo;
ratio = hslider("ratio", 1, 1, 10, 0.01) : si.smoo;
osc = os.osc(freq);
process = ixa( index, ratio,os.phasor(1, freq)) * amp;
| https://raw.githubusercontent.com/johannphilippe/grame_cnsmd_2023/cf7a34a36c456eef87963c584384296c8c441a27/ixa/ixa.dsp | faust | import("stdfaust.lib");
round(sig) = floor(sig), ceil(sig) : select2( (sig -floor(sig)) > 0.5 );
wavefolder(sig) = 4 * (abs(0.25 * sig + 0.25 - round(0.25 * sig + 0.25))-0.25);
pulse(x, t) = 0, 1 :select2( t >= (x*0.5) & t < x );
weird_wave(t) = (2 * pulse(0.5, t) - 1)*sin( 2*ma.PI * fmod(t, 0.5))
+ 2 * pulse(0.5, t + 0.25)
+ 2 * pulse(1, t + 0.5)
+ 0.5;
tri(t) = t, 2-t, t-4 : select3( (t > 1) + (t > 3) );
ixa(n, r, t) = tri(weird_wave(t)+n*sin(2*ma.PI*r*t)) : wavefolder;
freq = hslider("frequency", 100, 50, 1000, 1);
amp = hslider("amp", 0.1, 0, 1, 0.01) : si.smoo;
index = hslider("index", 0, 0, 10, 0.001) : si.smoo;
ratio = hslider("ratio", 1, 1, 10, 0.01) : si.smoo;
osc = os.osc(freq);
process = ixa( index, ratio,os.phasor(1, freq)) * amp;
|
|
6e867513410507d363c8e1d13bf12199979f1f6c78a787d5a2a1a67e21c9257f | Trzyszcz/Langley | bassdrum.dsp | declare name "bassdrum";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("frequency", 40, 20, 20000, 0.001);
gain = nentry("gain", 1, 0, 1, 0.001);
gate = button("gate");
attack = nentry("attack", 0.001, 0, 2, 0.001);
decay = nentry("decay", 0.1, 0.001, 3, 0.001);
freq_decay = nentry("freq_decay", 0.1, 0, 3, 0.001);
freq_slide= nentry("freq_slide", 0, 0, 2, 0.001);
//dry_sound = (gate : en.ar(attack, decay)) * gain * (no.noise : fi.resonlp(freq + (freq*freq_slide* (gate:en.ar(0, freq_decay)) ), 5, 1));
dry_sound = (gate : en.ar(attack, decay)) * gain * (no.noise : fi.resonlp(80, 20, 3));
wet_sound = 0.04*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = (wet_sound + (dry_sound*0.96))<:_,_;
| https://raw.githubusercontent.com/Trzyszcz/Langley/45c7fc8876ac8396304192faed35b80326abe331/Instruments/BassDrum/bassdrum.dsp | faust | dry_sound = (gate : en.ar(attack, decay)) * gain * (no.noise : fi.resonlp(freq + (freq*freq_slide* (gate:en.ar(0, freq_decay)) ), 5, 1)); | declare name "bassdrum";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("frequency", 40, 20, 20000, 0.001);
gain = nentry("gain", 1, 0, 1, 0.001);
gate = button("gate");
attack = nentry("attack", 0.001, 0, 2, 0.001);
decay = nentry("decay", 0.1, 0.001, 3, 0.001);
freq_decay = nentry("freq_decay", 0.1, 0, 3, 0.001);
freq_slide= nentry("freq_slide", 0, 0, 2, 0.001);
dry_sound = (gate : en.ar(attack, decay)) * gain * (no.noise : fi.resonlp(80, 20, 3));
wet_sound = 0.04*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = (wet_sound + (dry_sound*0.96))<:_,_;
|
9915ce2a253e86c0e6654371976cd9c848689c951e46e2bd7cb03ac34a2d5c2b | inria-emeraude/syfala | echoN.dsp | import ("stdfaust.lib");
N = 48;
process = _ <: par(i, N, ef.echo(1, 0.06 + i/100, 0.90)) :> _,_;
| https://raw.githubusercontent.com/inria-emeraude/syfala/95ed6765d73520362f6a1ad35e4a3b2a5e16fbc9/tools/multiN/dsp/echoN.dsp | faust | import ("stdfaust.lib");
N = 48;
process = _ <: par(i, N, ef.echo(1, 0.06 + i/100, 0.90)) :> _,_;
|
|
cebc2abf092bfdba78e188729e87dd5318f7b2b725082b2f99636a6d44b7adcd | tomara-x/magi | take_one.dsp | //this is terrible, saved for logging purposes
import("stdfaust.lib");
node(init,t,scale) = scale : ba.selectn(n,c%n)
with{
c = init + ba.counter(t);
n = ba.count(scale);
};
trigseq(t,n) = t : ba.selectoutn(n,ba.counter(t)%n);
T = ba.beat(137); //yeah, she's our witch
C = ba.counter(T);
N = 8;
sequence(t) = node(0,t,qu.lydian);
process = trigseq(T,N) : par(i,N, i,_,qu.lydian : node) : ba.selectn(N,C)*440 : os.osc*0.1;
| https://raw.githubusercontent.com/tomara-x/magi/bcf22a4ef23899cd8ce3bf5e08e374994907f81a/practice/take_one.dsp | faust | this is terrible, saved for logging purposes
yeah, she's our witch |
import("stdfaust.lib");
node(init,t,scale) = scale : ba.selectn(n,c%n)
with{
c = init + ba.counter(t);
n = ba.count(scale);
};
trigseq(t,n) = t : ba.selectoutn(n,ba.counter(t)%n);
C = ba.counter(T);
N = 8;
sequence(t) = node(0,t,qu.lydian);
process = trigseq(T,N) : par(i,N, i,_,qu.lydian : node) : ba.selectn(N,C)*440 : os.osc*0.1;
|
8e2981911cb8991618d4b1f7efa6abb50ab8cd81fd3dc79bf494d53ffd09ec18 | Sylcantor/wam-web-components | OwlShimmer.dsp | declare name "Owlgazer Shimmer Reverb";
declare version "1.0.0";
declare author "Xavier Godart";
declare copyright "(c) Empirical Noises 2017";
import("stdfaust.lib");
owlgazer(mix,decay,hicut,pitchmix) =
_,_ <:
(
_,_ <:
(si.bus(N*2) :> networkline)~(feedbackline)
:> *(mix),*(mix)
),
(*(1-mix),*(1-mix)) :>
_,_
with {
N = 4;
earlyAPNb = 2;
MAXDELAY = 8192;
delays = (2401.0, 3125.0, 6561.0, 14641.0);
delayval(i) = ba.take(i+1,delays);
pitchshifter(delay, pitch, amount) = _ <: de.delay(MAXDELAY, delay)*(1-amount),(ef.transpose(delay,delay,pitch)*amount) :> _;
earlyreflections = seq(i, earlyAPNb,
fi.allpass_comb(2048, delayval(i), -allpassfb)
)
with{
allpassfb = 0.6;
delays = (729.0, 1331.0, 625.0, 343.0);
delayval(j) = ba.take(j+1, delays);
};
latereflections(i) = _ <:
de.fdelay(MAXDELAY, delayval(i))*(i!=3),
pitchshifter(MAXDELAY + delayval(i),12,pitchmix)*(i==3) :>
_;
networkline = par(i,N,
_ :
earlyreflections :
latereflections(i) :
_/sqrt(N)
) : fi.lowpass(1, hicut),fi.highpass(1, 90),fi.lowpass(1, hicut),_;
feedbackline = ro.hadamard(N) : par(i,N,*(decay));
};
owlgazer_ui = owlgazer(mix,decay,hicut,pitchmix)
with {
decay = hslider("DECAY[style:knobs]", 0.7, 0.5, 1.00, 0.01) : *(0.5) : +(0.5);
hicut = hslider("TONE[style:knobs]", 4000, 900, 8000, 0.01);
pitchmix = hslider("SHIMMER[style:knobs]", 0.3, 0, 0.7, 0.01);
mix = hslider("MIX[style:knobs]", 0.75, 0, 1, 0.01);
};
process = ba.bypass_fade(0, checkbox("bypass"), owlgazer_ui);
| https://raw.githubusercontent.com/Sylcantor/wam-web-components/c54352dae5b80bcf6d8d4c306ea22e2c91a12b08/plugins/OwlShimmer/OwlShimmer.dsp | faust | declare name "Owlgazer Shimmer Reverb";
declare version "1.0.0";
declare author "Xavier Godart";
declare copyright "(c) Empirical Noises 2017";
import("stdfaust.lib");
owlgazer(mix,decay,hicut,pitchmix) =
_,_ <:
(
_,_ <:
(si.bus(N*2) :> networkline)~(feedbackline)
:> *(mix),*(mix)
),
(*(1-mix),*(1-mix)) :>
_,_
with {
N = 4;
earlyAPNb = 2;
MAXDELAY = 8192;
delays = (2401.0, 3125.0, 6561.0, 14641.0);
delayval(i) = ba.take(i+1,delays);
pitchshifter(delay, pitch, amount) = _ <: de.delay(MAXDELAY, delay)*(1-amount),(ef.transpose(delay,delay,pitch)*amount) :> _;
earlyreflections = seq(i, earlyAPNb,
fi.allpass_comb(2048, delayval(i), -allpassfb)
)
with{
allpassfb = 0.6;
delays = (729.0, 1331.0, 625.0, 343.0);
delayval(j) = ba.take(j+1, delays);
};
latereflections(i) = _ <:
de.fdelay(MAXDELAY, delayval(i))*(i!=3),
pitchshifter(MAXDELAY + delayval(i),12,pitchmix)*(i==3) :>
_;
networkline = par(i,N,
_ :
earlyreflections :
latereflections(i) :
_/sqrt(N)
) : fi.lowpass(1, hicut),fi.highpass(1, 90),fi.lowpass(1, hicut),_;
feedbackline = ro.hadamard(N) : par(i,N,*(decay));
};
owlgazer_ui = owlgazer(mix,decay,hicut,pitchmix)
with {
decay = hslider("DECAY[style:knobs]", 0.7, 0.5, 1.00, 0.01) : *(0.5) : +(0.5);
hicut = hslider("TONE[style:knobs]", 4000, 900, 8000, 0.01);
pitchmix = hslider("SHIMMER[style:knobs]", 0.3, 0, 0.7, 0.01);
mix = hslider("MIX[style:knobs]", 0.75, 0, 1, 0.01);
};
process = ba.bypass_fade(0, checkbox("bypass"), owlgazer_ui);
|
|
4ef5a590f6179c1032a021bc52599d2dced6acd4a029ec652c3cc23744312522 | madskjeldgaard/komet | krossover4.dsp | // Linkwitz riley based band splitter
import("stdfaust.lib");
process = fi.crossover4LR4(cf1, cf2, cf3) with{
cf1 = vslider("crossoverFreq1",1500,10,20000,0.001);
cf2 = vslider("crossoverFreq2",2500,10,20000,0.001);
cf3 = vslider("crossoverFreq3",5500,10,20000,0.001);
};
| https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/krossover4.dsp | faust | Linkwitz riley based band splitter | import("stdfaust.lib");
process = fi.crossover4LR4(cf1, cf2, cf3) with{
cf1 = vslider("crossoverFreq1",1500,10,20000,0.001);
cf2 = vslider("crossoverFreq2",2500,10,20000,0.001);
cf3 = vslider("crossoverFreq3",5500,10,20000,0.001);
};
|
b2c1f3299f9346632399e9fb5f4faf86eb0bdedd89c2007a0242b6cd2f0f8b16 | JDCAudio/Stray_virtual-synth | polyorgan.dsp | import("stdfaust.lib");
freq = hslider("freq",440,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
gate = button("gate") : en.adsr(0.01,0.01,0.9,0.1);
timbre(f) = os.osc(f)*0.5 + os.osc(f*2)*0.25 + os.osc(f*3)*0.125;
process = gain*gate*timbre(freq)*0.5; | https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/polyorgan.dsp | faust | import("stdfaust.lib");
freq = hslider("freq",440,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
gate = button("gate") : en.adsr(0.01,0.01,0.9,0.1);
timbre(f) = os.osc(f)*0.5 + os.osc(f*2)*0.25 + os.osc(f*3)*0.125;
process = gain*gate*timbre(freq)*0.5; |
|
499f27e87663d2d6ec6b517dadc77e09669e6585244d7a90315f8755c0f3bf1e | madskjeldgaard/mkfaustplugins | 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));
// 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/mkfaustplugins/6b838d0b10832081b85a6cd921c564e89288b13e/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));
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);
};
};
|
35822c8a39d92386d302d30fea475f88b8f14ecfe0e6ffacb6d8534126d933bc | brummer10/ModularAmpToolKit.lv2 | champ.dsp | // generated automatically
// DO NOT MODIFY!
declare id "camp";
declare name "Single ended 6V6GT";
declare shortname "Champ";
declare description "Single ended 6V6GT";
declare samplerate "96000";
import("stdfaust.lib");
p1 = pre : fi.iir((b0/a0,b1/a0,b2/a0,b3/a0),(a1/a0,a2/a0,a3/a0)) : tweedchampclip with {
LogPot(a, x) = ba.if(a, (exp(a * x) - 1) / (exp(a) - 1), x);
Inverted(b, x) = ba.if(b, 1 - x, x);
s = 0.993;
fs = float(ma.SR);
pre = _;
b0 = fs*(fs*(1.34550628657417e-13*fs + 6.51622383244889e-12) + 2.15398655450798e-14);
b1 = fs*(fs*(-4.0365188597225e-13*fs - 6.51622383244889e-12) + 2.15398655450798e-14);
b2 = fs*(fs*(4.0365188597225e-13*fs - 6.51622383244889e-12) - 2.15398655450798e-14);
b3 = fs*(fs*(-1.34550628657417e-13*fs + 6.51622383244889e-12) - 2.15398655450798e-14);
a0 = fs*(fs*(9.02998098452965e-15*fs + 5.88367790860307e-13) + 1.54838623349919e-11) + 3.43362590256886e-10;
a1 = fs*(fs*(-2.7089942953589e-14*fs - 5.88367790860307e-13) + 1.54838623349919e-11) + 1.03008777077066e-9;
a2 = fs*(fs*(2.7089942953589e-14*fs - 5.88367790860307e-13) - 1.54838623349919e-11) + 1.03008777077066e-9;
a3 = fs*(fs*(-9.02998098452965e-15*fs + 5.88367790860307e-13) - 1.54838623349919e-11) + 3.43362590256886e-10;
};
tweedchampclip = _<: ba.if(signbit(_), tweedchamp_neg_clip, tweedchamp_clip) :>_ with {
signbit = ffunction(int signbit(float), "math.h", "");
tweedchamp_clip = ffunction(float tweedchampclip(float), "tweedchamp_table.h", "");
tweedchamp_neg_clip = ffunction(float tweedchamp_negclip(float), "tweedchamp_neg_table.h", "");
};
ingain = vslider("Gain",0,-30,30,0.1) : ba.db2linear : si.smooth(0.999);
outgain = vslider("Volume", 0, -30.0, 30.0, 0.1) : ba.db2linear : si.smooth(0.999);
process = *(ingain) : p1 : *(0.2) : *(outgain) ;
| https://raw.githubusercontent.com/brummer10/ModularAmpToolKit.lv2/6a27486df4392b32cdf2efb59fe9049f57c399f6/PowerAmps/dsp/champ.dsp | faust | generated automatically
DO NOT MODIFY! | declare id "camp";
declare name "Single ended 6V6GT";
declare shortname "Champ";
declare description "Single ended 6V6GT";
declare samplerate "96000";
import("stdfaust.lib");
p1 = pre : fi.iir((b0/a0,b1/a0,b2/a0,b3/a0),(a1/a0,a2/a0,a3/a0)) : tweedchampclip with {
LogPot(a, x) = ba.if(a, (exp(a * x) - 1) / (exp(a) - 1), x);
Inverted(b, x) = ba.if(b, 1 - x, x);
s = 0.993;
fs = float(ma.SR);
pre = _;
b0 = fs*(fs*(1.34550628657417e-13*fs + 6.51622383244889e-12) + 2.15398655450798e-14);
b1 = fs*(fs*(-4.0365188597225e-13*fs - 6.51622383244889e-12) + 2.15398655450798e-14);
b2 = fs*(fs*(4.0365188597225e-13*fs - 6.51622383244889e-12) - 2.15398655450798e-14);
b3 = fs*(fs*(-1.34550628657417e-13*fs + 6.51622383244889e-12) - 2.15398655450798e-14);
a0 = fs*(fs*(9.02998098452965e-15*fs + 5.88367790860307e-13) + 1.54838623349919e-11) + 3.43362590256886e-10;
a1 = fs*(fs*(-2.7089942953589e-14*fs - 5.88367790860307e-13) + 1.54838623349919e-11) + 1.03008777077066e-9;
a2 = fs*(fs*(2.7089942953589e-14*fs - 5.88367790860307e-13) - 1.54838623349919e-11) + 1.03008777077066e-9;
a3 = fs*(fs*(-9.02998098452965e-15*fs + 5.88367790860307e-13) - 1.54838623349919e-11) + 3.43362590256886e-10;
};
tweedchampclip = _<: ba.if(signbit(_), tweedchamp_neg_clip, tweedchamp_clip) :>_ with {
signbit = ffunction(int signbit(float), "math.h", "");
tweedchamp_clip = ffunction(float tweedchampclip(float), "tweedchamp_table.h", "");
tweedchamp_neg_clip = ffunction(float tweedchamp_negclip(float), "tweedchamp_neg_table.h", "");
};
ingain = vslider("Gain",0,-30,30,0.1) : ba.db2linear : si.smooth(0.999);
outgain = vslider("Volume", 0, -30.0, 30.0, 0.1) : ba.db2linear : si.smooth(0.999);
process = *(ingain) : p1 : *(0.2) : *(outgain) ;
|
efce6ec936d0d6296e26edbdf13b72b116202697f1810d395e9fdd8249c09bb9 | inria-emeraude/syfala | karplus_simple.dsp | import("stdfaust.lib");
// Karplus Strong (1/2)
process = ba.pulse(20) :
+ ~ transformation <: _,_;
transformation = @(5) : moyenne;
moyenne(x) = (x+x')/2;
| https://raw.githubusercontent.com/inria-emeraude/syfala/95ed6765d73520362f6a1ad35e4a3b2a5e16fbc9/examples/karplus_simple.dsp | faust | Karplus Strong (1/2) | import("stdfaust.lib");
process = ba.pulse(20) :
+ ~ transformation <: _,_;
transformation = @(5) : moyenne;
moyenne(x) = (x+x')/2;
|
3440f34d0ca3bae46a7bfdb9eca81462f35d48480106606d3ad0987fd83faeb6 | JDCAudio/Stray_virtual-synth | drywet.dsp | import("stdfaust.lib");
//has a syntax code somewhere, but shows the idea of a dry wet controll
echo(d,f) = + ~ (@(d)) : *(f));
drywet(fx) = _ <: _, fx : *(1-w) , *(w) :> _
with {
w = vslider("dry-wet[style:knob]",0.5,0,1,0.01);
};
process = button("play") : pm.djembe(60,0.3,0.4,1) : drywet(echo(44100/4,0.75));
| https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/drywet.dsp | faust | has a syntax code somewhere, but shows the idea of a dry wet controll | import("stdfaust.lib");
echo(d,f) = + ~ (@(d)) : *(f));
drywet(fx) = _ <: _, fx : *(1-w) , *(w) :> _
with {
w = vslider("dry-wet[style:knob]",0.5,0,1,0.01);
};
process = button("play") : pm.djembe(60,0.3,0.4,1) : drywet(echo(44100/4,0.75));
|
e5d0b8a13be62b14c3268725f06e6bff76454fcc5956738769cc7490fde92139 | inria-emeraude/syfala | through32.dsp | import("stdfaust.lib");
N = 32;
sources = hgroup("main",par(i,N,*(hslider("[%i]gain%i[style:knob]",0.5,0,1,0.01))));
process = _,_ <: sources;
| https://raw.githubusercontent.com/inria-emeraude/syfala/7bbb09ecb912c9a66bcb85ebe35590e2b46e51d5/examples/wfs/through32.dsp | faust | import("stdfaust.lib");
N = 32;
sources = hgroup("main",par(i,N,*(hslider("[%i]gain%i[style:knob]",0.5,0,1,0.01))));
process = _,_ <: sources;
|
|
f7806eed42558e5ff7afe7d8a4578431c44d49b8f204e584988f2e814f34238f | antgrabowski/leap-viola | violinModel.dsp | import("stdfaust.lib");
// Violin model
violinModel(stringLength,bowPressure,bowVelocity,bowPosition) = pm.endChain(modelChain)
with{
stringTuning = 0.08;
stringL = stringLength-stringTuning;
modelChain = pm.chain(
violinNuts :
bowedString(stringL,bowPressure,bowVelocity,bowPosition) :
pm.violinBridge :
violinBody :
pm.out
);
};
// Violin string
bowedString(stringLength, bowPressure, bowVelocity, bowPosition) =
pm.chain(
pm.stringSegment(maxStringLength,ntbd) :
pm.violinBow(bowPressure, bowVelocity) :
pm.stringSegment(maxStringLength,btbd)
)
with{
maxStringLength = pm.maxLength;
ntbd = stringLength*bowPosition; // upper portion of the string length
btbd = stringLength*(1-bowPosition); // lower portion of the string length
};
// String segment with interpolation
stringSegment(maxStringLength, length) = guide, guide, _
with {
guide = interpDelay(nMax, 0.01, n, gate);
nMax = pm.maxLength : pm.l2s;
n = length : pm.l2s/2;
};
// Violin body
violinBody = reflectance, transmittance, _
with{
transmittance = fi.resonbp(Res,2,1);
reflectance = _;
};
violinNuts = pm.lTermination(-1*pm.bridgeFilter(0.7,0.1),pm.basicBlock);
// Interface
freq = hslider("freq",440, 300, 1000, 0.1) : si.smoo;
L = 340/(freq);
// V = hslider("Velocity", 0.2, 0, 1, 0.01) : si.smoo;
Pos = hslider("Possition", 0.2, 0, 1, 0.01) : si.smoo;
oscRes = hslider("Resonance Oscilation", 0.5, 0, 1, 0.01) : si.smoo;
// Res =500;
Res = 1.5*freq + freq*oscRes*os.osc(0.5);
gain = hslider("gain", 0, -96, 0, 0.1) : ba.db2linear : si.smoo;
gate = 1;
velocityAttack = hslider("Velocity attack",1,0.1,5,0.01);
velocityOsc = hslider("Bowing frequency",3,0,10,0.01);
P = hslider("preasure", 0.2, 0, 1, 0.01) * en.ar(0.01,2,gate)*os.osc(velocityOsc);
s = os.osc(velocityOsc*en.asr(2,1,2,gate));
bowingInput = en.asr(velocityAttack,gain/2,2,gate)*s;
// process
process = violinModel(L,P,bowingInput,Pos)<: _,_;
//process = violinModel(L,P,bowingInput,Pos),violinModel(L*2/3,P,bowingInput,Pos):>_/2<: _,_;
// interpolate Delay
interpDelay(m,interp,del,t) = _ <: de.fdelay4(m,del0)*xfade, de.fdelay4(m,del1)*(1-xfade) :> _
with{
switch = t' : ba.impulsify : +~%(2);
del0 = del : ba.sAndH(1-switch);
del1 = del : ba.sAndH(switch);
xfade = en.asr(interp,1,interp,switch);
};
| https://raw.githubusercontent.com/antgrabowski/leap-viola/afabf9d726ee57c0007fe9054c88d5a56f0c8157/violinModel.dsp | faust | Violin model
Violin string
upper portion of the string length
lower portion of the string length
String segment with interpolation
Violin body
Interface
V = hslider("Velocity", 0.2, 0, 1, 0.01) : si.smoo;
Res =500;
process
process = violinModel(L,P,bowingInput,Pos),violinModel(L*2/3,P,bowingInput,Pos):>_/2<: _,_;
interpolate Delay | import("stdfaust.lib");
violinModel(stringLength,bowPressure,bowVelocity,bowPosition) = pm.endChain(modelChain)
with{
stringTuning = 0.08;
stringL = stringLength-stringTuning;
modelChain = pm.chain(
violinNuts :
bowedString(stringL,bowPressure,bowVelocity,bowPosition) :
pm.violinBridge :
violinBody :
pm.out
);
};
bowedString(stringLength, bowPressure, bowVelocity, bowPosition) =
pm.chain(
pm.stringSegment(maxStringLength,ntbd) :
pm.violinBow(bowPressure, bowVelocity) :
pm.stringSegment(maxStringLength,btbd)
)
with{
maxStringLength = pm.maxLength;
};
stringSegment(maxStringLength, length) = guide, guide, _
with {
guide = interpDelay(nMax, 0.01, n, gate);
nMax = pm.maxLength : pm.l2s;
n = length : pm.l2s/2;
};
violinBody = reflectance, transmittance, _
with{
transmittance = fi.resonbp(Res,2,1);
reflectance = _;
};
violinNuts = pm.lTermination(-1*pm.bridgeFilter(0.7,0.1),pm.basicBlock);
freq = hslider("freq",440, 300, 1000, 0.1) : si.smoo;
L = 340/(freq);
Pos = hslider("Possition", 0.2, 0, 1, 0.01) : si.smoo;
oscRes = hslider("Resonance Oscilation", 0.5, 0, 1, 0.01) : si.smoo;
Res = 1.5*freq + freq*oscRes*os.osc(0.5);
gain = hslider("gain", 0, -96, 0, 0.1) : ba.db2linear : si.smoo;
gate = 1;
velocityAttack = hslider("Velocity attack",1,0.1,5,0.01);
velocityOsc = hslider("Bowing frequency",3,0,10,0.01);
P = hslider("preasure", 0.2, 0, 1, 0.01) * en.ar(0.01,2,gate)*os.osc(velocityOsc);
s = os.osc(velocityOsc*en.asr(2,1,2,gate));
bowingInput = en.asr(velocityAttack,gain/2,2,gate)*s;
process = violinModel(L,P,bowingInput,Pos)<: _,_;
interpDelay(m,interp,del,t) = _ <: de.fdelay4(m,del0)*xfade, de.fdelay4(m,del1)*(1-xfade) :> _
with{
switch = t' : ba.impulsify : +~%(2);
del0 = del : ba.sAndH(1-switch);
del1 = del : ba.sAndH(switch);
xfade = en.asr(interp,1,interp,switch);
};
|
80bf55410575365b0c335eba0b71687a0094e204e8fe531cefaeb9e8e4eda9f3 | rottingsounds/bitDSP-faust | dsm2_svg.dsp | import("stdfaust.lib");
integrator = fi.pole(1);
Q(x) = ba.if(x < 0, -1, 1);
process(x) = ((x - _ : integrator) - _ * 2 : integrator : Q) ~ (_ <: _ , _);
| https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/c436ecad29c57d46d5e3e59110c25e71a3761fc5/test/dsm2_svg.dsp | faust | import("stdfaust.lib");
integrator = fi.pole(1);
Q(x) = ba.if(x < 0, -1, 1);
process(x) = ((x - _ : integrator) - _ * 2 : integrator : Q) ~ (_ <: _ , _);
|
|
af5e34e6f6949f97fda10aaae6720abcf6632e642a43b39ed6819b2c4491a336 | inria-emeraude/syfala | dist.dsp | import("stdfaust.lib");
drive = hslider("drive",0,0,1,0.01);
offset = hslider("offset",0,-1,1,0.01);
process = ef.cubicnl(drive,offset) <: _,_;
| https://raw.githubusercontent.com/inria-emeraude/syfala/95ed6765d73520362f6a1ad35e4a3b2a5e16fbc9/examples/dist.dsp | faust | import("stdfaust.lib");
drive = hslider("drive",0,0,1,0.01);
offset = hslider("offset",0,-1,1,0.01);
process = ef.cubicnl(drive,offset) <: _,_;
|
|
ada48665afdd5786a18e8263bab61838c2428739ffa0b615f878b2d92387e664 | LucaSpanedda/Musical_Studies_of_Chaotic_Systems | 1.04_Lorenz_Costrained.dsp | // import Standard Faust library
// https://github.com/grame-cncm/faustlibraries/
import("stdfaust.lib");
// DC Blocker: zero value, pole value, input
// The dcblocker is a small recursive filter specified by the difference equation
// It is needed to remove the dc component of the signal.
dcblocker(zero,pole,x) = x : dcblockerout
with{
onezero = _ <: _,mem : _,*(zero) : -;
onepole = + ~ *(pole);
dcblockerout = _ : onezero : onepole;
};
// ma.EPSILON is a constant number for avoid nan numbers
// ma.EPSILON set the minimum value in a number different from 0
// Saturator = waveshaper, classical softclip saturator.
// based on the hyperbolic tangent function :
// y(t) = tanh x(t)
saturator(treshold,x) = treshold*ma.tanh(x/(max(treshold,ma.EPSILON)));
// Lorenz System Osc with 3 Out
lorenz(x0,y0,z0,sigma,rho,beta,dt,l) = loop ~ si.bus(3) : par(i, 3, /(l))
with {
x_init = x0-x0';
y_init = y0-y0';
z_init = z0-z0';
loop(x, y, z) =
saturator(l, dcblocker(1,0.995,(x + sigma * (y - x) * dt + x_init))),
saturator(l, dcblocker(1,0.995,(y + (rho * x - x * z - y) * dt + y_init))),
saturator(l, dcblocker(1,0.995,(z + (x * y - beta * z) * dt + z_init)));
};
routing(a,b,c) = (a+b+c)/3;
process = lorenz(1.2,1.3,1.6,48,3,1,0.5,32) : routing <: _,_; | https://raw.githubusercontent.com/LucaSpanedda/Musical_Studies_of_Chaotic_Systems/d8b78c011cc0b2b75f74643eba78306d6a3f92df/1.04_Lorenz_Costrained.dsp | faust | import Standard Faust library
https://github.com/grame-cncm/faustlibraries/
DC Blocker: zero value, pole value, input
The dcblocker is a small recursive filter specified by the difference equation
It is needed to remove the dc component of the signal.
ma.EPSILON is a constant number for avoid nan numbers
ma.EPSILON set the minimum value in a number different from 0
Saturator = waveshaper, classical softclip saturator.
based on the hyperbolic tangent function :
y(t) = tanh x(t)
Lorenz System Osc with 3 Out | import("stdfaust.lib");
dcblocker(zero,pole,x) = x : dcblockerout
with{
onezero = _ <: _,mem : _,*(zero) : -;
onepole = + ~ *(pole);
dcblockerout = _ : onezero : onepole;
};
saturator(treshold,x) = treshold*ma.tanh(x/(max(treshold,ma.EPSILON)));
lorenz(x0,y0,z0,sigma,rho,beta,dt,l) = loop ~ si.bus(3) : par(i, 3, /(l))
with {
x_init = x0-x0';
y_init = y0-y0';
z_init = z0-z0';
loop(x, y, z) =
saturator(l, dcblocker(1,0.995,(x + sigma * (y - x) * dt + x_init))),
saturator(l, dcblocker(1,0.995,(y + (rho * x - x * z - y) * dt + y_init))),
saturator(l, dcblocker(1,0.995,(z + (x * y - beta * z) * dt + z_init)));
};
routing(a,b,c) = (a+b+c)/3;
process = lorenz(1.2,1.3,1.6,48,3,1,0.5,32) : routing <: _,_; |
6acc40956a433ab02a211672a732e287d4acb48863c9ca6c6b1f446f01ba953f | tomara-x/magi | seqdist.dsp | //trans rights
import("stdfaust.lib");
trig2gate(t,time) = t : ba.peakholder(ba.sec2samp(time));
bpm = 86;
htrig = ba.beat(bpm*3);
hbeat = ba.cycle(12, htrig) : _,!,!,!,_,!,!,!,_,!,!,! :> _;
hat = sy.hat(3100,18e3,0.0005,0,hbeat);
ktrig = ba.beat(bpm*8);
kbeat = ba.cycle(32, ktrig) : par(i,3,_,_,!,!,!,!,!,!),_,_,_,!,!,_,!,! :> _;
kick = sy.kick(44, 0.002, 0.0005, .6, 1, trig2gate(kbeat,0.05));
process = kick+hat : *(10) : aa.sine2 : *(10) : aa.cubic1 : *(0.5) <: dm.freeverb_demo;
| https://raw.githubusercontent.com/tomara-x/magi/43f5af6acb97973b3b82004f433925851b44d7d0/practice/seqdist.dsp | faust | trans rights | import("stdfaust.lib");
trig2gate(t,time) = t : ba.peakholder(ba.sec2samp(time));
bpm = 86;
htrig = ba.beat(bpm*3);
hbeat = ba.cycle(12, htrig) : _,!,!,!,_,!,!,!,_,!,!,! :> _;
hat = sy.hat(3100,18e3,0.0005,0,hbeat);
ktrig = ba.beat(bpm*8);
kbeat = ba.cycle(32, ktrig) : par(i,3,_,_,!,!,!,!,!,!),_,_,_,!,!,_,!,! :> _;
kick = sy.kick(44, 0.002, 0.0005, .6, 1, trig2gate(kbeat,0.05));
process = kick+hat : *(10) : aa.sine2 : *(10) : aa.cubic1 : *(0.5) <: dm.freeverb_demo;
|
c4e3586e42060a9f830f693e916fda7a1fa32b64692fb4b886f6cc513caeddf2 | publicsamples/Quetzalcoatl | Folder.dsp | import("stdfaust.lib");
import("basics.lib");
import("maths.lib");
fold = hslider("fold", 0, 0, 1, 0.001): si.smooth(0.999);
offset = hslider("offset", 0, -1, 1, 0.001): si.smooth (0.999);
LP = hslider("lowpass", 0, 0, 1, 0.001): lin2LogGain: si.smooth (0.999);
scale(x,mn,mx,a,b) = a+(b-a)*(x-mn)/(mx-mn);
R1 = (10., 49.9, 91., 30., 68.);
r2 = 100.;
R3 = (100., 43.2, 56., 68., 33., 240.);
C = (0.-12., 0.-27.777, .0-21.428, 17.647, 36.363);
Vs = 6.;
r1(k) = ba.take(k+1, R1);
r3(k) = ba.take(k+1, R3);
c(k) = ba.take(k+1, C);
term1(k) = Vs*r1(k)/r2;
invClipCond(sig, k) = ma.fabs(sig) > term1(k);
invClipNo(sig, k) = ma.signum(sig) * term1(k);
invClip(sig, k) = ba.if(invClipCond(sig, k), sig, invClipNo(sig, k));
term2(k) = (r2*r3(k)/(r1(k)*r3(k) + r2*r3(k) + r1(k)*r2));
term3(clipped, k) = (clipped - ma.signum(clipped)*term1(k))* c(k);
revClip(sig, k) = (term2(k) * term3(sig, k)):fi.lowpass(5,SR/2.6);
/*fi.bandpass(1,20,16000);*/
folderBranches(sig) = sig <: par(i, 5, revClip(invClip(sig,i), i));
/*folderBranches(sig) = sig <: par(i, 5, invClip(sig,i));*/
wf(sig) = sig <: ( (folderBranches(sig) :> _) + (5.*sig:fi.lowpass(5,SR/2.6)) ):fi.lowpass(1,scale(LP,0,1,1300,SR/2.6));
wavefolder = (_*term1(0)*scale(fold,0.,1.,1.,20.) + scale(offset,-1,1,0-term1(2),term1(2))) : wf(_)/6. : ef.cubicnl(0.0,0):fi.dcblockerat(10);
process = wavefolder, wavefolder; | https://raw.githubusercontent.com/publicsamples/Quetzalcoatl/e080b08abc36c7d9aeaa85ac66bea21904171d75/Quetzalcoatl/DspNetworks/CodeLibrary/faust/Folder.dsp | faust | fi.bandpass(1,20,16000);
folderBranches(sig) = sig <: par(i, 5, invClip(sig,i)); | import("stdfaust.lib");
import("basics.lib");
import("maths.lib");
fold = hslider("fold", 0, 0, 1, 0.001): si.smooth(0.999);
offset = hslider("offset", 0, -1, 1, 0.001): si.smooth (0.999);
LP = hslider("lowpass", 0, 0, 1, 0.001): lin2LogGain: si.smooth (0.999);
scale(x,mn,mx,a,b) = a+(b-a)*(x-mn)/(mx-mn);
R1 = (10., 49.9, 91., 30., 68.);
r2 = 100.;
R3 = (100., 43.2, 56., 68., 33., 240.);
C = (0.-12., 0.-27.777, .0-21.428, 17.647, 36.363);
Vs = 6.;
r1(k) = ba.take(k+1, R1);
r3(k) = ba.take(k+1, R3);
c(k) = ba.take(k+1, C);
term1(k) = Vs*r1(k)/r2;
invClipCond(sig, k) = ma.fabs(sig) > term1(k);
invClipNo(sig, k) = ma.signum(sig) * term1(k);
invClip(sig, k) = ba.if(invClipCond(sig, k), sig, invClipNo(sig, k));
term2(k) = (r2*r3(k)/(r1(k)*r3(k) + r2*r3(k) + r1(k)*r2));
term3(clipped, k) = (clipped - ma.signum(clipped)*term1(k))* c(k);
revClip(sig, k) = (term2(k) * term3(sig, k)):fi.lowpass(5,SR/2.6);
folderBranches(sig) = sig <: par(i, 5, revClip(invClip(sig,i), i));
wf(sig) = sig <: ( (folderBranches(sig) :> _) + (5.*sig:fi.lowpass(5,SR/2.6)) ):fi.lowpass(1,scale(LP,0,1,1300,SR/2.6));
wavefolder = (_*term1(0)*scale(fold,0.,1.,1.,20.) + scale(offset,-1,1,0-term1(2),term1(2))) : wf(_)/6. : ef.cubicnl(0.0,0):fi.dcblockerat(10);
process = wavefolder, wavefolder; |
cca83cea0ff1f968918bc3670bf8c7376aaac216b6fba8a7a707753e7dd5a4fc | inria-emeraude/syfala | bell.dsp | import("stdfaust.lib");
t60 = 30;
excitation = button("gate [switch:5]") : ba.impulsify;
process = excitation : pm.frenchBellModel(6,0,t60,1,2.5);
| https://raw.githubusercontent.com/inria-emeraude/syfala/95ed6765d73520362f6a1ad35e4a3b2a5e16fbc9/examples/bell.dsp | faust | import("stdfaust.lib");
t60 = 30;
excitation = button("gate [switch:5]") : ba.impulsify;
process = excitation : pm.frenchBellModel(6,0,t60,1,2.5);
|
|
80cc60e63820313fa61ccc59808805281a272f1a118b32be38134d49a71d0d6e | droosenb/faust-wdf-library | chuaDiode.dsp | //Chua's diode circuit
//original circuit featuring Chua's diode taken from Kurt Werner thesis
//for reference, see Meerkotter and Scholz, "Digital Simulation of Nonlinear Circuits by Wave Digital Filter Principles"
wdf = library("wdmodels.lib");
import("stdfaust.lib");
//create circuit components
c1(i) = wdf.capacitor_output(i, 5.5*10^(-9));
r2(i) = wdf.resistor_output(i, 1.6*10^3); //resistance must be slightly higher than original document, currently unsure why.
l3(i) = wdf.inductor_output(i, 7.07*10^(-3));
c4(i) = wdf.capacitor_output(i, 49.5*10^(-9));
d1(i) = wdf.u_chua(i, -500*10^-6, -800*10^-6, 1);
//I've added a voltage injection for agitation purposes. the system will always initialize with zeros, so adding an impulse will get oscillations started.
vInject(i) = wdf.series_voltage(i, button("impulse")*5 : ba.impulsify);
//input tree structure
treeChua = d1 : (wdf.parallel : (c1, (wdf.series : (r2, (wdf.parallel : (l3, (vInject :c4)))))));
chua = wdf.buildtree(treeChua);
process = chua; | https://raw.githubusercontent.com/droosenb/faust-wdf-library/e581eb15b7b06572add939c6aa99472cca04269b/examples/chua-diode/chuaDiode.dsp | faust | Chua's diode circuit
original circuit featuring Chua's diode taken from Kurt Werner thesis
for reference, see Meerkotter and Scholz, "Digital Simulation of Nonlinear Circuits by Wave Digital Filter Principles"
create circuit components
resistance must be slightly higher than original document, currently unsure why.
I've added a voltage injection for agitation purposes. the system will always initialize with zeros, so adding an impulse will get oscillations started.
input tree structure | wdf = library("wdmodels.lib");
import("stdfaust.lib");
c1(i) = wdf.capacitor_output(i, 5.5*10^(-9));
l3(i) = wdf.inductor_output(i, 7.07*10^(-3));
c4(i) = wdf.capacitor_output(i, 49.5*10^(-9));
d1(i) = wdf.u_chua(i, -500*10^-6, -800*10^-6, 1);
vInject(i) = wdf.series_voltage(i, button("impulse")*5 : ba.impulsify);
treeChua = d1 : (wdf.parallel : (c1, (wdf.series : (r2, (wdf.parallel : (l3, (vInject :c4)))))));
chua = wdf.buildtree(treeChua);
process = chua; |
9619fabbfc1a556b7725160435e321943c5873cb485d8843c57d45f93311c654 | Trzyszcz/Langley | gong.dsp | declare name "Gong";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 110, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
//gate = os.lf_imptrain(1) : en.ar(0.001, 0.15);
initgain = nentry("initgain", 0.3, 0, 10, 0.01) : si.smoo;
//RightHorizontal = hslider("righthorizontal", 0.5, 0, 1, 0.01);
//RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
Envelope = en.ar(0.01, 2);
//mod_ind = 2 * RightHorizontal;
mod_ind = hslider("mod_ind", 1.1, 0.5, 10, 0.1);
mod = os.osc(freq * (6/5));
car = os.osc(freq + freq*mod_ind*mod);
dry_sound = gain * (gate : Envelope) * car : fi.lowpass(2, 20000);
wet_sound = 0.05*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (dry_sound*0.95)<:_,_;
| https://raw.githubusercontent.com/Trzyszcz/Langley/ceb05551af996ad90090e91669b1a1af491b3fe1/Instruments/Gong/gong.dsp | faust | gate = os.lf_imptrain(1) : en.ar(0.001, 0.15);
RightHorizontal = hslider("righthorizontal", 0.5, 0, 1, 0.01);
RightVertical = hslider("rightvertical", 0.5, 0, 1, 0.01);
mod_ind = 2 * RightHorizontal; | declare name "Gong";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("freq", 110, 20, 20000, 0.01);
gain = nentry("gain", 0.3, 0, 10, 0.01) : si.smoo;
gate = button("gate");
initgain = nentry("initgain", 0.3, 0, 10, 0.01) : si.smoo;
Envelope = en.ar(0.01, 2);
mod_ind = hslider("mod_ind", 1.1, 0.5, 10, 0.1);
mod = os.osc(freq * (6/5));
car = os.osc(freq + freq*mod_ind*mod);
dry_sound = gain * (gate : Envelope) * car : fi.lowpass(2, 20000);
wet_sound = 0.05*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
process = wet_sound + (dry_sound*0.95)<:_,_;
|
31b952307733ae40dd9f853944c022dbc974af6b0a428ba583d0f768ee6f0aba | Trzyszcz/Langley | snare.dsp | declare name "snare";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("frequency", 220, 20, 20000, 0.001);
gain = nentry("gain", 1, 0, 1, 0.001);
gate = button("gate");
RightPush = button("RightPush");
//dry_sound = ( (os.lf_imptrain(1) : en.ar(0.001, 0.15)) * gain * no.noise ) : fi.resonhp(220, 6, 1) : fi.lowpass(2, 2000);
dry_sound = ( (gate : en.ar(0.001, 0.15)) * gain * no.noise ) : fi.resonhp(freq, 6, 1) : fi.lowpass(2, 2000);
short_delay = + ~ ( @(0.17*48000) *(7/12) );
wet_sound = 0.2*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
main_stream = wet_sound + (dry_sound*0.8);
short_delayed_stream = main_stream * RightPush : fi.lowpass(1,900) : short_delay;
process = main_stream + short_delayed_stream<:_,_;
| https://raw.githubusercontent.com/Trzyszcz/Langley/e4f0c88d5b9de895f96509b72446a8760ca29c12/Instruments/Snare/snare.dsp | faust | dry_sound = ( (os.lf_imptrain(1) : en.ar(0.001, 0.15)) * gain * no.noise ) : fi.resonhp(220, 6, 1) : fi.lowpass(2, 2000); | declare name "snare";
declare nvoices "16";
import("stdfaust.lib");
freq = nentry("frequency", 220, 20, 20000, 0.001);
gain = nentry("gain", 1, 0, 1, 0.001);
gate = button("gate");
RightPush = button("RightPush");
dry_sound = ( (gate : en.ar(0.001, 0.15)) * gain * no.noise ) : fi.resonhp(freq, 6, 1) : fi.lowpass(2, 2000);
short_delay = + ~ ( @(0.17*48000) *(7/12) );
wet_sound = 0.2*dry_sound : re.mono_freeverb(0.5, 0.5, 0.5, 0.5);
main_stream = wet_sound + (dry_sound*0.8);
short_delayed_stream = main_stream * RightPush : fi.lowpass(1,900) : short_delay;
process = main_stream + short_delayed_stream<:_,_;
|
31451ea7cd1af556de15fb591b7b04538633b7d0ab13d48d183de8d57947be17 | jrdooley/formuls | f_repeater.dsp | //----------------------------------------------------------------------------------------//
//----------------------------------FORMULS_REPEATER--------------------------------------//
//----------------------------------------------------------------------------------------//
// compile with: faust2puredata -vec -lv 0 -vs 4 -clang
declare names "formuls";
declare author "James Dooley: [email protected]";
declare copyright "James Dooley";
declare version "1.0";
declare license "MIT";
declare options "[osc:on]";
import("stdfaust.lib");
fx = library("ffx.lib");
process = fx.repeater;
| https://raw.githubusercontent.com/jrdooley/formuls/9e3264759a3685478d8f9fe5a99e63474afa80ad/src/faust/f_repeater.dsp | faust | ----------------------------------------------------------------------------------------//
----------------------------------FORMULS_REPEATER--------------------------------------//
----------------------------------------------------------------------------------------//
compile with: faust2puredata -vec -lv 0 -vs 4 -clang |
declare names "formuls";
declare author "James Dooley: [email protected]";
declare copyright "James Dooley";
declare version "1.0";
declare license "MIT";
declare options "[osc:on]";
import("stdfaust.lib");
fx = library("ffx.lib");
process = fx.repeater;
|
2e13076a19df6545ee8e84916fa70c079e8e0280e405f14ba2076d5f3f81a90f | madskjeldgaard/komet | karplus_staerk.dsp | import("stdfaust.lib");
import("physmodels.lib");
ks_ui = gate : pm.impulseExcitation*gain : pm.ks( (freq : f2l), damping )
with{
f = hslider("freq",440,20,20000,0.01);
gain = hslider("gain",0.8,0,1,0.01);
s = hslider("sustain" ,0,0,1,1);
damping = hslider("damping" ,0.01,0,1,0.01) : si.smoo;
t = button("gate");
gate = t+s : min(1);
freq = f;
};
process = ks_ui;
| https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/karplus_staerk.dsp | faust | import("stdfaust.lib");
import("physmodels.lib");
ks_ui = gate : pm.impulseExcitation*gain : pm.ks( (freq : f2l), damping )
with{
f = hslider("freq",440,20,20000,0.01);
gain = hslider("gain",0.8,0,1,0.01);
s = hslider("sustain" ,0,0,1,1);
damping = hslider("damping" ,0.01,0,1,0.01) : si.smoo;
t = button("gate");
gate = t+s : min(1);
freq = f;
};
process = ks_ui;
|
|
bcdeda66206020daed92f5509b5505284ee3ed8dbaaf8569d219f5e0b25399a0 | inria-emeraude/syfala | bellN.dsp | import("stdfaust.lib");
t60 = 30;
N = 24;
excitation = button("gate [switch:5]") : ba.impulsify;
process = excitation : pm.frenchBellModel(N,0,t60,1,2.5);
| https://raw.githubusercontent.com/inria-emeraude/syfala/95ed6765d73520362f6a1ad35e4a3b2a5e16fbc9/tools/multiN/dsp/bellN.dsp | faust | import("stdfaust.lib");
t60 = 30;
N = 24;
excitation = button("gate [switch:5]") : ba.impulsify;
process = excitation : pm.frenchBellModel(N,0,t60,1,2.5);
|
|
ad5987c35e98f06bcf2e00de02d5fb386c03f8e3662885eb3eb4c605cd67b13b | danidev/microcosmos | MicrocosmosDsp.dsp | import("stdfaust.lib");
// 1. a square wave oscillator
/*
osc = os.pulsetrain(440, 0.5);
process = osc * 0.5 <: _,_;
*/
// 2. note to hz
/*
note = 64;
pitch = ba.midikey2hz(note);
osc = os.pulsetrain(pitch, 0.5);
process = osc * 0.5 <: _,_;
*/
// 3. UI parameter
/*
note = hslider("note", 64, 0, 127, 1);
pitch = ba.midikey2hz(note);
osc = os.pulsetrain(pitch, 0.5);
process = osc * 0.5 <: _,_;
*/
// 4. gate
/*
gate = button("gate");
note = hslider("note", 64, 0, 127, 1);
pitch = ba.midikey2hz(note);
osc = os.pulsetrain(pitch, 0.5);
process = osc * gate : _ * 0.5 <: _,_;
*/
// 5. AR envelope
/*
gate = button("[0]gate");
note = hslider("[1]note", 64, 0, 127, 1);
attack = hslider("[2]attack", 0.1, 0, 1, 0.1);
release = hslider("[3]release", 0.1, 0, 1, 0.1);
env = en.ar(attack, release, gate);
pitch = ba.midikey2hz(note);
osc = os.pulsetrain(pitch, 0.5);
process = osc * env : _ * 0.5 <: _,_;
*/
// 6. LP filter
/*
gate = ba.beat(120); //button("[0]gate");
note = hslider("[1]note", 64, 0, 127, 1);
attack = hslider("[2]attack", 0.1, 0.01, 1, 0.1);
release = hslider("[3]release", 0.1, 0, 1, 0.1);
cutoff = hslider("[4]cutoff", 5000, 50, 10000, 1) : si.smoo;
resonance = hslider("[5]resonance", 1, 1, 2, .9) : si.smoo;
env = en.ar(attack, release, gate);
pitch = ba.midikey2hz(note);
osc = os.pulsetrain(pitch, 0.5);
filter = fi.resonlp(cutoff, resonance, 0.9);
process = osc : filter : _ * env : _ * 0.5 <: _,_;
*/
// 7. Modulation with an LFO
gate = button("[0]gate");
note = hslider("[1]note", 64, 0, 127, 1);
attack = hslider("[2]attack", 0.1, 0.01, 1, 0.1) : si.smoo;
release = hslider("[3]release", 0.1, 0, 1, 0.1) : si.smoo;
cutoff = hslider("[4]cutoff", 5000, 50, 10000, 1) : si.smoo;
resonance = hslider("[5]resonance", 1, 1, 2, .9) : si.smoo;
lfoFreq = hslider("[6]LFO", 1, 0, 80, 0.1) : si.smoo;
cutoffAmount = hslider("[7]LFO->cutoff", 0, 0, 1, 0.1) : si.smoo;
pitchAmount = hslider("[8]LFO->pitch", 0, 0, 1, 0.1) : si.smoo;
env = en.ar(attack, release, gate);
lfo = os.lf_triangle(lfoFreq);
modulatedNote = note + (lfo * 24) * pitchAmount;
modulatedCutoff = cutoff + (lfo * 1000) * cutoffAmount;
pitch = ba.midikey2hz(modulatedNote);
osc = os.pulsetrain(pitch, 0.5);
filter = fi.resonlp(modulatedCutoff, resonance, 1);
process = osc : filter : _ * env : _ * 0.5 <: _,_;
| https://raw.githubusercontent.com/danidev/microcosmos/dd71ba8fe4f545cf592418dfd77ac21bb2d94e29/dsp/adc21/dsp/MicrocosmosDsp.dsp | faust | 1. a square wave oscillator
osc = os.pulsetrain(440, 0.5);
process = osc * 0.5 <: _,_;
2. note to hz
note = 64;
pitch = ba.midikey2hz(note);
osc = os.pulsetrain(pitch, 0.5);
process = osc * 0.5 <: _,_;
3. UI parameter
note = hslider("note", 64, 0, 127, 1);
pitch = ba.midikey2hz(note);
osc = os.pulsetrain(pitch, 0.5);
process = osc * 0.5 <: _,_;
4. gate
gate = button("gate");
note = hslider("note", 64, 0, 127, 1);
pitch = ba.midikey2hz(note);
osc = os.pulsetrain(pitch, 0.5);
process = osc * gate : _ * 0.5 <: _,_;
5. AR envelope
gate = button("[0]gate");
note = hslider("[1]note", 64, 0, 127, 1);
attack = hslider("[2]attack", 0.1, 0, 1, 0.1);
release = hslider("[3]release", 0.1, 0, 1, 0.1);
env = en.ar(attack, release, gate);
pitch = ba.midikey2hz(note);
osc = os.pulsetrain(pitch, 0.5);
process = osc * env : _ * 0.5 <: _,_;
6. LP filter
gate = ba.beat(120); //button("[0]gate");
note = hslider("[1]note", 64, 0, 127, 1);
attack = hslider("[2]attack", 0.1, 0.01, 1, 0.1);
release = hslider("[3]release", 0.1, 0, 1, 0.1);
cutoff = hslider("[4]cutoff", 5000, 50, 10000, 1) : si.smoo;
resonance = hslider("[5]resonance", 1, 1, 2, .9) : si.smoo;
env = en.ar(attack, release, gate);
pitch = ba.midikey2hz(note);
osc = os.pulsetrain(pitch, 0.5);
filter = fi.resonlp(cutoff, resonance, 0.9);
process = osc : filter : _ * env : _ * 0.5 <: _,_;
7. Modulation with an LFO | import("stdfaust.lib");
gate = button("[0]gate");
note = hslider("[1]note", 64, 0, 127, 1);
attack = hslider("[2]attack", 0.1, 0.01, 1, 0.1) : si.smoo;
release = hslider("[3]release", 0.1, 0, 1, 0.1) : si.smoo;
cutoff = hslider("[4]cutoff", 5000, 50, 10000, 1) : si.smoo;
resonance = hslider("[5]resonance", 1, 1, 2, .9) : si.smoo;
lfoFreq = hslider("[6]LFO", 1, 0, 80, 0.1) : si.smoo;
cutoffAmount = hslider("[7]LFO->cutoff", 0, 0, 1, 0.1) : si.smoo;
pitchAmount = hslider("[8]LFO->pitch", 0, 0, 1, 0.1) : si.smoo;
env = en.ar(attack, release, gate);
lfo = os.lf_triangle(lfoFreq);
modulatedNote = note + (lfo * 24) * pitchAmount;
modulatedCutoff = cutoff + (lfo * 1000) * cutoffAmount;
pitch = ba.midikey2hz(modulatedNote);
osc = os.pulsetrain(pitch, 0.5);
filter = fi.resonlp(modulatedCutoff, resonance, 1);
process = osc : filter : _ * env : _ * 0.5 <: _,_;
|
a8f9c0eee0a17d4834950806d7907aecfc7f34e06946a6f0ea264ababb969509 | JDCAudio/Stray_virtual-synth | RandomLFO.dsp | import("stdfaust.lib");
N = 2;
I = N + 1;
xList = par(i,I,int(i));
f = hslider("Frequency", 5, 0, 20, 0.01);
x = os.phasor(I, f);
aList = par(i,I,(no.lfnoise(5) * 0.1));
interpResult = x, aList : it.lagrangeInterpolation(N, xList);
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
process = clipResult; | https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/9571e2e12286c75ae495205546dfcfeb63449fe9/WaveGenerationTests/lfoAmplitudeControl/RandomLFO.dsp | faust | import("stdfaust.lib");
N = 2;
I = N + 1;
xList = par(i,I,int(i));
f = hslider("Frequency", 5, 0, 20, 0.01);
x = os.phasor(I, f);
aList = par(i,I,(no.lfnoise(5) * 0.1));
interpResult = x, aList : it.lagrangeInterpolation(N, xList);
clipResult = ba.if(interpResult>1.0, 1.0, (ba.if(interpResult<-1.0, -1.0, interpResult)));
process = clipResult; |
|
70f30727ccb4fee55bcb6fd5f4175a1413f076b2e43c345c35d0537cb62e3b2b | johannphilippe/grame_cnsmd_2023 | independant_voice_control.dsp | import("stdfaust.lib");
hold_smps(smps_dur, trig) = pulsation
with {
count = ba.countdown(smps_dur, trig);
//count = -(1)~_, smps_dur : select2(trig);
pulsation = 0, 1 : select2(count > 0);
};
hold_dur(duration, trig) = hold_smps(ba.sec2samp(duration), trig);
N_VOICES = 8;
voice(n) = vgroup("voice_%n", os.osc(freq)*env)
with {
// Each oscillator has a different controllable frequency
freq = hslider("freq_%n", (n+1)*50, 50, 1000, 1);
// Same for envelop speed (in Hz)
env_speed = hslider("envelop_speed_%n", 0.1, 0.1, 5, 0.01);
dur = 1 / env_speed;
atq = dur * 0.1;
rel = dur * 0.9;
env = ba.beat(env_speed * 60) : hold_dur(atq) : en.are(atq, rel);
};
amp = hslider("amplitude", 0.1, 0, 1, 0.01) : si.smoo;
process = sum(n, N_VOICES, voice(n) ) / N_VOICES * amp;
| https://raw.githubusercontent.com/johannphilippe/grame_cnsmd_2023/ccfd6e9a5c1537097546520317c8c5beea06006f/voices/independant_voice_control.dsp | faust | count = -(1)~_, smps_dur : select2(trig);
Each oscillator has a different controllable frequency
Same for envelop speed (in Hz) | import("stdfaust.lib");
hold_smps(smps_dur, trig) = pulsation
with {
count = ba.countdown(smps_dur, trig);
pulsation = 0, 1 : select2(count > 0);
};
hold_dur(duration, trig) = hold_smps(ba.sec2samp(duration), trig);
N_VOICES = 8;
voice(n) = vgroup("voice_%n", os.osc(freq)*env)
with {
freq = hslider("freq_%n", (n+1)*50, 50, 1000, 1);
env_speed = hslider("envelop_speed_%n", 0.1, 0.1, 5, 0.01);
dur = 1 / env_speed;
atq = dur * 0.1;
rel = dur * 0.9;
env = ba.beat(env_speed * 60) : hold_dur(atq) : en.are(atq, rel);
};
amp = hslider("amplitude", 0.1, 0, 1, 0.01) : si.smoo;
process = sum(n, N_VOICES, voice(n) ) / N_VOICES * amp;
|
61c22f2082d3926b637c6393d9930b687811b0127c49a443f6fcacd11ee38f0d | tomara-x/magi | delay-trig-div.dsp | //trans rights
import("stdfaust.lib");
//will get back to this
trig2gate(t,time) = t : ba.peakholder(ba.sec2samp(time));
bpm = 60;
trig = ba.beat(bpm); //trigger at beat
beat = ba.tempo(bpm); // beat length in samples
hbeat = trig <: _,_@(beat/3),_@(beat/6) :> _;
hat = sy.hat(3100,18e3,0.0005,0,hbeat);
kbeat = trig <: _,_@(beat*1),_@(beat*2),_@(beat*3),_@(beat*3.25) :> _;
kick = sy.kick(44, 0.05, 0.005, .9, 1, trig2gate(kbeat,0.05));
process = kick+hat <: dm.freeverb_demo;
| https://raw.githubusercontent.com/tomara-x/magi/7c24a576ce53357ca46f15bfb65c7e74c9651bf9/practice/delay-trig-div.dsp | faust | trans rights
will get back to this
trigger at beat
beat length in samples | import("stdfaust.lib");
trig2gate(t,time) = t : ba.peakholder(ba.sec2samp(time));
bpm = 60;
hbeat = trig <: _,_@(beat/3),_@(beat/6) :> _;
hat = sy.hat(3100,18e3,0.0005,0,hbeat);
kbeat = trig <: _,_@(beat*1),_@(beat*2),_@(beat*3),_@(beat*3.25) :> _;
kick = sy.kick(44, 0.05, 0.005, .9, 1, trig2gate(kbeat,0.05));
process = kick+hat <: dm.freeverb_demo;
|
9d1255afa8d1084e6a2283c6117d17ccb09dff20f4754a5fe3ac7ffa16d07ff7 | LSSN/2020-01-25-dsp-4a-annalaurasanna | verificaaaa.dsp | // Crea un file di faust in cui esponi, in forma di commento, i principi della sintesi sottrattiva. realizza un esemoio attraverso un filtraggio passa banda.
// la sintesi sottrattiva è un modello di sintesi usata nella musica elettronica, dove una sorgente sonora viene filtrata sul piano 'spettrale', da essa si sottraggono le bande di frequenza. il principio su cui si basa questa sintesi è quello di un oscillatore che genera delle forme d'onda che abbiano già una propria conformazione armonica, come un onda quadra. tramite un filtro vengono selezionate solo alcune componeneti dell'onda, mentre le altre vengono escluse. per realizzare la sintesi sottrattiva digitale, occorre, proggettare la funzione di trasferimento del filtro che moltiplicata per la funzione in ingresso darà come risultato la forma d'onda filtrata.
//I numeri che identificano lo slider sono il valore iniziale, valore minimo, valore massimo e step incrementale;
//Step incrementale è la precisione di passaggio da uno spettro all'altro;
//Il valore iniziale è il valore che deve assumere il controllo quando si aziona il programma;
//Il valore iniziale può essere solo tra il valore minimo e il valore massimo.
//lo slider può essere verticale e orizzontale, per cambiarlo da verticale (vslider) orizzontale (oslider)
//Per mettere un filtro dopo no.noise (no.noise :fi)
//il rumore è un suono che non ha ampiezza e non trasmette informazioni
//no.noise è un generatore causale di numeri tra -1 e 1
//lo spettroscopio ci mostra il contenuto del suono nel dominio della frequenza sull'asse delle 'x' le frequenze sull'asse delle 'y' l'ampiezza
//l'oscilloscopio ci mostra il contenuto del suono nel dominio del tempo. sull'asse delle 'x' abbiamo il tempo e sull'asse delle 'y' abbiamo le ampiezze
//lowpass è un filtro che significa 'passa basso', è quello tra i più semplici
//6000 in questo caso indica il punto di taglio, dove la frequenza inizia a diminuire
// il filtro highpass
// dato un punto di taglio il filtro di primo ordine attenua 6 dB per ottava
//la velocità di un filtro è chiamato ordine
//la frequenza di taglio si chiama cut off
import("stdfaust.lib") ;
gain= vslider("gain",0,0,1,0.1) ;
process = no.noise : fi.lowpass(4,6000) : fi.highpass(4,6000);
| https://raw.githubusercontent.com/LSSN/2020-01-25-dsp-4a-annalaurasanna/8bf73710c3ad0232fde9bb36460336894f1ca00b/verificaaaa.dsp | faust | Crea un file di faust in cui esponi, in forma di commento, i principi della sintesi sottrattiva. realizza un esemoio attraverso un filtraggio passa banda.
la sintesi sottrattiva è un modello di sintesi usata nella musica elettronica, dove una sorgente sonora viene filtrata sul piano 'spettrale', da essa si sottraggono le bande di frequenza. il principio su cui si basa questa sintesi è quello di un oscillatore che genera delle forme d'onda che abbiano già una propria conformazione armonica, come un onda quadra. tramite un filtro vengono selezionate solo alcune componeneti dell'onda, mentre le altre vengono escluse. per realizzare la sintesi sottrattiva digitale, occorre, proggettare la funzione di trasferimento del filtro che moltiplicata per la funzione in ingresso darà come risultato la forma d'onda filtrata.
I numeri che identificano lo slider sono il valore iniziale, valore minimo, valore massimo e step incrementale;
Step incrementale è la precisione di passaggio da uno spettro all'altro;
Il valore iniziale è il valore che deve assumere il controllo quando si aziona il programma;
Il valore iniziale può essere solo tra il valore minimo e il valore massimo.
lo slider può essere verticale e orizzontale, per cambiarlo da verticale (vslider) orizzontale (oslider)
Per mettere un filtro dopo no.noise (no.noise :fi)
il rumore è un suono che non ha ampiezza e non trasmette informazioni
no.noise è un generatore causale di numeri tra -1 e 1
lo spettroscopio ci mostra il contenuto del suono nel dominio della frequenza sull'asse delle 'x' le frequenze sull'asse delle 'y' l'ampiezza
l'oscilloscopio ci mostra il contenuto del suono nel dominio del tempo. sull'asse delle 'x' abbiamo il tempo e sull'asse delle 'y' abbiamo le ampiezze
lowpass è un filtro che significa 'passa basso', è quello tra i più semplici
6000 in questo caso indica il punto di taglio, dove la frequenza inizia a diminuire
il filtro highpass
dato un punto di taglio il filtro di primo ordine attenua 6 dB per ottava
la velocità di un filtro è chiamato ordine
la frequenza di taglio si chiama cut off | import("stdfaust.lib") ;
gain= vslider("gain",0,0,1,0.1) ;
process = no.noise : fi.lowpass(4,6000) : fi.highpass(4,6000);
|
f7b645cd0afa889f81b898a5fe208eb13d355dc9e16f07568771641e1e015da3 | cchafe/wfs | dcblock.dsp | declare name "dcblock";
declare description "Simple call of the Karplus-Strong model for the Faust physical modeling library";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = fi.dcblocker;
| https://raw.githubusercontent.com/cchafe/wfs/d5c8b3a502d8f6f83adb351905dc996563fd53cb/dsp/dcblock.dsp | faust | declare name "dcblock";
declare description "Simple call of the Karplus-Strong model for the Faust physical modeling library";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = fi.dcblocker;
|
|
b97fe7671c4a5cec08218cc41c32b5e79749438a68e21cdd31ef6616aa0719b5 | ABCSchuetze/arduino-audio-tools | volume.dsp | declare compilation_options "-single -scal -inpl -fx -I /Users/pschatzmann/.FaustLive-CurrentSession-2.0/Libs -I /Users/pschatzmann/.FaustLive-CurrentSession-2.0/Examples";
declare library_path "volume";
declare library_path "/Users/pschatzmann/.FaustLive-CurrentSession-2.0/Libs/stdfaust.lib";
declare library_path "/Users/pschatzmann/.FaustLive-CurrentSession-2.0/Libs/basics.lib";
declare library_path "/Users/pschatzmann/.FaustLive-CurrentSession-2.0/Libs/signals.lib";
declare author "Grame";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.1";
declare copyright "(c)GRAME 2006";
declare filename "volume";
declare license "BSD";
declare name "volume";
declare signals_lib_name "Faust Signal Routing Library";
declare signals_lib_version "0.0";
declare version "1.0";
process = _,(vslider("[1]", 0.0f, -70.0f, 4.0f, 0.10000000000000001f) : \(x1).(10.0f,(x1,20.0f : /) : pow) : _,0.0010000000000000009f : * : +~(_,0.999f : *)) : *;
| https://raw.githubusercontent.com/ABCSchuetze/arduino-audio-tools/b9058f168356f4bf356787ea125f88919abe6daa/examples/examples-faust/streams-generator-faust-i2s/volume.dsp | faust | declare compilation_options "-single -scal -inpl -fx -I /Users/pschatzmann/.FaustLive-CurrentSession-2.0/Libs -I /Users/pschatzmann/.FaustLive-CurrentSession-2.0/Examples";
declare library_path "volume";
declare library_path "/Users/pschatzmann/.FaustLive-CurrentSession-2.0/Libs/stdfaust.lib";
declare library_path "/Users/pschatzmann/.FaustLive-CurrentSession-2.0/Libs/basics.lib";
declare library_path "/Users/pschatzmann/.FaustLive-CurrentSession-2.0/Libs/signals.lib";
declare author "Grame";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.1";
declare copyright "(c)GRAME 2006";
declare filename "volume";
declare license "BSD";
declare name "volume";
declare signals_lib_name "Faust Signal Routing Library";
declare signals_lib_version "0.0";
declare version "1.0";
process = _,(vslider("[1]", 0.0f, -70.0f, 4.0f, 0.10000000000000001f) : \(x1).(10.0f,(x1,20.0f : /) : pow) : _,0.0010000000000000009f : * : +~(_,0.999f : *)) : *;
|
|
1adca52c709a877a967d2b4b060f42450e7e67477e4395d5ed962a8aed17e2f4 | grame-cncm/faust | table.dsp | declare compilation_options "-single -scal -e table.dsp -o table.dsp";
declare library_path "/Documents/faust-github-faust2/tests/impulse-tests/dsp/table.dsp";
declare library_path "/usr/local/share/faust/stdfaust.lib";
declare library_path "/usr/local/share/faust/noises.lib";
declare library_path "/usr/local/share/faust/filters.lib";
declare library_path "/usr/local/share/faust/maths.lib";
declare library_path "/usr/local/share/faust/oscillators.lib";
declare library_path "/usr/local/share/faust/platform.lib";
declare filename "table.dsp";
declare filters_lib_fir_author "Julius O. Smith III";
declare filters_lib_fir_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_fir_license "MIT-style STK-4.3 license";
declare filters_lib_iir_author "Julius O. Smith III";
declare filters_lib_iir_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_iir_license "MIT-style STK-4.3 license";
declare filters_lib_lowpass0_highpass1 "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_name "Faust Filters Library";
declare filters_lib_version "0.3";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.3";
declare name "table";
declare noises_lib_name "Faust Noise Generator Library";
declare noises_lib_version "0.0";
declare oscillators_lib_name "Faust Oscillator Library";
declare oscillators_lib_version "0.1";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.1";
process = 65536,((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : \(x2).(\(x3).(x3,x2 : -))~(_<:(_,-2.4949560019999999f : *),(_,1 : @ : _,2.0172658750000001f : *),(_,2 : @ : _,-0.52218940000000003f : *):>_) : _<:(_,0.049922034999999997f : *),(_,1 : @ : _,-0.095993537000000004f : *),(_,2 : @ : _,0.050612698999999997f : *),(_,3 : @ : _,-0.0044087859999999996f : *):>_),(hslider("freq", 440.0f, 50.0f, 2000.0f, 0.01f),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x1).(x1,(x1 : floor) : -))~_ : _,(65536 : float) : * : int) : rdtable<:_,_;
| https://raw.githubusercontent.com/grame-cncm/faust/412b060959590a367238c6914ae33de765dc45f7/tests/impulse-tests/dsp/table.dsp | faust | declare compilation_options "-single -scal -e table.dsp -o table.dsp";
declare library_path "/Documents/faust-github-faust2/tests/impulse-tests/dsp/table.dsp";
declare library_path "/usr/local/share/faust/stdfaust.lib";
declare library_path "/usr/local/share/faust/noises.lib";
declare library_path "/usr/local/share/faust/filters.lib";
declare library_path "/usr/local/share/faust/maths.lib";
declare library_path "/usr/local/share/faust/oscillators.lib";
declare library_path "/usr/local/share/faust/platform.lib";
declare filename "table.dsp";
declare filters_lib_fir_author "Julius O. Smith III";
declare filters_lib_fir_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_fir_license "MIT-style STK-4.3 license";
declare filters_lib_iir_author "Julius O. Smith III";
declare filters_lib_iir_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_iir_license "MIT-style STK-4.3 license";
declare filters_lib_lowpass0_highpass1 "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_name "Faust Filters Library";
declare filters_lib_version "0.3";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.3";
declare name "table";
declare noises_lib_name "Faust Noise Generator Library";
declare noises_lib_version "0.0";
declare oscillators_lib_name "Faust Oscillator Library";
declare oscillators_lib_version "0.1";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.1";
process = 65536,((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : \(x2).(\(x3).(x3,x2 : -))~(_<:(_,-2.4949560019999999f : *),(_,1 : @ : _,2.0172658750000001f : *),(_,2 : @ : _,-0.52218940000000003f : *):>_) : _<:(_,0.049922034999999997f : *),(_,1 : @ : _,-0.095993537000000004f : *),(_,2 : @ : _,0.050612698999999997f : *),(_,3 : @ : _,-0.0044087859999999996f : *):>_),(hslider("freq", 440.0f, 50.0f, 2000.0f, 0.01f),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x1).(x1,(x1 : floor) : -))~_ : _,(65536 : float) : * : int) : rdtable<:_,_;
|
|
d57b7fc7910351983cc80e585883c991f78f9b1ae470ae221222149284bf778c | sidechained/LEDgame | sine.dsp | declare filename "sine.dsp"; declare name "sine"; declare version "2.50.2";
declare compile_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path0 "/libraries/stdfaust.lib";
declare library_path1 "/libraries/maths.lib";
declare library_path2 "/libraries/platform.lib";
declare filename "FaustDSP";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.5";
declare name "FaustDSP";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.2";
ID_0 = fconstant(int fSamplingFreq, <math.h>);
ID_1 = 1.0f, ID_0;
ID_2 = (ID_1 : max);
ID_3 = 1.92e+05f, ID_2;
ID_4 = (ID_3 : min);
ID_5 = 1000, ID_4;
ID_6 = (ID_5 : /);
ID_7 = _, ID_6;
ID_8 = (ID_7 : +);
ID_9 = ID_8 ~ \(x1).(x1,(x1 : floor) : -);
ID_10 = ID_9, 2;
ID_11 = (ID_10 : *);
ID_12 = ID_11, 3.1415927f;
ID_13 = ID_12 : *;
ID_14 = (ID_13 : sin);
ID_15 = ID_14, 0.75f;
ID_16 = ID_15 : *;
process = ID_16;
| https://raw.githubusercontent.com/sidechained/LEDgame/5b2350f7ff80a93657269ea5326c1dc3ee2cda6e/out/sine.dsp | faust | declare filename "sine.dsp"; declare name "sine"; declare version "2.50.2";
declare compile_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path0 "/libraries/stdfaust.lib";
declare library_path1 "/libraries/maths.lib";
declare library_path2 "/libraries/platform.lib";
declare filename "FaustDSP";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.5";
declare name "FaustDSP";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.2";
ID_0 = fconstant(int fSamplingFreq, <math.h>);
ID_1 = 1.0f, ID_0;
ID_2 = (ID_1 : max);
ID_3 = 1.92e+05f, ID_2;
ID_4 = (ID_3 : min);
ID_5 = 1000, ID_4;
ID_6 = (ID_5 : /);
ID_7 = _, ID_6;
ID_8 = (ID_7 : +);
ID_9 = ID_8 ~ \(x1).(x1,(x1 : floor) : -);
ID_10 = ID_9, 2;
ID_11 = (ID_10 : *);
ID_12 = ID_11, 3.1415927f;
ID_13 = ID_12 : *;
ID_14 = (ID_13 : sin);
ID_15 = ID_14, 0.75f;
ID_16 = ID_15 : *;
process = ID_16;
|
|
a4c0b5370506d3dda69aeb5c1973d91f78741665f9642b0f169a10cfded76d66 | brummer10/guitarix | low_high_pass.dsp | declare id "low_highpass";
declare name "low high pass";
declare shortname "L/H/Filter";
declare category "Tone Control";
declare groups ".low_high_pass.lhp[low_highpass], .low_high_pass.lhc[low_highcutoff]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
//-speaker emulation
sbp1 = vslider("lowfreq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("highfreq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("onoff[name:low highcutoff]");
sbp = hgroup(".low_high_pass.lhc", bypass(switch1, +(anti_denormal_ac) : ef.speakerbp(sbp1,sbp2)));
//------------------------------ low/high-passfilters --------------------------------------
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
S = (O-parity)/2; // current section number
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
//-low and fi.highpass
lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low fi.highpass]");
passo = +(anti_denormal_ac) : lowpassN(1,lowpassfreq) : highpassN(1,highpassfreq);
pass = hgroup(".low_high_pass.lhp", bypass(switch, passo));
process = pass : sbp ;
| https://raw.githubusercontent.com/brummer10/guitarix/31d1efe732631d81647aeb9e5ce64710f60ffc7b/trunk/src/LV2/faust/low_high_pass.dsp | faust | -speaker emulation
------------------------------ low/high-passfilters --------------------------------------
bilinear-transform scale-factor
bilinear-transform scale-factor
current section number
-low and fi.highpass | declare id "low_highpass";
declare name "low high pass";
declare shortname "L/H/Filter";
declare category "Tone Control";
declare groups ".low_high_pass.lhp[low_highpass], .low_high_pass.lhc[low_highcutoff]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
sbp1 = vslider("lowfreq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("highfreq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("onoff[name:low highcutoff]");
sbp = hgroup(".low_high_pass.lhc", bypass(switch1, +(anti_denormal_ac) : ef.speakerbp(sbp1,sbp2)));
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low fi.highpass]");
passo = +(anti_denormal_ac) : lowpassN(1,lowpassfreq) : highpassN(1,highpassfreq);
pass = hgroup(".low_high_pass.lhp", bypass(switch, passo));
process = pass : sbp ;
|
217319561d51d76a65054b98b88d5d8ab8b80b48143c9098290af02e520aaa4e | Blumealc/43PR3 | spanner3.dsp | declare filename "spanner3.dsp"; declare name "spanner3"; declare compilation_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path0 "/libraries/stdfaust.lib";
declare library_path1 "/libraries/maths.lib";
declare library_path2 "/libraries/signals.lib";
declare library_path3 "/libraries/basics.lib";
declare library_path4 "/libraries/platform.lib";
declare author "THC-SCALAS";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.6";
declare copyright "Cecilia-labs";
declare filename "FaustDSP";
declare license "BSD";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.5";
declare name "spanner_1x8";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.2";
declare signals_lib_name "Faust Signal Routing Library";
declare signals_lib_version "0.1";
declare version "1.0";
process = \(x1).((x1,(10,((((0.5f,(0.0f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *),(x1,(10,((((0.5f,(2.0943951023931953f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *),(x1,(10,((((0.5f,(4.1887902047863905f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *));
| https://raw.githubusercontent.com/Blumealc/43PR3/0bd1e28c690d43d2905a0a06e69a60e55b0b6116/spanner3%7E.mxo/spanner3.dsp | faust | declare filename "spanner3.dsp"; declare name "spanner3"; declare compilation_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path0 "/libraries/stdfaust.lib";
declare library_path1 "/libraries/maths.lib";
declare library_path2 "/libraries/signals.lib";
declare library_path3 "/libraries/basics.lib";
declare library_path4 "/libraries/platform.lib";
declare author "THC-SCALAS";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.6";
declare copyright "Cecilia-labs";
declare filename "FaustDSP";
declare license "BSD";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.5";
declare name "spanner_1x8";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.2";
declare signals_lib_name "Faust Signal Routing Library";
declare signals_lib_version "0.1";
declare version "1.0";
process = \(x1).((x1,(10,((((0.5f,(0.0f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *),(x1,(10,((((0.5f,(2.0943951023931953f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *),(x1,(10,((((0.5f,(4.1887902047863905f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *));
|
|
9021390ac821740e1c141c0d05ba7c2155946d953442fdf6b7f9e257db7e1c95 | Pro19/guitarix | impulseresponse.dsp | declare id "IR";
declare name "ImpulseResponse";
declare category "Tone Control";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
g3 = hslider("peak[name:Peak][tooltip:peak gain]", 1, 0, 10, 0.2);
fr = hslider("freq[name:Freq][tooltip:frequency (Hz)]", 440, 20, 12000, 10);
auto_ir = checkbox("auto_freq[name:auto freq][enum:manual|auto]") : clip(0, 1);
check_auto_ir(v) = select2(auto_ir, v, sym_clip(0.6));
feedbackcontroll(x) = firpart : + ~ feedback
with {
bw = hslider("bandwidth[name:Bandwidth][tooltip:bandwidth (Hz)]", 100, 20, 20000, 10);
R = exp(0-ma.PI*bw/ma.SR); // fi.pole radius [0 required]
A = 2*ma.PI*fr/ma.SR; // fi.pole angle (radians fi.pole = 2)
RR = R*R;
firpart = (x - x'') * g3 * ((1-RR)/2); // radius = 2
// time-domain coefficients ASSUMING ONE PIPELINE DELAY:
feedback(v) = 0 + R*check_auto_ir(2*cos(A),x)*v - RR*v';
};
process(x) = x + feedbackcontroll(x);
| https://raw.githubusercontent.com/Pro19/guitarix/b1c686212332d1ea40683262bf95ad2b486b2bb6/trunk/src/faust/impulseresponse.dsp | faust | fi.pole radius [0 required]
fi.pole angle (radians fi.pole = 2)
radius = 2
time-domain coefficients ASSUMING ONE PIPELINE DELAY: | declare id "IR";
declare name "ImpulseResponse";
declare category "Tone Control";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
g3 = hslider("peak[name:Peak][tooltip:peak gain]", 1, 0, 10, 0.2);
fr = hslider("freq[name:Freq][tooltip:frequency (Hz)]", 440, 20, 12000, 10);
auto_ir = checkbox("auto_freq[name:auto freq][enum:manual|auto]") : clip(0, 1);
check_auto_ir(v) = select2(auto_ir, v, sym_clip(0.6));
feedbackcontroll(x) = firpart : + ~ feedback
with {
bw = hslider("bandwidth[name:Bandwidth][tooltip:bandwidth (Hz)]", 100, 20, 20000, 10);
RR = R*R;
feedback(v) = 0 + R*check_auto_ir(2*cos(A),x)*v - RR*v';
};
process(x) = x + feedbackcontroll(x);
|
418eb77af7969d1703113413bb97cc07f461e920c414195908ee593ae1f83828 | Pro19/guitarix | low_high_pass.dsp | declare id "low_highpass";
declare name "Low/High Filter";
declare shortname "L/H Filter";
declare category "Tone Control";
declare groups ".low_high_pass.lhp[low_highpass], .low_high_pass.lhc[low_highcutoff]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
//-speaker emulation
sbp1 = vslider("low_freq[name:Lowcut][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("high_freq[name:Highcut][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("on_off[name:low highcutoff]");
sbp = hgroup(".low_high_pass.lhc", bypass(switch1, +(anti_denormal_ac) : ef.speakerbp(sbp1,sbp2)));
//------------------------------ low/high-passfilters --------------------------------------
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
S = (O-parity)/2; // current section number
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
//-low and fi.highpass
lowpassfreq = nentry("low_freq[name:Lowpass]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:Highpass]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low fi.highpass]");
passo = +(anti_denormal_ac) : lowpassN(1,lowpassfreq) : highpassN(1,highpassfreq);
pass = hgroup(".low_high_pass.lhp", bypass(switch, passo));
process = pass : sbp ;
| https://raw.githubusercontent.com/Pro19/guitarix/b1c686212332d1ea40683262bf95ad2b486b2bb6/trunk/src/faust/low_high_pass.dsp | faust | -speaker emulation
------------------------------ low/high-passfilters --------------------------------------
bilinear-transform scale-factor
bilinear-transform scale-factor
current section number
-low and fi.highpass | declare id "low_highpass";
declare name "Low/High Filter";
declare shortname "L/H Filter";
declare category "Tone Control";
declare groups ".low_high_pass.lhp[low_highpass], .low_high_pass.lhc[low_highcutoff]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
sbp1 = vslider("low_freq[name:Lowcut][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("high_freq[name:Highcut][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("on_off[name:low highcutoff]");
sbp = hgroup(".low_high_pass.lhc", bypass(switch1, +(anti_denormal_ac) : ef.speakerbp(sbp1,sbp2)));
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
lowpassfreq = nentry("low_freq[name:Lowpass]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:Highpass]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low fi.highpass]");
passo = +(anti_denormal_ac) : lowpassN(1,lowpassfreq) : highpassN(1,highpassfreq);
pass = hgroup(".low_high_pass.lhp", bypass(switch, passo));
process = pass : sbp ;
|
2be22ce685144ed7dc92220e215f533e6f7754c2e4b2188682715c49fc89d0dc | sidechained/LEDgame | noise.dsp | declare filename "noise.dsp"; declare name "noise"; declare version "2.50.2";
declare compile_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path0 "/libraries/stdfaust.lib";
declare library_path1 "/libraries/noises.lib";
declare filename "FaustDSP";
declare name "FaustDSP";
declare noises_lib_name "Faust Noise Generator Library";
declare noises_lib_version "0.4";
ID_0 = _, 12345;
ID_1 = (ID_0 : +);
ID_2 = _, 1103515245;
ID_3 = (ID_2 : *);
ID_4 = ID_1 ~ ID_3;
ID_5 = ID_4, 2.1474836e+09f;
ID_6 = ID_5 : /;
process = ID_6;
| https://raw.githubusercontent.com/sidechained/LEDgame/5b2350f7ff80a93657269ea5326c1dc3ee2cda6e/noise.dsp | faust | declare filename "noise.dsp"; declare name "noise"; declare version "2.50.2";
declare compile_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path0 "/libraries/stdfaust.lib";
declare library_path1 "/libraries/noises.lib";
declare filename "FaustDSP";
declare name "FaustDSP";
declare noises_lib_name "Faust Noise Generator Library";
declare noises_lib_version "0.4";
ID_0 = _, 12345;
ID_1 = (ID_0 : +);
ID_2 = _, 1103515245;
ID_3 = (ID_2 : *);
ID_4 = ID_1 ~ ID_3;
ID_5 = ID_4, 2.1474836e+09f;
ID_6 = ID_5 : /;
process = ID_6;
|
|
43d041ae74f70ed9c7087f0cdc7237e75368529b3911ce3f9c1989eb8ead9fc1 | sidechained/LEDgame | noise.dsp | declare filename "noise.dsp"; declare name "noise"; declare version "2.44.5";
declare compile_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path0 "/libraries/stdfaust.lib";
declare library_path1 "/libraries/noises.lib";
declare filename "FaustDSP";
declare name "FaustDSP";
declare noises_lib_name "Faust Noise Generator Library";
declare noises_lib_version "0.4";
ID_0 = _, 12345;
ID_1 = (ID_0 : +);
ID_2 = _, 1103515245;
ID_3 = (ID_2 : *);
ID_4 = ID_1 ~ ID_3;
ID_5 = ID_4, 2147483647.0f;
ID_6 = ID_5 : /;
process = ID_6;
| https://raw.githubusercontent.com/sidechained/LEDgame/6d81db45c88fad884a0e302e262723156d827f47/out/noise.dsp | faust | declare filename "noise.dsp"; declare name "noise"; declare version "2.44.5";
declare compile_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path0 "/libraries/stdfaust.lib";
declare library_path1 "/libraries/noises.lib";
declare filename "FaustDSP";
declare name "FaustDSP";
declare noises_lib_name "Faust Noise Generator Library";
declare noises_lib_version "0.4";
ID_0 = _, 12345;
ID_1 = (ID_0 : +);
ID_2 = _, 1103515245;
ID_3 = (ID_2 : *);
ID_4 = ID_1 ~ ID_3;
ID_5 = ID_4, 2147483647.0f;
ID_6 = ID_5 : /;
process = ID_6;
|
|
d1ffab3da6d965b5468e26287fbba507c62df9d78edf72ed7a917306b92823fd | Pro19/guitarix | gx_distortion.dsp | declare id "gx_distortion";
declare name "Multi Band Distortion";
declare shortname "Distortion";
declare category "Distortion";
declare groups "resonator[Distortion resonator]";
declare gladefile "gx_distortion_ui.glade";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
F = nentry("split_low_freq[name:Split Lo]", 250, 20, 600, 10);
F1 = nentry("split_middle_freq[name:Split Mid]", 650, 600, 1250, 10);
F2 = nentry("split_high_freq[name:Split Hi]", 1250, 1250, 12000, 10);
/**********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
***********************************************************************/
//------------------------------ ba.count and ba.take --------------------------------------
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
//------------------------------ low/high-passfilters --------------------------------------
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
S = (O-parity)/2; // current section number
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
//------------------------------ an.analyzer --------------------------------------
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
/**********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completely to > 0.9.27
***********************************************************************/
//----------distortion---------
//-distortion
drivelevel = vslider("level[name:Level]", 0.0, 0, 0.5, 0.01);
drivegain1 = vslider("gain[name:Gain]", 2, -10, 10, 0.1)-10 : ba.db2linear : smoothi(0.999);
low_gain = vslider("low_gain[name:Lo]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
high_gain = vslider("high_gain[name:Hi]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_l = vslider("middle_l_gain[name:LoMid]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_h = vslider("middle_h_gain[name:HiMid]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
drive = vslider("drive[name:Drive]", 0.64, 0, 1, 0.01);
drive1 = vslider("low_drive[name:Lo]", 1, 0, 1, 0.01)*drive;
drive2 = vslider("high_drive[name:Hi]", 1, 0, 1, 0.01)*drive;
drive3 = vslider("middle_l_drive[name:LoMid]", 1, 0, 1, 0.01)*drive;
drive4 = vslider("middle_h_drive[name:HiMid]", 1, 0, 1, 0.01)*drive;
distortion1 = _:ef.cubicnl(drive1,drivelevel): *(low_gain);
distortion2 = _:ef.cubicnl(drive2,drivelevel) : *(high_gain);
distortion3 = _:ef.cubicnl(drive3,drivelevel) : *(middle_gain_l);
distortion4 = _:ef.cubicnl(drive4,drivelevel) : *(middle_gain_h);
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
//-resonator
resonator = (+ <: (de.delay(4096, d-1) + de.delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato[name:Vibrato]", 1, 0, 1, 0.01);
a = vslider("trigger[name:Trigger]", 0.12, 0, 1, 0.01);
};
switch2 = checkbox("resonator.on_off[name:resonat]");
//reso = hgroup("resonator", bypass(switch2, resonator));
moving_filter(x) = (x+x'+x'')/3;
wet = vslider("wet_dry[name:Wet/Dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
process_dist = bypass(switch2, resonator) : +(anti_denormal_ac) : distortion : *(drivegain1) ;
process = _<:*(dry),(*(wet): process_dist):>_;
| https://raw.githubusercontent.com/Pro19/guitarix/b1c686212332d1ea40683262bf95ad2b486b2bb6/trunk/src/faust/gx_distortion.dsp | faust | *********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
**********************************************************************
------------------------------ ba.count and ba.take --------------------------------------
------------------------------ low/high-passfilters --------------------------------------
bilinear-transform scale-factor
bilinear-transform scale-factor
current section number
------------------------------ an.analyzer --------------------------------------
*********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completely to > 0.9.27
**********************************************************************
----------distortion---------
-distortion
-resonator
reso = hgroup("resonator", bypass(switch2, resonator)); | declare id "gx_distortion";
declare name "Multi Band Distortion";
declare shortname "Distortion";
declare category "Distortion";
declare groups "resonator[Distortion resonator]";
declare gladefile "gx_distortion_ui.glade";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
F = nentry("split_low_freq[name:Split Lo]", 250, 20, 600, 10);
F1 = nentry("split_middle_freq[name:Split Mid]", 650, 600, 1250, 10);
F2 = nentry("split_high_freq[name:Split Hi]", 1250, 1250, 12000, 10);
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
drivelevel = vslider("level[name:Level]", 0.0, 0, 0.5, 0.01);
drivegain1 = vslider("gain[name:Gain]", 2, -10, 10, 0.1)-10 : ba.db2linear : smoothi(0.999);
low_gain = vslider("low_gain[name:Lo]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
high_gain = vslider("high_gain[name:Hi]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_l = vslider("middle_l_gain[name:LoMid]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_h = vslider("middle_h_gain[name:HiMid]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
drive = vslider("drive[name:Drive]", 0.64, 0, 1, 0.01);
drive1 = vslider("low_drive[name:Lo]", 1, 0, 1, 0.01)*drive;
drive2 = vslider("high_drive[name:Hi]", 1, 0, 1, 0.01)*drive;
drive3 = vslider("middle_l_drive[name:LoMid]", 1, 0, 1, 0.01)*drive;
drive4 = vslider("middle_h_drive[name:HiMid]", 1, 0, 1, 0.01)*drive;
distortion1 = _:ef.cubicnl(drive1,drivelevel): *(low_gain);
distortion2 = _:ef.cubicnl(drive2,drivelevel) : *(high_gain);
distortion3 = _:ef.cubicnl(drive3,drivelevel) : *(middle_gain_l);
distortion4 = _:ef.cubicnl(drive4,drivelevel) : *(middle_gain_h);
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
resonator = (+ <: (de.delay(4096, d-1) + de.delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato[name:Vibrato]", 1, 0, 1, 0.01);
a = vslider("trigger[name:Trigger]", 0.12, 0, 1, 0.01);
};
switch2 = checkbox("resonator.on_off[name:resonat]");
moving_filter(x) = (x+x'+x'')/3;
wet = vslider("wet_dry[name:Wet/Dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
process_dist = bypass(switch2, resonator) : +(anti_denormal_ac) : distortion : *(drivegain1) ;
process = _<:*(dry),(*(wet): process_dist):>_;
|
f060bc87396d7ded249641e0466337aaf73cdf7b62cce58100299344e0e24d58 | grame-cncm/faust | priority.dsp | /*
import("stdfaust.lib");
process = (c : *(200) : os.osc)
with {
clk1 = ba.pulse(ma.SR * tempo / 1000);
clk2 = ba.pulse(ma.SR * 2 * tempo / 1000);
c1 = ba.counter(clk1) % 2;
c2 = ba.counter(clk2) % 2;
c = 1 + c1 + (2 * c2);
tempo = 500;
};
*/
declare version "2.44.4";
declare compile_options "-single -scal -e dsp/priority.dsp -o priority_exp.dsp";
declare library_path0 "/usr/local/share/faust/stdfaust.lib";
declare library_path1 "/usr/local/share/faust/basics.lib";
declare library_path2 "/usr/local/share/faust/maths.lib";
declare library_path3 "/usr/local/share/faust/platform.lib";
declare library_path4 "/usr/local/share/faust/oscillators.lib";
declare basics_lib_counter_author "Stephane Letz";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.8";
declare filename "priority.dsp";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.5";
declare name "priority";
declare oscillators_lib_name "Faust Oscillator Library";
declare oscillators_lib_version "0.3";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.2";
ID_0 = fconstant(int fSamplingFreq, <math.h>);
ID_1 = 1.0f, ID_0;
ID_2 = (ID_1 : max);
ID_3 = 192000.0f, ID_2;
ID_4 = (ID_3 : min);
ID_5 = ID_4, 500;
ID_6 = (ID_5 : *);
ID_7 = ID_6, 1000;
ID_8 = ID_7 : /;
ID_9 = (ID_8 : int);
ID_10 = _, ID_9;
ID_11 = (ID_10 : %);
ID_12 = (1 : mem);
ID_13 = _, ID_12;
ID_14 = (ID_13 : +);
ID_15 = ID_11 ~ ID_14;
ID_16 = (ID_15 : \(x5).(x5,(x5 : mem) : <=));
ID_17 = (ID_16 : mem);
ID_18 = ID_16, ID_17;
ID_19 = ID_18 : >;
ID_20 = + ~ _;
ID_21 = (ID_19 : ID_20);
ID_22 = ID_21, 2;
ID_23 = (ID_22 : %);
ID_24 = 1, ID_23;
ID_25 = (ID_24 : +);
ID_26 = ID_4, 2;
ID_27 = (ID_26 : *);
ID_28 = ID_27, 500;
ID_29 = (ID_28 : *);
ID_30 = ID_29, 1000;
ID_31 = ID_30 : /;
ID_32 = (ID_31 : int);
ID_33 = _, ID_32;
ID_34 = (ID_33 : %);
ID_35 = ID_34 ~ ID_14;
ID_36 = (ID_35 : \(x6).(x6,(x6 : mem) : <=));
ID_37 = (ID_36 : mem);
ID_38 = ID_36, ID_37;
ID_39 = ID_38 : >;
ID_40 = (ID_39 : ID_20);
ID_41 = ID_40, 2;
ID_42 = (ID_41 : %);
ID_43 = 2, ID_42;
ID_44 = (ID_43 : *);
ID_45 = ID_25, ID_44;
ID_46 = ID_45 : +;
ID_47 = _, 200;
ID_48 = ID_47 : *;
ID_49 = ID_48 : \(x7).(65536,((((_,(65536 : int) : %)~(_,(1 : mem) : +) : float),6.2831853071795862f : *),(65536 : float) : / : sin),((0,(_,(x7,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : /) : +),0 : select2 : \(x8).(x8,(x8 : floor) : -))~_ : _,(65536 : float) : * : int) : rdtable);
ID_50 = ID_46 : ID_49;
process = ID_50;
| https://raw.githubusercontent.com/grame-cncm/faust/79e0d0668575aa664d9aeb55c1df2231b3501002/tests/impulse-tests/dsp/priority.dsp | faust |
import("stdfaust.lib");
process = (c : *(200) : os.osc)
with {
clk1 = ba.pulse(ma.SR * tempo / 1000);
clk2 = ba.pulse(ma.SR * 2 * tempo / 1000);
c1 = ba.counter(clk1) % 2;
c2 = ba.counter(clk2) % 2;
c = 1 + c1 + (2 * c2);
tempo = 500;
};
|
declare version "2.44.4";
declare compile_options "-single -scal -e dsp/priority.dsp -o priority_exp.dsp";
declare library_path0 "/usr/local/share/faust/stdfaust.lib";
declare library_path1 "/usr/local/share/faust/basics.lib";
declare library_path2 "/usr/local/share/faust/maths.lib";
declare library_path3 "/usr/local/share/faust/platform.lib";
declare library_path4 "/usr/local/share/faust/oscillators.lib";
declare basics_lib_counter_author "Stephane Letz";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.8";
declare filename "priority.dsp";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.5";
declare name "priority";
declare oscillators_lib_name "Faust Oscillator Library";
declare oscillators_lib_version "0.3";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.2";
ID_0 = fconstant(int fSamplingFreq, <math.h>);
ID_1 = 1.0f, ID_0;
ID_2 = (ID_1 : max);
ID_3 = 192000.0f, ID_2;
ID_4 = (ID_3 : min);
ID_5 = ID_4, 500;
ID_6 = (ID_5 : *);
ID_7 = ID_6, 1000;
ID_8 = ID_7 : /;
ID_9 = (ID_8 : int);
ID_10 = _, ID_9;
ID_11 = (ID_10 : %);
ID_12 = (1 : mem);
ID_13 = _, ID_12;
ID_14 = (ID_13 : +);
ID_15 = ID_11 ~ ID_14;
ID_16 = (ID_15 : \(x5).(x5,(x5 : mem) : <=));
ID_17 = (ID_16 : mem);
ID_18 = ID_16, ID_17;
ID_19 = ID_18 : >;
ID_20 = + ~ _;
ID_21 = (ID_19 : ID_20);
ID_22 = ID_21, 2;
ID_23 = (ID_22 : %);
ID_24 = 1, ID_23;
ID_25 = (ID_24 : +);
ID_26 = ID_4, 2;
ID_27 = (ID_26 : *);
ID_28 = ID_27, 500;
ID_29 = (ID_28 : *);
ID_30 = ID_29, 1000;
ID_31 = ID_30 : /;
ID_32 = (ID_31 : int);
ID_33 = _, ID_32;
ID_34 = (ID_33 : %);
ID_35 = ID_34 ~ ID_14;
ID_36 = (ID_35 : \(x6).(x6,(x6 : mem) : <=));
ID_37 = (ID_36 : mem);
ID_38 = ID_36, ID_37;
ID_39 = ID_38 : >;
ID_40 = (ID_39 : ID_20);
ID_41 = ID_40, 2;
ID_42 = (ID_41 : %);
ID_43 = 2, ID_42;
ID_44 = (ID_43 : *);
ID_45 = ID_25, ID_44;
ID_46 = ID_45 : +;
ID_47 = _, 200;
ID_48 = ID_47 : *;
ID_49 = ID_48 : \(x7).(65536,((((_,(65536 : int) : %)~(_,(1 : mem) : +) : float),6.2831853071795862f : *),(65536 : float) : / : sin),((0,(_,(x7,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : /) : +),0 : select2 : \(x8).(x8,(x8 : floor) : -))~_ : _,(65536 : float) : * : int) : rdtable);
ID_50 = ID_46 : ID_49;
process = ID_50;
|
0ec45d63e543a0ebf3479746413eb1f7da23bd8d6d88b73ab8c2db0abd8ae039 | grame-cncm/faust | constant.dsp | // import("stdfaust.lib");
// process = ba.slidingMeanp(ma.SR, 4);
declare compilation_options "-single -scal -e t1.dsp -o t1_exp.dsp";
declare library_path "/Users/letz/Developpements/faust/t1.dsp";
declare library_path "/usr/local/share/faust/stdfaust.lib";
declare library_path "/usr/local/share/faust/basics.lib";
declare library_path "/usr/local/share/faust/maths.lib";
declare library_path "/usr/local/share/faust/platform.lib";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.1";
declare filename "t1.dsp";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.3";
declare name "t1";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.1";
process = \(x1).((x1,0 : @ : _<:(1,((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),0 : ==) : &),((((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),1 : / : floor : int),2 : %),0,_ : select2),_ : select2),((x1,(x1,1 : @) : +),(1,(((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),1 : / : floor : int),2 : %) : *:>_) : @ : _<:(0,((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),0 : ==) : &),((((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),2 : / : floor : int),2 : %),0,_ : select2),_ : select2),(((x1,(x1,1 : @) : +),((x1,(x1,1 : @) : +),2 : @) : +),((1,(((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),1 : / : floor : int),2 : %) : *),(2,(((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),2 : / : floor : int),2 : %) : *):>_) : @ : _<:(0,((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),0 : ==) : &),((((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),4 : / : floor : int),2 : %),0,_ : select2),_ : select2) : +,_ : +),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : /;
| https://raw.githubusercontent.com/grame-cncm/faust/0a9cd51b24b79fcdc3b71fa482f4bebe96d012d4/tests/impulse-tests/dsp/constant.dsp | faust | import("stdfaust.lib");
process = ba.slidingMeanp(ma.SR, 4); |
declare compilation_options "-single -scal -e t1.dsp -o t1_exp.dsp";
declare library_path "/Users/letz/Developpements/faust/t1.dsp";
declare library_path "/usr/local/share/faust/stdfaust.lib";
declare library_path "/usr/local/share/faust/basics.lib";
declare library_path "/usr/local/share/faust/maths.lib";
declare library_path "/usr/local/share/faust/platform.lib";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.1";
declare filename "t1.dsp";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.3";
declare name "t1";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.1";
process = \(x1).((x1,0 : @ : _<:(1,((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),0 : ==) : &),((((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),1 : / : floor : int),2 : %),0,_ : select2),_ : select2),((x1,(x1,1 : @) : +),(1,(((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),1 : / : floor : int),2 : %) : *:>_) : @ : _<:(0,((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),0 : ==) : &),((((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),2 : / : floor : int),2 : %),0,_ : select2),_ : select2),(((x1,(x1,1 : @) : +),((x1,(x1,1 : @) : +),2 : @) : +),((1,(((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),1 : / : floor : int),2 : %) : *),(2,(((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),2 : / : floor : int),2 : %) : *):>_) : @ : _<:(0,((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),0 : ==) : &),((((192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min),4 : / : floor : int),2 : %),0,_ : select2),_ : select2) : +,_ : +),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : /;
|
b34efd88dc5cdd7a53caf781b0b074e7804489714997d548841beb7fa3be293f | Blumealc/43PR3 | spanner_v.dsp | declare filename "spanner_v.dsp"; declare name "spanner_v"; declare compilation_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path0 "/libraries/stdfaust.lib";
declare library_path1 "/libraries/maths.lib";
declare library_path2 "/libraries/signals.lib";
declare library_path3 "/libraries/basics.lib";
declare library_path4 "/libraries/platform.lib";
declare author "THC-SCALAS";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.6";
declare copyright "Cecilia-labs";
declare filename "FaustDSP";
declare license "BSD";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.5";
declare name "spanner_1x8";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.2";
declare signals_lib_name "Faust Signal Routing Library";
declare signals_lib_version "0.1";
declare version "1.0";
process = \(x1).((x1,(10,((((0.5f,(0.0f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *),(x1,(10,((((0.5f,(1.2566370614359172f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *),(x1,(10,((((0.5f,(2.5132741228718345f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *),(x1,(10,((((0.5f,(3.7699111843077517f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *),(x1,(10,((((0.5f,(5.026548245743669f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *));
| https://raw.githubusercontent.com/Blumealc/43PR3/0bd1e28c690d43d2905a0a06e69a60e55b0b6116/spanner_v%7E.mxo/spanner_v.dsp | faust | declare filename "spanner_v.dsp"; declare name "spanner_v"; declare compilation_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path0 "/libraries/stdfaust.lib";
declare library_path1 "/libraries/maths.lib";
declare library_path2 "/libraries/signals.lib";
declare library_path3 "/libraries/basics.lib";
declare library_path4 "/libraries/platform.lib";
declare author "THC-SCALAS";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.6";
declare copyright "Cecilia-labs";
declare filename "FaustDSP";
declare license "BSD";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.5";
declare name "spanner_1x8";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.2";
declare signals_lib_name "Faust Signal Routing Library";
declare signals_lib_version "0.1";
declare version "1.0";
process = \(x1).((x1,(10,((((0.5f,(0.0f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *),(x1,(10,((((0.5f,(1.2566370614359172f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *),(x1,(10,((((0.5f,(2.5132741228718345f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *),(x1,(10,((((0.5f,(3.7699111843077517f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *),(x1,(10,((((0.5f,(5.026548245743669f,(((nentry("Angle[style:knob]", 0.0f, -36000000.0f, 36000000.0f, 0.10000000000000001f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)),3.1415926535897931f : *),180 : /) : - : cos) : *),0.5f : -),(hslider("Separation", 12.0f, 0.0f, 100.0f, 0.01f) : \(x2).(\(x3).(((1.0f,(0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2) : -),x2 : *),((0,(-1.0f,((0,0.02f,1.0f : select2),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : *) : / : exp),0.0f : select2),x3 : *) : +)~_)) : *),0.20000000000000001f : *) : pow) : *));
|
|
1fb07d9a6922a797264a4f5a96bc1751c252ed27c70cdabcb6bcb0bef14f092d | Pro19/guitarix | bitdowner.dsp | declare id "bitdowner";
declare name "BitDowner";
declare category "Distortion";
declare author "Viacheslav Lotsmanov (unclechu)";
declare license "BSD";
declare copyright "(c) Viacheslav Lotsmanov, 2015";
import("stdfaust.lib");
gain =
vslider("input_gain[name:Input][tooltip:Gain (dB)]", 0, -40, 40, 0.1)
: ba.db2linear
: si.smooth(0.999)
;
bitLimit = 16;
downbit =
vslider("bit_down[name:Bit Down]", bitLimit, 1, bitLimit, 0.1)
: (2 ^ (_-1))
;
downsampling =
vslider(
"downsampling[name:Smpl Down][tooltip:Downsampling (samples to skip ba.count)]",
1, 1, 200, 1)
: int
;
volume =
vslider("volume[name:Volume][tooltip:Volume (dB)]", 0, -90, 12, 0.1)
: ba.db2linear
: si.smooth(0.999)
;
// from 0 till x (ba.if x is 5 then [0,1,2,3,4])
counter(x) = int(_)~(_ <: ba.if(_<(x-1) , _+1 , 0));
// downsampling
dsWet(s,c) = _~(ba.if(c == 0 , s , _));
ds(s) =
// dry signal ba.if downsampling disabled
ba.if(downsampling > 1 , dsWet(s,counter(downsampling)) , s)
;
hardLimit(s) = ba.if(s>1, 1, ba.if(s<-1, -1, s));
// bitdowning
bd = *(downbit) : floor : /(downbit) : hardLimit;
process = *(gain) : bd : ds : *(volume);
| https://raw.githubusercontent.com/Pro19/guitarix/b1c686212332d1ea40683262bf95ad2b486b2bb6/trunk/src/faust/bitdowner.dsp | faust | from 0 till x (ba.if x is 5 then [0,1,2,3,4])
downsampling
dry signal ba.if downsampling disabled
bitdowning | declare id "bitdowner";
declare name "BitDowner";
declare category "Distortion";
declare author "Viacheslav Lotsmanov (unclechu)";
declare license "BSD";
declare copyright "(c) Viacheslav Lotsmanov, 2015";
import("stdfaust.lib");
gain =
vslider("input_gain[name:Input][tooltip:Gain (dB)]", 0, -40, 40, 0.1)
: ba.db2linear
: si.smooth(0.999)
;
bitLimit = 16;
downbit =
vslider("bit_down[name:Bit Down]", bitLimit, 1, bitLimit, 0.1)
: (2 ^ (_-1))
;
downsampling =
vslider(
"downsampling[name:Smpl Down][tooltip:Downsampling (samples to skip ba.count)]",
1, 1, 200, 1)
: int
;
volume =
vslider("volume[name:Volume][tooltip:Volume (dB)]", 0, -90, 12, 0.1)
: ba.db2linear
: si.smooth(0.999)
;
counter(x) = int(_)~(_ <: ba.if(_<(x-1) , _+1 , 0));
dsWet(s,c) = _~(ba.if(c == 0 , s , _));
ds(s) =
ba.if(downsampling > 1 , dsWet(s,counter(downsampling)) , s)
;
hardLimit(s) = ba.if(s>1, 1, ba.if(s<-1, -1, s));
bd = *(downbit) : floor : /(downbit) : hardLimit;
process = *(gain) : bd : ds : *(volume);
|
866a1ccbdb9a83dba74b7ac10a427c1aa5fee16501c3c100010ad1fbb78f7ea5 | Pro19/guitarix | echo.dsp | declare name "Echo";
declare category "Echo / Delay";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
//t = vslider("time", 1, 1, 2000, 1);
t = ba.tempo(hslider("bpm[name:BPM][tooltip:Echo in Beats per Minute]",120,24,360,1));
release = vslider("percent[name:Percent]", 0, 0, 100, 0.1)/100.0 : si.smooth(0.999);
N = int( 2^19);
interp = 100*ba.millisec;
echo1 = +~(de.sdelay(N, interp, int(t)-1) * (release));
process = echo1;
| https://raw.githubusercontent.com/Pro19/guitarix/b1c686212332d1ea40683262bf95ad2b486b2bb6/trunk/src/faust/echo.dsp | faust | t = vslider("time", 1, 1, 2000, 1); | declare name "Echo";
declare category "Echo / Delay";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
t = ba.tempo(hslider("bpm[name:BPM][tooltip:Echo in Beats per Minute]",120,24,360,1));
release = vslider("percent[name:Percent]", 0, 0, 100, 0.1)/100.0 : si.smooth(0.999);
N = int( 2^19);
interp = 100*ba.millisec;
echo1 = +~(de.sdelay(N, interp, int(t)-1) * (release));
process = echo1;
|
8fc1ec885bd4967da1fb5255edc0c160e924ac07edffc72b3641212c9520d78e | steveb/gula-plugins | sweabed.dsp | declare name "Sweabed";
declare author "GULA";
declare copyright "Steve Baker (2020)";
declare version "1.0.0";
declare license "GPLv3";
declare description "Midrange parametic EQ with A and B settings which can be swept between with a single control";
import("gula.lib");
freq_a = hslider("[1]freq_a[name:Freq A][tooltip:frequency (Hz)]", 900, 100, 2400, 10);
gain_a = hslider("[2]gain_a[name:Gain A][unit:dB]", 0, -40, 40, 0.1);
freq_b = hslider("[4]freq_b[name:Freq B][tooltip:frequency (Hz)]", 900, 100, 2400, 10);
gain_b = hslider("[5]gain_b[name:Gain B][unit:dB]", 0, -40, 40, 0.1);
q_mult = 0.2;
q_a = gain_a : abs * q_mult, 0.1 : max;
q_b = gain_b : abs * q_mult, 0.1 : max;
ab_sweep_raw = hslider("[7]ab_sweep[name:A-B Sweep]", 0, 0, 1, 0.01);
ab_sweep = ab_sweep_raw : si.smooth(0.997);
process = _ : gula_ab_filter(freq_a, gain_a, q_a, freq_b, gain_b, q_b, ab_sweep) : _ ;
| https://raw.githubusercontent.com/steveb/gula-plugins/65b328f6d025171149d485c8aed83eaa377db60e/src/sweabed.dsp | faust | declare name "Sweabed";
declare author "GULA";
declare copyright "Steve Baker (2020)";
declare version "1.0.0";
declare license "GPLv3";
declare description "Midrange parametic EQ with A and B settings which can be swept between with a single control";
import("gula.lib");
freq_a = hslider("[1]freq_a[name:Freq A][tooltip:frequency (Hz)]", 900, 100, 2400, 10);
gain_a = hslider("[2]gain_a[name:Gain A][unit:dB]", 0, -40, 40, 0.1);
freq_b = hslider("[4]freq_b[name:Freq B][tooltip:frequency (Hz)]", 900, 100, 2400, 10);
gain_b = hslider("[5]gain_b[name:Gain B][unit:dB]", 0, -40, 40, 0.1);
q_mult = 0.2;
q_a = gain_a : abs * q_mult, 0.1 : max;
q_b = gain_b : abs * q_mult, 0.1 : max;
ab_sweep_raw = hslider("[7]ab_sweep[name:A-B Sweep]", 0, 0, 1, 0.01);
ab_sweep = ab_sweep_raw : si.smooth(0.997);
process = _ : gula_ab_filter(freq_a, gain_a, q_a, freq_b, gain_b, q_b, ab_sweep) : _ ;
|
|
53d3cd485625b163d15f99e588813928b374e1b8810b4fa466edb1e7eccace26 | smoge/gxplugins | distortion1.dsp | declare name "distortion1";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("math.lib");
import("music.lib");
import("effect.lib");
import("filter.lib");
import("guitarix.lib");
//----------distortion---------
//-speaker emulation
sbp1 = vslider("low_freq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("high_freq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("on_off[name:low highcutoff]");
sbp = hgroup("low_highcutoff", bypass(switch1, +(anti_denormal_ac) : speakerbp(sbp1,sbp2)));
//-low and highpass
lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low highpass]");
passo = +(anti_denormal_ac) : lowpass1(lowpassfreq) : highpass1(highpassfreq );
pass = hgroup("low_highpass", bypass(switch, passo));
//-distortion
drivelevel = vslider("level", 0.01, 0, 0.5, 0.01);
drivegain1 = vslider("gain", 2, -10, 10, 0.1)-10 : db2linear : smoothi(0.999);
drive = vslider("drive", 0.64, 0, 1, 0.01);
distortion = cubicnl(drive,drivelevel);
//-resonator
switch2 = checkbox("resonator.on_off[name:resonat]");
resonator = (+ <: (delay(4096, d-1) + delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato", 1, 0, 1, 0.01);
a = vslider("trigger", 0.12, 0, 1, 0.01);
};
process = bypass(switch2, resonator) : +(anti_denormal_ac) : pass : add_dc : sbp : component("HighShelf.dsp").hs : distortion : *(drivegain1) : component("HighShelf.dsp").hs : sbp;
| https://raw.githubusercontent.com/smoge/gxplugins/30a5160ff626975aa521a316cd33f973e3bc5d0c/distortion1.dsp | faust | ----------distortion---------
-speaker emulation
-low and highpass
-distortion
-resonator | declare name "distortion1";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("math.lib");
import("music.lib");
import("effect.lib");
import("filter.lib");
import("guitarix.lib");
sbp1 = vslider("low_freq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("high_freq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("on_off[name:low highcutoff]");
sbp = hgroup("low_highcutoff", bypass(switch1, +(anti_denormal_ac) : speakerbp(sbp1,sbp2)));
lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low highpass]");
passo = +(anti_denormal_ac) : lowpass1(lowpassfreq) : highpass1(highpassfreq );
pass = hgroup("low_highpass", bypass(switch, passo));
drivelevel = vslider("level", 0.01, 0, 0.5, 0.01);
drivegain1 = vslider("gain", 2, -10, 10, 0.1)-10 : db2linear : smoothi(0.999);
drive = vslider("drive", 0.64, 0, 1, 0.01);
distortion = cubicnl(drive,drivelevel);
switch2 = checkbox("resonator.on_off[name:resonat]");
resonator = (+ <: (delay(4096, d-1) + delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato", 1, 0, 1, 0.01);
a = vslider("trigger", 0.12, 0, 1, 0.01);
};
process = bypass(switch2, resonator) : +(anti_denormal_ac) : pass : add_dc : sbp : component("HighShelf.dsp").hs : distortion : *(drivegain1) : component("HighShelf.dsp").hs : sbp;
|
7822f604ebc9b53d55357fa205e26f4c8a5126a1c9239a1718edd5d671135f67 | steveb/gula-plugins | lfo_cv.dsp | declare name "LFO CV";
declare author "Gula Plugins";
declare copyright "Steve Baker (2022)";
declare version "1.0.0";
declare license "GPLv3";
declare description "A CV output of an LFO with multiple shape modes and shapes";
import("gula.lib");
shape_mode = hslider("[01]shape_mode [name: Shape Mode][style:menu{'Random -> Sine': 0; 'Sine -> Square': 1; 'Impulse -> Square -> Pulse': 2; 'Saw (asc) -> Tri -> Saw (desc)': 3}]", 0, 0, 3, 1);
freq = hslider("[02]rate [log][name: Rate][tooltip: Frequency of oscillator]", 4.0, 0.4, 10.0 ,0.01);
amp = hslider("[03]amplitude [name: Amplitude][tooltip: Amplitude of signal]", 10, 0.0, 10.0 ,0.1);
offset = hslider("[04]offset [name: Offset][tooltip: Offset of signal]", 0, -5.0, 5.0 ,0.1);
shape = hslider("[05]shape [name: Shape][tooltip: Wave shape for mode]", 1.0, 0.0, 1.0 ,0.01), 0.99 : min;
output = gula_lf_osc_normal(freq, shape_mode + shape) : scale(-0.5 + (offset / 10), amp) ;
process = output : hbargraph("lfo_out", -10, 10); | https://raw.githubusercontent.com/steveb/gula-plugins/3cad8aa6fa7d3c7b03be48af88c645a50581786e/src/lfo_cv.dsp | faust | declare name "LFO CV";
declare author "Gula Plugins";
declare copyright "Steve Baker (2022)";
declare version "1.0.0";
declare license "GPLv3";
declare description "A CV output of an LFO with multiple shape modes and shapes";
import("gula.lib");
shape_mode = hslider("[01]shape_mode [name: Shape Mode][style:menu{'Random -> Sine': 0; 'Sine -> Square': 1; 'Impulse -> Square -> Pulse': 2; 'Saw (asc) -> Tri -> Saw (desc)': 3}]", 0, 0, 3, 1);
freq = hslider("[02]rate [log][name: Rate][tooltip: Frequency of oscillator]", 4.0, 0.4, 10.0 ,0.01);
amp = hslider("[03]amplitude [name: Amplitude][tooltip: Amplitude of signal]", 10, 0.0, 10.0 ,0.1);
offset = hslider("[04]offset [name: Offset][tooltip: Offset of signal]", 0, -5.0, 5.0 ,0.1);
shape = hslider("[05]shape [name: Shape][tooltip: Wave shape for mode]", 1.0, 0.0, 1.0 ,0.01), 0.99 : min;
output = gula_lf_osc_normal(freq, shape_mode + shape) : scale(-0.5 + (offset / 10), amp) ;
process = output : hbargraph("lfo_out", -10, 10); |
|
116fd959133e7d0690faaa6490ab125d757e5c89263470c6ea2485718e9ae860 | Pro19/guitarix | impulseresponse.dsp | declare id "IR";
declare name "ImpulseResponse";
declare category "Tone Control";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
g3 = hslider("peak[tooltip:peak gain]", 1, 0, 10, 0.2);
fr = hslider("freq[tooltip:frequency (Hz)]", 440, 20, 12000, 10);
auto_ir = checkbox("auto_freq[name:auto freq][enum:manual|auto]") : clip(0, 1);
check_auto_ir(v) = select2(auto_ir, v, sym_clip(0.6));
feedbackcontroll(x) = firpart : + ~ feedback
with {
bw = hslider("bandwidth[tooltip:bandwidth (Hz)]", 100, 20, 20000, 10);
R = exp(0-ma.PI*bw/ma.SR); // fi.pole radius [0 required]
A = 2*ma.PI*fr/ma.SR; // fi.pole angle (radians fi.pole = 2)
RR = R*R;
firpart = (x - x'') * g3 * ((1-RR)/2); // radius = 2
// time-domain coefficients ASSUMING ONE PIPELINE DELAY:
feedback(v) = 0 + R*check_auto_ir(2*cos(A),x)*v - RR*v';
};
process(x) = x + feedbackcontroll(x);
| https://raw.githubusercontent.com/Pro19/guitarix/b1c686212332d1ea40683262bf95ad2b486b2bb6/trunk/src/LV2/faust/impulseresponse.dsp | faust | fi.pole radius [0 required]
fi.pole angle (radians fi.pole = 2)
radius = 2
time-domain coefficients ASSUMING ONE PIPELINE DELAY: | declare id "IR";
declare name "ImpulseResponse";
declare category "Tone Control";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
g3 = hslider("peak[tooltip:peak gain]", 1, 0, 10, 0.2);
fr = hslider("freq[tooltip:frequency (Hz)]", 440, 20, 12000, 10);
auto_ir = checkbox("auto_freq[name:auto freq][enum:manual|auto]") : clip(0, 1);
check_auto_ir(v) = select2(auto_ir, v, sym_clip(0.6));
feedbackcontroll(x) = firpart : + ~ feedback
with {
bw = hslider("bandwidth[tooltip:bandwidth (Hz)]", 100, 20, 20000, 10);
RR = R*R;
feedback(v) = 0 + R*check_auto_ir(2*cos(A),x)*v - RR*v';
};
process(x) = x + feedbackcontroll(x);
|
5be02e035135ec524fae572374135e6a5949472057b819e8a7defb619ad8077d | Pro19/guitarix | gx_distortion.dsp | declare name "Multi Band Distortion";
declare shortname "Distortion";
declare category "Distortion";
declare groups "resonator[Distortion resonator]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
F = nentry("split_low_freq", 250, 20, 600, 10);
F1 = nentry("split_middle_freq", 650, 600, 1250, 10);
F2 = nentry("split_high_freq", 1250, 1250, 12000, 10);
/**********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
***********************************************************************/
//------------------------------ ba.count and ba.take --------------------------------------
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
//------------------------------ low/high-passfilters --------------------------------------
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
S = (O-parity)/2; // current section number
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
//------------------------------ an.analyzer --------------------------------------
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
/**********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completely to > 0.9.27
***********************************************************************/
//----------distortion---------
//-distortion
drivelevel = vslider("level", 0.0, 0, 0.5, 0.01);
drivegain1 = vslider("gain", 2, -10, 10, 0.1)-10 : ba.db2linear : smoothi(0.999);
low_gain = vslider("low_gain[name:low]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
high_gain = vslider("high_gain[name:high]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_l = vslider("middle_l_gain[name:middle l.]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_h = vslider("middle_h_gain[name:middle h.]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
drive = vslider("drive", 0.64, 0, 1, 0.01);
drive1 = vslider("low_drive[name:low]", 1, 0, 1, 0.01)*drive;
drive2 = vslider("high_drive[name:high]", 1, 0, 1, 0.01)*drive;
drive3 = vslider("middle_l_drive[name:middle l.]", 1, 0, 1, 0.01)*drive;
drive4 = vslider("middle_h_drive[name:middle h.]", 1, 0, 1, 0.01)*drive;
distortion1 = _:ef.cubicnl(drive1,drivelevel): *(low_gain);
distortion2 = _:ef.cubicnl(drive2,drivelevel) : *(high_gain);
distortion3 = _:ef.cubicnl(drive3,drivelevel) : *(middle_gain_l);
distortion4 = _:ef.cubicnl(drive4,drivelevel) : *(middle_gain_h);
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
//-resonator
resonator = (+ <: (de.delay(4096, d-1) + de.delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato", 1, 0, 1, 0.01);
a = vslider("trigger", 0.12, 0, 1, 0.01);
};
switch2 = checkbox("resonator.on_off[name:resonat]");
//reso = hgroup("resonator", bypass(switch2, resonator));
moving_filter(x) = (x+x'+x'')/3;
wet = vslider("wet_dry[name:wet/dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
process_dist = bypass(switch2, resonator) : +(anti_denormal_ac) : distortion : *(drivegain1) ;
process = _<:*(dry),(*(wet): process_dist):>_;
| https://raw.githubusercontent.com/Pro19/guitarix/b1c686212332d1ea40683262bf95ad2b486b2bb6/trunk/src/LV2/faust/gx_distortion.dsp | faust | *********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
**********************************************************************
------------------------------ ba.count and ba.take --------------------------------------
------------------------------ low/high-passfilters --------------------------------------
bilinear-transform scale-factor
bilinear-transform scale-factor
current section number
------------------------------ an.analyzer --------------------------------------
*********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completely to > 0.9.27
**********************************************************************
----------distortion---------
-distortion
-resonator
reso = hgroup("resonator", bypass(switch2, resonator)); | declare name "Multi Band Distortion";
declare shortname "Distortion";
declare category "Distortion";
declare groups "resonator[Distortion resonator]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
F = nentry("split_low_freq", 250, 20, 600, 10);
F1 = nentry("split_middle_freq", 650, 600, 1250, 10);
F2 = nentry("split_high_freq", 1250, 1250, 12000, 10);
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
drivelevel = vslider("level", 0.0, 0, 0.5, 0.01);
drivegain1 = vslider("gain", 2, -10, 10, 0.1)-10 : ba.db2linear : smoothi(0.999);
low_gain = vslider("low_gain[name:low]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
high_gain = vslider("high_gain[name:high]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_l = vslider("middle_l_gain[name:middle l.]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_h = vslider("middle_h_gain[name:middle h.]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
drive = vslider("drive", 0.64, 0, 1, 0.01);
drive1 = vslider("low_drive[name:low]", 1, 0, 1, 0.01)*drive;
drive2 = vslider("high_drive[name:high]", 1, 0, 1, 0.01)*drive;
drive3 = vslider("middle_l_drive[name:middle l.]", 1, 0, 1, 0.01)*drive;
drive4 = vslider("middle_h_drive[name:middle h.]", 1, 0, 1, 0.01)*drive;
distortion1 = _:ef.cubicnl(drive1,drivelevel): *(low_gain);
distortion2 = _:ef.cubicnl(drive2,drivelevel) : *(high_gain);
distortion3 = _:ef.cubicnl(drive3,drivelevel) : *(middle_gain_l);
distortion4 = _:ef.cubicnl(drive4,drivelevel) : *(middle_gain_h);
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
resonator = (+ <: (de.delay(4096, d-1) + de.delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato", 1, 0, 1, 0.01);
a = vslider("trigger", 0.12, 0, 1, 0.01);
};
switch2 = checkbox("resonator.on_off[name:resonat]");
moving_filter(x) = (x+x'+x'')/3;
wet = vslider("wet_dry[name:wet/dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
process_dist = bypass(switch2, resonator) : +(anti_denormal_ac) : distortion : *(drivegain1) ;
process = _<:*(dry),(*(wet): process_dist):>_;
|
63171be895faebb6527a6d37fde1a734af1105fae64fc84ff53fd4cbfbbc5830 | maximalexanian/guitarix-vst | stereoverb.dsp | declare name "Stereo Verb";
declare category "Reverb";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
/*-----------------------------------------------
freeverb by "Grame"
-----------------------------------------------*/
// Filter Parameters
combtuningL1 = 1116;
combtuningL2 = 1188;
combtuningL3 = 1277;
combtuningL4 = 1356;
combtuningL5 = 1422;
combtuningL6 = 1491;
combtuningL7 = 1557;
combtuningL8 = 1617;
allpasstuningL1 = 556;
allpasstuningL2 = 441;
allpasstuningL3 = 341;
allpasstuningL4 = 225;
roomsizeSlider = vslider("RoomSize[name:Room Size]", 0.5, 0, 1, 0.025)*0.28 + 0.7;
dampslider = vslider("damp[name:Damp]",0.5, 0, 1, 0.025);
combfeed = roomsizeSlider;
//wetslider = 0.5 + vslider("wet_dry[name:wet/dry]", 0, -0.5, 0.5, 0.1);
wet_dry = vslider("wet_dry[name:Dry/Wet]", 50, 0, 100, 1) : /(100);
dry = 1 - wet_dry;
// Reverb components
monoReverb(fb1, fb2, damp, spread)
= _ <: comb(combtuningL1+spread, fb1, damp),
comb(combtuningL2+spread, fb1, damp),
comb(combtuningL3+spread, fb1, damp),
comb(combtuningL4+spread, fb1, damp),
comb(combtuningL5+spread, fb1, damp),
comb(combtuningL6+spread, fb1, damp),
comb(combtuningL7+spread, fb1, damp),
comb(combtuningL8+spread, fb1, damp)
+>
allpass (allpasstuningL1+spread, fb2)
: allpass (allpasstuningL2+spread, fb2)
: allpass (allpasstuningL3+spread, fb2)
: allpass (allpasstuningL4+spread, fb2)
;
//----------------------------------------------------------------
lfol = os.oscrs; // sine for left channel
freq = hslider("LFO freq [name:LFO Freq][unit:Hz]", 0.2, 0, 5, 0.01);
pingpong = checkbox("invert[enum:linear|pingpong]");
fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _;
freeverb_r = (_<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))* (1-(lfol(freq)*pingpong))):>_);
freeverb_l = (_<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))* (1-(-1*lfol(freq)*pingpong))):>_);
process = freeverb_r, freeverb_l;
| https://raw.githubusercontent.com/maximalexanian/guitarix-vst/83fd0cbec9588fb2ef47d80f7c6cb0775bfb9f89/guitarix/src/faust/stereoverb.dsp | faust | -----------------------------------------------
freeverb by "Grame"
-----------------------------------------------
Filter Parameters
wetslider = 0.5 + vslider("wet_dry[name:wet/dry]", 0, -0.5, 0.5, 0.1);
Reverb components
----------------------------------------------------------------
sine for left channel | declare name "Stereo Verb";
declare category "Reverb";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
combtuningL1 = 1116;
combtuningL2 = 1188;
combtuningL3 = 1277;
combtuningL4 = 1356;
combtuningL5 = 1422;
combtuningL6 = 1491;
combtuningL7 = 1557;
combtuningL8 = 1617;
allpasstuningL1 = 556;
allpasstuningL2 = 441;
allpasstuningL3 = 341;
allpasstuningL4 = 225;
roomsizeSlider = vslider("RoomSize[name:Room Size]", 0.5, 0, 1, 0.025)*0.28 + 0.7;
dampslider = vslider("damp[name:Damp]",0.5, 0, 1, 0.025);
combfeed = roomsizeSlider;
wet_dry = vslider("wet_dry[name:Dry/Wet]", 50, 0, 100, 1) : /(100);
dry = 1 - wet_dry;
monoReverb(fb1, fb2, damp, spread)
= _ <: comb(combtuningL1+spread, fb1, damp),
comb(combtuningL2+spread, fb1, damp),
comb(combtuningL3+spread, fb1, damp),
comb(combtuningL4+spread, fb1, damp),
comb(combtuningL5+spread, fb1, damp),
comb(combtuningL6+spread, fb1, damp),
comb(combtuningL7+spread, fb1, damp),
comb(combtuningL8+spread, fb1, damp)
+>
allpass (allpasstuningL1+spread, fb2)
: allpass (allpasstuningL2+spread, fb2)
: allpass (allpasstuningL3+spread, fb2)
: allpass (allpasstuningL4+spread, fb2)
;
freq = hslider("LFO freq [name:LFO Freq][unit:Hz]", 0.2, 0, 5, 0.01);
pingpong = checkbox("invert[enum:linear|pingpong]");
fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _;
freeverb_r = (_<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))* (1-(lfol(freq)*pingpong))):>_);
freeverb_l = (_<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))* (1-(-1*lfol(freq)*pingpong))):>_);
process = freeverb_r, freeverb_l;
|
26113a38727f6990aaf21b0d6a84b2b7dc438fd9f0614b6761b459be8d7f03ea | Pro19/guitarix | distortion1.dsp | declare id "distortion1";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
//----------distortion---------
//-speaker emulation
sbp1 = vslider("low_freq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("high_freq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("on_off[name:low highcutoff]");
sbp = hgroup("low_highcutoff", bypass(switch1, +(anti_denormal_ac) : ef.speakerbp(sbp1,sbp2)));
//-low and fi.highpass
lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low fi.highpass]");
passo = +(anti_denormal_ac) : lowpass1(lowpassfreq) : highpass1(highpassfreq );
pass = hgroup("low_highpass", bypass(switch, passo));
//-distortion
drivelevel = vslider("level", 0.01, 0, 0.5, 0.01);
drivegain1 = vslider("gain", 2, -10, 10, 0.1)-10 : ba.db2linear : smoothi(0.999);
drive = vslider("drive", 0.64, 0, 1, 0.01);
distortion = ef.cubicnl(drive,drivelevel);
//-resonator
switch2 = checkbox("resonator.on_off[name:resonat]");
resonator = (+ <: (de.delay(4096, d-1) + de.delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato", 1, 0, 1, 0.01);
a = vslider("trigger", 0.12, 0, 1, 0.01);
};
process = bypass(switch2, resonator) : +(anti_denormal_ac) : pass : add_dc : sbp : component("HighShelf.dsp").hs : distortion : *(drivegain1) : component("HighShelf.dsp").hs : sbp;
| https://raw.githubusercontent.com/Pro19/guitarix/b1c686212332d1ea40683262bf95ad2b486b2bb6/trunk/src/faust/distortion1.dsp | faust | ----------distortion---------
-speaker emulation
-low and fi.highpass
-distortion
-resonator | declare id "distortion1";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
sbp1 = vslider("low_freq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("high_freq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("on_off[name:low highcutoff]");
sbp = hgroup("low_highcutoff", bypass(switch1, +(anti_denormal_ac) : ef.speakerbp(sbp1,sbp2)));
lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low fi.highpass]");
passo = +(anti_denormal_ac) : lowpass1(lowpassfreq) : highpass1(highpassfreq );
pass = hgroup("low_highpass", bypass(switch, passo));
drivelevel = vslider("level", 0.01, 0, 0.5, 0.01);
drivegain1 = vslider("gain", 2, -10, 10, 0.1)-10 : ba.db2linear : smoothi(0.999);
drive = vslider("drive", 0.64, 0, 1, 0.01);
distortion = ef.cubicnl(drive,drivelevel);
switch2 = checkbox("resonator.on_off[name:resonat]");
resonator = (+ <: (de.delay(4096, d-1) + de.delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato", 1, 0, 1, 0.01);
a = vslider("trigger", 0.12, 0, 1, 0.01);
};
process = bypass(switch2, resonator) : +(anti_denormal_ac) : pass : add_dc : sbp : component("HighShelf.dsp").hs : distortion : *(drivegain1) : component("HighShelf.dsp").hs : sbp;
|
6b9d3401694e3df509aff367dff53c11a0c50e4f8bbc94ab86dba56ccae107a0 | maximalexanian/guitarix-vst | gx_distortion.dsp | declare name "Multi Band Distortion";
declare shortname "Distortion";
declare category "Distortion";
declare groups "resonator[Distortion resonator]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
F = nentry("split_low_freq", 250, 20, 600, 10);
F1 = nentry("split_middle_freq", 650, 600, 1250, 10);
F2 = nentry("split_high_freq", 1250, 1250, 12000, 10);
/**********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
***********************************************************************/
//------------------------------ ba.count and ba.take --------------------------------------
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
//------------------------------ low/high-passfilters --------------------------------------
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
S = (O-parity)/2; // current section number
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
//------------------------------ an.analyzer --------------------------------------
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
/**********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completly to > 0.9.27
***********************************************************************/
//----------distortion---------
//-distortion
drivelevel = vslider("level", 0.0, 0, 0.5, 0.01);
drivegain1 = vslider("gain", 2, -10, 10, 0.1)-10 : ba.db2linear : smoothi(0.999);
low_gain = vslider("low_gain[name:low]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
high_gain = vslider("high_gain[name:high]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_l = vslider("middle_l_gain[name:middle l.]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_h = vslider("middle_h_gain[name:middle h.]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
drive = vslider("drive", 0.64, 0, 1, 0.01);
drive1 = vslider("low_drive[name:low]", 1, 0, 1, 0.01)*drive;
drive2 = vslider("high_drive[name:high]", 1, 0, 1, 0.01)*drive;
drive3 = vslider("middle_l_drive[name:middle l.]", 1, 0, 1, 0.01)*drive;
drive4 = vslider("middle_h_drive[name:middle h.]", 1, 0, 1, 0.01)*drive;
distortion1 = _:ef.cubicnl(drive1,drivelevel): *(low_gain);
distortion2 = _:ef.cubicnl(drive2,drivelevel) : *(high_gain);
distortion3 = _:ef.cubicnl(drive3,drivelevel) : *(middle_gain_l);
distortion4 = _:ef.cubicnl(drive4,drivelevel) : *(middle_gain_h);
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
//-resonator
resonator = (+ <: (de.delay(4096, d-1) + de.delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato", 1, 0, 1, 0.01);
a = vslider("trigger", 0.12, 0, 1, 0.01);
};
switch2 = checkbox("resonator.on_off[name:resonat]");
//reso = hgroup("resonator", bypass(switch2, resonator));
moving_filter(x) = (x+x'+x'')/3;
wet = vslider("wet_dry[name:wet/dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
process_dist = bypass(switch2, resonator) : +(anti_denormal_ac) : distortion : *(drivegain1) ;
process = _<:*(dry),(*(wet): process_dist):>_;
| https://raw.githubusercontent.com/maximalexanian/guitarix-vst/83fd0cbec9588fb2ef47d80f7c6cb0775bfb9f89/guitarix/src/LV2/faust/gx_distortion.dsp | faust | *********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
**********************************************************************
------------------------------ ba.count and ba.take --------------------------------------
------------------------------ low/high-passfilters --------------------------------------
bilinear-transform scale-factor
bilinear-transform scale-factor
current section number
------------------------------ an.analyzer --------------------------------------
*********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completly to > 0.9.27
**********************************************************************
----------distortion---------
-distortion
-resonator
reso = hgroup("resonator", bypass(switch2, resonator)); | declare name "Multi Band Distortion";
declare shortname "Distortion";
declare category "Distortion";
declare groups "resonator[Distortion resonator]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
F = nentry("split_low_freq", 250, 20, 600, 10);
F1 = nentry("split_middle_freq", 650, 600, 1250, 10);
F2 = nentry("split_high_freq", 1250, 1250, 12000, 10);
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
drivelevel = vslider("level", 0.0, 0, 0.5, 0.01);
drivegain1 = vslider("gain", 2, -10, 10, 0.1)-10 : ba.db2linear : smoothi(0.999);
low_gain = vslider("low_gain[name:low]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
high_gain = vslider("high_gain[name:high]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_l = vslider("middle_l_gain[name:middle l.]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_h = vslider("middle_h_gain[name:middle h.]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
drive = vslider("drive", 0.64, 0, 1, 0.01);
drive1 = vslider("low_drive[name:low]", 1, 0, 1, 0.01)*drive;
drive2 = vslider("high_drive[name:high]", 1, 0, 1, 0.01)*drive;
drive3 = vslider("middle_l_drive[name:middle l.]", 1, 0, 1, 0.01)*drive;
drive4 = vslider("middle_h_drive[name:middle h.]", 1, 0, 1, 0.01)*drive;
distortion1 = _:ef.cubicnl(drive1,drivelevel): *(low_gain);
distortion2 = _:ef.cubicnl(drive2,drivelevel) : *(high_gain);
distortion3 = _:ef.cubicnl(drive3,drivelevel) : *(middle_gain_l);
distortion4 = _:ef.cubicnl(drive4,drivelevel) : *(middle_gain_h);
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
resonator = (+ <: (de.delay(4096, d-1) + de.delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato", 1, 0, 1, 0.01);
a = vslider("trigger", 0.12, 0, 1, 0.01);
};
switch2 = checkbox("resonator.on_off[name:resonat]");
moving_filter(x) = (x+x'+x'')/3;
wet = vslider("wet_dry[name:wet/dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
process_dist = bypass(switch2, resonator) : +(anti_denormal_ac) : distortion : *(drivegain1) ;
process = _<:*(dry),(*(wet): process_dist):>_;
|
75227dd32721abc42ea831ca40e91f235fb018086ea452fc54817d94cb4c868d | Pro19/guitarix | thick_distortion.dsp | declare id "thick_distortion";
declare name "Thick Distortion";
declare category "Distortion";
declare author "Viacheslav Lotsmanov";
declare license "BSD";
declare copyright "(c) 2018 Viacheslav Lotsmanov";
/*
This effect was written first in Haskell as standalone JACK application.
Can be found here: https://github.com/unclechu/haskell-audio-dsp
There's simple idea behind this distortion effect.
Main thing is that current sample depends on previous one, "Thickness" value
is a coefficient of how much previous sample will be dominating on current
one. Imagine N is a current sample and "Thickness" is set to 0.8 then N will
be multiplied by 0.2 (1-0.8) and N-1 by 0.8 so it is N*0.2 + (N-1)*0.8.
Just turn input gain knob to extreme value to make signal clipping (it will
be hard limited to 0dB) and then make it being smooth by big "Thickness"
level. Even if we have square signal it will be smoothed. This effect could
also be combined with the "BitDowner" (put "Thick Distortion" after it) to
get interesting harmonics and reducing higher ones (because signal would be
less sharp).
*/
import("stdfaust.lib");
gain
= vslider("input_gain[name:Input][tooltip:Gain (dB)]", 0, 0, 120, 0.1)
: ba.db2linear
: si.smoo
;
thickness
= vslider("thickness[name:Thickness]", 0.8, 0, 1, 0.01)
: si.smoo
;
// coefficient for pure signal (for current sample, not previous one)
pureness = 1 - thickness;
volume
= vslider("volume[name:Volume][tooltip:Volume (dB)]", 0, -90, 40, 0.1)
: ba.db2linear
: si.smoo
;
hardLimit = min(1) : max(-1);
thick = *(pureness) : + ~(*(thickness));
process = *(gain) : hardLimit : thick : *(volume);
| https://raw.githubusercontent.com/Pro19/guitarix/b1c686212332d1ea40683262bf95ad2b486b2bb6/trunk/src/faust/thick_distortion.dsp | faust |
This effect was written first in Haskell as standalone JACK application.
Can be found here: https://github.com/unclechu/haskell-audio-dsp
There's simple idea behind this distortion effect.
Main thing is that current sample depends on previous one, "Thickness" value
is a coefficient of how much previous sample will be dominating on current
one. Imagine N is a current sample and "Thickness" is set to 0.8 then N will
be multiplied by 0.2 (1-0.8) and N-1 by 0.8 so it is N*0.2 + (N-1)*0.8.
Just turn input gain knob to extreme value to make signal clipping (it will
be hard limited to 0dB) and then make it being smooth by big "Thickness"
level. Even if we have square signal it will be smoothed. This effect could
also be combined with the "BitDowner" (put "Thick Distortion" after it) to
get interesting harmonics and reducing higher ones (because signal would be
less sharp).
coefficient for pure signal (for current sample, not previous one) | declare id "thick_distortion";
declare name "Thick Distortion";
declare category "Distortion";
declare author "Viacheslav Lotsmanov";
declare license "BSD";
declare copyright "(c) 2018 Viacheslav Lotsmanov";
import("stdfaust.lib");
gain
= vslider("input_gain[name:Input][tooltip:Gain (dB)]", 0, 0, 120, 0.1)
: ba.db2linear
: si.smoo
;
thickness
= vslider("thickness[name:Thickness]", 0.8, 0, 1, 0.01)
: si.smoo
;
pureness = 1 - thickness;
volume
= vslider("volume[name:Volume][tooltip:Volume (dB)]", 0, -90, 40, 0.1)
: ba.db2linear
: si.smoo
;
hardLimit = min(1) : max(-1);
thick = *(pureness) : + ~(*(thickness));
process = *(gain) : hardLimit : thick : *(volume);
|
40dc222b953d6c820403ecf572a91845e59fdd4e4fdd6cd9dedb65cd049da98f | Pro19/guitarix | eldist.dsp | // generated automatically
// DO NOT MODIFY!
declare id "eldist";
declare name "Electra Distortion";
declare category "Distortion";
declare shortname "Electra Dst";
declare description "Electra Distortion";
declare samplerate "96000";
import("stdfaust.lib");
process = pre : fi.iir((b0/a0,b1/a0),(a1/a0)) : clip with {
LogPot(a, x) = ba.if(a, (exp(a * x) - 1) / (exp(a) - 1), x);
Inverted(b, x) = ba.if(b, 1 - x, x);
s = 0.993;
fs = float(ma.SR);
pre = _;
//clip(x) = (min(0.4514,max(-0.4514,x)));
asymclip = ffunction(float asymclip(float), "clipping.h", "");
clip = asymclip(_);
Drive = vslider("Drive[name:Drive]", 0.5, 0, 1, 0.01) : Inverted(0) : si.smooth(s);
b0 = -8.14686408743197e-8*Drive*fs - 0.00018716364572377*fs;
b1 = 8.14686408743197e-8*Drive*fs + 0.00018716364572377*fs;
a0 = Drive*(-3.9949101411109e-5*fs - 8.66687668918243e-5) + 4.07955525542246e-5*fs + 0.000635245647283505;
a1 = Drive*(3.9949101411109e-5*fs - 8.66687668918243e-5) - 4.07955525542246e-5*fs + 0.000635245647283505;
};
| https://raw.githubusercontent.com/Pro19/guitarix/b1c686212332d1ea40683262bf95ad2b486b2bb6/trunk/src/plugins/eldist.dsp | faust | generated automatically
DO NOT MODIFY!
clip(x) = (min(0.4514,max(-0.4514,x))); | declare id "eldist";
declare name "Electra Distortion";
declare category "Distortion";
declare shortname "Electra Dst";
declare description "Electra Distortion";
declare samplerate "96000";
import("stdfaust.lib");
process = pre : fi.iir((b0/a0,b1/a0),(a1/a0)) : clip with {
LogPot(a, x) = ba.if(a, (exp(a * x) - 1) / (exp(a) - 1), x);
Inverted(b, x) = ba.if(b, 1 - x, x);
s = 0.993;
fs = float(ma.SR);
pre = _;
asymclip = ffunction(float asymclip(float), "clipping.h", "");
clip = asymclip(_);
Drive = vslider("Drive[name:Drive]", 0.5, 0, 1, 0.01) : Inverted(0) : si.smooth(s);
b0 = -8.14686408743197e-8*Drive*fs - 0.00018716364572377*fs;
b1 = 8.14686408743197e-8*Drive*fs + 0.00018716364572377*fs;
a0 = Drive*(-3.9949101411109e-5*fs - 8.66687668918243e-5) + 4.07955525542246e-5*fs + 0.000635245647283505;
a1 = Drive*(3.9949101411109e-5*fs - 8.66687668918243e-5) - 4.07955525542246e-5*fs + 0.000635245647283505;
};
|
f171ce50f94a13cc69c7ebd8c145bd3f61c0b4953c19ee0bc502f0aff4ff41f6 | smoge/gxplugins | impulseresponse.dsp | declare name "IR";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("math.lib");
import("music.lib");
import("effect.lib");
import("filter.lib");
import("guitarix.lib");
g3 = hslider("peak[tooltip:peak gain]", 1, 0, 10, 0.2);
fr = hslider("freq[tooltip:frequency (Hz)]", 440, 20, 12000, 10);
auto_ir = checkbox("auto_freq[name:auto freq][enum:manual|auto]") : clip(0, 1);
check_auto_ir(v) = select2(auto_ir, v, sym_clip(0.6));
feedbackcontroll(x) = firpart : + ~ feedback
with {
bw = hslider("bandwidth[tooltip:bandwidth (Hz)]", 100, 20, 20000, 10);
R = exp(0-PI*bw/SR); // pole radius [0 required]
A = 2*PI*fr/SR; // pole angle (radians pole = 2)
RR = R*R;
firpart = (x - x'') * g3 * ((1-RR)/2); // radius = 2
// time-domain coefficients ASSUMING ONE PIPELINE DELAY:
feedback(v) = 0 + R*check_auto_ir(2*cos(A),x)*v - RR*v';
};
process(x) = x + feedbackcontroll(x);
| https://raw.githubusercontent.com/smoge/gxplugins/30a5160ff626975aa521a316cd33f973e3bc5d0c/impulseresponse.dsp | faust | pole radius [0 required]
pole angle (radians pole = 2)
radius = 2
time-domain coefficients ASSUMING ONE PIPELINE DELAY: | declare name "IR";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("math.lib");
import("music.lib");
import("effect.lib");
import("filter.lib");
import("guitarix.lib");
g3 = hslider("peak[tooltip:peak gain]", 1, 0, 10, 0.2);
fr = hslider("freq[tooltip:frequency (Hz)]", 440, 20, 12000, 10);
auto_ir = checkbox("auto_freq[name:auto freq][enum:manual|auto]") : clip(0, 1);
check_auto_ir(v) = select2(auto_ir, v, sym_clip(0.6));
feedbackcontroll(x) = firpart : + ~ feedback
with {
bw = hslider("bandwidth[tooltip:bandwidth (Hz)]", 100, 20, 20000, 10);
RR = R*R;
feedback(v) = 0 + R*check_auto_ir(2*cos(A),x)*v - RR*v';
};
process(x) = x + feedbackcontroll(x);
|
3f97674bf56480dbf7de604bdccc78e8eacdb8b071f9bfde0e3c968f50c09e71 | Pro19/guitarix | buzz.dsp | // generated automatically
// DO NOT MODIFY!
declare id "buzz";
declare name "Buzz Box";
declare category "Fuzz";
declare shortname "Buzz Box";
declare description "Buzz Box";
declare insert_p "tranyclipper";
import("stdfaust.lib");
import("trany.lib");
process = pre : _<:*(dry),(*(wet) : fi.iir((b0/a0,b1/a0,b2/a0,b3/a0),(a1/a0,a2/a0,a3/a0)) ):>_ with {
LogPot(a, x) = ba.if(a, (exp(a * x) - 1) / (exp(a) - 1), x);
Inverted(b, x) = ba.if(b, 1 - x, x);
s = 0.993;
fs = float(ma.SR);
pre = _;
wet = vslider("wet_dry[name:Wet/Dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
clip = tranystageb(TB_7199P_68k,86.0,2700.0,5.571981) : tranystageb(TB_7199P_68k,86.0,2700.0,5.571981) ;
Level = vslider("Level[name:Level]", 0.5, 0, 1, 0.01) : Inverted(0) : si.smooth(s);
b0 = 3.81347663375185e-13*Level*pow(fs,3);
b1 = -1.14404299012556e-12*Level*pow(fs,3);
b2 = 1.14404299012556e-12*Level*pow(fs,3);
b3 = -3.81347663375185e-13*Level*pow(fs,3);
a0 = fs*(fs*(9.04201686922855e-15*fs + 1.0967885210812e-14) + 8.14058347559848e-15) + 2.46256378077601e-15;
a1 = fs*(fs*(-2.71260506076857e-14*fs - 1.0967885210812e-14) + 8.14058347559848e-15) + 7.38769134232804e-15;
a2 = fs*(fs*(2.71260506076857e-14*fs - 1.0967885210812e-14) - 8.14058347559848e-15) + 7.38769134232804e-15;
a3 = fs*(fs*(-9.04201686922855e-15*fs + 1.0967885210812e-14) - 8.14058347559848e-15) + 2.46256378077601e-15;
};
| https://raw.githubusercontent.com/Pro19/guitarix/b1c686212332d1ea40683262bf95ad2b486b2bb6/trunk/src/plugins/buzz.dsp | faust | generated automatically
DO NOT MODIFY! | declare id "buzz";
declare name "Buzz Box";
declare category "Fuzz";
declare shortname "Buzz Box";
declare description "Buzz Box";
declare insert_p "tranyclipper";
import("stdfaust.lib");
import("trany.lib");
process = pre : _<:*(dry),(*(wet) : fi.iir((b0/a0,b1/a0,b2/a0,b3/a0),(a1/a0,a2/a0,a3/a0)) ):>_ with {
LogPot(a, x) = ba.if(a, (exp(a * x) - 1) / (exp(a) - 1), x);
Inverted(b, x) = ba.if(b, 1 - x, x);
s = 0.993;
fs = float(ma.SR);
pre = _;
wet = vslider("wet_dry[name:Wet/Dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
clip = tranystageb(TB_7199P_68k,86.0,2700.0,5.571981) : tranystageb(TB_7199P_68k,86.0,2700.0,5.571981) ;
Level = vslider("Level[name:Level]", 0.5, 0, 1, 0.01) : Inverted(0) : si.smooth(s);
b0 = 3.81347663375185e-13*Level*pow(fs,3);
b1 = -1.14404299012556e-12*Level*pow(fs,3);
b2 = 1.14404299012556e-12*Level*pow(fs,3);
b3 = -3.81347663375185e-13*Level*pow(fs,3);
a0 = fs*(fs*(9.04201686922855e-15*fs + 1.0967885210812e-14) + 8.14058347559848e-15) + 2.46256378077601e-15;
a1 = fs*(fs*(-2.71260506076857e-14*fs - 1.0967885210812e-14) + 8.14058347559848e-15) + 7.38769134232804e-15;
a2 = fs*(fs*(2.71260506076857e-14*fs - 1.0967885210812e-14) - 8.14058347559848e-15) + 7.38769134232804e-15;
a3 = fs*(fs*(-9.04201686922855e-15*fs + 1.0967885210812e-14) - 8.14058347559848e-15) + 2.46256378077601e-15;
};
|
841d72b51d28a7fb30590150109ca694450c45827cb42b0f288b510bb8848689 | Pro19/guitarix | freeverb.dsp | declare name "Freeverb";
declare category "Reverb";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
/*-----------------------------------------------
freeverb by "Grame"
-----------------------------------------------*/
// Filter Parameters
combtuningL1 = 1116;
combtuningL2 = 1188;
combtuningL3 = 1277;
combtuningL4 = 1356;
combtuningL5 = 1422;
combtuningL6 = 1491;
combtuningL7 = 1557;
combtuningL8 = 1617;
allpasstuningL1 = 556;
allpasstuningL2 = 441;
allpasstuningL3 = 341;
allpasstuningL4 = 225;
roomsizeSlider = vslider("RoomSize", 0.5, 0, 1, 0.025)*0.28 + 0.7;
dampslider = vslider("damp",0.5, 0, 1, 0.025);
combfeed = roomsizeSlider;
//wetslider = 0.5 + vslider("wet_dry[name:wet/dry]", 0, -0.5, 0.5, 0.1);
wet_dry = vslider("wet_dry[name:wet/dry]", 50, 0, 100, 1) : /(100);
dry = 1 - wet_dry;
// Reverb components
monoReverb(fb1, fb2, damp, spread)
= _ <: comb(combtuningL1+spread, fb1, damp),
comb(combtuningL2+spread, fb1, damp),
comb(combtuningL3+spread, fb1, damp),
comb(combtuningL4+spread, fb1, damp),
comb(combtuningL5+spread, fb1, damp),
comb(combtuningL6+spread, fb1, damp),
comb(combtuningL7+spread, fb1, damp),
comb(combtuningL8+spread, fb1, damp)
+>
allpass (allpasstuningL1+spread, fb2)
: allpass (allpasstuningL2+spread, fb2)
: allpass (allpasstuningL3+spread, fb2)
: allpass (allpasstuningL4+spread, fb2)
;
//----------------------------------------------------------------
fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _;
process = _<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))):>_;
| https://raw.githubusercontent.com/Pro19/guitarix/b1c686212332d1ea40683262bf95ad2b486b2bb6/trunk/src/LV2/faust/freeverb.dsp | faust | -----------------------------------------------
freeverb by "Grame"
-----------------------------------------------
Filter Parameters
wetslider = 0.5 + vslider("wet_dry[name:wet/dry]", 0, -0.5, 0.5, 0.1);
Reverb components
---------------------------------------------------------------- | declare name "Freeverb";
declare category "Reverb";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
combtuningL1 = 1116;
combtuningL2 = 1188;
combtuningL3 = 1277;
combtuningL4 = 1356;
combtuningL5 = 1422;
combtuningL6 = 1491;
combtuningL7 = 1557;
combtuningL8 = 1617;
allpasstuningL1 = 556;
allpasstuningL2 = 441;
allpasstuningL3 = 341;
allpasstuningL4 = 225;
roomsizeSlider = vslider("RoomSize", 0.5, 0, 1, 0.025)*0.28 + 0.7;
dampslider = vslider("damp",0.5, 0, 1, 0.025);
combfeed = roomsizeSlider;
wet_dry = vslider("wet_dry[name:wet/dry]", 50, 0, 100, 1) : /(100);
dry = 1 - wet_dry;
monoReverb(fb1, fb2, damp, spread)
= _ <: comb(combtuningL1+spread, fb1, damp),
comb(combtuningL2+spread, fb1, damp),
comb(combtuningL3+spread, fb1, damp),
comb(combtuningL4+spread, fb1, damp),
comb(combtuningL5+spread, fb1, damp),
comb(combtuningL6+spread, fb1, damp),
comb(combtuningL7+spread, fb1, damp),
comb(combtuningL8+spread, fb1, damp)
+>
allpass (allpasstuningL1+spread, fb2)
: allpass (allpasstuningL2+spread, fb2)
: allpass (allpasstuningL3+spread, fb2)
: allpass (allpasstuningL4+spread, fb2)
;
fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _;
process = _<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))):>_;
|
dc413922d53b6684eb76872f1f4dcec9b1c41b0a5eea25d26a68ed00a24b0efd | HexHive/datAFLow | echo_bug.dsp | declare compilation_options "-single -scal -e echo_bug.dsp -o echo_bug.dsp";
declare library_path "/Documents/faust-github-faust2/tests/impulse-tests/dsp/echo_bug.dsp";
declare library_path "/usr/local/share/faust/sf.lib";
declare library_path "/usr/local/share/faust/all.lib";
declare library_path "/usr/local/share/faust/vaeffects.lib";
declare library_path "/usr/local/share/faust/synths.lib";
declare library_path "/usr/local/share/faust/spats.lib";
declare library_path "/usr/local/share/faust/soundfiles.lib";
declare library_path "/usr/local/share/faust/signals.lib";
declare library_path "/usr/local/share/faust/routes.lib";
declare library_path "/usr/local/share/faust/reverbs.lib";
declare library_path "/usr/local/share/faust/physmodels.lib";
declare library_path "/usr/local/share/faust/stdfaust.lib";
declare library_path "/usr/local/share/faust/phaflangers.lib";
declare library_path "/usr/local/share/faust/noises.lib";
declare library_path "/usr/local/share/faust/oscillators.lib";
declare library_path "/usr/local/share/faust/misceffects.lib";
declare library_path "/usr/local/share/faust/maths.lib";
declare library_path "/usr/local/share/faust/hoa.lib";
declare library_path "/usr/local/share/faust/filters.lib";
declare library_path "/usr/local/share/faust/envelopes.lib";
declare library_path "/usr/local/share/faust/dx7.lib";
declare library_path "/usr/local/share/faust/demos.lib";
declare library_path "/usr/local/share/faust/delays.lib";
declare library_path "/usr/local/share/faust/compressors.lib";
declare library_path "/usr/local/share/faust/basics.lib";
declare library_path "/usr/local/share/faust/analyzers.lib";
declare analyzers_lib_name "Faust Analyzer Library";
declare analyzers_lib_version "0.0";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.0";
declare compressors_lib_name "Faust Compressor Effect Library";
declare compressors_lib_version "0.0";
declare delays_lib_name "Faust Delay Library";
declare delays_lib_version "0.1";
declare envelopes_lib_author "GRAME";
declare envelopes_lib_copyright "GRAME";
declare envelopes_lib_license "LGPL with exception";
declare envelopes_lib_name "Faust Envelope Library";
declare envelopes_lib_version "0.0";
declare filename "echo_bug";
declare filters_lib_name "Faust Filters Library";
declare filters_lib_version "0.0";
declare hoa_lib_author "Pierre Guillot";
declare hoa_lib_copyright "2012-2013 Guillot, Paris, Colafrancesco, CICM labex art H2H, U. Paris 8";
declare hoa_lib_name "High Order Ambisonics library";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.1";
declare misceffects_lib_name "Faust Math Library";
declare misceffects_lib_version "2.0";
declare name "echo_bug";
declare noises_lib_name "Faust Noise Generator Library";
declare noises_lib_version "0.0";
declare oscillators_lib_name "Faust Oscillator Library";
declare oscillators_lib_version "0.0";
declare phaflangers_lib_name "Faust Phaser and Flanger Library";
declare phaflangers_lib_version "0.0";
declare reverbs_lib_name "Faust Reverb Library";
declare reverbs_lib_version "0.0";
declare routes_lib_name "Faust Signal Routing Library";
declare routes_lib_version "0.1";
declare signals_lib_name "Faust Signal Routing Library";
declare signals_lib_version "0.0";
declare soundfiles_lib_name "Faust Soundfile Library";
declare soundfiles_lib_version "0.4";
declare spats_lib_name "Faust Spatialization Library";
declare spats_lib_version "0.0";
declare synths_lib_name "Faust Synthesizer Library";
declare synths_lib_version "0.0";
declare vaeffects_lib_name "Faust Virtual Analog Filter Effect Library";
declare vaeffects_lib_version "0.0";
process = _<:_,(_ : (+ : _,0.0050000000000000044f : * : +~(_,0.995f : *)<:\(x1).(((x1,(1025,(0,100 : max) : min) : @),(1,(100,(100 : floor) : -) : -) : *),((x1,(1025,(0,101 : max) : min) : @),(100,(100 : floor) : -) : *) : +),\(x2).(((x2,(1025,(0,(100,(1.0f,(hslider("[0] EchoWarp", 0.0f, -1.0f, 1.0f, 0.001f) : _,1.0f : * : +~(_,0.0f : *)) : +) : * : _,1.0f : * : +~(_,0.0f : *) : int) : max) : min) : @),(1,((100,(1.0f,(hslider("[0] EchoWarp", 0.0f, -1.0f, 1.0f, 0.001f) : _,1.0f : * : +~(_,0.0f : *)) : +) : * : _,1.0f : * : +~(_,0.0f : *)),(100,(1.0f,(hslider("[0] EchoWarp", 0.0f, -1.0f, 1.0f, 0.001f) : _,1.0f : * : +~(_,0.0f : *)) : +) : * : _,1.0f : * : +~(_,0.0f : *) : floor) : -) : -) : *),((x2,(1025,(0,((100,(1.0f,(hslider("[0] EchoWarp", 0.0f, -1.0f, 1.0f, 0.001f) : _,1.0f : * : +~(_,0.0f : *)) : +) : * : _,1.0f : * : +~(_,0.0f : *) : int),1 : +) : max) : min) : @),((100,(1.0f,(hslider("[0] EchoWarp", 0.0f, -1.0f, 1.0f, 0.001f) : _,1.0f : * : +~(_,0.0f : *)) : +) : * : _,1.0f : * : +~(_,0.0f : *)),(100,(1.0f,(hslider("[0] EchoWarp", 0.0f, -1.0f, 1.0f, 0.001f) : _,1.0f : * : +~(_,0.0f : *)) : +) : * : _,1.0f : * : +~(_,0.0f : *) : floor) : -) : *) : +))~((_,0 : *),!) : !,_) : +;
| https://raw.githubusercontent.com/HexHive/datAFLow/b9f3cbc42b1970f8655817c9fb67b1eaba3ae4c0/evaluation/ddfuzz/seeds/faust/echo_bug.dsp | faust | declare compilation_options "-single -scal -e echo_bug.dsp -o echo_bug.dsp";
declare library_path "/Documents/faust-github-faust2/tests/impulse-tests/dsp/echo_bug.dsp";
declare library_path "/usr/local/share/faust/sf.lib";
declare library_path "/usr/local/share/faust/all.lib";
declare library_path "/usr/local/share/faust/vaeffects.lib";
declare library_path "/usr/local/share/faust/synths.lib";
declare library_path "/usr/local/share/faust/spats.lib";
declare library_path "/usr/local/share/faust/soundfiles.lib";
declare library_path "/usr/local/share/faust/signals.lib";
declare library_path "/usr/local/share/faust/routes.lib";
declare library_path "/usr/local/share/faust/reverbs.lib";
declare library_path "/usr/local/share/faust/physmodels.lib";
declare library_path "/usr/local/share/faust/stdfaust.lib";
declare library_path "/usr/local/share/faust/phaflangers.lib";
declare library_path "/usr/local/share/faust/noises.lib";
declare library_path "/usr/local/share/faust/oscillators.lib";
declare library_path "/usr/local/share/faust/misceffects.lib";
declare library_path "/usr/local/share/faust/maths.lib";
declare library_path "/usr/local/share/faust/hoa.lib";
declare library_path "/usr/local/share/faust/filters.lib";
declare library_path "/usr/local/share/faust/envelopes.lib";
declare library_path "/usr/local/share/faust/dx7.lib";
declare library_path "/usr/local/share/faust/demos.lib";
declare library_path "/usr/local/share/faust/delays.lib";
declare library_path "/usr/local/share/faust/compressors.lib";
declare library_path "/usr/local/share/faust/basics.lib";
declare library_path "/usr/local/share/faust/analyzers.lib";
declare analyzers_lib_name "Faust Analyzer Library";
declare analyzers_lib_version "0.0";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.0";
declare compressors_lib_name "Faust Compressor Effect Library";
declare compressors_lib_version "0.0";
declare delays_lib_name "Faust Delay Library";
declare delays_lib_version "0.1";
declare envelopes_lib_author "GRAME";
declare envelopes_lib_copyright "GRAME";
declare envelopes_lib_license "LGPL with exception";
declare envelopes_lib_name "Faust Envelope Library";
declare envelopes_lib_version "0.0";
declare filename "echo_bug";
declare filters_lib_name "Faust Filters Library";
declare filters_lib_version "0.0";
declare hoa_lib_author "Pierre Guillot";
declare hoa_lib_copyright "2012-2013 Guillot, Paris, Colafrancesco, CICM labex art H2H, U. Paris 8";
declare hoa_lib_name "High Order Ambisonics library";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.1";
declare misceffects_lib_name "Faust Math Library";
declare misceffects_lib_version "2.0";
declare name "echo_bug";
declare noises_lib_name "Faust Noise Generator Library";
declare noises_lib_version "0.0";
declare oscillators_lib_name "Faust Oscillator Library";
declare oscillators_lib_version "0.0";
declare phaflangers_lib_name "Faust Phaser and Flanger Library";
declare phaflangers_lib_version "0.0";
declare reverbs_lib_name "Faust Reverb Library";
declare reverbs_lib_version "0.0";
declare routes_lib_name "Faust Signal Routing Library";
declare routes_lib_version "0.1";
declare signals_lib_name "Faust Signal Routing Library";
declare signals_lib_version "0.0";
declare soundfiles_lib_name "Faust Soundfile Library";
declare soundfiles_lib_version "0.4";
declare spats_lib_name "Faust Spatialization Library";
declare spats_lib_version "0.0";
declare synths_lib_name "Faust Synthesizer Library";
declare synths_lib_version "0.0";
declare vaeffects_lib_name "Faust Virtual Analog Filter Effect Library";
declare vaeffects_lib_version "0.0";
process = _<:_,(_ : (+ : _,0.0050000000000000044f : * : +~(_,0.995f : *)<:\(x1).(((x1,(1025,(0,100 : max) : min) : @),(1,(100,(100 : floor) : -) : -) : *),((x1,(1025,(0,101 : max) : min) : @),(100,(100 : floor) : -) : *) : +),\(x2).(((x2,(1025,(0,(100,(1.0f,(hslider("[0] EchoWarp", 0.0f, -1.0f, 1.0f, 0.001f) : _,1.0f : * : +~(_,0.0f : *)) : +) : * : _,1.0f : * : +~(_,0.0f : *) : int) : max) : min) : @),(1,((100,(1.0f,(hslider("[0] EchoWarp", 0.0f, -1.0f, 1.0f, 0.001f) : _,1.0f : * : +~(_,0.0f : *)) : +) : * : _,1.0f : * : +~(_,0.0f : *)),(100,(1.0f,(hslider("[0] EchoWarp", 0.0f, -1.0f, 1.0f, 0.001f) : _,1.0f : * : +~(_,0.0f : *)) : +) : * : _,1.0f : * : +~(_,0.0f : *) : floor) : -) : -) : *),((x2,(1025,(0,((100,(1.0f,(hslider("[0] EchoWarp", 0.0f, -1.0f, 1.0f, 0.001f) : _,1.0f : * : +~(_,0.0f : *)) : +) : * : _,1.0f : * : +~(_,0.0f : *) : int),1 : +) : max) : min) : @),((100,(1.0f,(hslider("[0] EchoWarp", 0.0f, -1.0f, 1.0f, 0.001f) : _,1.0f : * : +~(_,0.0f : *)) : +) : * : _,1.0f : * : +~(_,0.0f : *)),(100,(1.0f,(hslider("[0] EchoWarp", 0.0f, -1.0f, 1.0f, 0.001f) : _,1.0f : * : +~(_,0.0f : *)) : +) : * : _,1.0f : * : +~(_,0.0f : *) : floor) : -) : *) : +))~((_,0 : *),!) : !,_) : +;
|
|
e6cb52867a3376a6b9d2eb2333dd86d6be7edd09fe3fd6785cf63b3134be8526 | ntonnaett/guitarix | impulseresponse.dsp | declare id "IR";
declare name "ImpulseResponse";
declare category "Tone Control";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("math.lib");
import("music.lib");
import("effect.lib");
import("filter.lib");
import("guitarix.lib");
g3 = hslider("peak[name:Peak][tooltip:peak gain]", 1, 0, 10, 0.2);
fr = hslider("freq[name:Freq][tooltip:frequency (Hz)]", 440, 20, 12000, 10);
auto_ir = checkbox("auto_freq[name:auto freq][enum:manual|auto]") : clip(0, 1);
check_auto_ir(v) = select2(auto_ir, v, sym_clip(0.6));
feedbackcontroll(x) = firpart : + ~ feedback
with {
bw = hslider("bandwidth[name:Bandwidth][tooltip:bandwidth (Hz)]", 100, 20, 20000, 10);
R = exp(0-PI*bw/SR); // pole radius [0 required]
A = 2*PI*fr/SR; // pole angle (radians pole = 2)
RR = R*R;
firpart = (x - x'') * g3 * ((1-RR)/2); // radius = 2
// time-domain coefficients ASSUMING ONE PIPELINE DELAY:
feedback(v) = 0 + R*check_auto_ir(2*cos(A),x)*v - RR*v';
};
process(x) = x + feedbackcontroll(x);
| https://raw.githubusercontent.com/ntonnaett/guitarix/e5ce36c3a693eeada3cb70425ec09f8d6f91e78c/trunk/src/faust/impulseresponse.dsp | faust | pole radius [0 required]
pole angle (radians pole = 2)
radius = 2
time-domain coefficients ASSUMING ONE PIPELINE DELAY: | declare id "IR";
declare name "ImpulseResponse";
declare category "Tone Control";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("math.lib");
import("music.lib");
import("effect.lib");
import("filter.lib");
import("guitarix.lib");
g3 = hslider("peak[name:Peak][tooltip:peak gain]", 1, 0, 10, 0.2);
fr = hslider("freq[name:Freq][tooltip:frequency (Hz)]", 440, 20, 12000, 10);
auto_ir = checkbox("auto_freq[name:auto freq][enum:manual|auto]") : clip(0, 1);
check_auto_ir(v) = select2(auto_ir, v, sym_clip(0.6));
feedbackcontroll(x) = firpart : + ~ feedback
with {
bw = hslider("bandwidth[name:Bandwidth][tooltip:bandwidth (Hz)]", 100, 20, 20000, 10);
RR = R*R;
feedback(v) = 0 + R*check_auto_ir(2*cos(A),x)*v - RR*v';
};
process(x) = x + feedbackcontroll(x);
|
6e16bcc6ab83e446beea2ec1afffe1cd6ba242305e888262b9f542d038e99097 | ntonnaett/guitarix | low_high_pass.dsp | declare id "low_highpass";
declare name "Low/High Filter";
declare shortname "L/H Filter";
declare category "Tone Control";
declare groups ".low_high_pass.lhp[low_highpass], .low_high_pass.lhc[low_highcutoff]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("effect.lib");
import("guitarix.lib");
import("math.lib");
//-speaker emulation
sbp1 = vslider("low_freq[name:Lowcut][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("high_freq[name:Highcut][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("on_off[name:low highcutoff]");
sbp = hgroup(".low_high_pass.lhc", bypass(switch1, +(anti_denormal_ac) : speakerbp(sbp1,sbp2)));
//------------------------------ low/high-passfilters --------------------------------------
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
S = (O-parity)/2; // current section number
a1s = -2*cos(-PI + (1-parity)*PI/(2*N) + (S-1+parity)*PI/N);
w1 = 2*PI*fc;
};
};
//-low and highpass
lowpassfreq = nentry("low_freq[name:Lowpass]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:Highpass]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low highpass]");
passo = +(anti_denormal_ac) : lowpassN(1,lowpassfreq) : highpassN(1,highpassfreq);
pass = hgroup(".low_high_pass.lhp", bypass(switch, passo));
process = pass : sbp ;
| https://raw.githubusercontent.com/ntonnaett/guitarix/e5ce36c3a693eeada3cb70425ec09f8d6f91e78c/trunk/src/faust/low_high_pass.dsp | faust | -speaker emulation
------------------------------ low/high-passfilters --------------------------------------
bilinear-transform scale-factor
bilinear-transform scale-factor
current section number
-low and highpass | declare id "low_highpass";
declare name "Low/High Filter";
declare shortname "L/H Filter";
declare category "Tone Control";
declare groups ".low_high_pass.lhp[low_highpass], .low_high_pass.lhc[low_highcutoff]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("effect.lib");
import("guitarix.lib");
import("math.lib");
sbp1 = vslider("low_freq[name:Lowcut][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("high_freq[name:Highcut][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("on_off[name:low highcutoff]");
sbp = hgroup(".low_high_pass.lhc", bypass(switch1, +(anti_denormal_ac) : speakerbp(sbp1,sbp2)));
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
a1s = -2*cos(-PI + (1-parity)*PI/(2*N) + (S-1+parity)*PI/N);
w1 = 2*PI*fc;
};
};
lowpassfreq = nentry("low_freq[name:Lowpass]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:Highpass]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low highpass]");
passo = +(anti_denormal_ac) : lowpassN(1,lowpassfreq) : highpassN(1,highpassfreq);
pass = hgroup(".low_high_pass.lhp", bypass(switch, passo));
process = pass : sbp ;
|
0f3b488c95b670514adac40d3144c8b40cfeaed055455393f06d08973616d88b | ntonnaett/guitarix | low_high_pass.dsp | declare id "low_highpass";
declare name "low high pass";
declare shortname "L/H/Filter";
declare category "Tone Control";
declare groups ".low_high_pass.lhp[low_highpass], .low_high_pass.lhc[low_highcutoff]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("effect.lib");
import("guitarix.lib");
import("math.lib");
//-speaker emulation
sbp1 = vslider("low_freq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("high_freq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("on_off[name:low highcutoff]");
sbp = hgroup(".low_high_pass.lhc", bypass(switch1, +(anti_denormal_ac) : speakerbp(sbp1,sbp2)));
//------------------------------ low/high-passfilters --------------------------------------
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
S = (O-parity)/2; // current section number
a1s = -2*cos(-PI + (1-parity)*PI/(2*N) + (S-1+parity)*PI/N);
w1 = 2*PI*fc;
};
};
//-low and highpass
lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low highpass]");
passo = +(anti_denormal_ac) : lowpassN(1,lowpassfreq) : highpassN(1,highpassfreq);
pass = hgroup(".low_high_pass.lhp", bypass(switch, passo));
process = pass : sbp ;
| https://raw.githubusercontent.com/ntonnaett/guitarix/e5ce36c3a693eeada3cb70425ec09f8d6f91e78c/trunk/src/LV2/faust/low_high_pass.dsp | faust | -speaker emulation
------------------------------ low/high-passfilters --------------------------------------
bilinear-transform scale-factor
bilinear-transform scale-factor
current section number
-low and highpass | declare id "low_highpass";
declare name "low high pass";
declare shortname "L/H/Filter";
declare category "Tone Control";
declare groups ".low_high_pass.lhp[low_highpass], .low_high_pass.lhc[low_highcutoff]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("effect.lib");
import("guitarix.lib");
import("math.lib");
sbp1 = vslider("low_freq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("high_freq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("on_off[name:low highcutoff]");
sbp = hgroup(".low_high_pass.lhc", bypass(switch1, +(anti_denormal_ac) : speakerbp(sbp1,sbp2)));
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
a1s = -2*cos(-PI + (1-parity)*PI/(2*N) + (S-1+parity)*PI/N);
w1 = 2*PI*fc;
};
};
lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low highpass]");
passo = +(anti_denormal_ac) : lowpassN(1,lowpassfreq) : highpassN(1,highpassfreq);
pass = hgroup(".low_high_pass.lhp", bypass(switch, passo));
process = pass : sbp ;
|
21933bd04cfefafc86db202564fd05647f6f5e95c005aa194a27f819addb530d | simonvanderveldt/guitarix | low_high_pass.dsp | declare id "low_highpass";
declare name "low high pass";
declare shortname "L/H/Filter";
declare category "Tone Control";
declare groups ".low_high_pass.lhp[low_highpass], .low_high_pass.lhc[low_highcutoff]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
//-speaker emulation
sbp1 = vslider("low_freq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("high_freq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("on_off[name:low highcutoff]");
sbp = hgroup(".low_high_pass.lhc", bypass(switch1, +(anti_denormal_ac) : ef.speakerbp(sbp1,sbp2)));
//------------------------------ low/high-passfilters --------------------------------------
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
S = (O-parity)/2; // current section number
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
//-low and fi.highpass
lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low fi.highpass]");
passo = +(anti_denormal_ac) : lowpassN(1,lowpassfreq) : highpassN(1,highpassfreq);
pass = hgroup(".low_high_pass.lhp", bypass(switch, passo));
process = pass : sbp ;
| https://raw.githubusercontent.com/simonvanderveldt/guitarix/51ba3d2bba6118a7fbf67a56c30e860faa155d5f/trunk/src/LV2/faust/low_high_pass.dsp | faust | -speaker emulation
------------------------------ low/high-passfilters --------------------------------------
bilinear-transform scale-factor
bilinear-transform scale-factor
current section number
-low and fi.highpass | declare id "low_highpass";
declare name "low high pass";
declare shortname "L/H/Filter";
declare category "Tone Control";
declare groups ".low_high_pass.lhp[low_highpass], .low_high_pass.lhc[low_highcutoff]";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
sbp1 = vslider("low_freq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
sbp2 = vslider("high_freq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
switch1 = checkbox("on_off[name:low highcutoff]");
sbp = hgroup(".low_high_pass.lhc", bypass(switch1, +(anti_denormal_ac) : ef.speakerbp(sbp1,sbp2)));
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
switch = checkbox("on_off[name:low fi.highpass]");
passo = +(anti_denormal_ac) : lowpassN(1,lowpassfreq) : highpassN(1,highpassfreq);
pass = hgroup(".low_high_pass.lhp", bypass(switch, passo));
process = pass : sbp ;
|
16ddb0c32b0142e9591788456e43fac208e8b5526c9b2a2dfb26cb5aba2d9e4b | ntonnaett/guitarix | gx_distortion.dsp | declare name "Multi Band Distortion";
declare shortname "Distortion";
declare category "Distortion";
declare groups "resonator[Distortion resonator]";
declare gladefile "gx_distortion_ui.glade";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("math.lib");
import("music.lib");
import("effect.lib");
import("filter.lib");
import("guitarix.lib");
import("maxmsp.lib");
F = nentry("split_low_freq[name:Split Lo]", 250, 20, 600, 10);
F1 = nentry("split_middle_freq[name:Split Mid]", 650, 600, 1250, 10);
F2 = nentry("split_high_freq[name:Split Hi]", 1250, 1250, 12000, 10);
/**********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
***********************************************************************/
//------------------------------ count and take --------------------------------------
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
//------------------------------ low/high-passfilters --------------------------------------
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
S = (O-parity)/2; // current section number
a1s = -2*cos(-PI + (1-parity)*PI/(2*N) + (S-1+parity)*PI/N);
w1 = 2*PI*fc;
};
};
//------------------------------ analyzer --------------------------------------
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = count(lfreqs);
fc(n) = take(n, lfreqs);
ap(n) = highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = filterbankn(3,lfreqs);
/**********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completly to > 0.9.27
***********************************************************************/
//----------distortion---------
//-distortion
drivelevel = vslider("level[name:Level]", 0.0, 0, 0.5, 0.01);
drivegain1 = vslider("gain[name:Gain]", 2, -10, 10, 0.1)-10 : db2linear : smoothi(0.999);
low_gain = vslider("low_gain[name:Lo]", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
high_gain = vslider("high_gain[name:Hi]", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
middle_gain_l = vslider("middle_l_gain[name:LoMid]", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
middle_gain_h = vslider("middle_h_gain[name:HiMid]", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
drive = vslider("drive[name:Drive]", 0.64, 0, 1, 0.01);
drive1 = vslider("low_drive[name:Lo]", 1, 0, 1, 0.01)*drive;
drive2 = vslider("high_drive[name:Hi]", 1, 0, 1, 0.01)*drive;
drive3 = vslider("middle_l_drive[name:LoMid]", 1, 0, 1, 0.01)*drive;
drive4 = vslider("middle_h_drive[name:HiMid]", 1, 0, 1, 0.01)*drive;
distortion1 = _:cubicnl(drive1,drivelevel): *(low_gain);
distortion2 = _:cubicnl(drive2,drivelevel) : *(high_gain);
distortion3 = _:cubicnl(drive3,drivelevel) : *(middle_gain_l);
distortion4 = _:cubicnl(drive4,drivelevel) : *(middle_gain_h);
distortion = lowpassN(2,15000.0): highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>lowpass(1,6531.0);
//-resonator
resonator = (+ <: (delay(4096, d-1) + delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato[name:Vibrato]", 1, 0, 1, 0.01);
a = vslider("trigger[name:Trigger]", 0.12, 0, 1, 0.01);
};
switch2 = checkbox("resonator.on_off[name:resonat]");
//reso = hgroup("resonator", bypass(switch2, resonator));
moving_filter(x) = (x+x'+x'')/3;
wet = vslider("wet_dry[name:Wet/Dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
process_dist = bypass(switch2, resonator) : +(anti_denormal_ac) : distortion : *(drivegain1) ;
process = _<:*(dry),(*(wet): process_dist):>_;
| https://raw.githubusercontent.com/ntonnaett/guitarix/e5ce36c3a693eeada3cb70425ec09f8d6f91e78c/trunk/src/faust/gx_distortion.dsp | faust | *********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
**********************************************************************
------------------------------ count and take --------------------------------------
------------------------------ low/high-passfilters --------------------------------------
bilinear-transform scale-factor
bilinear-transform scale-factor
current section number
------------------------------ analyzer --------------------------------------
*********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completly to > 0.9.27
**********************************************************************
----------distortion---------
-distortion
-resonator
reso = hgroup("resonator", bypass(switch2, resonator)); | declare name "Multi Band Distortion";
declare shortname "Distortion";
declare category "Distortion";
declare groups "resonator[Distortion resonator]";
declare gladefile "gx_distortion_ui.glade";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("math.lib");
import("music.lib");
import("effect.lib");
import("filter.lib");
import("guitarix.lib");
import("maxmsp.lib");
F = nentry("split_low_freq[name:Split Lo]", 250, 20, 600, 10);
F1 = nentry("split_middle_freq[name:Split Mid]", 650, 600, 1250, 10);
F2 = nentry("split_high_freq[name:Split Hi]", 1250, 1250, 12000, 10);
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
a1s = -2*cos(-PI + (1-parity)*PI/(2*N) + (S-1+parity)*PI/N);
w1 = 2*PI*fc;
};
};
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = count(lfreqs);
fc(n) = take(n, lfreqs);
ap(n) = highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = filterbankn(3,lfreqs);
drivelevel = vslider("level[name:Level]", 0.0, 0, 0.5, 0.01);
drivegain1 = vslider("gain[name:Gain]", 2, -10, 10, 0.1)-10 : db2linear : smoothi(0.999);
low_gain = vslider("low_gain[name:Lo]", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
high_gain = vslider("high_gain[name:Hi]", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
middle_gain_l = vslider("middle_l_gain[name:LoMid]", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
middle_gain_h = vslider("middle_h_gain[name:HiMid]", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
drive = vslider("drive[name:Drive]", 0.64, 0, 1, 0.01);
drive1 = vslider("low_drive[name:Lo]", 1, 0, 1, 0.01)*drive;
drive2 = vslider("high_drive[name:Hi]", 1, 0, 1, 0.01)*drive;
drive3 = vslider("middle_l_drive[name:LoMid]", 1, 0, 1, 0.01)*drive;
drive4 = vslider("middle_h_drive[name:HiMid]", 1, 0, 1, 0.01)*drive;
distortion1 = _:cubicnl(drive1,drivelevel): *(low_gain);
distortion2 = _:cubicnl(drive2,drivelevel) : *(high_gain);
distortion3 = _:cubicnl(drive3,drivelevel) : *(middle_gain_l);
distortion4 = _:cubicnl(drive4,drivelevel) : *(middle_gain_h);
distortion = lowpassN(2,15000.0): highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>lowpass(1,6531.0);
resonator = (+ <: (delay(4096, d-1) + delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato[name:Vibrato]", 1, 0, 1, 0.01);
a = vslider("trigger[name:Trigger]", 0.12, 0, 1, 0.01);
};
switch2 = checkbox("resonator.on_off[name:resonat]");
moving_filter(x) = (x+x'+x'')/3;
wet = vslider("wet_dry[name:Wet/Dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
process_dist = bypass(switch2, resonator) : +(anti_denormal_ac) : distortion : *(drivegain1) ;
process = _<:*(dry),(*(wet): process_dist):>_;
|
e87bccbf081e971ba19be1f22a1defe0350a8901ac120f8aa6842d2d1c19e6b7 | ntonnaett/guitarix | bitdowner.dsp | declare id "bitdowner";
declare name "BitDowner";
declare category "Distortion";
declare author "Viacheslav Lotsmanov (unclechu)";
declare license "BSD";
declare copyright "(c) Viacheslav Lotsmanov, 2015";
import("filter.lib"); // smooth
import("music.lib"); // db2linear
import("math.lib"); // if
gain =
vslider("input_gain[name:Input][tooltip:Gain (dB)]", 0, -40, 40, 0.1)
: db2linear
: smooth(0.999)
;
bitLimit = 16;
downbit =
vslider("bit_down[name:Bit Down]", bitLimit, 1, bitLimit, 0.1)
: (2 ^ (_-1))
;
downsampling =
vslider(
"downsampling[name:Smpl Down][tooltip:Downsampling (samples to skip count)]",
1, 1, 200, 1)
: int
;
volume =
vslider("volume[name:Volume][tooltip:Volume (dB)]", 0, -90, 12, 0.1)
: db2linear
: smooth(0.999)
;
// from 0 till x (if x is 5 then [0,1,2,3,4])
counter(x) = int(_)~(_ <: if(_<(x-1) , _+1 , 0));
// downsampling
dsWet(s,c) = _~(if(c == 0 , s , _));
ds(s) =
// dry signal if downsampling disabled
if(downsampling > 1 , dsWet(s,counter(downsampling)) , s)
;
hardLimit(s) = if(s>1, 1, if(s<-1, -1, s));
// bitdowning
bd = *(downbit) : floor : /(downbit) : hardLimit;
process = *(gain) : bd : ds : *(volume);
| https://raw.githubusercontent.com/ntonnaett/guitarix/e5ce36c3a693eeada3cb70425ec09f8d6f91e78c/trunk/src/faust/bitdowner.dsp | faust | smooth
db2linear
if
from 0 till x (if x is 5 then [0,1,2,3,4])
downsampling
dry signal if downsampling disabled
bitdowning | declare id "bitdowner";
declare name "BitDowner";
declare category "Distortion";
declare author "Viacheslav Lotsmanov (unclechu)";
declare license "BSD";
declare copyright "(c) Viacheslav Lotsmanov, 2015";
gain =
vslider("input_gain[name:Input][tooltip:Gain (dB)]", 0, -40, 40, 0.1)
: db2linear
: smooth(0.999)
;
bitLimit = 16;
downbit =
vslider("bit_down[name:Bit Down]", bitLimit, 1, bitLimit, 0.1)
: (2 ^ (_-1))
;
downsampling =
vslider(
"downsampling[name:Smpl Down][tooltip:Downsampling (samples to skip count)]",
1, 1, 200, 1)
: int
;
volume =
vslider("volume[name:Volume][tooltip:Volume (dB)]", 0, -90, 12, 0.1)
: db2linear
: smooth(0.999)
;
counter(x) = int(_)~(_ <: if(_<(x-1) , _+1 , 0));
dsWet(s,c) = _~(if(c == 0 , s , _));
ds(s) =
if(downsampling > 1 , dsWet(s,counter(downsampling)) , s)
;
hardLimit(s) = if(s>1, 1, if(s<-1, -1, s));
bd = *(downbit) : floor : /(downbit) : hardLimit;
process = *(gain) : bd : ds : *(volume);
|
be6f8b0981db4cfc297e6b4e1eb43a307ad0979962577cf4ddeb20d1eada5c5d | brummer10/guitarix | chorus.dsp | declare name "Chorus";
declare category "Modulation";
/* Stereo chorus. */
// declare name "chorus -- stereo chorus effect";
declare author "Albert Graef";
declare version "1.0";
import("stdfaust.lib");
level = hslider("level[name:Level]", 0.5, 0, 1, 0.01);
freq = hslider("freq[name:Freq]", 3, 0, 10, 0.01);
dtime = hslider("delay[name:Delay]", 0.02, 0, 0.2, 0.01): si.smooth(0.999);
depth = hslider("depth[name:Depth]", 0.02, 0, 1, 0.01);
tblosc(n,f,freq,mod) = (1-d)*rdtable(n,wform,i&(n-1)) +
d*rdtable(n,wform,(i+1)&(n-1))
with {
wform = ba.time*(2.0*ma.PI)/n : f;
phase = freq/ma.SR : (+ : ma.decimal) ~ _;
modphase = ma.decimal(phase+mod/(2*ma.PI))*n;
i = int(floor(modphase));
d = ma.decimal(modphase);
};
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));
};
process = vgroup("chorus", (left, right))
with {
left = chorus(dtime,freq,depth,0);
right = chorus(dtime,freq,depth,ma.PI/2);
};
| https://raw.githubusercontent.com/brummer10/guitarix/5672b8cb8f1c324ea28b1fddc7e1b39f79aabbc6/trunk/src/faust/chorus.dsp | faust | Stereo chorus.
declare name "chorus -- stereo chorus effect"; | declare name "Chorus";
declare category "Modulation";
declare author "Albert Graef";
declare version "1.0";
import("stdfaust.lib");
level = hslider("level[name:Level]", 0.5, 0, 1, 0.01);
freq = hslider("freq[name:Freq]", 3, 0, 10, 0.01);
dtime = hslider("delay[name:Delay]", 0.02, 0, 0.2, 0.01): si.smooth(0.999);
depth = hslider("depth[name:Depth]", 0.02, 0, 1, 0.01);
tblosc(n,f,freq,mod) = (1-d)*rdtable(n,wform,i&(n-1)) +
d*rdtable(n,wform,(i+1)&(n-1))
with {
wform = ba.time*(2.0*ma.PI)/n : f;
phase = freq/ma.SR : (+ : ma.decimal) ~ _;
modphase = ma.decimal(phase+mod/(2*ma.PI))*n;
i = int(floor(modphase));
d = ma.decimal(modphase);
};
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));
};
process = vgroup("chorus", (left, right))
with {
left = chorus(dtime,freq,depth,0);
right = chorus(dtime,freq,depth,ma.PI/2);
};
|
efc02d77b5926ed9c23faced55fc0b378925d92ea3b93e286b3fe10bdec2ea3e | brummer10/guitarix | gx_ampmodul.dsp | declare id "ampmodul";
declare name "Postamp";
declare category "Distortion";
declare groups "amp2.stage1[Postamp Tube1], amp2.stage2[Postamp Tube2]";
declare samplerate "96000";
import("stdfaust.lib");
import("guitarix.lib");
feedback = hslider("feedback[name:Wet/FB]", 0, -1, 1, 0.01);
fbackw = (- : ma.neg ) ~ (feedback * _'''');
feedbac = hslider("feedbac[name:Dry/FB]", 0, -1, 1, 0.01);
fback = (- : ma.neg ) ~ (feedbac * _'''');
preamp = (vslider(".ampmodul.amp2.stage1.tube1[name:Tube I]",6,-20,20,0.1):ba.db2linear : smoothi(0.999));
gain1 = vslider(".ampmodul.amp2.stage2.tube2[name:Tube II]", 6, -20.0, 20.0, 0.1) : ba.db2linear : smoothi(0.999);
gain = vslider("level[name:Level]", -20, -40, 4, 0.1) : ba.db2linear : smoothi(0.999);
wet_dry = vslider("wet_dry[name:Dry/Wet]", 0, -1, 1, 0.1);
balanc(b) = *(1 - max(0, b)), *(1 - max(0, -b));
wet_dry_mx(w, Fx) = _ <: (_:fback), Fx : balanc(w) : +;
process = wet_dry_mx(wet_dry, _:(*(gain) : component("gxamp2.dsp").tubec(preamp,gain1):fbackw)), wet_dry_mx(wet_dry, _:(*(gain) : component("gxamp2.dsp").tubec(preamp,gain1):fbackw));
| https://raw.githubusercontent.com/brummer10/guitarix/5672b8cb8f1c324ea28b1fddc7e1b39f79aabbc6/trunk/src/faust/gx_ampmodul.dsp | faust | declare id "ampmodul";
declare name "Postamp";
declare category "Distortion";
declare groups "amp2.stage1[Postamp Tube1], amp2.stage2[Postamp Tube2]";
declare samplerate "96000";
import("stdfaust.lib");
import("guitarix.lib");
feedback = hslider("feedback[name:Wet/FB]", 0, -1, 1, 0.01);
fbackw = (- : ma.neg ) ~ (feedback * _'''');
feedbac = hslider("feedbac[name:Dry/FB]", 0, -1, 1, 0.01);
fback = (- : ma.neg ) ~ (feedbac * _'''');
preamp = (vslider(".ampmodul.amp2.stage1.tube1[name:Tube I]",6,-20,20,0.1):ba.db2linear : smoothi(0.999));
gain1 = vslider(".ampmodul.amp2.stage2.tube2[name:Tube II]", 6, -20.0, 20.0, 0.1) : ba.db2linear : smoothi(0.999);
gain = vslider("level[name:Level]", -20, -40, 4, 0.1) : ba.db2linear : smoothi(0.999);
wet_dry = vslider("wet_dry[name:Dry/Wet]", 0, -1, 1, 0.1);
balanc(b) = *(1 - max(0, b)), *(1 - max(0, -b));
wet_dry_mx(w, Fx) = _ <: (_:fback), Fx : balanc(w) : +;
process = wet_dry_mx(wet_dry, _:(*(gain) : component("gxamp2.dsp").tubec(preamp,gain1):fbackw)), wet_dry_mx(wet_dry, _:(*(gain) : component("gxamp2.dsp").tubec(preamp,gain1):fbackw));
|
|
1edd6606ad2639d1ebd44f327d6f114c64cf32d8b621539bb26ef7ea2d1938b7 | ntonnaett/guitarix | echo.dsp | declare name "Echo";
declare category "Echo / Delay";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("math.lib");
import("music.lib");
import("effect.lib");
import("filter.lib");
//t = vslider("time", 1, 1, 2000, 1);
t = tempo(hslider("bpm[name:BPM][tooltip:Echo in Beats per Minute]",120,24,360,1));
release = vslider("percent[name:Percent]", 0, 0, 100, 0.1)/100.0 : smooth(0.999);
N = int( 2^19);
interp = 100*millisec;
echo1 = +~(sdelay(N, interp, int(t)-1) * (release));
process = echo1;
| https://raw.githubusercontent.com/ntonnaett/guitarix/e5ce36c3a693eeada3cb70425ec09f8d6f91e78c/trunk/src/faust/echo.dsp | faust | t = vslider("time", 1, 1, 2000, 1); | declare name "Echo";
declare category "Echo / Delay";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("math.lib");
import("music.lib");
import("effect.lib");
import("filter.lib");
t = tempo(hslider("bpm[name:BPM][tooltip:Echo in Beats per Minute]",120,24,360,1));
release = vslider("percent[name:Percent]", 0, 0, 100, 0.1)/100.0 : smooth(0.999);
N = int( 2^19);
interp = 100*millisec;
echo1 = +~(sdelay(N, interp, int(t)-1) * (release));
process = echo1;
|
16be8ff2e3f7350a2046de4a6a32f04d3bd9ea0a0599acb94f461530c68a786e | brummer10/guitarix | peak_eq.dsp | declare id "eq";
declare name "Peak EQ";
declare category "Tone Control";
declare license "BSD";
declare copyright "(c)GRAME 2006";
import("stdfaust.lib");
import("guitarix.lib");
//------------------------- Process --------------------------------
// USAGE: _ : fi.peak_eq(Lfx,fx,B) : _;
// where
// Lfx = level (dB) at fx
// fx = peak frequency (Hz)
// B = bandwidth (B) of peak in Hz
process = fi.peak_eq(vslider("level1 [name:Sub][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak1 [tooltip:frequency (hz)][log]", 110, 20, 22000, 1.01),vslider("bandwidth1 [name:Q][tooltip:bandwidth (hz)][log]", 41, 5, 20000, 1.01))
: fi.peak_eq(vslider("level2 [name:Low][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak2 [tooltip:frequency (hz)][log]", 440, 20, 22000, 1.01),vslider("bandwidth2 [name:Q][tooltip:bandwidth (hz)][log]", 220, 5, 20000, 1.01))
: fi.peak_eq(vslider("level3 [name:Mid][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak3 [tooltip:frequency (hz)][log]", 1760, 20, 22000, 1.01),vslider("bandwidth3 [name:Q][tooltip:bandwidth (hz)][log]", 880, 5, 20000, 1.01))
: fi.peak_eq(vslider("level4 [name:High][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak4 [tooltip:frequency (hz)][log]", 3520, 20, 22000, 1.01),vslider("bandwidth4 [name:Q][tooltip:bandwidth (hz)][log]", 1760, 5, 20000, 1.01))
;
| https://raw.githubusercontent.com/brummer10/guitarix/5672b8cb8f1c324ea28b1fddc7e1b39f79aabbc6/trunk/src/faust/peak_eq.dsp | faust | ------------------------- Process --------------------------------
USAGE: _ : fi.peak_eq(Lfx,fx,B) : _;
where
Lfx = level (dB) at fx
fx = peak frequency (Hz)
B = bandwidth (B) of peak in Hz | declare id "eq";
declare name "Peak EQ";
declare category "Tone Control";
declare license "BSD";
declare copyright "(c)GRAME 2006";
import("stdfaust.lib");
import("guitarix.lib");
process = fi.peak_eq(vslider("level1 [name:Sub][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak1 [tooltip:frequency (hz)][log]", 110, 20, 22000, 1.01),vslider("bandwidth1 [name:Q][tooltip:bandwidth (hz)][log]", 41, 5, 20000, 1.01))
: fi.peak_eq(vslider("level2 [name:Low][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak2 [tooltip:frequency (hz)][log]", 440, 20, 22000, 1.01),vslider("bandwidth2 [name:Q][tooltip:bandwidth (hz)][log]", 220, 5, 20000, 1.01))
: fi.peak_eq(vslider("level3 [name:Mid][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak3 [tooltip:frequency (hz)][log]", 1760, 20, 22000, 1.01),vslider("bandwidth3 [name:Q][tooltip:bandwidth (hz)][log]", 880, 5, 20000, 1.01))
: fi.peak_eq(vslider("level4 [name:High][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak4 [tooltip:frequency (hz)][log]", 3520, 20, 22000, 1.01),vslider("bandwidth4 [name:Q][tooltip:bandwidth (hz)][log]", 1760, 5, 20000, 1.01))
;
|
319f2e7393d5228a76db344191b308fa05be2d903e1beb287eb3752e2fcb1848 | brummer10/guitarix | freeverb.dsp | declare name "Freeverb";
declare category "Reverb";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
/*-----------------------------------------------
freeverb by "Grame"
-----------------------------------------------*/
// Filter Parameters
combtuningL1 = 1116;
combtuningL2 = 1188;
combtuningL3 = 1277;
combtuningL4 = 1356;
combtuningL5 = 1422;
combtuningL6 = 1491;
combtuningL7 = 1557;
combtuningL8 = 1617;
allpasstuningL1 = 556;
allpasstuningL2 = 441;
allpasstuningL3 = 341;
allpasstuningL4 = 225;
roomsizeSlider = vslider("RoomSize[name:Room Size]", 0.5, 0, 1, 0.025)*0.28 + 0.7;
dampslider = vslider("damp[name:HF Damp]",0.5, 0, 1, 0.025);
combfeed = roomsizeSlider;
//wetslider = 0.5 + vslider("wet_dry[name:Wet/Dry]", 0, -0.5, 0.5, 0.1);
wet_dry = vslider("wet_dry[name:Wet/Dry]", 50, 0, 100, 1) : /(100);
dry = 1 - wet_dry;
// Reverb components
monoReverb(fb1, fb2, damp, spread)
= _ <: comb(combtuningL1+spread, fb1, damp),
comb(combtuningL2+spread, fb1, damp),
comb(combtuningL3+spread, fb1, damp),
comb(combtuningL4+spread, fb1, damp),
comb(combtuningL5+spread, fb1, damp),
comb(combtuningL6+spread, fb1, damp),
comb(combtuningL7+spread, fb1, damp),
comb(combtuningL8+spread, fb1, damp)
+>
allpass (allpasstuningL1+spread, fb2)
: allpass (allpasstuningL2+spread, fb2)
: allpass (allpasstuningL3+spread, fb2)
: allpass (allpasstuningL4+spread, fb2)
;
//----------------------------------------------------------------
fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _;
process = _<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))):>_;
| https://raw.githubusercontent.com/brummer10/guitarix/5672b8cb8f1c324ea28b1fddc7e1b39f79aabbc6/trunk/src/faust/freeverb.dsp | faust | -----------------------------------------------
freeverb by "Grame"
-----------------------------------------------
Filter Parameters
wetslider = 0.5 + vslider("wet_dry[name:Wet/Dry]", 0, -0.5, 0.5, 0.1);
Reverb components
---------------------------------------------------------------- | declare name "Freeverb";
declare category "Reverb";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
combtuningL1 = 1116;
combtuningL2 = 1188;
combtuningL3 = 1277;
combtuningL4 = 1356;
combtuningL5 = 1422;
combtuningL6 = 1491;
combtuningL7 = 1557;
combtuningL8 = 1617;
allpasstuningL1 = 556;
allpasstuningL2 = 441;
allpasstuningL3 = 341;
allpasstuningL4 = 225;
roomsizeSlider = vslider("RoomSize[name:Room Size]", 0.5, 0, 1, 0.025)*0.28 + 0.7;
dampslider = vslider("damp[name:HF Damp]",0.5, 0, 1, 0.025);
combfeed = roomsizeSlider;
wet_dry = vslider("wet_dry[name:Wet/Dry]", 50, 0, 100, 1) : /(100);
dry = 1 - wet_dry;
monoReverb(fb1, fb2, damp, spread)
= _ <: comb(combtuningL1+spread, fb1, damp),
comb(combtuningL2+spread, fb1, damp),
comb(combtuningL3+spread, fb1, damp),
comb(combtuningL4+spread, fb1, damp),
comb(combtuningL5+spread, fb1, damp),
comb(combtuningL6+spread, fb1, damp),
comb(combtuningL7+spread, fb1, damp),
comb(combtuningL8+spread, fb1, damp)
+>
allpass (allpasstuningL1+spread, fb2)
: allpass (allpasstuningL2+spread, fb2)
: allpass (allpasstuningL3+spread, fb2)
: allpass (allpasstuningL4+spread, fb2)
;
fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _;
process = _<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))):>_;
|
afb2430505f5b0afbf9f6ece7c9a2dfc8a2d56d921b00e012209fee10f709b6d | HexHive/datAFLow | grain3.dsp | declare compilation_options "-single -scal -e grain3.dsp -o grain3.dsp";
declare library_path "/Documents/faust-github-faust2/tests/impulse-tests/dsp/grain3.dsp";
declare library_path "/usr/local/share/faust/stdfaust.lib";
declare library_path "/usr/local/share/faust/delays.lib";
declare library_path "/usr/local/share/faust/noises.lib";
declare library_path "/usr/local/share/faust/maths.lib";
declare library_path "/usr/local/share/faust/platform.lib";
declare library_path "/usr/local/share/faust/basics.lib";
declare library_path "/usr/local/share/faust/oscillators.lib";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.1";
declare delays_lib_name "Faust Delay Library";
declare delays_lib_version "0.1";
declare filename "grain3.dsp";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.3";
declare name "grain3";
declare noises_lib_name "Faust Noise Generator Library";
declare noises_lib_version "0.0";
declare oscillators_lib_name "Faust Oscillator Library";
declare oscillators_lib_version "0.1";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.1";
process = _ : \(x7).(((x7,(524289,(0,((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : * : _,hslider("delaymax", 1000.0f, 10.0f, 10000.0f, 1.0f) : * : _,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : * : _,1000 : / : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x10).(x10,(x10 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x10).(x10,(x10 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_ : int) : max) : min) : @),(1,(((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : * : _,hslider("delaymax", 1000.0f, 10.0f, 10000.0f, 1.0f) : * : _,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : * : _,1000 : / : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_),((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : * : _,hslider("delaymax", 1000.0f, 10.0f, 10000.0f, 1.0f) : * : _,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : * : _,1000 : / : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_ : floor) : -) : -) : *),((x7,(524289,(0,(((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : * : _,hslider("delaymax", 1000.0f, 10.0f, 10000.0f, 1.0f) : * : _,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : * : _,1000 : / : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x10).(x10,(x10 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x10).(x10,(x10 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_ : int),1 : +) : max) : min) : @),(((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : * : _,hslider("delaymax", 1000.0f, 10.0f, 10000.0f, 1.0f) : * : _,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : * : _,1000 : / : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_),((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : * : _,hslider("delaymax", 1000.0f, 10.0f, 10000.0f, 1.0f) : * : _,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : * : _,1000 : / : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_ : floor) : -) : *) : +) : (_,(((65536,((((_,1 : +)~_,1 : - : float),6.2831853071795862f : *),(65536 : float) : / : sin),(0,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x5).(x5,(x5 : floor) : -))~_ : _,(65536 : float) : * : int) : rdtable),((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x6).(x6,(x6 : floor) : -))~_ : _,1.0f : * : _,0.5f : * : _,2 : * : _,3.1415926535897931f : * : cos) : *),((65536,((((_,1 : +)~_,1 : - : float),6.2831853071795862f : *),(65536 : float) : / : cos),(0,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x5).(x5,(x5 : floor) : -))~_ : _,(65536 : float) : * : int) : rdtable),((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x6).(x6,(x6 : floor) : -))~_ : _,1.0f : * : _,0.5f : * : _,2 : * : _,3.1415926535897931f : * : sin) : *) : +) : *),(((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : *),hslider("rarefaction", 0.20000000000000001f, 0.0f, 1.0f, 0.01f) : > : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x2).(x2,(x2 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x2).(x2,(x2 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_) : *;
| https://raw.githubusercontent.com/HexHive/datAFLow/b9f3cbc42b1970f8655817c9fb67b1eaba3ae4c0/evaluation/ddfuzz/seeds/faust/grain3.dsp | faust | declare compilation_options "-single -scal -e grain3.dsp -o grain3.dsp";
declare library_path "/Documents/faust-github-faust2/tests/impulse-tests/dsp/grain3.dsp";
declare library_path "/usr/local/share/faust/stdfaust.lib";
declare library_path "/usr/local/share/faust/delays.lib";
declare library_path "/usr/local/share/faust/noises.lib";
declare library_path "/usr/local/share/faust/maths.lib";
declare library_path "/usr/local/share/faust/platform.lib";
declare library_path "/usr/local/share/faust/basics.lib";
declare library_path "/usr/local/share/faust/oscillators.lib";
declare basics_lib_name "Faust Basic Element Library";
declare basics_lib_version "0.1";
declare delays_lib_name "Faust Delay Library";
declare delays_lib_version "0.1";
declare filename "grain3.dsp";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.3";
declare name "grain3";
declare noises_lib_name "Faust Noise Generator Library";
declare noises_lib_version "0.0";
declare oscillators_lib_name "Faust Oscillator Library";
declare oscillators_lib_version "0.1";
declare platform_lib_name "Generic Platform Library";
declare platform_lib_version "0.1";
process = _ : \(x7).(((x7,(524289,(0,((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : * : _,hslider("delaymax", 1000.0f, 10.0f, 10000.0f, 1.0f) : * : _,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : * : _,1000 : / : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x10).(x10,(x10 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x10).(x10,(x10 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_ : int) : max) : min) : @),(1,(((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : * : _,hslider("delaymax", 1000.0f, 10.0f, 10000.0f, 1.0f) : * : _,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : * : _,1000 : / : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_),((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : * : _,hslider("delaymax", 1000.0f, 10.0f, 10000.0f, 1.0f) : * : _,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : * : _,1000 : / : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_ : floor) : -) : -) : *),((x7,(524289,(0,(((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : * : _,hslider("delaymax", 1000.0f, 10.0f, 10000.0f, 1.0f) : * : _,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : * : _,1000 : / : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x10).(x10,(x10 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x10).(x10,(x10 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_ : int),1 : +) : max) : min) : @),(((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : * : _,hslider("delaymax", 1000.0f, 10.0f, 10000.0f, 1.0f) : * : _,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : * : _,1000 : / : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_),((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : * : _,hslider("delaymax", 1000.0f, 10.0f, 10000.0f, 1.0f) : * : _,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : * : _,1000 : / : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x12).(x12,(x12 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_ : floor) : -) : *) : +) : (_,(((65536,((((_,1 : +)~_,1 : - : float),6.2831853071795862f : *),(65536 : float) : / : sin),(0,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x5).(x5,(x5 : floor) : -))~_ : _,(65536 : float) : * : int) : rdtable),((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x6).(x6,(x6 : floor) : -))~_ : _,1.0f : * : _,0.5f : * : _,2 : * : _,3.1415926535897931f : * : cos) : *),((65536,((((_,1 : +)~_,1 : - : float),6.2831853071795862f : *),(65536 : float) : / : cos),(0,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x5).(x5,(x5 : floor) : -))~_ : _,(65536 : float) : * : int) : rdtable),((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x6).(x6,(x6 : floor) : -))~_ : _,1.0f : * : _,0.5f : * : _,2 : * : _,3.1415926535897931f : * : sin) : *) : +) : *),(((_,12345 : +)~((_,1103515245 : *),-1 : &),2147483647.0f : / : _,1 : + : _,0.5f : *),hslider("rarefaction", 0.20000000000000001f, 0.0f, 1.0f, 0.01f) : > : (((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x2).(x2,(x2 : floor) : -))~_ : _,1.0f : *),0.0001f : >),((((1000,hslider("grainsize [unit:msec]", 100.0f, 1.0f, 1000.0f, 1.0f) : /),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min : float) : / : (+ : \(x2).(x2,(x2 : floor) : -))~_ : _,1.0f : *),1 : @),0.0001f : <=) : *),_,_ : select2)~_) : *;
|
|
e945450491889bc87abdc3ef4fbafc35294a9e0744b276bf0d326d44e04f9788 | maximalexanian/guitarix-vst | gx_distortion.dsp | declare id "gx_distortion";
declare name "Multi Band Distortion";
declare shortname "Distortion";
declare category "Distortion";
declare groups "resonator[Distortion resonator]";
declare gladefile "gx_distortion_ui.glade";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
F = nentry("split_low_freq[name:Split Lo]", 250, 20, 600, 10);
F1 = nentry("split_middle_freq[name:Split Mid]", 650, 600, 1250, 10);
F2 = nentry("split_high_freq[name:Split Hi]", 1250, 1250, 12000, 10);
/**********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
***********************************************************************/
//------------------------------ ba.count and ba.take --------------------------------------
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
//------------------------------ low/high-passfilters --------------------------------------
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
c = 1/tan((w1)*0.5/ma.SR); // bilinear-transform scale-factor
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
S = (O-parity)/2; // current section number
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
//------------------------------ an.analyzer --------------------------------------
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
/**********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completly to > 0.9.27
***********************************************************************/
//----------distortion---------
//-distortion
drivelevel = vslider("level[name:Level]", 0.0, 0, 0.5, 0.01);
drivegain1 = vslider("gain[name:Gain]", 2, -10, 10, 0.1)-10 : ba.db2linear : smoothi(0.999);
low_gain = vslider("low_gain[name:Lo]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
high_gain = vslider("high_gain[name:Hi]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_l = vslider("middle_l_gain[name:LoMid]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_h = vslider("middle_h_gain[name:HiMid]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
drive = vslider("drive[name:Drive]", 0.64, 0, 1, 0.01);
drive1 = vslider("low_drive[name:Lo]", 1, 0, 1, 0.01)*drive;
drive2 = vslider("high_drive[name:Hi]", 1, 0, 1, 0.01)*drive;
drive3 = vslider("middle_l_drive[name:LoMid]", 1, 0, 1, 0.01)*drive;
drive4 = vslider("middle_h_drive[name:HiMid]", 1, 0, 1, 0.01)*drive;
distortion1 = _:ef.cubicnl(drive1,drivelevel): *(low_gain);
distortion2 = _:ef.cubicnl(drive2,drivelevel) : *(high_gain);
distortion3 = _:ef.cubicnl(drive3,drivelevel) : *(middle_gain_l);
distortion4 = _:ef.cubicnl(drive4,drivelevel) : *(middle_gain_h);
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
//-resonator
resonator = (+ <: (de.delay(4096, d-1) + de.delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato[name:Vibrato]", 1, 0, 1, 0.01);
a = vslider("trigger[name:Trigger]", 0.12, 0, 1, 0.01);
};
switch2 = checkbox("resonator.on_off[name:resonat]");
//reso = hgroup("resonator", bypass(switch2, resonator));
moving_filter(x) = (x+x'+x'')/3;
wet = vslider("wet_dry[name:Wet/Dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
process_dist = bypass(switch2, resonator) : +(anti_denormal_ac) : distortion : *(drivegain1) ;
process = _<:*(dry),(*(wet): process_dist):>_;
| https://raw.githubusercontent.com/maximalexanian/guitarix-vst/83fd0cbec9588fb2ef47d80f7c6cb0775bfb9f89/guitarix/src/faust/gx_distortion.dsp | faust | *********************************************************************
*** this part is included here for backward compatibility from 0.9.27 to
*** 0.9.24
**********************************************************************
------------------------------ ba.count and ba.take --------------------------------------
------------------------------ low/high-passfilters --------------------------------------
bilinear-transform scale-factor
bilinear-transform scale-factor
current section number
------------------------------ an.analyzer --------------------------------------
*********************************************************************
*** end for backward compatibility from 0.9.27 to
*** 0.9.24 , it could removed when switch completly to > 0.9.27
**********************************************************************
----------distortion---------
-distortion
-resonator
reso = hgroup("resonator", bypass(switch2, resonator)); | declare id "gx_distortion";
declare name "Multi Band Distortion";
declare shortname "Distortion";
declare category "Distortion";
declare groups "resonator[Distortion resonator]";
declare gladefile "gx_distortion_ui.glade";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("stdfaust.lib");
import("guitarix.lib");
F = nentry("split_low_freq[name:Split Lo]", 250, 20, 600, 10);
F1 = nentry("split_middle_freq[name:Split Mid]", 650, 600, 1250, 10);
F2 = nentry("split_high_freq[name:Split Hi]", 1250, 1250, 12000, 10);
countN ((xs, xxs)) = 1 + countN(xxs);
countN (xx) = 1;
takeN (1, (xs, xxs)) = xs;
takeN (1, xs) = xs;
takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
with {
conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
conv2(k0,k1,x) = k0*x + k1*x';
sub(x,y) = y-x;
};
tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
with {
d = a0 + c;
b1d = (b0 - b1*c) / d;
b0d = (b0 + b1*c) / d;
a1d = (a0 - c) / d;
};
tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
with {
csq = c*c;
d = a0 + a1 * c + csq;
b0d = (b0 + b1 * c + b2 * csq)/d;
b1d = 2 * (b0 - b2 * csq)/d;
b2d = (b0 - b1 * c + b2 * csq)/d;
a1d = 2 * (a0 - csq)/d;
a2d = (a0 - a1*c + csq)/d;
};
lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
with {
lphpr(s,0,N,fc) = _;
lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*ma.PI*fc);
lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
parity = N % 2;
a1s = -2*cos(-ma.PI + (1-parity)*ma.PI/(2*N) + (S-1+parity)*ma.PI/N);
w1 = 2*ma.PI*fc;
};
};
analyzern(O,lfreqs) = _ <: bsplit(nb) with
{
nb = countN(lfreqs);
fc(n) = takeN(n, lfreqs);
lp(n) = lowpassN(O,fc(n));
hp(n) = highpassN(O,fc(n));
bsplit(0) = _;
bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
};
analyzerN(lfreqs) = analyzern(3,lfreqs);
filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
{
nb = ba.count(lfreqs);
fc(n) = ba.take(n, lfreqs);
ap(n) = fi.highpass_plus_lowpass(O,fc(n));
delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
apchain(0) = _;
apchain(i) = ap(i) : apchain(i-1);
};
filterbankN(lfreqs) = fi.filterbank(3,lfreqs);
drivelevel = vslider("level[name:Level]", 0.0, 0, 0.5, 0.01);
drivegain1 = vslider("gain[name:Gain]", 2, -10, 10, 0.1)-10 : ba.db2linear : smoothi(0.999);
low_gain = vslider("low_gain[name:Lo]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
high_gain = vslider("high_gain[name:Hi]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_l = vslider("middle_l_gain[name:LoMid]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
middle_gain_h = vslider("middle_h_gain[name:HiMid]", 10, -10, 20, 0.1)-10 : ba.db2linear : smoothi(0.999);
drive = vslider("drive[name:Drive]", 0.64, 0, 1, 0.01);
drive1 = vslider("low_drive[name:Lo]", 1, 0, 1, 0.01)*drive;
drive2 = vslider("high_drive[name:Hi]", 1, 0, 1, 0.01)*drive;
drive3 = vslider("middle_l_drive[name:LoMid]", 1, 0, 1, 0.01)*drive;
drive4 = vslider("middle_h_drive[name:HiMid]", 1, 0, 1, 0.01)*drive;
distortion1 = _:ef.cubicnl(drive1,drivelevel): *(low_gain);
distortion2 = _:ef.cubicnl(drive2,drivelevel) : *(high_gain);
distortion3 = _:ef.cubicnl(drive3,drivelevel) : *(middle_gain_l);
distortion4 = _:ef.cubicnl(drive4,drivelevel) : *(middle_gain_h);
distortion = fi.lowpass(2,15000.0): fi.highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>fi.lowpass(1,6531.0);
resonator = (+ <: (de.delay(4096, d-1) + de.delay(4096, d)) / 2) ~ *(1.0-a)
with {
d = vslider("vibrato[name:Vibrato]", 1, 0, 1, 0.01);
a = vslider("trigger[name:Trigger]", 0.12, 0, 1, 0.01);
};
switch2 = checkbox("resonator.on_off[name:resonat]");
moving_filter(x) = (x+x'+x'')/3;
wet = vslider("wet_dry[name:Wet/Dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
dry = 1 - wet;
process_dist = bypass(switch2, resonator) : +(anti_denormal_ac) : distortion : *(drivegain1) ;
process = _<:*(dry),(*(wet): process_dist):>_;
|
c2dd97ec23192dd03b934e9d2a02629fa9ca57bf3b52e7fd302a6af73d4d9c1e | ntonnaett/guitarix | chorus.dsp | declare name "Chorus";
declare category "Modulation";
/* Stereo chorus. */
// declare name "chorus -- stereo chorus effect";
declare author "Albert Graef";
declare version "1.0";
import("music.lib");
import("filter.lib");
level = hslider("level[name:Level]", 0.5, 0, 1, 0.01);
freq = hslider("freq[name:Freq]", 3, 0, 10, 0.01);
dtime = hslider("delay[name:Delay]", 0.02, 0, 0.2, 0.01): smooth(0.999);
depth = hslider("depth[name:Depth]", 0.02, 0, 1, 0.01);
tblosc(n,f,freq,mod) = (1-d)*rdtable(n,wform,i&(n-1)) +
d*rdtable(n,wform,(i+1)&(n-1))
with {
wform = time*(2.0*PI)/n : f;
phase = freq/SR : (+ : decimal) ~ _;
modphase = decimal(phase+mod/(2*PI))*n;
i = int(floor(modphase));
d = decimal(modphase);
};
chorus(dtime,freq,depth,phase,x)
= x+level*fdelay(1<<16, t, x)
with {
t = SR*dtime/2*(1+depth*tblosc(1<<16, sin, freq, phase));
};
process = vgroup("chorus", (left, right))
with {
left = chorus(dtime,freq,depth,0);
right = chorus(dtime,freq,depth,PI/2);
};
| https://raw.githubusercontent.com/ntonnaett/guitarix/e5ce36c3a693eeada3cb70425ec09f8d6f91e78c/trunk/src/faust/chorus.dsp | faust | Stereo chorus.
declare name "chorus -- stereo chorus effect"; | declare name "Chorus";
declare category "Modulation";
declare author "Albert Graef";
declare version "1.0";
import("music.lib");
import("filter.lib");
level = hslider("level[name:Level]", 0.5, 0, 1, 0.01);
freq = hslider("freq[name:Freq]", 3, 0, 10, 0.01);
dtime = hslider("delay[name:Delay]", 0.02, 0, 0.2, 0.01): smooth(0.999);
depth = hslider("depth[name:Depth]", 0.02, 0, 1, 0.01);
tblosc(n,f,freq,mod) = (1-d)*rdtable(n,wform,i&(n-1)) +
d*rdtable(n,wform,(i+1)&(n-1))
with {
wform = time*(2.0*PI)/n : f;
phase = freq/SR : (+ : decimal) ~ _;
modphase = decimal(phase+mod/(2*PI))*n;
i = int(floor(modphase));
d = decimal(modphase);
};
chorus(dtime,freq,depth,phase,x)
= x+level*fdelay(1<<16, t, x)
with {
t = SR*dtime/2*(1+depth*tblosc(1<<16, sin, freq, phase));
};
process = vgroup("chorus", (left, right))
with {
left = chorus(dtime,freq,depth,0);
right = chorus(dtime,freq,depth,PI/2);
};
|
b13a8e4ea45d42aaaff9a33314a5ea4bd6b50d7bd294afa55960ebe37590926c | ntonnaett/guitarix | gx_ampmodul.dsp | declare id "ampmodul";
declare name "Postamp";
declare category "Distortion";
declare groups "amp2.stage1[Postamp Tube1], amp2.stage2[Postamp Tube2]";
declare samplerate "96000";
import("guitarix.lib");
feedback = hslider("feedback[name:Wet/FB]", 0, -1, 1, 0.01);
fbackw = (- : neg ) ~ (feedback * _'''');
feedbac = hslider("feedbac[name:Dry/FB]", 0, -1, 1, 0.01);
fback = (- : neg ) ~ (feedbac * _'''');
preamp = (vslider(".ampmodul.amp2.stage1.tube1[name:Tube I]",6,-20,20,0.1):db2linear : smoothi(0.999));
gain1 = vslider(".ampmodul.amp2.stage2.tube2[name:Tube II]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
gain = vslider("level[name:Level]", -20, -40, 4, 0.1) : db2linear : smoothi(0.999);
wet_dry = vslider("wet_dry[name:Dry/Wet]", 0, -1, 1, 0.1);
balanc(b) = *(1 - max(0, b)), *(1 - max(0, -b));
wet_dry_mx(w, Fx) = _ <: (_:fback), Fx : balanc(w) : +;
process = wet_dry_mx(wet_dry, _:(*(gain) : component("gxamp2.dsp").tubec(preamp,gain1):fbackw)), wet_dry_mx(wet_dry, _:(*(gain) : component("gxamp2.dsp").tubec(preamp,gain1):fbackw));
| https://raw.githubusercontent.com/ntonnaett/guitarix/e5ce36c3a693eeada3cb70425ec09f8d6f91e78c/trunk/src/faust/gx_ampmodul.dsp | faust | declare id "ampmodul";
declare name "Postamp";
declare category "Distortion";
declare groups "amp2.stage1[Postamp Tube1], amp2.stage2[Postamp Tube2]";
declare samplerate "96000";
import("guitarix.lib");
feedback = hslider("feedback[name:Wet/FB]", 0, -1, 1, 0.01);
fbackw = (- : neg ) ~ (feedback * _'''');
feedbac = hslider("feedbac[name:Dry/FB]", 0, -1, 1, 0.01);
fback = (- : neg ) ~ (feedbac * _'''');
preamp = (vslider(".ampmodul.amp2.stage1.tube1[name:Tube I]",6,-20,20,0.1):db2linear : smoothi(0.999));
gain1 = vslider(".ampmodul.amp2.stage2.tube2[name:Tube II]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
gain = vslider("level[name:Level]", -20, -40, 4, 0.1) : db2linear : smoothi(0.999);
wet_dry = vslider("wet_dry[name:Dry/Wet]", 0, -1, 1, 0.1);
balanc(b) = *(1 - max(0, b)), *(1 - max(0, -b));
wet_dry_mx(w, Fx) = _ <: (_:fback), Fx : balanc(w) : +;
process = wet_dry_mx(wet_dry, _:(*(gain) : component("gxamp2.dsp").tubec(preamp,gain1):fbackw)), wet_dry_mx(wet_dry, _:(*(gain) : component("gxamp2.dsp").tubec(preamp,gain1):fbackw));
|
|
0926ee6efbc3fc0077edd08fe6b3d8f7d2e5593aaefff8c3981c787c3eaf6e19 | guysherman/Faust | noisemetadata.dsp | <mdoc>
\title{<metadata>name</metadata>}
\author{<metadata>author</metadata>}
\date{\today}
\maketitle
\begin{tabular}{ll}
\hline
\textbf{name} & <metadata>name</metadata> \\
\textbf{version} & <metadata>version</metadata> \\
\textbf{author} & <metadata>author</metadata> \\
\textbf{license} & <metadata>license</metadata> \\
\textbf{copyright} & <metadata>copyright</metadata> \\
\hline
\end{tabular}
\bigskip
</mdoc>
//-----------------------------------------------------------------
// Noise generator and demo file for the Faust math documentation
//-----------------------------------------------------------------
declare name "NoiseMD"; // avoid same name as in noise.dsp
declare version "1.1";
declare author "Grame";
declare author "Yghe";
declare license "BSD";
declare copyright "(c)GRAME 2009";
<mdoc>
\section{Presentation of the "noise.dsp" Faust program}
This program describes a white noise generator with an interactive volume, using a random function.
\subsection{The random function}
</mdoc>
random = +(12345)~*(1103515245);
<mdoc>
The \texttt{random} function describes a generator of random numbers, which equation follows. You should notice hereby the use of an integer arithmetic on 32 bits, relying on integer wrapping for big numbers.
<equation>random</equation>
\subsection{The noise function}
</mdoc>
noise = random/2147483647.0;
<mdoc>
The white noise then corresponds to:
<equation>noise</equation>
\subsection{Just add a user interface element to play volume!}
</mdoc>
process = noise * vslider("Volume[style:knob]", 0, 0, 1, 0.1);
<mdoc>
Endly, the sound level of this program is controlled by a user slider, which gives the following equation:
<equation>process</equation>
\section{Block-diagram schema of process}
This process is illustrated on figure 1.
<diagram>process</diagram>
\section{Notice of this documentation}
You might be careful of certain information and naming conventions used in this documentation:
<notice />
\section{Listing of the input code}
The following listing shows the input Faust code, parsed to compile this mathematical documentation.
<listing mdoctags="false" dependencies="false" distributed="false" />
</mdoc>
| https://raw.githubusercontent.com/guysherman/Faust/4cac36e7fc493158e92946b3a840c4f611ac2844/examples/noisemetadata.dsp | faust | -----------------------------------------------------------------
Noise generator and demo file for the Faust math documentation
-----------------------------------------------------------------
avoid same name as in noise.dsp | <mdoc>
\title{<metadata>name</metadata>}
\author{<metadata>author</metadata>}
\date{\today}
\maketitle
\begin{tabular}{ll}
\hline
\textbf{name} & <metadata>name</metadata> \\
\textbf{version} & <metadata>version</metadata> \\
\textbf{author} & <metadata>author</metadata> \\
\textbf{license} & <metadata>license</metadata> \\
\textbf{copyright} & <metadata>copyright</metadata> \\
\hline
\end{tabular}
\bigskip
</mdoc>
declare version "1.1";
declare author "Grame";
declare author "Yghe";
declare license "BSD";
declare copyright "(c)GRAME 2009";
<mdoc>
\section{Presentation of the "noise.dsp" Faust program}
This program describes a white noise generator with an interactive volume, using a random function.
\subsection{The random function}
</mdoc>
random = +(12345)~*(1103515245);
<mdoc>
The \texttt{random} function describes a generator of random numbers, which equation follows. You should notice hereby the use of an integer arithmetic on 32 bits, relying on integer wrapping for big numbers.
<equation>random</equation>
\subsection{The noise function}
</mdoc>
noise = random/2147483647.0;
<mdoc>
The white noise then corresponds to:
<equation>noise</equation>
\subsection{Just add a user interface element to play volume!}
</mdoc>
process = noise * vslider("Volume[style:knob]", 0, 0, 1, 0.1);
<mdoc>
Endly, the sound level of this program is controlled by a user slider, which gives the following equation:
<equation>process</equation>
\section{Block-diagram schema of process}
This process is illustrated on figure 1.
<diagram>process</diagram>
\section{Notice of this documentation}
You might be careful of certain information and naming conventions used in this documentation:
<notice />
\section{Listing of the input code}
The following listing shows the input Faust code, parsed to compile this mathematical documentation.
<listing mdoctags="false" dependencies="false" distributed="false" />
</mdoc>
|
fb607308d6fb6527a1f191cc5e93f5c763bc2f5635196e8e647df4bbb68381fd | SMERM/BN-Tedesco | pitchtracker.dsp | declare filename "pitchtracker.dsp"; declare name "pitchtracker"; declare compilation_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path "FaustDSP";
declare library_path "/libraries/stdfaust.lib";
declare library_path "/libraries/filters.lib";
declare library_path "/libraries/maths.lib";
declare filename "FaustDSP";
declare filters_lib_dcblocker_author "Julius O. Smith III";
declare filters_lib_dcblocker_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_dcblocker_license "MIT-style STK-4.3 license";
declare filters_lib_lowpass0_highpass1 "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_lowpass0_highpass1_author "Julius O. Smith III";
declare filters_lib_lowpass_author "Julius O. Smith III";
declare filters_lib_lowpass_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_lowpass_license "MIT-style STK-4.3 license";
declare filters_lib_name "Faust Filters Library";
declare filters_lib_pole_author "Julius O. Smith III";
declare filters_lib_pole_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_pole_license "MIT-style STK-4.3 license";
declare filters_lib_tf1_author "Julius O. Smith III";
declare filters_lib_tf1_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_tf1_license "MIT-style STK-4.3 license";
declare filters_lib_tf1s_author "Julius O. Smith III";
declare filters_lib_tf1s_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_tf1s_license "MIT-style STK-4.3 license";
declare filters_lib_zero_author "Julius O. Smith III";
declare filters_lib_zero_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_zero_license "MIT-style STK-4.3 license";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.1";
declare name "FaustDSP";
process = \(x1).(\(x2).(x1 : _<:_,mem : _,(_,1 : *) : - : +~(_,0.995f : *) : (\(x3).(_<:(_,((1,(0,(1,(((6.2831853071795862f,x3 : *),0.5f : *),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : / : tan) : /) : *) : +),(1,(1,(((6.2831853071795862f,x3 : *),0.5f : *),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : / : tan) : /) : +) : /) : *),(mem : _,((1,(0,(1,(((6.2831853071795862f,x3 : *),0.5f : *),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : / : tan) : /) : *) : -),(1,(1,(((6.2831853071795862f,x3 : *),0.5f : *),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : / : tan) : /) : +) : /) : *):>+~(_,(0,((1,(1,(((6.2831853071795862f,x3 : *),0.5f : *),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : / : tan) : /) : -),(1,(1,(((6.2831853071795862f,x3 : *),0.5f : *),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : / : tan) : /) : +) : /) : -) : *)) : \(x4).(((x2,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : *),(((_,(1,((_,1 : + : _,(1,((((x4 : mem),0 : <),(x4,0 : >=) : &),((_,(((x4 : mem),0 : <),(x4,0 : >=) : &) : +)~(_,(x2 : int) : %),x2 : ==) : &) : -) : *)~_,0 : ==) : -) : *),((((_,1 : + : _,(1,((((x4 : mem),0 : <),(x4,0 : >=) : &),((_,(((x4 : mem),0 : <),(x4,0 : >=) : &) : +)~(_,(x2 : int) : %),x2 : ==) : &) : -) : *)~_ : mem),1 : +),((_,1 : + : _,(1,((((x4 : mem),0 : <),(x4,0 : >=) : &),((_,(((x4 : mem),0 : <),(x4,0 : >=) : &) : +)~(_,(x2 : int) : %),x2 : ==) : &) : -) : *)~_,0 : ==) : *) : +)~_,1 : max) : /),((x2,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : *),(((_,(1,((_,1 : + : _,(1,((((x4 : mem),0 : <),(x4,0 : >=) : &),((_,(((x4 : mem),0 : <),(x4,0 : >=) : &) : +)~(_,(x2 : int) : %),x2 : ==) : &) : -) : *)~_,0 : ==) : -) : *),((((_,1 : + : _,(1,((((x4 : mem),0 : <),(x4,0 : >=) : &),((_,(((x4 : mem),0 : <),(x4,0 : >=) : &) : +)~(_,(x2 : int) : %),x2 : ==) : &) : -) : *)~_ : mem),1 : +),((_,1 : + : _,(1,((((x4 : mem),0 : <),(x4,0 : >=) : &),((_,(((x4 : mem),0 : <),(x4,0 : >=) : &) : +)~(_,(x2 : int) : %),x2 : ==) : &) : -) : *)~_,0 : ==) : *) : +)~_,0 : ==) : *) : -))~(100,_ : max)));
| https://raw.githubusercontent.com/SMERM/BN-Tedesco/2a77e1707f7e64c512dd40d58d29c0db8092463d/COME-01/20200610/biquad_oscillante/pitchtracker.dsp | faust | declare filename "pitchtracker.dsp"; declare name "pitchtracker"; declare compilation_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path "FaustDSP";
declare library_path "/libraries/stdfaust.lib";
declare library_path "/libraries/filters.lib";
declare library_path "/libraries/maths.lib";
declare filename "FaustDSP";
declare filters_lib_dcblocker_author "Julius O. Smith III";
declare filters_lib_dcblocker_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_dcblocker_license "MIT-style STK-4.3 license";
declare filters_lib_lowpass0_highpass1 "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_lowpass0_highpass1_author "Julius O. Smith III";
declare filters_lib_lowpass_author "Julius O. Smith III";
declare filters_lib_lowpass_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_lowpass_license "MIT-style STK-4.3 license";
declare filters_lib_name "Faust Filters Library";
declare filters_lib_pole_author "Julius O. Smith III";
declare filters_lib_pole_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_pole_license "MIT-style STK-4.3 license";
declare filters_lib_tf1_author "Julius O. Smith III";
declare filters_lib_tf1_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_tf1_license "MIT-style STK-4.3 license";
declare filters_lib_tf1s_author "Julius O. Smith III";
declare filters_lib_tf1s_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_tf1s_license "MIT-style STK-4.3 license";
declare filters_lib_zero_author "Julius O. Smith III";
declare filters_lib_zero_copyright "Copyright (C) 2003-2019 by Julius O. Smith III <[email protected]>";
declare filters_lib_zero_license "MIT-style STK-4.3 license";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.1";
declare name "FaustDSP";
process = \(x1).(\(x2).(x1 : _<:_,mem : _,(_,1 : *) : - : +~(_,0.995f : *) : (\(x3).(_<:(_,((1,(0,(1,(((6.2831853071795862f,x3 : *),0.5f : *),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : / : tan) : /) : *) : +),(1,(1,(((6.2831853071795862f,x3 : *),0.5f : *),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : / : tan) : /) : +) : /) : *),(mem : _,((1,(0,(1,(((6.2831853071795862f,x3 : *),0.5f : *),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : / : tan) : /) : *) : -),(1,(1,(((6.2831853071795862f,x3 : *),0.5f : *),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : / : tan) : /) : +) : /) : *):>+~(_,(0,((1,(1,(((6.2831853071795862f,x3 : *),0.5f : *),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : / : tan) : /) : -),(1,(1,(((6.2831853071795862f,x3 : *),0.5f : *),(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : / : tan) : /) : +) : /) : -) : *)) : \(x4).(((x2,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : *),(((_,(1,((_,1 : + : _,(1,((((x4 : mem),0 : <),(x4,0 : >=) : &),((_,(((x4 : mem),0 : <),(x4,0 : >=) : &) : +)~(_,(x2 : int) : %),x2 : ==) : &) : -) : *)~_,0 : ==) : -) : *),((((_,1 : + : _,(1,((((x4 : mem),0 : <),(x4,0 : >=) : &),((_,(((x4 : mem),0 : <),(x4,0 : >=) : &) : +)~(_,(x2 : int) : %),x2 : ==) : &) : -) : *)~_ : mem),1 : +),((_,1 : + : _,(1,((((x4 : mem),0 : <),(x4,0 : >=) : &),((_,(((x4 : mem),0 : <),(x4,0 : >=) : &) : +)~(_,(x2 : int) : %),x2 : ==) : &) : -) : *)~_,0 : ==) : *) : +)~_,1 : max) : /),((x2,(192000.0f,(1.0f,fconstant(int fSamplingFreq, <math.h>) : max) : min) : *),(((_,(1,((_,1 : + : _,(1,((((x4 : mem),0 : <),(x4,0 : >=) : &),((_,(((x4 : mem),0 : <),(x4,0 : >=) : &) : +)~(_,(x2 : int) : %),x2 : ==) : &) : -) : *)~_,0 : ==) : -) : *),((((_,1 : + : _,(1,((((x4 : mem),0 : <),(x4,0 : >=) : &),((_,(((x4 : mem),0 : <),(x4,0 : >=) : &) : +)~(_,(x2 : int) : %),x2 : ==) : &) : -) : *)~_ : mem),1 : +),((_,1 : + : _,(1,((((x4 : mem),0 : <),(x4,0 : >=) : &),((_,(((x4 : mem),0 : <),(x4,0 : >=) : &) : +)~(_,(x2 : int) : %),x2 : ==) : &) : -) : *)~_,0 : ==) : *) : +)~_,0 : ==) : *) : -))~(100,_ : max)));
|
|
792801f18e2c702f99a6efd36f612791a28dda885b5269bd3b7066adaf45b84d | ntonnaett/guitarix | peak_eq.dsp | declare id "eq";
declare name "Peak EQ";
declare category "Tone Control";
declare license "BSD";
declare copyright "(c)GRAME 2006";
import("math.lib");
import("music.lib");
import("guitarix.lib");
//------------------------- Process --------------------------------
// USAGE: _ : peak_eq(Lfx,fx,B) : _;
// where
// Lfx = level (dB) at fx
// fx = peak frequency (Hz)
// B = bandwidth (B) of peak in Hz
process = peak_eq(vslider("level1 [name:Sub][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak1 [tooltip:frequency (hz)]", 110, 20, 22000, 1),vslider("bandwidth1 [name:Q][tooltip:bandwidth (hz)]", 41, 5, 20000, 1))
: peak_eq(vslider("level2 [name:Low][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak2 [tooltip:frequency (hz)]", 440, 20, 22000, 1),vslider("bandwidth2 [name:Q][tooltip:bandwidth (hz)]", 220, 5, 20000, 1))
: peak_eq(vslider("level3 [name:Mid][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak3 [tooltip:frequency (hz)]", 1760, 20, 22000, 1),vslider("bandwidth3 [name:Q][tooltip:bandwidth (hz)]", 880, 5, 20000, 1))
: peak_eq(vslider("level4 [name:High][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak4 [tooltip:frequency (hz)]", 3520, 20, 22000, 1),vslider("bandwidth4 [name:Q][tooltip:bandwidth (hz)]", 1760, 5, 20000, 1))
;
| https://raw.githubusercontent.com/ntonnaett/guitarix/e5ce36c3a693eeada3cb70425ec09f8d6f91e78c/trunk/src/faust/peak_eq.dsp | faust | ------------------------- Process --------------------------------
USAGE: _ : peak_eq(Lfx,fx,B) : _;
where
Lfx = level (dB) at fx
fx = peak frequency (Hz)
B = bandwidth (B) of peak in Hz | declare id "eq";
declare name "Peak EQ";
declare category "Tone Control";
declare license "BSD";
declare copyright "(c)GRAME 2006";
import("math.lib");
import("music.lib");
import("guitarix.lib");
process = peak_eq(vslider("level1 [name:Sub][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak1 [tooltip:frequency (hz)]", 110, 20, 22000, 1),vslider("bandwidth1 [name:Q][tooltip:bandwidth (hz)]", 41, 5, 20000, 1))
: peak_eq(vslider("level2 [name:Low][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak2 [tooltip:frequency (hz)]", 440, 20, 22000, 1),vslider("bandwidth2 [name:Q][tooltip:bandwidth (hz)]", 220, 5, 20000, 1))
: peak_eq(vslider("level3 [name:Mid][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak3 [tooltip:frequency (hz)]", 1760, 20, 22000, 1),vslider("bandwidth3 [name:Q][tooltip:bandwidth (hz)]", 880, 5, 20000, 1))
: peak_eq(vslider("level4 [name:High][tooltip:gain (dB)]", 0, -50, 50, 0.1),vslider("peak4 [tooltip:frequency (hz)]", 3520, 20, 22000, 1),vslider("bandwidth4 [name:Q][tooltip:bandwidth (hz)]", 1760, 5, 20000, 1))
;
|
c09d2b2f35e58dfe7be3bdfd1d6d174d716f4218053492c701a7806721b5f312 | SMERM/BN-Tedesco | biquad_new.dsp | declare filename "biquad_new.dsp"; declare name "biquad_new"; declare compilation_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path "FaustDSP";
declare library_path "/libraries/stdfaust.lib";
declare library_path "/libraries/maths.lib";
declare filename "FaustDSP";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.1";
declare name "FaustDSP";
process = \(x1).(\(x2).(\(x3).(\(x4).(\(x5).(\(x6).(x1 : _<:(_,x2 : *),(_,1 : @ : _,x3 : *),(_,2 : @ : _,x4 : *):>_ : \(x7).(\(x8).(x8,x7 : -))~(_<:(_,x5 : *),(_,1 : @ : _,x6 : *):>_)))))));
| https://raw.githubusercontent.com/SMERM/BN-Tedesco/2a77e1707f7e64c512dd40d58d29c0db8092463d/COME-01/20200624/biquad/biquad_new%7E.mxo/biquad_new.dsp | faust | declare filename "biquad_new.dsp"; declare name "biquad_new"; declare compilation_options "-single -scal -I libraries/ -I project/ -lang wasm";
declare library_path "FaustDSP";
declare library_path "/libraries/stdfaust.lib";
declare library_path "/libraries/maths.lib";
declare filename "FaustDSP";
declare maths_lib_author "GRAME";
declare maths_lib_copyright "GRAME";
declare maths_lib_license "LGPL with exception";
declare maths_lib_name "Faust Math Library";
declare maths_lib_version "2.1";
declare name "FaustDSP";
process = \(x1).(\(x2).(\(x3).(\(x4).(\(x5).(\(x6).(x1 : _<:(_,x2 : *),(_,1 : @ : _,x3 : *),(_,2 : @ : _,x4 : *):>_ : \(x7).(\(x8).(x8,x7 : -))~(_<:(_,x5 : *),(_,1 : @ : _,x6 : *):>_)))))));
|
|
e7bf964fca904983a068443cb5d745911b27ddc7ee96acfb43f69b1ddccb0b65 | ntonnaett/guitarix | freeverb.dsp | declare name "Freeverb";
declare category "Reverb";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("math.lib");
import("music.lib");
import("effect.lib");
import("filter.lib");
import("guitarix.lib");
/*-----------------------------------------------
freeverb by "Grame"
-----------------------------------------------*/
// Filter Parameters
combtuningL1 = 1116;
combtuningL2 = 1188;
combtuningL3 = 1277;
combtuningL4 = 1356;
combtuningL5 = 1422;
combtuningL6 = 1491;
combtuningL7 = 1557;
combtuningL8 = 1617;
allpasstuningL1 = 556;
allpasstuningL2 = 441;
allpasstuningL3 = 341;
allpasstuningL4 = 225;
roomsizeSlider = vslider("RoomSize[name:Room Size]", 0.5, 0, 1, 0.025)*0.28 + 0.7;
dampslider = vslider("damp[name:HF Damp]",0.5, 0, 1, 0.025);
combfeed = roomsizeSlider;
//wetslider = 0.5 + vslider("wet_dry[name:Wet/Dry]", 0, -0.5, 0.5, 0.1);
wet_dry = vslider("wet_dry[name:Wet/Dry]", 50, 0, 100, 1) : /(100);
dry = 1 - wet_dry;
// Reverb components
monoReverb(fb1, fb2, damp, spread)
= _ <: comb(combtuningL1+spread, fb1, damp),
comb(combtuningL2+spread, fb1, damp),
comb(combtuningL3+spread, fb1, damp),
comb(combtuningL4+spread, fb1, damp),
comb(combtuningL5+spread, fb1, damp),
comb(combtuningL6+spread, fb1, damp),
comb(combtuningL7+spread, fb1, damp),
comb(combtuningL8+spread, fb1, damp)
+>
allpass (allpasstuningL1+spread, fb2)
: allpass (allpasstuningL2+spread, fb2)
: allpass (allpasstuningL3+spread, fb2)
: allpass (allpasstuningL4+spread, fb2)
;
//----------------------------------------------------------------
fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _;
process = _<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))):>_;
| https://raw.githubusercontent.com/ntonnaett/guitarix/e5ce36c3a693eeada3cb70425ec09f8d6f91e78c/trunk/src/faust/freeverb.dsp | faust | -----------------------------------------------
freeverb by "Grame"
-----------------------------------------------
Filter Parameters
wetslider = 0.5 + vslider("wet_dry[name:Wet/Dry]", 0, -0.5, 0.5, 0.1);
Reverb components
---------------------------------------------------------------- | declare name "Freeverb";
declare category "Reverb";
declare version "0.01";
declare author "brummer";
declare license "BSD";
declare copyright "(c)brummer 2008";
import("math.lib");
import("music.lib");
import("effect.lib");
import("filter.lib");
import("guitarix.lib");
combtuningL1 = 1116;
combtuningL2 = 1188;
combtuningL3 = 1277;
combtuningL4 = 1356;
combtuningL5 = 1422;
combtuningL6 = 1491;
combtuningL7 = 1557;
combtuningL8 = 1617;
allpasstuningL1 = 556;
allpasstuningL2 = 441;
allpasstuningL3 = 341;
allpasstuningL4 = 225;
roomsizeSlider = vslider("RoomSize[name:Room Size]", 0.5, 0, 1, 0.025)*0.28 + 0.7;
dampslider = vslider("damp[name:HF Damp]",0.5, 0, 1, 0.025);
combfeed = roomsizeSlider;
wet_dry = vslider("wet_dry[name:Wet/Dry]", 50, 0, 100, 1) : /(100);
dry = 1 - wet_dry;
monoReverb(fb1, fb2, damp, spread)
= _ <: comb(combtuningL1+spread, fb1, damp),
comb(combtuningL2+spread, fb1, damp),
comb(combtuningL3+spread, fb1, damp),
comb(combtuningL4+spread, fb1, damp),
comb(combtuningL5+spread, fb1, damp),
comb(combtuningL6+spread, fb1, damp),
comb(combtuningL7+spread, fb1, damp),
comb(combtuningL8+spread, fb1, damp)
+>
allpass (allpasstuningL1+spread, fb2)
: allpass (allpasstuningL2+spread, fb2)
: allpass (allpasstuningL3+spread, fb2)
: allpass (allpasstuningL4+spread, fb2)
;
fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _;
process = _<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))):>_;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.