_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
|
---|---|---|---|---|---|---|---|
ffc77bc8392fb39f2848f0b748c84e3b2b5ca5cd5bf41cdb101b4f4b17a6af65 | ccdarabundit/OrganWerks | gedeckt.dsp | import("stdfaust.lib");
import("waveguides.lib");
process = waveguide(maxPipeDelay, // Closed pipe
initDelay,
postDelay,
rFilt,
tFilt,
outFilt1,
outFilt2)~labium(gate, maxMouthDelay, mouthDelay) : !, _*(env)*gain <:_, _
with{
midiNote = nentry("MIDI Note", 32, 24, 96, 1): int;
gdelay = nentry("Group Delay", 0, 0, 1, 0.0000001);
gain = 0.5+nentry("Gain", 1, 0, 1, 0.01)*0.1: si.smoo;
gate = button("Gate"): int;
mix = .5;
attack = nentry("Attack", 0.05, 0.0001, 0.5, 0.0001);
b0 = nentry("b0", 1, 0, 2, 0.00001);
b1 = nentry("b1", 0, 0, 2, 0.00001);
b2 = nentry("b2", 0, 0, 2, 0.00001);
a1 = nentry("a1", 0, 0, 2, 0.00001);
a2 = nentry("a2", 0, 0, 2, 0.00001);
freq = 2^( (midiNote - 69) / 12) * 440;
c = 343; // Speed of sound
totalDelay = 0.5*(ma.SR/freq);
mouthDelay = totalDelay/2;
bcoefs = (b0, b1, b2);
acoefs = (a1, a2);
rFilt = -1.0*fi.iir(bcoefs, acoefs);
tFilt = _*1.0;
outFilt1 = _*(1-mix);
outFilt2 = _*(mix);
env = en.asr(attack, 1, 0.1, gate);
maxPipeDelay = 0.5*(1./20)*ma.SR: int;
maxMouthDelay = maxPipeDelay/2 : int;
initDelay = totalDelay/2;
postDelay = totalDelay-initDelay-gdelay*ma.SR;
}; | https://raw.githubusercontent.com/ccdarabundit/OrganWerks/5518287f711c381c8b10a7192e162e5f6f71176a/src/dsp/faust_src/gedeckt.dsp | faust | Closed pipe
Speed of sound | import("stdfaust.lib");
import("waveguides.lib");
initDelay,
postDelay,
rFilt,
tFilt,
outFilt1,
outFilt2)~labium(gate, maxMouthDelay, mouthDelay) : !, _*(env)*gain <:_, _
with{
midiNote = nentry("MIDI Note", 32, 24, 96, 1): int;
gdelay = nentry("Group Delay", 0, 0, 1, 0.0000001);
gain = 0.5+nentry("Gain", 1, 0, 1, 0.01)*0.1: si.smoo;
gate = button("Gate"): int;
mix = .5;
attack = nentry("Attack", 0.05, 0.0001, 0.5, 0.0001);
b0 = nentry("b0", 1, 0, 2, 0.00001);
b1 = nentry("b1", 0, 0, 2, 0.00001);
b2 = nentry("b2", 0, 0, 2, 0.00001);
a1 = nentry("a1", 0, 0, 2, 0.00001);
a2 = nentry("a2", 0, 0, 2, 0.00001);
freq = 2^( (midiNote - 69) / 12) * 440;
totalDelay = 0.5*(ma.SR/freq);
mouthDelay = totalDelay/2;
bcoefs = (b0, b1, b2);
acoefs = (a1, a2);
rFilt = -1.0*fi.iir(bcoefs, acoefs);
tFilt = _*1.0;
outFilt1 = _*(1-mix);
outFilt2 = _*(mix);
env = en.asr(attack, 1, 0.1, gate);
maxPipeDelay = 0.5*(1./20)*ma.SR: int;
maxMouthDelay = maxPipeDelay/2 : int;
initDelay = totalDelay/2;
postDelay = totalDelay-initDelay-gdelay*ma.SR;
}; |
9c4136f9c2a54e00af5f7d03e1aae7ca6674a537893b54252eab645e1423d3c4 | ccdarabundit/OrganWerks | flue.dsp | import("stdfaust.lib");
import("waveguides.lib");
process = waveguide(maxPipeDelay,
initDelay,
postDelay,
rFilt,
tFilt,
outFilt1,
outFilt2)~labium(gate, maxMouthDelay, mouthDelay) : !, _*(env)*gain <:_, _
with{
midiNote = nentry("MIDI Note", 32, 24, 96, 1): int;
gdelay = nentry("Group Delay", 0, 0, 1, 0.0000001);
gain = nentry("Gain", 1, 0, 1, 0.01)*0.1: si.smoo;
gate = button("Gate"): int;
mix = 0.85;
attack = nentry("Attack", 0.05, 0.0001, 0.5, 0.0001);
b0 = nentry("b0", 1, 0, 2, 0.00001);
b1 = nentry("b1", 0, 0, 2, 0.00001);
b2 = nentry("b2", 0, 0, 2, 0.00001);
a1 = nentry("a1", 0, 0, 2, 0.00001);
a2 = nentry("a2", 0, 0, 2, 0.00001);
freq = 2^( (midiNote - 69) / 12) * 440;
c = 343; // Speed of sound
totalDelay = (ma.SR/freq);
mouthDelay = totalDelay/2;
bcoefs = (b0, b1, b2);
acoefs = (a1, a2);
rFilt = fi.iir(bcoefs, acoefs);
tFilt = _*1.0;
outFilt1 = _*(1-mix);
outFilt2 = _*(mix);
env = en.asr(attack, 1, 0.1, gate);
maxPipeDelay = 0.5*(1./20)*ma.SR: int;
maxMouthDelay = maxPipeDelay/2 : int;
initDelay = totalDelay/2;
postDelay = totalDelay-initDelay-gdelay*ma.SR - 2;
}; | https://raw.githubusercontent.com/ccdarabundit/OrganWerks/5518287f711c381c8b10a7192e162e5f6f71176a/src/dsp/faust_src/flue.dsp | faust | Speed of sound | import("stdfaust.lib");
import("waveguides.lib");
process = waveguide(maxPipeDelay,
initDelay,
postDelay,
rFilt,
tFilt,
outFilt1,
outFilt2)~labium(gate, maxMouthDelay, mouthDelay) : !, _*(env)*gain <:_, _
with{
midiNote = nentry("MIDI Note", 32, 24, 96, 1): int;
gdelay = nentry("Group Delay", 0, 0, 1, 0.0000001);
gain = nentry("Gain", 1, 0, 1, 0.01)*0.1: si.smoo;
gate = button("Gate"): int;
mix = 0.85;
attack = nentry("Attack", 0.05, 0.0001, 0.5, 0.0001);
b0 = nentry("b0", 1, 0, 2, 0.00001);
b1 = nentry("b1", 0, 0, 2, 0.00001);
b2 = nentry("b2", 0, 0, 2, 0.00001);
a1 = nentry("a1", 0, 0, 2, 0.00001);
a2 = nentry("a2", 0, 0, 2, 0.00001);
freq = 2^( (midiNote - 69) / 12) * 440;
totalDelay = (ma.SR/freq);
mouthDelay = totalDelay/2;
bcoefs = (b0, b1, b2);
acoefs = (a1, a2);
rFilt = fi.iir(bcoefs, acoefs);
tFilt = _*1.0;
outFilt1 = _*(1-mix);
outFilt2 = _*(mix);
env = en.asr(attack, 1, 0.1, gate);
maxPipeDelay = 0.5*(1./20)*ma.SR: int;
maxMouthDelay = maxPipeDelay/2 : int;
initDelay = totalDelay/2;
postDelay = totalDelay-initDelay-gdelay*ma.SR - 2;
}; |
59041e326793a61d5dca669176f51f4c0dea5cbe2f45f1f82b3cb1bb4dfe7326 | ccdarabundit/OrganWerks | flue.dsp | import("stdfaust.lib");
import("waveguides.lib");
process = waveguide(maxPipeDelay,
initDelay,
postDelay,
rFilt,
tFilt,
outFilt1,
outFilt2)~labium(gate, maxMouthDelay, mouthDelay) : !, _*(env)*gain <:_, _
with{
midiNote = nentry("MIDI Note", 32, 32, 96, 1): int;
gdelay = nentry("Group Delay", 0, 0, 1, 0.0000001);
gain = nentry("Gain", 1, 0, 1, 0.01)*0.1: si.smoo;
gate = button("Gate"): int;
mix = 0.85;
attack = nentry("Attack", 0.05, 0.0001, 0.5, 0.0001);
b0 = nentry("b0", 1, 0, 2, 0.00001);
b1 = nentry("b1", 0, 0, 2, 0.00001);
b2 = nentry("b2", 0, 0, 2, 0.00001);
a1 = nentry("a1", 0, 0, 2, 0.00001);
a2 = nentry("a2", 0, 0, 2, 0.00001);
freq = 2^( (midiNote - 69) / 12) * 440;
c = 343; // Speed of sound
totalDelay = (ma.SR/freq);
mouthDelay = totalDelay/2;
bcoefs = (b0, b1, b2);
acoefs = (a1, a2);
rFilt = fi.iir(bcoefs, acoefs);
tFilt = _*1.0;
outFilt1 = _*(1-mix);
outFilt2 = _*(mix);
env = en.asr(attack, 1, 0.1, gate);
maxPipeDelay = 0.5*(1./20)*ma.SR: int;
maxMouthDelay = maxPipeDelay/2 : int;
initDelay = totalDelay/2;
postDelay = totalDelay-initDelay-gdelay*ma.SR - 2;
}; | https://raw.githubusercontent.com/ccdarabundit/OrganWerks/5518287f711c381c8b10a7192e162e5f6f71176a/flue.dsp | faust | Speed of sound | import("stdfaust.lib");
import("waveguides.lib");
process = waveguide(maxPipeDelay,
initDelay,
postDelay,
rFilt,
tFilt,
outFilt1,
outFilt2)~labium(gate, maxMouthDelay, mouthDelay) : !, _*(env)*gain <:_, _
with{
midiNote = nentry("MIDI Note", 32, 32, 96, 1): int;
gdelay = nentry("Group Delay", 0, 0, 1, 0.0000001);
gain = nentry("Gain", 1, 0, 1, 0.01)*0.1: si.smoo;
gate = button("Gate"): int;
mix = 0.85;
attack = nentry("Attack", 0.05, 0.0001, 0.5, 0.0001);
b0 = nentry("b0", 1, 0, 2, 0.00001);
b1 = nentry("b1", 0, 0, 2, 0.00001);
b2 = nentry("b2", 0, 0, 2, 0.00001);
a1 = nentry("a1", 0, 0, 2, 0.00001);
a2 = nentry("a2", 0, 0, 2, 0.00001);
freq = 2^( (midiNote - 69) / 12) * 440;
totalDelay = (ma.SR/freq);
mouthDelay = totalDelay/2;
bcoefs = (b0, b1, b2);
acoefs = (a1, a2);
rFilt = fi.iir(bcoefs, acoefs);
tFilt = _*1.0;
outFilt1 = _*(1-mix);
outFilt2 = _*(mix);
env = en.asr(attack, 1, 0.1, gate);
maxPipeDelay = 0.5*(1./20)*ma.SR: int;
maxMouthDelay = maxPipeDelay/2 : int;
initDelay = totalDelay/2;
postDelay = totalDelay-initDelay-gdelay*ma.SR - 2;
}; |
8b4d9a1810c4f0916bae2c518ce51c095ecf21100ba4a0b56eec92c493856574 | jspatcher/package-dsp | phasor.dsp | declare defaultInputs "[0, 0.5]";
declare description "Simple sawtooth waveform oscillator between 0 and 1 with phase control";
declare inputsDescription "[`freq`, `phase`]";
import("stdfaust.lib");
process(f, p) = os.lf_sawpos_phase(p, f);
| https://raw.githubusercontent.com/jspatcher/package-dsp/72192de1f6b203349373dcf313b874a41319ca67/src/dsps/phasor.dsp | faust | declare defaultInputs "[0, 0.5]";
declare description "Simple sawtooth waveform oscillator between 0 and 1 with phase control";
declare inputsDescription "[`freq`, `phase`]";
import("stdfaust.lib");
process(f, p) = os.lf_sawpos_phase(p, f);
|
|
d515c35b8ef505208c99f3ac570e435d60ebaa4cebb18bd813b6e14f0aa071ce | MartinScriblerus/porifera | 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 = button("drop") : bubble(hslider("v:bubble/freq", 600, 150, 2000, 1)) <: dm.freeverb_demo;
| https://raw.githubusercontent.com/MartinScriblerus/porifera/ce26ffadf93d6655186fa1d84f8bbedf8849f753/web/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>
------------------------------------------------------------ | 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 = button("drop") : bubble(hslider("v:bubble/freq", 600, 150, 2000, 1)) <: dm.freeverb_demo;
|
5840ea62620f78bbd07f07aa7ec0dda3d3a9b72c3e4eb11eb742856c92440acb | piptouque/atiam_tp_signal | moog_ladder.dsp | import("stdfaust.lib");
declare moog_name "Moog Ladder";
declare moog_author "Hartenstein Matthieu, Thiel Pierre";
declare moog_version "1.0";
declare moog_license "MIT License (MIT)";
declare description "Moog Ladder Assigment using Volterra series";
H3 = _, 0 : seq(i, 4, M) : _, (_:T3:*(moog_nl)) : + with {
// Linéarisation de (F)
F1 = *(nu / (1 + nu)) : + ~ (* (1 / (1 + nu))) with {
nu = 2 * ma.PI * moog_f_c / ma.SR;
};
// Version simplifiée d'un étage de (F) à l'ordre 3
M = ((_ <: ((F1 <: _, ^(3)), (^(3)))),_) : (_, ((_, _ : ro.cross(2) : -), _ : + : F1));
// Coefficient du DL3 de tanh
T3 = *(-1/3);
moog_f_c = hslider("h:system/cutoffreq", 2000, 10, 20000, 0.1);
moog_nl = checkbox("h:system/NL");
};
// Applique un gain avant et le retire après un système donné.
// On remarque qu'un système linéaire reste inchangé.
// Cela permet d'observer les non-linéarité
// de la sortie du système sans a priori augmenter
// son volume.
moog_drive = hslider("h:system/drive", 0.5, 0.1, 3, 0.01);
drive(fx) = *(moog_drive) : fx : /(moog_drive);
// Un instrument simple généré par synthèse additive.
inst = timbre(n, f_0) : *(gate)
with {
// n = hslider("h:inst/num_harmonics", 2, 0, 6, 1);
n = 4;
osc = _, ma.SR : / : + ~ _ : _, 2*ma.PI : * : sin;
vol_harm(i) = vslider("h:inst/harm %i", 1, 0, 1, 0.01);
timbre(n, f) = sum(i, n, osc(f*(i+1))*vol_harm(i));
f_0 = hslider("h:inst/freq", 440, 20, 8000, 0.1);
gain = vslider("h:inst/gain", 0, 0, 1, 0.1);
// On pourrait ajouter un effet de spatialisation à l'instrument.
// panning(s, a) = s*(2 * a), s*(2 * (1 - a));
// pan = hslider("h:inst/pan", 0.5, 0, 1, 0.1);
gate = button("h:inst/gate");
};
//
// Test source made of two slighlty detuned square signals
square = os.square(f-d/2)+os.square(f+d/2) : /(2)
with {
f = hslider("v:square/freq", 220, 20, 2000, 1);
d = hslider("v:square/delta", 2, 0.05, 10, 0.01);
};
global_gain = hslider("h:global/global_gain", 0.8, 0, 1, 0.1);
source = inst;
// source = square;
process = source : drive(H3) : *(global_gain) <: _,_; | https://raw.githubusercontent.com/piptouque/atiam_tp_signal/3ea353ba8917b786fce3b23764872e566f99ebaa/tp_moog/source/moog_ladder.dsp | faust | Linéarisation de (F)
Version simplifiée d'un étage de (F) à l'ordre 3
Coefficient du DL3 de tanh
Applique un gain avant et le retire après un système donné.
On remarque qu'un système linéaire reste inchangé.
Cela permet d'observer les non-linéarité
de la sortie du système sans a priori augmenter
son volume.
Un instrument simple généré par synthèse additive.
n = hslider("h:inst/num_harmonics", 2, 0, 6, 1);
On pourrait ajouter un effet de spatialisation à l'instrument.
panning(s, a) = s*(2 * a), s*(2 * (1 - a));
pan = hslider("h:inst/pan", 0.5, 0, 1, 0.1);
Test source made of two slighlty detuned square signals
source = square; | import("stdfaust.lib");
declare moog_name "Moog Ladder";
declare moog_author "Hartenstein Matthieu, Thiel Pierre";
declare moog_version "1.0";
declare moog_license "MIT License (MIT)";
declare description "Moog Ladder Assigment using Volterra series";
H3 = _, 0 : seq(i, 4, M) : _, (_:T3:*(moog_nl)) : + with {
F1 = *(nu / (1 + nu)) : + ~ (* (1 / (1 + nu))) with {
nu = 2 * ma.PI * moog_f_c / ma.SR;
};
M = ((_ <: ((F1 <: _, ^(3)), (^(3)))),_) : (_, ((_, _ : ro.cross(2) : -), _ : + : F1));
T3 = *(-1/3);
moog_f_c = hslider("h:system/cutoffreq", 2000, 10, 20000, 0.1);
moog_nl = checkbox("h:system/NL");
};
moog_drive = hslider("h:system/drive", 0.5, 0.1, 3, 0.01);
drive(fx) = *(moog_drive) : fx : /(moog_drive);
inst = timbre(n, f_0) : *(gate)
with {
n = 4;
osc = _, ma.SR : / : + ~ _ : _, 2*ma.PI : * : sin;
vol_harm(i) = vslider("h:inst/harm %i", 1, 0, 1, 0.01);
timbre(n, f) = sum(i, n, osc(f*(i+1))*vol_harm(i));
f_0 = hslider("h:inst/freq", 440, 20, 8000, 0.1);
gain = vslider("h:inst/gain", 0, 0, 1, 0.1);
gate = button("h:inst/gate");
};
square = os.square(f-d/2)+os.square(f+d/2) : /(2)
with {
f = hslider("v:square/freq", 220, 20, 2000, 1);
d = hslider("v:square/delta", 2, 0.05, 10, 0.01);
};
global_gain = hslider("h:global/global_gain", 0.8, 0, 1, 0.1);
source = inst;
process = source : drive(H3) : *(global_gain) <: _,_; |
4403012736dc28b6a40f22b1086d4d36eba9daf5fc3928281b6f48cc9f1f51ff | TheArpeggiator/juce-plugin | panner.dsp | import("stdfaust.lib");
attack = hslider("attack", 0.3, 0, 2, 0.1) : si.smoo;
decay = hslider("decay", 0.3, 0, 2,0.1) : si.smoo;
sustain = hslider("sustain", 0, 0, 100,2) : si.smoo;
release = hslider("release", 0.3, 0, 2,0.1) : si.smoo;
freq = hslider("frequency",440, 100, 2000,5);
gain = hslider("gain",0.9, 0, 1,0.05) : si.smoo;
pan = hslider("pan",0.5,0,1,0.01) : si.smoo;
trigger = button("gate");
synth = os.osc(freq)*gain*trigger;
env = en.adsr(attack, decay, sustain, release, trigger);
process = vgroup("syn",synth*env <: *(1-pan),*(pan) : dm.zita_rev1); | https://raw.githubusercontent.com/TheArpeggiator/juce-plugin/7b4e3aab48e6a9ad48ac9b7c3820be624a10584c/Source/panner.dsp | faust | import("stdfaust.lib");
attack = hslider("attack", 0.3, 0, 2, 0.1) : si.smoo;
decay = hslider("decay", 0.3, 0, 2,0.1) : si.smoo;
sustain = hslider("sustain", 0, 0, 100,2) : si.smoo;
release = hslider("release", 0.3, 0, 2,0.1) : si.smoo;
freq = hslider("frequency",440, 100, 2000,5);
gain = hslider("gain",0.9, 0, 1,0.05) : si.smoo;
pan = hslider("pan",0.5,0,1,0.01) : si.smoo;
trigger = button("gate");
synth = os.osc(freq)*gain*trigger;
env = en.adsr(attack, decay, sustain, release, trigger);
process = vgroup("syn",synth*env <: *(1-pan),*(pan) : dm.zita_rev1); |
|
9ce5f6cd31137d0b1cb386c7614e2abe1edf71d4ecb51d335399fc78c53244b4 | dxinteractive/mosfez-faust-dsp | proto-pm-synth.dsp | import("stdfaust.lib");
// midi
midigate = button("gate");
midifreq = nentry("freq[unit:Hz]", 440, 20, 20000, 1);
midigain = nentry("gain", 1, 0, 1, 0.01);
// enva
volA = hslider("A[midi:ctrl 73]",0.01,0.01,4,0.01);
volD = hslider("D[midi:ctrl 76]",2.6,0.01,8,0.01);
volS = hslider("S[midi:ctrl 77]",0.2,0,1,0.01);
volR = hslider("R[midi:ctrl 72]",2.0,0.01,8,0.01);
// osc
pmGain = hslider("pm gain",0.0,0.0,1000.0,1.0) : si.smoo;
pmMulti = hslider("pm multi",4.0,1.0,24.0,1.0) : si.smoo;
pmDenom = hslider("pm denom",4.0,1.0,24.0,1.0) : si.smoo;
envelop = en.adsre(volA,volD,volS,volR,midigate);
vol = envelop;
osc(f) = os.osc(f + (pmGain * envelop * os.osc(f * pmMulti / pmDenom))) : fi.dcblocker;
fx = osc(midifreq) * vol * 0.3;
process = fx <: _,_;
| https://raw.githubusercontent.com/dxinteractive/mosfez-faust-dsp/1acf88459363d42d34dc3e0c8d3fffcb406af190/proto-pm-synth.dsp | faust | midi
enva
osc | import("stdfaust.lib");
midigate = button("gate");
midifreq = nentry("freq[unit:Hz]", 440, 20, 20000, 1);
midigain = nentry("gain", 1, 0, 1, 0.01);
volA = hslider("A[midi:ctrl 73]",0.01,0.01,4,0.01);
volD = hslider("D[midi:ctrl 76]",2.6,0.01,8,0.01);
volS = hslider("S[midi:ctrl 77]",0.2,0,1,0.01);
volR = hslider("R[midi:ctrl 72]",2.0,0.01,8,0.01);
pmGain = hslider("pm gain",0.0,0.0,1000.0,1.0) : si.smoo;
pmMulti = hslider("pm multi",4.0,1.0,24.0,1.0) : si.smoo;
pmDenom = hslider("pm denom",4.0,1.0,24.0,1.0) : si.smoo;
envelop = en.adsre(volA,volD,volS,volR,midigate);
vol = envelop;
osc(f) = os.osc(f + (pmGain * envelop * os.osc(f * pmMulti / pmDenom))) : fi.dcblocker;
fx = osc(midifreq) * vol * 0.3;
process = fx <: _,_;
|
5018be6f6cd245d0a5a79499da0e5bdede414482eaff4d3a25131402acb50326 | gdesiato/faust-folder1 | sawtooth.dsp | import("stdfaust.lib");
f = hslider("freq", 400, 50, 1000, 1);
process = os.sawtooth(f);
| https://raw.githubusercontent.com/gdesiato/faust-folder1/02ad5cd6302ca325561a3e7e88925605c3ff6585/sawtooth.dsp | faust | import("stdfaust.lib");
f = hslider("freq", 400, 50, 1000, 1);
process = os.sawtooth(f);
|
|
14128746f6a1b1e041eddf54e61ca97fc1a9ed8f48abb8c11ef0ff2c9a2be062 | lbrutti/faust-course | additive_synth.dsp | import("stdfaust.lib");
freq = hslider("[0]freq", 440, 250.0, 800.0, 0.01);
gain = hslider("[1]gain", 0.5, 0.0, 1.0, 0.01);
timbre(f) = os.oscsin(f) * 0.5 + os.oscsin(f*2) * 0.25 + os.oscsin(f*3) * 0.125;
process = gain * timbre(freq) ; | https://raw.githubusercontent.com/lbrutti/faust-course/9029f2761d7bdf4658993783367790d779e4431c/session1/amp_follower_ar/additive_synth.dsp | faust | import("stdfaust.lib");
freq = hslider("[0]freq", 440, 250.0, 800.0, 0.01);
gain = hslider("[1]gain", 0.5, 0.0, 1.0, 0.01);
timbre(f) = os.oscsin(f) * 0.5 + os.oscsin(f*2) * 0.25 + os.oscsin(f*3) * 0.125;
process = gain * timbre(freq) ; |
|
2ed21a664254e571ede02a84673f5282ef75e05e385aebe9f7c1f40450896cc8 | trummerschlunk/master_me | lufs_meter.dsp | // -*-Faust-*-
declare name "Soundsgood";
declare version "1.0";
declare author "Klaus Scheuermann";
declare license "GPLv3";
// double precision -double needed!
ebu = library("lib/ebur128.dsp");
import("stdfaust.lib");
// init values
Nch = 2; //number of channels
// main
process =
tone_generator :
si.bus(2)
: lufs_meter
: si.bus(2)
;
// tone_generator
tone_generator = os.osc(f) * g <: _,_ with{
g = vslider("tone_gen_gain",-50, -120,0,1):ba.db2linear;
f = vslider("tone_gen_freq[unit:Hz] [scale:log]",1000,20,20000,1);
};
// +++++++++++++++++++++++++ LUFS METER +++++++++++++++++++++++++
lk2 = par(i,2,kfilter : zi) :> 4.342944819 * log(max(1e-12)) : -(0.691) with {
// maximum assumed sample rate is 192k
maxSR = 192000;
sump(n) = ba.slidingSump(n, Tg*maxSR)/n;
envelope(period, x) = x * x : sump(rint(period * ma.SR));
//Tg = 0.4; // 3 second window for 'short-term' measurement
Tg = 3;
zi = envelope(Tg); // mean square: average power = energy/Tg = integral of squared signal / Tg
kfilter = ebu.prefilter;
};
lufs_meter(l,r) = l,r <: l, attach(r, (lk2 : vbargraph("[unit:dB]out-lufs-s",-120,0))) : _,_;
| https://raw.githubusercontent.com/trummerschlunk/master_me/d727f637d417208abdc5273e3f1ca97dc870c23c/lufs_meter.dsp | faust | -*-Faust-*-
double precision -double needed!
init values
number of channels
main
tone_generator
+++++++++++++++++++++++++ LUFS METER +++++++++++++++++++++++++
maximum assumed sample rate is 192k
Tg = 0.4; // 3 second window for 'short-term' measurement
mean square: average power = energy/Tg = integral of squared signal / Tg |
declare name "Soundsgood";
declare version "1.0";
declare author "Klaus Scheuermann";
declare license "GPLv3";
ebu = library("lib/ebur128.dsp");
import("stdfaust.lib");
process =
tone_generator :
si.bus(2)
: lufs_meter
: si.bus(2)
;
tone_generator = os.osc(f) * g <: _,_ with{
g = vslider("tone_gen_gain",-50, -120,0,1):ba.db2linear;
f = vslider("tone_gen_freq[unit:Hz] [scale:log]",1000,20,20000,1);
};
lk2 = par(i,2,kfilter : zi) :> 4.342944819 * log(max(1e-12)) : -(0.691) with {
maxSR = 192000;
sump(n) = ba.slidingSump(n, Tg*maxSR)/n;
envelope(period, x) = x * x : sump(rint(period * ma.SR));
Tg = 3;
kfilter = ebu.prefilter;
};
lufs_meter(l,r) = l,r <: l, attach(r, (lk2 : vbargraph("[unit:dB]out-lufs-s",-120,0))) : _,_;
|
5e2766581cfcf2e56106cc1060ad940343dedc9d20f14f1dc54dbf708da6911f | gogins/csound-extended | modularInterpInstrMIDI.dsp | declare name "ModularInterpInstrMidi";
declare description "String instrument with a modular body";
declare license "MIT";
declare copyright "(c)Romain Michon & John Granzow, CCRMA (Stanford University), GRAME, University of Michigan";
import("stdfaust.lib");
process = pm.modularInterpInstr_ui_MIDI <: _,_;
| https://raw.githubusercontent.com/gogins/csound-extended/1fb91474754ed8400773a8140fe609c85c311a10/Opcodes/faust_piano/modularInterpInstrMIDI.dsp | faust | declare name "ModularInterpInstrMidi";
declare description "String instrument with a modular body";
declare license "MIT";
declare copyright "(c)Romain Michon & John Granzow, CCRMA (Stanford University), GRAME, University of Michigan";
import("stdfaust.lib");
process = pm.modularInterpInstr_ui_MIDI <: _,_;
|
|
0cbc6d4d19aec28030b1a5a786799e1eae67f6b19e1ed82c9bc5c9b0860d0d18 | mtoohey31/pw | pw.dsp | declare options "[midi:on]";
declare options "[nvoices:12]";
import("stdfaust.lib");
// TODO: get MPE working. [midi:ctrl 74] seems to bind the raw value of slide
// TODO: figure out how to get visual display of shape into UIs
gate = button("[4]gate");
gain = vslider("[5]gain", 0.5, 0, 1, 0.01);
f = vslider("[0]freq", 300, 20, 2000, 0.01);
bend = ba.semi2ratio(vslider("[1]bend[midi:pitchwheel]", 0, -2, 2, 0.01));
freq = f * bend;
N = vslider("[2]N[scale:log]", 4, 2, 1000, 0.000001);
teeth = vslider("[3]teeth", 0, 0, ma.PI, 0.01);
// r is the formula for a regular polygon with n sides and "teeth" of size T,
// it returns the radius for the polar coordinate at angle theta
r(theta, n, T) = cos(ma.PI / n) / cos(((2 * ma.PI) / n) * (((theta * n) / (2 * ma.PI)) % 1) - (ma.PI / n) + T);
// y returns the verticial component of the cartesian coordinate representation
// of the polar coordinate at theta in the polygon
y(theta) = r(theta, N, teeth) * sin(theta);
base = os.lf_saw(freq) * ma.PI + 1; // ranges from 0 to 2pi, the period of y
process = hgroup("poly", y(base) * gain * gate);
| https://raw.githubusercontent.com/mtoohey31/pw/8bd6a3ad1b93b5dfbd44116a7ba0b6b3ac541a6a/pw.dsp | faust | TODO: get MPE working. [midi:ctrl 74] seems to bind the raw value of slide
TODO: figure out how to get visual display of shape into UIs
r is the formula for a regular polygon with n sides and "teeth" of size T,
it returns the radius for the polar coordinate at angle theta
y returns the verticial component of the cartesian coordinate representation
of the polar coordinate at theta in the polygon
ranges from 0 to 2pi, the period of y | declare options "[midi:on]";
declare options "[nvoices:12]";
import("stdfaust.lib");
gate = button("[4]gate");
gain = vslider("[5]gain", 0.5, 0, 1, 0.01);
f = vslider("[0]freq", 300, 20, 2000, 0.01);
bend = ba.semi2ratio(vslider("[1]bend[midi:pitchwheel]", 0, -2, 2, 0.01));
freq = f * bend;
N = vslider("[2]N[scale:log]", 4, 2, 1000, 0.000001);
teeth = vslider("[3]teeth", 0, 0, ma.PI, 0.01);
r(theta, n, T) = cos(ma.PI / n) / cos(((2 * ma.PI) / n) * (((theta * n) / (2 * ma.PI)) % 1) - (ma.PI / n) + T);
y(theta) = r(theta, N, teeth) * sin(theta);
process = hgroup("poly", y(base) * gain * gate);
|
6c2d7ea2264b8a599714dca3c663041739d673e6d41ad91f4d35b3fcb565f808 | friskgit/kmh_114 | KMH114_channel_map.dsp | declare name "KMH114_channel_map";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
//---------------`Channel mapping plugin` --------------------------
//
// Channel mapping plugin that takes 15 channels of input (center speaker included)
// and maps it to the channel/speaker configuration of the studio 114 according to:
//
// * 1 -> 1
// * 2 -> 2
// * 3 -> 14
// * 4 -> 15
// * 5 -> 7
// * 6 -> 4
// * 7 -> 8
// * 8 -> 3
// * 9 -> 6
// * 10 -> 5
// * 11 -> 9
// * 12 -> 10
// * 13 -> 12
// * 14 -> 11
// * 15 -> 13
// * 16 -> 16
//
// Method: traverse the channel order of the ambisonics output and define the speaker
// number in the studio configuration
//---------------------------------------------------
import("stdfaust.lib");
vmeter(x) = attach(x, envelop(x) : vbargraph("[unit:dB]", -70, +5));
hmeter(x) = attach(x, envelop(x) : hbargraph("[2][unit:dB]", -70, +5));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
process(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15) =
s0, s1, s13, s14, s6, s3, s7, s2, s5, s4, s8, s9, s11, s10, s12, s15;
| https://raw.githubusercontent.com/friskgit/kmh_114/2ebc5bb7d796827856a69b27700ac9cb08689c04/KMH114_utility/bin/max/KMH114_channel_map%7E.mxo/KMH114_channel_map.dsp | faust | ---------------`Channel mapping plugin` --------------------------
Channel mapping plugin that takes 15 channels of input (center speaker included)
and maps it to the channel/speaker configuration of the studio 114 according to:
* 1 -> 1
* 2 -> 2
* 3 -> 14
* 4 -> 15
* 5 -> 7
* 6 -> 4
* 7 -> 8
* 8 -> 3
* 9 -> 6
* 10 -> 5
* 11 -> 9
* 12 -> 10
* 13 -> 12
* 14 -> 11
* 15 -> 13
* 16 -> 16
Method: traverse the channel order of the ambisonics output and define the speaker
number in the studio configuration
--------------------------------------------------- | declare name "KMH114_channel_map";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
import("stdfaust.lib");
vmeter(x) = attach(x, envelop(x) : vbargraph("[unit:dB]", -70, +5));
hmeter(x) = attach(x, envelop(x) : hbargraph("[2][unit:dB]", -70, +5));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
process(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15) =
s0, s1, s13, s14, s6, s3, s7, s2, s5, s4, s8, s9, s11, s10, s12, s15;
|
920720e49453ed8ffea5ac79ff06c9befeaa74c39d8ef43c85d7f3574cd914eb | johannphilippe/grame_cnsmd_2023 | random_frequencies.dsp | import("stdfaust.lib");
N_VOICES = 8;
randoms = no.noises(N_VOICES);
mult = hslider("multiplier", 0.1, 0.01, 1, 0.01);
impulse = button("impulse");
voice(n) = os.osc(frequency)
with {
frequency = randoms(n)
: abs
: ba.sAndH(os.impulse+impulse)
: *(mult)
: *(500) : +(80)
: si.smoo;
};
amp = hslider("amplitude", 0.1, 0, 1, 0.01) : si.smoo;
process = sum(n, N_VOICES, voice(n)) / N_VOICES * amp;
| https://raw.githubusercontent.com/johannphilippe/grame_cnsmd_2023/ccfd6e9a5c1537097546520317c8c5beea06006f/additive/random_frequencies.dsp | faust | import("stdfaust.lib");
N_VOICES = 8;
randoms = no.noises(N_VOICES);
mult = hslider("multiplier", 0.1, 0.01, 1, 0.01);
impulse = button("impulse");
voice(n) = os.osc(frequency)
with {
frequency = randoms(n)
: abs
: ba.sAndH(os.impulse+impulse)
: *(mult)
: *(500) : +(80)
: si.smoo;
};
amp = hslider("amplitude", 0.1, 0, 1, 0.01) : si.smoo;
process = sum(n, N_VOICES, voice(n)) / N_VOICES * amp;
|
|
c71d9a3ea133e45b8ae36a2178c57777d96735b26420069084522d638b51da1f | jrkolsby/SoundGarden | vocalFOF.dsp | declare name "Vocal FOF";
declare description "FOF vocal synthesizer.";
declare license "MIT";
declare copyright "(c)Mike Olsen, CCRMA (Stanford University)";
import("stdfaust.lib");
process = pm.SFFormantModelFofSmooth_ui <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/vocalFOF.dsp | faust | declare name "Vocal FOF";
declare description "FOF vocal synthesizer.";
declare license "MIT";
declare copyright "(c)Mike Olsen, CCRMA (Stanford University)";
import("stdfaust.lib");
process = pm.SFFormantModelFofSmooth_ui <: _,_;
|
|
7ab3a9b728edb43c6312db91dcf919853241445ce60de7be3eed457c49d8e3fa | gdesiato/faust-folder1 | sawtooth_mic_controlled.dsp | import("stdfaust.lib");
gain = an.amp_follower_ar(0.02,0.02);
process = gain,os.sawtooth(440) : *;
| https://raw.githubusercontent.com/gdesiato/faust-folder1/d0f25178b3e79242b7449ed77f994bd3df2874a9/sawtooth_mic_controlled.dsp | faust | import("stdfaust.lib");
gain = an.amp_follower_ar(0.02,0.02);
process = gain,os.sawtooth(440) : *;
|
|
079da18308b8b750c173eb09ba236b512f3f6bd6421bf6e6682cee88efe5e3d9 | jspatcher/package-dsp | ar.dsp | declare description "Attack-Release envelope generator";
declare defaultInputs "[0, 0.75]";
declare inputsDescription "[`trigger`, `attack time (sec)`, `release time (sec)`]";
declare argsOffset "1";
import("stdfaust.lib");
process(t, at, rt) = en.ar(at, rt, t);
| https://raw.githubusercontent.com/jspatcher/package-dsp/717c53ff74c0f4993fae2f024d641a02a565ded5/src/dsps/ar.dsp | faust | declare description "Attack-Release envelope generator";
declare defaultInputs "[0, 0.75]";
declare inputsDescription "[`trigger`, `attack time (sec)`, `release time (sec)`]";
declare argsOffset "1";
import("stdfaust.lib");
process(t, at, rt) = en.ar(at, rt, t);
|
|
db6aa05b37f1189e01a57cb2830dba4b4bc227d1e70e36f1d5d52bc5bc73eed6 | jspatcher/package-dsp | dcblocker.dsp | declare description "DC blocker. Default dc blocker has -3dB point near 35 Hz (at 44.1 kHz) and high-frequency gain near 1.0025 (due to no scaling).";
import("stdfaust.lib");
process = fi.dcblocker;
| https://raw.githubusercontent.com/jspatcher/package-dsp/bc89a1ce69e7d444c65f5a918fc5dba33d329fa7/src/dsps/dcblocker.dsp | faust | declare description "DC blocker. Default dc blocker has -3dB point near 35 Hz (at 44.1 kHz) and high-frequency gain near 1.0025 (due to no scaling).";
import("stdfaust.lib");
process = fi.dcblocker;
|
|
9fea03f0929d915dba080d5cef0fd281c71dc82a37fc73cbf983b94df9df4de3 | jrkolsby/SoundGarden | churchBell.dsp | declare name "ChurchBell";
declare description "Generic church bell physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.churchBell_ui <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/churchBell.dsp | faust | declare name "ChurchBell";
declare description "Generic church bell physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.churchBell_ui <: _,_;
|
|
cd10b684ba021319b10570223f500bc86e98a29e3fb4edf7c21dd46b5cd3f0c0 | jrdooley/formuls | f_reverb.dsp | import("stdfaust.lib");
fx = library("ffx.lib");
rev = fx.rev;
process = _,_ : rev : _,_;
| https://raw.githubusercontent.com/jrdooley/formuls/9e3264759a3685478d8f9fe5a99e63474afa80ad/src/faust/f_reverb.dsp | faust | import("stdfaust.lib");
fx = library("ffx.lib");
rev = fx.rev;
process = _,_ : rev : _,_;
|
|
73e3ed81e2dc916246caefb1b175b8796cab78177773c51a85e999a65783efb1 | jrkolsby/SoundGarden | violinMIDI.dsp | declare name "ViolinMidi";
declare description "Simple MIDI-controllable violin physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.violin_ui_MIDI <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/dist/modules/violinMIDI.dsp | faust | declare name "ViolinMidi";
declare description "Simple MIDI-controllable violin physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.violin_ui_MIDI <: _,_;
|
|
c8dc7753d4f9fe733d0afc5c247185095fadc542b35bb867cef40c2d5ae24008 | jrkolsby/SoundGarden | standardBell.dsp | declare name "StandardChurchBell";
declare description "Standard church bell physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.standardBell_ui <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/standardBell.dsp | faust | declare name "StandardChurchBell";
declare description "Standard church bell physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.standardBell_ui <: _,_;
|
|
e7667cc18c736346ff3a4ee86b7443834eebb9c9763aa8bb185cfcd2c964e0ee | jrkolsby/SoundGarden | russianBell.dsp | declare name "RussianChurchBell";
declare description "Russian church bell physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.russianBell_ui <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/russianBell.dsp | faust | declare name "RussianChurchBell";
declare description "Russian church bell physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.russianBell_ui <: _,_;
|
|
3de9c13f2fa4f5c6efca9b7e7078e8be277522b292f06bb99db621f72c7c7d3c | jrkolsby/SoundGarden | germanBell.dsp | declare name "GermanChurchBell";
declare description "German church bell physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.germanBell_ui <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/germanBell.dsp | faust | declare name "GermanChurchBell";
declare description "German church bell physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.germanBell_ui <: _,_;
|
|
bb7817f77abee2b6cad0504f089a2f691ad83eef50c430f9b752f6fd3a8ee76e | jrkolsby/SoundGarden | englishBell.dsp | declare name "EnglishChurchBell";
declare description "English church bell physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.englishBell_ui <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/dist/modules/englishBell.dsp | faust | declare name "EnglishChurchBell";
declare description "English church bell physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.englishBell_ui <: _,_;
|
|
56805d5a3be313502e3af5b0906b6195b9c11d2df16afb7f6d9b2d12e1ea741b | jrkolsby/SoundGarden | frenchBell.dsp | declare name "FrenchChurchBell";
declare description "French church bell physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.frenchBell_ui <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/frenchBell.dsp | faust | declare name "FrenchChurchBell";
declare description "French church bell physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.frenchBell_ui <: _,_;
|
|
4b7b51ec7869062c5a5e670829e491b9153ed0e07bd244be3c1c343f81617133 | jrkolsby/SoundGarden | violin.dsp | declare name "Violin";
declare description "Simple violin physical model controlled with continuous parameters.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.violin_ui <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/violin.dsp | faust | declare name "Violin";
declare description "Simple violin physical model controlled with continuous parameters.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.violin_ui <: _,_;
|
|
648754bf51f4f43a0c0410c1379ca700eab9832e449e6049db2e5317e7ac5c69 | jrkolsby/SoundGarden | djembeMIDI.dsp | declare name "DjembeMIDI";
declare description "Simple MIDI-controllable djembe physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.djembe_ui_MIDI <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/dist/modules/djembeMIDI.dsp | faust | declare name "DjembeMIDI";
declare description "Simple MIDI-controllable djembe physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.djembe_ui_MIDI <: _,_;
|
|
11f83afeb3ae41dc795a590a73642affab7bec644c622cab2d5f850f97294c17 | DISTRHO/Fadeli | analysis-spectralTiltLab.dsp | // example exercising filters.lib's spectral_tilt_demo
declare name "spectralTiltLab";
import("stdfaust.lib");
N = 10; // Number of pole-zero pairs to use
process = sig(dm.sawtooth_demo)
: stg(ba.bypass1(bp,dm.spectral_tilt_demo(N)))
<: sag(dm.spectral_level_demo)
with {
bp = stg(checkbox("[0] Bypass Spectral Tilt"));
stg(x) = vgroup(
"[1] Spectral Tilt Filter [tooltip: See Faust's filters.lib for spectral_tilt_demo]",x);
sig(x) = vgroup(
"[2] Test Signal [tooltip: See Faust's oscillator.lib for sawtooth_demo]",x);
sag(x) = vgroup(
"[4] Spectrum Analyzer [tooltip: See Faust's filters.lib for spectral_level_demo]",x);
};
| https://raw.githubusercontent.com/DISTRHO/Fadeli/22352d962714828613a88f008fa41744eecfac6e/dsp/analysis-spectralTiltLab.dsp | faust | example exercising filters.lib's spectral_tilt_demo
Number of pole-zero pairs to use |
declare name "spectralTiltLab";
import("stdfaust.lib");
process = sig(dm.sawtooth_demo)
: stg(ba.bypass1(bp,dm.spectral_tilt_demo(N)))
<: sag(dm.spectral_level_demo)
with {
bp = stg(checkbox("[0] Bypass Spectral Tilt"));
stg(x) = vgroup(
"[1] Spectral Tilt Filter [tooltip: See Faust's filters.lib for spectral_tilt_demo]",x);
sig(x) = vgroup(
"[2] Test Signal [tooltip: See Faust's oscillator.lib for sawtooth_demo]",x);
sag(x) = vgroup(
"[4] Spectrum Analyzer [tooltip: See Faust's filters.lib for spectral_level_demo]",x);
};
|
ec2f1e97e823df1cfc52a70fbeda043eb8794ae850142b2b102b5220cc1e2f63 | friskgit/snares | skipping.dsp |
import("stdfaust.lib");
// Impulse for snare hits
imp = ba.beat(hslider("tempo", 100, 1, 2000, 1));
// GUI
snaregroup(x) = vgroup("snare", x);
// Main envelope
env = en.ar(0.00001, 0.05, imp) * amp
// Noise generation and filter
snare(n) = no.multinoise(8) : par(i, 8, _ * env * 0.1);
process = snare;
| https://raw.githubusercontent.com/friskgit/snares/bb43ea5e706a0ead6d65dd176a5c492b2f5d8f74/faust/snare/src/extras/skipping.dsp | faust | Impulse for snare hits
GUI
Main envelope
Noise generation and filter |
import("stdfaust.lib");
imp = ba.beat(hslider("tempo", 100, 1, 2000, 1));
snaregroup(x) = vgroup("snare", x);
env = en.ar(0.00001, 0.05, imp) * amp
snare(n) = no.multinoise(8) : par(i, 8, _ * env * 0.1);
process = snare;
|
85d9c77ff1bd63a64ef1d9ea1f70aaefd860815e4aed11f8f969206cc9fcf319 | jspatcher/package-dsp | tri.dsp | declare defaultInputs "[0, 0.5]";
import("stdfaust.lib");
triangleN(N, freq, duty) = os.pulsetrainN(N, freq, duty) : fi.pole(p) : *(gain) with {
gain = 4.0 * freq / ma.SR; // for aproximate unit peak amplitude
p = 0.999;
};
triangle = triangleN(2); // default based on saw2
process = triangle;
| https://raw.githubusercontent.com/jspatcher/package-dsp/1889108d74c2ff71bf42ccc237d966de355facc6/src/dsps/tri.dsp | faust | for aproximate unit peak amplitude
default based on saw2
| declare defaultInputs "[0, 0.5]";
import("stdfaust.lib");
triangleN(N, freq, duty) = os.pulsetrainN(N, freq, duty) : fi.pole(p) : *(gain) with {
p = 0.999;
};
process = triangle;
|
2f398b4e54c1315a72592356ea242fffdc5c4128c42e79fc3aa2f6be06c3365b | jpburstrom/bubblebass | compLimiter.dsp | declare name "compLimiter";
import("stdfaust.lib");
channels = 4;
strength = hslider("strength", 0, 0, 1, 0.001):si.smoo; //write a specific position input signal operation here
thresh = hslider("thresh [unit:dB]", -20, -60, 0, 0.1):si.smoo;
threshLim = hslider("threshLim [unit:dB]", -6, -60, 0, 0.1):si.smoo;
att = hslider("att [unit:ms] [scale:log] [tooltip: Time constant in ms]", 8, 1, 100, 0.1) : *(0.001) : max(1/ma.SR);
rel = hslider("rel [unit:ms] [scale:log] [tooltip: Time constant in ms]", 500, 1, 1000, 0.1) : *(0.001) : max(1/ma.SR);
knee = hslider("knee", 3, 0, 18, 0.1):si.smoo;
makeupgain = hslider("makeupGain [unit:dB]
[tooltip: The compressed-signal output level is increased by this amount
(in dB) to make up for the level lost due to compression]",
0, 0, 24, 0.1) : ba.db2linear;
link = 0;
process = si.bus(channels) : co.RMS_FBcompressor_peak_limiter_N_chan(strength,thresh,threshLim,att,rel,knee,link,_,channels) : par(i, 4, *(makeupgain)) : si.bus(channels);
| https://raw.githubusercontent.com/jpburstrom/bubblebass/7e9dc90f5fbcbc9806d4da8169b068acd66fdd81/faust/compLimiter.dsp | faust | write a specific position input signal operation here | declare name "compLimiter";
import("stdfaust.lib");
channels = 4;
thresh = hslider("thresh [unit:dB]", -20, -60, 0, 0.1):si.smoo;
threshLim = hslider("threshLim [unit:dB]", -6, -60, 0, 0.1):si.smoo;
att = hslider("att [unit:ms] [scale:log] [tooltip: Time constant in ms]", 8, 1, 100, 0.1) : *(0.001) : max(1/ma.SR);
rel = hslider("rel [unit:ms] [scale:log] [tooltip: Time constant in ms]", 500, 1, 1000, 0.1) : *(0.001) : max(1/ma.SR);
knee = hslider("knee", 3, 0, 18, 0.1):si.smoo;
makeupgain = hslider("makeupGain [unit:dB]
[tooltip: The compressed-signal output level is increased by this amount
(in dB) to make up for the level lost due to compression]",
0, 0, 24, 0.1) : ba.db2linear;
link = 0;
process = si.bus(channels) : co.RMS_FBcompressor_peak_limiter_N_chan(strength,thresh,threshLim,att,rel,knee,link,_,channels) : par(i, 4, *(makeupgain)) : si.bus(channels);
|
4caff7bc81933a4b69f62ce2360af937eaa9cccb17d09a3e1df28c3caed950a3 | tomara-x/magi | fade.dsp | import("stdfaust.lib");
//easy crossfading! cool!
v = hslider("v",0,0,1,0.001) : si.smoo;
process = it.interpolate_linear(v,os.osc(440),os.osc(1000)) *0.1 <: _,_;
| https://raw.githubusercontent.com/tomara-x/magi/43f5af6acb97973b3b82004f433925851b44d7d0/practice/fade.dsp | faust | easy crossfading! cool! | import("stdfaust.lib");
v = hslider("v",0,0,1,0.001) : si.smoo;
process = it.interpolate_linear(v,os.osc(440),os.osc(1000)) *0.1 <: _,_;
|
dbbc7a9b259f278b3aff57e89053b78ea890131b9bf8c71f61c7a5c236636921 | jrkolsby/SoundGarden | vocalBP.dsp | declare name "Vocal BandPass";
declare description "Simple source-filter vocal synthesizer.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.SFFormantModelBP_ui <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/vocalBP.dsp | faust | declare name "Vocal BandPass";
declare description "Simple source-filter vocal synthesizer.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.SFFormantModelBP_ui <: _,_;
|
|
871aabd460d66d2a3d082ed757ac0c07b58877949f16923f861f8a73d193a354 | jrkolsby/SoundGarden | guitarMIDI.dsp | declare name "GuitarMidi";
declare description "Simple acoustic guitar model with steel strings.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.guitar_ui_MIDI <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/guitarMIDI.dsp | faust | declare name "GuitarMidi";
declare description "Simple acoustic guitar model with steel strings.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.guitar_ui_MIDI <: _,_;
|
|
0b746d700bcd62a12b769c80c1f19bc5e7eaaac004f3c5a1f25b72abb48b21c3 | jrkolsby/SoundGarden | vocalFOFMIDI.dsp | declare name "Vocal FOF MIDI";
declare description "MIDI-controllable FOF vocal synthesizer.";
declare license "MIT";
declare copyright "(c)Mike Olsen, CCRMA (Stanford University)";
import("stdfaust.lib");
process = pm.SFFormantModelFofSmooth_ui_MIDI <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/vocalFOFMIDI.dsp | faust | declare name "Vocal FOF MIDI";
declare description "MIDI-controllable FOF vocal synthesizer.";
declare license "MIT";
declare copyright "(c)Mike Olsen, CCRMA (Stanford University)";
import("stdfaust.lib");
process = pm.SFFormantModelFofSmooth_ui_MIDI <: _,_;
|
|
55ce9ed1f2f5bb90107db98f856b4f16773a8ce369d126bef925b37b447dffed | LucaSpanedda/Sound_reading_and_writing_techniques_in_Faust | 0.90_counter.dsp | // import Standard Faust library
// https://github.com/grame-cncm/faustlibraries/
import("stdfaust.lib");
decimale(x)= x-int(x);
counter(freq) =
// RESET at 1: 0.001 = counter reset at 1.000 (1000)
((0.001
: (+ :decimale@(ma.SR/freq))~ _)
// OFFSET (START COUNT FROM 0.001)
+ 0.001)
// COUNTER to int again
* 1000 : int;
process = counter(1) *0; // *0 avoid DC Offset
| https://raw.githubusercontent.com/LucaSpanedda/Sound_reading_and_writing_techniques_in_Faust/bb01eff05a51424c16420a00b383441d8973d85e/0_work-in-progress/0.90_counter.dsp | faust | import Standard Faust library
https://github.com/grame-cncm/faustlibraries/
RESET at 1: 0.001 = counter reset at 1.000 (1000)
OFFSET (START COUNT FROM 0.001)
COUNTER to int again
*0 avoid DC Offset
| import("stdfaust.lib");
decimale(x)= x-int(x);
counter(freq) =
((0.001
: (+ :decimale@(ma.SR/freq))~ _)
+ 0.001)
* 1000 : int;
|
c0494406efeb6e42284e61bdf5e6cf6a70deaff41b69219552fdaf08445ff12c | brummer10/ModularAmpToolKit.lv2 | epiphone.dsp | // generated automatically
// DO NOT MODIFY!
declare id "epiphone";
declare name "Single ended EL84";
declare shortname "Epiphone";
declare description "Single ended EL84";
declare samplerate "96000";
import("stdfaust.lib");
p1 = pre : fi.iir((b0/a0,b1/a0,b2/a0),(a1/a0,a2/a0)) : epiphone_jr_outclip with {
LogPot(a, x) = ba.if(a, (exp(a * x) - 1) / (exp(a) - 1), x);
Inverted(b, x) = ba.if(b, 1 - x, x);
s = 0.993;
fs = float(ma.SR);
pre = _;
b0 = fs*(5.16589926047446e-10*fs + 5.33527722168907e-8);
b1 = -1.03317985209489e-9*pow(fs,2);
b2 = fs*(5.16589926047446e-10*fs - 5.33527722168907e-8);
a0 = fs*(4.33069857761234e-10*fs + 4.59724862995143e-8) + 3.68375740341601e-7;
a1 = -8.66139715522468e-10*pow(fs,2) + 7.36751480683202e-7;
a2 = fs*(4.33069857761234e-10*fs - 4.59724862995143e-8) + 3.68375740341601e-7;
};
epiphone_jr_outclip = _<: ba.if(signbit(_), epiphone_jr_out_neg_clip, epiphone_jr_out_clip) :>_ with {
signbit = ffunction(int signbit(float), "math.h", "");
epiphone_jr_out_clip = ffunction(float epiphone_jr_outclip(float), "epiphone_jr_out_table.h", "");
epiphone_jr_out_neg_clip = ffunction(float epiphone_jr_out_negclip(float), "epiphone_jr_out_neg_table.h", "");
};
ingain = vslider("Gain",0,-30,30,0.1) : ba.db2linear : si.smooth(0.999);
outgain = vslider("Volume", 0, -30.0, 30.0, 0.1) : ba.db2linear : si.smooth(0.999);
process = *(ingain) : p1 : *(2.0) : *(outgain);
| https://raw.githubusercontent.com/brummer10/ModularAmpToolKit.lv2/6a27486df4392b32cdf2efb59fe9049f57c399f6/PowerAmps/dsp/epiphone.dsp | faust | generated automatically
DO NOT MODIFY! | declare id "epiphone";
declare name "Single ended EL84";
declare shortname "Epiphone";
declare description "Single ended EL84";
declare samplerate "96000";
import("stdfaust.lib");
p1 = pre : fi.iir((b0/a0,b1/a0,b2/a0),(a1/a0,a2/a0)) : epiphone_jr_outclip with {
LogPot(a, x) = ba.if(a, (exp(a * x) - 1) / (exp(a) - 1), x);
Inverted(b, x) = ba.if(b, 1 - x, x);
s = 0.993;
fs = float(ma.SR);
pre = _;
b0 = fs*(5.16589926047446e-10*fs + 5.33527722168907e-8);
b1 = -1.03317985209489e-9*pow(fs,2);
b2 = fs*(5.16589926047446e-10*fs - 5.33527722168907e-8);
a0 = fs*(4.33069857761234e-10*fs + 4.59724862995143e-8) + 3.68375740341601e-7;
a1 = -8.66139715522468e-10*pow(fs,2) + 7.36751480683202e-7;
a2 = fs*(4.33069857761234e-10*fs - 4.59724862995143e-8) + 3.68375740341601e-7;
};
epiphone_jr_outclip = _<: ba.if(signbit(_), epiphone_jr_out_neg_clip, epiphone_jr_out_clip) :>_ with {
signbit = ffunction(int signbit(float), "math.h", "");
epiphone_jr_out_clip = ffunction(float epiphone_jr_outclip(float), "epiphone_jr_out_table.h", "");
epiphone_jr_out_neg_clip = ffunction(float epiphone_jr_out_negclip(float), "epiphone_jr_out_neg_table.h", "");
};
ingain = vslider("Gain",0,-30,30,0.1) : ba.db2linear : si.smooth(0.999);
outgain = vslider("Volume", 0, -30.0, 30.0, 0.1) : ba.db2linear : si.smooth(0.999);
process = *(ingain) : p1 : *(2.0) : *(outgain);
|
7ca588441e9d62281fb695000bd366ea4dce42753fb11a7f7f25a16d52236c82 | madskjeldgaard/mkfaustplugins | Plat.dsp | declare name "Plat";
declare author "Mads Kjeldgaard";
declare copyright "Mads Kjeldgaard";
declare version "1.00";
declare license "GPL";
import("stdfaust.lib");
import("../../lib/mkdelay.dsp");
// Static
order = 4;
numDelays = 8;
maxdelay = 0.1 * ma.SR;
// Controls
delay = vslider("delaytime",0.1,0.001,2.0,0.01) : *(ma.SR) : si.smoo;
fb = vslider("fb",0.1,0.001,2.0,0.01);
lpf = vslider("cutoff",500,20.0,20000.0,1);
delayOffset=vslider("delayoffset",0.5,0.0,1.0,0.00001) : si.smoo;
modFreq=vslider("modFreq",0.05,0.0,1.0,0.00001) : si.smoo;
modDepth=vslider("modDepth",0.05,0.0,1.0,0.00001) : si.smoo;
// apFb = vslider("apFb",0.25,0.0,1.0,0.00001) : si.smoo;
// Process
process = _
<: mkd.parallel_comb_lpf(numDelays, order, maxdelay, delay, delayOffset, fb, lpf)
:> fi.allpass_fcomb(maxdelay,apdelay(modFreq, modDepth),fb) with{
apdelay(modFreq, modDepth) = os.lf_triangle(modFreq)
: *(maxdelay)
: *(modDepth);
};
| https://raw.githubusercontent.com/madskjeldgaard/mkfaustplugins/7d7bec0745262e9d9d09d38fa6c2d8684ffa3bda/plugins/Platey/Plat.dsp | faust | Static
Controls
apFb = vslider("apFb",0.25,0.0,1.0,0.00001) : si.smoo;
Process | declare name "Plat";
declare author "Mads Kjeldgaard";
declare copyright "Mads Kjeldgaard";
declare version "1.00";
declare license "GPL";
import("stdfaust.lib");
import("../../lib/mkdelay.dsp");
order = 4;
numDelays = 8;
maxdelay = 0.1 * ma.SR;
delay = vslider("delaytime",0.1,0.001,2.0,0.01) : *(ma.SR) : si.smoo;
fb = vslider("fb",0.1,0.001,2.0,0.01);
lpf = vslider("cutoff",500,20.0,20000.0,1);
delayOffset=vslider("delayoffset",0.5,0.0,1.0,0.00001) : si.smoo;
modFreq=vslider("modFreq",0.05,0.0,1.0,0.00001) : si.smoo;
modDepth=vslider("modDepth",0.05,0.0,1.0,0.00001) : si.smoo;
process = _
<: mkd.parallel_comb_lpf(numDelays, order, maxdelay, delay, delayOffset, fb, lpf)
:> fi.allpass_fcomb(maxdelay,apdelay(modFreq, modDepth),fb) with{
apdelay(modFreq, modDepth) = os.lf_triangle(modFreq)
: *(maxdelay)
: *(modDepth);
};
|
b5903c0ede7c7d77d0cdadbc8a2fed31332c947ef58060769e6c97070fb4a7ff | JuanSaudio/Blog | distortionTest.dsp | import("stdfaust.lib");
// dist(i) = _ <: *, _ : _ * isOn, _ : + : fi.dcblocker with {
// isOn = checkbox("On %i");
// };
dist(i) = ba.bypass1(isOn, _ : _^3.0 : _) with {
isOn = checkbox("On %i");
};
src(i) = vgroup("Src %i", os.osc(freq) * gain * gate) with {
freq = hslider("Freq %i[scale:log]",1000,10,47000,1) : si.smoo;
gain = hslider("Gain %i", -12, -120, 0, 0.1) : si.smoo : ba.db2linear;
gate = checkbox("Gate %i");
};
filt(i) = vgroup("Filter", ba.bypass1(bp, fi.lowpass6e(freq))) with {
bp = checkbox("Bypass");
freq = hslider("Freq %i[scale:log]",1000,10,47000,1) : si.smoo;
};
outGain = hslider("Master", -12, -120, 0, 0.1) : si.smoo : ba.db2linear;
process = hgroup("Test", par(i, 3, vgroup("DST %i", src(i) : dist(i) : filt(i))) :> dist(100) : dist(101)) : _ * outGain;
| https://raw.githubusercontent.com/JuanSaudio/Blog/62ed00a8beccea4d6e6b8b3e69d0f65069038ad3/AnalogVsDigital/distortionTest.dsp | faust | dist(i) = _ <: *, _ : _ * isOn, _ : + : fi.dcblocker with {
isOn = checkbox("On %i");
}; | import("stdfaust.lib");
dist(i) = ba.bypass1(isOn, _ : _^3.0 : _) with {
isOn = checkbox("On %i");
};
src(i) = vgroup("Src %i", os.osc(freq) * gain * gate) with {
freq = hslider("Freq %i[scale:log]",1000,10,47000,1) : si.smoo;
gain = hslider("Gain %i", -12, -120, 0, 0.1) : si.smoo : ba.db2linear;
gate = checkbox("Gate %i");
};
filt(i) = vgroup("Filter", ba.bypass1(bp, fi.lowpass6e(freq))) with {
bp = checkbox("Bypass");
freq = hslider("Freq %i[scale:log]",1000,10,47000,1) : si.smoo;
};
outGain = hslider("Master", -12, -120, 0, 0.1) : si.smoo : ba.db2linear;
process = hgroup("Test", par(i, 3, vgroup("DST %i", src(i) : dist(i) : filt(i))) :> dist(100) : dist(101)) : _ * outGain;
|
23c876512857df06910b6c15ccd2ae59480ca4b648b8ab1b15aaf8ded67bb27e | jujudusud/BPD | bddi-p7.dsp | // generated automatically
// DO NOT MODIFY!
declare id "bddi-p7";
declare name "BDDI part 7";
declare category "External";
import("stdfaust.lib");
process = pre : fi.iir((b0/a0,b1/a0,b2/a0),(a1/a0,a2/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.0284906356049262;
b1 = 0.0569812712098524;
b2 = 0.0284906356049262;
a0 = fs*(3.27641027332464e-10*fs + 4.51300317739001e-6) + 0.0284909205112823;
a1 = -6.55282054664928e-10*pow(fs,2) + 0.0569818410225645;
a2 = fs*(3.27641027332464e-10*fs - 4.51300317739001e-6) + 0.0284909205112823;
};
| https://raw.githubusercontent.com/jujudusud/BPD/f6f931ae528147d59bcf3d4e0a59586338671a58/bddi-dsp/bddi-p7.dsp | faust | generated automatically
DO NOT MODIFY! | declare id "bddi-p7";
declare name "BDDI part 7";
declare category "External";
import("stdfaust.lib");
process = pre : fi.iir((b0/a0,b1/a0,b2/a0),(a1/a0,a2/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.0284906356049262;
b1 = 0.0569812712098524;
b2 = 0.0284906356049262;
a0 = fs*(3.27641027332464e-10*fs + 4.51300317739001e-6) + 0.0284909205112823;
a1 = -6.55282054664928e-10*pow(fs,2) + 0.0569818410225645;
a2 = fs*(3.27641027332464e-10*fs - 4.51300317739001e-6) + 0.0284909205112823;
};
|
60d8fdff78f6e7593791acd1d0a6e9774fd3e34263aac771c47e36180579ee81 | johannphilippe/grame_cnsmd_2023 | poly.dsp | //declare options "[midi:on][nvoices:12]";
declare options "[midi:on]";
declare options "[nvoices:12]";
import("stdfaust.lib");
//Hence, any Faust program declaring the freq (or key), gain (or vel or velocity), and gate parameter is polyphony-compatible.
freq = hslider("freq", 100, 50, 500, 1);
gain = hslider("gain", 0.5, 0, 1, 0.01);
gate = button("gate");
process = os.sawtooth(freq) * gain * gate;
| https://raw.githubusercontent.com/johannphilippe/grame_cnsmd_2023/ccfd6e9a5c1537097546520317c8c5beea06006f/MIDI/poly.dsp | faust | declare options "[midi:on][nvoices:12]";
Hence, any Faust program declaring the freq (or key), gain (or vel or velocity), and gate parameter is polyphony-compatible. | declare options "[midi:on]";
declare options "[nvoices:12]";
import("stdfaust.lib");
freq = hslider("freq", 100, 50, 500, 1);
gain = hslider("gain", 0.5, 0, 1, 0.01);
gate = button("gate");
process = os.sawtooth(freq) * gain * gate;
|
9a1cc3e6a252b03f345b933cbe769fef54f322e5ef15e15d55d91c0f160f6af4 | tomara-x/magi | kick.dsp | //80bpm kick
import("stdfaust.lib");
trig = ba.pulsen(ba.sec2samp(0.5), ba.sec2samp(60/80));
sig = sy.kick(44, 0.01, 0.001, .6, 1, trig);
process = sig <: _,_;
| https://raw.githubusercontent.com/tomara-x/magi/bcf22a4ef23899cd8ce3bf5e08e374994907f81a/practice/kick.dsp | faust | 80bpm kick | import("stdfaust.lib");
trig = ba.pulsen(ba.sec2samp(0.5), ba.sec2samp(60/80));
sig = sy.kick(44, 0.01, 0.001, .6, 1, trig);
process = sig <: _,_;
|
c4cd420f2030b32f1d757911681597ba9052f5c1d2081937f1cc9bc6256e136e | jrkolsby/SoundGarden | brassMIDI.dsp | declare name "BrassMIDI";
declare description "Simple MIDI-controllable brass instrument physical model with physical parameters.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.brass_ui_MIDI <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/brassMIDI.dsp | faust | declare name "BrassMIDI";
declare description "Simple MIDI-controllable brass instrument physical model with physical parameters.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.brass_ui_MIDI <: _,_;
|
|
f39981db9d7f0dc265abb2dce0b18cf14688630ec7f9c5d257b6439b5344f652 | jrkolsby/SoundGarden | asynth.dsp | import("stdfaust.lib");
decimalpart(x) = x-int(x);
phase(f) = f/ma.SR : (+ : decimalpart) ~ _ ;
timbre(f) = phase(f)*0.5 + phase(f*2)*0.25 + phase(f*3)*0.125;
process = timbre(hslider("freq", 440, 20, 10000, 1))
* hslider("gain", 0.5, 0, 1, 0.01)
* (button("gate") : en.adsr(0.1,0.1,0.98,0.1));
effect = dm.zita_light;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/asynth.dsp | faust | import("stdfaust.lib");
decimalpart(x) = x-int(x);
phase(f) = f/ma.SR : (+ : decimalpart) ~ _ ;
timbre(f) = phase(f)*0.5 + phase(f*2)*0.25 + phase(f*3)*0.125;
process = timbre(hslider("freq", 440, 20, 10000, 1))
* hslider("gain", 0.5, 0, 1, 0.01)
* (button("gate") : en.adsr(0.1,0.1,0.98,0.1));
effect = dm.zita_light;
|
|
dd8a08c59dc7385e2c06cbb37e2c51c5cc225c3262c012639e287b52120eac20 | friskgit/kmh_114 | KMH114_channel_map_C.dsp | declare name "Channel mapping for Studio 114";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
//---------------`Channel mapping plugin` --------------------------
//
// Channel mapping plugin that takes 15 channels of input (center speaker included)
// and maps it to the channel/speaker configuration of the studio 114 according to:
//
// * 1 -> 1 (L)
// * 2 -> 2 (R)
// * 3 -> 3 (C)
// * 4 -> 5 (LSR)
// * 5 -> 6 (RSR)
// * 6 -> 7 (LSF)
// * 7 -> 8 (RSF)
// * 8 -> 9 (RL)
// * 9 -> 10 (RR)
// * 10 -> 11 (ULF)
// * 11 -> 12 (URF)
// * 12 -> 13 (URL)
// * 13 -> 14 (URR)
// * 14 -> 15 (VOG)
//
//---------------------------------------------------
import("stdfaust.lib");
vmeter(x) = attach(x, envelop(x) : vbargraph("[unit:dB]", -70, +5));
hmeter(x) = attach(x, envelop(x) : hbargraph("[2][unit:dB]", -70, +5));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
process(L, C, R, RSF, RSR, RR, RL, LSR, LSF, ULF, URF, URL, URR, VOG, x) =
vgroup("", (L, R, C, x, LSR, RSR, LSF, RSF, RL, RR) : hgroup("lower ring", par(i, 10, vgroup("%i", vmeter)))),
vgroup("", (ULF, URF, URR, URL) : hgroup("upper ring", par(i, 4, vgroup("%i", vmeter)))),
vgroup("", (VOG) : hgroup("vog", par(i, 1, vgroup("%i", vmeter))));
| https://raw.githubusercontent.com/friskgit/kmh_114/2ebc5bb7d796827856a69b27700ac9cb08689c04/KMH114_utility/doc/KMH114_channel_map_C-mdoc/src/KMH114_channel_map_C.dsp | faust | ---------------`Channel mapping plugin` --------------------------
Channel mapping plugin that takes 15 channels of input (center speaker included)
and maps it to the channel/speaker configuration of the studio 114 according to:
* 1 -> 1 (L)
* 2 -> 2 (R)
* 3 -> 3 (C)
* 4 -> 5 (LSR)
* 5 -> 6 (RSR)
* 6 -> 7 (LSF)
* 7 -> 8 (RSF)
* 8 -> 9 (RL)
* 9 -> 10 (RR)
* 10 -> 11 (ULF)
* 11 -> 12 (URF)
* 12 -> 13 (URL)
* 13 -> 14 (URR)
* 14 -> 15 (VOG)
--------------------------------------------------- | declare name "Channel mapping for Studio 114";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
import("stdfaust.lib");
vmeter(x) = attach(x, envelop(x) : vbargraph("[unit:dB]", -70, +5));
hmeter(x) = attach(x, envelop(x) : hbargraph("[2][unit:dB]", -70, +5));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
process(L, C, R, RSF, RSR, RR, RL, LSR, LSF, ULF, URF, URL, URR, VOG, x) =
vgroup("", (L, R, C, x, LSR, RSR, LSF, RSF, RL, RR) : hgroup("lower ring", par(i, 10, vgroup("%i", vmeter)))),
vgroup("", (ULF, URF, URR, URL) : hgroup("upper ring", par(i, 4, vgroup("%i", vmeter)))),
vgroup("", (VOG) : hgroup("vog", par(i, 1, vgroup("%i", vmeter))));
|
1590c5073e89a7ee6572587734af3e3ad883279cc9c6a2c9a71d96f0ce54fe16 | LSSN/2020-01-23-dsp-3a-mariagraziachessa003 | Maria.dsp | //GS - manca l'estensione .dsp
//la sintesi sottrattiva analizza un suono attraverso 3 strumenti: spettrogramma, sonogramma e forma d'onda
//GS - si chiama sintesi, va bene descrivere i metodi di analisi, ma poi dovevi descrivere la sintesi
//GS - sottrattiva, cosa che non hai fatto.
import("stdfaust.lib");
//order = fcut(2020000); //GS -l'order, non è l'ordine delle cose, tipo una lista. doveva essere una potenza di 2 <= di 128
//process = fi.lowpass (order 20) : fi.highpass (order 20000);
//GS - non hai fatto girare il codice? mancano le virgole dentro le parentesi!
//GS - non hai selezionato una banda, la frequenza di taglio doveva essere uguale per i due filtri
//GS - versione corretta
order = 32;
fcut = 5000;
process = fi.lowpass(order, fcut) : fi.highpass(order, fcut);
| https://raw.githubusercontent.com/LSSN/2020-01-23-dsp-3a-mariagraziachessa003/50b69450d0415ffe59ad6c4f85c4ec5a92e3d908/Maria.dsp | faust | GS - manca l'estensione .dsp
la sintesi sottrattiva analizza un suono attraverso 3 strumenti: spettrogramma, sonogramma e forma d'onda
GS - si chiama sintesi, va bene descrivere i metodi di analisi, ma poi dovevi descrivere la sintesi
GS - sottrattiva, cosa che non hai fatto.
order = fcut(2020000); //GS -l'order, non è l'ordine delle cose, tipo una lista. doveva essere una potenza di 2 <= di 128
process = fi.lowpass (order 20) : fi.highpass (order 20000);
GS - non hai fatto girare il codice? mancano le virgole dentro le parentesi!
GS - non hai selezionato una banda, la frequenza di taglio doveva essere uguale per i due filtri
GS - versione corretta |
import("stdfaust.lib");
order = 32;
fcut = 5000;
process = fi.lowpass(order, fcut) : fi.highpass(order, fcut);
|
1ef7d8305df004c65ed9a6be595d88d13380227aece4927ad9d6abf0ecd123d7 | gdesiato/faust-folder1 | sawtoothSynth.dsp | import("stdfaust.lib");
freq = hslider("freq", 400, 50, 1000, 0.1);
gain = hslider("gain", 0.1, 0, 1, 0.01);
trigger = button("gate");
process = os.sawtooth(freq) * gain * trigger;
| https://raw.githubusercontent.com/gdesiato/faust-folder1/a95317145482b58556a6b1ac15c5d48a37c611c6/sawtoothSynth.dsp | faust | import("stdfaust.lib");
freq = hslider("freq", 400, 50, 1000, 0.1);
gain = hslider("gain", 0.1, 0, 1, 0.01);
trigger = button("gate");
process = os.sawtooth(freq) * gain * trigger;
|
|
62938a47e1d71f2e1ec89a83fc36e7bbc290c8d295d5254c0da20c2cd0f3c7c3 | agraef/pd-remote | karplus.dsp |
declare name "karplus";
declare description "Karplus-Strong string synth";
declare author "Yann Orlarey";
declare version "2.0";
import("stdfaust.lib");
// master volume and pan
vol = hslider("/v:[1]/vol [midi:ctrl 2]", 0.3, 0, 1, 0.01);
pan = hslider("/v:[1]/pan [midi:ctrl 10]", 0.5, 0, 1, 0.01);
// modulation (excitator and resonator parameters)
size = hslider("/v:[2]/samples", 512, 1, 1024, 1); // #samples
dtime = hslider("/v:[2]/decay time", 4, 0, 10, 0.01); // -60db decay time
// pitch bend (2 semitones up and down, in cent increments)
bend = hslider("/v:[3]/bend[midi:pitchbend]", 0, -2, 2, 0.01);
// voice parameters
freq(i) = nentry("/freq%i[voice:freq]", 440, 20, 20000, 1);
gain(i) = nentry("/gain%i[voice:gain]", 1, 0, 10, 0.01);
gate(i) = button("/gate%i[voice:gate]");
/* The excitator: */
upfront(x) = (x-x') > 0.0;
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = upfront : release(n) : >(0.0) : +(leak);
leak = 1.0/65536.0; // avoid denormals on Pentium
excitator = trigger(size);
/* The resonator: */
average(x) = (x+x')/2;
att(d,t) = 1-1/pow(ba.db2linear(60), d/(ma.SR*t));
comb(d,a) = (+ : de.fdelay(4096, d-1.5)) ~ (average : *(1.0-a));
resonator(d) = comb(d,att(d,dtime));
/* DC blocker (see http://ccrma.stanford.edu/~jos/filters/DC_Blocker.html): */
dcblocker(x) = (x-x') : (+ ~ *(0.995));
/* Karplus-Strong string synthesizer: */
smooth(c) = *(1-c) : +~*(c);
voice(i) = no.noise*gain(i) : *(gate(i) : excitator)
: resonator(ma.SR/(freq(i)*pow(2,bend/12)))
: dcblocker;
n = 8;
process = sum(i, n, voice(i))
: (*(smooth(0.99, vol)) : sp.panner(smooth(0.99, pan)));
| https://raw.githubusercontent.com/agraef/pd-remote/4fede0b70ac5f9544a783dd45ddcf4643a29bc63/examples/dsp/karplus.dsp | faust | master volume and pan
modulation (excitator and resonator parameters)
#samples
-60db decay time
pitch bend (2 semitones up and down, in cent increments)
voice parameters
The excitator:
avoid denormals on Pentium
The resonator:
DC blocker (see http://ccrma.stanford.edu/~jos/filters/DC_Blocker.html):
Karplus-Strong string synthesizer: |
declare name "karplus";
declare description "Karplus-Strong string synth";
declare author "Yann Orlarey";
declare version "2.0";
import("stdfaust.lib");
vol = hslider("/v:[1]/vol [midi:ctrl 2]", 0.3, 0, 1, 0.01);
pan = hslider("/v:[1]/pan [midi:ctrl 10]", 0.5, 0, 1, 0.01);
bend = hslider("/v:[3]/bend[midi:pitchbend]", 0, -2, 2, 0.01);
freq(i) = nentry("/freq%i[voice:freq]", 440, 20, 20000, 1);
gain(i) = nentry("/gain%i[voice:gain]", 1, 0, 10, 0.01);
gate(i) = button("/gate%i[voice:gate]");
upfront(x) = (x-x') > 0.0;
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = upfront : release(n) : >(0.0) : +(leak);
excitator = trigger(size);
average(x) = (x+x')/2;
att(d,t) = 1-1/pow(ba.db2linear(60), d/(ma.SR*t));
comb(d,a) = (+ : de.fdelay(4096, d-1.5)) ~ (average : *(1.0-a));
resonator(d) = comb(d,att(d,dtime));
dcblocker(x) = (x-x') : (+ ~ *(0.995));
smooth(c) = *(1-c) : +~*(c);
voice(i) = no.noise*gain(i) : *(gate(i) : excitator)
: resonator(ma.SR/(freq(i)*pow(2,bend/12)))
: dcblocker;
n = 8;
process = sum(i, n, voice(i))
: (*(smooth(0.99, vol)) : sp.panner(smooth(0.99, pan)));
|
d33ce27d148ef292ac017a9126f8df9ba74c943df0cd5c52f2110dd4c079a439 | agraef/pd-remote | mono.dsp |
declare name "mono";
declare description "a monophonic synth, with portamento";
declare author "Albert Graef";
declare version "2.0";
// This is basically the same as organ.dsp, but with a single voice, featuring
// legato play and portamento like ye good monophonic synths of old.
import("stdfaust.lib");
// master controls (volume and stereo panning)
vol = hslider("/v:[1]/vol [midi:ctrl 2]", 0.3, 0, 1, 0.01);
pan = hslider("/v:[1]/pan [midi:ctrl 10]", 0.5, 0, 1, 0.01);
// adsr controls
A = hslider("/v:[2]/[1] attack", 0.01, 0, 1, 0.001); // sec
D = hslider("/v:[2]/[2] decay", 0.3, 0, 1, 0.001); // sec
S = hslider("/v:[2]/[3] sustain", 0.5, 0, 1, 0.01); // 0-1
R = hslider("/v:[2]/[4] release", 0.2, 0, 1, 0.001); // sec
// relative amplitudes of the different partials
a(i) = hslider("/v:[3]/amp%i", 1/i, 0, 3, 0.01);
// portamento time
t = hslider("/v:[4]/portamento [midi:ctrl 5]", 0, 0, 1, 0.01);
// pitch bend (2 semitones up and down, in cent increments)
bend = hslider("/v:[5]/bend[midi:pitchbend]", 0, -2, 2, 0.01);
// voice controls
freq = nentry("/freq[voice:freq]", 440, 20, 20000, 1); // cps
gain = nentry("/gain[voice:gain]", 0.3, 0, 10, 0.01); // 0-10
gate = button("/gate[voice:gate]"); // 0/1
// additive synth: 3 sine oscillators with adsr envelop
voice(f) = sum(i, 3, a(i+1)*os.osc((i+1)*f*pow(2,bend/12)));
process = voice(si.polySmooth(gate, ba.tau2pole(t/6.91), 1, freq)) *
(gate:en.adsr(A,D,S,R))*gain
: (*(vol:si.smooth(0.99)) : sp.panner(pan:si.smooth(0.99)));
| https://raw.githubusercontent.com/agraef/pd-remote/4fede0b70ac5f9544a783dd45ddcf4643a29bc63/examples/dsp/mono.dsp | faust | This is basically the same as organ.dsp, but with a single voice, featuring
legato play and portamento like ye good monophonic synths of old.
master controls (volume and stereo panning)
adsr controls
sec
sec
0-1
sec
relative amplitudes of the different partials
portamento time
pitch bend (2 semitones up and down, in cent increments)
voice controls
cps
0-10
0/1
additive synth: 3 sine oscillators with adsr envelop |
declare name "mono";
declare description "a monophonic synth, with portamento";
declare author "Albert Graef";
declare version "2.0";
import("stdfaust.lib");
vol = hslider("/v:[1]/vol [midi:ctrl 2]", 0.3, 0, 1, 0.01);
pan = hslider("/v:[1]/pan [midi:ctrl 10]", 0.5, 0, 1, 0.01);
a(i) = hslider("/v:[3]/amp%i", 1/i, 0, 3, 0.01);
t = hslider("/v:[4]/portamento [midi:ctrl 5]", 0, 0, 1, 0.01);
bend = hslider("/v:[5]/bend[midi:pitchbend]", 0, -2, 2, 0.01);
voice(f) = sum(i, 3, a(i+1)*os.osc((i+1)*f*pow(2,bend/12)));
process = voice(si.polySmooth(gate, ba.tau2pole(t/6.91), 1, freq)) *
(gate:en.adsr(A,D,S,R))*gain
: (*(vol:si.smooth(0.99)) : sp.panner(pan:si.smooth(0.99)));
|
ee37661d7d7a46b70db17458f071c934947279838a9d05c48f5af634ddf259d6 | jrkolsby/SoundGarden | vocalBPMIDI.dsp | declare name "Vocal BandPass MIDI";
declare description "Simple MIDI-controllable source-filter vocal synthesizer.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.SFFormantModelBP_ui_MIDI <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/vocalBPMIDI.dsp | faust | declare name "Vocal BandPass MIDI";
declare description "Simple MIDI-controllable source-filter vocal synthesizer.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.SFFormantModelBP_ui_MIDI <: _,_;
|
|
a92c8cffc7e68d1fc57e1ca9e15f370372c374f9d5bf019b046030e08be64f95 | SimplyOnMyWay/harp-model | mcliag.dsp | // Based on <faust-0.9.8.6>/faust-examples/faust/karplus.dsp
import("stdfaust.lib");
// MIDI-driven parameters:
freq = nentry("freq", 370, 20, 20000, 1); // Hz
gain = nentry("gain", 1, 0, 10, 0.01); // 0 to 1
gate = button("gate"); // 0 or 1
// Excitation window (convert gate to a one-period pulse):
diffgtz(x) = (x-x') > 0;
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = diffgtz : release(n) : > (0.0);
// Resonator:
average(x) = (x+x')/2;
bv = 0.99002,0.53323,-0.059946,0.47646,0.6579,0.41096,0.10609,0.25464,0.1224,0.1032,0.23355,0.1154,0.027333,0.24254,0.11144,0.13616,0.29518,0.22837,0.20541,0.1811,0.23351,0.25601,0.18682,0.1572,0.12634,0.1038,0.10661,0.083271,0.077115,0.020829,0.01552;
// note av[0] = 1 is assumed by Faust!
av = 0.52874,-0.064736,0.48365,0.65922,0.40633,0.10369,0.25905,0.11832,0.10181,0.23729,0.11339,0.026769,0.24361,0.11236,0.13613,0.29448,0.22862,0.20701,0.17915,0.23339,0.2578,0.18605,0.15629,0.1266,0.10381,0.10485,0.084,0.0772,0.019029,0.016185;
//bv = 0.5,0.5;
//av = 0;
loopFilter = fi.iir(bv,av);
P = (ma.SR/freq)-0.5;
//resonator = (+ : de.delay(4096, P)) ~ (average);
dwg = (+ : de.delay(4096, P)) ~ (loopFilter);
imp = 1-1';
process = no.noise : *(gain) : *(gate : trigger(P)) : dwg <: _,_;
//process = imp : dwg <: _,_; | https://raw.githubusercontent.com/SimplyOnMyWay/harp-model/c271d2b07fd80ef09321dee8ae1692de98e54c1c/faust_code/mcliag.dsp | faust | Based on <faust-0.9.8.6>/faust-examples/faust/karplus.dsp
MIDI-driven parameters:
Hz
0 to 1
0 or 1
Excitation window (convert gate to a one-period pulse):
Resonator:
note av[0] = 1 is assumed by Faust!
bv = 0.5,0.5;
av = 0;
resonator = (+ : de.delay(4096, P)) ~ (average);
process = imp : dwg <: _,_; | import("stdfaust.lib");
diffgtz(x) = (x-x') > 0;
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = diffgtz : release(n) : > (0.0);
average(x) = (x+x')/2;
bv = 0.99002,0.53323,-0.059946,0.47646,0.6579,0.41096,0.10609,0.25464,0.1224,0.1032,0.23355,0.1154,0.027333,0.24254,0.11144,0.13616,0.29518,0.22837,0.20541,0.1811,0.23351,0.25601,0.18682,0.1572,0.12634,0.1038,0.10661,0.083271,0.077115,0.020829,0.01552;
av = 0.52874,-0.064736,0.48365,0.65922,0.40633,0.10369,0.25905,0.11832,0.10181,0.23729,0.11339,0.026769,0.24361,0.11236,0.13613,0.29448,0.22862,0.20701,0.17915,0.23339,0.2578,0.18605,0.15629,0.1266,0.10381,0.10485,0.084,0.0772,0.019029,0.016185;
loopFilter = fi.iir(bv,av);
P = (ma.SR/freq)-0.5;
dwg = (+ : de.delay(4096, P)) ~ (loopFilter);
imp = 1-1';
process = no.noise : *(gain) : *(gate : trigger(P)) : dwg <: _,_; |
a3c0142ecae5e46519583fa6d969f83076aa271b025abbe12ff35a50071a1bd3 | romsom/faust-experiments | chorus-3.dsp | import("stdfaust.lib");
DELAY_MS_MAX = 25;
SR_MAX = 192000.0;
SR_ = min(ma.SR, SR_MAX);
// schematic: https://music-electronics-forum.com/attachment.php?s=29ec8b940dac9eece5ad132141fc8031&attachmentid=29504&d=1404427474
// -> filename: "boss CE3.pdf"
// BBD emulation: http://dafx10.iem.at/proceedings/papers/RaffelSmith_DAFx10_P42.pdf
depth = hslider("depth", 0.5, 0.0, 1.0, 0.01) : si.smoo : min(1.0) : max(0.0);
rate = hslider("rate", 0.5, 0.0, 1.0, 0.01) : si.smoo : min(1.0) : max(0.0);
// TODO
// - how many stages does the MN3207 have? - 1024
// - what sampling frequency range do we have?
// - look at MN3102:
// - what does the lfo waveform look like?
// - sampling could be an option
// - or sampling of the modulated clock signal and reconstruction of the lfo -> delay characteristic
// - what is the frequency/phase response of the anti-aliasing and reconstruction filters?
// - there are also some 0.33µF coupling caps that may limit the low end of the wet signal
// - how do we emulate the filters?
// - add noise
// - implement using fixed length delay line with variable sampling frequency
// - that requires resampling in C++ code - how does guitarix handle that?
// - what is the range of the lfo frequency?
// Info:
// Mixing:
// - depending on the setting of the mode switch, either
// - Out A: dry + wet, Out B: dry - wet
// - Out A: wet, Out B: dry
// - the dry signals come from the same OP-Amp output, that drives the anti-alias filter (through an 0.33µF cap in the latter case)
process = _ <: _, _;
| https://raw.githubusercontent.com/romsom/faust-experiments/6f5fa3347fb3d01c0247a8fee8ff1221f79abaeb/effects/chorus-3.dsp | faust | schematic: https://music-electronics-forum.com/attachment.php?s=29ec8b940dac9eece5ad132141fc8031&attachmentid=29504&d=1404427474
-> filename: "boss CE3.pdf"
BBD emulation: http://dafx10.iem.at/proceedings/papers/RaffelSmith_DAFx10_P42.pdf
TODO
- how many stages does the MN3207 have? - 1024
- what sampling frequency range do we have?
- look at MN3102:
- what does the lfo waveform look like?
- sampling could be an option
- or sampling of the modulated clock signal and reconstruction of the lfo -> delay characteristic
- what is the frequency/phase response of the anti-aliasing and reconstruction filters?
- there are also some 0.33µF coupling caps that may limit the low end of the wet signal
- how do we emulate the filters?
- add noise
- implement using fixed length delay line with variable sampling frequency
- that requires resampling in C++ code - how does guitarix handle that?
- what is the range of the lfo frequency?
Info:
Mixing:
- depending on the setting of the mode switch, either
- Out A: dry + wet, Out B: dry - wet
- Out A: wet, Out B: dry
- the dry signals come from the same OP-Amp output, that drives the anti-alias filter (through an 0.33µF cap in the latter case) | import("stdfaust.lib");
DELAY_MS_MAX = 25;
SR_MAX = 192000.0;
SR_ = min(ma.SR, SR_MAX);
depth = hslider("depth", 0.5, 0.0, 1.0, 0.01) : si.smoo : min(1.0) : max(0.0);
rate = hslider("rate", 0.5, 0.0, 1.0, 0.01) : si.smoo : min(1.0) : max(0.0);
process = _ <: _, _;
|
d2513cf16ccf04c943e3f61c66483e055345c01615ea3a5f02b73aa28f75c8db | tomara-x/magi | heartbeat.dsp | //heartbeat
import("stdfaust.lib");
trig = ba.pulsen(ba.sec2samp(0.01), ba.sec2samp(1));
sig = sy.kick(10, 0.05, 0.05, .3, 10, trig+(trig:@(ba.sec2samp(0.3))));
process = sig <: _,_;
| https://raw.githubusercontent.com/tomara-x/magi/bcf22a4ef23899cd8ce3bf5e08e374994907f81a/practice/heartbeat.dsp | faust | heartbeat | import("stdfaust.lib");
trig = ba.pulsen(ba.sec2samp(0.01), ba.sec2samp(1));
sig = sy.kick(10, 0.05, 0.05, .3, 10, trig+(trig:@(ba.sec2samp(0.3))));
process = sig <: _,_;
|
8632d8a9020e38eb473941a7d8ff5db55bac3239d59a5d1f1ddd798b9a9284fa | JDCAudio/Stray_virtual-synth | sawtest.dsp | import("stdfaust.lib");
gain = hslider("gain",0.5,0,1,0.01);
process = gain,os.sawtooth(440) : *; | https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/sawtest.dsp | faust | import("stdfaust.lib");
gain = hslider("gain",0.5,0,1,0.01);
process = gain,os.sawtooth(440) : *; |
|
c6b085421369ede4b60acc8d255fee032c0bcaafed09a44a9703207667771b29 | johannphilippe/hypercurve | prototype.dsp | import("stdfaust.lib");
// MVCE
diocles_curve(A, x) = process_diocles(x) * COMPENSATION
with
{
process_diocles(x) = sqrt( (x*x*x) / (2 * A - x) );
COMPENSATION = 1.0 / process_diocles(1.0);
};
cubic_curve(x) = process_cubic(x) * COMPENSATION
with
{
process_cubic(x) = x*x*x;
COMPENSATION = 1.0 / process_cubic(1.0);
};
linear(x) = x;
segment(rel_x, y_start, y_dest, algo) = scaled
with {
abs_diff = abs(y_start - y_dest);
offset = min(y_start, y_dest);
scaled = (rel_x) , (1.0 - rel_x) : select2(y_start > y_dest) : algo : *(abs_diff) : +(offset) ;
};
//qLog(x) = ba.tabulate(1,log(_),TableSize,MinFreq,MaxFreq,x).cub;
hybrid(def, phas) = ba.tabulate(1, proc, def, 0.0, 1.0, phas).lin //def, proc(def), int(phas * def) : rdtable
with {
proc(d) = which
with {
x = d ;/// float(def);
calc_x = (x - to_deduce ) * current_seg_factor;
to_deduce = 0, 0.5 : select2(x >= 0.5);
current_seg_factor = 2;
//current_seg_factor = 1, 2 : select2(x >= 0.5);
which = dio, cub : select2(x >= 0.5)
with {
/*
dio = segment(calc_x, 0, 1, linear);
cub = segment(calc_x, 1, 0, linear);
*/
dio = segment(calc_x, 0, 1, diocles_curve(0.51));
cub = segment(calc_x, 1, 0, cubic_curve);
/*
dio = 0.51, calc_x : diocles_curve;
cub = calc_x : cubic_curve;
*/
};
};
};
hc = hybrid(16384, os.phasor(1, 1));
bg = hc : vbargraph("hypercurve", 0, 1);
amp = hslider("amp", 1, 0, 1, 0.01) : si.smoo;
process = os.osc(300 + (500 * hc)) * 0.1 * hc * amp ; //, bg ; | https://raw.githubusercontent.com/johannphilippe/hypercurve/79e9ad752e99a884fdd3c230c6ec818a7873f081/faust_lib/prototype_pure_faust/prototype.dsp | faust | MVCE
qLog(x) = ba.tabulate(1,log(_),TableSize,MinFreq,MaxFreq,x).cub;
def, proc(def), int(phas * def) : rdtable
/ float(def);
current_seg_factor = 1, 2 : select2(x >= 0.5);
dio = segment(calc_x, 0, 1, linear);
cub = segment(calc_x, 1, 0, linear);
dio = 0.51, calc_x : diocles_curve;
cub = calc_x : cubic_curve;
, bg ; | import("stdfaust.lib");
diocles_curve(A, x) = process_diocles(x) * COMPENSATION
with
{
process_diocles(x) = sqrt( (x*x*x) / (2 * A - x) );
COMPENSATION = 1.0 / process_diocles(1.0);
};
cubic_curve(x) = process_cubic(x) * COMPENSATION
with
{
process_cubic(x) = x*x*x;
COMPENSATION = 1.0 / process_cubic(1.0);
};
linear(x) = x;
segment(rel_x, y_start, y_dest, algo) = scaled
with {
abs_diff = abs(y_start - y_dest);
offset = min(y_start, y_dest);
scaled = (rel_x) , (1.0 - rel_x) : select2(y_start > y_dest) : algo : *(abs_diff) : +(offset) ;
};
with {
proc(d) = which
with {
calc_x = (x - to_deduce ) * current_seg_factor;
to_deduce = 0, 0.5 : select2(x >= 0.5);
current_seg_factor = 2;
which = dio, cub : select2(x >= 0.5)
with {
dio = segment(calc_x, 0, 1, diocles_curve(0.51));
cub = segment(calc_x, 1, 0, cubic_curve);
};
};
};
hc = hybrid(16384, os.phasor(1, 1));
bg = hc : vbargraph("hypercurve", 0, 1);
amp = hslider("amp", 1, 0, 1, 0.01) : si.smoo; |
8f31b997ab220f4b556908f846709dadbfed3fa02d5e08a5bd19770d2595c33a | lbrutti/faust-course | Sawtooth_poly.dsp | import("stdfaust.lib");
freq = hslider("[0]freq", 440, 250.0, 800.0, 0.01);
gain = hslider("[1]gain", 0.5, 0.0, 1.0, 0.01);
gate = button("[2]gate") : en.adsr(0.01, 0.01, 0.9, 0.1);
timbre(f) = os.sawtooth(f) * 0.5 + os.sawtooth(f*2) * 0.25 + os.sawtooth(f*3) * 0.125;
process = gain * timbre(freq) * gate * 0.5 <: _,_;
effect = dm.zita_light; | https://raw.githubusercontent.com/lbrutti/faust-course/9029f2761d7bdf4658993783367790d779e4431c/session1/Sawtooth_poly/Sawtooth_poly.dsp | faust | import("stdfaust.lib");
freq = hslider("[0]freq", 440, 250.0, 800.0, 0.01);
gain = hslider("[1]gain", 0.5, 0.0, 1.0, 0.01);
gate = button("[2]gate") : en.adsr(0.01, 0.01, 0.9, 0.1);
timbre(f) = os.sawtooth(f) * 0.5 + os.sawtooth(f*2) * 0.25 + os.sawtooth(f*3) * 0.125;
process = gain * timbre(freq) * gate * 0.5 <: _,_;
effect = dm.zita_light; |
|
226bb4a701332b4ff3c886a87ad89161c25729c093c293033787b10d92004d8e | lbrutti/faust-course | midi_poly_with_effects.dsp | import("stdfaust.lib");
freq = hslider("[0]freq", 440, 250.0, 800.0, 0.01);
gain = hslider("[1]gain", 0.5, 0.0, 1.0, 0.01);
gate = button("[2]gate") : en.adsr(0.01, 0.01, 0.9, 0.1);
timbre(f) = os.oscsin(f) * 0.5 + os.oscsin(f*2) * 0.25 + os.oscsin(f*3) * 0.125;
process = gain * timbre(freq) * gate * 0.5 <: _,_;
effect = dm.zita_light; | https://raw.githubusercontent.com/lbrutti/faust-course/9029f2761d7bdf4658993783367790d779e4431c/session1/amp_follower_ar/midi_poly_with_effects.dsp | faust | import("stdfaust.lib");
freq = hslider("[0]freq", 440, 250.0, 800.0, 0.01);
gain = hslider("[1]gain", 0.5, 0.0, 1.0, 0.01);
gate = button("[2]gate") : en.adsr(0.01, 0.01, 0.9, 0.1);
timbre(f) = os.oscsin(f) * 0.5 + os.oscsin(f*2) * 0.25 + os.oscsin(f*3) * 0.125;
process = gain * timbre(freq) * gate * 0.5 <: _,_;
effect = dm.zita_light; |
|
4eb9b271906346bc8147575d152588e43faca47f38cad29c83875d40940f9515 | chevremaudite/zosimos | distUI.dsp | //-----------------DIST----------------//
//Simple distortion effect, available for all 8 voices
//PARAMETERS:
// 1 - Mix : Dry/Wet signal mix
// 2 - Drive : Distortion factor
// 3 - Offset : ????
// 4 - ????
import("stdfaust.lib");
import("dist.lib");
process = dist(mix, drive, offset)
with{
mix = hslider("[4]Dist Mix [style:knob]", 0, 0, 1, 0.001):si.smoo;
drive = hslider("[5]Drive [style:knob]", 0, 0, 1, 0.001):si.smoo;
offset = hslider("[6]Offset [style:knob]", 0, 0, 1, 0.001):si.smoo;
};
| https://raw.githubusercontent.com/chevremaudite/zosimos/0da322fb7df2f7a86f568cdc3dfe416a69be8b5b/SOFTWARE/FAUST/ui/distUI.dsp | faust | -----------------DIST----------------//
Simple distortion effect, available for all 8 voices
PARAMETERS:
1 - Mix : Dry/Wet signal mix
2 - Drive : Distortion factor
3 - Offset : ????
4 - ???? | import("stdfaust.lib");
import("dist.lib");
process = dist(mix, drive, offset)
with{
mix = hslider("[4]Dist Mix [style:knob]", 0, 0, 1, 0.001):si.smoo;
drive = hslider("[5]Drive [style:knob]", 0, 0, 1, 0.001):si.smoo;
offset = hslider("[6]Offset [style:knob]", 0, 0, 1, 0.001):si.smoo;
};
|
f242ffbacab14fca153f9c1ef19dfbeafe7bf978bdac07bdac1b2ec47c83b62a | JDCAudio/Stray_virtual-synth | dirtydist.dsp | import("stdfaust.lib");
gain = hslider("gain", 0, 0, 1, 0.01);
process = *(100) : min(1) : max(-1) : *(gain); | https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/dirtydist.dsp | faust | import("stdfaust.lib");
gain = hslider("gain", 0, 0, 1, 0.01);
process = *(100) : min(1) : max(-1) : *(gain); |
|
9252f6120597fedf5b75465a8c77f7e8561902e31b74f204049d11669577a179 | JDCAudio/Stray_virtual-synth | scratchsin.dsp | import("stdfaust.lib");
phasor(f) = f/ma.SR : (+,1:fmod)~_;
process = phasor(440) * ma.PI*2 : sin; | https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/scratchsin.dsp | faust | import("stdfaust.lib");
phasor(f) = f/ma.SR : (+,1:fmod)~_;
process = phasor(440) * ma.PI*2 : sin; |
|
1eb31b9b4df9f11c7ccd5ba0c1d56afc09d2206acfcfe695dcedbf9f164b1eab | jrkolsby/SoundGarden | karplus.dsp | declare name "KarplusStrong";
declare description "Simple call of the Karplus-Strong model for the Faust physical modeling library";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.ks_ui_MIDI <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/karplus.dsp | faust | declare name "KarplusStrong";
declare description "Simple call of the Karplus-Strong model for the Faust physical modeling library";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.ks_ui_MIDI <: _,_;
|
|
5678a1e8c24ac06597783d0a393137cc8c6476715f345dd7eeb80d0f4a9ee91e | aravind-sadharani/puretones-music-room | Two-close-tones.dsp | import("stdfaust.lib");
commonPitch = hslider("[0][style:radio{'B':14;'A#':13;'A':12;'G#':11;'G':10;'F#':9;'F':8;'E':7;'D#':6;'D':5;'C#':4;'C':3}]Pitch",3,3,14,1);
fineTune = hslider("Fine_Tune",0,-100,100,1);
freq = 110*(2^(commonPitch/12))*(2^(fineTune/1200));
delta = 0.25;
sharpness = 0.5;
cperiod = 12;
cgain = 0.4;
gate = os.lf_pulsetrainpos(1/cperiod,0.1);
g1 = gate + (gate : @(ma.SR*cperiod*2/3));
g2 = (gate : @(ma.SR*cperiod/3)) + (gate : @(ma.SR*cperiod*2/3));
env1 = en.adsr(0.01,cperiod/2,0.3,cperiod/8,g1);
env2 = en.adsr(0.01,cperiod/2,0.3,cperiod/8,g2);
string1 = os.osc(2*(freq-delta)) : *(env1) : *(cgain);
string2 = os.osc(2*(freq+delta)) : *(env2) : *(cgain);
mix(l,r) = 0.7*l+0.3*r,0.3*l+0.7*r;
process = hgroup("Motif",(string1, string2 : mix)) : @(ma.SR*0.01),@(ma.SR*0.01) : dm.zita_light;
| https://raw.githubusercontent.com/aravind-sadharani/puretones-music-room/b237ebc23b7b11d7c018716278c2ed702d374e99/src/posts/tanpuraworking-1/Two-close-tones.dsp | faust | import("stdfaust.lib");
commonPitch = hslider("[0][style:radio{'B':14;'A#':13;'A':12;'G#':11;'G':10;'F#':9;'F':8;'E':7;'D#':6;'D':5;'C#':4;'C':3}]Pitch",3,3,14,1);
fineTune = hslider("Fine_Tune",0,-100,100,1);
freq = 110*(2^(commonPitch/12))*(2^(fineTune/1200));
delta = 0.25;
sharpness = 0.5;
cperiod = 12;
cgain = 0.4;
gate = os.lf_pulsetrainpos(1/cperiod,0.1);
g1 = gate + (gate : @(ma.SR*cperiod*2/3));
g2 = (gate : @(ma.SR*cperiod/3)) + (gate : @(ma.SR*cperiod*2/3));
env1 = en.adsr(0.01,cperiod/2,0.3,cperiod/8,g1);
env2 = en.adsr(0.01,cperiod/2,0.3,cperiod/8,g2);
string1 = os.osc(2*(freq-delta)) : *(env1) : *(cgain);
string2 = os.osc(2*(freq+delta)) : *(env2) : *(cgain);
mix(l,r) = 0.7*l+0.3*r,0.3*l+0.7*r;
process = hgroup("Motif",(string1, string2 : mix)) : @(ma.SR*0.01),@(ma.SR*0.01) : dm.zita_light;
|
|
f73388a38ae3b4f728010d248e06345d91f5851cab423dadd4de895dc737d63b | jspatcher/package-dsp | adsr.dsp | declare description "ADSR envelope generator";
declare defaultInputs "[0, 0, 0, 0.75, 0]";
declare inputsDescription "[`trigger`, `attack time (sec)`, `decay time (sec)`, `sustain level (between 0..1)`, `release time (sec)`]";
declare argsOffset "1";
import("stdfaust.lib");
process(t, at, dt, sl, rt) = en.adsr(at, dt, sl, rt, t);
| https://raw.githubusercontent.com/jspatcher/package-dsp/72192de1f6b203349373dcf313b874a41319ca67/src/dsps/adsr.dsp | faust | declare description "ADSR envelope generator";
declare defaultInputs "[0, 0, 0, 0.75, 0]";
declare inputsDescription "[`trigger`, `attack time (sec)`, `decay time (sec)`, `sustain level (between 0..1)`, `release time (sec)`]";
declare argsOffset "1";
import("stdfaust.lib");
process(t, at, dt, sl, rt) = en.adsr(at, dt, sl, rt, t);
|
|
869d957b7383493f26fd203a1228dd636655ad244b72858de73230ff86590163 | antisvin/MyPatches | quadpan.dsp | import("stdfaust.lib");
MINUS60DB = 0.001;
MINUS4DB = 0.6309573;
MINUS3DB = 0.7079457;
MINUS2DB = 0.7943283;
MINUS1DB = 0.8912509;
make_channel(i) = led : sp.spat(4, pan, distance)
with {
j = i + 12;
pan = hslider("Pan%i[OWL:%i]", i / 4, 0.0, 1.0, 0.001);
distance = hslider("Distance%i[OWL:%j]", 1.0, 0.0, 1.0, 0.001);
level = vbargraph("Level%i[OWL:%k]", 0.0, 1.0);
rms = ba.slidingRMS(64); // supposed to be unstable with DC?
rms_sqr = ba.if(rms < MINUS60DB, 0.0, ba.if(rms > MINUS1DB, 1.0, rms * rms));
k = i + 8;
// led = _ <: attach(_, pan : vbargraph("Level%i[OWL:%k]", 0, 1)); // test
led = _ <: attach(_, rms_sqr : level);
};
panners = par(i, 4, make_channel(i));
make_out_led(i) = _ <: led
with {
level = vbargraph("Out%i[OWL:%k]", 0.0, 1.0);
rms = ba.slidingRMS(64); // supposed to be unstable with DC?
rms_sqr = ba.if(rms < MINUS60DB, 0.0, ba.if(rms > MINUS1DB, 1.0, rms * rms));
k = i + 16;
led = _ <: attach(_, rms_sqr : level);
};
out_leds = par(i, 4, make_out_led(i));
process = panners :> (_, _, _, _) : out_leds;
/*
static constexpr float MINUS60DB = 0.001f;
static constexpr float MINUS4DB = 0.6309573f;
static constexpr float MINUS3DB = 0.7079457f;
static constexpr float MINUS2DB = 0.7943283f;
static constexpr float MINUS1DB = 0.8912509f;
FloatArray samples = buffer.getSamples(i);
samples.add(offsets[i]);
float gain = getParameterValue(PatchParameterId(PARAMETER_A + i)) * 2;
gains[i] = gain * gain;
samples.multiply(gains[i]);
float rms = samples.getRms();
#if 0
// test input indicator:
setParameterValue(PatchParameterId(PARAMETER_AA + i),
getParameterValue(PatchParameterId(PARAMETER_A + i)));
// red clip indicator:
// setParameterValue(PatchParameterId(PARAMETER_AA + i),
// isButtonPressed(PatchButtonId(BUTTON_1 + i)) ? 1 : 0);
// output indicator:
setParameterValue(PatchParameterId(PARAMETER_BA + i),
getParameterValue(PatchParameterId(PARAMETER_A + i)));
#else
if (rms < MINUS60DB)
rms = 0;
else if (rms > MINUS1DB) // -1dB threshold
rms = 1; // set red led
else
rms = rms * rms;
setParameterValue(PatchParameterId(PARAMETER_AA + i), rms);
#endif
*/
| https://raw.githubusercontent.com/antisvin/MyPatches/8e8df23abf76405ae7efa36260b22d8364b33c71/Faust/quadpan.dsp | faust | supposed to be unstable with DC?
led = _ <: attach(_, pan : vbargraph("Level%i[OWL:%k]", 0, 1)); // test
supposed to be unstable with DC?
static constexpr float MINUS60DB = 0.001f;
static constexpr float MINUS4DB = 0.6309573f;
static constexpr float MINUS3DB = 0.7079457f;
static constexpr float MINUS2DB = 0.7943283f;
static constexpr float MINUS1DB = 0.8912509f;
FloatArray samples = buffer.getSamples(i);
samples.add(offsets[i]);
float gain = getParameterValue(PatchParameterId(PARAMETER_A + i)) * 2;
gains[i] = gain * gain;
samples.multiply(gains[i]);
float rms = samples.getRms();
#if 0
// test input indicator:
setParameterValue(PatchParameterId(PARAMETER_AA + i),
getParameterValue(PatchParameterId(PARAMETER_A + i)));
// red clip indicator:
// setParameterValue(PatchParameterId(PARAMETER_AA + i),
// isButtonPressed(PatchButtonId(BUTTON_1 + i)) ? 1 : 0);
// output indicator:
setParameterValue(PatchParameterId(PARAMETER_BA + i),
getParameterValue(PatchParameterId(PARAMETER_A + i)));
#else
if (rms < MINUS60DB)
rms = 0;
else if (rms > MINUS1DB) // -1dB threshold
rms = 1; // set red led
else
rms = rms * rms;
setParameterValue(PatchParameterId(PARAMETER_AA + i), rms);
#endif
| import("stdfaust.lib");
MINUS60DB = 0.001;
MINUS4DB = 0.6309573;
MINUS3DB = 0.7079457;
MINUS2DB = 0.7943283;
MINUS1DB = 0.8912509;
make_channel(i) = led : sp.spat(4, pan, distance)
with {
j = i + 12;
pan = hslider("Pan%i[OWL:%i]", i / 4, 0.0, 1.0, 0.001);
distance = hslider("Distance%i[OWL:%j]", 1.0, 0.0, 1.0, 0.001);
level = vbargraph("Level%i[OWL:%k]", 0.0, 1.0);
rms_sqr = ba.if(rms < MINUS60DB, 0.0, ba.if(rms > MINUS1DB, 1.0, rms * rms));
k = i + 8;
led = _ <: attach(_, rms_sqr : level);
};
panners = par(i, 4, make_channel(i));
make_out_led(i) = _ <: led
with {
level = vbargraph("Out%i[OWL:%k]", 0.0, 1.0);
rms_sqr = ba.if(rms < MINUS60DB, 0.0, ba.if(rms > MINUS1DB, 1.0, rms * rms));
k = i + 16;
led = _ <: attach(_, rms_sqr : level);
};
out_leds = par(i, 4, make_out_led(i));
process = panners :> (_, _, _, _) : out_leds;
|
33293d0db6a2c1b8cb52f2c7698b56b919c2315a5b6e602984e051be50759b74 | HexHive/datAFLow | tp1.dsp | import("stdfaust.lib");
part = nentry("file", 0, 0, 2, 1);
speed = hslider("speed", 1, 0, 4, 0.01);
level = hslider("level", 0.5, 0, 1, 0.01);
//process = (part, +(1)~_) : soundfile("files [url: {'RnB.wav';'tango.wav';'levot.wav'}]",2) :(!,!,_,_);
//process = so.loop(soundfile("files [url: {'/Documents/faust-github-faust2/tests/soundfile/RnB.wav';'/Documents/faust-github-faust2/tests/soundfile/tango.wav';'/Documents/faust-github-faust2/tests/soundfile/levot.wav'}]",2), part);
//process = so.loop_speed(soundfile("files [url: {'RnB.wav';'tango.wav';'levot.wav'}]",2), part, speed);
//process = so.loop_speed_level(soundfile("files [url: {'RnB.wav';'tango.wav';'levot.wav'}]",2), part, speed, level);
process = so.loop_speed_level(soundfile("files [url: {'RnB.wav';'tango.wav';'levot-all.wav'}]",2), part, speed, level);
| https://raw.githubusercontent.com/HexHive/datAFLow/b9f3cbc42b1970f8655817c9fb67b1eaba3ae4c0/evaluation/ddfuzz/seeds/faust/tp1.dsp | faust | process = (part, +(1)~_) : soundfile("files [url: {'RnB.wav';'tango.wav';'levot.wav'}]",2) :(!,!,_,_);
process = so.loop(soundfile("files [url: {'/Documents/faust-github-faust2/tests/soundfile/RnB.wav';'/Documents/faust-github-faust2/tests/soundfile/tango.wav';'/Documents/faust-github-faust2/tests/soundfile/levot.wav'}]",2), part);
process = so.loop_speed(soundfile("files [url: {'RnB.wav';'tango.wav';'levot.wav'}]",2), part, speed);
process = so.loop_speed_level(soundfile("files [url: {'RnB.wav';'tango.wav';'levot.wav'}]",2), part, speed, level); | import("stdfaust.lib");
part = nentry("file", 0, 0, 2, 1);
speed = hslider("speed", 1, 0, 4, 0.01);
level = hslider("level", 0.5, 0, 1, 0.01);
process = so.loop_speed_level(soundfile("files [url: {'RnB.wav';'tango.wav';'levot-all.wav'}]",2), part, speed, level);
|
ec709504a431f1b1bd1e38324db0bc7986cef8946337f1df231907ec671d7eab | JDCAudio/Stray_virtual-synth | whitenoise.dsp | import("stdfaust.lib");
random = +(12345) ~ *(1103515245);
noise = random/2147483547.0;
process = noise * vslider("volume[style:knob]",0,0,1,0.01);
| https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/whitenoise.dsp | faust | import("stdfaust.lib");
random = +(12345) ~ *(1103515245);
noise = random/2147483547.0;
process = noise * vslider("volume[style:knob]",0,0,1,0.01);
|
|
03ebd1e4d40a4c49f3ecb59e726ccd1990d0015af67188752bae1375aaf73a9f | JDCAudio/Stray_virtual-synth | duplicates.dsp | import("stdfaust.lib");
duplicate(1,x) = x;
duplicate(n,x) = x, duplicate(n-1,x);
count((x,xs)) = 1 + count(xs);
count(x) = 1;
process = count(duplicate(5, 3.14));
| https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/duplicates.dsp | faust | import("stdfaust.lib");
duplicate(1,x) = x;
duplicate(n,x) = x, duplicate(n-1,x);
count((x,xs)) = 1 + count(xs);
count(x) = 1;
process = count(duplicate(5, 3.14));
|
|
665302c5cf261aaacc4e63f1b1bbf16089f8b4cbb15e0b85ae1272badcd449e1 | JDCAudio/Stray_virtual-synth | rdtable.dsp | import("stdfaust.lib");
dirac = 1-1';
phase = 1 : +~_ : %(4096); //incremental counter between 0 and 4095
process = 4096,dirac,phase : rdtable;
| https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/rdtable.dsp | faust | incremental counter between 0 and 4095 | import("stdfaust.lib");
dirac = 1-1';
process = 4096,dirac,phase : rdtable;
|
0b573a132c02429dc5348ab9f17554c7b9c5d4e7df4fb9b75f43a28b56f9fe55 | tomara-x/magi | wavetabs-and-gen51.dsp | import("stdfaust.lib");
// wav = waveform{3,3,4};
// sig1 = rwtable(wav,0,5,0);
// sig2 = rdtable(wav,0);
gen51(semis,octs) = par(i,octs,par(j,c,(i+1)*ba.semi2ratio(ba.selectn(c,j,semis))))
with {
c = ba.count(semis);
};
process = gen51(par(i,24,i/2),1);
| https://raw.githubusercontent.com/tomara-x/magi/bcf22a4ef23899cd8ce3bf5e08e374994907f81a/practice/wavetabs-and-gen51.dsp | faust | wav = waveform{3,3,4};
sig1 = rwtable(wav,0,5,0);
sig2 = rdtable(wav,0); | import("stdfaust.lib");
gen51(semis,octs) = par(i,octs,par(j,c,(i+1)*ba.semi2ratio(ba.selectn(c,j,semis))))
with {
c = ba.count(semis);
};
process = gen51(par(i,24,i/2),1);
|
47f66d79faf68b562661d14314babd75425b91c570f131f739a4d5927650e40c | jrkolsby/SoundGarden | marimbaMIDI.dsp | // WARNING: this model is incomplete and is only here for testing purposes
declare name "MarimbaMIDI";
declare description "Simple MIDI-controllable marimba physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.marimba_ui_MIDI <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/marimbaMIDI.dsp | faust | WARNING: this model is incomplete and is only here for testing purposes |
declare name "MarimbaMIDI";
declare description "Simple MIDI-controllable marimba physical model.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.marimba_ui_MIDI <: _,_;
|
6165a49b2155ea9e46a17a59c067fc257f1de19ca9cacb0cc56da8ed97962595 | grame-cncm/FAST | virtual-analog.dsp | import("stdfaust.lib");
// Sliders
oscFreq = hslider("oscFreq [knob:1]",80,50,500,0.01);
lfoFreq = hslider("lfoFreq [knob:2]",1,0.01,8,0.01);
lfoRange = hslider("lfoRange [knob:3]",1000,10,5000,0.01) : si.smoo;
noiseGain = hslider("noiseGain [slider:7]",0,0,1,0.01) <: _*_;
masterVol = hslider("masterVol [slider:8]",0.8,0,1,0.01) <: _*_;
panning = hslider("pan [knob:4]",0.5,0,1,0.01) : si.smoo;
// Buttons
activateNoise = button("activateNoise [switch:6]");
killSwitch = 1-button("killSwitch [switch:5]");
LFO = os.lf_triangle(lfoFreq)*0.5 + 0.5;
process = os.oscrc(440)* 0.25 * killSwitch * os.sawtooth(oscFreq) + no.noise*noiseGain*activateNoise : fi.resonlp(LFO*lfoRange+50,5,1)*masterVol <: _*(1-panning),_*panning;
| https://raw.githubusercontent.com/grame-cncm/FAST/b6e4397756a6f57dbc792d536d5bbd3ddc58e915/docs/codes/virtual-analog.dsp | faust | Sliders
Buttons | import("stdfaust.lib");
oscFreq = hslider("oscFreq [knob:1]",80,50,500,0.01);
lfoFreq = hslider("lfoFreq [knob:2]",1,0.01,8,0.01);
lfoRange = hslider("lfoRange [knob:3]",1000,10,5000,0.01) : si.smoo;
noiseGain = hslider("noiseGain [slider:7]",0,0,1,0.01) <: _*_;
masterVol = hslider("masterVol [slider:8]",0.8,0,1,0.01) <: _*_;
panning = hslider("pan [knob:4]",0.5,0,1,0.01) : si.smoo;
activateNoise = button("activateNoise [switch:6]");
killSwitch = 1-button("killSwitch [switch:5]");
LFO = os.lf_triangle(lfoFreq)*0.5 + 0.5;
process = os.oscrc(440)* 0.25 * killSwitch * os.sawtooth(oscFreq) + no.noise*noiseGain*activateNoise : fi.resonlp(LFO*lfoRange+50,5,1)*masterVol <: _*(1-panning),_*panning;
|
fc1618aacdbb38b766886cc3bcac57917e7ca804e44c0ef1f0ff9fe8bcd01e11 | grame-cncm/FAST | peakeq.dsp |
declare name "filterBank";
declare description "Graphic Equalizer consisting of a filter-bank driving a bank of faders";
import("stdfaust.lib");
mth_octave_filterbank_demo(O) = fi.mth_octave_filterbank(3,M,ftop,N): sum(i,N,(*(ba.db2linear(fader(N-i)))))
with{
M = O;
N = 5*M; // total number of bands (highpass band, octave-bands, dc band)
ftop = 10000;
fader(1) = vslider("Band0 [slider:1]", -10, -70, 10, 0.1) : si.smoo;
fader(2) = vslider("Band1 [slider:3]", -10, -70, 10, 0.1) : si.smoo;
fader(3) = vslider("Band2 [slider:5]", -10, -70, 10, 0.1) : si.smoo;
fader(4) = vslider("Band3 [slider:7]", -10, -70, 10, 0.1) : si.smoo;
fader(5) = vslider("Band4 [slider:8]", -10, -70, 10, 0.1) : si.smoo;
};
process = mth_octave_filterbank_demo(1);
| https://raw.githubusercontent.com/grame-cncm/FAST/b6e4397756a6f57dbc792d536d5bbd3ddc58e915/docs/codes/peakeq.dsp | faust | total number of bands (highpass band, octave-bands, dc band) |
declare name "filterBank";
declare description "Graphic Equalizer consisting of a filter-bank driving a bank of faders";
import("stdfaust.lib");
mth_octave_filterbank_demo(O) = fi.mth_octave_filterbank(3,M,ftop,N): sum(i,N,(*(ba.db2linear(fader(N-i)))))
with{
M = O;
ftop = 10000;
fader(1) = vslider("Band0 [slider:1]", -10, -70, 10, 0.1) : si.smoo;
fader(2) = vslider("Band1 [slider:3]", -10, -70, 10, 0.1) : si.smoo;
fader(3) = vslider("Band2 [slider:5]", -10, -70, 10, 0.1) : si.smoo;
fader(4) = vslider("Band3 [slider:7]", -10, -70, 10, 0.1) : si.smoo;
fader(5) = vslider("Band4 [slider:8]", -10, -70, 10, 0.1) : si.smoo;
};
process = mth_octave_filterbank_demo(1);
|
5483550de575d8d3ea2646a757c00978b42afe0074ab502d97161e05a60ca439 | grame-cncm/FAST | virtual-analog.dsp | import("stdfaust.lib");
// sliders
oscFreq = hslider("oscFreq [knob:1]",80,50,500,0.01);
lfoFreq = hslider("lfoFreq [knob:2]",1,0.01,8,0.01);
lfoRange = hslider("lfoRange [knob:3]",1000,10,5000,0.01) : si.smoo;
noiseGain = hslider("noiseGain [slider:7]",0,0,1,0.01) <: _*_;
masterVol = hslider("masterVol [slider:8]",0.8,0,1,0.01) <: _*_;
panning = hslider("pan [knob:4]",0.5,0,1,0.01) : si.smoo;
// buttons
activateNoise = button("activateNoise [switch:6]");
killSwitch = 1-button("killSwitch [switch:5]");
LFO = os.lf_triangle(lfoFreq)*0.5 + 0.5;
process = os.oscrc(440)* 0.25 * killSwitch * os.sawtooth(oscFreq) + no.noise*noiseGain*activateNoise : fi.resonlp(LFO*lfoRange+50,5,1)*masterVol <: _*(1-panning),_*panning;
| https://raw.githubusercontent.com/grame-cncm/FAST/fe3db7307fb11e046b3d39c0aea22a9b66803773/web/docs/codes/virtual-analog.dsp | faust | sliders
buttons | import("stdfaust.lib");
oscFreq = hslider("oscFreq [knob:1]",80,50,500,0.01);
lfoFreq = hslider("lfoFreq [knob:2]",1,0.01,8,0.01);
lfoRange = hslider("lfoRange [knob:3]",1000,10,5000,0.01) : si.smoo;
noiseGain = hslider("noiseGain [slider:7]",0,0,1,0.01) <: _*_;
masterVol = hslider("masterVol [slider:8]",0.8,0,1,0.01) <: _*_;
panning = hslider("pan [knob:4]",0.5,0,1,0.01) : si.smoo;
activateNoise = button("activateNoise [switch:6]");
killSwitch = 1-button("killSwitch [switch:5]");
LFO = os.lf_triangle(lfoFreq)*0.5 + 0.5;
process = os.oscrc(440)* 0.25 * killSwitch * os.sawtooth(oscFreq) + no.noise*noiseGain*activateNoise : fi.resonlp(LFO*lfoRange+50,5,1)*masterVol <: _*(1-panning),_*panning;
|
230a4a865badfed31a7165eda55a44dbbd8b580555bd65c48f0e4d0706369e2d | friskgit/kmh_114 | KMH114_channel_map.dsp | declare name "KMH114_channel_map";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
//---------------`Channel mapping plugin` --------------------------
//
// Channel mapping plugin that takes 15 channels of input (center speaker included)
// and maps it to the channel/speaker configuration of the studio 114 according to:
//
// * 1 -> 1
// * 2 -> 2
// * 3 -> 14
// * 4 -> 15
// * 5 -> 7
// * 6 -> 4
// * 7 -> 8
// * 8 -> 3
// * 9 -> 6
// * 10 -> 5
// * 11 -> 9
// * 12 -> 10
// * 13 -> 12
// * 14 -> 11
// * 15 -> 13
// * 16 -> 16
//
// Method: traverse the channel order of the ambisonics output and define the speaker
// number in the studio configuration
//---------------------------------------------------
import("stdfaust.lib");
vmeter(x) = attach(x, envelop(x) : vbargraph("[unit:dB]", -70, +5));
hmeter(x) = attach(x, envelop(x) : hbargraph("[2][unit:dB]", -70, +5));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
process(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15) =
s0, s1, s13*0, s14*0, s6, s3, s7, s2, s5, s4, s8, s9, s11, s10, s12, s15*0 : hgroup("lower ring", par(i, 8, vgroup("%i", vmeter))), hgroup("lower ring", par(i, 8, vgroup("%i", vmeter)));
| https://raw.githubusercontent.com/friskgit/kmh_114/2ebc5bb7d796827856a69b27700ac9cb08689c04/KMH114_utility/src/KMH114_channel_map.dsp | faust | ---------------`Channel mapping plugin` --------------------------
Channel mapping plugin that takes 15 channels of input (center speaker included)
and maps it to the channel/speaker configuration of the studio 114 according to:
* 1 -> 1
* 2 -> 2
* 3 -> 14
* 4 -> 15
* 5 -> 7
* 6 -> 4
* 7 -> 8
* 8 -> 3
* 9 -> 6
* 10 -> 5
* 11 -> 9
* 12 -> 10
* 13 -> 12
* 14 -> 11
* 15 -> 13
* 16 -> 16
Method: traverse the channel order of the ambisonics output and define the speaker
number in the studio configuration
--------------------------------------------------- | declare name "KMH114_channel_map";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
import("stdfaust.lib");
vmeter(x) = attach(x, envelop(x) : vbargraph("[unit:dB]", -70, +5));
hmeter(x) = attach(x, envelop(x) : hbargraph("[2][unit:dB]", -70, +5));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
process(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15) =
s0, s1, s13*0, s14*0, s6, s3, s7, s2, s5, s4, s8, s9, s11, s10, s12, s15*0 : hgroup("lower ring", par(i, 8, vgroup("%i", vmeter))), hgroup("lower ring", par(i, 8, vgroup("%i", vmeter)));
|
be1d9cbe017fb0a9e08a61fd753c5ed1f11bd60b94e15c342b56d81a714599d4 | friskgit/kmh_114 | KMH114_channel_map.dsp | declare name "KMH114_channel_map";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
//---------------`Channel mapping plugin` --------------------------
//
// Channel mapping plugin that takes 15 channels of input (center speaker included)
// and maps it to the channel/speaker configuration of the studio 114 according to:
//
// * 1 -> 1
// * 2 -> 2
// * 3 -> 14
// * 4 -> 15
// * 5 -> 7
// * 6 -> 4
// * 7 -> 8
// * 8 -> 3
// * 9 -> 6
// * 10 -> 5
// * 11 -> 9
// * 12 -> 10
// * 13 -> 12
// * 14 -> 11
// * 15 -> 13
// * 16 -> 16
//
// Method: traverse the channel order of the ambisonics output and define the speaker
// number in the studio configuration
//---------------------------------------------------
import("stdfaust.lib");
vmeter(x) = attach(x, envelop(x) : vbargraph("[unit:dB]", -70, +5));
hmeter(x) = attach(x, envelop(x) : hbargraph("[2][unit:dB]", -70, +5));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
process(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15) =
s0, s1, s13, s14, s6, s3, s7, s2, s5, s4, s8, s9, s11, s10, s12, s15 : hgroup("lower ring", par(i, 8, vgroup("%i", vmeter))), hgroup("lower ring", par(i, 8, vgroup("%i", vmeter)));
| https://raw.githubusercontent.com/friskgit/kmh_114/2ebc5bb7d796827856a69b27700ac9cb08689c04/KMH114_utility/bin/max/KMH114_channel_map%7E.mxo/KMH114_channel_map%7E.mxo/KMH114_channel_map.dsp | faust | ---------------`Channel mapping plugin` --------------------------
Channel mapping plugin that takes 15 channels of input (center speaker included)
and maps it to the channel/speaker configuration of the studio 114 according to:
* 1 -> 1
* 2 -> 2
* 3 -> 14
* 4 -> 15
* 5 -> 7
* 6 -> 4
* 7 -> 8
* 8 -> 3
* 9 -> 6
* 10 -> 5
* 11 -> 9
* 12 -> 10
* 13 -> 12
* 14 -> 11
* 15 -> 13
* 16 -> 16
Method: traverse the channel order of the ambisonics output and define the speaker
number in the studio configuration
--------------------------------------------------- | declare name "KMH114_channel_map";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
import("stdfaust.lib");
vmeter(x) = attach(x, envelop(x) : vbargraph("[unit:dB]", -70, +5));
hmeter(x) = attach(x, envelop(x) : hbargraph("[2][unit:dB]", -70, +5));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
process(s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15) =
s0, s1, s13, s14, s6, s3, s7, s2, s5, s4, s8, s9, s11, s10, s12, s15 : hgroup("lower ring", par(i, 8, vgroup("%i", vmeter))), hgroup("lower ring", par(i, 8, vgroup("%i", vmeter)));
|
fdbcac0d4d1a978d330a2041a9c28cc0ee405456f6770a1c1761b744a40dacf4 | friskgit/kmh_114 | KMH114_channel_map.dsp | declare name "Channel mapping for Studio 114(C)";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
//---------------`Channel mapping plugin` --------------------------
//
// Channel mapping plugin that takes 15 channels of input (center speaker included)
// and maps it to the channel/speaker configuration of the studio 114 according to:
//
// * 1 -> 1 (L)
// * 2 -> 2 (R)
// * 3 -> 5 (LSR)
// * 4 -> 6 (RSR)
// * 5 -> 7 (LSF)
// * 6 -> 8 (RSF)
// * 7 -> 9 (RL)
// * 8 -> 10 (RR)
// * 9 -> 11 (ULF)
// * 10 -> 12 (URF)
// * 11 -> 13 (URL)
// * 12 -> 14 (URR)
// * 13 -> 15 (VOG)
// * 14 -> -
//
//---------------------------------------------------
import("stdfaust.lib");
vmeter(x) = attach(x, envelop(x) : vbargraph("[unit:dB]", -70, +5));
hmeter(x) = attach(x, envelop(x) : hbargraph("[2][unit:dB]", -70, +5));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
process(L, R, RSF, RSR, RR, RL, LSR, LSF, ULF, URF, URL, URR, VOG, x1, x2) =
hgroup("", (L, R, x1, x2, LSR, RSR, LSF, RSF, RL, RR) : hgroup("lower ring", par(i, 10, vgroup("%i", vmeter)))),
hgroup("", (ULF, URF, URR, URL) : hgroup("upper ring", par(i, 4, vgroup("%i", vmeter)))),
hgroup("", (VOG) : hgroup("vog", par(i, 1, vgroup("%i", vmeter))));
| https://raw.githubusercontent.com/friskgit/kmh_114/2ebc5bb7d796827856a69b27700ac9cb08689c04/KMH114_utility/doc/KMH114_channel_map-mdoc/src/KMH114_channel_map.dsp | faust | ---------------`Channel mapping plugin` --------------------------
Channel mapping plugin that takes 15 channels of input (center speaker included)
and maps it to the channel/speaker configuration of the studio 114 according to:
* 1 -> 1 (L)
* 2 -> 2 (R)
* 3 -> 5 (LSR)
* 4 -> 6 (RSR)
* 5 -> 7 (LSF)
* 6 -> 8 (RSF)
* 7 -> 9 (RL)
* 8 -> 10 (RR)
* 9 -> 11 (ULF)
* 10 -> 12 (URF)
* 11 -> 13 (URL)
* 12 -> 14 (URR)
* 13 -> 15 (VOG)
* 14 -> -
--------------------------------------------------- | declare name "Channel mapping for Studio 114(C)";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
import("stdfaust.lib");
vmeter(x) = attach(x, envelop(x) : vbargraph("[unit:dB]", -70, +5));
hmeter(x) = attach(x, envelop(x) : hbargraph("[2][unit:dB]", -70, +5));
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
process(L, R, RSF, RSR, RR, RL, LSR, LSF, ULF, URF, URL, URR, VOG, x1, x2) =
hgroup("", (L, R, x1, x2, LSR, RSR, LSF, RSF, RL, RR) : hgroup("lower ring", par(i, 10, vgroup("%i", vmeter)))),
hgroup("", (ULF, URF, URR, URL) : hgroup("upper ring", par(i, 4, vgroup("%i", vmeter)))),
hgroup("", (VOG) : hgroup("vog", par(i, 1, vgroup("%i", vmeter))));
|
1311e7a20747370fd04cb814a9aac30791f3f7d0541196b3ae986406079db116 | JDCAudio/Stray_virtual-synth | djembetest.dsp | import("stdfaust.lib");
process = button("gate")*(ba.pulsen(1,4410*2) + ba.pulsen(1,4410*1.3)) : pm.djembe(60,0.5,0.5,1) <: dm.freeverb_demo;
| https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/djembetest.dsp | faust | import("stdfaust.lib");
process = button("gate")*(ba.pulsen(1,4410*2) + ba.pulsen(1,4410*1.3)) : pm.djembe(60,0.5,0.5,1) <: dm.freeverb_demo;
|
|
323c15b4a3a2b6becb39487f18602c33e20d16fe388fb3095638d49c8694a5e1 | chevremaudite/zosimos | inputUI.dsp | //-----------------INPUT----------------//
//Simple envelope on audio in to turn any sound source into a drum voice
//--------------PARAMETERS:
// 1 - Left Gain : Left input gain
// 1 - Left Gain : Right input gain
import("stdfaust.lib");
import("input.lib");
process = hgroup("Input", input(lGain, rGain, trigger))
with{
trigger = button("T"):ba.impulsify;
lGain = hslider("[9]Left Gain[style:knob]", 0.5, 0 , 1 , 0.01);
rGain = hslider("[9]Right Gain[style:knob]", 0.5, 0 , 1 , 0.01);
};
| https://raw.githubusercontent.com/chevremaudite/zosimos/ab0de59442ab762c5cc0b77136a609f723f7bc04/SOFTWARE/FAUST/ui/inputUI.dsp | faust | -----------------INPUT----------------//
Simple envelope on audio in to turn any sound source into a drum voice
--------------PARAMETERS:
1 - Left Gain : Left input gain
1 - Left Gain : Right input gain |
import("stdfaust.lib");
import("input.lib");
process = hgroup("Input", input(lGain, rGain, trigger))
with{
trigger = button("T"):ba.impulsify;
lGain = hslider("[9]Left Gain[style:knob]", 0.5, 0 , 1 , 0.01);
rGain = hslider("[9]Right Gain[style:knob]", 0.5, 0 , 1 , 0.01);
};
|
8528285d893b5e51c8ab04b05df8b815d89dc8d0acc66e22029369d41a333bcc | JDCAudio/Stray_virtual-synth | environments.dsp | import("stdfaust.lib");
//use thise variables with myconst.PI or myconst.E
myconst = environment {
PI = ma.PI;
E = ma.E;
}
process = myconst.e;
| https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/environments.dsp | faust | use thise variables with myconst.PI or myconst.E | import("stdfaust.lib");
myconst = environment {
PI = ma.PI;
E = ma.E;
}
process = myconst.e;
|
c8b1e5b160b6f9220632b0582591163ea2564956a033fb72c05a211475062e5e | jrkolsby/SoundGarden | elecGuitarMIDI.dsp | declare name "ElecGuitarMidi";
declare description "Simple electric guitar model without effect chain.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
// TODO: We could potentially add an audio effect chain here
process = pm.elecGuitar_ui_MIDI <: _,_;
| https://raw.githubusercontent.com/jrkolsby/SoundGarden/949835b30b1f7b29c22c20087516667c324130b4/storage/modules/elecGuitarMIDI.dsp | faust | TODO: We could potentially add an audio effect chain here | declare name "ElecGuitarMidi";
declare description "Simple electric guitar model without effect chain.";
declare license "MIT";
declare copyright "(c)Romain Michon, CCRMA (Stanford University), GRAME";
import("stdfaust.lib");
process = pm.elecGuitar_ui_MIDI <: _,_;
|
2f8d8901f4fc060accd8afc1627a4290a003cf6061203984a2b9b44abb303c2f | madskjeldgaard/komet | ekvi3.dsp | // Equalizer with 3 bells + low and high shelf
import("stdfaust.lib");
import("lib/ekvi.lib");
num_bells = 3;
process = ek.ekvi(num_bells);
| https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/ekvi3.dsp | faust | Equalizer with 3 bells + low and high shelf | import("stdfaust.lib");
import("lib/ekvi.lib");
num_bells = 3;
process = ek.ekvi(num_bells);
|
1e4c61908668049e955bc231726b26033943718442a2cacd8ec95cbb6fcfaf38 | madskjeldgaard/komet | ekvi4.dsp | // Equalizer with 4 bells + low and high shelf
import("stdfaust.lib");
import("lib/ekvi.lib");
num_bells = 4;
process = ek.ekvi(num_bells);
| https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/ekvi4.dsp | faust | Equalizer with 4 bells + low and high shelf | import("stdfaust.lib");
import("lib/ekvi.lib");
num_bells = 4;
process = ek.ekvi(num_bells);
|
40c1237a94b2f8054f1c234bbdf17baae3a67d4f9d450fca62f55c79e9d82288 | porres/pd-sfizz | disto_stage.dsp | import("stdfaust.lib");
disto_stage(depth, x) = shs*hh(x)+(1.0-shs)*lh(x) : fi.dcblockerat(40.0) with {
// sigmoid parameters
a = depth*0.2+2.0;
b = 2.0;
// smooth hysteresis transition
shs = hs : si.smooth(ba.tau2pole(10e-3));
// the low and high hysteresis
lh(x) = sig(a*x)*b;
hh(x) = (sig(a*x)-1.0)*b;
//
sig10 = environment { // sigmoid sampled from -10 to +10
tablesize = 256;
table(i) = rdtable(tablesize, exact(float(ba.time)/float(tablesize)*20.0-10.0), i);
exact(x) = exp(x)/(exp(x)+1.0);
approx(x) = s1+mu*(s2-s1) with {
index = (x+10.0)*(1.0/20.0)*(sig10.tablesize-1) : max(0.0);
mu = index-int(index);
s1 = sig10.table(int(index) : min(sig10.tablesize-1));
s2 = sig10.table(int(index) : +(1) : min(sig10.tablesize-1));
};
};
//sig = sig10.exact;
sig = sig10.approx;
}
letrec {
// hysteresis selection
'hs = ba.if((x<x') & (x<-0.25), 1, ba.if((x>x') & (x>0.25), 0, hs));
};
process = disto_stage(d) with {
d = hslider("[1] Depth", 100.0, 0.0, 100.0, 0.01);
};
| https://raw.githubusercontent.com/porres/pd-sfizz/ac456fec0043206071e7b4c08b72209b3d238de2/src/sfizz/effects/dsp/disto_stage.dsp | faust | sigmoid parameters
smooth hysteresis transition
the low and high hysteresis
sigmoid sampled from -10 to +10
sig = sig10.exact;
hysteresis selection | import("stdfaust.lib");
disto_stage(depth, x) = shs*hh(x)+(1.0-shs)*lh(x) : fi.dcblockerat(40.0) with {
a = depth*0.2+2.0;
b = 2.0;
shs = hs : si.smooth(ba.tau2pole(10e-3));
lh(x) = sig(a*x)*b;
hh(x) = (sig(a*x)-1.0)*b;
tablesize = 256;
table(i) = rdtable(tablesize, exact(float(ba.time)/float(tablesize)*20.0-10.0), i);
exact(x) = exp(x)/(exp(x)+1.0);
approx(x) = s1+mu*(s2-s1) with {
index = (x+10.0)*(1.0/20.0)*(sig10.tablesize-1) : max(0.0);
mu = index-int(index);
s1 = sig10.table(int(index) : min(sig10.tablesize-1));
s2 = sig10.table(int(index) : +(1) : min(sig10.tablesize-1));
};
};
sig = sig10.approx;
}
letrec {
'hs = ba.if((x<x') & (x<-0.25), 1, ba.if((x>x') & (x>0.25), 0, hs));
};
process = disto_stage(d) with {
d = hslider("[1] Depth", 100.0, 0.0, 100.0, 0.01);
};
|
910559afb58812889a7e6d701c618d5b12cb1bd405f051fabe1493f15a071afa | tomara-x/magi | stackgirl.dsp | //trans rights
declare name "stackgirl";
declare author "amy universe";
declare version "0.00";
declare license "WTFPL";
import("stdfaust.lib");
//mutes every other sample (if i did it right)
//fuck with the modulo and inverting samps later
f = _ ~ +(1); //ba.time?
process = _*(f%2) <: _,_;
| https://raw.githubusercontent.com/tomara-x/magi/878b67e12f024f0b1ab62aa1b0a0d4182130f3a3/effect/stackgirl.dsp | faust | trans rights
mutes every other sample (if i did it right)
fuck with the modulo and inverting samps later
ba.time? |
declare name "stackgirl";
declare author "amy universe";
declare version "0.00";
declare license "WTFPL";
import("stdfaust.lib");
process = _*(f%2) <: _,_;
|
126ea633b8c2740bba3fe698bf3ed671bd381f861a5994f1e5ef2ada6a0736e9 | LucaSpanedda/Musical_Studies_of_Chaotic_Systems | 0.00_Feedback.dsp | // import Standard Faust library
// https://github.com/grame-cncm/faustlibraries/
import("stdfaust.lib");
/*
One of the fundamental concepts of cybernetics and dynamical systems is feedback.
It is the self-regulation mechanism by which a system at a present moment
learns information from its past to compensate for it in the immediate future.
We therefore speak of the circularity of events.
In faust there are various methods to build functions in Feedback,
I will illustrate some of them by reporting here some of these functions
*/
// Standard Method
process = 1 : - ~ _ > 0;
// FB via loop ~
Feedback(x) = loop ~ _
with{
loop(x) = x + 0, 0;
};
//process = Feedbackwith;
// FB via Parallels loop ~
MultipleFeedback(x,y,z,w) = loop ~ si.bus(4)
with{
loop(x,y,z,w) = x + 0, y + 0, z + 0, w + 0;
};
//process = FeedbackwithPAR;
// FB via letrec environment
LetrecFeedback = x
letrec{
'x = (1 - y);
'y = sqrt(x);
};
//process = LetrecFeedback;
// FB via modulo environment
//process = \(FB).(1+FB)~_ : sin;
// FB via Parallels Modulo (x,y,z,w)
//process = \(x,y,z,w).(1+x,2+y,3+z,4+w)~ si.bus(4); | https://raw.githubusercontent.com/LucaSpanedda/Musical_Studies_of_Chaotic_Systems/d8b78c011cc0b2b75f74643eba78306d6a3f92df/0.00_Feedback.dsp | faust | import Standard Faust library
https://github.com/grame-cncm/faustlibraries/
One of the fundamental concepts of cybernetics and dynamical systems is feedback.
It is the self-regulation mechanism by which a system at a present moment
learns information from its past to compensate for it in the immediate future.
We therefore speak of the circularity of events.
In faust there are various methods to build functions in Feedback,
I will illustrate some of them by reporting here some of these functions
Standard Method
FB via loop ~
process = Feedbackwith;
FB via Parallels loop ~
process = FeedbackwithPAR;
FB via letrec environment
process = LetrecFeedback;
FB via modulo environment
process = \(FB).(1+FB)~_ : sin;
FB via Parallels Modulo (x,y,z,w)
process = \(x,y,z,w).(1+x,2+y,3+z,4+w)~ si.bus(4); | import("stdfaust.lib");
process = 1 : - ~ _ > 0;
Feedback(x) = loop ~ _
with{
loop(x) = x + 0, 0;
};
MultipleFeedback(x,y,z,w) = loop ~ si.bus(4)
with{
loop(x,y,z,w) = x + 0, y + 0, z + 0, w + 0;
};
LetrecFeedback = x
letrec{
'x = (1 - y);
'y = sqrt(x);
};
|
f5e52c57d2e02323ee9c9c7c5fc5ed67465580a27147a9e6e91c911d34867742 | tomara-x/magi | trenchgirl.dsp | //trans rights
declare name "trenchgirl";
declare author "amy universe";
declare version "0.01";
declare license "WTFPL";
import("stdfaust.lib");
N = 44100;
w = ba.time%N : *(record);
record = button("record") : int;
process = _ <: rwtable(N,0.001,w,_,((_+1)/2)*slice) <: _,_
with {
slice = vslider("table slice [style:knob]",N-1,1,N-1,1);
};
| https://raw.githubusercontent.com/tomara-x/magi/47b6338c697022ec0285bc7f1abc000dcd260390/effect/trenchgirl.dsp | faust | trans rights |
declare name "trenchgirl";
declare author "amy universe";
declare version "0.01";
declare license "WTFPL";
import("stdfaust.lib");
N = 44100;
w = ba.time%N : *(record);
record = button("record") : int;
process = _ <: rwtable(N,0.001,w,_,((_+1)/2)*slice) <: _,_
with {
slice = vslider("table slice [style:knob]",N-1,1,N-1,1);
};
|
639a36b336510645088990aa999f309d22ab0352e526291beb115b2521ba136e | gdesiato/faust-folder1 | additive_synthesizer.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 <: _,_;
effect = dm.zita_light;
| https://raw.githubusercontent.com/gdesiato/faust-folder1/d0f25178b3e79242b7449ed77f994bd3df2874a9/additive_synthesizer.dsp | faust | import("stdfaust.lib");
freq = hslider("freq",440, 50, 1000, 0.01);
gain = hslider("gain", 0.5, 0, 1, 0.01);
gate = button("gate") : en.adsr(0.01,0.01,0.9,0.1);
timbre(f) = os.osc(f) * 0.5 + os.osc(f*2) * 0.25 + os.osc(f*3) * 0.125;
process = gain*gate*timbre(freq) *0.5 <: _,_;
effect = dm.zita_light;
|
|
5bd519d1a1dc94fe1c43331814881406e3e7cafabf1a93d15a5629c97540a387 | lbrutti/faust-course | melodica.dsp | import("stdfaust.lib");
freq = hslider("[0]freq", 440, 250.0, 800.0, 0.01);
gain = hslider("[1]gain", 0.5, 0.0, 1.0, 0.01);
gate = button("[2]gate") : en.adsr(0.01, 0.01, 0.9, 0.1);
breathEnv = an.amp_follower_ar(0.02,0.02);
timbre(f) = os.sawtooth(f) * 0.5 + os.sawtooth(f*2) * 0.25 + os.sawtooth(f*3) * 0.125;
process = gain * timbre(freq) * gate * 0.5 * breathEnv <: _,_;
effect = dm.zita_light; | https://raw.githubusercontent.com/lbrutti/faust-course/9029f2761d7bdf4658993783367790d779e4431c/session1/djembe/melodica.dsp | faust | import("stdfaust.lib");
freq = hslider("[0]freq", 440, 250.0, 800.0, 0.01);
gain = hslider("[1]gain", 0.5, 0.0, 1.0, 0.01);
gate = button("[2]gate") : en.adsr(0.01, 0.01, 0.9, 0.1);
breathEnv = an.amp_follower_ar(0.02,0.02);
timbre(f) = os.sawtooth(f) * 0.5 + os.sawtooth(f*2) * 0.25 + os.sawtooth(f*3) * 0.125;
process = gain * timbre(freq) * gate * 0.5 * breathEnv <: _,_;
effect = dm.zita_light; |
|
217b665b122c276692ba81e1d5f4b59d2cf5b8c9ce14e24da94de02f8f6bd5e8 | JDCAudio/Stray_virtual-synth | sigselect.dsp | import("stdfaust.lib");
gain = hslider("gain", 0, 0, 1, 0.01);
process = nentry("selector",0,0,2,1), os.osc(220), os.osc(440), os.osc(880) : select3;
| https://raw.githubusercontent.com/JDCAudio/Stray_virtual-synth/05d2947279ac4b170d71f6604c9dd9ca6d6bfc15/FaustTests/FaustFamiliarization/sigselect.dsp | faust | import("stdfaust.lib");
gain = hslider("gain", 0, 0, 1, 0.01);
process = nentry("selector",0,0,2,1), os.osc(220), os.osc(440), os.osc(880) : select3;
|
|
493faa332f5481cd4445b4e400f133d140aadb327a397c9a44a5235d28614b33 | Sylcantor/wam-web-components | 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");
smoothdelay = (+ :de.sdelay(N, interp, dtime)) ~ *(fback)
with
{
s = 0.999; // smoothing parameter (one-fi.pole fi.pole location)
N = int(2^17);
dtime = hslider("Delay[unit:ms][style:knob][OWL:PARAMETER_A]", 1, 0.0001, 500, 0.1)*ma.SR/1000.0 : si.smooth(s);
fback = hslider("Feedback[style:knob][OWL:PARAMETER_B]",0,0,100,0.1)/100.0;
interp = hslider("Interpolation[unit:ms][style:knob][OWL:PARAMETER_C]",10,1,100,0.1)*ma.SR/1000.0;
};
dry = 1 - hslider("Dry/Wet[style:knob][OWL:PARAMETER_D]", 0.3333, 0, 1, 0.025);
wet = 1 - dry + hslider("Super Wet[style:knob][OWL:PARAMETER_E]", 0.0, 0, 0.5, 0.025);
processSmooth = _<:*(dry),(*(wet) : smoothdelay ) :>_;
process = ba.bypass_fade(ma.SR/10, checkbox("bypass"), processSmooth); | https://raw.githubusercontent.com/Sylcantor/wam-web-components/c54352dae5b80bcf6d8d4c306ea22e2c91a12b08/plugins/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
-------------------------------------------------------------
smoothing parameter (one-fi.pole fi.pole location) | declare name "SmoothDelay";
declare author "Yann Orlarey";
declare copyright "Grame";
declare version "1.0";
declare license "STK-4.3";
import("stdfaust.lib");
smoothdelay = (+ :de.sdelay(N, interp, dtime)) ~ *(fback)
with
{
N = int(2^17);
dtime = hslider("Delay[unit:ms][style:knob][OWL:PARAMETER_A]", 1, 0.0001, 500, 0.1)*ma.SR/1000.0 : si.smooth(s);
fback = hslider("Feedback[style:knob][OWL:PARAMETER_B]",0,0,100,0.1)/100.0;
interp = hslider("Interpolation[unit:ms][style:knob][OWL:PARAMETER_C]",10,1,100,0.1)*ma.SR/1000.0;
};
dry = 1 - hslider("Dry/Wet[style:knob][OWL:PARAMETER_D]", 0.3333, 0, 1, 0.025);
wet = 1 - dry + hslider("Super Wet[style:knob][OWL:PARAMETER_E]", 0.0, 0, 0.5, 0.025);
processSmooth = _<:*(dry),(*(wet) : smoothdelay ) :>_;
process = ba.bypass_fade(ma.SR/10, checkbox("bypass"), processSmooth); |
1baf2f21b32ebc52fcec88b71ef8282d77032ff9e104c34a67af2f3cb72c7401 | pavelhusa/Scaleit | scaleIt.dsp | //# ScaleIt
// Game Tone and Game Accord combined together to an all-in-one box.
import("stdfaust.lib");
import("libs/comparator.lib");
import("libs/invertor.lib");
import("libs/playBelowAbove.lib");
import("gameAccord.lib");
import("gameTone.lib");
import("outputMIDI.lib");
import("threshMeter.lib");
process(_alpha, _thresh) = compare(_alpha, _thresh) : invertor <: (gameAccord, gameTone :> playBelowAbove(_alpha, _thresh), playBelowAbove(_alpha, _thresh)), outputMIDI, threshMeter; | https://raw.githubusercontent.com/pavelhusa/Scaleit/5070a1f3f78d24d67c73eda0d28e57a74f859ab6/compiled/MAX/scaleIt%7E.mxo/scaleIt.dsp | faust | # ScaleIt
Game Tone and Game Accord combined together to an all-in-one box. | import("stdfaust.lib");
import("libs/comparator.lib");
import("libs/invertor.lib");
import("libs/playBelowAbove.lib");
import("gameAccord.lib");
import("gameTone.lib");
import("outputMIDI.lib");
import("threshMeter.lib");
process(_alpha, _thresh) = compare(_alpha, _thresh) : invertor <: (gameAccord, gameTone :> playBelowAbove(_alpha, _thresh), playBelowAbove(_alpha, _thresh)), outputMIDI, threshMeter; |
81a1b0a9251e08263c653beadf242cc5cb53b3c2e29156e33e66f465386105f0 | johannphilippe/grame_cnsmd_2023 | pulsar.dsp | import("stdfaust.lib");
pulsar(fq, form_fq, sine_cycles) = sine
with {
pulsaret_phase = os.phasor(1, fq) * form_fq / fq;
gate = (pulsaret_phase < 1);
window = pulsaret_phase^4,0 : select2(gate > 1);
sine = sin(pulsaret_phase * 2 * ma.PI * sine_cycles) * window * gate;
};
fq = hslider("frequency", 30, 1, 1000, 1) : si.smoo;
form_fq = hslider("formant_frequency", 50, 2, 8000, 1) : si.smoo;
sine_cycles = hslider("sine_cycles", 1, 1, 10, 1);
amp = hslider("amplitude", 0.1, 0, 1, 0.01) : si.smoo;
process = pulsar(fq, form_fq, sine_cycles) * amp;
| https://raw.githubusercontent.com/johannphilippe/grame_cnsmd_2023/ccfd6e9a5c1537097546520317c8c5beea06006f/pulsar/pulsar.dsp | faust | import("stdfaust.lib");
pulsar(fq, form_fq, sine_cycles) = sine
with {
pulsaret_phase = os.phasor(1, fq) * form_fq / fq;
gate = (pulsaret_phase < 1);
window = pulsaret_phase^4,0 : select2(gate > 1);
sine = sin(pulsaret_phase * 2 * ma.PI * sine_cycles) * window * gate;
};
fq = hslider("frequency", 30, 1, 1000, 1) : si.smoo;
form_fq = hslider("formant_frequency", 50, 2, 8000, 1) : si.smoo;
sine_cycles = hslider("sine_cycles", 1, 1, 10, 1);
amp = hslider("amplitude", 0.1, 0, 1, 0.01) : si.smoo;
process = pulsar(fq, form_fq, sine_cycles) * amp;
|
|
1a9d9644fbcc10c271dcc2612fc32f6a7455ecaeac30acda52e76c05df3a81ad | JuanSaudio/Blog | sigGenFull.dsp | import("stdfaust.lib");
inGroup(x) = vgroup("[0]Input", x);
inGain = inGroup(hslider("[0]InGain[style:knob]",0,-20,0,1) : ba.db2linear : si.smoo);
outGain = inGroup(hslider("[1]OutGain[style:knob]",-20,-20,0,1) : ba.db2linear : _ * outGate: si.smoo);
outGate = checkbox("[2]Out Gate");
freq = inGroup(hslider("[3]Freq[scale:log][style:knob]",100,1,1000,1));
sigType = inGroup(nentry("[4]Signal[style:menu{'DC':0;'fs':1;'Osc':2;'Noise':3}]", 0, 0, 3, 1));
trigger = (envo - envo') > 0 : _ -0.5 : de.delay(ba.sec2samp(0.9), ma.SR);
envo = os.lf_pulsetrain(1/1, 1/5) + 1 : _ /2;
xo = dc, fs, sinusoid, noise : ba.selectn(4, sigType) with {
dc = 1;
fs = pow(-1, ba.time);
sinusoid = os.hs_oscsin(freq, trigger);
noise = no.noise;
};
env = (inGain - outGain) * envo + outGain;
x = xo * env;
outputFormatter(a) = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, trigger, a, 1;
process = x : outputFormatter;
| https://raw.githubusercontent.com/JuanSaudio/Blog/62ed00a8beccea4d6e6b8b3e69d0f65069038ad3/Compression/Faust/sigGenFull.dsp | faust | import("stdfaust.lib");
inGroup(x) = vgroup("[0]Input", x);
inGain = inGroup(hslider("[0]InGain[style:knob]",0,-20,0,1) : ba.db2linear : si.smoo);
outGain = inGroup(hslider("[1]OutGain[style:knob]",-20,-20,0,1) : ba.db2linear : _ * outGate: si.smoo);
outGate = checkbox("[2]Out Gate");
freq = inGroup(hslider("[3]Freq[scale:log][style:knob]",100,1,1000,1));
sigType = inGroup(nentry("[4]Signal[style:menu{'DC':0;'fs':1;'Osc':2;'Noise':3}]", 0, 0, 3, 1));
trigger = (envo - envo') > 0 : _ -0.5 : de.delay(ba.sec2samp(0.9), ma.SR);
envo = os.lf_pulsetrain(1/1, 1/5) + 1 : _ /2;
xo = dc, fs, sinusoid, noise : ba.selectn(4, sigType) with {
dc = 1;
fs = pow(-1, ba.time);
sinusoid = os.hs_oscsin(freq, trigger);
noise = no.noise;
};
env = (inGain - outGain) * envo + outGain;
x = xo * env;
outputFormatter(a) = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, trigger, a, 1;
process = x : outputFormatter;
|
|
ce004c412fda99dff48f401a9bd038b37df0dc395fc8cad3640315a6736b948b | johannphilippe/paw2022 | euc.dsp | import("stdfaust.lib");
amp = hslider("amp", 0.2, 0, 1, 0.01);
speed = hslider("speed", 0.2, 0.1, 2, 0.01) : si.smoo;
noise_amt = hslider("noise_amount", 1, 1, 4, 0.1) : si.smoo;
naive_impl(fq) = (_, ma.SR/fq : fmod) ~+(1.0) : <=(1.0);
accent(modulo, beat) = _~+( is ) : %(modulo) : ==(0) : &(is)
with {
is = beat > beat';
};
phasor_impl(fq, phase) = incr/smps
with {
incr = _~+(1.0) : +(offset) : _, smps : fmod;
offset = (1.0 - phase) * smps;
smps = ma.SR/fq;
};
phasor(fq) = phasor_impl(fq, 0);
phasor_ph(fq, phase) = phasor_impl(fq, phase);
metro_impl(fq, phase) = incr<=1.0
with {
offset = (1.0-phase) * smps;
incr = _~+(1.0) : +(offset) : _,smps : fmod;
smps = ma.SR/fq;
};
metro(fq) = metro_impl(fq, 0);
metro_swing(fq, swing) = metro_impl(fq,0) | metro_impl(fq, swing);
drunk_metro_acc(fq, noise_amt) = bt, acc
with {
trig = metro(fq)|(fq!=fq')|os.impulse;
frq = fq + (no.noise * noise_amt) : ba.sAndH(trig);
bt = metro(frq);
acc_mod = int(abs(no.noise*noise_amt))+1;
acc = accent(acc_mod, bt);
};
euclidian(onset, div, pulses, rotation, phasor) = (euclid' != euclid) & (phase' != phase)
with {
phase = ((phasor + rotation) * div), 1.0 : / : *(pulses) : int;
euclid = int((onset/pulses) * phase);
};
ph = phasor(speed);
synt = os.sawtooth(100) * (euclidian(3,3,5,0, ph):en.are(0,0.3))
+ os.sawtooth(200) * (euclidian(2,2,5, 0, ph):en.are(0,0.2))
+ os.sawtooth(500) * (euclidian(3, 3, 13, 0, ph ) : en.are(0,0.1))
,
os.sawtooth(300) * (euclidian(3,3,7,0,ph) : en.are(0,0.3))
+ os.sawtooth(400)* (euclidian(5,3,8, 0,ph) : en.are(0,0.1))
+ os.sawtooth(50) * (euclidian(2, 2, 13, 0, ph) : en.are(0, 0.6));
process = synt : _*amp, _*amp;
| https://raw.githubusercontent.com/johannphilippe/paw2022/d9b921a44e72bab11e457a13a1b43a4eabca53df/examples/euc.dsp | faust | import("stdfaust.lib");
amp = hslider("amp", 0.2, 0, 1, 0.01);
speed = hslider("speed", 0.2, 0.1, 2, 0.01) : si.smoo;
noise_amt = hslider("noise_amount", 1, 1, 4, 0.1) : si.smoo;
naive_impl(fq) = (_, ma.SR/fq : fmod) ~+(1.0) : <=(1.0);
accent(modulo, beat) = _~+( is ) : %(modulo) : ==(0) : &(is)
with {
is = beat > beat';
};
phasor_impl(fq, phase) = incr/smps
with {
incr = _~+(1.0) : +(offset) : _, smps : fmod;
offset = (1.0 - phase) * smps;
smps = ma.SR/fq;
};
phasor(fq) = phasor_impl(fq, 0);
phasor_ph(fq, phase) = phasor_impl(fq, phase);
metro_impl(fq, phase) = incr<=1.0
with {
offset = (1.0-phase) * smps;
incr = _~+(1.0) : +(offset) : _,smps : fmod;
smps = ma.SR/fq;
};
metro(fq) = metro_impl(fq, 0);
metro_swing(fq, swing) = metro_impl(fq,0) | metro_impl(fq, swing);
drunk_metro_acc(fq, noise_amt) = bt, acc
with {
trig = metro(fq)|(fq!=fq')|os.impulse;
frq = fq + (no.noise * noise_amt) : ba.sAndH(trig);
bt = metro(frq);
acc_mod = int(abs(no.noise*noise_amt))+1;
acc = accent(acc_mod, bt);
};
euclidian(onset, div, pulses, rotation, phasor) = (euclid' != euclid) & (phase' != phase)
with {
phase = ((phasor + rotation) * div), 1.0 : / : *(pulses) : int;
euclid = int((onset/pulses) * phase);
};
ph = phasor(speed);
synt = os.sawtooth(100) * (euclidian(3,3,5,0, ph):en.are(0,0.3))
+ os.sawtooth(200) * (euclidian(2,2,5, 0, ph):en.are(0,0.2))
+ os.sawtooth(500) * (euclidian(3, 3, 13, 0, ph ) : en.are(0,0.1))
,
os.sawtooth(300) * (euclidian(3,3,7,0,ph) : en.are(0,0.3))
+ os.sawtooth(400)* (euclidian(5,3,8, 0,ph) : en.are(0,0.1))
+ os.sawtooth(50) * (euclidian(2, 2, 13, 0, ph) : en.are(0, 0.6));
process = synt : _*amp, _*amp;
|
|
2f5c3850081c509bc68b5b29c909b1ec595c428b9511d769ca5d4d62c341bc0a | HexHive/datAFLow | surface4.dsp | import("stdfaust.lib");
// surface4(X,Y): creates the connections for a surface of X*Y nodes with 4 inputs and 4 outputs
surface4(X,Y) = route(X*Y*4, X*Y*4, par(x, X, par(y, Y, connections(x,y) )))
with {
connections(x,y) = N(x,y), S(x,y-1),
S(x,y), N(x,y+1),
W(x,y), E(x-1,y),
E(x,y), W(x+1,y);
N(x,y) = (1 + 0 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
E(x,y) = (1 + 1 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
S(x,y) = (1 + 2 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
W(x,y) = (1 + 3 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
};
xstraight4(X,Y) = route( X*Y*4, X*Y*4,
par(x, X,
par(y, Y,
par(p, 4,
(1 + p + (x+y*X)*4, 1 + p + (x+y*X)*4)))));
straight4(X,Y) = par(i, X*Y*4, @(100));
// surface4i(X,Y,x,y): creates the connections for a surface of X*Y nodes with 4 inputs and 4 outputs
// with an injection point of coord x,y.
surface4i(X, Y, x0, y0) = route(X*Y*4+1, X*Y*4,
par(x, X, par(y, Y, connections(x,y))),
in, N(x0,y0),
in, E(x0,y0),
in, S(x0,y0),
in, W(x0,y0)
)
with {
in = X*Y*4 + 1; // additional input for signal injection
connections(x,y) = N(x,y), S(x,y-1),
S(x,y), N(x,y+1),
W(x,y), E(x-1,y),
E(x,y), W(x+1,y);
N(x,y) = (1 + 0 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
E(x,y) = (1 + 1 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
S(x,y) = (1 + 2 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
W(x,y) = (1 + 3 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
};
listen4(X, Y, x, y) = route( X*Y*4, 1,
N(x,y), 1,
E(x,y), 1,
S(x,y), 1,
W(x,y), 1
)
with {
N(x,y) = (1 + 0 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
E(x,y) = (1 + 1 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
S(x,y) = (1 + 2 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
W(x,y) = (1 + 3 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
};
model(X,Y,filter, node) =
par (x, X, north),
par (y, Y-2, (west, par (x, X-2, node), east)),
par (x, X, south)
with {
north(n,e,s,w) = 0, 0, filter(s), 0;
east(n,e,s,w) = 0, 0, 0, filter(w);
south(n,e,s,w) = filter(n), 0, 0, 0;
west(n,e,s,w) = 0, filter(e), 0, 0;
};
node(n,e,s,w) = (e+s+w)/3, (n+s+w)/3, (n+e+w)/3, (n+e+s)/3;
example(X,Y) = (surface4i(X,Y, 1,1) : model(X, Y, \(x).((x+x')*0.25), node)) ~ straight4(X,Y) : listen4(X,Y, X-2,Y-3);
process = button("play") : example(6,10);
//model(4,4, _, node); //listen4(3,3, 1,1); //surface4(2,2); //surface4i(4,4,1,1);
/*
0 1 2
q
3 4 5
6 7 8
0 1
2 3
*/ | https://raw.githubusercontent.com/HexHive/datAFLow/b9f3cbc42b1970f8655817c9fb67b1eaba3ae4c0/evaluation/ddfuzz/seeds/faust/surface4.dsp | faust | surface4(X,Y): creates the connections for a surface of X*Y nodes with 4 inputs and 4 outputs
surface4i(X,Y,x,y): creates the connections for a surface of X*Y nodes with 4 inputs and 4 outputs
with an injection point of coord x,y.
additional input for signal injection
model(4,4, _, node); //listen4(3,3, 1,1); //surface4(2,2); //surface4i(4,4,1,1);
0 1 2
q
3 4 5
6 7 8
0 1
2 3
| import("stdfaust.lib");
surface4(X,Y) = route(X*Y*4, X*Y*4, par(x, X, par(y, Y, connections(x,y) )))
with {
connections(x,y) = N(x,y), S(x,y-1),
S(x,y), N(x,y+1),
W(x,y), E(x-1,y),
E(x,y), W(x+1,y);
N(x,y) = (1 + 0 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
E(x,y) = (1 + 1 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
S(x,y) = (1 + 2 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
W(x,y) = (1 + 3 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
};
xstraight4(X,Y) = route( X*Y*4, X*Y*4,
par(x, X,
par(y, Y,
par(p, 4,
(1 + p + (x+y*X)*4, 1 + p + (x+y*X)*4)))));
straight4(X,Y) = par(i, X*Y*4, @(100));
surface4i(X, Y, x0, y0) = route(X*Y*4+1, X*Y*4,
par(x, X, par(y, Y, connections(x,y))),
in, N(x0,y0),
in, E(x0,y0),
in, S(x0,y0),
in, W(x0,y0)
)
with {
connections(x,y) = N(x,y), S(x,y-1),
S(x,y), N(x,y+1),
W(x,y), E(x-1,y),
E(x,y), W(x+1,y);
N(x,y) = (1 + 0 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
E(x,y) = (1 + 1 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
S(x,y) = (1 + 2 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
W(x,y) = (1 + 3 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
};
listen4(X, Y, x, y) = route( X*Y*4, 1,
N(x,y), 1,
E(x,y), 1,
S(x,y), 1,
W(x,y), 1
)
with {
N(x,y) = (1 + 0 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
E(x,y) = (1 + 1 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
S(x,y) = (1 + 2 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
W(x,y) = (1 + 3 + (x+y*X)*4) * (x>=0) * (x<X) * (y>=0) * (y<Y);
};
model(X,Y,filter, node) =
par (x, X, north),
par (y, Y-2, (west, par (x, X-2, node), east)),
par (x, X, south)
with {
north(n,e,s,w) = 0, 0, filter(s), 0;
east(n,e,s,w) = 0, 0, 0, filter(w);
south(n,e,s,w) = filter(n), 0, 0, 0;
west(n,e,s,w) = 0, filter(e), 0, 0;
};
node(n,e,s,w) = (e+s+w)/3, (n+s+w)/3, (n+e+w)/3, (n+e+s)/3;
example(X,Y) = (surface4i(X,Y, 1,1) : model(X, Y, \(x).((x+x')*0.25), node)) ~ straight4(X,Y) : listen4(X,Y, X-2,Y-3);
process = button("play") : example(6,10);
|
ff4b2559fa7d98df41efff15cffd6396756a605a482834cf72778b766a52bd57 | agraef/pd-remote | subtractive.dsp |
declare name "subtractive";
declare description "saw wave filtered with resonant lowpass";
declare author "Albert Graef";
declare version "2.0";
import("stdfaust.lib");
nvoices = 8;
process = sum(i, nvoices, voice(i))
: (*(vol:dezipper(0.99)) : sp.panner(pan:dezipper(0.99)))
with {
env(i) = gate(i) : en.adsr(attack, decay, sustain, release);
filter(env,freq) =
lowpass(env*res, ma.fmax(1/cutoff, env)*freq*cutoff);
dezipper(c) = *(1-c) : +~*(c);
voice(i) = os.sawtooth(freq(i))
: ((env(i),freq(i),_) : filter) : *(env(i) * gain(i));
};
// control variables
vol = hslider("[1] vol [midi:ctrl 2]", 0.3, 0, 1, 0.01);
pan = hslider("[2] pan [midi:ctrl 10]", 0.5, 0, 1, 0.01);
attack = hslider("[3] attack", 0.01, 0, 1, 0.001);
decay = hslider("[4] decay", 0.3, 0, 1, 0.001);
sustain = hslider("[5] sustain", 0.5, 0, 1, 0.01);
release = hslider("[6] release", 0.2, 0, 1, 0.001);
res = hslider("[7] resonance (dB) [midi:ctrl 75]", 3, 0, 20, 0.1);
cutoff = hslider("[8] cutoff (harmonic) [midi:ctrl 74]", 6, 1, 20, 0.1);
// voice controls
freq(i) = nentry("freq%i[voice:freq]", 440, 20, 20000, 1);
gain(i) = nentry("gain%i[voice:gain]", 1, 0, 10, 0.01);
gate(i) = button("gate%i[voice:gate]");
// Tweaked Butterworth filter by David Werner and Patrice Tarrabia,
// see http://www.musicdsp.org/showArchiveComment.php?ArchiveID=180.
lowpass(res,freq) = f : (+ ~ g) : *(a) with {
f(x) = a0*x+a1*x'+a2*x'';
g(y) = -b1*y-b2*y';
// calculate the filter coefficients
a = 1/ba.db2linear(0.5*res);
c = 1/tan(ma.PI*(freq/ma.SR));
c2 = c*c;
r = 1/ba.db2linear(2*res);
q = sqrt(2)*r;
a0 = 1/(1+(q*c)+(c2));
a1 = 2*a0;
a2 = a0;
b1 = 2*a0*(1-c2);
b2 = a0*(1-q*c+c2);
};
| https://raw.githubusercontent.com/agraef/pd-remote/4fede0b70ac5f9544a783dd45ddcf4643a29bc63/examples/dsp/subtractive.dsp | faust | control variables
voice controls
Tweaked Butterworth filter by David Werner and Patrice Tarrabia,
see http://www.musicdsp.org/showArchiveComment.php?ArchiveID=180.
calculate the filter coefficients |
declare name "subtractive";
declare description "saw wave filtered with resonant lowpass";
declare author "Albert Graef";
declare version "2.0";
import("stdfaust.lib");
nvoices = 8;
process = sum(i, nvoices, voice(i))
: (*(vol:dezipper(0.99)) : sp.panner(pan:dezipper(0.99)))
with {
env(i) = gate(i) : en.adsr(attack, decay, sustain, release);
filter(env,freq) =
lowpass(env*res, ma.fmax(1/cutoff, env)*freq*cutoff);
dezipper(c) = *(1-c) : +~*(c);
voice(i) = os.sawtooth(freq(i))
: ((env(i),freq(i),_) : filter) : *(env(i) * gain(i));
};
vol = hslider("[1] vol [midi:ctrl 2]", 0.3, 0, 1, 0.01);
pan = hslider("[2] pan [midi:ctrl 10]", 0.5, 0, 1, 0.01);
attack = hslider("[3] attack", 0.01, 0, 1, 0.001);
decay = hslider("[4] decay", 0.3, 0, 1, 0.001);
sustain = hslider("[5] sustain", 0.5, 0, 1, 0.01);
release = hslider("[6] release", 0.2, 0, 1, 0.001);
res = hslider("[7] resonance (dB) [midi:ctrl 75]", 3, 0, 20, 0.1);
cutoff = hslider("[8] cutoff (harmonic) [midi:ctrl 74]", 6, 1, 20, 0.1);
freq(i) = nentry("freq%i[voice:freq]", 440, 20, 20000, 1);
gain(i) = nentry("gain%i[voice:gain]", 1, 0, 10, 0.01);
gate(i) = button("gate%i[voice:gate]");
lowpass(res,freq) = f : (+ ~ g) : *(a) with {
f(x) = a0*x+a1*x'+a2*x'';
g(y) = -b1*y-b2*y';
a = 1/ba.db2linear(0.5*res);
c = 1/tan(ma.PI*(freq/ma.SR));
c2 = c*c;
r = 1/ba.db2linear(2*res);
q = sqrt(2)*r;
a0 = 1/(1+(q*c)+(c2));
a1 = 2*a0;
a2 = a0;
b1 = 2*a0*(1-c2);
b2 = a0*(1-q*c+c2);
};
|
245681b6166e9508b5085ded63411eb7e3f9f533a0c7f8e7c371ecfd912e9210 | SamKouteili/Crossroad2Effects | guitar_filt.dsp | /*** Error from Wet File: 0.000522 | Time to Generate: 93.75345 ***/
import("stdfaust.lib");
lpfc1ca0 = (fi).lowpass(1, 50.0);
lpf491b0 = (fi).lowpass(1, 50.0);
del3c000 = @(0.5);
rev846a0 = (re).mono_freeverb(0.988212, 1, 0.324687, 0.532281);
gainfed20 = +(0.999767);
hpfd1be0 = (fi).highpass(1, 50.0);
process = (lpfc1ca0) <: ((lpf491b0)), ((del3c000)) :> (rev846a0) : (gainfed20) : (hpfd1be0); | https://raw.githubusercontent.com/SamKouteili/Crossroad2Effects/60ceac0177c529734dab524024dc5a813e0b34f0/examples/standard_application/guitar_filt.dsp | faust | ** Error from Wet File: 0.000522 | Time to Generate: 93.75345 ** | import("stdfaust.lib");
lpfc1ca0 = (fi).lowpass(1, 50.0);
lpf491b0 = (fi).lowpass(1, 50.0);
del3c000 = @(0.5);
rev846a0 = (re).mono_freeverb(0.988212, 1, 0.324687, 0.532281);
gainfed20 = +(0.999767);
hpfd1be0 = (fi).highpass(1, 50.0);
process = (lpfc1ca0) <: ((lpf491b0)), ((del3c000)) :> (rev846a0) : (gainfed20) : (hpfd1be0); |
e32c798ce58b2b1608caf4d93891823ecc21af7a8b103f479234f2c172bf52ef | madskjeldgaard/komet | krossover3.dsp | // Linkwitz riley based band splitter
import("stdfaust.lib");
process = fi.crossover3LR4(cf1, cf2) with{
cf1 = vslider("crossoverFreq1",1500,10,20000,0.001);
cf2 = vslider("crossoverFreq2",2500,10,20000,0.001);
};
| https://raw.githubusercontent.com/madskjeldgaard/komet/defd9b0b2f4055dcb12b75565631a30152fa779c/faust/krossover3.dsp | faust | Linkwitz riley based band splitter | import("stdfaust.lib");
process = fi.crossover3LR4(cf1, cf2) with{
cf1 = vslider("crossoverFreq1",1500,10,20000,0.001);
cf2 = vslider("crossoverFreq2",2500,10,20000,0.001);
};
|
Subsets and Splits