_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
|
---|---|---|---|---|---|---|---|
fcc95c9ce96737aa2311fda4a5d91dd9e4ac928db9d7f113dacd5e352a21fc8f | jacktrip/jacktrip | tonedsp.dsp | // Source: https://faustdoc.grame.fr/examples/smartKeyboard/#turenas
import("stdfaust.lib");
y = hslider("y",0,0,1,0.01);
freq = hslider("freq",400,50,2000,0.01);
gate = button("gate");
res = hslider("res[acc: 0 0 -10 0 10]",2.5,0.01,5,0.01);
nModes = 6;
maxModeSpread = 5;
modeSpread = y*maxModeSpread;
modeFreqRatios = par(i,nModes,1+(i+1)/nModes*modeSpread);
minModeGain = 0.3;
modeGains = par(i,nModes,1-(i+1)/(nModes*minModeGain));
modeRes = res : si.smoo;
process = sy.additiveDrum(freq,modeFreqRatios,modeGains,0.8,0.001,modeRes,gate)*0.05;
| https://raw.githubusercontent.com/jacktrip/jacktrip/e96e250882dab25052225fdf7a88b6b1f77f5d07/faust-src/tonedsp.dsp | faust | Source: https://faustdoc.grame.fr/examples/smartKeyboard/#turenas |
import("stdfaust.lib");
y = hslider("y",0,0,1,0.01);
freq = hslider("freq",400,50,2000,0.01);
gate = button("gate");
res = hslider("res[acc: 0 0 -10 0 10]",2.5,0.01,5,0.01);
nModes = 6;
maxModeSpread = 5;
modeSpread = y*maxModeSpread;
modeFreqRatios = par(i,nModes,1+(i+1)/nModes*modeSpread);
minModeGain = 0.3;
modeGains = par(i,nModes,1-(i+1)/(nModes*minModeGain));
modeRes = res : si.smoo;
process = sy.additiveDrum(freq,modeFreqRatios,modeGains,0.8,0.001,modeRes,gate)*0.05;
|
70689e71b0304556152f226272e350aa3c788facef1611a1db1742b72edddb5c | HexHive/datAFLow | BUG20180710.dsp | import("stdfaust.lib");
// This program should compile but the interval of the table is not
// correctly computed by faust 2.8.0
phase(f) = f/48000.0 : (+, 1.0 : fmod) ~ _;
sinwave(f) = phase(f) * 2 * ma.PI : sin : +(1) : /(2);
tosc(f) = 48000, sinwave(1), int(max(0, min(phase(f)*48000, 47999))) : rdtable;
process = os.osc(440) : @(tosc(10)*100);
| https://raw.githubusercontent.com/HexHive/datAFLow/b9f3cbc42b1970f8655817c9fb67b1eaba3ae4c0/evaluation/ddfuzz/seeds/faust/BUG20180710.dsp | faust | This program should compile but the interval of the table is not
correctly computed by faust 2.8.0 | import("stdfaust.lib");
phase(f) = f/48000.0 : (+, 1.0 : fmod) ~ _;
sinwave(f) = phase(f) * 2 * ma.PI : sin : +(1) : /(2);
tosc(f) = 48000, sinwave(1), int(max(0, min(phase(f)*48000, 47999))) : rdtable;
process = os.osc(440) : @(tosc(10)*100);
|
c77500fa97a7843f94e639a8b745b418b9e04e85ed7c18cd786f9d8aedc19c48 | olilarkin/OL-OWLPatches | 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("Shift L [unit:semitones] [OWL:PARAMETER_A]", 0, -12, +12, 0.1);
shiftr = hslider("Shift R [unit:semitones] [OWL:PARAMETER_B]", 0, -12, +12, 0.1);
ws = hslider("Window Size [unit:ms] [OWL:PARAMETER_C]", 50, 20, 1000, 1) * msec : si.smooth(ba.tau2pole(0.005));
mix = hslider("Mix[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)) ~ _;
};
process(l,r) = l,r <: *(1-mix), *(1-mix), transpose(ws, xf, shiftl, l)*mix, transpose(ws, xf, shiftr, r)*mix :> _,_;
| https://raw.githubusercontent.com/olilarkin/OL-OWLPatches/2dad8107814082c9de8ef1d117950fe3f49633b6/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("Shift L [unit:semitones] [OWL:PARAMETER_A]", 0, -12, +12, 0.1);
shiftr = hslider("Shift R [unit:semitones] [OWL:PARAMETER_B]", 0, -12, +12, 0.1);
ws = hslider("Window Size [unit:ms] [OWL:PARAMETER_C]", 50, 20, 1000, 1) * msec : si.smooth(ba.tau2pole(0.005));
mix = hslider("Mix[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)) ~ _;
};
process(l,r) = l,r <: *(1-mix), *(1-mix), transpose(ws, xf, shiftl, l)*mix, transpose(ws, xf, shiftr, r)*mix :> _,_;
|
|
08d793d5814587848a5bb21a540a84b170996e483426d43b058e582eae5b358d | RuolunWeng/faust2smartphone | soloDemo.dsp | declare name "SoloDemo";
declare version "1.0";
declare author "Grame";
process = rainGen, windGen, sinusGen :>_,_ ;
// declare connection UI
cueNum = nentry("cue",1,1,3,1);
touchGate = checkbox("touchgate");
volume = hslider("screenx",0,0,1,0.01);
param = hslider("param[motion:ixp]",0,0,1,0.01);
//----------------------`rain`--------------------------
// A very simple rain simulator
//
// #### Usage
//
// ```
// rain(d,l) : _,_
// ```
//
// Where:
//
// * `d`: is the density of the rain: between 0 and 1
// * `l`: is the level (volume) of the rain: between 0 and 1
//
//----------------------------------------------------------
import("stdfaust.lib");
rain(density,level) = no.multinoise(2) : par(i, 2, drop) : par(i, 2, *(level))
with {
drop = _ <: @(1), (abs < density) : *;
};
rainGen = rain (
hslider("v:rain/density [showName: rain/density]", 0.3, 0, 1, 0.01),
param*(cueNum==1)
//hslider("v:rain/volume", 0.5, 0, 1, 0.01)
);
//----------------------`wind`--------------------------
// A very simple wind simulator, based on a filtered white noise
//
// #### Usage
//
// ```
// wind(f) : _
// ```
//
// Where:
//
// * `f`: is the force of the wind: between 0 and 1
//
//----------------------------------------------------------
import("stdfaust.lib");
wind(force,level) = no.multinoise(2) : par(i, 2, ve.moog_vcf_2bn(force,freq)) : par(i, 2, *(force)) : par(i, 2, *(level))
with {
freq = (force*87)+1 : ba.pianokey2hz;
};
windGen = //wind ( hslider("v:wind/force",0.66,0,1,0.01) : si.smooth (0.997) );
wind ( param : si.smooth (0.997) , volume * (cueNum == 2) * touchGate ) ;
//-----------------------------------------------
// Sinusoidal Oscillator
//-----------------------------------------------
import("stdfaust.lib");
vol = volume * (cueNum == 3) * touchGate : si.smoo ;//hslider("volume [unit:dB]", 0, -96, 0, 0.1) : ba.db2linear : si.smoo ;
freq = param*880+440; //hslider("freq [unit:Hz]", 1000, 20, 24000, 1);
sinusGen = os.osc(freq) <: _* vol, _* vol;
| https://raw.githubusercontent.com/RuolunWeng/faust2smartphone/78f502aeb42af3d8fa48b0cbfef01d3b267dc038/examples/2_Motion_Mode/soloDemo.dsp | faust | declare connection UI
----------------------`rain`--------------------------
A very simple rain simulator
#### Usage
```
rain(d,l) : _,_
```
Where:
* `d`: is the density of the rain: between 0 and 1
* `l`: is the level (volume) of the rain: between 0 and 1
----------------------------------------------------------
hslider("v:rain/volume", 0.5, 0, 1, 0.01)
----------------------`wind`--------------------------
A very simple wind simulator, based on a filtered white noise
#### Usage
```
wind(f) : _
```
Where:
* `f`: is the force of the wind: between 0 and 1
----------------------------------------------------------
wind ( hslider("v:wind/force",0.66,0,1,0.01) : si.smooth (0.997) );
-----------------------------------------------
Sinusoidal Oscillator
-----------------------------------------------
hslider("volume [unit:dB]", 0, -96, 0, 0.1) : ba.db2linear : si.smoo ;
hslider("freq [unit:Hz]", 1000, 20, 24000, 1); | declare name "SoloDemo";
declare version "1.0";
declare author "Grame";
process = rainGen, windGen, sinusGen :>_,_ ;
cueNum = nentry("cue",1,1,3,1);
touchGate = checkbox("touchgate");
volume = hslider("screenx",0,0,1,0.01);
param = hslider("param[motion:ixp]",0,0,1,0.01);
import("stdfaust.lib");
rain(density,level) = no.multinoise(2) : par(i, 2, drop) : par(i, 2, *(level))
with {
drop = _ <: @(1), (abs < density) : *;
};
rainGen = rain (
hslider("v:rain/density [showName: rain/density]", 0.3, 0, 1, 0.01),
param*(cueNum==1)
);
import("stdfaust.lib");
wind(force,level) = no.multinoise(2) : par(i, 2, ve.moog_vcf_2bn(force,freq)) : par(i, 2, *(force)) : par(i, 2, *(level))
with {
freq = (force*87)+1 : ba.pianokey2hz;
};
wind ( param : si.smooth (0.997) , volume * (cueNum == 2) * touchGate ) ;
import("stdfaust.lib");
sinusGen = os.osc(freq) <: _* vol, _* vol;
|
93a890ea5f73b987548d11d6fb36c66d0a9d4f7cd13259d241e71a149c02df6c | LucaSpanedda/Musical_Studies_of_Chaotic_Systems | 2.01_Van_Der_Pol_Second_Grade.dsp | // import Standard Faust library
// https://github.com/grame-cncm/faustlibraries/
import("stdfaust.lib");
// Van Der Pol Oscillator of Second Grade
// by Dario Sanfilippo
m=2.6;
h=.01;
vanderpolsecgrade(init1, init2) = loop ~ _
with {
loop(fb) = (h * m * (fb + init1_) ^ 3 + (-1 * h ^ 2 - h * m + 2) * (fb + init1_) - (fb'
+ init2_ + init1_')) /
(h * m * (fb + init1_) ^ 2 - h * m + 1)
with {
init1_ = init1 - init1';
init2_ = init2 - init2';
};
};
process = vanderpolsecgrade(1, 1) * 0.4; | https://raw.githubusercontent.com/LucaSpanedda/Musical_Studies_of_Chaotic_Systems/d8b78c011cc0b2b75f74643eba78306d6a3f92df/2.01_Van_Der_Pol_Second_Grade.dsp | faust | import Standard Faust library
https://github.com/grame-cncm/faustlibraries/
Van Der Pol Oscillator of Second Grade
by Dario Sanfilippo | import("stdfaust.lib");
m=2.6;
h=.01;
vanderpolsecgrade(init1, init2) = loop ~ _
with {
loop(fb) = (h * m * (fb + init1_) ^ 3 + (-1 * h ^ 2 - h * m + 2) * (fb + init1_) - (fb'
+ init2_ + init1_')) /
(h * m * (fb + init1_) ^ 2 - h * m + 1)
with {
init1_ = init1 - init1';
init2_ = init2 - init2';
};
};
process = vanderpolsecgrade(1, 1) * 0.4; |
940d6fe0e5c80602233dc121883c5b6a10d1d1ec0220db2544c6058cd35b225b | LucaSpanedda/Musical_Studies_of_Chaotic_Systems | 2.00_Van_Der_Pol_First_Grade.dsp | // import Standard Faust library
// https://github.com/grame-cncm/faustlibraries/
import("stdfaust.lib");
// Van Der Pol Oscillator of First Grade
vanderpol(x0,y0) = ( x+_,y+_ : loop ) ~ si.bus(2)
with {
x = x0-x0';
y = y0-y0';
u = 1.0; // nonlinearity strength
dt = 0.01; // dt
epsilon = 2.2204460492503131e-016; // dielectric constant
loop(x,y) =
x + (u * (x - x ^ 3 / 3 - y) * dt),
y + (x / max(u,epsilon) ) * dt ;
};
routing(a,b) = a*0.2;
process = vanderpol(1,1) : routing <: _,_; | https://raw.githubusercontent.com/LucaSpanedda/Musical_Studies_of_Chaotic_Systems/d8b78c011cc0b2b75f74643eba78306d6a3f92df/2.00_Van_Der_Pol_First_Grade.dsp | faust | import Standard Faust library
https://github.com/grame-cncm/faustlibraries/
Van Der Pol Oscillator of First Grade
nonlinearity strength
dt
dielectric constant | import("stdfaust.lib");
vanderpol(x0,y0) = ( x+_,y+_ : loop ) ~ si.bus(2)
with {
x = x0-x0';
y = y0-y0';
loop(x,y) =
x + (u * (x - x ^ 3 / 3 - y) * dt),
y + (x / max(u,epsilon) ) * dt ;
};
routing(a,b) = a*0.2;
process = vanderpol(1,1) : routing <: _,_; |
29f3a2372233b12d030c113f855d6978adc5c642777678dc4adeed9a75479c8b | droosenb/faust-on-ESP32 | JCrev.dsp | import("stdfaust.lib");
process = re.jcrev :> _, *(-1) :> _ <: _, _;
| https://raw.githubusercontent.com/droosenb/faust-on-ESP32/2060ad6723bed4578d5a75f8eeeacb93a7dc0b60/OSC/esp32-osc-reverb/JCrev.dsp | faust | import("stdfaust.lib");
process = re.jcrev :> _, *(-1) :> _ <: _, _;
|
|
83d80ea258076e273ffc8979d069a1923ec0a9132a31396a5d9fb245cc7d586d | danidev/microcosmos | MicrocosmosDsp.dsp | import("stdfaust.lib");
sampleRate = 48000;
page(num, x) = hgroup("page%num", x);
trigger = ba.toggle(button("gate"));
voice(num) = out
with {
// UI CODE
note = page(num, hslider("[0]V%num NOTE[style:knob]", 69, 0, 127, 1));
lfoFreq = page(num, hslider("[1]V%num LFO FREQ[style:knob]", 1, 0, 80, 0.1) : si.smoo);
volume = page(num, hslider("[2]V%num VOLUME[style:knob]", 0.1, 0, 0.9, 0.1) : si.smoo);
lfoAttenuator = page(num, hslider("[3]V%num LFO DEEP[style:knob]", 0, 0, 1, 0.1) : si.smoo);
// DSP CODE
lfo = os.lf_triangle(lfoFreq)*24 : page(num, hbargraph("[4]V%num LED LFO", -1, 1));
pitch = ba.midikey2hz(note+lfo*lfoAttenuator);
osc = os.triangle(pitch);
out = osc * volume * trigger;
};
signal = voice(1) + voice(2) + voice(3);
time = page(4, hslider("[0]TIME[style:knob]", 250, 0, 1000, 1) / 1000);
feedback = page(4, hslider("[1]FEEDBACK[style:knob]", 0.5, 0, 1, 0.1));
amount = page(4, hslider("[2]AMOUNT[style:knob]", 0.5, 0, 1, 0.1));
delay = (signal : + ~@(time * sampleRate : int)*feedback) * amount;
process = signal + delay <: _,_;
| https://raw.githubusercontent.com/danidev/microcosmos/27b8c35df97aba336b546cca7c6dd4ec802eed30/dsp/drone_01/dsp/MicrocosmosDsp.dsp | faust | UI CODE
DSP CODE | import("stdfaust.lib");
sampleRate = 48000;
page(num, x) = hgroup("page%num", x);
trigger = ba.toggle(button("gate"));
voice(num) = out
with {
note = page(num, hslider("[0]V%num NOTE[style:knob]", 69, 0, 127, 1));
lfoFreq = page(num, hslider("[1]V%num LFO FREQ[style:knob]", 1, 0, 80, 0.1) : si.smoo);
volume = page(num, hslider("[2]V%num VOLUME[style:knob]", 0.1, 0, 0.9, 0.1) : si.smoo);
lfoAttenuator = page(num, hslider("[3]V%num LFO DEEP[style:knob]", 0, 0, 1, 0.1) : si.smoo);
lfo = os.lf_triangle(lfoFreq)*24 : page(num, hbargraph("[4]V%num LED LFO", -1, 1));
pitch = ba.midikey2hz(note+lfo*lfoAttenuator);
osc = os.triangle(pitch);
out = osc * volume * trigger;
};
signal = voice(1) + voice(2) + voice(3);
time = page(4, hslider("[0]TIME[style:knob]", 250, 0, 1000, 1) / 1000);
feedback = page(4, hslider("[1]FEEDBACK[style:knob]", 0.5, 0, 1, 0.1));
amount = page(4, hslider("[2]AMOUNT[style:knob]", 0.5, 0, 1, 0.1));
delay = (signal : + ~@(time * sampleRate : int)*feedback) * amount;
process = signal + delay <: _,_;
|
1817747e2117d5de5d549572ccf88c1f2c615a7dd4622af8255f2421aa037490 | matthewcaren/KeyWI | melodica.dsp | import("stdfaust.lib");
freq = hslider("freq", 590, 20, 20000, 0.01);
gate = button("gate") : en.asr(0.003, 1, 0.03);
readpressure = hslider("breath[BELA: ANALOG_0]", 0, -1.35, 1, 0.001)*-1 - offset;
sensitivity = hslider("sensitivity[BELA: ANALOG_4]", 0.3, -0.6, 0.9, 0.01) : si.smoo;
offset = hslider("offset[BELA: ANALOG_5]", 0.1, 0, 0.4, 0.01) : si.smoo;
//PBup = hslider("PBup[BELA: ANALOG_1]", 0, 0, 50, 0.1) - 11 : si.smooth(0.9995) : max(0); // FSR
//PBdown = hslider("PBdown[BELA: ANALOG_2]", 0, 0, 50, 0.1) - 11 : si.smooth(0.9995) : max(0); // FSR
pressure = readpressure : si.smooth(0.99988) : max(0);
pGate = gate : en.ar(0.03, 0.3)*pressure*(pressure - 0.3 : max(0))*3;
breath = (readpressure + pGate - .05) / (1-sensitivity) : si.smooth(0.996) : max(0);
clip = breath*0.75+2.7;
fs = hslider("fundamental subtract", 0.55, 0, 3, 0.01) : si.smoo;
vibratoOsc = os.osc(4);
sine = os.osc(freq);
reed = (((((sine*clip*2 -1) : ef.cubicnl(0,0))+1)/2 + (sine*2+1 : ef.cubicnl(0,0)-1)*0.1 -sine*fs)-breath/3)*breath*gate : fi.lowpass(2, 8000);
noise = gate : ba.impulsify : en.ar(0.005, 0.1) : (_ + 0.1*breath*gate + 0.1) * (no.noise : fi.bandpass(2,850,2000))*pressure : fi.highpass(2, 900);
process = (reed + noise*0.1)*0.02 : fi.highpass(1,600) <: _,_;
| https://raw.githubusercontent.com/matthewcaren/KeyWI/83a62885e99069fe1fbaf55b28a2d98a5b3567ca/code/melodica/melodica.dsp | faust | PBup = hslider("PBup[BELA: ANALOG_1]", 0, 0, 50, 0.1) - 11 : si.smooth(0.9995) : max(0); // FSR
PBdown = hslider("PBdown[BELA: ANALOG_2]", 0, 0, 50, 0.1) - 11 : si.smooth(0.9995) : max(0); // FSR | import("stdfaust.lib");
freq = hslider("freq", 590, 20, 20000, 0.01);
gate = button("gate") : en.asr(0.003, 1, 0.03);
readpressure = hslider("breath[BELA: ANALOG_0]", 0, -1.35, 1, 0.001)*-1 - offset;
sensitivity = hslider("sensitivity[BELA: ANALOG_4]", 0.3, -0.6, 0.9, 0.01) : si.smoo;
offset = hslider("offset[BELA: ANALOG_5]", 0.1, 0, 0.4, 0.01) : si.smoo;
pressure = readpressure : si.smooth(0.99988) : max(0);
pGate = gate : en.ar(0.03, 0.3)*pressure*(pressure - 0.3 : max(0))*3;
breath = (readpressure + pGate - .05) / (1-sensitivity) : si.smooth(0.996) : max(0);
clip = breath*0.75+2.7;
fs = hslider("fundamental subtract", 0.55, 0, 3, 0.01) : si.smoo;
vibratoOsc = os.osc(4);
sine = os.osc(freq);
reed = (((((sine*clip*2 -1) : ef.cubicnl(0,0))+1)/2 + (sine*2+1 : ef.cubicnl(0,0)-1)*0.1 -sine*fs)-breath/3)*breath*gate : fi.lowpass(2, 8000);
noise = gate : ba.impulsify : en.ar(0.005, 0.1) : (_ + 0.1*breath*gate + 0.1) * (no.noise : fi.bandpass(2,850,2000))*pressure : fi.highpass(2, 900);
process = (reed + noise*0.1)*0.02 : fi.highpass(1,600) <: _,_;
|
d934b782316f9ff76314fa8d95ea86f5931636d9eca01571e87056d52b6ad51e | antisvin/MyPatches | testouts.dsp | import("stdfaust.lib");
// An example of global metadata usage (see also
// https://faust.grame.fr/doc/manual/index.html#global-metadata ). There doesn't
// seem to be a standard label intended for storing patch description, so
// we just use a custom label "message"
declare message "Patch D > A to\nmodulate LFOs";
// declare options "[midi:on]";
//Uncommenting the line above makes freq disappear from UI, but it becomes controllabel
// by MIDI.
// Currently using vbargraph or hbargraph for outputs makes no difference.
// But we could use different UI widgets once rendering to screen would be available
// from Faust.
// LFO1 is a sine wave
sineFreq = hslider("freq[OWL:A]", 1, -10, 10, 0.01);
sineOut = vbargraph("sine>[OWL:B]", -1.0, 1.0);
// LFO2 is a square, you can also change LFO output gain
sqrFreq = hslider("freq2[OWL:C]:", 0.5, 0, 10, 0.01);
sqrOut = vbargraph("square>[OWL:D]", 0.0, 1.0);
sqrOutGain = hslider("square gain[OWL:E]", 1, -1, 1, 0.01);
// We use "attach" to bypass audio - this way we won't send LFOs to outputs.
// See https://faust.grame.fr/doc/manual/index.html#attach-primitive
process = _ <: (attach(_, sineWave: sineOut) : attach(_, sqrWave: sqrOut))
with {
sineWave = os.oscs(sineFreq);
sqrWave = os.lf_squarewave(sqrFreq) * sqrOutGain;
};
| https://raw.githubusercontent.com/antisvin/MyPatches/89a3df2464b68d4996d9b159ff105e8c9fc9f762/Faust/testouts.dsp | faust | An example of global metadata usage (see also
https://faust.grame.fr/doc/manual/index.html#global-metadata ). There doesn't
seem to be a standard label intended for storing patch description, so
we just use a custom label "message"
declare options "[midi:on]";
Uncommenting the line above makes freq disappear from UI, but it becomes controllabel
by MIDI.
Currently using vbargraph or hbargraph for outputs makes no difference.
But we could use different UI widgets once rendering to screen would be available
from Faust.
LFO1 is a sine wave
LFO2 is a square, you can also change LFO output gain
We use "attach" to bypass audio - this way we won't send LFOs to outputs.
See https://faust.grame.fr/doc/manual/index.html#attach-primitive | import("stdfaust.lib");
declare message "Patch D > A to\nmodulate LFOs";
sineFreq = hslider("freq[OWL:A]", 1, -10, 10, 0.01);
sineOut = vbargraph("sine>[OWL:B]", -1.0, 1.0);
sqrFreq = hslider("freq2[OWL:C]:", 0.5, 0, 10, 0.01);
sqrOut = vbargraph("square>[OWL:D]", 0.0, 1.0);
sqrOutGain = hslider("square gain[OWL:E]", 1, -1, 1, 0.01);
process = _ <: (attach(_, sineWave: sineOut) : attach(_, sqrWave: sqrOut))
with {
sineWave = os.oscs(sineFreq);
sqrWave = os.lf_squarewave(sqrFreq) * sqrOutGain;
};
|
11bb3eac9c4ac146c722b2e4aeefc00f01214d71026383f71e857c66fdff9770 | DISTRHO/Fadeli | analysis-spectralLevel.dsp | declare name "spectralLevel";
declare version "0.0";
declare author "JOS, revised by RM";
declare description "Demonstrates mth_octave_spectral_level in a standalone GUI.";
import("stdfaust.lib");
process = dm.spectral_level_demo;
| https://raw.githubusercontent.com/DISTRHO/Fadeli/22352d962714828613a88f008fa41744eecfac6e/dsp/analysis-spectralLevel.dsp | faust | declare name "spectralLevel";
declare version "0.0";
declare author "JOS, revised by RM";
declare description "Demonstrates mth_octave_spectral_level in a standalone GUI.";
import("stdfaust.lib");
process = dm.spectral_level_demo;
|
|
84c4f2f795493203bdc358f44cd38767c62b88d779432969034cfbf7ec23f4e3 | rmichon/multiKeyboard | reverb.dsp | // Just calling zita_rev1 from demo.lib
import("stdfaust.lib");
process = dm.zita_rev1; | https://raw.githubusercontent.com/rmichon/multiKeyboard/7d04f591fac974a91e4b322c3cb757b8cbb50443/faust/examples/associatedEffects/reverb.dsp | faust | Just calling zita_rev1 from demo.lib |
import("stdfaust.lib");
process = dm.zita_rev1; |
125f16e938e0d29e310d87f6f4868c0b3a9468e2cc51a8e70af24ab6ff525138 | aquafredda/mid-side-delay | simpledelay.dsp | declare name "Simple Mid Side Ping Pong Flip Flop Tic Tac Zip Zap Delay";
declare vendor "G.A.";
declare author "Gabriele Acquafredda";
ts = library("12ts.lib");
import("stdfaust.lib");
import("filters.lib");
delay_matrix = hgroup("Delay Matrix",simple_delayL, simple_delayL, simple_delayR, simple_delayR*(-1))
with {
del_timeL = hslider("Delay Time L (ms)",0,0,1000,1)*ma.SR/1000;
del_timeR = hslider("Delay Time R (ms)",0,0,1000,1)*ma.SR/1000;
simple_delayL = +~(@(2*del_timeL) : *(feedbk));
simple_delayR = @(del_timeR) : +~(@(2*del_timeR) : *(feedbk));
feedbk = hslider("Feedback %",0,0,110,1)/100;
};
filters = hgroup("Filters", filterlphp, filterlphp)
with {
flp = hslider("LoPass Freq",22000,20,22000,1);
qlp = hslider("LoPass Q",1,1,5,0.05);
fhp = hslider("HiPass Freq",20,20,22000,1);
qhp = hslider("HiPass Q",1,1,5,0.05);
filterlphp = resonlp(flp,qlp,1) : resonhp(fhp,qhp,1) ;
};
mod_matrix = hgroup("Modulation", modulations, modulations)
with {
freq_down = hslider("Downsample Frequency",22000,20,22000,1);
modulations = ba.downSample(freq_down);
};
process = _ , _ <: delay_matrix :> mod_matrix : filters;
| https://raw.githubusercontent.com/aquafredda/mid-side-delay/e60943eca8ed6c57d245ab0bda6687311e5ef0c4/simpledelay.dsp | faust | declare name "Simple Mid Side Ping Pong Flip Flop Tic Tac Zip Zap Delay";
declare vendor "G.A.";
declare author "Gabriele Acquafredda";
ts = library("12ts.lib");
import("stdfaust.lib");
import("filters.lib");
delay_matrix = hgroup("Delay Matrix",simple_delayL, simple_delayL, simple_delayR, simple_delayR*(-1))
with {
del_timeL = hslider("Delay Time L (ms)",0,0,1000,1)*ma.SR/1000;
del_timeR = hslider("Delay Time R (ms)",0,0,1000,1)*ma.SR/1000;
simple_delayL = +~(@(2*del_timeL) : *(feedbk));
simple_delayR = @(del_timeR) : +~(@(2*del_timeR) : *(feedbk));
feedbk = hslider("Feedback %",0,0,110,1)/100;
};
filters = hgroup("Filters", filterlphp, filterlphp)
with {
flp = hslider("LoPass Freq",22000,20,22000,1);
qlp = hslider("LoPass Q",1,1,5,0.05);
fhp = hslider("HiPass Freq",20,20,22000,1);
qhp = hslider("HiPass Q",1,1,5,0.05);
filterlphp = resonlp(flp,qlp,1) : resonhp(fhp,qhp,1) ;
};
mod_matrix = hgroup("Modulation", modulations, modulations)
with {
freq_down = hslider("Downsample Frequency",22000,20,22000,1);
modulations = ba.downSample(freq_down);
};
process = _ , _ <: delay_matrix :> mod_matrix : filters;
|
|
a43c416b46e521c9974e17858c9c49dff24fd74e59148bcaa3eb18b0e9885a98 | LucaSpanedda/Musical_Studies_of_Dynamical_and_Complex_Systems | NonlinearOsc.dsp | // Faust standard libraries
import("stdfaust.lib");
// Linear Congruential Generator
noise(initSeed) = LCG ~ _ : (_ / m)
with{
// variables
// initSeed = an initial seed value
a = 18446744073709551557; // a large prime number, such as 18446744073709551557
c = 12345; // a small prime number, such as 12345
m = 2 ^ 31; // 2.1 billion
// linear_congruential_generator
LCG(seed) = ((a * seed + c) + (initSeed-initSeed') % m);
};
// Zavalishin's Onepole TPT Filter
onePoleTPT(cf, x) = loop ~ _ : ! , si.bus(3) // Outs: lp , hp , ap
with {
g = tan(cf * ma.PI * ma.T);
G = g / (1.0 + g);
loop(s) = u , lp , hp , ap
with {
v = (x - s) * G; u = v + lp; lp = v + s; hp = x - lp; ap = lp - hp;
};
};
// Lowpass TPT
LPTPT(cf, x) = onePoleTPT(cf, x) : (_ , ! , !);
// Highpass TPT
HPTPT(cf, x) = onePoleTPT(cf, x) : (! , _ , !);
// Fixed Peak Normalization
fixedNorm(x) = 1 / (x : loop ~ _) * x
with{
loop(y,z) = ( (y, abs(z) ) : max);
};
// noise to nonperiodic osc
nonlinearity(seed, frequency) = noise(seed) :
LPTPT(frequency) : LPTPT(frequency) : fixedNorm;
process = par(i, 10, nonlinearity( (i+1) * 469762049, 1 ) );
// input to nonperiodic osc
intononlinearity(frequency, x) = x + (ma.EPSILON-ma.EPSILON') :
LPTPT(frequency) : LPTPT(frequency) : fixedNorm;
// process = intononlinearity(1,_), intononlinearity(1,_); | https://raw.githubusercontent.com/LucaSpanedda/Musical_Studies_of_Dynamical_and_Complex_Systems/f410256d3fef6d50f560e273aa4682153d4ffa1b/NonlinearOsc.dsp | faust | Faust standard libraries
Linear Congruential Generator
variables
initSeed = an initial seed value
a large prime number, such as 18446744073709551557
a small prime number, such as 12345
2.1 billion
linear_congruential_generator
Zavalishin's Onepole TPT Filter
Outs: lp , hp , ap
Lowpass TPT
Highpass TPT
Fixed Peak Normalization
noise to nonperiodic osc
input to nonperiodic osc
process = intononlinearity(1,_), intononlinearity(1,_); | import("stdfaust.lib");
noise(initSeed) = LCG ~ _ : (_ / m)
with{
LCG(seed) = ((a * seed + c) + (initSeed-initSeed') % m);
};
with {
g = tan(cf * ma.PI * ma.T);
G = g / (1.0 + g);
loop(s) = u , lp , hp , ap
with {
v = (x - s) * G; u = v + lp; lp = v + s; hp = x - lp; ap = lp - hp;
};
};
LPTPT(cf, x) = onePoleTPT(cf, x) : (_ , ! , !);
HPTPT(cf, x) = onePoleTPT(cf, x) : (! , _ , !);
fixedNorm(x) = 1 / (x : loop ~ _) * x
with{
loop(y,z) = ( (y, abs(z) ) : max);
};
nonlinearity(seed, frequency) = noise(seed) :
LPTPT(frequency) : LPTPT(frequency) : fixedNorm;
process = par(i, 10, nonlinearity( (i+1) * 469762049, 1 ) );
intononlinearity(frequency, x) = x + (ma.EPSILON-ma.EPSILON') :
LPTPT(frequency) : LPTPT(frequency) : fixedNorm;
|
4bed32eaaf31f4f63c56d2fe568748628c5f3314e4f71fb7a8b6ab56ef84d3c4 | kofigumbs/typebeat | reverb.dsp | import("stdfaust.lib");
gain = nentry("reverbGain", 25, 0, 50, 10) : si.smoo;
size = nentry("reverbSize", 25, 0, 50, 10);
process = sp.stereoize(*(gain/250)) : re.stereo_freeverb(size*.0056 + .7, .5, .2, 23);
| https://raw.githubusercontent.com/kofigumbs/typebeat/ce39da4b4200b1677f7759e8d6d4ddcad3025311/src/effects/reverb.dsp | faust | import("stdfaust.lib");
gain = nentry("reverbGain", 25, 0, 50, 10) : si.smoo;
size = nentry("reverbSize", 25, 0, 50, 10);
process = sp.stereoize(*(gain/250)) : re.stereo_freeverb(size*.0056 + .7, .5, .2, 23);
|
|
279009fbc8c9dc11d22b3498429b9b181e8b98dc12136bad69d16dba31a74eff | mi-creative/FaustPM_2021_examples | 00_SingleMass.dsp | import("stdfaust.lib");
/* Faust PM Workshop : Introduction to Mass-Interaction Modelling */
/* Part 0: a single mass */
// Build a single mass and hit it
in1 = button("test"):ba.impulsify * 0.00001;
process = in1: mi.mass(1, 0, 0, 0);
| https://raw.githubusercontent.com/mi-creative/FaustPM_2021_examples/329e24a3d7c062cffb76416cff05a2922a3721f0/00_SingleMass.dsp | faust | Faust PM Workshop : Introduction to Mass-Interaction Modelling
Part 0: a single mass
Build a single mass and hit it | import("stdfaust.lib");
in1 = button("test"):ba.impulsify * 0.00001;
process = in1: mi.mass(1, 0, 0, 0);
|
f13ad6948a1f299434487a47fc44159bc6ff28630b16231f06d93e01afbfdc53 | rmichon/mi_faust | IPlayTheTriangle.dsp | import("stdfaust.lib");
import("../../faust/mi.lib");
in1 = vslider("pos",1,-1,1,0.0001) : si.smoo;
OutGain = 50.;
m_K = 0.1;
m_Z = 0.001;
nlK = 0.05;
nlScale = 0.01;
model = (RoutingLinkToMass:
ground(0.),
mass(1.,0., 0.),
mass(1.,0., 0.),
mass(1.,0., 0.),
posInput(0.) :
RoutingMassToLink :
spring(0.05,0.01, 0., 0.),
spring(m_K,m_Z, 0., 0.),
spring(m_K,m_Z, 0., 0.),
spring(m_K,m_Z, 0., 0.),
nlPluck(nlK,nlScale), par(i, 1,_)
)~par(i, 10, _): par(i, 10,!), par(i, 1, _)
with{
RoutingLinkToMass(l0_f1,l0_f2,l1_f1,l1_f2,l2_f1,l2_f2,l3_f1,l3_f2,l4_f1,l4_f2, p_in1) = l0_f1, l0_f2+l1_f1+l3_f2, l1_f2+l2_f1+l4_f2, l2_f2+l3_f1, l4_f1, p_in1;
RoutingMassToLink(m0,m1,m2,m3,m4) = m0, m1, m1, m2, m2, m3, m3, m1, m4, m2,m3;
};
process = in1: model: *(OutGain); | https://raw.githubusercontent.com/rmichon/mi_faust/9af43428a4809894b539a2e1457ad9d2bc0d67fb/examples/faust/IPlayTheTriangle.dsp | faust | import("stdfaust.lib");
import("../../faust/mi.lib");
in1 = vslider("pos",1,-1,1,0.0001) : si.smoo;
OutGain = 50.;
m_K = 0.1;
m_Z = 0.001;
nlK = 0.05;
nlScale = 0.01;
model = (RoutingLinkToMass:
ground(0.),
mass(1.,0., 0.),
mass(1.,0., 0.),
mass(1.,0., 0.),
posInput(0.) :
RoutingMassToLink :
spring(0.05,0.01, 0., 0.),
spring(m_K,m_Z, 0., 0.),
spring(m_K,m_Z, 0., 0.),
spring(m_K,m_Z, 0., 0.),
nlPluck(nlK,nlScale), par(i, 1,_)
)~par(i, 10, _): par(i, 10,!), par(i, 1, _)
with{
RoutingLinkToMass(l0_f1,l0_f2,l1_f1,l1_f2,l2_f1,l2_f2,l3_f1,l3_f2,l4_f1,l4_f2, p_in1) = l0_f1, l0_f2+l1_f1+l3_f2, l1_f2+l2_f1+l4_f2, l2_f2+l3_f1, l4_f1, p_in1;
RoutingMassToLink(m0,m1,m2,m3,m4) = m0, m1, m1, m2, m2, m3, m3, m1, m4, m2,m3;
};
process = in1: model: *(OutGain); |
|
d4ccb11ea294e3af7ba41efc29f16d50576627eac5798a75ec5e57fac03513f4 | LucaSpanedda/Guida_Primi_Codici_in_FAUST | 0.30_Frequenza_variabile.dsp | // FREQUENZA VARIABILE
/* Nella nostra definizione del fasore,
sappiamo che la nostra frequenza è definita
dal valore che definisce gli step d'incremento per ogni campione.
ad esempio:
ad una frequenza di campionamento (fissa),
per l'appunto di 48000samples al secondo,
sappiamo che se impiegassimo un valore incrementale piccolo,
che impiegasse 48000 STEP
successivi per arrivare dal numero 0. al numero 1. per poi resettarsi,
avremmo dunque 1 sola oscilazione per ogni secondo,
essendo il nostro secondo definito da 48000 campioni.
se avessimo invece un passo incrementale che impiegasse solo la metà
dei nostri 48000 campioni (e dunque 24000) per arrivare da 0. a 1.
per poi resettarsi,
avremo invece due oscillazioni al secondo
e così via.
quindi se volessimo controllare la frequenza del nostro fasore,
abbiamo bisogno di conoscere la frequenza di campionamento.
e dire che:
la frequenza che vogliamo per il fasore/ frequenza di campionamento.
dandoci come risultato quello STEP INCREMENTALE
che ci permette di arrivare da 0. a 1. risettandosi
tante volte quante quelle determinate dalla frequenza che vogliamo.
FAUST ha una sua libreria che permette di richiamare
all'interno del codice, l'attuale frequenza di campionamento.
la libreria si può richiamare così:
import("stdfaust.lib");
e il comando per richiamare la frequenza di campionamento attuale è:
ma.SR
per definire dunque quanti Hz rispetto al sample-rate in un secondo,
vogliamo che faccia la nostra rampa,
dobbiamo definire il processo così:
frequenza = 400;
fasore = (frequenza/ma.SR) : (+ : decimale) ~ _; */
//CODICE:
import("stdfaust.lib");
decimale(step)= step-int(step);
frequenza = 440;
fasore = (frequenza/ma.SR) : (+ : decimale) ~ _;
riscalamento_fasi = fasore-0.5;
//il -0.5 serve per non creare un out solo positivo.
ampiezza_fasore = 1;
//controllo ampiezza
process = ampiezza_fasore, ampiezza_fasore;
//abbiamo quindi in uscita due fasori in parallelo
per la stessa frequenza precedentemente determinata.
| https://raw.githubusercontent.com/LucaSpanedda/Guida_Primi_Codici_in_FAUST/9156161207dd484de70e2be871edeeada62d9d8c/0.30_Frequenza_variabile.dsp | faust | FREQUENZA VARIABILE
Nella nostra definizione del fasore,
sappiamo che la nostra frequenza è definita
dal valore che definisce gli step d'incremento per ogni campione.
ad esempio:
ad una frequenza di campionamento (fissa),
per l'appunto di 48000samples al secondo,
sappiamo che se impiegassimo un valore incrementale piccolo,
che impiegasse 48000 STEP
successivi per arrivare dal numero 0. al numero 1. per poi resettarsi,
avremmo dunque 1 sola oscilazione per ogni secondo,
essendo il nostro secondo definito da 48000 campioni.
se avessimo invece un passo incrementale che impiegasse solo la metà
dei nostri 48000 campioni (e dunque 24000) per arrivare da 0. a 1.
per poi resettarsi,
avremo invece due oscillazioni al secondo
e così via.
quindi se volessimo controllare la frequenza del nostro fasore,
abbiamo bisogno di conoscere la frequenza di campionamento.
e dire che:
la frequenza che vogliamo per il fasore/ frequenza di campionamento.
dandoci come risultato quello STEP INCREMENTALE
che ci permette di arrivare da 0. a 1. risettandosi
tante volte quante quelle determinate dalla frequenza che vogliamo.
FAUST ha una sua libreria che permette di richiamare
all'interno del codice, l'attuale frequenza di campionamento.
la libreria si può richiamare così:
import("stdfaust.lib");
e il comando per richiamare la frequenza di campionamento attuale è:
ma.SR
per definire dunque quanti Hz rispetto al sample-rate in un secondo,
vogliamo che faccia la nostra rampa,
dobbiamo definire il processo così:
frequenza = 400;
fasore = (frequenza/ma.SR) : (+ : decimale) ~ _;
CODICE:
il -0.5 serve per non creare un out solo positivo.
controllo ampiezza
abbiamo quindi in uscita due fasori in parallelo
|
import("stdfaust.lib");
decimale(step)= step-int(step);
frequenza = 440;
fasore = (frequenza/ma.SR) : (+ : decimale) ~ _;
riscalamento_fasi = fasore-0.5;
ampiezza_fasore = 1;
process = ampiezza_fasore, ampiezza_fasore;
per la stessa frequenza precedentemente determinata.
|
bc5b09110b955bf6633861081dc788b6a2c82ae6d464e4c6df91ee328df3d91c | oshibka404/synt | triangle.dsp | import("stdfaust.lib");
cc = library("../midi_controls.dsp");
triangle_level_attack = vgroup("Triangle", hslider("Attack[1]", .001, .001, 1, .001));
triangle_level_decay = vgroup("Triangle", hslider("Decay[2]", 1, 0.1, 1, .001));
triangle_level_sustain = vgroup("Triangle", hslider("Sustain[3]", 1, .001, 1, .001));
triangle_level_release = vgroup("Triangle", hslider("Release[4]", .001, .001, 1, .001));
triangle_level_envelope = en.adsr(
triangle_level_attack,
triangle_level_decay,
triangle_level_sustain,
triangle_level_release,
cc.gate
);
triangle_osc = os.triangle(cc.freq) * triangle_level_envelope;
process = triangle_osc;
| https://raw.githubusercontent.com/oshibka404/synt/37f54d7d26752efb66baab79cbba2d4044a9e295/faust/oscillators/triangle.dsp | faust | import("stdfaust.lib");
cc = library("../midi_controls.dsp");
triangle_level_attack = vgroup("Triangle", hslider("Attack[1]", .001, .001, 1, .001));
triangle_level_decay = vgroup("Triangle", hslider("Decay[2]", 1, 0.1, 1, .001));
triangle_level_sustain = vgroup("Triangle", hslider("Sustain[3]", 1, .001, 1, .001));
triangle_level_release = vgroup("Triangle", hslider("Release[4]", .001, .001, 1, .001));
triangle_level_envelope = en.adsr(
triangle_level_attack,
triangle_level_decay,
triangle_level_sustain,
triangle_level_release,
cc.gate
);
triangle_osc = os.triangle(cc.freq) * triangle_level_envelope;
process = triangle_osc;
|
|
839bc145104bdb14cdd83b0847a0a7582414a6132f102d56a09fda018a16eb48 | oshibka404/synt | saw.dsp | import("stdfaust.lib");
cc = library("../midi_controls.dsp");
saw_level_attack = vgroup("Saw", hslider("Attack[1]", .001, .001, 1, .001));
saw_level_decay = vgroup("Saw", hslider("Decay[2]", .3, 0.1, 1, .001));
saw_level_sustain = vgroup("Saw", hslider("Sustain[3]", .2, .001, 1, .001));
saw_level_release = vgroup("Saw", hslider("Release[4]", .001, .001, 1, .001));
saw_level_envelope = en.adsr(
saw_level_attack,
saw_level_decay,
saw_level_sustain,
saw_level_release,
cc.gate
);
saw_osc = os.sawtooth(cc.freq) * saw_level_envelope;
process = saw_osc;
| https://raw.githubusercontent.com/oshibka404/synt/37f54d7d26752efb66baab79cbba2d4044a9e295/faust/oscillators/saw.dsp | faust | import("stdfaust.lib");
cc = library("../midi_controls.dsp");
saw_level_attack = vgroup("Saw", hslider("Attack[1]", .001, .001, 1, .001));
saw_level_decay = vgroup("Saw", hslider("Decay[2]", .3, 0.1, 1, .001));
saw_level_sustain = vgroup("Saw", hslider("Sustain[3]", .2, .001, 1, .001));
saw_level_release = vgroup("Saw", hslider("Release[4]", .001, .001, 1, .001));
saw_level_envelope = en.adsr(
saw_level_attack,
saw_level_decay,
saw_level_sustain,
saw_level_release,
cc.gate
);
saw_osc = os.sawtooth(cc.freq) * saw_level_envelope;
process = saw_osc;
|
|
64609f6561d5f54034b99d568808435425732995e5485bdd3e79849249ad3814 | PierreKy-org/plugins_server_webaudiomodules | smoothDelay.dsp | declare name "smoothDelay";
declare author "Yann Orlarey";
declare copyright "Grame";
declare version "1.0";
declare license "STK-4.3";
//--------------------------process----------------------------
//
// A stereo smooth delay with a feedback control
//
// This example shows how to use sdelay, a delay that doesn't
// click and doesn't transpose when the delay time is changed
//-------------------------------------------------------------
import("stdfaust.lib");
process = par(i, 2, voice)
with
{
voice = (+ : de.sdelay(N, interp, dtime)) ~ *(fback);
N = int(2^19);
interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0;
dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 5000, 0.1)*ma.SR/1000.0;
fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0;
};
| https://raw.githubusercontent.com/PierreKy-org/plugins_server_webaudiomodules/9b1b3b6d814bdb15a5f0cdd41695f8b987dbf600/pluginsWithoutFetch/smoothDelay/smoothDelay.dsp | faust | --------------------------process----------------------------
A stereo smooth delay with a feedback control
This example shows how to use sdelay, a delay that doesn't
click and doesn't transpose when the delay time is changed
------------------------------------------------------------- | declare name "smoothDelay";
declare author "Yann Orlarey";
declare copyright "Grame";
declare version "1.0";
declare license "STK-4.3";
import("stdfaust.lib");
process = par(i, 2, voice)
with
{
voice = (+ : de.sdelay(N, interp, dtime)) ~ *(fback);
N = int(2^19);
interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*ma.SR/1000.0;
dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 5000, 0.1)*ma.SR/1000.0;
fback = hslider("feedback[style:knob]",0,0,100,0.1)/100.0;
};
|
85e997a657907dafd91283f8591d2a28054d7bd1690f0ee09e9ec5221e6a197d | HexHive/datAFLow | t4b.dsp | import("stdfaust.lib");
R = 4;
N = R*R;
src = par(i, N, i);
bus = par(i, N, _);
//xr = route(N,N,par(i, N, (i+1,N-i)));
r = ro.interleave(R,R);
// NxM -> MxN
// i: NxM ->
/*
k:0..NxM-1
i:0..N-1; j:0..M-1
0 -> 0*M
1 -> 1*M
2 -> 2*M
i -> (i%N)*M + i/N
*/
xr(N,M) = route(16, 16, par(i, N, (i+1, (i%N)*M + int(i/N) + 1)));
wxw(N,M) = route(N*M, N*M, par(i, N*M, (i+1, (i%N)*M + int(i/N) + 1)));
zxw(N,M) = route(N*M, N*M, par(i, N*M, (i+1, (i%N)*M+1)));
zzxw(N,M) = route(N*M, N*M, par(i, N*M, (i+1, i/N)));
xw(N,M) = route(N*M, N*M, par(i, N*M, (i+1, (i%N)*M + i/N + 1)));
test = route(4, 4, par(i, 4, (i*5)/4));
process = xw(R,R); | https://raw.githubusercontent.com/HexHive/datAFLow/b9f3cbc42b1970f8655817c9fb67b1eaba3ae4c0/evaluation/ddfuzz/seeds/faust/t4b.dsp | faust | xr = route(N,N,par(i, N, (i+1,N-i)));
NxM -> MxN
i: NxM ->
k:0..NxM-1
i:0..N-1; j:0..M-1
0 -> 0*M
1 -> 1*M
2 -> 2*M
i -> (i%N)*M + i/N
| import("stdfaust.lib");
R = 4;
N = R*R;
src = par(i, N, i);
bus = par(i, N, _);
r = ro.interleave(R,R);
xr(N,M) = route(16, 16, par(i, N, (i+1, (i%N)*M + int(i/N) + 1)));
wxw(N,M) = route(N*M, N*M, par(i, N*M, (i+1, (i%N)*M + int(i/N) + 1)));
zxw(N,M) = route(N*M, N*M, par(i, N*M, (i+1, (i%N)*M+1)));
zzxw(N,M) = route(N*M, N*M, par(i, N*M, (i+1, i/N)));
xw(N,M) = route(N*M, N*M, par(i, N*M, (i+1, (i%N)*M + i/N + 1)));
test = route(4, 4, par(i, 4, (i*5)/4));
process = xw(R,R); |
56576a47f136cd5560f4747d27c5db55918ceb4791917818d698aba11555abbc | LucaSpanedda/Musical_Studies_of_Chaotic_Systems | 1.03_Lorenz.dsp | // import Standard Faust library
// https://github.com/grame-cncm/faustlibraries/
import("stdfaust.lib");
// Lorenz System Osc with 3 Out
lorenz(x0,y0,z0) = ( x+_,y+_,z+_ : loop ) ~ si.bus(3)
with {
x = x0-x0';
y = y0-y0';
z = z0-z0';
sigma = 10.0; // a
rho = 28; // b
beta = 2.666667; // c
dt = 0.005; // d
// iterative times increasing
q = 1.0;
loop(x,y,z) =
(x+(sigma*(y-x))*dt)*q,
(y+ (rho*x -(x*z) -y)*dt)*q,
(z+ ((x*y)-(beta*z)) *dt)*q;
};
process = lorenz(1.2,1.3,1.6); | https://raw.githubusercontent.com/LucaSpanedda/Musical_Studies_of_Chaotic_Systems/d8b78c011cc0b2b75f74643eba78306d6a3f92df/1.03_Lorenz.dsp | faust | import Standard Faust library
https://github.com/grame-cncm/faustlibraries/
Lorenz System Osc with 3 Out
a
b
c
d
iterative times increasing | import("stdfaust.lib");
lorenz(x0,y0,z0) = ( x+_,y+_,z+_ : loop ) ~ si.bus(3)
with {
x = x0-x0';
y = y0-y0';
z = z0-z0';
q = 1.0;
loop(x,y,z) =
(x+(sigma*(y-x))*dt)*q,
(y+ (rho*x -(x*z) -y)*dt)*q,
(z+ ((x*y)-(beta*z)) *dt)*q;
};
process = lorenz(1.2,1.3,1.6); |
a04fb25f3162559f31a20d881ad95fb6456fd7b6944647cd2245e472aed25e9d | prithviKantanAAU/STS_ObsPerf | energyTest.dsp | import("stdfaust.lib");
energy = hslider("energy",0,0,1,0.001) : si.smoo;
f_Hz = 220 + energy * RANGE_f_Hz;
gain = 0.5 + sqrt(energy) * RANGE_gain;
breathGain = energy * RANGE_drive;
drive = energy * RANGE_drive;
overblow = 0.5 + energy * RANGE_gain * RANGE_gain * 2;
subAmp = energy * RANGE_subAmp;
RANGE_f_Hz = hslider("SUBPARAM_freq_Hz",440,0,1200,0.01) : si.smoo;
RANGE_gain = hslider("SUBPARAM_blowPressure",0.5,0,0.5,0.001) : si.smoo;
RANGE_drive = hslider("SUBPARAM_drive",0.25,0,0.5,0.001) : si.smoo;
RANGE_subAmp = hslider("SUBPARAM_subAmp",0.0,0,2,0.001) : si.smoo;
masterGain_dB = hslider("MasterGain",0.0,-40,0,0.001) : si.smoo : ba.db2linear;
//setTempo = hslider("tempo",500,400,1000,0.001);
//at = hslider("attack",0.001,0.001,0.1,0.001);
//rl = hslider("release",0.2,0.001,1,0.001);
mouthPos = 0.5;
vib = 0;
fluteSimple(f_Hz,gain,mouthPos,vib) = pm.fluteModel(tubeLength,mouthPos,blow) * gain * gain
with{
gate = (f_Hz > 200) : si.smooth(ba.tau2pole(0.02));
envelope = gate*gain : si.smooth(ba.tau2pole(0.001));
freqDiff = f_Hz - 220;
//freqFactor = 0.999999999999 + freqDiff * 0.0080951 - freqDiff*freqDiff * 0.00002777 + freqDiff*freqDiff*freqDiff * 0.00000004097;
//tubeLength = 220 + (f_Hz - 220) * freqFactor : pm.f2l;
tubeLength = f_Hz : pm.f2l;
pressure = envelope;
vibFreq = 5 * (1 + 0.4 * ((vib - 0.036)/ 0.036));
fCut_Hz = 1200 + gain * 2500;
blow = pm.blower(pressure,0.05,fCut_Hz,vibFreq,vib);
};
trig = ba.pulse(ma.SR/setTempo * 60);
process = (fluteSimple(f_Hz,gain,overblow,vib) + breathGain * fluteSimple(f_Hz,0.5,0.5,0)),os.triangle(f_Hz/4) * subAmp :> ef.cubicnl(drive,0) * masterGain_dB <: _,_;
| https://raw.githubusercontent.com/prithviKantanAAU/STS_ObsPerf/a9b2754fa8d86316bd75905bda642bca20660b5b/energyTest.dsp | faust | setTempo = hslider("tempo",500,400,1000,0.001);
at = hslider("attack",0.001,0.001,0.1,0.001);
rl = hslider("release",0.2,0.001,1,0.001);
freqFactor = 0.999999999999 + freqDiff * 0.0080951 - freqDiff*freqDiff * 0.00002777 + freqDiff*freqDiff*freqDiff * 0.00000004097;
tubeLength = 220 + (f_Hz - 220) * freqFactor : pm.f2l;
| import("stdfaust.lib");
energy = hslider("energy",0,0,1,0.001) : si.smoo;
f_Hz = 220 + energy * RANGE_f_Hz;
gain = 0.5 + sqrt(energy) * RANGE_gain;
breathGain = energy * RANGE_drive;
drive = energy * RANGE_drive;
overblow = 0.5 + energy * RANGE_gain * RANGE_gain * 2;
subAmp = energy * RANGE_subAmp;
RANGE_f_Hz = hslider("SUBPARAM_freq_Hz",440,0,1200,0.01) : si.smoo;
RANGE_gain = hslider("SUBPARAM_blowPressure",0.5,0,0.5,0.001) : si.smoo;
RANGE_drive = hslider("SUBPARAM_drive",0.25,0,0.5,0.001) : si.smoo;
RANGE_subAmp = hslider("SUBPARAM_subAmp",0.0,0,2,0.001) : si.smoo;
masterGain_dB = hslider("MasterGain",0.0,-40,0,0.001) : si.smoo : ba.db2linear;
mouthPos = 0.5;
vib = 0;
fluteSimple(f_Hz,gain,mouthPos,vib) = pm.fluteModel(tubeLength,mouthPos,blow) * gain * gain
with{
gate = (f_Hz > 200) : si.smooth(ba.tau2pole(0.02));
envelope = gate*gain : si.smooth(ba.tau2pole(0.001));
freqDiff = f_Hz - 220;
tubeLength = f_Hz : pm.f2l;
pressure = envelope;
vibFreq = 5 * (1 + 0.4 * ((vib - 0.036)/ 0.036));
fCut_Hz = 1200 + gain * 2500;
blow = pm.blower(pressure,0.05,fCut_Hz,vibFreq,vib);
};
trig = ba.pulse(ma.SR/setTempo * 60);
process = (fluteSimple(f_Hz,gain,overblow,vib) + breathGain * fluteSimple(f_Hz,0.5,0.5,0)),os.triangle(f_Hz/4) * subAmp :> ef.cubicnl(drive,0) * masterGain_dB <: _,_;
|
a78497100349fca5b8b5668a26dbd59d8f369c69c5cfa4119f44330db5b7e5bf | DISTRHO/Fadeli | reverb-zitaRevFDN.dsp | declare name "zitaRevFDN";
declare version "0.0";
declare author "JOS, Revised by RM";
declare description "Reverb demo application based on zita_rev_fdn.";
import("stdfaust.lib");
process = dm.zita_rev_fdn_demo;
| https://raw.githubusercontent.com/DISTRHO/Fadeli/6f3cd85c6ba90ce94b7fa8e72ae3cb0f6c77dc75/dsp/reverb-zitaRevFDN.dsp | faust | declare name "zitaRevFDN";
declare version "0.0";
declare author "JOS, Revised by RM";
declare description "Reverb demo application based on zita_rev_fdn.";
import("stdfaust.lib");
process = dm.zita_rev_fdn_demo;
|
|
d18a80f5fcb169c9a4d88ed0ec78dafe1621befc6e1391fac2fa0eb1fd8008a9 | levinericzimmermann/cdd | slowMode.dsp | declare name "slowModeFilter";
declare version "1.0";
declare options "[midi:on][nvoices:16]";
// Filter instrument
import("stdfaust.lib");
baseFreq = hslider("freq",200,20,20000,0.01);
bend = ba.semi2ratio(hslider("bend[midi:pitchwheel]",0,-2,2,0.01));
freq = baseFreq * bend;
gain = hslider("gain", 0.25, 0, 1, 0.001);
gate = button("gate");
// envelope = en.adsre(8, 0.01, 0.6, 4, gate) * gain;
envelope = en.adsre(8, 0.01, 0.6, 4, gate) * gain;
attackReleaseEnv = en.smoothEnvelope(4, gate);
slowModeFilter(modeLfoFreq, originalGainLfoFreq) = _ <: modeFilter * envelope, originalFilteredSignal * envelope : bandpassFilter, _ : compressor, _ :> _ * attackReleaseEnv
with {
originalFilteredSignal = fi.bandpass(2, freq * 0.7, freq * 1.35) * 0.5;
modeDuration = ((os.lf_triangle(modeLfoFreq) + 1) * 1) + 1;
modeFilter = pm.modeFilter(freq, modeDuration, 1) * 0.01;
bandpassFilter = fi.bandpass(4, freq * 0.8, freq * 1.35);
compressor = co.compressor_mono(18, -17, 0.05, 0.08);
};
// leftModeLfoFreqGenerator = (no.sparse_noise(0.01) + 1.2) * 0.3;
// RightModeLfoFreqGenerator = (no.sparse_noise(0.04) + 1.2) * 0.3;
//
// leftOriginalGainFreqGenerator = (no.sparse_noise(0.05) + 1.2) * 0.2;
// RightOriginalGainFreqGenerator = (no.sparse_noise(0.04) + 1.2) * 0.2;
//
// process = _, _ : slowModeFilter(leftModeLfoFreqGenerator, leftOriginalGainFreqGenerator), slowModeFilter(RightModeLfoFreqGenerator, RightOriginalGainFreqGenerator);
process = _, _ : slowModeFilter(1.2, 0.31), slowModeFilter(0.9, 0.57);
| https://raw.githubusercontent.com/levinericzimmermann/cdd/7b03209a1acfc645b38f2094fd18e0c51c431e6c/etc/faust/slowMode.dsp | faust | Filter instrument
envelope = en.adsre(8, 0.01, 0.6, 4, gate) * gain;
leftModeLfoFreqGenerator = (no.sparse_noise(0.01) + 1.2) * 0.3;
RightModeLfoFreqGenerator = (no.sparse_noise(0.04) + 1.2) * 0.3;
leftOriginalGainFreqGenerator = (no.sparse_noise(0.05) + 1.2) * 0.2;
RightOriginalGainFreqGenerator = (no.sparse_noise(0.04) + 1.2) * 0.2;
process = _, _ : slowModeFilter(leftModeLfoFreqGenerator, leftOriginalGainFreqGenerator), slowModeFilter(RightModeLfoFreqGenerator, RightOriginalGainFreqGenerator); | declare name "slowModeFilter";
declare version "1.0";
declare options "[midi:on][nvoices:16]";
import("stdfaust.lib");
baseFreq = hslider("freq",200,20,20000,0.01);
bend = ba.semi2ratio(hslider("bend[midi:pitchwheel]",0,-2,2,0.01));
freq = baseFreq * bend;
gain = hslider("gain", 0.25, 0, 1, 0.001);
gate = button("gate");
envelope = en.adsre(8, 0.01, 0.6, 4, gate) * gain;
attackReleaseEnv = en.smoothEnvelope(4, gate);
slowModeFilter(modeLfoFreq, originalGainLfoFreq) = _ <: modeFilter * envelope, originalFilteredSignal * envelope : bandpassFilter, _ : compressor, _ :> _ * attackReleaseEnv
with {
originalFilteredSignal = fi.bandpass(2, freq * 0.7, freq * 1.35) * 0.5;
modeDuration = ((os.lf_triangle(modeLfoFreq) + 1) * 1) + 1;
modeFilter = pm.modeFilter(freq, modeDuration, 1) * 0.01;
bandpassFilter = fi.bandpass(4, freq * 0.8, freq * 1.35);
compressor = co.compressor_mono(18, -17, 0.05, 0.08);
};
process = _, _ : slowModeFilter(1.2, 0.31), slowModeFilter(0.9, 0.57);
|
e461618d0b65207b150a2b13aa08d6c8ec397d1051873196c359cf5a78354258 | SMERM/BN-Tedesco | sine.dsp | import("stdfaust.lib");
decimal(x) = x - floor(x);
freq = 440;
step = freq/ma.SR;
phasor(freq) = +(freq/ma.SR)~decimal: -(step);
sine = sin(phasor(freq)*2*ma.PI);
process = sine;
| https://raw.githubusercontent.com/SMERM/BN-Tedesco/2a77e1707f7e64c512dd40d58d29c0db8092463d/COME-01/20200401/sine.dsp | faust | import("stdfaust.lib");
decimal(x) = x - floor(x);
freq = 440;
step = freq/ma.SR;
phasor(freq) = +(freq/ma.SR)~decimal: -(step);
sine = sin(phasor(freq)*2*ma.PI);
process = sine;
|
|
7a03f1b3bb0f4fdb0fc07af43e834ad5eaca7ea943c92fac599ebf91892be9e2 | dxinteractive/mosfez-faust-dsp | mosfez-faust-tremolo.dsp | // mosfez-faust-tremolo.dsp
// A tremolo pedal test with Faust. Wizard: 6% CPU
// - Knob A controls speed from 0.125Hz - 2Hz - 32Hz.
// - Knob B controls depth from 0% to 100%.
import("stdfaust.lib");
speed = 2 ^ hslider("speed[OWL:A]",2.4,-3.0,5.0,0.001);
depth = hslider("depth[OWL:B]",0.5,0.0,1.0,0.001);
gain = os.osc(speed) * depth + 1.0;
fx = _ * gain * 3.0;
process = fx,fx;
| https://raw.githubusercontent.com/dxinteractive/mosfez-faust-dsp/049c39bcf26289e005d788dd202af8e68afaec65/mosfez-faust-tremolo.dsp | faust | mosfez-faust-tremolo.dsp
A tremolo pedal test with Faust. Wizard: 6% CPU
- Knob A controls speed from 0.125Hz - 2Hz - 32Hz.
- Knob B controls depth from 0% to 100%. |
import("stdfaust.lib");
speed = 2 ^ hslider("speed[OWL:A]",2.4,-3.0,5.0,0.001);
depth = hslider("depth[OWL:B]",0.5,0.0,1.0,0.001);
gain = os.osc(speed) * depth + 1.0;
fx = _ * gain * 3.0;
process = fx,fx;
|
6778b399236e82482508127e6b5a1d057829792765974dd1358597f30c1c8c81 | Msc-program/Jacklink | freeverbdsp.dsp | declare name "freeverb";
declare version "0.0";
declare author "Romain Michon";
declare license "LGPL";
declare description "Freeverb implementation in Faust, from the Faust Library's dm.freeverb_demo in demos.lib";
import("stdfaust.lib");
//----------------------------`(dm.)freeverb_demo`-------------------------
// Freeverb demo application.
//
// #### Usage
//
// ```
// _,_ : freeverb_demo : _,_;
// ```
//------------------------------------------------------------
// Author: Romain Michon
// License: LGPL
freeverb_demo = _,_ <: (*(g)*fixedgain,*(g)*fixedgain :
re.stereo_freeverb(combfeed, allpassfeed, damping, spatSpread)),
*(1-g), *(1-g) :> _,_
with{
scaleroom = 0.28;
offsetroom = 0.7;
allpassfeed = 0.5;
scaledamp = 0.4;
fixedgain = 0.1;
origSR = 44100;
parameters(x) = hgroup("Freeverb",x);
knobGroup(x) = parameters(vgroup("[0]",x));
damping = knobGroup(vslider("[0] Damp [style: knob] [tooltip: Somehow control the
density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR);
combfeed = knobGroup(vslider("[1] RoomSize [style: knob] [tooltip: The room size
between 0 and 1 with 1 for the largest room.]", 0.1, 0, 1, 0.025)*scaleroom*
origSR/ma.SR + offsetroom);
spatSpread = knobGroup(vslider("[2] Stereo Spread [style: knob] [tooltip: Spatial
spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR
: int);
g = parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal
between 0 and 1 with 1 for the maximum amount of reverb.]", 0.1, 0, 1, 0.025));
};
process = freeverb_demo;
| https://raw.githubusercontent.com/Msc-program/Jacklink/70b8634173e66d89884bb77b70b7b3ed01f71f79/faust-src/freeverbdsp.dsp | faust | ----------------------------`(dm.)freeverb_demo`-------------------------
Freeverb demo application.
#### Usage
```
_,_ : freeverb_demo : _,_;
```
------------------------------------------------------------
Author: Romain Michon
License: LGPL | declare name "freeverb";
declare version "0.0";
declare author "Romain Michon";
declare license "LGPL";
declare description "Freeverb implementation in Faust, from the Faust Library's dm.freeverb_demo in demos.lib";
import("stdfaust.lib");
freeverb_demo = _,_ <: (*(g)*fixedgain,*(g)*fixedgain :
re.stereo_freeverb(combfeed, allpassfeed, damping, spatSpread)),
*(1-g), *(1-g) :> _,_
with{
scaleroom = 0.28;
offsetroom = 0.7;
allpassfeed = 0.5;
scaledamp = 0.4;
fixedgain = 0.1;
origSR = 44100;
parameters(x) = hgroup("Freeverb",x);
knobGroup(x) = parameters(vgroup("[0]",x));
damping = knobGroup(vslider("[0] Damp [style: knob] [tooltip: Somehow control the
density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR);
combfeed = knobGroup(vslider("[1] RoomSize [style: knob] [tooltip: The room size
between 0 and 1 with 1 for the largest room.]", 0.1, 0, 1, 0.025)*scaleroom*
origSR/ma.SR + offsetroom);
spatSpread = knobGroup(vslider("[2] Stereo Spread [style: knob] [tooltip: Spatial
spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR
: int);
g = parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal
between 0 and 1 with 1 for the maximum amount of reverb.]", 0.1, 0, 1, 0.025));
};
process = freeverb_demo;
|
a044742f4bcec67d57c8595ef5d67e9808890ab08085f7f53d3d22a51745c469 | CICM-research-composition/livepatching | bubble.dsp | declare name "bubble";
declare description "Production of a water drop bubble sound.";
declare license "MIT";
declare copyright "(c) 2017: Yann Orlarey, GRAME";
import("stdfaust.lib");
//---------------------------`bubble`--------------------------
// bubble(f0, trig) : produces a water drop bubble sound
//
// #### Usage
//
// ```
// bubble(f0, trig) : _
// ```
//
// Where:
//
// * ` f0 `: base frequency of bubble sound
// * `trig`: trigs the bubble sound on the rising front
//
// #### Example
//
// ```
// button("drop") : bubble(600) : _
// ```
//
// #### Reference:
//
// <http://www.cs.ubc.ca/~kvdoel/publications/tap05.pdf>
//------------------------------------------------------------
bubble(f0,trig) = os.osc(f) * (exp(-damp*time) : si.smooth(0.99))
with {
damp = 0.043*f0 + 0.0014*f0^(3/2);
f = f0*(1+sigma*time);
sigma = eta * damp;
eta = 0.075;
time = 0 : (select2(trig>trig'):+(1)) ~ _ : ba.samp2sec;
};
//process = ba.pulsen(10,hslider("v:bubble/temps", 40000, 100, 100000, 1) ) : bubble(hslider("v:bubble/freq", 600, 150, 2000, 1)) <: dm.freeverb_demo;
process = bubble(hslider("v:bubble/freq", 600, 150, 2000, 1), button("play")) <: dm.freeverb_demo;
| https://raw.githubusercontent.com/CICM-research-composition/livepatching/da47667b3f5236b4b81cb05593f35d408caaca9e/source/bubble.dsp | faust | ---------------------------`bubble`--------------------------
bubble(f0, trig) : produces a water drop bubble sound
#### Usage
```
bubble(f0, trig) : _
```
Where:
* ` f0 `: base frequency of bubble sound
* `trig`: trigs the bubble sound on the rising front
#### Example
```
button("drop") : bubble(600) : _
```
#### Reference:
<http://www.cs.ubc.ca/~kvdoel/publications/tap05.pdf>
------------------------------------------------------------
process = ba.pulsen(10,hslider("v:bubble/temps", 40000, 100, 100000, 1) ) : bubble(hslider("v:bubble/freq", 600, 150, 2000, 1)) <: dm.freeverb_demo; | declare name "bubble";
declare description "Production of a water drop bubble sound.";
declare license "MIT";
declare copyright "(c) 2017: Yann Orlarey, GRAME";
import("stdfaust.lib");
bubble(f0,trig) = os.osc(f) * (exp(-damp*time) : si.smooth(0.99))
with {
damp = 0.043*f0 + 0.0014*f0^(3/2);
f = f0*(1+sigma*time);
sigma = eta * damp;
eta = 0.075;
time = 0 : (select2(trig>trig'):+(1)) ~ _ : ba.samp2sec;
};
process = bubble(hslider("v:bubble/freq", 600, 150, 2000, 1), button("play")) <: dm.freeverb_demo;
|
2446e05269ff56cc245d3a80b59ae30d2148e35dbeb2b59051735b483f38058d | daniel-kelley/gac | tabgroup.dsp | import("stdfaust.lib");
saw(f,g) = os.sawtooth(f)*g;
saw1 = saw(f,g)
with {
q(x) = vgroup("saw1", x);
f = q(hslider("freq",440,50,1000,0.1));
g = q(hslider("gain",0,0,1,0.01));
};
saw2 = saw(f,g)
with {
q(x) = vgroup("saw2", x);
f = q(hslider("freq",440,50,1000,0.1));
g = q(hslider("gain",0,0,1,0.01));
};
process = tgroup("TG",saw1,saw2);
//Fader(in) = ba.db2linear(vslider("Input %in", -10, -96, 4, 0.1));
//Mixer(N,out) = hgroup("Output %out", par(in, N, *(Fader(in)) ) :> _ );
//Matrix(N,M) = tgroup("Matrix %N x %M", par(in, N, _) <: par(out, M, Mixer(N, out)));
//
//process = Matrix(8, 8);
| https://raw.githubusercontent.com/daniel-kelley/gac/cdc00a3d467abb9c3f212ba9b60efe3df07e0385/test/tabgroup.dsp | faust | Fader(in) = ba.db2linear(vslider("Input %in", -10, -96, 4, 0.1));
Mixer(N,out) = hgroup("Output %out", par(in, N, *(Fader(in)) ) :> _ );
Matrix(N,M) = tgroup("Matrix %N x %M", par(in, N, _) <: par(out, M, Mixer(N, out)));
process = Matrix(8, 8); | import("stdfaust.lib");
saw(f,g) = os.sawtooth(f)*g;
saw1 = saw(f,g)
with {
q(x) = vgroup("saw1", x);
f = q(hslider("freq",440,50,1000,0.1));
g = q(hslider("gain",0,0,1,0.01));
};
saw2 = saw(f,g)
with {
q(x) = vgroup("saw2", x);
f = q(hslider("freq",440,50,1000,0.1));
g = q(hslider("gain",0,0,1,0.01));
};
process = tgroup("TG",saw1,saw2);
|
5e4afde5a896ec0a1ac1059528ccbacdfd4a2096fd4327a384f61adf57d21c96 | DISTRHO/Fadeli | reverb-zitaRev.dsp | declare name "zitaRev";
declare version "0.0";
declare author "JOS, Revised by RM";
declare description "Example GUI for zita_rev1_stereo (mostly following the Linux zita-rev1 GUI).";
import("stdfaust.lib");
process = dm.zita_rev1;
| https://raw.githubusercontent.com/DISTRHO/Fadeli/6f3cd85c6ba90ce94b7fa8e72ae3cb0f6c77dc75/dsp/reverb-zitaRev.dsp | faust | declare name "zitaRev";
declare version "0.0";
declare author "JOS, Revised by RM";
declare description "Example GUI for zita_rev1_stereo (mostly following the Linux zita-rev1 GUI).";
import("stdfaust.lib");
process = dm.zita_rev1;
|
|
cb262d5ca8f4a6aa639fbd620c2da4dc2f5ac10b94308029db457c2417f8fb5a | francescoganassin/FaustDSP-synths | ganassynth.dsp | import("stdfaust.lib");
waveGenerator = os.sawtooth(freq) + os.triangle(freq*4) + os.triangle(freq*2)
with {
freq = hslider("freq",500,20,5000,1);
};
envelope = hgroup("[Envelope]",en.adsr(attack,decay,sustain,release,gate)*gate*0.3)
with{
attack = hslider("[0]Attack[style:knob]",100,1,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.1,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]Gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("Synth",waveGenerator*envelope); | https://raw.githubusercontent.com/francescoganassin/FaustDSP-synths/ef9eb3da660f4d53e631a12b7e4f63944c57f61c/ganassynth.dsp | faust | import("stdfaust.lib");
waveGenerator = os.sawtooth(freq) + os.triangle(freq*4) + os.triangle(freq*2)
with {
freq = hslider("freq",500,20,5000,1);
};
envelope = hgroup("[Envelope]",en.adsr(attack,decay,sustain,release,gate)*gate*0.3)
with{
attack = hslider("[0]Attack[style:knob]",100,1,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.1,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]Gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("Synth",waveGenerator*envelope); |
|
37cb21acb655fd067d59a3e89d4bde0bcdf9a437c22038217076d6d8a1940885 | olilarkin/OL-OWLPatches | WeirdPhaser.dsp | declare name "Weird Phaser";
declare description "Stereo Phaser based on SSB Modulation";
declare author "Oli Larkin ([email protected])";
declare copyright "Oliver Larkin";
declare version "0.1";
declare licence "GPL";
import("IIRHilbert.lib");
import("stdfaust.lib");
mix = 0.5;
maxfeedback = 0.7;
rate = hslider("Rate [unit:hz] [OWL:PARAMETER_A]", 0, 0., 1, 0.001);
rateScalar = hslider("Rate Scalar [OWL:PARAMETER_B]", 1., 1., 40., 0.001);
offset = hslider("L-R Offset [OWL:PARAMETER_C]", 0., 0., 1., 0.001) * 0.5;
fbk = hslider("Feedback [OWL:PARAMETER_D]", 0., 0, 1., 0.01) : *(maxfeedback) : si.smooth(ba.tau2pole(0.005));
ssbfreqshift(x, offset) = (+ : negative) ~ (*(fbk) : clip(-1, 1))
with {
negative(x) = real(x)*cosv - imag(x)*sinv;
positive(x) = real(x)*cosv + imag(x)*sinv;
real(x) = hilbert(x) : _ , !;
imag(x) = hilbert(x) : ! , _;
phasor = fmod(((rate*rateScalar)/float(ma.SR) : (+ : ma.decimal) ~ _)+offset, 1.) * (2*ma.PI);
sinv = sin(phasor);
cosv = cos(phasor);
hilbert = hilbertef;
clip(lo,hi) = min(hi) : max(lo);
};
process(l,r) = l,r <: *(1-mix), *(1-mix), ssbfreqshift(l, 0.)*mix, ssbfreqshift(r, offset)*mix :> _,_; | https://raw.githubusercontent.com/olilarkin/OL-OWLPatches/2dad8107814082c9de8ef1d117950fe3f49633b6/WeirdPhaser.dsp | faust | declare name "Weird Phaser";
declare description "Stereo Phaser based on SSB Modulation";
declare author "Oli Larkin ([email protected])";
declare copyright "Oliver Larkin";
declare version "0.1";
declare licence "GPL";
import("IIRHilbert.lib");
import("stdfaust.lib");
mix = 0.5;
maxfeedback = 0.7;
rate = hslider("Rate [unit:hz] [OWL:PARAMETER_A]", 0, 0., 1, 0.001);
rateScalar = hslider("Rate Scalar [OWL:PARAMETER_B]", 1., 1., 40., 0.001);
offset = hslider("L-R Offset [OWL:PARAMETER_C]", 0., 0., 1., 0.001) * 0.5;
fbk = hslider("Feedback [OWL:PARAMETER_D]", 0., 0, 1., 0.01) : *(maxfeedback) : si.smooth(ba.tau2pole(0.005));
ssbfreqshift(x, offset) = (+ : negative) ~ (*(fbk) : clip(-1, 1))
with {
negative(x) = real(x)*cosv - imag(x)*sinv;
positive(x) = real(x)*cosv + imag(x)*sinv;
real(x) = hilbert(x) : _ , !;
imag(x) = hilbert(x) : ! , _;
phasor = fmod(((rate*rateScalar)/float(ma.SR) : (+ : ma.decimal) ~ _)+offset, 1.) * (2*ma.PI);
sinv = sin(phasor);
cosv = cos(phasor);
hilbert = hilbertef;
clip(lo,hi) = min(hi) : max(lo);
};
process(l,r) = l,r <: *(1-mix), *(1-mix), ssbfreqshift(l, 0.)*mix, ssbfreqshift(r, offset)*mix :> _,_; |
|
bbf008ab1737195c540c8c9eee97d5400611ebd5a52d8950a2706c14ff210b14 | olilarkin/OL-OWLPatches | 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] [OWL:PARAMETER_A]", 60, 24, 96, 0.1) : si.smooth(ba.tau2pole(0.01));
pitchmod = hslider("PitchMod [unit:semitones] [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 [unit:ms] [OWL:PARAMETER_C]", 20, 2, 100, 1) : *(0.001) : max(1.0/float(ma.SR));
attack = 0.005;
mix = hslider("Mix[OWL:PARAMETER_D]", 0.5, 0, 1, 0.01) : si.smooth(ba.tau2pole(0.005));
process(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), _ : *;
};
| https://raw.githubusercontent.com/olilarkin/OL-OWLPatches/2dad8107814082c9de8ef1d117950fe3f49633b6/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] [OWL:PARAMETER_A]", 60, 24, 96, 0.1) : si.smooth(ba.tau2pole(0.01));
pitchmod = hslider("PitchMod [unit:semitones] [OWL:PARAMETER_B]", 24, -64, 64, 1) : si.smooth(ba.tau2pole(0.005));
release = hslider("Release [unit:ms] [OWL:PARAMETER_C]", 20, 2, 100, 1) : *(0.001) : max(1.0/float(ma.SR));
attack = 0.005;
mix = hslider("Mix[OWL:PARAMETER_D]", 0.5, 0, 1, 0.01) : si.smooth(ba.tau2pole(0.005));
process(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), _ : *;
};
|
1172c34b9d69f23d70ed11473ed25eb1fe9b1e217e787d42331e5ed50190fe20 | droosenb/faust-on-ESP32 | ODE_Discrete.dsp | import("stdfaust.lib");
F1(x, y, d) = d(x, y)'' * 2;
F2(x, y, d) = F1 : _ + x, _ + y : d(_, _);
//midpoint =
sho(x, v) = v , -w^2 * x
with{
w = 200;
};
process = F1(_, _, sho); | https://raw.githubusercontent.com/droosenb/faust-on-ESP32/2060ad6723bed4578d5a75f8eeeacb93a7dc0b60/ODE_Solver/Midpoint(4)/ODE_Discrete.dsp | faust | midpoint = | import("stdfaust.lib");
F1(x, y, d) = d(x, y)'' * 2;
F2(x, y, d) = F1 : _ + x, _ + y : d(_, _);
sho(x, v) = v , -w^2 * x
with{
w = 200;
};
process = F1(_, _, sho); |
0ceb097f52ac95cb3a00779fb35d80ed10914c4cf3545183bc2376bd7923320f | jpcima/rc-effect-playground | chorus.dsp | import("stdfaust.lib");
bypass = checkbox("[1] Bypass");
gain1 = hslider("[2] Line 1 gain", 0.0, -20.0, 0.0, 1.0) : ba.db2linear : si.smoo;
gain2 = hslider("[3] Line 2 gain", 0.0, -20.0, 0.0, 1.0) : ba.db2linear : si.smoo;
speed = checkbox("[4] Speed");
process(x) =
ba.if(bypass, x, (x + gain1 * (x : line1) + gain2 * (x : line2))),
ba.if(bypass, x, (x + gain1 * (x : line2) + gain2 * (x : line1)))
with {
lfoRate = ba.if(speed, lfoRateI, lfoRateII);
lfo1 = 0.5 * os.lf_triangle(lfoRate);
lfo2 = 1. - lfo1;
delayfilter = fi.lowpass(5, 10000.); // a simulation of BBD antialising LPF at input and output
line1 = delayfilter : de.fdelay(delaycapframes, lfo1 : delayAt : *(ma.SR)) : delayfilter;
line2 = delayfilter : de.fdelay(delaycapframes, lfo2 : delayAt : *(ma.SR)) : delayfilter;
// line1 = delayfilter : de.fdelay1(delaycapframes, lfo1 : delayAt : *(ma.SR)) : delayfilter;
// line2 = delayfilter : de.fdelay1(delaycapframes, lfo2 : delayAt : *(ma.SR)) : delayfilter;
delayAt = *(delaymax - delaymin) : +(delaymin);
lfoRateI = 0.95;
lfoRateII = 1.6;
delaycap = 10e-3; // delay capacity, must be >> delay time
delaycapframes = int(ceil(delaycap * ma.SR)); // the same in frames, rounded up
delaymin = 1.5e-3;
delaymax = 3.5e-3;
};
| https://raw.githubusercontent.com/jpcima/rc-effect-playground/3375323d8616cbfc73c9701a3765f738d574c460/faust/chorus.dsp | faust | a simulation of BBD antialising LPF at input and output
line1 = delayfilter : de.fdelay1(delaycapframes, lfo1 : delayAt : *(ma.SR)) : delayfilter;
line2 = delayfilter : de.fdelay1(delaycapframes, lfo2 : delayAt : *(ma.SR)) : delayfilter;
delay capacity, must be >> delay time
the same in frames, rounded up | import("stdfaust.lib");
bypass = checkbox("[1] Bypass");
gain1 = hslider("[2] Line 1 gain", 0.0, -20.0, 0.0, 1.0) : ba.db2linear : si.smoo;
gain2 = hslider("[3] Line 2 gain", 0.0, -20.0, 0.0, 1.0) : ba.db2linear : si.smoo;
speed = checkbox("[4] Speed");
process(x) =
ba.if(bypass, x, (x + gain1 * (x : line1) + gain2 * (x : line2))),
ba.if(bypass, x, (x + gain1 * (x : line2) + gain2 * (x : line1)))
with {
lfoRate = ba.if(speed, lfoRateI, lfoRateII);
lfo1 = 0.5 * os.lf_triangle(lfoRate);
lfo2 = 1. - lfo1;
line1 = delayfilter : de.fdelay(delaycapframes, lfo1 : delayAt : *(ma.SR)) : delayfilter;
line2 = delayfilter : de.fdelay(delaycapframes, lfo2 : delayAt : *(ma.SR)) : delayfilter;
delayAt = *(delaymax - delaymin) : +(delaymin);
lfoRateI = 0.95;
lfoRateII = 1.6;
delaymin = 1.5e-3;
delaymax = 3.5e-3;
};
|
0fa4c4db65805901f0672b4bb1ef32d5921889c4aa34223b1d407c69480c3ce9 | RebelTechnology/OpenWareLab | 04Output.dsp | import("stdfaust.lib");
freq = hslider("Frequency[OWL:A]", 60, 60, 440, 1);
lfo_freq = hslider("LFO frequency[OWL:B]", 0.3, 0.01, 1.0, 0.01) : si.smoo;
lfo_out = hbargraph("LFO>[OWL:C]", -1, 1);
process = attach(os.osc(freq), os.osc(lfo_freq) : lfo_out);
| https://raw.githubusercontent.com/RebelTechnology/OpenWareLab/e0672d29d78cdcbf0315477b069291e415dc1ded/Faust/04Output.dsp | faust | import("stdfaust.lib");
freq = hslider("Frequency[OWL:A]", 60, 60, 440, 1);
lfo_freq = hslider("LFO frequency[OWL:B]", 0.3, 0.01, 1.0, 0.01) : si.smoo;
lfo_out = hbargraph("LFO>[OWL:C]", -1, 1);
process = attach(os.osc(freq), os.osc(lfo_freq) : lfo_out);
|
|
d9acd7eeec303b03b9d73a22bbdf30a897f5e987a0c62a1023d379c65647fc4f | FineArtMaths/FaustExperiments | TactileBell.dsp | import("stdfaust.lib");
//gain = hslider("gain", 0.5, 0, 1, 0.01);
freq = hslider("freq", 440, 50, 1000, 0.01);
gate = button("gate") : en.adsr(0.01, 0.01, 0.9, 0.1);
gain = 0.1; //an.amp_follower_ar(0.001, 2.0) , 2 : pow, 2 : * ;
//freq = 440.0;
h1Level = hslider("Fundamental", 0.5, 0, 1, 0.01);
h2Level = hslider("Octave", 0.8, 0, 1, 0.01);
inharmonicity = nentry("Inharmonicity", 1.2, 0.5, 2, 0.01);
combRes = hslider("Comb Resonance", 0.004, 0.0001, 0.017, 0.00001);
combPower = hslider("Comb Power",0.01, 0.0001, 0.011, 0.00001);
feedbackAmount = -0.999;
oVal(f, level) = os.osc(f) * level : fi.fb_fcomb(256,combRes*(20000 - f)*pow((20000 - f), combPower),0.3,feedbackAmount );
timbre(f) = oVal(f,h1Level) +
oVal(f * 2 * inharmonicity, h2Level);
process = gate * timbre(freq) * gain <: _,_;
effect = dm.freeverb_demo; | https://raw.githubusercontent.com/FineArtMaths/FaustExperiments/5b39401ea9cc16c56a06d0174b26763f8f5653e3/TactileBell.dsp | faust | gain = hslider("gain", 0.5, 0, 1, 0.01);
an.amp_follower_ar(0.001, 2.0) , 2 : pow, 2 : * ;
freq = 440.0; | import("stdfaust.lib");
freq = hslider("freq", 440, 50, 1000, 0.01);
gate = button("gate") : en.adsr(0.01, 0.01, 0.9, 0.1);
h1Level = hslider("Fundamental", 0.5, 0, 1, 0.01);
h2Level = hslider("Octave", 0.8, 0, 1, 0.01);
inharmonicity = nentry("Inharmonicity", 1.2, 0.5, 2, 0.01);
combRes = hslider("Comb Resonance", 0.004, 0.0001, 0.017, 0.00001);
combPower = hslider("Comb Power",0.01, 0.0001, 0.011, 0.00001);
feedbackAmount = -0.999;
oVal(f, level) = os.osc(f) * level : fi.fb_fcomb(256,combRes*(20000 - f)*pow((20000 - f), combPower),0.3,feedbackAmount );
timbre(f) = oVal(f,h1Level) +
oVal(f * 2 * inharmonicity, h2Level);
process = gate * timbre(freq) * gain <: _,_;
effect = dm.freeverb_demo; |
401d0c028206b348b0c76514ccefa2f46afb463ebfeebd04e557b209fac5d435 | bjornmossa/bm-faust-dsp | bmKick.dsp | declare name "bm-kick";
declare version "0.1";
declare author "Bjornmossa";
declare license "GPL v3";
import("stdfaust.lib");
body(tr, tone) = os.osci(60 * (en.ar(0.001, 0.05, tr) + tone) * en.ar(0.01, 1.0, tr));
click(tr) = (os.sawtooth(55) * en.ar(0.001, 0.009, tr)) : fi.resonlp(120, 1, 0.5);
noise(tr, tail) = (no.noise * en.ar(0.001, tail, tr)) : fi.resonlp(120, 1, 0.5);
_kick = body(tr, tone), click(tr), noise(tr, tail) :> _
with {
tr = button("trig");
tail = vslider("noise tail[style:knob]", 0.1, 0.02, 0.5, 0.01);
tone = vslider("tone[style:knob]", 1.0, 0.01, 1.2, 0.01);
};
process = hgroup("bm-kick", _kick); | https://raw.githubusercontent.com/bjornmossa/bm-faust-dsp/b852d246d5d8edf742d00e756fd7c3dae2a0eaa6/kick/bmKick.dsp | faust | declare name "bm-kick";
declare version "0.1";
declare author "Bjornmossa";
declare license "GPL v3";
import("stdfaust.lib");
body(tr, tone) = os.osci(60 * (en.ar(0.001, 0.05, tr) + tone) * en.ar(0.01, 1.0, tr));
click(tr) = (os.sawtooth(55) * en.ar(0.001, 0.009, tr)) : fi.resonlp(120, 1, 0.5);
noise(tr, tail) = (no.noise * en.ar(0.001, tail, tr)) : fi.resonlp(120, 1, 0.5);
_kick = body(tr, tone), click(tr), noise(tr, tail) :> _
with {
tr = button("trig");
tail = vslider("noise tail[style:knob]", 0.1, 0.02, 0.5, 0.01);
tone = vslider("tone[style:knob]", 1.0, 0.01, 1.2, 0.01);
};
process = hgroup("bm-kick", _kick); |
|
efb7662c70e0ef4fe0ec059bbeb93ad2fad4cf90ecbbdd428d5bba2a141aae44 | TobiasKozel/GuitarD | Phaser.dsp |
import("stdfaust.lib");
maxf = 20000;
minf = 20;
highf = vslider("highF", minf, minf, maxf, 1) : si.smooth(0.999);
lowf = vslider("lowF", maxf, minf, maxf, 1) : si.smooth(0.999);
width = vslider("Width", maxf, minf, maxf, 1) : si.smooth(0.999);
ratio = vslider("ratio", 1, 0.01, 10, 0.01) : si.smooth(0.999);
speed = vslider("speed", 2, 0.01, 20, 0.01) : si.smooth(0.999);
depth = vslider("Depth",1, 0, 2, 0.001);
level = vslider("Wah",1, 0, 1, 0.001);
fb = vslider("feedback",0, -1, 1, 0.001);
process = sp.stereoize(pf.phaser2_mono(2, 0, width, lowf, ratio, highf, speed, depth, fb, 0));
| https://raw.githubusercontent.com/TobiasKozel/GuitarD/80d5b8e6fa2eab99bbee80e6dacb5f0f482bbb52/src/nodes/phaser/Phaser.dsp | faust |
import("stdfaust.lib");
maxf = 20000;
minf = 20;
highf = vslider("highF", minf, minf, maxf, 1) : si.smooth(0.999);
lowf = vslider("lowF", maxf, minf, maxf, 1) : si.smooth(0.999);
width = vslider("Width", maxf, minf, maxf, 1) : si.smooth(0.999);
ratio = vslider("ratio", 1, 0.01, 10, 0.01) : si.smooth(0.999);
speed = vslider("speed", 2, 0.01, 20, 0.01) : si.smooth(0.999);
depth = vslider("Depth",1, 0, 2, 0.001);
level = vslider("Wah",1, 0, 1, 0.001);
fb = vslider("feedback",0, -1, 1, 0.001);
process = sp.stereoize(pf.phaser2_mono(2, 0, width, lowf, ratio, highf, speed, depth, fb, 0));
|
|
a05b8cfb270f28ee95f1d9b8bf56aca75ce442cd2b697b4793ef2e786d718675 | SuyashRamteke/FAUST---Real-time-Audio-Signal-Processing | Karplus_Strong.dsp | import ("stdfaust.lib");
string = vgroup("String", +~(de.fdelay4(maxDelLength, delLength-1) : filter : *(damping)))
with {
freq = hslider("[0]Frequency", 440, 50, 5000, 1);
damping = hslider("[1]Feedback", 0.99, 0, 1, 0.01);
maxDelLength = 960; // Since the lowest frequency of our string is 50Hz, the maxDelayLength would be atleast 48000/50 = 960
filter = _ <: _,_' :> /(2); // Divide by 2 to preserve stability in the loop
delLength = ma.SR/freq;
};
pluck = hgroup("[1]Pluck", gate : ba.impulsify*gain)
with{
gain = hslider("Gain", 0.5, 0, 1, 0.01);
gate = button("Gate");
};
process = vgroup("Karplus-Strong", pluck : string);
//Why is it not a polyphonic code?? | https://raw.githubusercontent.com/SuyashRamteke/FAUST---Real-time-Audio-Signal-Processing/ca24b8d650b6d77435d8128b0aa8e4d8b6022c30/Karplus_Strong.dsp | faust | Since the lowest frequency of our string is 50Hz, the maxDelayLength would be atleast 48000/50 = 960
Divide by 2 to preserve stability in the loop
Why is it not a polyphonic code?? | import ("stdfaust.lib");
string = vgroup("String", +~(de.fdelay4(maxDelLength, delLength-1) : filter : *(damping)))
with {
freq = hslider("[0]Frequency", 440, 50, 5000, 1);
damping = hslider("[1]Feedback", 0.99, 0, 1, 0.01);
delLength = ma.SR/freq;
};
pluck = hgroup("[1]Pluck", gate : ba.impulsify*gain)
with{
gain = hslider("Gain", 0.5, 0, 1, 0.01);
gate = button("Gate");
};
process = vgroup("Karplus-Strong", pluck : string);
|
c1eb01c1d337f44da01d61f52f85ccd66b5f12cab89fb56076d9e03c59ba5c23 | dxinteractive/mosfez-faust-dsp | proto-fixed-additive.dsp | import("stdfaust.lib");
// midi
midigate = button("gate");
midifreq = nentry("freq[unit:Hz]", 440, 20, 20000, 1);
// oscillators
partial1 = os.osc(midifreq * 1.0) * 1.0 * en.adsre(0.01,0.1,0.7,6.0,midigate);
partial2 = os.osc(midifreq * 6.0) * 0.1 * en.adsre(0.01,0.1,0.7,3.0,midigate);
partial3 = os.osc(midifreq * 17.0) * 0.02 * en.adsre(0.01,0.1,0.7,2.0,midigate);
partial4 = os.osc(midifreq * 34.0) * 0.02 * en.ar(0.001,0.0002,midigate);
fx = partial1,partial2,partial3,partial4 :> fi.dcblocker : _ * 0.3;
process = fx <: _,_;
| https://raw.githubusercontent.com/dxinteractive/mosfez-faust-dsp/1acf88459363d42d34dc3e0c8d3fffcb406af190/proto-fixed-additive.dsp | faust | midi
oscillators | import("stdfaust.lib");
midigate = button("gate");
midifreq = nentry("freq[unit:Hz]", 440, 20, 20000, 1);
partial1 = os.osc(midifreq * 1.0) * 1.0 * en.adsre(0.01,0.1,0.7,6.0,midigate);
partial2 = os.osc(midifreq * 6.0) * 0.1 * en.adsre(0.01,0.1,0.7,3.0,midigate);
partial3 = os.osc(midifreq * 17.0) * 0.02 * en.adsre(0.01,0.1,0.7,2.0,midigate);
partial4 = os.osc(midifreq * 34.0) * 0.02 * en.ar(0.001,0.0002,midigate);
fx = partial1,partial2,partial3,partial4 :> fi.dcblocker : _ * 0.3;
process = fx <: _,_;
|
ed54d22f34f37d5fefa114407a1aba16a5795d9933da730463848cfa7d7f7b4c | dxinteractive/mosfez-faust-dsp | proto-layers.dsp | import("stdfaust.lib");
changed(x) = x != x';
layerIsAwake(l,x,t) = return with {
layerChange = l : changed;
startPos = x : ba.sAndH(layerChange);
nudged = abs(x - startPos) > t;
return = layerChange,nudged : ba.on_and_off : _ == 0;
};
layerValue(l,i,x) = return with {
return = x : ba.sAndH((l == i) & layerIsAwake(l,knob,0.1));
};
layer = hslider("layer", 0.0, 0.0, 2.0, 1.0);
knob = hslider("knob", 0.0, 0.0, 1.0, 0.001);
// e.g.
process = (layerValue(layer,0,knob): hbargraph("value 0", 0.0, 1.0)), (layerValue(layer,1,knob) : hbargraph("value 1", 0.0, 1.0));
| https://raw.githubusercontent.com/dxinteractive/mosfez-faust-dsp/f138cd3d1503590eb7418b2a770a0a596c63c052/proto-layers.dsp | faust | e.g. | import("stdfaust.lib");
changed(x) = x != x';
layerIsAwake(l,x,t) = return with {
layerChange = l : changed;
startPos = x : ba.sAndH(layerChange);
nudged = abs(x - startPos) > t;
return = layerChange,nudged : ba.on_and_off : _ == 0;
};
layerValue(l,i,x) = return with {
return = x : ba.sAndH((l == i) & layerIsAwake(l,knob,0.1));
};
layer = hslider("layer", 0.0, 0.0, 2.0, 1.0);
knob = hslider("knob", 0.0, 0.0, 1.0, 0.001);
process = (layerValue(layer,0,knob): hbargraph("value 0", 0.0, 1.0)), (layerValue(layer,1,knob) : hbargraph("value 1", 0.0, 1.0));
|
7f15d53f1a8cb0293296f29b41fcfbe73e7944561aa2d5b59fd007fc768adff1 | antisvin/MyPatches | B259.dsp | // Source: https://github.com/yorgoszachos/b259wf
import("stdfaust.lib");
fold = hslider("Fold[OWL:A]", 0, 0, 1, 0.001): si.smooth(0.999);
offset = hslider("Offset[OWL:B]", 0, -1, 1, 0.001): si.smooth (0.999);
LP = hslider("Lowpass[OWL:C]", 0, 0, 1, 0.001): ba.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,ma.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,ma.SR/2.6)) ):fi.lowpass(1,scale(LP,0,1,1300,ma.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/antisvin/MyPatches/658ed3ff54ad4b86dd7eb424534b965efb259a15/Faust/B259.dsp | faust | Source: https://github.com/yorgoszachos/b259wf
fi.bandpass(1,20,16000);
folderBranches(sig) = sig <: par(i, 5, invClip(sig,i)); |
import("stdfaust.lib");
fold = hslider("Fold[OWL:A]", 0, 0, 1, 0.001): si.smooth(0.999);
offset = hslider("Offset[OWL:B]", 0, -1, 1, 0.001): si.smooth (0.999);
LP = hslider("Lowpass[OWL:C]", 0, 0, 1, 0.001): ba.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,ma.SR/2.6);
folderBranches(sig) = sig <: par(i, 5, revClip(invClip(sig,i), i));
wf(sig) = sig <: ( (folderBranches(sig) :> _) + (5.*sig:fi.lowpass(5,ma.SR/2.6)) ):fi.lowpass(1,scale(LP,0,1,1300,ma.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;
|
6ad65d28d787f08a3fa66eb4de7d4091be8d2267ad1e9edc200618effbbe588c | reverbrick/contour | FilterSinOsc.dsp | declare name "filterOSC";
declare version "0.0";
declare author "JOS, revised by RM";
declare description "Simple application demoing filter based oscillators.";
import("stdfaust.lib");
process = dm.oscrs_demo;
| https://raw.githubusercontent.com/reverbrick/contour/7f7926311cbe0bbcefe16a7641ad70bf6f10c945/FAUST/FilterSinOsc.dsp | faust | declare name "filterOSC";
declare version "0.0";
declare author "JOS, revised by RM";
declare description "Simple application demoing filter based oscillators.";
import("stdfaust.lib");
process = dm.oscrs_demo;
|
|
4921964f6a792b1f42471b72878e4ebb5000e6867454ebd44ebafbe20501526b | theyoogle/Faust-DSP | 09 Effects.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 <: _,_;
// Adding reverb (demo)
// Highly inefficient in this case because it creates a reverb for every voice
// so better to separate it out in code
effect = dm.zita_light; | https://raw.githubusercontent.com/theyoogle/Faust-DSP/373f0b309ad84906043b0b53e02129cd9ce45d59/session%2001/09%20Effects.dsp | faust | Adding reverb (demo)
Highly inefficient in this case because it creates a reverb for every voice
so better to separate it out in code | 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 <: _,_;
effect = dm.zita_light; |
946d4e5078aae0c017deedc381c3129f9dbf3c730844dc3093cf88b26dc3da0c | francescoganassin/FaustDSP-synths | ganassynth5.dsp | import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq),os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave))
with{
wave = nentry("[0]Waveform",0,0,2,1);
freq = hslider("[1]freq",440,50,2000,0.01);
};
envelope = hgroup("[Envelope]",en.adsr(attack,decay,sustain,release,gate)*gate*0.3)
with{
attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]Gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("Synth",waveGenerator*envelope);
| https://raw.githubusercontent.com/francescoganassin/FaustDSP-synths/ef9eb3da660f4d53e631a12b7e4f63944c57f61c/ganassynth5.dsp | faust | import("stdfaust.lib");
waveGenerator = hgroup("[0]Wave Generator",os.osc(freq),os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave))
with{
wave = nentry("[0]Waveform",0,0,2,1);
freq = hslider("[1]freq",440,50,2000,0.01);
};
envelope = hgroup("[Envelope]",en.adsr(attack,decay,sustain,release,gate)*gate*0.3)
with{
attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001;
decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001;
sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1);
release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001;
gain = hslider("[4]Gain[style:knob]",1,0,1,0.01);
gate = button("[5]gate");
};
process = vgroup("Synth",waveGenerator*envelope);
|
|
85ea6ea37b3d882a1ec8534b69f8a5977caae11a608b63ff5da686ab86e4656b | s-e-a-m/1987-nono-risonanze-erranti | halaphon.dsp | import("stdfaust.lib");
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
vmeter(x) = attach(x, envelop(x) : vbargraph("[03][unit:dB]", -70, +5));
hmeter(x) = attach(x, envelop(x) : hbargraph("[03][unit:dB]", -70, +5));
ramp = os.lf_sawpos(1.0/(hslider("[01] time", 3.0, 0.1, 23.0, 0.01)));
distance = hslider("[02] distance", 1, 0, 1, 0.01);
gain = vslider("[1]", 0, -70, +0, 0.1) : ba.db2linear : si.smoo;
voice(v) = vgroup("Ch %v", hgroup("[2]", *(gain) : vmeter));
mixer = hgroup("mixer", par(i, 6, voice(i)));
oorder = hgroup("Out Order", par(i, 6, outsel(i)));
outsel(o) = ba.selectoutn(7, outmenu)
with{
outmenu = nentry("[01] Out %o
[style:menu{'No Out':0;
'Out 1':1;
'Out 2':2;
'Out 3':3;
'Out 4':4;
'Out 5':5;
'Out 6':6}]", 0, 0, 7, 1) : int;
};
//process = _ : sp.spat(4, ramp, distance) : mixer;
process = no.pink_noise : sp.spat(6, ramp, distance) : oorder :> !, si.bus(6) : mixer;
| https://raw.githubusercontent.com/s-e-a-m/1987-nono-risonanze-erranti/ed20c3e3e67c65d778339a0883ab9aa7e78a418f/src/halaphon.dsp | faust | process = _ : sp.spat(4, ramp, distance) : mixer; | import("stdfaust.lib");
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
vmeter(x) = attach(x, envelop(x) : vbargraph("[03][unit:dB]", -70, +5));
hmeter(x) = attach(x, envelop(x) : hbargraph("[03][unit:dB]", -70, +5));
ramp = os.lf_sawpos(1.0/(hslider("[01] time", 3.0, 0.1, 23.0, 0.01)));
distance = hslider("[02] distance", 1, 0, 1, 0.01);
gain = vslider("[1]", 0, -70, +0, 0.1) : ba.db2linear : si.smoo;
voice(v) = vgroup("Ch %v", hgroup("[2]", *(gain) : vmeter));
mixer = hgroup("mixer", par(i, 6, voice(i)));
oorder = hgroup("Out Order", par(i, 6, outsel(i)));
outsel(o) = ba.selectoutn(7, outmenu)
with{
outmenu = nentry("[01] Out %o
[style:menu{'No Out':0;
'Out 1':1;
'Out 2':2;
'Out 3':3;
'Out 4':4;
'Out 5':5;
'Out 6':6}]", 0, 0, 7, 1) : int;
};
process = no.pink_noise : sp.spat(6, ramp, distance) : oorder :> !, si.bus(6) : mixer;
|
c380ea1ec2d2d2888ac2adb1911998bd53bf0e11ccb230896ebba67a923e1978 | Jacajack/stm32-faust-synth | simple_fm.dsp | import("stdfaust.lib");
declare polyphony "4";
osc( f ) = sin( os.phasor( 2 * ma.PI, f ) );
lin2exp( mi, ma, x ) = exp( log( ma ) * x + log( mi ) * ( 1 - x ) );
mid2hz( k ) = 440.0 * exp( ( k - 69 ) * log( pow( 2, 1 / 12 ) ) );
// Envelope generator for operator 0
eg0( g ) = en.adsre( a, d, s, r, g )
with
{
a = hslider( "a0 [analog: c5]", 0.5, 0, 1, 0.001 ) : lin2exp( 0.01, 4 ) : si.smoo;
d = hslider( "d0 [analog: c6]", 0.5, 0, 1, 0.001 ) : lin2exp( 0.01, 4 ) : si.smoo;
s = hslider( "s0 [analog: c3]", 0.5, 0, 1, 0.001 ) : si.smoo;
r = hslider( "r0 [analog: c4]", 0.5, 0, 1, 0.001 ) : lin2exp( 0.01, 4 ) : si.smoo;
};
// Envelope generator for operator 1
eg1( g ) = en.adsre( a, d, s, r, g )
with
{
a = hslider( "a1 [analog: c9]", 0.5, 0, 1, 0.001 ) : lin2exp( 0.01, 4 ) : si.smoo;
d = hslider( "d1 [analog: c10]", 0.5, 0, 1, 0.001 ) : lin2exp( 0.01, 4 ) : si.smoo;
s = hslider( "s1 [analog: c7]", 0.5, 0, 1, 0.001 ) : si.smoo;
r = hslider( "r1 [analog: c8]", 0.5, 0, 1, 0.001 ) : lin2exp( 0.01, 4 ) : si.smoo;
};
oct = hslider( "osc1oct [analog: d10]", 0, -1.5, 1.5, 1 ) : int : _ * 12;
kA = hslider( "kA [analog: d5]", 0.5, 0, 4, 0.0001 ) : si.smoo;
kf = hslider( "kf [analog: d3]", 0, 0, 4, 0.001 ) : si.smoo;
gate_0 = button( "gate_0" );
gate_1 = button( "gate_1" );
gate_2 = button( "gate_2" );
gate_3 = button( "gate_3" );
note_0 = hslider( "note_0", 0, 0, 127, 1 );
note_1 = hslider( "note_1", 0, 0, 127, 1 );
note_2 = hslider( "note_2", 0, 0, 127, 1 );
note_3 = hslider( "note_3", 0, 0, 127, 1 );
// Simple FM synthesis (2 operators)
voice( note, gate ) = op0
with
{
f0 = note + oct : mid2hz;
f1 = f0 * kf;
A0 = 1;
A1 = f0 * kA;
op1 = A1 * eg1( gate ) * osc( f1 );
op0 = A0 * eg0( gate ) * osc( f0 + op1 );
};
process = ( voice( note_0, gate_0 ) + voice( note_1, gate_1 ) + voice( note_2, gate_2 ) + voice( note_3, gate_3 ) ) / 4;
| https://raw.githubusercontent.com/Jacajack/stm32-faust-synth/5987bc2508e94318affbbccaaeaea0fd7f7ad694/faust/simple_fm.dsp | faust | Envelope generator for operator 0
Envelope generator for operator 1
Simple FM synthesis (2 operators) | import("stdfaust.lib");
declare polyphony "4";
osc( f ) = sin( os.phasor( 2 * ma.PI, f ) );
lin2exp( mi, ma, x ) = exp( log( ma ) * x + log( mi ) * ( 1 - x ) );
mid2hz( k ) = 440.0 * exp( ( k - 69 ) * log( pow( 2, 1 / 12 ) ) );
eg0( g ) = en.adsre( a, d, s, r, g )
with
{
a = hslider( "a0 [analog: c5]", 0.5, 0, 1, 0.001 ) : lin2exp( 0.01, 4 ) : si.smoo;
d = hslider( "d0 [analog: c6]", 0.5, 0, 1, 0.001 ) : lin2exp( 0.01, 4 ) : si.smoo;
s = hslider( "s0 [analog: c3]", 0.5, 0, 1, 0.001 ) : si.smoo;
r = hslider( "r0 [analog: c4]", 0.5, 0, 1, 0.001 ) : lin2exp( 0.01, 4 ) : si.smoo;
};
eg1( g ) = en.adsre( a, d, s, r, g )
with
{
a = hslider( "a1 [analog: c9]", 0.5, 0, 1, 0.001 ) : lin2exp( 0.01, 4 ) : si.smoo;
d = hslider( "d1 [analog: c10]", 0.5, 0, 1, 0.001 ) : lin2exp( 0.01, 4 ) : si.smoo;
s = hslider( "s1 [analog: c7]", 0.5, 0, 1, 0.001 ) : si.smoo;
r = hslider( "r1 [analog: c8]", 0.5, 0, 1, 0.001 ) : lin2exp( 0.01, 4 ) : si.smoo;
};
oct = hslider( "osc1oct [analog: d10]", 0, -1.5, 1.5, 1 ) : int : _ * 12;
kA = hslider( "kA [analog: d5]", 0.5, 0, 4, 0.0001 ) : si.smoo;
kf = hslider( "kf [analog: d3]", 0, 0, 4, 0.001 ) : si.smoo;
gate_0 = button( "gate_0" );
gate_1 = button( "gate_1" );
gate_2 = button( "gate_2" );
gate_3 = button( "gate_3" );
note_0 = hslider( "note_0", 0, 0, 127, 1 );
note_1 = hslider( "note_1", 0, 0, 127, 1 );
note_2 = hslider( "note_2", 0, 0, 127, 1 );
note_3 = hslider( "note_3", 0, 0, 127, 1 );
voice( note, gate ) = op0
with
{
f0 = note + oct : mid2hz;
f1 = f0 * kf;
A0 = 1;
A1 = f0 * kA;
op1 = A1 * eg1( gate ) * osc( f1 );
op0 = A0 * eg0( gate ) * osc( f0 + op1 );
};
process = ( voice( note_0, gate_0 ) + voice( note_1, gate_1 ) + voice( note_2, gate_2 ) + voice( note_3, gate_3 ) ) / 4;
|
5926cef266ce68a8c39ca30820e21dddf72e4b827c29cae0899c581373913e60 | grame-cncm/GeekBagatelles | GeekBagatelles.dsp | //declare name "Geek Bagatelles";
declare version "1.05";
declare author "Faust Grame ONE is more"; // Christophe Lebreton
declare license "BSD";
import("stdfaust.lib");
JOIE_A = component("Part_DApublic.dsp"),_:enable;
JOIE_B = component("Part_DBpublic.dsp"),_:enable;
FREUDE = component("Part_Fpublic.dsp"),_:enable;
VOCALISES = component("Part_Gpublic.dsp"),_:*;
// PROCESS
process = 1 <: multiselect_smooth(4,selection) : JOIE_A, JOIE_B, FREUDE, VOCALISES :> _ : hmeter : *(out) <: _,_
with {
out = checkbox("v:Geek Bagatelles | B. Cavanna/ ON/OFF [1]"):si.smooth(0.998);
selection = vslider("v:Geek Bagatelles | B. Cavanna/ Select Part [2] [style:radio{'JOY I':0;'JOY II':1;'FREUDE':2;'VOCALISE':3}]", 0, 0, 3, 1);
};
// MULTISELECT ////////////////////////////////////////////////////////////////////
multiselect_smooth(n,s) = par(i,n, *(i==int(s):si.smooth(0.998)));
// VUMETER ////////////////////////////////////////////////////////////////////
//-----------------------------------------------------------------------------------
hmeter(x) = attach(x, envelop(x) : hbargraph("v:Geek Bagatelles | B. Cavanna/Output[3][unit:dB]", -70, +0));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
| https://raw.githubusercontent.com/grame-cncm/GeekBagatelles/80290db00ab39e4a35d6b2449d996b910c9bb132/GeekBagatelles.dsp | faust | declare name "Geek Bagatelles";
Christophe Lebreton
PROCESS
MULTISELECT ////////////////////////////////////////////////////////////////////
VUMETER ////////////////////////////////////////////////////////////////////
----------------------------------------------------------------------------------- |
declare version "1.05";
declare license "BSD";
import("stdfaust.lib");
JOIE_A = component("Part_DApublic.dsp"),_:enable;
JOIE_B = component("Part_DBpublic.dsp"),_:enable;
FREUDE = component("Part_Fpublic.dsp"),_:enable;
VOCALISES = component("Part_Gpublic.dsp"),_:*;
process = 1 <: multiselect_smooth(4,selection) : JOIE_A, JOIE_B, FREUDE, VOCALISES :> _ : hmeter : *(out) <: _,_
with {
out = checkbox("v:Geek Bagatelles | B. Cavanna/ ON/OFF [1]"):si.smooth(0.998);
selection = vslider("v:Geek Bagatelles | B. Cavanna/ Select Part [2] [style:radio{'JOY I':0;'JOY II':1;'FREUDE':2;'VOCALISE':3}]", 0, 0, 3, 1);
};
multiselect_smooth(n,s) = par(i,n, *(i==int(s):si.smooth(0.998)));
hmeter(x) = attach(x, envelop(x) : hbargraph("v:Geek Bagatelles | B. Cavanna/Output[3][unit:dB]", -70, +0));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
|
79d1133efcbec501336dc232773c8c705f735b2cf8d65ad8b54e3df8b2e6adfe | diegov/sidechain_attenuator | sidechain_attenuator.dsp | declare name "sidechain_attenuator";
declare description "Side-chain attenuator.";
declare license "GPLv3";
declare copyright "(c) 2022: Diego Veralli";
import("stdfaust.lib");
volume_slider = hslider("[unit:dB] Volume", 0, -70, 5, 1) : si.smoo;
threshold = hslider("[unit:dB] Threshold", -20, -70, 0, 1) : si.smoo;
att_factor = hslider("[unit:dB] Attenuation", -10, -70, 0, 1) : si.smoo;
process(sigl, sigr, chainl, chainr) = sigl * gain * volume, sigr * gain * volume
with {
volume = volume_slider : ba.db2linear;
amp = (chainl + chainr) / 2.0 : an.amp_follower_ar(0.075, 1.25);
trigger = (amp : ba.linear2db) > threshold;
att_env = en.adsr(0.1, 0.05, 1, 0.75, trigger);
gain = 1.0 - (att_env * (1.0 - ba.db2linear(att_factor)));
};
| https://raw.githubusercontent.com/diegov/sidechain_attenuator/b764b51977b3af5db5263544f25834bb3f8517e3/sidechain_attenuator.dsp | faust | declare name "sidechain_attenuator";
declare description "Side-chain attenuator.";
declare license "GPLv3";
declare copyright "(c) 2022: Diego Veralli";
import("stdfaust.lib");
volume_slider = hslider("[unit:dB] Volume", 0, -70, 5, 1) : si.smoo;
threshold = hslider("[unit:dB] Threshold", -20, -70, 0, 1) : si.smoo;
att_factor = hslider("[unit:dB] Attenuation", -10, -70, 0, 1) : si.smoo;
process(sigl, sigr, chainl, chainr) = sigl * gain * volume, sigr * gain * volume
with {
volume = volume_slider : ba.db2linear;
amp = (chainl + chainr) / 2.0 : an.amp_follower_ar(0.075, 1.25);
trigger = (amp : ba.linear2db) > threshold;
att_env = en.adsr(0.1, 0.05, 1, 0.75, trigger);
gain = 1.0 - (att_env * (1.0 - ba.db2linear(att_factor)));
};
|
|
2f9d032823617e85f5c54b3d8b5dcaeba1f5ba732cbef3829ad3785ecf0149e2 | jinjor/faust2wasm-minimal-examples | Hello.dsp | import("stdfaust.lib");
freq = hslider("freq",200,50,1000,0.01);
gain = hslider("gain",0.5,0,0.5,0.01);
gate = button("gate");
process = os.sawtooth(freq) * gain * gate; | https://raw.githubusercontent.com/jinjor/faust2wasm-minimal-examples/1296b24265593ca78482bc866b38dba091418f3a/hello-midi/Hello.dsp | faust | import("stdfaust.lib");
freq = hslider("freq",200,50,1000,0.01);
gain = hslider("gain",0.5,0,0.5,0.01);
gate = button("gate");
process = os.sawtooth(freq) * gain * gate; |
|
0432785594d8970d4a150e4056801652de5634b33ea2c4b8c3d9e15622a799ad | SMERM/BN-Tedesco | distortion.dsp | declare name "Stereo filtered distortion";
declare version "0.1";
declare author "JOS, revised by RM, revised by DT";
declare description "Distortion demo application.";
import("stdfaust.lib");
process = fi.allpass_fcomb(1024,10.5,0.95) : dm.cubicnl_demo <: _,_;
| https://raw.githubusercontent.com/SMERM/BN-Tedesco/2a77e1707f7e64c512dd40d58d29c0db8092463d/COME-02/Lezioni_in_Compresenza/20200505/distortion.dsp | faust | declare name "Stereo filtered distortion";
declare version "0.1";
declare author "JOS, revised by RM, revised by DT";
declare description "Distortion demo application.";
import("stdfaust.lib");
process = fi.allpass_fcomb(1024,10.5,0.95) : dm.cubicnl_demo <: _,_;
|
|
b654d871d39f91958f7a57cb8d77062fb9d389483ab9fc667195089f39dd520a | DISTRHO/Fadeli | psychoacoustic-harmonicExciter.dsp | declare exciter_name "harmonicExciter";
declare exciter_author "Priyanka Shekar ([email protected]), revised by RM";
declare exciter_copyright "Copyright (c) 2013 Priyanka Shekar";
declare exciter_version "1.0";
declare exciter_license "MIT License (MIT)";
declare description "Psychoacoustic harmonic exciter, with GUI";
import("stdfaust.lib");
process = dm.exciter;
| https://raw.githubusercontent.com/DISTRHO/Fadeli/22352d962714828613a88f008fa41744eecfac6e/dsp/psychoacoustic-harmonicExciter.dsp | faust | declare exciter_name "harmonicExciter";
declare exciter_author "Priyanka Shekar ([email protected]), revised by RM";
declare exciter_copyright "Copyright (c) 2013 Priyanka Shekar";
declare exciter_version "1.0";
declare exciter_license "MIT License (MIT)";
declare description "Psychoacoustic harmonic exciter, with GUI";
import("stdfaust.lib");
process = dm.exciter;
|
|
d138dbc80e6ed1eb0a2f5546274c968a2dff072a446a4a38931dde8cae909c65 | droosenb/faust-wdf-library | secondorder.dsp | import("stdfaust.lib");
secondorder(R2, C2, Vin) = wd.buildtree(tree)
with{
//declare components
vin(i) = wd.u_voltage(i, Vin);
r1(i) = wd.resistor(i, 4700);
c1(i) = wd.capacitor(i, 47*10^-9);
r2(i) = wd.resistor(i, R2);
c2(i) = wd.capacitor_Vout(i, C2);
//form connection tree
tree = vin : wd.series : (r1, (wd.parallel : (c1, (wd.series: (r2, c2)))));
};
process = secondorder(4700, 47*10^-9);
| https://raw.githubusercontent.com/droosenb/faust-wdf-library/e581eb15b7b06572add939c6aa99472cca04269b/examples/01-second-order-passive/secondorder.dsp | faust | declare components
form connection tree | import("stdfaust.lib");
secondorder(R2, C2, Vin) = wd.buildtree(tree)
with{
vin(i) = wd.u_voltage(i, Vin);
r1(i) = wd.resistor(i, 4700);
c1(i) = wd.capacitor(i, 47*10^-9);
r2(i) = wd.resistor(i, R2);
c2(i) = wd.capacitor_Vout(i, C2);
tree = vin : wd.series : (r1, (wd.parallel : (c1, (wd.series: (r2, c2)))));
};
process = secondorder(4700, 47*10^-9);
|
aecb30aa15f8416b2acf441ca107d3ac89bf9c414ba403ac6c593cefe7ea71bd | ohmic-net/puca_dsp | SNESverb.dsp | // For NES-like reverb sound, you can use a single delay line, very short time ~0.15, no feedback, width set to 0.5.
// For SNES-like reverb sound, you can play with longer delay times and add some feedback to simulate a reverb tail.
import("stdfaust.lib");
delaytime = hslider("[1]delay", 0.15, 0.1, 0.3, 0.01) : si.smoo;
feedback = hslider("[2]feedback", 0.1, 0.1, 0.3, 0.01) : si.smoo;
//=============================================
width = _ <: *(1-pan),*(pan)
with{
pan = hslider("width",0.5,0,1,0.01) : si.smoo;
};
process = _,_ : + <: _,(( + : de.sdelay(ba.sec2samp(0.5), 64, ba.sec2samp(delaytime))) ~* (feedback)) * 0.5 :> _ <: width: _,_;
| https://raw.githubusercontent.com/ohmic-net/puca_dsp/784f7b87e86c817046e48a821dc1dcb0512e53af/puca_dsp-platformio-esp-idf/esp-idf_SNES_reverb/SNESverb.dsp | faust | For NES-like reverb sound, you can use a single delay line, very short time ~0.15, no feedback, width set to 0.5.
For SNES-like reverb sound, you can play with longer delay times and add some feedback to simulate a reverb tail.
============================================= |
import("stdfaust.lib");
delaytime = hslider("[1]delay", 0.15, 0.1, 0.3, 0.01) : si.smoo;
feedback = hslider("[2]feedback", 0.1, 0.1, 0.3, 0.01) : si.smoo;
width = _ <: *(1-pan),*(pan)
with{
pan = hslider("width",0.5,0,1,0.01) : si.smoo;
};
process = _,_ : + <: _,(( + : de.sdelay(ba.sec2samp(0.5), 64, ba.sec2samp(delaytime))) ~* (feedback)) * 0.5 :> _ <: width: _,_;
|
a09e387e09b97c29040f4e20cd59a130d39aa320d0800d0bdf1f892c6c918793 | mi-creative/FaustPM_2021_examples | 03_OscillatorIntegrated.dsp | import("stdfaust.lib");
/* Faust PM Workshop : Introduction to Mass-Interaction Modelling */
/* Part 3: Integrated Mass-Spring-Ground Oscillator */
// Note: in this case, we could have simply used the osil module, which is an integrated mass spring oscillator:
in1 = button("test"):ba.impulsify * 0.1;
process = in1: mi.oscil(1, 0.1, 0.001, 0, 0, 0);
| https://raw.githubusercontent.com/mi-creative/FaustPM_2021_examples/329e24a3d7c062cffb76416cff05a2922a3721f0/03_OscillatorIntegrated.dsp | faust | Faust PM Workshop : Introduction to Mass-Interaction Modelling
Part 3: Integrated Mass-Spring-Ground Oscillator
Note: in this case, we could have simply used the osil module, which is an integrated mass spring oscillator: | import("stdfaust.lib");
in1 = button("test"):ba.impulsify * 0.1;
process = in1: mi.oscil(1, 0.1, 0.001, 0, 0, 0);
|
a7ac6364eccf49fe8fd20e77e9417bfdbf28fad4935475e8d1d06a28570dc547 | rmichon/cph-fall22 | multiSynth.dsp | import("stdfaust.lib");
freq = hslider("freq",400,50,2000,0.01);
gain = hslider("gain",1,0,1,0.01);
gate = checkbox("gate");
s = nentry("select",0,0,2,1);
synth2 = par(i,3,generator(i)*((s == i) : si.smoo)) :> _*gate*gain
with{
//generator(0) = os.osc(freq);
//generator(1) = os.sawtooth(freq);
//generator(2) = os.triangle(freq);
generator(n) = ba.take(n+1,(os.osc(freq),os.sawtooth(freq),os.triangle(freq)));
};
synth = os.osc(freq)*(s == 0),os.sawtooth(freq)*(s == 1),os.triangle(freq)*(s == 2) :> _*gate*gain;
process = synth2
| https://raw.githubusercontent.com/rmichon/cph-fall22/37a78b9c1ace2d98f62f790d0bde645547bd7663/code/wednesday/multiSynth.dsp | faust | generator(0) = os.osc(freq);
generator(1) = os.sawtooth(freq);
generator(2) = os.triangle(freq); | import("stdfaust.lib");
freq = hslider("freq",400,50,2000,0.01);
gain = hslider("gain",1,0,1,0.01);
gate = checkbox("gate");
s = nentry("select",0,0,2,1);
synth2 = par(i,3,generator(i)*((s == i) : si.smoo)) :> _*gate*gain
with{
generator(n) = ba.take(n+1,(os.osc(freq),os.sawtooth(freq),os.triangle(freq)));
};
synth = os.osc(freq)*(s == 0),os.sawtooth(freq)*(s == 1),os.triangle(freq)*(s == 2) :> _*gate*gain;
process = synth2
|
7308137ac3455dd2b24e5c8ed034f067b79517c0bc6f64d5d608a2740e10866f | JoaoSvidzinski/granulateur-matriciel | jgrain7.dsp | declare name "Jgrain 7";
declare version "1.0";
import("stdfaust.lib");
//--------------------------------------------------------------------------------------//
//GENERAL MATRIX//
//--------------------------------------------------------------------------------------//
//matrix of N x M toggles//
toggle(c, in) = checkbox("h:Lines/h:Reinjection_Matrix/v:Grain%2c-->/r%3in");
Mixer(N,out) = par(in, N, *(toggle(in, in+out*N)) ) :> _ ;
Matrix(N,M) = par(in, N, _) <: par(out, M, Mixer(N, out));
//--------------------------------------------------------------------------------------//
sinus = os.sinwaveform(tablesize);
sinuso = sinus * sinus * sinus * sinus;
mili = ma.SR / 1000.0;
maxdelay = 262144;
tablesize = 192000;
//--------------------------------------------------------------------------------------//
//Grain parametres - from 0 to 1//
size(ind) = hslider("h:Grain/v:Grain_Size/size%2ind", 50, 0, 1000, 0.01);
del(ind) = hslider("h:Grain/v:Grain_Delay/del%2ind", 0, 0, 5000, 0.1);
rar(ind) = hslider("h:Grain/v:Grain_Rarefaction/rar%2ind", 0.5, 0, 1, 0.0001);
//Feedback externe - from 0 to 1//
fdx(ind) = hslider("h:Grain/v:Grain_FeedBackext/fdx%2ind", 1, 0, 1, 0.01) : si.smoo;
//Input gains - from 0 to 1//
inp(ind) = hslider("h:Grain/v:Input/inp%2ind [5]", 1, 0, 1, 0.01) : si.smoo;
//OUTPUT GAINS - from 0 to 1//
out(ind) = hslider("h:Grain/v:Output/out%2ind [6]", 1, 0, 1, 0.01) : si.smoo;
//--------------------------------------------------------------------------------------//
//FEEDBACK REINJECTION MATRICES N x N
//--------------------------------------------------------------------------------------//
fdMatrix(N) = Matrix(N, N);
//--------------------------------------------------------------------------------------//
grain(size, del, rar) = grainS
with
{
freq = 1000 / size;
Phasor = os.phasor(1, freq);
index = Phasor * tablesize;
env = rdtable(tablesize, sinuso, int(index));
No = no.noise : +(1) : *(0.5);
no_trigger = (No < rar);
No2 = no.noise : +(1);
delayInSamples = *(No2,del) : *(mili);
adjustedPhasor = Phasor : ma.decimal;
th_trigger = (adjustedPhasor > 0.001) * (adjustedPhasor@1 <= 0.001);
trig_grain = no_trigger : ba.sAndH(th_trigger);
trig_delay = delayInSamples : ba.sAndH(th_trigger);
envG = trig_grain: *(_,env);
grainS = *(_,1) : de.fdelay(maxdelay, trig_delay) : *(envG);
};
//--------------------------------------------------------------------------------------//
inputSort(n) = si.bus(2*n) <: par(i, n, (ba.selector(i, 2*n), ba.selector(i+n, 2*n)));
//--------------------------------------------------------------------------------------//
grainBlock(n) = par(i, n, (+ : grain(size(i), del(i), rar(i))));
fdBlock(n) = par(i, n, *(fdx(i)));
fdToMatrixBlock(n) = fdBlock(n) : fdMatrix(n);
inputBlock(n) = par(i, n, *(inp(i)));
outputBlock(n) = par(i, n, *(out(i)));
//--------------------------------------------------------------------------------------//
grainG(n) = (inputSort(n) : grainBlock(n)) ~ (fdToMatrixBlock(n));
jgrain(n) = inputBlock(n) : grainG(n) : outputBlock(n);
//--------------------------------------------------------------------------------------//
process = jgrain(7); | https://raw.githubusercontent.com/JoaoSvidzinski/granulateur-matriciel/b02da0189f5bae4d16c74f6fe65c04786452c792/faust/jgrain7.dsp | faust | --------------------------------------------------------------------------------------//
GENERAL MATRIX//
--------------------------------------------------------------------------------------//
matrix of N x M toggles//
--------------------------------------------------------------------------------------//
--------------------------------------------------------------------------------------//
Grain parametres - from 0 to 1//
Feedback externe - from 0 to 1//
Input gains - from 0 to 1//
OUTPUT GAINS - from 0 to 1//
--------------------------------------------------------------------------------------//
FEEDBACK REINJECTION MATRICES N x N
--------------------------------------------------------------------------------------//
--------------------------------------------------------------------------------------//
--------------------------------------------------------------------------------------//
--------------------------------------------------------------------------------------//
--------------------------------------------------------------------------------------//
--------------------------------------------------------------------------------------// | declare name "Jgrain 7";
declare version "1.0";
import("stdfaust.lib");
toggle(c, in) = checkbox("h:Lines/h:Reinjection_Matrix/v:Grain%2c-->/r%3in");
Mixer(N,out) = par(in, N, *(toggle(in, in+out*N)) ) :> _ ;
Matrix(N,M) = par(in, N, _) <: par(out, M, Mixer(N, out));
sinus = os.sinwaveform(tablesize);
sinuso = sinus * sinus * sinus * sinus;
mili = ma.SR / 1000.0;
maxdelay = 262144;
tablesize = 192000;
size(ind) = hslider("h:Grain/v:Grain_Size/size%2ind", 50, 0, 1000, 0.01);
del(ind) = hslider("h:Grain/v:Grain_Delay/del%2ind", 0, 0, 5000, 0.1);
rar(ind) = hslider("h:Grain/v:Grain_Rarefaction/rar%2ind", 0.5, 0, 1, 0.0001);
fdx(ind) = hslider("h:Grain/v:Grain_FeedBackext/fdx%2ind", 1, 0, 1, 0.01) : si.smoo;
inp(ind) = hslider("h:Grain/v:Input/inp%2ind [5]", 1, 0, 1, 0.01) : si.smoo;
out(ind) = hslider("h:Grain/v:Output/out%2ind [6]", 1, 0, 1, 0.01) : si.smoo;
fdMatrix(N) = Matrix(N, N);
grain(size, del, rar) = grainS
with
{
freq = 1000 / size;
Phasor = os.phasor(1, freq);
index = Phasor * tablesize;
env = rdtable(tablesize, sinuso, int(index));
No = no.noise : +(1) : *(0.5);
no_trigger = (No < rar);
No2 = no.noise : +(1);
delayInSamples = *(No2,del) : *(mili);
adjustedPhasor = Phasor : ma.decimal;
th_trigger = (adjustedPhasor > 0.001) * (adjustedPhasor@1 <= 0.001);
trig_grain = no_trigger : ba.sAndH(th_trigger);
trig_delay = delayInSamples : ba.sAndH(th_trigger);
envG = trig_grain: *(_,env);
grainS = *(_,1) : de.fdelay(maxdelay, trig_delay) : *(envG);
};
inputSort(n) = si.bus(2*n) <: par(i, n, (ba.selector(i, 2*n), ba.selector(i+n, 2*n)));
grainBlock(n) = par(i, n, (+ : grain(size(i), del(i), rar(i))));
fdBlock(n) = par(i, n, *(fdx(i)));
fdToMatrixBlock(n) = fdBlock(n) : fdMatrix(n);
inputBlock(n) = par(i, n, *(inp(i)));
outputBlock(n) = par(i, n, *(out(i)));
grainG(n) = (inputSort(n) : grainBlock(n)) ~ (fdToMatrixBlock(n));
jgrain(n) = inputBlock(n) : grainG(n) : outputBlock(n);
process = jgrain(7); |
517032b7772e7ac4c295a0e6c4037991c1e587f4d3c1eafafce86e80ac03010a | mrkev/pamba | Panner.dsp | import("stdfaust.lib");
g = hslider("pan",0.5,0,1,0.01);
process =
sp.panner(g);
| https://raw.githubusercontent.com/mrkev/pamba/5acc69f09e170b14a3def8d6962feb754badce28/src/dsp/Panner.dsp | faust | import("stdfaust.lib");
g = hslider("pan",0.5,0,1,0.01);
process =
sp.panner(g);
|
|
d51b4aceef659283f55f6287aa6e2d9dd58114e0fdca6ce1582e23f68de021b2 | jatinchowdhury18/wdf-bakeoff | ff2.dsp | import("stdfaust.lib");
ff2(in1) = wd.buildtree(tree)
with{
// set up components
Vin(x) = wd.u_voltage(x, in1);
Vbias(x) = wd.resVoltage(x, 0.001, 4.5);
R5(x) = wd.resistor(x, 5100.0);
R8(x) = wd.resistor(x, 1500.0);
R9(x) = wd.resistor(x, 1000.0);
RVTop(x) = wd.resistor(x, 50000.0);
RVBot(x) = wd.resistor(x, 50000.0);
R15(x) = wd.resistor(x, 22000.0);
R16(x) = wd.resistor_Iout(x, 47000.0);
R17(x) = wd.resistor(x, 27000.0);
R18(x) = wd.resistor(x, 12000.0);
C4(x) = wd.capacitor(x, 68*(10^-9));
C6(x) = wd.capacitor(x, 390*(10^-9));
C11(x) = wd.capacitor(x, 2.2*(10^-9));
C12(x) = wd.capacitor(x, 27*(10^-9));
// declare tree
S1 = wd.series : (C12, R18);
P1 = wd.parallel : (S1, R17);
S2 = wd.series : (C11, R15);
S3 = wd.series : (S2, R16);
P2 = wd.parallel : (S3, P1);
P3 = wd.parallel : (P2, RVBot);
S4 = wd.series : (P3, RVTop);
S5 = wd.series : (C6, R9);
P4 = wd.parallel : (S4, S5);
P5 = wd.parallel : (P4, R8);
S6 = wd.series : (P5, Vbias);
P6 = wd.parallel : (R5, C4);
S7 = wd.series : (P6, S6);
// where does polarity inverter need to go?
tree = Vin : S7;
};
process = ff2;
| https://raw.githubusercontent.com/jatinchowdhury18/wdf-bakeoff/84ea0d85a75f3297c4040bfa9eca62be740dc097/src/faust_wdf/ff2.dsp | faust | set up components
declare tree
where does polarity inverter need to go? | import("stdfaust.lib");
ff2(in1) = wd.buildtree(tree)
with{
Vin(x) = wd.u_voltage(x, in1);
Vbias(x) = wd.resVoltage(x, 0.001, 4.5);
R5(x) = wd.resistor(x, 5100.0);
R8(x) = wd.resistor(x, 1500.0);
R9(x) = wd.resistor(x, 1000.0);
RVTop(x) = wd.resistor(x, 50000.0);
RVBot(x) = wd.resistor(x, 50000.0);
R15(x) = wd.resistor(x, 22000.0);
R16(x) = wd.resistor_Iout(x, 47000.0);
R17(x) = wd.resistor(x, 27000.0);
R18(x) = wd.resistor(x, 12000.0);
C4(x) = wd.capacitor(x, 68*(10^-9));
C6(x) = wd.capacitor(x, 390*(10^-9));
C11(x) = wd.capacitor(x, 2.2*(10^-9));
C12(x) = wd.capacitor(x, 27*(10^-9));
S1 = wd.series : (C12, R18);
P1 = wd.parallel : (S1, R17);
S2 = wd.series : (C11, R15);
S3 = wd.series : (S2, R16);
P2 = wd.parallel : (S3, P1);
P3 = wd.parallel : (P2, RVBot);
S4 = wd.series : (P3, RVTop);
S5 = wd.series : (C6, R9);
P4 = wd.parallel : (S4, S5);
P5 = wd.parallel : (P4, R8);
S6 = wd.series : (P5, Vbias);
P6 = wd.parallel : (R5, C4);
S7 = wd.series : (P6, S6);
tree = Vin : S7;
};
process = ff2;
|
87f34f198dea63cdb99b35a779af467477b328294d97e8c3ced16a9e38c6e88d | DISTRHO/Fadeli | phasing-phaserFlangerLab.dsp | declare name "phaserFlangerLab";
import("stdfaust.lib");
//process = ol.sawtooth_demo <:
// el.flanger_demo : el.phaser2_demo :> fl.spectral_level_demo <: _,_;
fx_stack =
vgroup("[1]", dm.sawtooth_demo) <:
vgroup("[2]", dm.flanger_demo) :
vgroup("[3]", dm.phaser2_demo);
level_viewer(x,y) = attach(x, vgroup("[4]", dm.spectral_level_demo(x+y))),y;
process = fx_stack : level_viewer;
| https://raw.githubusercontent.com/DISTRHO/Fadeli/2bf9b978dd881ebb56e62b5c2acc577422001025/dsp/phasing-phaserFlangerLab.dsp | faust | process = ol.sawtooth_demo <:
el.flanger_demo : el.phaser2_demo :> fl.spectral_level_demo <: _,_; | declare name "phaserFlangerLab";
import("stdfaust.lib");
fx_stack =
vgroup("[1]", dm.sawtooth_demo) <:
vgroup("[2]", dm.flanger_demo) :
vgroup("[3]", dm.phaser2_demo);
level_viewer(x,y) = attach(x, vgroup("[4]", dm.spectral_level_demo(x+y))),y;
process = fx_stack : level_viewer;
|
6d110264b1d46ef05e3f5f971fe1c958f4bdb53f6440e4f8021739cd184efd2b | droosenb/faust-on-ESP32 | FaustSawtooth.dsp | import("stdfaust.lib");
freq = nentry("freq",440,20,1000,0.01) : si.smoo;
gain = nentry("gain[acc: 0 0 -10 0 10]",0.5,0,1,0.01) : si.smoo;
process = os.sawtooth(freq)*gain;
| https://raw.githubusercontent.com/droosenb/faust-on-ESP32/2060ad6723bed4578d5a75f8eeeacb93a7dc0b60/old_examples/AccelerometerTest/main/FaustSawtooth.dsp | faust | import("stdfaust.lib");
freq = nentry("freq",440,20,1000,0.01) : si.smoo;
gain = nentry("gain[acc: 0 0 -10 0 10]",0.5,0,1,0.01) : si.smoo;
process = os.sawtooth(freq)*gain;
|
|
1840347d96fcdb47b12f5987556cd8a7044934743b97649a620342b5cf81bca0 | TobiasKozel/GuitarD | SimpleDrive.dsp | import("stdfaust.lib");
drive = vslider( "Drive", 0, 0, 1, 0.01) : si.smooth(0.999);
offset = vslider( "Offset", 0, 0, 1, 0.01) : si.smooth(0.999);
postgain = vslider( "Post gain", 0, -80, 30, 0.1) : si.smooth(0.999);
highf = vslider( "Bass", 0, -10, 10, 0.1) : si.smooth(0.999);
// meter(r, l) = r, l : attach(_, abs : vbargraph("Level",0,1));
meter(r, l) = r, l :> + <: attach(_, vbargraph("Level",0,1));
pregain = pow(10.0,2*drive);
cubicnl = +(offset) : clip(-1,1) : cubic
with {
clip(lo,hi) = min(hi) : max(lo);
cubic(x) = x - x*x*x/3;
};
cutoff(f) = (3 * (f - 10)) * (3 * (f - 10));
dri = fi.resonhp(cutoff(highf), 0.5, 1) : cubicnl : ef.cubicnl_nodc(drive, offset) * ba.db2linear(postgain);
process = *(pregain), *(pregain) <: dri, meter, dri : attach(_, _), _; | https://raw.githubusercontent.com/TobiasKozel/GuitarD/80d5b8e6fa2eab99bbee80e6dacb5f0f482bbb52/src/nodes/simple_drive/SimpleDrive.dsp | faust | meter(r, l) = r, l : attach(_, abs : vbargraph("Level",0,1)); | import("stdfaust.lib");
drive = vslider( "Drive", 0, 0, 1, 0.01) : si.smooth(0.999);
offset = vslider( "Offset", 0, 0, 1, 0.01) : si.smooth(0.999);
postgain = vslider( "Post gain", 0, -80, 30, 0.1) : si.smooth(0.999);
highf = vslider( "Bass", 0, -10, 10, 0.1) : si.smooth(0.999);
meter(r, l) = r, l :> + <: attach(_, vbargraph("Level",0,1));
pregain = pow(10.0,2*drive);
cubicnl = +(offset) : clip(-1,1) : cubic
with {
clip(lo,hi) = min(hi) : max(lo);
cubic(x) = x - x*x*x/3;
};
cutoff(f) = (3 * (f - 10)) * (3 * (f - 10));
dri = fi.resonhp(cutoff(highf), 0.5, 1) : cubicnl : ef.cubicnl_nodc(drive, offset) * ba.db2linear(postgain);
process = *(pregain), *(pregain) <: dri, meter, dri : attach(_, _), _; |
0444accbe91ad0e7b2751d79f35563bb1793c6491aea67fd604f7b0d04739670 | magnetophon/faustExperiments | pitchTracker.dsp | import("stdfaust.lib");
BufferLength=300;
pitch(x) =
// i
ma.SR / max(M, 1) - ma.SR * (M == 0)
with {
AC(x, k) = sum(j, BufferLength, (x@(j))*(x@(j+k))) / (BufferLength) ; // Correlating two signals, on the buffer length, ideally over 600 samples with actual SR
// i = +(1) ~_ ;
i = +(1) ~_ :min(1e9):max(0);
// i = min(1e8,+(1)) ~_ ;
// i = min(1e3,+(1):max(0)) ~_ ;
// i = min(1e8,+(1)) ~_ ;
U = AC(x,i) > AC(x,0)/2; // Detection of a good correlation, AC(x,0) being the highest possible value, so its half becomes the detection threshold
V = AC(x,i) <= AC(x,i+1);
W = AC(x,i+1) > AC(x,i+2);
Y = U: *(V) : *(W);
N = (+(1) : *(1 - Y)) ~ _;
M = (N' + 1) : ba.sAndH(Y);
};
process = pitch : hbargraph("Frequency", 50, 2000): os.sawtooth ;
| https://raw.githubusercontent.com/magnetophon/faustExperiments/475def588ca4ae5b5a703cf15d30fa8851e2e147/pitchTracker.dsp | faust | i
Correlating two signals, on the buffer length, ideally over 600 samples with actual SR
i = +(1) ~_ ;
i = min(1e8,+(1)) ~_ ;
i = min(1e3,+(1):max(0)) ~_ ;
i = min(1e8,+(1)) ~_ ;
Detection of a good correlation, AC(x,0) being the highest possible value, so its half becomes the detection threshold | import("stdfaust.lib");
BufferLength=300;
pitch(x) =
ma.SR / max(M, 1) - ma.SR * (M == 0)
with {
i = +(1) ~_ :min(1e9):max(0);
V = AC(x,i) <= AC(x,i+1);
W = AC(x,i+1) > AC(x,i+2);
Y = U: *(V) : *(W);
N = (+(1) : *(1 - Y)) ~ _;
M = (N' + 1) : ba.sAndH(Y);
};
process = pitch : hbargraph("Frequency", 50, 2000): os.sawtooth ;
|
7bec34e4ac4e0aa2dc374b4d5029ee59f648c5588fe1755e0160aa33551447da | SuyashRamteke/FAUST---Real-time-Audio-Signal-Processing | PanoramicPotentiometer.dsp | import("stdfaust.lib");
// ITD: the Interaural Time Difference in samples, assuming that:
// - the distance between the two ears is: 0.2 m
// - the speed of the sound is: 340 m/s
// - the sampling rate is: ma.SR
ITD = (0.2/340)*ma.SR;
// itdpan(p): ITD based panoramic
// The parameter p indicates the position of the source:
// 0.0 (full left): 0 on the left channel, full ITD delay on the right channel
// 0.5 (center): half ITD delay on both channels
// 1.0 (full right): full ITD delay on the left channel and 0 delay on the right channel
itdpan(p) = _ <: @(p*ITD), @((1-p)*ITD);
process = ba.pulsen(1,10000) * checkbox("play") : pm.djembe(60,0.3,0.5,1) : itdpan(hslider("pan", 0.5, 0, 1, 0.01));
| https://raw.githubusercontent.com/SuyashRamteke/FAUST---Real-time-Audio-Signal-Processing/ca24b8d650b6d77435d8128b0aa8e4d8b6022c30/PanoramicPotentiometer.dsp | faust | ITD: the Interaural Time Difference in samples, assuming that:
- the distance between the two ears is: 0.2 m
- the speed of the sound is: 340 m/s
- the sampling rate is: ma.SR
itdpan(p): ITD based panoramic
The parameter p indicates the position of the source:
0.0 (full left): 0 on the left channel, full ITD delay on the right channel
0.5 (center): half ITD delay on both channels
1.0 (full right): full ITD delay on the left channel and 0 delay on the right channel | import("stdfaust.lib");
ITD = (0.2/340)*ma.SR;
itdpan(p) = _ <: @(p*ITD), @((1-p)*ITD);
process = ba.pulsen(1,10000) * checkbox("play") : pm.djembe(60,0.3,0.5,1) : itdpan(hslider("pan", 0.5, 0, 1, 0.01));
|
9c0cf95b5c0287f19cc32e655f59ec060fea4b32a25933654d7987ec26cc3d78 | cdd3/pd | eks.dsp | import("stdfaust.lib");
declare name "EKS Electric Guitar Synth";
declare author "Julius Smith";
declare version "1.0";
declare license "STK-4.3";
declare copyright "Julius Smith";
declare reference "http://ccrma.stanford.edu/~jos/pasp/vegf.html";
// -> Virtual\_Electric\_Guitars\_Faust.html";
import("music.lib"); // Define SR, delay
import("filter.lib"); // smooth, ffcombfilter,fdelay4
import("effect.lib"); // stereopanner
//==================== GUI SPECIFICATION ================
// standard MIDI voice parameters:
// NOTE: The labels MUST be "freq", "gain", and "gate" for faust2pd
freq = nentry("freq", 440, 20, 7040, 1); // Hz
gain = nentry("gain", 1, 0, 10, 0.01); // 0 to 10
gate = button("gate"); // 0 or 1
// Additional parameters (MIDI "controllers"):
// Pick angle in [0,0.9]:
pickangle = 0.9 * hslider("pick_angle",0,0,0.9,0.1);
// Normalized pick-position in [0,0.5]:
beta = hslider("pick_position", 0.13, 0.02, 0.5, 0.01);
// MIDI Control 0x81 often "highpass filter frequency"
// String decay time in seconds:
t60 = hslider("decaytime", 4, 0, 10, 0.01); // -60db decay time (sec)
// Normalized brightness in [0,1]:
B = hslider("brightness", 0.5, 0, 1, 0.01);// 0-1
// MIDI Controller 0x74 is often "brightness"
// (or VCF lowpass cutoff freq)
// Dynamic level specified as dB level desired at Nyquist limit:
L = hslider("dynamic_level", -10, -60, 0, 1) : db2linear;
// Note: A lively clavier is obtained by tying L to gain (MIDI velocity).
// Spatial "width" (not in original EKS, but only costs "one tap"):
W = hslider("center-panned_spatial_width", 0.5, 0, 1, 0.01);
A = hslider("pan_angle", 0.5, 0, 1, 0.01);
//==================== SIGNAL PROCESSING ================
//----------------------- noiseburst -------------------------
// White noise burst (adapted from Faust's karplus.dsp example)
// Requires music.lib (for noise)
noiseburst(gate,P) = noise : *(gate : trigger(P))
with {
diffgtz(x) = (x-x') > 0;
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = diffgtz : release(n) : > (0.0);
};
P = SR/freq; // fundamental period in samples
Pmax = 4096; // maximum P (for delay-line allocation)
ppdel = beta*P; // pick position delay
pickposfilter = ffcombfilter(Pmax,ppdel,-1); // defined in filter.lib
//excitation = noiseburst(gate,P) : *(gain); // defined in signal.lib
excitation = *(gain); // defined in signal.lib
rho = pow(0.001,1.0/(freq*t60)); // multiplies loop-gain
// Original EKS damping filter:
b1 = 0.5*B; b0 = 1.0-b1; // S and 1-S
dampingfilter1(x) = rho * ((b0 * x) + (b1 * x'));
// Linear phase FIR3 damping filter:
h0 = (1.0 + B)/2; h1 = (1.0 - B)/4;
dampingfilter2(x) = rho * (h0 * x' + h1*(x+x''));
loopfilter = dampingfilter2; // or dampingfilter1
filtered_excitation = excitation : smooth(pickangle)
: pickposfilter : levelfilter(L,freq); // see filter.lib
stringloop = (+ : fdelay4(Pmax, P-2)) ~ (loopfilter);
//Adequate when when brightness or dynamic level are sufficiently low:
//stringloop = (+ : fdelay1(Pmax, P-2)) ~ (loopfilter);
// Second output decorrelated somewhat for spatial diversity over imaging:
widthdelay = delay(Pmax,W*P/2);
// Assumes an optionally spatialized mono signal, centrally panned:
stereopanner(A) = _,_ : *(1.0-A), *(A);
//process = filtered_excitation : stringloop <: _,_ : widthdelay : stereopanner(A);
process = filtered_excitation : stringloop <: _,_ : (widthdelay,widthdelay) : stereopanner(A);
| https://raw.githubusercontent.com/cdd3/pd/2ddc4f9c44da75cf484284c1e2fdd8377aa5f93c/externals/chair/examples/abstractions/eks.dsp | faust | -> Virtual\_Electric\_Guitars\_Faust.html";
Define SR, delay
smooth, ffcombfilter,fdelay4
stereopanner
==================== GUI SPECIFICATION ================
standard MIDI voice parameters:
NOTE: The labels MUST be "freq", "gain", and "gate" for faust2pd
Hz
0 to 10
0 or 1
Additional parameters (MIDI "controllers"):
Pick angle in [0,0.9]:
Normalized pick-position in [0,0.5]:
MIDI Control 0x81 often "highpass filter frequency"
String decay time in seconds:
-60db decay time (sec)
Normalized brightness in [0,1]:
0-1
MIDI Controller 0x74 is often "brightness"
(or VCF lowpass cutoff freq)
Dynamic level specified as dB level desired at Nyquist limit:
Note: A lively clavier is obtained by tying L to gain (MIDI velocity).
Spatial "width" (not in original EKS, but only costs "one tap"):
==================== SIGNAL PROCESSING ================
----------------------- noiseburst -------------------------
White noise burst (adapted from Faust's karplus.dsp example)
Requires music.lib (for noise)
fundamental period in samples
maximum P (for delay-line allocation)
pick position delay
defined in filter.lib
excitation = noiseburst(gate,P) : *(gain); // defined in signal.lib
defined in signal.lib
multiplies loop-gain
Original EKS damping filter:
S and 1-S
Linear phase FIR3 damping filter:
or dampingfilter1
see filter.lib
Adequate when when brightness or dynamic level are sufficiently low:
stringloop = (+ : fdelay1(Pmax, P-2)) ~ (loopfilter);
Second output decorrelated somewhat for spatial diversity over imaging:
Assumes an optionally spatialized mono signal, centrally panned:
process = filtered_excitation : stringloop <: _,_ : widthdelay : stereopanner(A); | import("stdfaust.lib");
declare name "EKS Electric Guitar Synth";
declare author "Julius Smith";
declare version "1.0";
declare license "STK-4.3";
declare copyright "Julius Smith";
declare reference "http://ccrma.stanford.edu/~jos/pasp/vegf.html";
pickangle = 0.9 * hslider("pick_angle",0,0,0.9,0.1);
beta = hslider("pick_position", 0.13, 0.02, 0.5, 0.01);
L = hslider("dynamic_level", -10, -60, 0, 1) : db2linear;
W = hslider("center-panned_spatial_width", 0.5, 0, 1, 0.01);
A = hslider("pan_angle", 0.5, 0, 1, 0.01);
noiseburst(gate,P) = noise : *(gate : trigger(P))
with {
diffgtz(x) = (x-x') > 0;
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = diffgtz : release(n) : > (0.0);
};
dampingfilter1(x) = rho * ((b0 * x) + (b1 * x'));
h0 = (1.0 + B)/2; h1 = (1.0 - B)/4;
dampingfilter2(x) = rho * (h0 * x' + h1*(x+x''));
filtered_excitation = excitation : smooth(pickangle)
stringloop = (+ : fdelay4(Pmax, P-2)) ~ (loopfilter);
widthdelay = delay(Pmax,W*P/2);
stereopanner(A) = _,_ : *(1.0-A), *(A);
process = filtered_excitation : stringloop <: _,_ : (widthdelay,widthdelay) : stereopanner(A);
|
877100baaace3e2c9db91db08ae312a668b529c21fd183fba818321e39eda506 | bgaster/aa_examples | VL1.dsp | declare aavoices "1";
import("stdfaust.lib");
waveforms = piano, fantasy, violin, flute,
guitar1 : ba.selectn(5, wave)
with {
wave = nentry("/Waveform", 0, 0, 4, 1);
freq = hslider("freq", 440, 50, 2000, 0.01);
gain = hslider("gain", 0.5, 0, 1, 0.01);
g = button("gate");
piano = os.pulsetrain(freq, 0.7) * envelope : filter
with{
envelope = en.adsr(0.005, 0.178, 0.306, 0.178, g) * gain;
filter = fi.resonlp(3000,0.5,gain);
};
fantasy = os.pulsetrain(2*freq + vibrato, 0.5) * envelope : filter
with {
envelope = en.adsr(0.005, 0.05, 0.830, 1.303, g) * gain;
filter = fi.resonlp(3000,0.5,gain);
vibrato = os.lf_triangle(5.7)*10;
};
violin = ((os.pulsetrain(freq + vibrato, 0.5) * envelope) + (os.pulsetrain(freq + vibrato, 0.4) * envelope) + (os.pulsetrain(freq + vibrato, 0.3) * envelope) + (os.pulsetrain(freq + vibrato, 0.2) * envelope) + (os.pulsetrain(freq + vibrato, 0.1) * envelope))/5 : filter
with {
envelope = en.adsr(0.05, 0.05, 0.830, 0.25, g) * gain;
filter = fi.resonlp(3500,5,gain);
vibrato = os.lf_triangle(5.7)*5;
};
flute = os.pulsetrain(freq + vibrato, 0.5) * envelope : filter
with {
envelope = en.adsr(0.05, 0.05, 0.830, 0.25, g) * gain;
filter = fi.resonlp(3000,0.5,gain);
vibrato = os.lf_triangle(5.7)*3;
};
guitar1 = (os.pulsetrain(0.5*freq, 0.1) * envelope + os.pulsetrain(0.5*freq, 0.2) * envelope)/2 : filter
with {
envelope = en.adsr(0.03, 0.05, 0.830, 0.25, g) * gain;
filter = fi.resonlp(3500,2,gain);
};
};
process = vgroup("voices", par(n, 1, vgroup("aavoice%n", waveforms))) :> _ ;
//process = waveforms : _ ;
| https://raw.githubusercontent.com/bgaster/aa_examples/98d70668d6784b426726366148a74109b682ec4f/vl1/dsp/VL1.dsp | faust | process = waveforms : _ ;
| declare aavoices "1";
import("stdfaust.lib");
waveforms = piano, fantasy, violin, flute,
guitar1 : ba.selectn(5, wave)
with {
wave = nentry("/Waveform", 0, 0, 4, 1);
freq = hslider("freq", 440, 50, 2000, 0.01);
gain = hslider("gain", 0.5, 0, 1, 0.01);
g = button("gate");
piano = os.pulsetrain(freq, 0.7) * envelope : filter
with{
envelope = en.adsr(0.005, 0.178, 0.306, 0.178, g) * gain;
filter = fi.resonlp(3000,0.5,gain);
};
fantasy = os.pulsetrain(2*freq + vibrato, 0.5) * envelope : filter
with {
envelope = en.adsr(0.005, 0.05, 0.830, 1.303, g) * gain;
filter = fi.resonlp(3000,0.5,gain);
vibrato = os.lf_triangle(5.7)*10;
};
violin = ((os.pulsetrain(freq + vibrato, 0.5) * envelope) + (os.pulsetrain(freq + vibrato, 0.4) * envelope) + (os.pulsetrain(freq + vibrato, 0.3) * envelope) + (os.pulsetrain(freq + vibrato, 0.2) * envelope) + (os.pulsetrain(freq + vibrato, 0.1) * envelope))/5 : filter
with {
envelope = en.adsr(0.05, 0.05, 0.830, 0.25, g) * gain;
filter = fi.resonlp(3500,5,gain);
vibrato = os.lf_triangle(5.7)*5;
};
flute = os.pulsetrain(freq + vibrato, 0.5) * envelope : filter
with {
envelope = en.adsr(0.05, 0.05, 0.830, 0.25, g) * gain;
filter = fi.resonlp(3000,0.5,gain);
vibrato = os.lf_triangle(5.7)*3;
};
guitar1 = (os.pulsetrain(0.5*freq, 0.1) * envelope + os.pulsetrain(0.5*freq, 0.2) * envelope)/2 : filter
with {
envelope = en.adsr(0.03, 0.05, 0.830, 0.25, g) * gain;
filter = fi.resonlp(3500,2,gain);
};
};
process = vgroup("voices", par(n, 1, vgroup("aavoice%n", waveforms))) :> _ ;
|
7c0d7ca346308fe93155ac1cc789d006f596935a7f8ce6ca19b3a77cb6dd361f | DISTRHO/Fadeli | pitchShifting-pitchShifter.dsp | declare name "pitchShifter";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
//--------------------------------------
// Very simple real time pitch shifter
//--------------------------------------
import("stdfaust.lib");
pitchshifter = vgroup("Pitch Shifter", ef.transpose(
hslider("window (samples)", 1000, 50, 10000, 1),
hslider("xfade (samples)", 10, 1, 10000, 1),
hslider("shift (semitones) ", 0, -12, +12, 0.1)
)
);
process = pitchshifter;
| https://raw.githubusercontent.com/DISTRHO/Fadeli/22352d962714828613a88f008fa41744eecfac6e/dsp/pitchShifting-pitchShifter.dsp | faust | --------------------------------------
Very simple real time pitch shifter
-------------------------------------- | declare name "pitchShifter";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
import("stdfaust.lib");
pitchshifter = vgroup("Pitch Shifter", ef.transpose(
hslider("window (samples)", 1000, 50, 10000, 1),
hslider("xfade (samples)", 10, 1, 10000, 1),
hslider("shift (semitones) ", 0, -12, +12, 0.1)
)
);
process = pitchshifter;
|
616fa6ea7e1b567be24c35e0e20dd26a835f18b13e88b56c46aa798746d3c35c | dxinteractive/mosfez-faust-dsp | proto-pitchtracker.dsp | // read: https://pdfslide.net/documents/faust-tutorial2.html
// refer: zcr in faustlibraries
import("stdfaust.lib");
SH(trig,x) = (*(1 - trig) + x * trig) ~ _;
a = hslider("n cycles", 10, 1, 100, 1);
p = hslider("pitch", 440, 40, 1000, 1);
Pitch(a,x) = a * ma.SR / max(M,1) - a * ma.SR * (M == 0)
with {
U = (x' < 0) & (x >= 0);
V = +(U) ~ _ %(int(a));
W = U & (V == a);
N = (+(1) : *(1 - W))~ _;
M = SH(N == 0, N' + 1);
};
tracker = fi.dcblockerat(80.0) : (fi.lowpass(1) : Pitch(a)) ~ max(100);
settle = 90;
sounder(freq) = os.triangle(freq) * 0.1 * ba.if(ba.countup(settle + 1, freq != freq') > settle, 1, 0); //
fx = tracker; // : sounder;
process = _ <: _ * 10000,fx,fx;
| https://raw.githubusercontent.com/dxinteractive/mosfez-faust-dsp/b05b1b0b4e8b469e8de6e5d11e07de4d08fbac6b/proto-pitchtracker.dsp | faust | read: https://pdfslide.net/documents/faust-tutorial2.html
refer: zcr in faustlibraries
: sounder; |
import("stdfaust.lib");
SH(trig,x) = (*(1 - trig) + x * trig) ~ _;
a = hslider("n cycles", 10, 1, 100, 1);
p = hslider("pitch", 440, 40, 1000, 1);
Pitch(a,x) = a * ma.SR / max(M,1) - a * ma.SR * (M == 0)
with {
U = (x' < 0) & (x >= 0);
V = +(U) ~ _ %(int(a));
W = U & (V == a);
N = (+(1) : *(1 - W))~ _;
M = SH(N == 0, N' + 1);
};
tracker = fi.dcblockerat(80.0) : (fi.lowpass(1) : Pitch(a)) ~ max(100);
settle = 90;
process = _ <: _ * 10000,fx,fx;
|
e9e6e9c6a75eb9e21db57fce94057709f2691ebcca3102ec36cfe7778fdef08a | droosenb/faust-wdf-library | decomp-test.dsp | import("stdfaust.lib");
//resistor(r0) = !;
resistor =
case {
(0, R) => !, 0;
(1, R) => _;
(2, R) => !, R;
};
u_resistor =
case {
(0, R) => !, 0;
(1, R) => _;
(2, R) => _ + R;
};
res47k(x) = resistor(x, 46*10^3); //declaring a resistor
u_res47k(x) = u_resistor(x, 46*10^3);
getportres(A : As) = getportres(As) : getportres(A);
getportres(A) = A(2);
getportrespar(A, As) = A(2), getportrespar(As);
getportrespar(A, 0) = A(2); //dont ever do (A, !) - creates stack error
decomp(A : (As1, As2, As3)) = A : (decomp(As1), decomp(As2), decomp(As3));
decomp(A: As) = A: decomp(As);
decomp(A) = A;
split = _ <: _*2, _*.5, _*3;
tree = 5 : (split : (((_ + 2) : (_ + 3)), ((_+ 4 ) : (_+5)), (split : (((_ + 2) : (_ + 3)), ((_+ 4 ) : (_+5)), ((_ + 2) : (_ + 3))))));
process = decomp(tree);
| https://raw.githubusercontent.com/droosenb/faust-wdf-library/65d804019863c4ff86e0362792509b988bab3b84/testing-files/decomp-test.dsp | faust | resistor(r0) = !;
declaring a resistor
dont ever do (A, !) - creates stack error | import("stdfaust.lib");
resistor =
case {
(0, R) => !, 0;
(1, R) => _;
(2, R) => !, R;
};
u_resistor =
case {
(0, R) => !, 0;
(1, R) => _;
(2, R) => _ + R;
};
u_res47k(x) = u_resistor(x, 46*10^3);
getportres(A : As) = getportres(As) : getportres(A);
getportres(A) = A(2);
getportrespar(A, As) = A(2), getportrespar(As);
decomp(A : (As1, As2, As3)) = A : (decomp(As1), decomp(As2), decomp(As3));
decomp(A: As) = A: decomp(As);
decomp(A) = A;
split = _ <: _*2, _*.5, _*3;
tree = 5 : (split : (((_ + 2) : (_ + 3)), ((_+ 4 ) : (_+5)), (split : (((_ + 2) : (_ + 3)), ((_+ 4 ) : (_+5)), ((_ + 2) : (_ + 3))))));
process = decomp(tree);
|
29ff304fdef24e3f51a33d79c957071e5932b3f5722a97f240bcccd88820b456 | reverbrick/contour | lab.dsp | declare name "virtualAnalogLab";
import("stdfaust.lib");
process =
vgroup("[1]", dm.virtual_analog_oscillator_demo):
//vgroup("[2]", dm.moog_vcf_demo);
vgroup("[3]", dm.spectral_level_demo);
// See also: vgroup("[3]", dm.fft_spectral_level_demo(32))
//<: _,_;
| https://raw.githubusercontent.com/reverbrick/contour/7f7926311cbe0bbcefe16a7641ad70bf6f10c945/FAUST/lab.dsp | faust | vgroup("[2]", dm.moog_vcf_demo);
See also: vgroup("[3]", dm.fft_spectral_level_demo(32))
<: _,_; | declare name "virtualAnalogLab";
import("stdfaust.lib");
process =
vgroup("[1]", dm.virtual_analog_oscillator_demo):
vgroup("[3]", dm.spectral_level_demo);
|
0c3e021d46862f38b2b300bba431969561739b75a87cb659ab5677da35cb7801 | johannphilippe/grame_cnsmd_2023 | codegen.dsp | import("stdfaust.lib");
frequency = hslider("frequency", 100, 50, 500, 1);
amp = hslider("amplitude", 0, 0, 1, 0.1) : si.smoo;
process = os.osc(frequency) * amp;
| https://raw.githubusercontent.com/johannphilippe/grame_cnsmd_2023/88f460fdbaa76a35825d87614d0b664ad6a30f9c/code_generation/codegen.dsp | faust | import("stdfaust.lib");
frequency = hslider("frequency", 100, 50, 500, 1);
amp = hslider("amplitude", 0, 0, 1, 0.1) : si.smoo;
process = os.osc(frequency) * amp;
|
|
2b7660a8ed7ef72aa5104edb0d931dc1d3e2781d238ba2bca009c4705b0cdae9 | johannphilippe/grame_cnsmd_2023 | mono.dsp | declare options "[midi:on]";
import("stdfaust.lib");
freq = hslider("freq[midi:ctrl 11]", 100, 50, 500, 1);
process = os.osc(freq) * 0.1;
| https://raw.githubusercontent.com/johannphilippe/grame_cnsmd_2023/ccfd6e9a5c1537097546520317c8c5beea06006f/MIDI/mono.dsp | faust | declare options "[midi:on]";
import("stdfaust.lib");
freq = hslider("freq[midi:ctrl 11]", 100, 50, 500, 1);
process = os.osc(freq) * 0.1;
|
|
57ed9a1798765866a4ae3fa85a9b47013f55465e481473c7854470a418984b7d | jpecquais/faustLab | phaseRotator.dsp | declare name "Phase Alignment";
declare author "Jean-Loup Pecquais";
declare version "1.00";
declare license "GPL3";
import("stdfaust.lib");
jlpFi = library("lib/jlpFilters.lib");
//PHASE ROTATOR
phaseRotator(phi) = _ <: jlpFi.hilbert(14) : *(cos(phi)), *(sin(phi)) :> _;
//POLARITY SWITCH
/*
Simple phase inversion witch
*/
polarity(sw) = *(2*sw-1);
/////////////////////////
//PANELS & PROPERTIES///
///////////////////////
inputPanel = vgroup("[1]Input Section", polarity(sw) : jlpFi.highpassN(N,4,fc)) with{
sw = hslider("[0]polaritySwitch", 0, 0, 1, 1);
fc = hslider("[1]hpFrequency", 0., 0., 280., 1.):si.smoo;
N = hslider("[2]order", 1, 1, 4, 1);
};
delayPanel = vgroup("[2]Sample Delay",ba.bypass1(1-bpd,de.sdelay(0.25*ma.SR,1024,delay))) with{
bpd = hslider("[0]activateDelay[style:menu{'Off':0;'On':1}]",0,0,1,1);
delay = hslider("[1]delay[unit:smpl]", 0, 0, 1100, 1):si.smoo;
};
phasePanel = vgroup("[3]Phase Rotation",ba.bypass1(1-bpp,phaseRotator(phi))) with{
bpp = hslider("[0]activatePhase[style:menu{'Off':0;'On':1}]",0,0,1,1);
phi = hslider("[1]phaseOffset[unit:°]", 0, -90, 90, 0.1)*3.141592653589793/180:si.smoo;
};
allpassPanel = vgroup("[4]Allpass Filter", ba.bypass1(1-bpap,fi.svf.ap(freq,q))) with{
bpap = hslider("[0]activateAllpass[style:menu{'Off':0;'On':1}]",0,0,1,1);
freq = hslider("[1]frequency[unit:Hz][scale:log]", 1000, 10, 10000, 1):si.smoo;
q = hslider("[2]q", 1, 0.1, 10, 0.1):si.smoo;
};
///////////////////
//MAIN FUNCTION///
/////////////////
process = par(i,2,tgroup("[0]Phase Alignment Tool", inputPanel : phasePanel : allpassPanel : delayPanel)); | https://raw.githubusercontent.com/jpecquais/faustLab/91f3121f6b82bf05962e676e7731fadef45628b8/dsp/Filters/phaseRotator.dsp | faust | PHASE ROTATOR
POLARITY SWITCH
Simple phase inversion witch
///////////////////////
PANELS & PROPERTIES///
/////////////////////
/////////////////
MAIN FUNCTION///
/////////////// | declare name "Phase Alignment";
declare author "Jean-Loup Pecquais";
declare version "1.00";
declare license "GPL3";
import("stdfaust.lib");
jlpFi = library("lib/jlpFilters.lib");
phaseRotator(phi) = _ <: jlpFi.hilbert(14) : *(cos(phi)), *(sin(phi)) :> _;
polarity(sw) = *(2*sw-1);
inputPanel = vgroup("[1]Input Section", polarity(sw) : jlpFi.highpassN(N,4,fc)) with{
sw = hslider("[0]polaritySwitch", 0, 0, 1, 1);
fc = hslider("[1]hpFrequency", 0., 0., 280., 1.):si.smoo;
N = hslider("[2]order", 1, 1, 4, 1);
};
delayPanel = vgroup("[2]Sample Delay",ba.bypass1(1-bpd,de.sdelay(0.25*ma.SR,1024,delay))) with{
bpd = hslider("[0]activateDelay[style:menu{'Off':0;'On':1}]",0,0,1,1);
delay = hslider("[1]delay[unit:smpl]", 0, 0, 1100, 1):si.smoo;
};
phasePanel = vgroup("[3]Phase Rotation",ba.bypass1(1-bpp,phaseRotator(phi))) with{
bpp = hslider("[0]activatePhase[style:menu{'Off':0;'On':1}]",0,0,1,1);
phi = hslider("[1]phaseOffset[unit:°]", 0, -90, 90, 0.1)*3.141592653589793/180:si.smoo;
};
allpassPanel = vgroup("[4]Allpass Filter", ba.bypass1(1-bpap,fi.svf.ap(freq,q))) with{
bpap = hslider("[0]activateAllpass[style:menu{'Off':0;'On':1}]",0,0,1,1);
freq = hslider("[1]frequency[unit:Hz][scale:log]", 1000, 10, 10000, 1):si.smoo;
q = hslider("[2]q", 1, 0.1, 10, 0.1):si.smoo;
};
process = par(i,2,tgroup("[0]Phase Alignment Tool", inputPanel : phasePanel : allpassPanel : delayPanel)); |
61797f6155ae13bbf67029f2f3aacb847082e3ff955cb1c24d1499779c91a0a7 | TobiasKozel/GuitarD | SimpleDelay.dsp | import("stdfaust.lib");
import("reverbs.lib");
import("misceffects.lib");
maxDelay = 1; // Max delay in seconds
time = vslider( "Time", 0.3, 0, maxDelay, 0.001) * ma.SR, 1 : max : si.smooth(0.999);
dry = ba.db2linear(vslider("Dry", 0, -60, 0, 0.1));
wet = ba.db2linear(vslider( "Wet", -8, -60, 0, 0.1));
decay = vslider( "Decay", 0.4, 0, 1, 0.01);
lowpass = vslider( "Lowpass", 2000, 20, 20000, 1) : si.smooth(0.999);
resonance = vslider( "Resonance", 1, 0.1, 2, 0.01);
pitch = vslider( "Pitch", 0, -1, 1, 0.01);
delayLine = de.delay(ma.SR, time) : fi.resonlp(lowpass, resonance, decay) : ef.transpose(64, 32, pitch);
singleDelay = _ <: _ * dry, (+~delayLine) * wet :> + : _;
process = singleDelay, singleDelay; | https://raw.githubusercontent.com/TobiasKozel/GuitarD/80d5b8e6fa2eab99bbee80e6dacb5f0f482bbb52/src/nodes/simple_delay/SimpleDelay.dsp | faust | Max delay in seconds | import("stdfaust.lib");
import("reverbs.lib");
import("misceffects.lib");
time = vslider( "Time", 0.3, 0, maxDelay, 0.001) * ma.SR, 1 : max : si.smooth(0.999);
dry = ba.db2linear(vslider("Dry", 0, -60, 0, 0.1));
wet = ba.db2linear(vslider( "Wet", -8, -60, 0, 0.1));
decay = vslider( "Decay", 0.4, 0, 1, 0.01);
lowpass = vslider( "Lowpass", 2000, 20, 20000, 1) : si.smooth(0.999);
resonance = vslider( "Resonance", 1, 0.1, 2, 0.01);
pitch = vslider( "Pitch", 0, -1, 1, 0.01);
delayLine = de.delay(ma.SR, time) : fi.resonlp(lowpass, resonance, decay) : ef.transpose(64, 32, pitch);
singleDelay = _ <: _ * dry, (+~delayLine) * wet :> + : _;
process = singleDelay, singleDelay; |
a9b2aaeceef508bafe3cfd5f26d5a17f5a609eb4671bde31f18e5ae45ce3a002 | grame-cncm/smartfaust | sfGrain.dsp | declare name "sfGrain";
declare version "1.03";
declare author "Christophe Lebreton";
declare license "BSD";
declare copyright "SmartFaust - GRAME(c)2013-2018";
import("stdfaust.lib");
//-------------------- MAIN -------------------------------
process = component ("grain_out_v0.6.dsp"):component ("grain_pitch_shifter2_v0.2.dsp"):max(-0.99):min(0.99):*(volume):*(out)
with {
volume = hslider("grain_volume [acc:1 0 -10 0 10][color:0 255 0][hidden:1]",1,-0.1,1,0.001):max(0):min(1):fi.lowpass(1,1);
out = checkbox ("v:sfGrain/[1]ON/OFF"):si.smooth(0.998);
};
| https://raw.githubusercontent.com/grame-cncm/smartfaust/0a9c93ea7eda9899e1401402901848f221366c99/src/sfGrain/sfGrain.dsp | faust | -------------------- MAIN ------------------------------- | declare name "sfGrain";
declare version "1.03";
declare author "Christophe Lebreton";
declare license "BSD";
declare copyright "SmartFaust - GRAME(c)2013-2018";
import("stdfaust.lib");
process = component ("grain_out_v0.6.dsp"):component ("grain_pitch_shifter2_v0.2.dsp"):max(-0.99):min(0.99):*(volume):*(out)
with {
volume = hslider("grain_volume [acc:1 0 -10 0 10][color:0 255 0][hidden:1]",1,-0.1,1,0.001):max(0):min(1):fi.lowpass(1,1);
out = checkbox ("v:sfGrain/[1]ON/OFF"):si.smooth(0.998);
};
|
6d5f93c9e9be761d6cb2f6add43281efc8b2d72727d0757cb43b4c7a16c4f7e8 | polyeffects/PolyLV2 | flanger.dsp | import("stdfaust.lib");
flanger_mono(dmax,curdel,depth,fb,invert,lfoshape)
= _ <: _, (-:de.fdelay(dmax,curdel)) ~ *(fb) : _,
*(select2(invert,depth,0-depth))
: + : *(1/(1+depth)); // ideal for dc and reinforced sinusoids (in-phase summed signals)
process = flanger_mono_gui;
flangeview = lfo(freq);
flanger_mono_gui = attach(flangeview) : flanger_mono(dmax,curdel,depth,fb,invert,lfoshape);
sinlfo(freq) = (1 + os.oscrs(freq))/2;
trilfo(freq) = 1.0-abs(os.saw1(freq));
lfo(f) = (lfoshape * trilfo(f)) + ((1-lfoshape) * sinlfo(f));
dmax = 2048;
odflange = 44; // ~1 ms at 44.1 kHz = min delay
dflange = ((dmax-1)-odflange)*vslider("[1] Delay [midi:ctrl 50][style:knob]", 0.22, 0, 1, 1);
bpm = vslider("[2] BPM [midi:ctrl 2] [style:knob]", 30, 5, 300, 0.01);
freq = bpm / 60 : si.smooth(ba.tau2pole(freqT60/6.91));
freqT60 = 0.15661;
depth = vslider("[3] Depth [midi:ctrl 3] [style:knob]", .75, 0, 1, 0.001) : si.smooth(ba.tau2pole(depthT60/6.91));
depthT60 = 0.15661;
fb = vslider("[5] Feedback [midi:ctrl 4] [style:knob]", 0, -0.995, 0.99, 0.001) : si.smooth(ba.tau2pole(fbT60/6.91));
fbT60 = 0.15661;
lfoshape = vslider("[6] Waveshape [midi:ctrl 54] [style:knob]", 0, 0, 1, 0.001);
curdel = odflange+dflange*lfo(freq);
invert = int(vslider("[4] Invert [midi:ctrl 49][style:knob]",0,0,1,1));
| https://raw.githubusercontent.com/polyeffects/PolyLV2/a363599f74fd1bce0b3744221e1883fdbe89c557/poly_flange/flanger.dsp | faust | ideal for dc and reinforced sinusoids (in-phase summed signals)
~1 ms at 44.1 kHz = min delay | import("stdfaust.lib");
flanger_mono(dmax,curdel,depth,fb,invert,lfoshape)
= _ <: _, (-:de.fdelay(dmax,curdel)) ~ *(fb) : _,
*(select2(invert,depth,0-depth))
process = flanger_mono_gui;
flangeview = lfo(freq);
flanger_mono_gui = attach(flangeview) : flanger_mono(dmax,curdel,depth,fb,invert,lfoshape);
sinlfo(freq) = (1 + os.oscrs(freq))/2;
trilfo(freq) = 1.0-abs(os.saw1(freq));
lfo(f) = (lfoshape * trilfo(f)) + ((1-lfoshape) * sinlfo(f));
dmax = 2048;
dflange = ((dmax-1)-odflange)*vslider("[1] Delay [midi:ctrl 50][style:knob]", 0.22, 0, 1, 1);
bpm = vslider("[2] BPM [midi:ctrl 2] [style:knob]", 30, 5, 300, 0.01);
freq = bpm / 60 : si.smooth(ba.tau2pole(freqT60/6.91));
freqT60 = 0.15661;
depth = vslider("[3] Depth [midi:ctrl 3] [style:knob]", .75, 0, 1, 0.001) : si.smooth(ba.tau2pole(depthT60/6.91));
depthT60 = 0.15661;
fb = vslider("[5] Feedback [midi:ctrl 4] [style:knob]", 0, -0.995, 0.99, 0.001) : si.smooth(ba.tau2pole(fbT60/6.91));
fbT60 = 0.15661;
lfoshape = vslider("[6] Waveshape [midi:ctrl 54] [style:knob]", 0, 0, 1, 0.001);
curdel = odflange+dflange*lfo(freq);
invert = int(vslider("[4] Invert [midi:ctrl 49][style:knob]",0,0,1,1));
|
0e4605354c3d3825b2534a590f446271760306af3e580ebf82682f79ef012719 | polyeffects/PolyLV2 | chorus.dsp | import("stdfaust.lib");
voices = 8; // MUST BE EVEN
process = ba.bypass1to2(cbp,chorus_mono(dmax,curdel,rate,sigma,do2,voices));
dmax = 8192;
curdel = dmax * vslider("[0] Delay [midi:ctrl 4] [style:knob]", 0.5, 0, 1, 1) : si.smooth(0.999);
rateMax = 420.0; // Hz
rateMin = 10.01;
rateT60 = 0.15661;
bpm = vslider("[1] BPM [midi:ctrl 2] [style:knob]", 30, rateMin, rateMax, 0.0001);
rate = bpm / 60 : si.smooth(ba.tau2pole(rateT60/6.91));
depth = vslider("[4] Depth [midi:ctrl 3] [style:knob]", 0.5, 0, 1, 0.001) : si.smooth(ba.tau2pole(depthT60/6.91));
depthT60 = 0.15661;
delayPerVoice = 0.5*curdel/voices;
sigma = delayPerVoice * vslider("[6] Deviation [midi:ctrl 58] [style:knob]",0.5,0,1,0.001) : si.smooth(0.999);
periodic = 1;
do2 = depth; // use when depth=1 means "multivibrato" effect (no original => all are modulated)
cbp = 1-int(vslider("[2] Enable [midi:ctrl 105][style:knob]",0,0,1,1));
chorus_mono(dmax,curdel,rate,sigma,do2,voices)
= _ <: (*(1-do2)<:_,_),(*(do2) <: par(i,voices,voice(i)) :> _,_) : ro.interleave(2,2) : +,+
with {
angle(i) = 2*ma.PI*(i/2)/voices + (i%2)*ma.PI/2;
voice(i) = de.fdelay(dmax,min(dmax,del(i))) * cos(angle(i));
del(i) = curdel*(i+1)/voices + dev(i);
rates(i) = rate/float(i+1);
dev(i) = sigma * os.oscp(rates(i),i*2*ma.PI/voices);
};
| https://raw.githubusercontent.com/polyeffects/PolyLV2/a363599f74fd1bce0b3744221e1883fdbe89c557/poly_chorus/chorus.dsp | faust | MUST BE EVEN
Hz
use when depth=1 means "multivibrato" effect (no original => all are modulated) | import("stdfaust.lib");
process = ba.bypass1to2(cbp,chorus_mono(dmax,curdel,rate,sigma,do2,voices));
dmax = 8192;
curdel = dmax * vslider("[0] Delay [midi:ctrl 4] [style:knob]", 0.5, 0, 1, 1) : si.smooth(0.999);
rateMin = 10.01;
rateT60 = 0.15661;
bpm = vslider("[1] BPM [midi:ctrl 2] [style:knob]", 30, rateMin, rateMax, 0.0001);
rate = bpm / 60 : si.smooth(ba.tau2pole(rateT60/6.91));
depth = vslider("[4] Depth [midi:ctrl 3] [style:knob]", 0.5, 0, 1, 0.001) : si.smooth(ba.tau2pole(depthT60/6.91));
depthT60 = 0.15661;
delayPerVoice = 0.5*curdel/voices;
sigma = delayPerVoice * vslider("[6] Deviation [midi:ctrl 58] [style:knob]",0.5,0,1,0.001) : si.smooth(0.999);
periodic = 1;
cbp = 1-int(vslider("[2] Enable [midi:ctrl 105][style:knob]",0,0,1,1));
chorus_mono(dmax,curdel,rate,sigma,do2,voices)
= _ <: (*(1-do2)<:_,_),(*(do2) <: par(i,voices,voice(i)) :> _,_) : ro.interleave(2,2) : +,+
with {
angle(i) = 2*ma.PI*(i/2)/voices + (i%2)*ma.PI/2;
voice(i) = de.fdelay(dmax,min(dmax,del(i))) * cos(angle(i));
del(i) = curdel*(i+1)/voices + dev(i);
rates(i) = rate/float(i+1);
dev(i) = sigma * os.oscp(rates(i),i*2*ma.PI/voices);
};
|
4c5bf0d7e2eaa03e1859ff0a122dd9005b24e41ffffcd182972e6cf7bedf00f0 | LucaSpanedda/Musical_Studies_of_Chaotic_Systems | 9.00_DC_Blocker.dsp | // import Standard Faust library
// https://github.com/grame-cncm/faustlibraries/
import("stdfaust.lib");
// DC Blocker
// The dc blocker is a small recursive filter specified by the difference equation
// It is needed to remove the dc component of the signal.
// y(n) = x(n) -x(n-1)+Ry(n-1)
// R is a parameter that is typically somewhere between 0.9 and 1.0
// reference :
// https://ccrma.stanford.edu/~jos/fp/DC_Blocker.html
dcblocker(zero,pole) = dcblockerout
with{
onezero = _ <: _,mem : _,*(zero) : -;
onepole = + ~ *(pole);
dcblockerout = _ : onezero : onepole;
};
process = _ : dcblocker(1,0.998);
| https://raw.githubusercontent.com/LucaSpanedda/Musical_Studies_of_Chaotic_Systems/d8b78c011cc0b2b75f74643eba78306d6a3f92df/Tools/9.00_DC_Blocker.dsp | faust | import Standard Faust library
https://github.com/grame-cncm/faustlibraries/
DC Blocker
The dc blocker is a small recursive filter specified by the difference equation
It is needed to remove the dc component of the signal.
y(n) = x(n) -x(n-1)+Ry(n-1)
R is a parameter that is typically somewhere between 0.9 and 1.0
reference :
https://ccrma.stanford.edu/~jos/fp/DC_Blocker.html | import("stdfaust.lib");
dcblocker(zero,pole) = dcblockerout
with{
onezero = _ <: _,mem : _,*(zero) : -;
onepole = + ~ *(pole);
dcblockerout = _ : onezero : onepole;
};
process = _ : dcblocker(1,0.998);
|
06360c80b5636006c595ac14cfb73171c3e1f3fbd02a9d197edefe6d6ab885e9 | DISTRHO/Fadeli | analysis-vumeter.dsp | declare name "vumeter";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
//-------------------------------------------------
// Simple vumeter
//-------------------------------------------------
import("stdfaust.lib");
process = hmeter(0), hmeter(1)
with {
vmeter(i, x) = attach(x, envelop(x) : vbargraph("chan %i[2][unit:dB]", -70, +5));
hmeter(i, x) = attach(x, envelop(x) : hbargraph("chan %i[2][unit:dB]", -70, +5));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
};
| https://raw.githubusercontent.com/DISTRHO/Fadeli/22352d962714828613a88f008fa41744eecfac6e/dsp/analysis-vumeter.dsp | faust | -------------------------------------------------
Simple vumeter
------------------------------------------------- | declare name "vumeter";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
import("stdfaust.lib");
process = hmeter(0), hmeter(1)
with {
vmeter(i, x) = attach(x, envelop(x) : vbargraph("chan %i[2][unit:dB]", -70, +5));
hmeter(i, x) = attach(x, envelop(x) : hbargraph("chan %i[2][unit:dB]", -70, +5));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
};
|
42d3fac8e39806bea3a57a25755d6f07d8b15555fa4363999e4ccfbca1913c08 | VCVRack/VCV-Prototype | synth.dsp | /*
All controllers of the VCV Prototype are accessed using metadata.
*/
import("stdfaust.lib");
import("rack.lib");
// Using knobs ([knob:N] metadata with N from 1 to 6). Knob [0..1] range is mapped on [min..max] slider range, taking 'scale' metadata in account
vol1 = hslider("volume1 [knob:1]", 0.1, 0, 1, 0.01);
freq1 = hslider("freq1 [knob:2] [unit:Hz] [scale:lin]", 300, 200, 300, 1);
vol2 = hslider("volume2 [knob:3]", 0.1, 0, 1, 0.01);
freq2 = hslider("freq2 [knob:4] [unit:Hz] ", 300, 200, 300, 1);
// Using switches ([switch:N] metadata with N from 1 to 6)
gate = button("gate [switch:1]");
// Checkbox can be used, the switch button will go be white when checked
check = checkbox("check [switch:2]");
// Using bargraph to control lights ([light_red|green|blue:N] metadata with N from 1 to 6, to control 3 colors)
light_1_r = vbargraph("[light_red:1]", 0, 1);
light_1_g = vbargraph("[light_green:1]", 0, 1);
light_1_b = vbargraph("[light_blue:1]", 0, 1);
// Using bargraph to control switchlights ([switchlight_red|green|blue:N] metadata with N from 1 to 6, to control 3 colors)
swl_2_r = vbargraph("[switchlight_red:3]", 0, 1);
swl_2_g = vbargraph("[switchlight_green:3]", 0, 1);
swl_2_b = vbargraph("[switchlight_blue:3]", 0, 1);
process = os.osc(freq1) * vol1,
os.sawtooth(freq2) * vol2 * gate,
os.square(freq2) * vol2 * check,
(os.osc(1):light_1_r + os.osc(1.4):light_1_g + os.osc(1.7):light_1_b),
(os.osc(1):swl_2_r + os.osc(1.2):swl_2_g + os.osc(1.7):swl_2_b);
| https://raw.githubusercontent.com/VCVRack/VCV-Prototype/6980f0f0aca2517ea4a44e749515fe868d4ff532/examples/synth.dsp | faust |
All controllers of the VCV Prototype are accessed using metadata.
Using knobs ([knob:N] metadata with N from 1 to 6). Knob [0..1] range is mapped on [min..max] slider range, taking 'scale' metadata in account
Using switches ([switch:N] metadata with N from 1 to 6)
Checkbox can be used, the switch button will go be white when checked
Using bargraph to control lights ([light_red|green|blue:N] metadata with N from 1 to 6, to control 3 colors)
Using bargraph to control switchlights ([switchlight_red|green|blue:N] metadata with N from 1 to 6, to control 3 colors) |
import("stdfaust.lib");
import("rack.lib");
vol1 = hslider("volume1 [knob:1]", 0.1, 0, 1, 0.01);
freq1 = hslider("freq1 [knob:2] [unit:Hz] [scale:lin]", 300, 200, 300, 1);
vol2 = hslider("volume2 [knob:3]", 0.1, 0, 1, 0.01);
freq2 = hslider("freq2 [knob:4] [unit:Hz] ", 300, 200, 300, 1);
gate = button("gate [switch:1]");
check = checkbox("check [switch:2]");
light_1_r = vbargraph("[light_red:1]", 0, 1);
light_1_g = vbargraph("[light_green:1]", 0, 1);
light_1_b = vbargraph("[light_blue:1]", 0, 1);
swl_2_r = vbargraph("[switchlight_red:3]", 0, 1);
swl_2_g = vbargraph("[switchlight_green:3]", 0, 1);
swl_2_b = vbargraph("[switchlight_blue:3]", 0, 1);
process = os.osc(freq1) * vol1,
os.sawtooth(freq2) * vol2 * gate,
os.square(freq2) * vol2 * check,
(os.osc(1):light_1_r + os.osc(1.4):light_1_g + os.osc(1.7):light_1_b),
(os.osc(1):swl_2_r + os.osc(1.2):swl_2_g + os.osc(1.7):swl_2_b);
|
0f181d0554c7cceb2c2e981e606a7f27026cfee10a320db38ab40d577aad6e58 | jujudusud/BPD | bddi-p10.dsp | // generated automatically
// DO NOT MODIFY!
declare id "bddi-p10";
declare name "BDDI part 10";
declare category "External";
import("stdfaust.lib");
process = pre : fi.fir((b0/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 = _;
b0 = 0;
a0 = 1.00000000000000;
};
| https://raw.githubusercontent.com/jujudusud/BPD/f6f931ae528147d59bcf3d4e0a59586338671a58/bddi-dsp/bddi-p10.dsp | faust | generated automatically
DO NOT MODIFY! | declare id "bddi-p10";
declare name "BDDI part 10";
declare category "External";
import("stdfaust.lib");
process = pre : fi.fir((b0/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 = _;
b0 = 0;
a0 = 1.00000000000000;
};
|
989440fb77587e65383901fee8cd7eea1a01843b563c6c5491e19db7d6de6b89 | jujudusud/BPD | bddi-p6.dsp | // generated automatically
// DO NOT MODIFY!
declare id "bddi-p6";
declare name "BDDI part 6";
declare category "External";
import("stdfaust.lib");
process = pre : fi.fir((b0/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 = _;
b0 = 0;
a0 = 1.00000000000000;
};
| https://raw.githubusercontent.com/jujudusud/BPD/f6f931ae528147d59bcf3d4e0a59586338671a58/bddi-dsp/bddi-p6.dsp | faust | generated automatically
DO NOT MODIFY! | declare id "bddi-p6";
declare name "BDDI part 6";
declare category "External";
import("stdfaust.lib");
process = pre : fi.fir((b0/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 = _;
b0 = 0;
a0 = 1.00000000000000;
};
|
decd3b3c1f194b44fca3828f5d5c7d3a607368143a52d801dce6150ac501a98d | SMERM/BN-Tedesco | sine+saw.dsp | import("stdfaust.lib");
//Primo oscillatore del VCS3 con oscillatore sine e saw
decimal(x) = x - floor(x);
freq = vslider("FREQUENCY [style:knob][scale:exp]",1,1,10000,0.01);
step = freq/ma.SR;
phasor(freq) = +(freq/ma.SR)~decimal: -(step);
sine = sin(phasor(freq)*2*ma.PI);
saw = phasor : -(0.5);
process = sine, saw;
| https://raw.githubusercontent.com/SMERM/BN-Tedesco/2a77e1707f7e64c512dd40d58d29c0db8092463d/COME-01/20200401/sine%2Bsaw.dsp | faust | Primo oscillatore del VCS3 con oscillatore sine e saw | import("stdfaust.lib");
decimal(x) = x - floor(x);
freq = vslider("FREQUENCY [style:knob][scale:exp]",1,1,10000,0.01);
step = freq/ma.SR;
phasor(freq) = +(freq/ma.SR)~decimal: -(step);
sine = sin(phasor(freq)*2*ma.PI);
saw = phasor : -(0.5);
process = sine, saw;
|
a9c51ab4872c839e055ede3d2388c9fe7f586bc035b0728f7611be3f4eb3b058 | Jikstra/faust-plugins | pan.dsp | import("stdfaust.lib");
left = checkbox("Left");
process = _,_,_,_ : ba.select2stereo(left==0) : _,_;
| https://raw.githubusercontent.com/Jikstra/faust-plugins/2e91fe48d82e9ea7b74e8ac083dd6d40fb4ca645/pan.dsp | faust | import("stdfaust.lib");
left = checkbox("Left");
process = _,_,_,_ : ba.select2stereo(left==0) : _,_;
|
|
3737b848a64a7d5744f657940b74559c640c8bfea1affa5c336bd5fc6f353375 | Tonton-Blax/supasynth | moogish.dsp | import("stdfaust.lib");
moogvcf = ba.bypass1(bp,vcf) with {
mvcf_group(x) = hgroup("MOOG VCF (Voltage Controlled Filter) [tooltip: See Faust's effect.lib for info and references]",x);
cb_group(x) = mvcf_group(hgroup("[0]",x));
bp = cb_group(checkbox("[0] Bypass [tooltip: When this is checked, the Moog VCF has no effect]"));
archsw = cb_group(checkbox("[1] Use Biquads
[tooltip: Select moog_vcf_2b (two-biquad) implementation, instead of the default moog_vcf (analog style) implementation]"));
bqsw = cb_group(checkbox("[2] Normalized Ladders
[tooltip: If using biquads, make them normalized ladders (moog_vcf_2bn)]"));
freq = mvcf_group(hslider("[1] Corner Frequency [unit:PK]
[tooltip: The VCF resonates at the corner frequency (specified in PianoKey (PK) units, with A440 = 49 PK). The VCF response is flat below the corner frequency, and rolls off -24 dB per octave above.]",
25, 1, 88, 0.01) : ba.pianokey2hz) : si.smooth(0.999);
res = mvcf_group(hslider("[2] Corner Resonance [style:knob]
[tooltip: Amount of resonance near VCF corner frequency (specified between 0 and 1)]",
0.9, 0, 1, 0.01));
outgain = mvcf_group(hslider("[3] VCF Output Level [unit:dB] [style:knob]
[tooltip: output level in decibels]",
5, -60, 20, 0.1)) : ba.db2linear : si.smooth(0.999);
vcfbq = _ <: select2(bqsw, ve.moog_vcf_2b(res,freq), ve.moog_vcf_2bn(res,freq));
vcfarch = _ <: select2(archsw, ve.moog_vcf(res^4,freq), vcfbq);
vcf = vcfarch : *(outgain);
};
//process = moogvcf; | https://raw.githubusercontent.com/Tonton-Blax/supasynth/ec39566ad52e2417154301ee86f5bf94b650a3e8/faust/moogish.dsp | faust | process = moogvcf; | import("stdfaust.lib");
moogvcf = ba.bypass1(bp,vcf) with {
mvcf_group(x) = hgroup("MOOG VCF (Voltage Controlled Filter) [tooltip: See Faust's effect.lib for info and references]",x);
cb_group(x) = mvcf_group(hgroup("[0]",x));
bp = cb_group(checkbox("[0] Bypass [tooltip: When this is checked, the Moog VCF has no effect]"));
archsw = cb_group(checkbox("[1] Use Biquads
[tooltip: Select moog_vcf_2b (two-biquad) implementation, instead of the default moog_vcf (analog style) implementation]"));
bqsw = cb_group(checkbox("[2] Normalized Ladders
[tooltip: If using biquads, make them normalized ladders (moog_vcf_2bn)]"));
freq = mvcf_group(hslider("[1] Corner Frequency [unit:PK]
[tooltip: The VCF resonates at the corner frequency (specified in PianoKey (PK) units, with A440 = 49 PK). The VCF response is flat below the corner frequency, and rolls off -24 dB per octave above.]",
25, 1, 88, 0.01) : ba.pianokey2hz) : si.smooth(0.999);
res = mvcf_group(hslider("[2] Corner Resonance [style:knob]
[tooltip: Amount of resonance near VCF corner frequency (specified between 0 and 1)]",
0.9, 0, 1, 0.01));
outgain = mvcf_group(hslider("[3] VCF Output Level [unit:dB] [style:knob]
[tooltip: output level in decibels]",
5, -60, 20, 0.1)) : ba.db2linear : si.smooth(0.999);
vcfbq = _ <: select2(bqsw, ve.moog_vcf_2b(res,freq), ve.moog_vcf_2bn(res,freq));
vcfarch = _ <: select2(archsw, ve.moog_vcf(res^4,freq), vcfbq);
vcf = vcfarch : *(outgain);
};
|
a8471e051ace6b2e0f60fc425400cfd0c9f2c70b7230398186eec1dbd350ac84 | DISTRHO/Fadeli | reverb-reverbDesigner.dsp | declare name "reverbDesigner";
declare version "0.1";
declare author "JOS";
declare description "Workbench for building a custom Feedback Delay Network (FDN) Reverebator";
import("stdfaust.lib");
N = 16; // Feedback Delay Network (FDN) order (power of 2, 2 to 16)
NB = 5; // Number of T60-controlled frequency-bands (3 or more)
BSO = 3; // Order of each lowpass/highpass bandsplit (odd positive integer)
process = dm.fdnrev0_demo(N,NB,BSO);
| https://raw.githubusercontent.com/DISTRHO/Fadeli/6f3cd85c6ba90ce94b7fa8e72ae3cb0f6c77dc75/dsp/reverb-reverbDesigner.dsp | faust | Feedback Delay Network (FDN) order (power of 2, 2 to 16)
Number of T60-controlled frequency-bands (3 or more)
Order of each lowpass/highpass bandsplit (odd positive integer) | declare name "reverbDesigner";
declare version "0.1";
declare author "JOS";
declare description "Workbench for building a custom Feedback Delay Network (FDN) Reverebator";
import("stdfaust.lib");
process = dm.fdnrev0_demo(N,NB,BSO);
|
6d699376504f878937383303ff0e3c02934727d35ac6de85cbd9ce027fc9b6a8 | elaforge/karya | risset_arp.dsp | import("stdfaust.lib");
inst = library("instruments.lib");
// gate = button("gate");
gate = 1;
pitch = hslider("pitch", 36, 1, 127, 1);
vol = .02;
delta = hslider("delta", .02, 0, 1, .005);
// TODO make it stetch to inharmonics
// Or just set their pitches individually. I can then do chords.
stretch = hslider("stretch", 0, 0, 1, .01);
// delta = .03;
process = panned_harmonics : *(gate*vol), *(gate*vol); // : inst.instrReverb;
// panned oscils
panned_oscils = par(i, 9, pan(i/8*2 - 1, oscil(hz + delta * (i-4)))) :> _, _
with {
hz = ba.midikey2hz(pitch);
};
oscil(hz) = sine(1) + sum(i, 8, sine(i+5) * n)
with {
sine(harmonic) = os.osc(hz * harmonic);
n = .7;
};
// panned harmonics
panned_harmonics = // (gate, pitch) =
par(i, 9, panned_oscil(hz + delta * (i-4))) :> _, _
with {
hz = ba.midikey2hz(pitch);
};
panned_oscil(hz) =
(sine(1) <: _, _), par(i, 15, pan(i/8 * 2 - 1, sine(i+5) * n))
with {
sine(harmonic) = os.osc(hz * harmonic + stretch);
n = .7;
};
pan(s) = _ <: *((1 - p) : sqrt), *(p : sqrt)
with { p = (min(1, max(-1, s)) + 1) / 2; };
| https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Synth/Faust/dsp/risset_arp.dsp | faust | gate = button("gate");
TODO make it stetch to inharmonics
Or just set their pitches individually. I can then do chords.
delta = .03;
: inst.instrReverb;
panned oscils
panned harmonics
(gate, pitch) = | import("stdfaust.lib");
inst = library("instruments.lib");
gate = 1;
pitch = hslider("pitch", 36, 1, 127, 1);
vol = .02;
delta = hslider("delta", .02, 0, 1, .005);
stretch = hslider("stretch", 0, 0, 1, .01);
panned_oscils = par(i, 9, pan(i/8*2 - 1, oscil(hz + delta * (i-4)))) :> _, _
with {
hz = ba.midikey2hz(pitch);
};
oscil(hz) = sine(1) + sum(i, 8, sine(i+5) * n)
with {
sine(harmonic) = os.osc(hz * harmonic);
n = .7;
};
par(i, 9, panned_oscil(hz + delta * (i-4))) :> _, _
with {
hz = ba.midikey2hz(pitch);
};
panned_oscil(hz) =
(sine(1) <: _, _), par(i, 15, pan(i/8 * 2 - 1, sine(i+5) * n))
with {
sine(harmonic) = os.osc(hz * harmonic + stretch);
n = .7;
};
pan(s) = _ <: *((1 - p) : sqrt), *(p : sqrt)
with { p = (min(1, max(-1, s)) + 1) / 2; };
|
9ef18e86f0875cd96b61c53b92eb0a577137f1b35db4ff24dbe6f68e266bb51f | jspatcher/package-dsp | atodb.dsp | import("stdfaust.lib");
process = ba.linear2db;
| https://raw.githubusercontent.com/jspatcher/package-dsp/c3ee890b6fb6acefb71cdebdfd69173b9d1bce92/src/dsps/atodb.dsp | faust | import("stdfaust.lib");
process = ba.linear2db;
|
|
6bd69782c634a1cf1a2360dc5b8954865691df3a5219a8ea6db0362035462398 | jspatcher/package-dsp | mtof.dsp | import("stdfaust.lib");
process = ba.midikey2hz;
| https://raw.githubusercontent.com/jspatcher/package-dsp/c3ee890b6fb6acefb71cdebdfd69173b9d1bce92/src/dsps/mtof.dsp | faust | import("stdfaust.lib");
process = ba.midikey2hz;
|
|
2fc68917080cf9fbf59e9c08c4cc1b9608eaaa8e76a9ae20ae2b9094ed5a675a | jspatcher/package-dsp | dbtoa.dsp | import("stdfaust.lib");
process = ba.db2linear;
| https://raw.githubusercontent.com/jspatcher/package-dsp/c3ee890b6fb6acefb71cdebdfd69173b9d1bce92/src/dsps/dbtoa.dsp | faust | import("stdfaust.lib");
process = ba.db2linear;
|
|
3a5f737a234b621e635ffe479ed858b07989f6ffe8c2e1bad20ab51b777d4091 | jspatcher/package-dsp | ftom.dsp | import("stdfaust.lib");
process = ba.hz2midikey;
| https://raw.githubusercontent.com/jspatcher/package-dsp/c3ee890b6fb6acefb71cdebdfd69173b9d1bce92/src/dsps/ftom.dsp | faust | import("stdfaust.lib");
process = ba.hz2midikey;
|
|
5f3a7dafba8e0e6393b2c1f394218cee18a9e97c98a3d2f650f6f3fca3c8481f | danidev/microcosmos | MicrocosmosDsp.dsp | import("stdfaust.lib");
pageGroup(page, x) = hgroup("%page", x);
// constants
steps = 8;
// main timer
speed = pageGroup(0, hslider("speed[style:knob]", 120, 20, 255, 1)) : si.smoo;
play = pageGroup(0, button("play")) : ba.toggle;
//values generator
valStep(num) = out
with {
stepGroup(x) = vgroup("step%num", x);
val = pageGroup(1, stepGroup(vslider("[%num]val%num[style:knob]", 0, 0,127, 1)));
out = val;
};
//gates generator
gateStep(num) = out
with {
stepGroup(x) = vgroup("step%num", x);
gate = pageGroup(1, stepGroup(button("[%num]gate%num"))) : ba.toggle : pageGroup(2, vbargraph("[%num]gate_view%num", 0, 1));
out = gate;
};
// sequencer output
beat = ba.beat(speed * 4) * play;
step = beat : ba.pulse_countup(1) % steps : pageGroup(9, hbargraph("step", 0, steps-1));
val = par(i, steps, valStep(i)) : ba.selectn(steps, step);
gate = par(i, steps, gateStep(i)) : (ba.selectn(steps, step) * beat);
// basic synth
attack = pageGroup(3, hslider("[0]attack[style:knob]", 0.1, 0, 1, 0.1)) : si.smoo;
release = pageGroup(3, hslider("[1]release[style:knob]", 0.1, 0, 1, 0.1)) : si.smoo;
pwm = pageGroup(3, hslider("[2]pwm[style:knob]", 0.5, 0, 1, 0.1)) : si.smoo;
env = gate : en.ar(attack, release);
osc = os.pulsetrain(ba.midikey2hz(val), pwm);
process = osc * env <: _,_ ;
| https://raw.githubusercontent.com/danidev/microcosmos/b7c1a1b6f78587c943dee68abf5c6581dcc1a038/dsp/stepSequencer/dsp/MicrocosmosDsp.dsp | faust | constants
main timer
values generator
gates generator
sequencer output
basic synth | import("stdfaust.lib");
pageGroup(page, x) = hgroup("%page", x);
steps = 8;
speed = pageGroup(0, hslider("speed[style:knob]", 120, 20, 255, 1)) : si.smoo;
play = pageGroup(0, button("play")) : ba.toggle;
valStep(num) = out
with {
stepGroup(x) = vgroup("step%num", x);
val = pageGroup(1, stepGroup(vslider("[%num]val%num[style:knob]", 0, 0,127, 1)));
out = val;
};
gateStep(num) = out
with {
stepGroup(x) = vgroup("step%num", x);
gate = pageGroup(1, stepGroup(button("[%num]gate%num"))) : ba.toggle : pageGroup(2, vbargraph("[%num]gate_view%num", 0, 1));
out = gate;
};
beat = ba.beat(speed * 4) * play;
step = beat : ba.pulse_countup(1) % steps : pageGroup(9, hbargraph("step", 0, steps-1));
val = par(i, steps, valStep(i)) : ba.selectn(steps, step);
gate = par(i, steps, gateStep(i)) : (ba.selectn(steps, step) * beat);
attack = pageGroup(3, hslider("[0]attack[style:knob]", 0.1, 0, 1, 0.1)) : si.smoo;
release = pageGroup(3, hslider("[1]release[style:knob]", 0.1, 0, 1, 0.1)) : si.smoo;
pwm = pageGroup(3, hslider("[2]pwm[style:knob]", 0.5, 0, 1, 0.1)) : si.smoo;
env = gate : en.ar(attack, release);
osc = os.pulsetrain(ba.midikey2hz(val), pwm);
process = osc * env <: _,_ ;
|
f4d59511b90371f1a3ded888fc83232b7919fa5978fe809276fc152e098d2f6e | olilarkin/pMixFaustNodes | RissetTone.dsp | declare name "Risset Tone";
declare description "Jean Claude Risset's endless glissando";
declare author "Oli Larkin ([email protected])";
declare copyright "Oliver Larkin";
declare version "0.1";
declare licence "GPL";
import("stdfaust.lib");
rate = hslider("rate", 0.01, -2, 2, 0.001);
centroid = hslider("centroid", 60, 20, 120, 1);
range = hslider("range", 120, 1, 120, 1) / 2.;
Npartials = 10;
tblsize = 1 << 16;
thin_env = exp(-4.8283*(1.-cos((2.0*ma.PI)*(float(ba.time) - (tblsize/2.))/tblsize)));
wide_env = 0.5 + 5. * cos((2.0*ma.PI)*((float(ba.time)-(tblsize/2.))/tblsize)) / 10.;
lookup(phase, env)=ss1+d*(ss2-ss1)
with {
idx = int(phase * tblsize);
d = ma.decimal(phase * tblsize);
ss1 = rdtable(tblsize+1,env,idx);
ss2 = rdtable(tblsize+1,env,idx+1);
};
rissetTone(freq, N) = phasor(freq) <: par(i, N, modphase(_, i) : partial) :> _
with {
phasor(freq) = (freq/float(ma.SR) : (+ : ma.decimal) ~ _);
modphase(x, i) = fmod(x+phaseDiff, 1.)
with {
phaseDiff = (1. / float(N)) * i;
};
partial(pos) = pos : *(2.) : -(1.) : *(range) : +(centroid) : +(7) : ba.midikey2hz : os.osc * lookup(pos, thin_env);
};
process = rissetTone(rate, Npartials) : *(1/Npartials); | https://raw.githubusercontent.com/olilarkin/pMixFaustNodes/20da57783b03841f023a7edd4a3215ab3155218e/RissetTone.dsp | faust | declare name "Risset Tone";
declare description "Jean Claude Risset's endless glissando";
declare author "Oli Larkin ([email protected])";
declare copyright "Oliver Larkin";
declare version "0.1";
declare licence "GPL";
import("stdfaust.lib");
rate = hslider("rate", 0.01, -2, 2, 0.001);
centroid = hslider("centroid", 60, 20, 120, 1);
range = hslider("range", 120, 1, 120, 1) / 2.;
Npartials = 10;
tblsize = 1 << 16;
thin_env = exp(-4.8283*(1.-cos((2.0*ma.PI)*(float(ba.time) - (tblsize/2.))/tblsize)));
wide_env = 0.5 + 5. * cos((2.0*ma.PI)*((float(ba.time)-(tblsize/2.))/tblsize)) / 10.;
lookup(phase, env)=ss1+d*(ss2-ss1)
with {
idx = int(phase * tblsize);
d = ma.decimal(phase * tblsize);
ss1 = rdtable(tblsize+1,env,idx);
ss2 = rdtable(tblsize+1,env,idx+1);
};
rissetTone(freq, N) = phasor(freq) <: par(i, N, modphase(_, i) : partial) :> _
with {
phasor(freq) = (freq/float(ma.SR) : (+ : ma.decimal) ~ _);
modphase(x, i) = fmod(x+phaseDiff, 1.)
with {
phaseDiff = (1. / float(N)) * i;
};
partial(pos) = pos : *(2.) : -(1.) : *(range) : +(centroid) : +(7) : ba.midikey2hz : os.osc * lookup(pos, thin_env);
};
process = rissetTone(rate, Npartials) : *(1/Npartials); |
|
1504b19d35e8b83a87d726a374bdfd0a8f3963a6dcf7d11d4e327a446d6e7af0 | mzuther/Screamer | fractional_downsampler.dsp | /* ----------------------------------------------------------------------------
Screamer
========
Mathematical distortion and signal mangling
Copyright (c) 2003-2020 Martin Zuther (http://www.mzuther.de/)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Thank you for using free software!
---------------------------------------------------------------------------- */
import("stdfaust.lib");
mz = component("mzuther.dsp");
downsampler(factor , lfo_frequency , lfo_modulation) = process
with
{
lfo = os.osc(lfo_frequency) * lfo_modulation / 100.0 : _;
real_factor = factor * (1.0 + lfo) : _;
adder = _ <: _ + mz.if(_ >= real_factor , 0.0 - real_factor , 1.0) : _;
counter = adder ~ _ : _;
cross_312 = _ , _ , _ : ro.cross(2) , _ : _ , ro.cross(2) : _ , _ , _;
sample_and_hold = _ , _ : (cross_312 : mz.if : _) ~ _ : _;
downsampler = counter < 1.0 , _ : sample_and_hold : _;
process = ba.bypass1(factor < 1.0 , downsampler);
};
process = downsampler(factor , lfo_frequency , lfo_modulation)
with
{
factor = hslider(
"[1] Factor (0.99 disables) [style:slider][unit:x]" ,
0.99 , 0.99 , 32.0 , 0.01);
lfo_frequency = hslider(
"[2] LFO frequency [style:slider][unit:Hz]" ,
0.0 , 0.0 , 10.0 , 0.01);
lfo_modulation = hslider(
"[3] LFO modulation [style:slider][unit:%]" ,
0.0 , 0.0 , 100.0 , 1.0);
};
| https://raw.githubusercontent.com/mzuther/Screamer/46ec0f5d49ecf9af455a791ee2b813c5e9de1a66/modules/fractional_downsampler.dsp | faust | ----------------------------------------------------------------------------
Screamer
========
Mathematical distortion and signal mangling
Copyright (c) 2003-2020 Martin Zuther (http://www.mzuther.de/)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Thank you for using free software!
---------------------------------------------------------------------------- |
import("stdfaust.lib");
mz = component("mzuther.dsp");
downsampler(factor , lfo_frequency , lfo_modulation) = process
with
{
lfo = os.osc(lfo_frequency) * lfo_modulation / 100.0 : _;
real_factor = factor * (1.0 + lfo) : _;
adder = _ <: _ + mz.if(_ >= real_factor , 0.0 - real_factor , 1.0) : _;
counter = adder ~ _ : _;
cross_312 = _ , _ , _ : ro.cross(2) , _ : _ , ro.cross(2) : _ , _ , _;
sample_and_hold = _ , _ : (cross_312 : mz.if : _) ~ _ : _;
downsampler = counter < 1.0 , _ : sample_and_hold : _;
process = ba.bypass1(factor < 1.0 , downsampler);
};
process = downsampler(factor , lfo_frequency , lfo_modulation)
with
{
factor = hslider(
"[1] Factor (0.99 disables) [style:slider][unit:x]" ,
0.99 , 0.99 , 32.0 , 0.01);
lfo_frequency = hslider(
"[2] LFO frequency [style:slider][unit:Hz]" ,
0.0 , 0.0 , 10.0 , 0.01);
lfo_modulation = hslider(
"[3] LFO modulation [style:slider][unit:%]" ,
0.0 , 0.0 , 100.0 , 1.0);
};
|
5fad96889720172504f7f2f3a1f8e0f4e799b762473a3a9751f5b22f25aa7955 | LucaSpanedda/Musical_Studies_of_Chaotic_Systems | 1.05_Lorenz_Autoregulating.dsp | // import Standard Faust library
// https://github.com/grame-cncm/faustlibraries/
import("stdfaust.lib");
// Autoregulating Lorenz System
autolorenz(x0,y0,z0,dcfc,l) = loop ~ si.bus(7): par(i, 7, /(l)): mixer
with {
x_init = x0-x0';
y_init = y0-y0';
z_init = z0-z0';
saturator(lim,x) = lim*ma.tanh(x/(max(lim,ma.EPSILON)));
dcblock(dcfc,x) = fi.highpass(1, dcfc, x);
loop(x, y, z, sigma, dt, rho, beta) =
saturator(l, dcblock(10,(x + sigma * (y - x) * dt + x_init))),
saturator(l, dcblock(10,(y + (rho * x - x * z - y) * dt + y_init))),
saturator(l, dcblock(10,(z + (x * y - beta * z) * dt + z_init))),
((x+y+z)/3)*8,
((x+y+z)/3)*5,
((x+y+z)/3)*4,
((x+y+z)/3)*1;
mixer(a,b,c,d,e,f,g) = (a+b+c)/3, (a+b+c)/3;
};
process = autolorenz(1.2,1.2,1.2,10,1);
| https://raw.githubusercontent.com/LucaSpanedda/Musical_Studies_of_Chaotic_Systems/d8b78c011cc0b2b75f74643eba78306d6a3f92df/1.05_Lorenz_Autoregulating.dsp | faust | import Standard Faust library
https://github.com/grame-cncm/faustlibraries/
Autoregulating Lorenz System | import("stdfaust.lib");
autolorenz(x0,y0,z0,dcfc,l) = loop ~ si.bus(7): par(i, 7, /(l)): mixer
with {
x_init = x0-x0';
y_init = y0-y0';
z_init = z0-z0';
saturator(lim,x) = lim*ma.tanh(x/(max(lim,ma.EPSILON)));
dcblock(dcfc,x) = fi.highpass(1, dcfc, x);
loop(x, y, z, sigma, dt, rho, beta) =
saturator(l, dcblock(10,(x + sigma * (y - x) * dt + x_init))),
saturator(l, dcblock(10,(y + (rho * x - x * z - y) * dt + y_init))),
saturator(l, dcblock(10,(z + (x * y - beta * z) * dt + z_init))),
((x+y+z)/3)*8,
((x+y+z)/3)*5,
((x+y+z)/3)*4,
((x+y+z)/3)*1;
mixer(a,b,c,d,e,f,g) = (a+b+c)/3, (a+b+c)/3;
};
process = autolorenz(1.2,1.2,1.2,10,1);
|
e52639681f3ad12e4fa1d7a46b5d6b03294c4cce10de4d3e76a120104eea699d | Jikstra/faust-plugins | equalizer.dsp | import("stdfaust.lib");
process = _ : dm.mth_octave_filterbank_demo(1) : _ : dm.filterbank_demo : _;
| https://raw.githubusercontent.com/Jikstra/faust-plugins/2e91fe48d82e9ea7b74e8ac083dd6d40fb4ca645/equalizer.dsp | faust | import("stdfaust.lib");
process = _ : dm.mth_octave_filterbank_demo(1) : _ : dm.filterbank_demo : _;
|
|
2371e47d9c2610ee582e7a7ced4fb97e7a68073a8dfcd93673d977f42e1677b9 | jspatcher/package-dsp | pink.dsp | import("stdfaust.lib");
process = no.pink_noise;
| https://raw.githubusercontent.com/jspatcher/package-dsp/c3ee890b6fb6acefb71cdebdfd69173b9d1bce92/src/dsps/pink.dsp | faust | import("stdfaust.lib");
process = no.pink_noise;
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.