_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
e147453487723b529c4ce86c7a0db00100cd37dfb2c4d3b4b0c175a5202cfde7
chairaudio/CHAIR-Pd-library
simpleKarplus.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") ; myKarplus = _*gate : pm.ks( (freq : pm.f2l), damping ) with{ f = hslider("v:karplus/h:[0]params/[1]freq[style:knob]",440,50,1000,0.01); bend = hslider("v:karplus/h:[0]params/[1]bend[style:knob][hidden:1][midi:pitchwheel]" ,1,0,10,0.01) : si.polySmooth(gate,0.999,1); s = hslider("v:karplus/h:[0]params/[1]sustain[hidden:1][midi:ctrl 64][style:knob]" ,0,0,1,1); damping = hslider("v:karplus/h:[0]params/[1]damping[midi:ctrl 1][style:knob]" ,0.01,0,1,0.01) : si.smoo; t = button("v:karplus/[1]gate"); gate = t+s : min(1); freq = f*bend; }; process = myKarplus;
https://raw.githubusercontent.com/chairaudio/CHAIR-Pd-library/c416c1f72b405d1dbc914e8e77e133dd505e3511/examples/abstractions/simpleKarplus.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") ; myKarplus = _*gate : pm.ks( (freq : pm.f2l), damping ) with{ f = hslider("v:karplus/h:[0]params/[1]freq[style:knob]",440,50,1000,0.01); bend = hslider("v:karplus/h:[0]params/[1]bend[style:knob][hidden:1][midi:pitchwheel]" ,1,0,10,0.01) : si.polySmooth(gate,0.999,1); s = hslider("v:karplus/h:[0]params/[1]sustain[hidden:1][midi:ctrl 64][style:knob]" ,0,0,1,1); damping = hslider("v:karplus/h:[0]params/[1]damping[midi:ctrl 1][style:knob]" ,0.01,0,1,0.01) : si.smoo; t = button("v:karplus/[1]gate"); gate = t+s : min(1); freq = f*bend; }; process = myKarplus;
400eff4ee92d48284aa4547ec57f4b96075fc0a293c09120ee7a1dd07b1663ad
Ameobea/web-synth
rain.dsp
// This code taken in full from here: https://github.com/grame-cncm/faust/blob/master-dev/examples/gameaudio/rain.dsp // Source code licensed under GNU GPLv2 //----------------------`rain`-------------------------- // A very simple rain simulator // // #### Usage // // ``` // rain(d,l) : _,_ // ``` // // Where: // // * `d`: is the density of the rain: between 0 and 1 // * `l`: is the level (volume) of the rain: between 0 and 1 // //---------------------------------------------------------- import("stdfaust.lib"); rain(density,level) = no.multinoise(2) : par(i, 2, drop) : par(i, 2, *(level)) with { drop = _ <: @(1), (abs < density) : *; }; process = rain ( hslider("v:rain/density", 1, 0, 5, 0.1) / 1000, hslider("v:rain/volume", 0.2, 0, 1, 0.01) );
https://raw.githubusercontent.com/Ameobea/web-synth/4f82d8868c19bd39a006c0f4cd8546ff9d865c0d/engine/engine/static/rain.dsp
faust
This code taken in full from here: https://github.com/grame-cncm/faust/blob/master-dev/examples/gameaudio/rain.dsp Source code licensed under GNU GPLv2 ----------------------`rain`-------------------------- A very simple rain simulator #### Usage ``` rain(d,l) : _,_ ``` Where: * `d`: is the density of the rain: between 0 and 1 * `l`: is the level (volume) of the rain: between 0 and 1 ----------------------------------------------------------
import("stdfaust.lib"); rain(density,level) = no.multinoise(2) : par(i, 2, drop) : par(i, 2, *(level)) with { drop = _ <: @(1), (abs < density) : *; }; process = rain ( hslider("v:rain/density", 1, 0, 5, 0.1) / 1000, hslider("v:rain/volume", 0.2, 0, 1, 0.01) );
2b12fb14c9b76b2075596496ca3e43e93c4e921b7895718308963c996b56d7aa
jpcima/stone-phaser
chirpsynth.dsp
declare name "Chirp synthesizer"; declare author "Jean Pierre Cimalando"; declare version "1.0"; declare license "CC0-1.0"; // chirp synthesizer with all-pass filter chain // analysis signal generator for phasers import("stdfaust.lib"); process = os.lf_imptrain(oscf) : seq(i,64,allpass1(apf)) with { oscf = 1.0/30e-3; apf = 701.87330; }; allpass1(f) = fi.iir((a,1.),(a)) with { a = -1.+2.*ma.PI*f/ma.SR; };
https://raw.githubusercontent.com/jpcima/stone-phaser/da92961a4148b77fca131ba0e51d9ea7ad0b2476/tools/chirpsynth/chirpsynth.dsp
faust
chirp synthesizer with all-pass filter chain analysis signal generator for phasers
declare name "Chirp synthesizer"; declare author "Jean Pierre Cimalando"; declare version "1.0"; declare license "CC0-1.0"; import("stdfaust.lib"); process = os.lf_imptrain(oscf) : seq(i,64,allpass1(apf)) with { oscf = 1.0/30e-3; apf = 701.87330; }; allpass1(f) = fi.iir((a,1.),(a)) with { a = -1.+2.*ma.PI*f/ma.SR; };
36228a418b9075e2d70c13ed8b1b6690d064096b29d352144f47c5b27c1eb056
jpcima/faustpp
hardclip.dsp
declare name "Oversampled Hard Clipper"; declare author "Jean Pierre Cimalando"; declare copyright "2019"; declare license "CC0-1.0"; declare version "1.0"; import("stdfaust.lib"); OS = fconstant(int gOversampling, <math.h>); process(x) = ba.if(x>0.0, x, 0.0);
https://raw.githubusercontent.com/jpcima/faustpp/5197306546153130f50190cd589f3289047e2b3b/examples/hardclip.dsp
faust
declare name "Oversampled Hard Clipper"; declare author "Jean Pierre Cimalando"; declare copyright "2019"; declare license "CC0-1.0"; declare version "1.0"; import("stdfaust.lib"); OS = fconstant(int gOversampling, <math.h>); process(x) = ba.if(x>0.0, x, 0.0);
16fc6fc18206e1ee6271a2de6c931bd5c5e8933e85bcc91eceea4dee77a107d8
eh2k/squares-and-circles
djembe.dsp
//faust ./djembe.dsp -cn djembe > ./djembe.hxx import("stdfaust.lib"); freq = hslider("Freq",0.5,0,1000,0.01):si.smoo; strikePosition = hslider("Pos",0.5,0,1,0.00001):si.smoo; strikeSharpness = hslider("Sharpness",0.5,0,5,0.00001):si.smoo; gain = 3; trigger = button("trigger"); process = pm.djembe(freq,strikePosition,strikeSharpness,gain,trigger);
https://raw.githubusercontent.com/eh2k/squares-and-circles/15970d811ef4a253ded0e55c36b08a67fd821a43/lib/faust/djembe.dsp
faust
faust ./djembe.dsp -cn djembe > ./djembe.hxx
import("stdfaust.lib"); freq = hslider("Freq",0.5,0,1000,0.01):si.smoo; strikePosition = hslider("Pos",0.5,0,1,0.00001):si.smoo; strikeSharpness = hslider("Sharpness",0.5,0,5,0.00001):si.smoo; gain = 3; trigger = button("trigger"); process = pm.djembe(freq,strikePosition,strikeSharpness,gain,trigger);
a436b42af0ad57e14fdb6c4002693fda26f7d4cf6d824028b60c7b9cf89b9780
eblade/synth
simple.dsp
declare options "[midi:on][nvoices:12]"; 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[OWL:A]", 440, 20, 10000, 1)) * hslider("gain[OWL:B]", 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/eblade/synth/d7fb5a7d47a0f071be6ee22d2452ef37f3f23d9f/faust/simple.dsp
faust
declare options "[midi:on][nvoices:12]"; 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[OWL:A]", 440, 20, 10000, 1)) * hslider("gain[OWL:B]", 0.5, 0, 1, 0.01) * (button("gate") : en.adsr(0.1,0.1,0.98,0.1)); effect = dm.zita_light;
b11ff509ff56889d6f251a806d43e84ce1891f5bb07cb0af43f582132a61b405
magnetophon/LazyLimiter
blockDiagram.dsp
/* * Copyright (C) 2014 Bart Brouns * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ /*some building blocks where taken from or inspired by compressor-basics.dsp by Sampo Savolainen*/ declare name "LazyLimiterBlockDiagram"; declare author "Bart Brouns"; declare version "0.3.2"; declare copyright "(C) 2014 Bart Brouns"; import("stdfaust.lib"); //for ba.linear2db import("stdfaust.lib"); //for an.amp_follower import ("../GUI.lib"); import ("../LazyLimiter.lib"); process(audio) = GainCalculator(audio) : ba.db2linear * audio@LookAheadTime; // just for visual indication in the blockdiagram. you can't actually change it and expect the code to work. LookAheadTime = 4; GainCalculator(audio) = (minimumGainReduction(audio) : releaseEnvelope)~_; // this extra abstraction layer is needed to make the feedback loop work. // not so great for educational purposes. minimumGainReduction(audio,lastdown) = ((attackGainReduction(audio) , hold(audio,lastdown)): min); attackGainReduction(audio) = ( currentdown(audio)@1*(1/4), currentdown(audio)@2*(2/4), currentdown(audio)@3*(3/4), currentdown(audio)@4*(4/4) ): (min,min):min; hold(audio,lastdown) = ( (currentdown(audio)@(0):max(lastdown)), (currentdown(audio)@(1):max(lastdown)), (currentdown(audio)@(2):max(lastdown)), (currentdown(audio)@(3):max(lastdown)) ): (min,min):min; release = 0.1; releaseEnvelope = an.amp_follower(release);
https://raw.githubusercontent.com/magnetophon/LazyLimiter/f3bbb2c4c05858e93710272ec42bda19d8f6a608/docs/blockDiagram.dsp
faust
* Copyright (C) 2014 Bart Brouns * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. some building blocks where taken from or inspired by compressor-basics.dsp by Sampo Savolainen for ba.linear2db for an.amp_follower just for visual indication in the blockdiagram. you can't actually change it and expect the code to work. this extra abstraction layer is needed to make the feedback loop work. not so great for educational purposes.
declare name "LazyLimiterBlockDiagram"; declare author "Bart Brouns"; declare version "0.3.2"; declare copyright "(C) 2014 Bart Brouns"; import ("../GUI.lib"); import ("../LazyLimiter.lib"); process(audio) = GainCalculator(audio) : ba.db2linear * audio@LookAheadTime; LookAheadTime = 4; GainCalculator(audio) = (minimumGainReduction(audio) : releaseEnvelope)~_; minimumGainReduction(audio,lastdown) = ((attackGainReduction(audio) , hold(audio,lastdown)): min); attackGainReduction(audio) = ( currentdown(audio)@1*(1/4), currentdown(audio)@2*(2/4), currentdown(audio)@3*(3/4), currentdown(audio)@4*(4/4) ): (min,min):min; hold(audio,lastdown) = ( (currentdown(audio)@(0):max(lastdown)), (currentdown(audio)@(1):max(lastdown)), (currentdown(audio)@(2):max(lastdown)), (currentdown(audio)@(3):max(lastdown)) ): (min,min):min; release = 0.1; releaseEnvelope = an.amp_follower(release);
6b12464876de8680e58de2fd6e6731c9f6321cf6c7e55063532b53941375ee4f
Amerigo25/Faust
noise_par.dsp
import("stdfaust.lib"); process = no.noise <: fi.resonhp(500,5,1),fi.resonlp(500,5,1);
https://raw.githubusercontent.com/Amerigo25/Faust/5d6990371c225eb24b59776e1e5ac21277e77af2/noise_par.dsp
faust
import("stdfaust.lib"); process = no.noise <: fi.resonhp(500,5,1),fi.resonlp(500,5,1);
9561991873debf0e6fd8121778abca6f6b0320d96c57779e13f9ff596472e17d
Marquets/MusicPerceptionProject
osc.dsp
declare name "osc"; declare version "1.0"; declare author "Grame"; declare license "BSD"; declare copyright "(c)GRAME 2009"; //----------------------------------------------- // Sinusoidal Oscillator //----------------------------------------------- import("stdfaust.lib"); vol = hslider("volume [unit:dB]", 0, -96, 0, 0.1) : ba.db2linear : si.smoo ; freq = hslider("freq [unit:Hz]", 1000, 20, 24000, 1); process = vgroup("Oscillator", os.osc(freq) * vol);
https://raw.githubusercontent.com/Marquets/MusicPerceptionProject/4728c8c476cf6d39e80a24e0ae5d9433dda22efa/webaudio/osc.dsp
faust
----------------------------------------------- Sinusoidal Oscillator -----------------------------------------------
declare name "osc"; declare version "1.0"; declare author "Grame"; declare license "BSD"; declare copyright "(c)GRAME 2009"; import("stdfaust.lib"); vol = hslider("volume [unit:dB]", 0, -96, 0, 0.1) : ba.db2linear : si.smoo ; freq = hslider("freq [unit:Hz]", 1000, 20, 24000, 1); process = vgroup("Oscillator", os.osc(freq) * vol);
59f5bd01d9b08ce77d32da0bfa53f87f5f73ee46b76c0c1b42c410b0b6ef487e
LSSN/dsp-appunti
parallelo.dsp
import("stdfaust.lib"); process = *(1.0), *(1.0);
https://raw.githubusercontent.com/LSSN/dsp-appunti/49741c08755de660aaea5ef6a709770a2d260234/code/parallelo.dsp
faust
import("stdfaust.lib"); process = *(1.0), *(1.0);
b8f0bea87eb97fb28bcd986a03d89deea64963b24e77b1caefa68d87188466cd
LSSN/dsp-appunti
diagramma.dsp
import("stdfaust.lib"); process = + : *(0.5);
https://raw.githubusercontent.com/LSSN/dsp-appunti/49741c08755de660aaea5ef6a709770a2d260234/code/diagramma.dsp
faust
import("stdfaust.lib"); process = + : *(0.5);
b826596ae59c2614304441041eba65ff40ae4acc352a70d310401396cbf977c8
LSSN/dsp-appunti
somma.dsp
import("stdfaust.lib"); process = +;
https://raw.githubusercontent.com/LSSN/dsp-appunti/49741c08755de660aaea5ef6a709770a2d260234/code/somma.dsp
faust
import("stdfaust.lib"); process = +;
64e32dee2a29e227d94903893d388668def80ce1299798c651715a336d9f85e5
LSSN/dsp-appunti
ibrido.dsp
import("stdfaust.lib"); process = +,+:+;
https://raw.githubusercontent.com/LSSN/dsp-appunti/49741c08755de660aaea5ef6a709770a2d260234/code/ibrido.dsp
faust
import("stdfaust.lib"); process = +,+:+;
f87d130f788e5746f97d2cd85bdbd8139de8319a7e85d4644d4b6a0bd3855436
LSSN/dsp-appunti
seriale.dsp
import("stdfaust.lib"); process = *(1.0) : *(1.0);
https://raw.githubusercontent.com/LSSN/dsp-appunti/49741c08755de660aaea5ef6a709770a2d260234/code/seriale.dsp
faust
import("stdfaust.lib"); process = *(1.0) : *(1.0);
5c2f22aeb0d9b5f9ba5ca8f64aaa3a38cc50b7621ed016fab84a4c420fbbe106
matthewcaren/KeyWI
verb.dsp
import("stdfaust.lib"); verb = re.zita_rev1_stereo(60,200,6000,2.5,2,44100); process = _,_ <: verb, (_,_) :> _,_;
https://raw.githubusercontent.com/matthewcaren/KeyWI/83a62885e99069fe1fbaf55b28a2d98a5b3567ca/code/clarinet/verb.dsp
faust
import("stdfaust.lib"); verb = re.zita_rev1_stereo(60,200,6000,2.5,2,44100); process = _,_ <: verb, (_,_) :> _,_;
5d668fa01b5c0987ed6f171bc9d5a45fc8738dd3d5cee42488f9eef318daf1f8
oshibka404/sound_design
main.dsp
declare name "Sound Design"; declare author "Andrey Ozornin"; declare copyright "Ozornin Music"; declare version "0.01"; declare license "MIT"; declare options "[midi:on]"; import("stdfaust.lib"); cc = library("midi_cc.dsp"); osc1_level = hslider("osc1 level", 1, 0, 1, .01); osc1 = component("oscillators/osc1.dsp") * osc1_level; osc2_level = hslider("osc2 level", 1, 0, 1, .01); osc2 = component("oscillators/osc2.dsp") * osc2_level; process = (osc1 + osc2) * cc.gate * cc.gain <: _,_;
https://raw.githubusercontent.com/oshibka404/sound_design/8d0505f4f6e76db08f52061b2b5f9a76079147b9/DSP/main.dsp
faust
declare name "Sound Design"; declare author "Andrey Ozornin"; declare copyright "Ozornin Music"; declare version "0.01"; declare license "MIT"; declare options "[midi:on]"; import("stdfaust.lib"); cc = library("midi_cc.dsp"); osc1_level = hslider("osc1 level", 1, 0, 1, .01); osc1 = component("oscillators/osc1.dsp") * osc1_level; osc2_level = hslider("osc2 level", 1, 0, 1, .01); osc2 = component("oscillators/osc2.dsp") * osc2_level; process = (osc1 + osc2) * cc.gate * cc.gain <: _,_;
82d7598fa101cd0db3dc1534a47d11d6bb93096a4d8f30accae2e37b0f09b4b1
Msc-program/Jacklink
limitertest.dsp
// Test signal used by ../src/Limiter.cpp import("stdfaust.lib"); freq = hslider("[0] Freq",110.0,20.0,10000.0,1); amp = hslider("[0] Amp",0.2,0.0,1.0,0.0001); //process = amp * os.oscrs(freq); process = amp * os.sawtooth(freq);
https://raw.githubusercontent.com/Msc-program/Jacklink/70b8634173e66d89884bb77b70b7b3ed01f71f79/faust-src/limitertest.dsp
faust
Test signal used by ../src/Limiter.cpp process = amp * os.oscrs(freq);
import("stdfaust.lib"); freq = hslider("[0] Freq",110.0,20.0,10000.0,1); amp = hslider("[0] Amp",0.2,0.0,1.0,0.0001); process = amp * os.sawtooth(freq);
8d04d464ce0404c8137388c089253692ecea26070d9500176e2a2685a0ef4235
Amerigo25/Faust
noise_lp.dsp
import("stdfaust.lib"); ctFreq = 500; q = 5; gain = 1; process = no.noise : fi.resonlp(ctFreq,q,gain);
https://raw.githubusercontent.com/Amerigo25/Faust/3c744a05ad1d55f8dd2f97054c226f9f98a2a2c9/noise_lp.dsp
faust
import("stdfaust.lib"); ctFreq = 500; q = 5; gain = 1; process = no.noise : fi.resonlp(ctFreq,q,gain);
2e9999712b25bb8307bd91e954c363b0ec8733d999563d16cf5a6dabeb2a8ebc
matthewcaren/KeyWI
verb.dsp
import("stdfaust.lib"); verb = re.zita_rev1_stereo(60,200,6000,2.5,2,44100) : (_*0.25, _*0.25); process = _,_ <: verb, (_,_) :> _,_;
https://raw.githubusercontent.com/matthewcaren/KeyWI/83a62885e99069fe1fbaf55b28a2d98a5b3567ca/code/melodica/verb.dsp
faust
import("stdfaust.lib"); verb = re.zita_rev1_stereo(60,200,6000,2.5,2,44100) : (_*0.25, _*0.25); process = _,_ <: verb, (_,_) :> _,_;
99ed5b98ffd157c43ee90295bc6b0192d6cbcbf44d3b6babe01a9d3c5d8fc3ea
LucaSpanedda/Spanedda-PDlibraries
matrix.dsp
// MATRICE (GUI) //Importo la libreria standard di FAUST import("stdfaust.lib"); Fader(in) = checkbox("IN %in"); Mixer(N,out) = hgroup("OUT %out", par(in, N, *(Fader(in)) ) :> _ ); Matrix(N,M) = vgroup("Matrix %N x %M", par(in, N, _) <: par(out, M, Mixer(N, out))); process = Matrix(8, 8);
https://raw.githubusercontent.com/LucaSpanedda/Spanedda-PDlibraries/5b818fd8af0377d133505e240a8bf9de9ea05651/slll.pd-main/Linux_PD_Externals_FAUST/matrix.dsp
faust
MATRICE (GUI) Importo la libreria standard di FAUST
import("stdfaust.lib"); Fader(in) = checkbox("IN %in"); Mixer(N,out) = hgroup("OUT %out", par(in, N, *(Fader(in)) ) :> _ ); Matrix(N,M) = vgroup("Matrix %N x %M", par(in, N, _) <: par(out, M, Mixer(N, out))); process = Matrix(8, 8);
0c55c01c23f4bcccde8d822014e8e9a371eadb1326d2c593dd39f073d4f0ec0a
ajhg/antuner
antuner-guitar.dsp
declare name "antuner"; declare author "antonio goulart"; declare version "0.001"; import("stdfaust.lib"); e6 = checkbox("[0]E"); a5 = checkbox("[1]A"); d4 = checkbox("[2]D"); g3 = checkbox("[5]G"); b2 = checkbox("[4]B"); e1 = checkbox("[3]e"); sound = hgroup("[0].", e6*os.square(164.814) + a5*os.square(220) + d4*os.square(293.665)) + hgroup("[1].", g3*os.square(391.995) + b2*os.square(493.883) + e1*os.square(659.255)); cutoff = hslider("[2]tone", 2250, 500, 4000, 10) : si.smoo; gain = hslider("[3]volume", 0.5, 0, 1, 0.01) : si.smoo; process = sound, gain : * : fi.lowpass(2,cutoff) : co.limiter_1176_R4_mono;
https://raw.githubusercontent.com/ajhg/antuner/88c195941468b5a2a453f64ed16a127f96edb2df/antuner-guitar.dsp
faust
declare name "antuner"; declare author "antonio goulart"; declare version "0.001"; import("stdfaust.lib"); e6 = checkbox("[0]E"); a5 = checkbox("[1]A"); d4 = checkbox("[2]D"); g3 = checkbox("[5]G"); b2 = checkbox("[4]B"); e1 = checkbox("[3]e"); sound = hgroup("[0].", e6*os.square(164.814) + a5*os.square(220) + d4*os.square(293.665)) + hgroup("[1].", g3*os.square(391.995) + b2*os.square(493.883) + e1*os.square(659.255)); cutoff = hslider("[2]tone", 2250, 500, 4000, 10) : si.smoo; gain = hslider("[3]volume", 0.5, 0, 1, 0.01) : si.smoo; process = sound, gain : * : fi.lowpass(2,cutoff) : co.limiter_1176_R4_mono;
8301a6ea3eb061b0c94d730e0ed9dc60e568af2b20c00e2c7fe3f7a4af0ec871
georgezachos/b259wf
b259wf.dsp
import("stdfaust.lib"); import("basics.lib"); import("maths.lib"); fold = hslider("fold", 0, 0, 1, 0.001): si.smooth(0.999); offset = hslider("offset", 0, -1, 1, 0.001): si.smooth (0.999); LP = hslider("lowpass", 0, 0, 1, 0.001): lin2LogGain: si.smooth (0.999); scale(x,mn,mx,a,b) = a+(b-a)*(x-mn)/(mx-mn); R1 = (10., 49.9, 91., 30., 68.); r2 = 100.; R3 = (100., 43.2, 56., 68., 33., 240.); C = (0.-12., 0.-27.777, .0-21.428, 17.647, 36.363); Vs = 6.; r1(k) = ba.take(k+1, R1); r3(k) = ba.take(k+1, R3); c(k) = ba.take(k+1, C); term1(k) = Vs*r1(k)/r2; invClipCond(sig, k) = ma.fabs(sig) > term1(k); invClipNo(sig, k) = ma.signum(sig) * term1(k); invClip(sig, k) = ba.if(invClipCond(sig, k), sig, invClipNo(sig, k)); term2(k) = (r2*r3(k)/(r1(k)*r3(k) + r2*r3(k) + r1(k)*r2)); term3(clipped, k) = (clipped - ma.signum(clipped)*term1(k))* c(k); revClip(sig, k) = (term2(k) * term3(sig, k)):fi.lowpass(5,SR/2.6); /*fi.bandpass(1,20,16000);*/ folderBranches(sig) = sig <: par(i, 5, revClip(invClip(sig,i), i)); /*folderBranches(sig) = sig <: par(i, 5, invClip(sig,i));*/ wf(sig) = sig <: ( (folderBranches(sig) :> _) + (5.*sig:fi.lowpass(5,SR/2.6)) ):fi.lowpass(1,scale(LP,0,1,1300,SR/2.6)); process = (_*term1(0)*scale(fold,0.,1.,1.,20.) + scale(offset,-1,1,0-term1(2),term1(2))) : wf(_)/6. : ef.cubicnl(0.0,0):fi.dcblockerat(10);
https://raw.githubusercontent.com/georgezachos/b259wf/7a5f94688f5f6fff3b3e51761ce8ad93627ee92b/b259wf.dsp
faust
fi.bandpass(1,20,16000); folderBranches(sig) = sig <: par(i, 5, invClip(sig,i));
import("stdfaust.lib"); import("basics.lib"); import("maths.lib"); fold = hslider("fold", 0, 0, 1, 0.001): si.smooth(0.999); offset = hslider("offset", 0, -1, 1, 0.001): si.smooth (0.999); LP = hslider("lowpass", 0, 0, 1, 0.001): lin2LogGain: si.smooth (0.999); scale(x,mn,mx,a,b) = a+(b-a)*(x-mn)/(mx-mn); R1 = (10., 49.9, 91., 30., 68.); r2 = 100.; R3 = (100., 43.2, 56., 68., 33., 240.); C = (0.-12., 0.-27.777, .0-21.428, 17.647, 36.363); Vs = 6.; r1(k) = ba.take(k+1, R1); r3(k) = ba.take(k+1, R3); c(k) = ba.take(k+1, C); term1(k) = Vs*r1(k)/r2; invClipCond(sig, k) = ma.fabs(sig) > term1(k); invClipNo(sig, k) = ma.signum(sig) * term1(k); invClip(sig, k) = ba.if(invClipCond(sig, k), sig, invClipNo(sig, k)); term2(k) = (r2*r3(k)/(r1(k)*r3(k) + r2*r3(k) + r1(k)*r2)); term3(clipped, k) = (clipped - ma.signum(clipped)*term1(k))* c(k); revClip(sig, k) = (term2(k) * term3(sig, k)):fi.lowpass(5,SR/2.6); folderBranches(sig) = sig <: par(i, 5, revClip(invClip(sig,i), i)); wf(sig) = sig <: ( (folderBranches(sig) :> _) + (5.*sig:fi.lowpass(5,SR/2.6)) ):fi.lowpass(1,scale(LP,0,1,1300,SR/2.6)); process = (_*term1(0)*scale(fold,0.,1.,1.,20.) + scale(offset,-1,1,0-term1(2),term1(2))) : wf(_)/6. : ef.cubicnl(0.0,0):fi.dcblockerat(10);
3128ab5abbd2044ae9991772c86a66d11b0d2a402c6396f2acc0e82ecb1f3dcf
chernenko-victor/csound_edu
sin_oscil.dsp
import("stdfaust.lib"); phasor(f) = f/ma.SR : (+,1.0:fmod) ~ _ ; osc(f) = phasor(f) * 6.28318530718 : sin; process = osc(hslider("freq", 440, 20, 20000, 1)) * hslider("level", 0, 0, 1, 0.01);
https://raw.githubusercontent.com/chernenko-victor/csound_edu/164092906ca1eb4c5b083937badd523bcdf7c9ca/lsn8/sin_oscil.dsp
faust
import("stdfaust.lib"); phasor(f) = f/ma.SR : (+,1.0:fmod) ~ _ ; osc(f) = phasor(f) * 6.28318530718 : sin; process = osc(hslider("freq", 440, 20, 20000, 1)) * hslider("level", 0, 0, 1, 0.01);
75962fee1e3e0d33ddd8e4d6dcb6fc6c2dc50218e684bc4b089eff932224fdc1
maulwurst/Faust
voice.dsp
import("stdfaust.lib"); declare options "[midi:on]"; key_2_hz = ba.midikey2hz(f); amp = button("Gate"); f = hslider("freq", 69, 0, 128, 1); s = nentry("[06]Waveform Select [style: knob]",0,0,2,1); oscillator = os.polyblep_saw(key_2_hz), os.polyblep_square(key_2_hz), os.polyblep_triangle(key_2_hz) : select3(s); process = oscillator*amp;
https://raw.githubusercontent.com/maulwurst/Faust/42424d7d251fc6ff7bc640e586b717eeb7bd5c18/voice.dsp
faust
import("stdfaust.lib"); declare options "[midi:on]"; key_2_hz = ba.midikey2hz(f); amp = button("Gate"); f = hslider("freq", 69, 0, 128, 1); s = nentry("[06]Waveform Select [style: knob]",0,0,2,1); oscillator = os.polyblep_saw(key_2_hz), os.polyblep_square(key_2_hz), os.polyblep_triangle(key_2_hz) : select3(s); process = oscillator*amp;
5a9c42f848ed4e9f3835eabc14cab5711beada73b618d110741bfc144ee5c680
friskgit/snares
skipping.dsp
// -*- compile-command: "cd .. && make jack src=skipping.dsp && cd -"; -*-&& cd -"; -*- import("stdfaust.lib"); /* This version gets rid of the skips in the pulse. Thanks to Dario Sanfilippo Oddly enough, using ba.pulse reintroduces the problem, albeit not as much. */ /* I had another look and using floats is still problematic in single-precision; pulses won't take place at the exact BPM for low BPM values. The problem with the current ba.beat implementation is that it checks against 0: if we decrease the second operand of the % operation, there is no guarantee that the output will go through 0 when wrapping around. What we could do is to check if the first difference is negative to cover the more general case of wrapping around: */ freq = hslider("frq", 10000, 2, 20000, 1); beat(t) = (diff(ba.period(t)) < 0) + impulse with { diff(x) = x <: _ - _'; import(".lib");pulse = 1 - 1'; }; process = beat(freq) , beat(freq); /* This code has the same issue */ /* import("stdfaust.lib"); imp = ba.pulse(hslider("test", 20000, 10, 40000, 1)); env = en.ar(0.00001, 0.05, imp); process = imp, imp; */
https://raw.githubusercontent.com/friskgit/snares/bb43ea5e706a0ead6d65dd176a5c492b2f5d8f74/faust/snare/src/skipping.dsp
faust
-*- compile-command: "cd .. && make jack src=skipping.dsp && cd -"; -*-&& cd -"; -*- This version gets rid of the skips in the pulse. Thanks to Dario Sanfilippo Oddly enough, using ba.pulse reintroduces the problem, albeit not as much. I had another look and using floats is still problematic in single-precision; pulses won't take place at the exact BPM for low BPM values. The problem with the current ba.beat implementation is that it checks against 0: if we decrease the second operand of the % operation, there is no guarantee that the output will go through 0 when wrapping around. What we could do is to check if the first difference is negative to cover the more general case of wrapping around: This code has the same issue import("stdfaust.lib"); imp = ba.pulse(hslider("test", 20000, 10, 40000, 1)); env = en.ar(0.00001, 0.05, imp); process = imp, imp;
import("stdfaust.lib"); freq = hslider("frq", 10000, 2, 20000, 1); beat(t) = (diff(ba.period(t)) < 0) + impulse with { diff(x) = x <: _ - _'; import(".lib");pulse = 1 - 1'; }; process = beat(freq) , beat(freq);
4ac44338f687ca48093eb084278043cd58f061b98f1a4f69e71b8c443df6e119
quentinplet/Arpeggiator
arpeggiator.dsp
import("stdfaust.lib"); // delay + feedback n = 524288; dur = hslider("h:delay/dur", 500, 0, 2000, 1); fdbk = hslider("h:delay/fdbk", 0, 0, 0.999, 0.001); d = dur * ma.SR / 1000; delay1 = de.sdelay(n, 1024, d); // transposition shift = hslider("h:pitchshift/shift", 0, -24, 24, 0.01); pitchshift = ef.transpose(1024, 1024, shift); // panoramisation rate = hslider("h:pan/rate", 0, 0, 1, 0.001); p = os.osccos(rate) : +(1) : *(0.5); g = hslider("h:amp/gain", 0.5, 0, 1, 0.01): si.smooth(ba.tau2pole(0.1)); panner = sp.panner(p); process = (_) : ( + : ( (delay1) : (pitchshift) ) )~ (*(fdbk)) : *(g) : (panner);
https://raw.githubusercontent.com/quentinplet/Arpeggiator/ef4213c10d0e63d584a3ff1ec06d412050ccf35c/arpeggiator.dsp
faust
delay + feedback transposition panoramisation
import("stdfaust.lib"); n = 524288; dur = hslider("h:delay/dur", 500, 0, 2000, 1); fdbk = hslider("h:delay/fdbk", 0, 0, 0.999, 0.001); d = dur * ma.SR / 1000; delay1 = de.sdelay(n, 1024, d); shift = hslider("h:pitchshift/shift", 0, -24, 24, 0.01); pitchshift = ef.transpose(1024, 1024, shift); rate = hslider("h:pan/rate", 0, 0, 1, 0.001); p = os.osccos(rate) : +(1) : *(0.5); g = hslider("h:amp/gain", 0.5, 0, 1, 0.01): si.smooth(ba.tau2pole(0.1)); panner = sp.panner(p); process = (_) : ( + : ( (delay1) : (pitchshift) ) )~ (*(fdbk)) : *(g) : (panner);
6a1d2f240bdc6c00596d0d704e569cc05a198fa00cb2929a51a04e7a74cb6eb2
jpcima/string-machine
NoiseLFO.dsp
import("stdfaust.lib"); process = no.lfnoise(f) with { f = hslider("[1] Frequency [symbol:frequency] [unit:Hz]", 1.0, 0.0, 100.0, 1.0); };
https://raw.githubusercontent.com/jpcima/string-machine/188082dd0beb9a3c341035604841c53675fe66c4/sources/dsp/NoiseLFO.dsp
faust
import("stdfaust.lib"); process = no.lfnoise(f) with { f = hslider("[1] Frequency [symbol:frequency] [unit:Hz]", 1.0, 0.0, 100.0, 1.0); };
26eb67683fc55c17f8c59b22272bd797d3c1ff92108f4456a5bdb038f5099b6c
Amerigo25/Faust
noise_lp_GUI.dsp
import("stdfaust.lib"); ctFreq = hslider("Freq",500,20,1000,1); q = 5; gain = 1; b = button("ON"); process = b*no.noise : fi.resonlp(ctFreq,q,gain);
https://raw.githubusercontent.com/Amerigo25/Faust/3c744a05ad1d55f8dd2f97054c226f9f98a2a2c9/noise_lp_GUI.dsp
faust
import("stdfaust.lib"); ctFreq = hslider("Freq",500,20,1000,1); q = 5; gain = 1; b = button("ON"); process = b*no.noise : fi.resonlp(ctFreq,q,gain);
a692eb3167691064f30bb568f6774912a5a7797a834f1d766019338c659a1830
philipkobernik/learning-faust-dsp
6-29-2020.dsp
import("stdfaust.lib"); maxDuration = 2.0; duration = 0.5; feedback = 0.5; mix = hslider("echo mix",0.5,0,1,0.01) : si.smoo; process = os.osc(1), 1 : + : _, 300 : * : os.sawtooth : _, 0.1 : * <: _,(mix, ef.echo(maxDuration,duration,feedback) : *) :> _; // JK: what are the datatypes? It seems like there is only one-- signal // Docs: "Faust considers two type of signals: integer signals and floating point signals. Exchanges with the outside world are, by convention, made using floating point signals. The full range is represented by sample values between -1.0 and 1.0. // Docs: "Instead of compiling a program literally, it compiles the mathematical function it denotes." // JK: does this mean that the compiled programs are not reversible? // simple one-pole //a1 = 0.999; // the pole //process = +~*(a1);
https://raw.githubusercontent.com/philipkobernik/learning-faust-dsp/72bbf471e50db9d190065ac3632c24aa21d74f1d/6-29-2020.dsp
faust
JK: what are the datatypes? It seems like there is only one-- signal Docs: "Faust considers two type of signals: integer signals and floating point signals. Exchanges with the outside world are, by convention, made using floating point signals. The full range is represented by sample values between -1.0 and 1.0. Docs: "Instead of compiling a program literally, it compiles the mathematical function it denotes." JK: does this mean that the compiled programs are not reversible? simple one-pole a1 = 0.999; // the pole process = +~*(a1);
import("stdfaust.lib"); maxDuration = 2.0; duration = 0.5; feedback = 0.5; mix = hslider("echo mix",0.5,0,1,0.01) : si.smoo; process = os.osc(1), 1 : + : _, 300 : * : os.sawtooth : _, 0.1 : * <: _,(mix, ef.echo(maxDuration,duration,feedback) : *) :> _;
aa6fb6b0234b7a9232b35f33b71e7ffe70ed12070b404dffcced6ab3f2374fec
kretopi/pdToFaust
metro.dsp
declare name "metro"; declare author "Piotr Goj"; import("stdfaust.lib"); metroSlider = hslider("metro", 60, 30, 240, 1); // metro slider metro = ba.beat(metroSlider); // [metro] // attack and release use in envelope attack = 0.001; release = 0.2; process = en.ar(attack, release, metro) * no.noise <: _, _;
https://raw.githubusercontent.com/kretopi/pdToFaust/b62900f0be71f14703ec81825c915404b680fdc4/examples/metro/metro.dsp
faust
metro slider [metro] attack and release use in envelope
declare name "metro"; declare author "Piotr Goj"; import("stdfaust.lib"); attack = 0.001; release = 0.2; process = en.ar(attack, release, metro) * no.noise <: _, _;
ad7842dbc4d25dc95b30c8576686a747daceefb5f3f1afb4d21335503f9111ae
mstepien96/ICU-Sonification
exfaust2.dsp
declare name "freeverb"; declare version "0.0"; declare author "RM"; declare description "Freeverb demo application."; import("stdfaust.lib"); gate = button("gate") : si.smoo; gatesound = button("gatesound") : si.smoo; process = (pm.SFFormantModelFofSmooth_ui *gatesound + sine(freqsine)* (1 - gatesound))* gate <:_,_ : dm.freeverb_demo :_,_; declare name "Vocal FOF"; declare description "FOF vocal synthesizer."; declare license "MIT"; declare copyright "(c)Mike Olsen, CCRMA (Stanford University)"; phasor(freq) = (A~B) with{ delta = freq/ma.SR; A = _; B = (_+delta) : ma.frac; }; freqsine = hslider("freqsine",100,50,2000,0.01); sine(freqsine) = phasor(freqsine)*2*ma.PI : sin;
https://raw.githubusercontent.com/mstepien96/ICU-Sonification/ed3e154695c85cfeeba26e060e8b945adb781e3d/exfaust2.dsp
faust
declare name "freeverb"; declare version "0.0"; declare author "RM"; declare description "Freeverb demo application."; import("stdfaust.lib"); gate = button("gate") : si.smoo; gatesound = button("gatesound") : si.smoo; process = (pm.SFFormantModelFofSmooth_ui *gatesound + sine(freqsine)* (1 - gatesound))* gate <:_,_ : dm.freeverb_demo :_,_; declare name "Vocal FOF"; declare description "FOF vocal synthesizer."; declare license "MIT"; declare copyright "(c)Mike Olsen, CCRMA (Stanford University)"; phasor(freq) = (A~B) with{ delta = freq/ma.SR; A = _; B = (_+delta) : ma.frac; }; freqsine = hslider("freqsine",100,50,2000,0.01); sine(freqsine) = phasor(freqsine)*2*ma.PI : sin;
052ea7c9f2a39f5898d49816c6614c81b889fc2ad3a7cd8f558c151c88a7db5f
jpcima/faustpp
osctriangle.dsp
declare name "Oversampled Triangle Oscillator"; declare author "Jean Pierre Cimalando"; declare copyright "2019"; declare license "CC0-1.0"; declare version "1.0"; import("stdfaust.lib"); OS = fconstant(int gOversampling, <math.h>); process = os.lf_triangle(frequency/OS) with { note = hslider("[1] Note [unit:semitone]", 69, 0, 127, 1); frequency = ba.midikey2hz(note); };
https://raw.githubusercontent.com/jpcima/faustpp/5197306546153130f50190cd589f3289047e2b3b/examples/osctriangle.dsp
faust
declare name "Oversampled Triangle Oscillator"; declare author "Jean Pierre Cimalando"; declare copyright "2019"; declare license "CC0-1.0"; declare version "1.0"; import("stdfaust.lib"); OS = fconstant(int gOversampling, <math.h>); process = os.lf_triangle(frequency/OS) with { note = hslider("[1] Note [unit:semitone]", 69, 0, 127, 1); frequency = ba.midikey2hz(note); };
311ea714d140b3a358ce2ac10c27abd12e057698f65f32d4db8702c7a405e670
polyeffects/poly_filters
korg35HPF.dsp
declare name "korg35LPF"; declare description "faust Korg 35 LPF"; declare author "Loki Davison"; import("stdfaust.lib"); Q = hslider("Q",1,0.5,10,0.01); normFreq = hslider("freq",0.5,0,1,0.001):si.smoo; process = _ : ve.korg35HPF(normFreq,Q) <:_;
https://raw.githubusercontent.com/polyeffects/poly_filters/ebf8fd1cea20e5d167f0c04ded12da13bd70829f/faust/korg35HPF.dsp
faust
declare name "korg35LPF"; declare description "faust Korg 35 LPF"; declare author "Loki Davison"; import("stdfaust.lib"); Q = hslider("Q",1,0.5,10,0.01); normFreq = hslider("freq",0.5,0,1,0.001):si.smoo; process = _ : ve.korg35HPF(normFreq,Q) <:_;
801859b466f3fadc4290e7c89e9fb3e6f5b222ff480ac33f94d76f89c57396d2
polyeffects/poly_filters
korg35LPF.dsp
declare name "korg35LPF"; declare description "faust Korg 35 LPF"; declare author "Loki Davison"; import("stdfaust.lib"); Q = hslider("Q",1,0.5,10,0.01); normFreq = hslider("freq",0.5,0,1,0.001):si.smoo; process = _ : ve.korg35LPF(normFreq,Q) <:_;
https://raw.githubusercontent.com/polyeffects/poly_filters/ebf8fd1cea20e5d167f0c04ded12da13bd70829f/faust/korg35LPF.dsp
faust
declare name "korg35LPF"; declare description "faust Korg 35 LPF"; declare author "Loki Davison"; import("stdfaust.lib"); Q = hslider("Q",1,0.5,10,0.01); normFreq = hslider("freq",0.5,0,1,0.001):si.smoo; process = _ : ve.korg35LPF(normFreq,Q) <:_;
b231c9bbee826dc5bfba1b3475c3a6c3246b43b5f4e4e275ffc8419d7cc6a6d6
grame-cncm/faustservice
echorev.dsp
import("stdfaust.lib"); // User interface with MIDI convention duration = hslider("duration[unit:ms]", 250, 0, 1000, 1)/1000; feedback = hslider("feedback", 0.7, 0, 1, 0.01) : en.adsr(0.01,0.01,0.9,0.1); // echo + reverb process = par(i,2, ef.echo(2, duration, feedback)) : dm.zita_light;
https://raw.githubusercontent.com/grame-cncm/faustservice/a8271e583f680ec5af304a83ae832c01ce6d3c3a/cloud-tests/echorev.dsp
faust
User interface with MIDI convention echo + reverb
import("stdfaust.lib"); duration = hslider("duration[unit:ms]", 250, 0, 1000, 1)/1000; feedback = hslider("feedback", 0.7, 0, 1, 0.01) : en.adsr(0.01,0.01,0.9,0.1); process = par(i,2, ef.echo(2, duration, feedback)) : dm.zita_light;
393bb49b56358bc9497c871f0a7a42164cf0f0eabf3f10be27993e85dd40f97c
levinericzimmermann/oT2kb
bells.dsp
declare name "bells"; declare version "1.0"; declare author "Levin Eric Zimmermann"; declare options "[midi:on][nvoices:12]"; //----------------------------------------------- // Oscillator based synthesis //----------------------------------------------- import("stdfaust.lib"); f = hslider("freq",300,50,2000,0.01); bend = ba.semi2ratio(hslider("bend[midi:pitchwheel]",0,-2,2,0.01)) : si.polySmooth(gate,0.999,1); minimalGain = 0.1; gain = hslider("gain", 0.5, minimalGain, 1, 0.01); gate = button("gate"); freq = f*bend; // process = pm.russianBell(3,7000,0.25,gain,gate) <: _,_; process = pm.strikeModel(10,10000,0.7,gain,gate) : pm.marimbaModel(freq,0.5) <: _,_; effect = dm.greyhole_demo;
https://raw.githubusercontent.com/levinericzimmermann/oT2kb/202685282c585def5e62791ff784196e127e910a/src/bells.dsp
faust
----------------------------------------------- Oscillator based synthesis ----------------------------------------------- process = pm.russianBell(3,7000,0.25,gain,gate) <: _,_;
declare name "bells"; declare version "1.0"; declare author "Levin Eric Zimmermann"; declare options "[midi:on][nvoices:12]"; import("stdfaust.lib"); f = hslider("freq",300,50,2000,0.01); bend = ba.semi2ratio(hslider("bend[midi:pitchwheel]",0,-2,2,0.01)) : si.polySmooth(gate,0.999,1); minimalGain = 0.1; gain = hslider("gain", 0.5, minimalGain, 1, 0.01); gate = button("gate"); freq = f*bend; process = pm.strikeModel(10,10000,0.7,gain,gate) : pm.marimbaModel(freq,0.5) <: _,_; effect = dm.greyhole_demo;
3e4857303310cf50fca567542e3b7b18c409d2aff3d2b5e86c8bb9c7261ba5d7
ljwall/er-301-units
FDelay.dsp
import("stdfaust.lib"); // Name the ins and outs of the `process` function for use in the er-301 object declare er301_in1 "Length"; declare er301_in2 "In"; declare er301_out1 "Out"; process = de.fdelay(1000);
https://raw.githubusercontent.com/ljwall/er-301-units/3d30d2b2d3f69f9d7ac455da72a853ffe0de4a2c/faust-poc/dsp/FDelay.dsp
faust
Name the ins and outs of the `process` function for use in the er-301 object
import("stdfaust.lib"); declare er301_in1 "Length"; declare er301_in2 "In"; declare er301_out1 "Out"; process = de.fdelay(1000);
5c10d101d3e01a2369872d48a612d227f458bb854216c352af9d04abb3c0e39c
michal-cab/faust-snippets
delOscFdbk.dsp
import ("stdfaust.lib"); process = os.triangle(carFreq) : +~ (de.fdelay(65536,delay) : fi.resonlp(fr,res,gain) * fedGain) : _ * gain with { carFreq = hslider("[1]osc freq",200,1,1000,0.01) : si.smoo; fr = hslider("[2]filter freq",200,100,5000,0.01) : si.smoo; res = hslider("[3]resonance",1,1,5,0.01) : si.smoo; delay = hslider("[4]delay",1,1,65535,1) : si.smoo; fedGain = hslider("[5]feedback gain",0,0,1,0.01) : si.smoo; gain = hslider("[6]main gain",0.1,0,1,0.01) : si.smoo; };
https://raw.githubusercontent.com/michal-cab/faust-snippets/6c77964d29e7640409905a51ec61ce62e052d7cb/delOscFdbk.dsp
faust
import ("stdfaust.lib"); process = os.triangle(carFreq) : +~ (de.fdelay(65536,delay) : fi.resonlp(fr,res,gain) * fedGain) : _ * gain with { carFreq = hslider("[1]osc freq",200,1,1000,0.01) : si.smoo; fr = hslider("[2]filter freq",200,100,5000,0.01) : si.smoo; res = hslider("[3]resonance",1,1,5,0.01) : si.smoo; delay = hslider("[4]delay",1,1,65535,1) : si.smoo; fedGain = hslider("[5]feedback gain",0,0,1,0.01) : si.smoo; gain = hslider("[6]main gain",0.1,0,1,0.01) : si.smoo; };
4ac8f728fe844458ec26eb9a6a2c8b869442fb7099f5cde4778d81f8a42b5acc
polyeffects/poly_filters
moogLadder.dsp
declare name "moogLadder"; declare description "moogLadder LPF"; declare author "Loki Davison"; import("stdfaust.lib"); Q = hslider("Q",1,0.7072,25,0.01); normFreq = hslider("freq",0.5,0,1,0.001):si.smoo; process = _ : ve.moogLadder(normFreq,Q) <:_;
https://raw.githubusercontent.com/polyeffects/poly_filters/ebf8fd1cea20e5d167f0c04ded12da13bd70829f/faust/moogLadder.dsp
faust
declare name "moogLadder"; declare description "moogLadder LPF"; declare author "Loki Davison"; import("stdfaust.lib"); Q = hslider("Q",1,0.7072,25,0.01); normFreq = hslider("freq",0.5,0,1,0.001):si.smoo; process = _ : ve.moogLadder(normFreq,Q) <:_;
b3c6d48e65ff8029b789d8d26ff5fd0ac2b5694e13a4c612d04260827fc763a3
polyeffects/poly_filters
diodeLadder.dsp
declare name "diodeLadder"; declare description "faust diodeLadder"; declare author "Loki Davison"; import("stdfaust.lib"); Q = hslider("Q",1,0.7072,25,0.01); normFreq = hslider("freq",0.1,0,1,0.001):si.smoo; process = _ : ve.diodeLadder(normFreq,Q) <:_;
https://raw.githubusercontent.com/polyeffects/poly_filters/ebf8fd1cea20e5d167f0c04ded12da13bd70829f/faust/diodeLadder.dsp
faust
declare name "diodeLadder"; declare description "faust diodeLadder"; declare author "Loki Davison"; import("stdfaust.lib"); Q = hslider("Q",1,0.7072,25,0.01); normFreq = hslider("freq",0.1,0,1,0.001):si.smoo; process = _ : ve.diodeLadder(normFreq,Q) <:_;
556bfdebd0eb089e89b049b38606a4c2c97f33c902b719d2b0ad6f190ca5bfcf
monome/norns
StereoCompressor.dsp
declare name "StereoCompressor"; import("stdfaust.lib"); import("effect.lib"); import("filter.lib"); ratio = vslider("[1] ratio", 4.0, 1, 100.0, 0.1); thresh = vslider("[2] threshold [unit:dB]", -6.0, -40.0, 0, 0.5); atk = vslider("[3] attack [unit:s] [scale:log]", 0.01, 0.001, 4.0, 0.001); rel = vslider("[4] release [unit:s] [scale:log]", 0.1, 0.001, 4.0, 0.001); preGain = vslider("[5] preGain [unit:dB]", 0.0, -24, 24.0, 0.5) : db2linear; postGain = vslider("[6] postGain [unit:dB]", 0.0, -24, 24.0, 0.5) : db2linear; postGainStereo(x,y) = x*postGain, y*postGain; preGainStereo(x,y) = x*preGain, y*preGain; process = _,_ : preGainStereo : co.compressor_stereo(ratio, thresh, atk, rel) : postGainStereo : _,_;
https://raw.githubusercontent.com/monome/norns/e8ddf657830f8db99465965d45ade11e9dbbc831/crone/dsp/StereoCompressor.dsp
faust
declare name "StereoCompressor"; import("stdfaust.lib"); import("effect.lib"); import("filter.lib"); ratio = vslider("[1] ratio", 4.0, 1, 100.0, 0.1); thresh = vslider("[2] threshold [unit:dB]", -6.0, -40.0, 0, 0.5); atk = vslider("[3] attack [unit:s] [scale:log]", 0.01, 0.001, 4.0, 0.001); rel = vslider("[4] release [unit:s] [scale:log]", 0.1, 0.001, 4.0, 0.001); preGain = vslider("[5] preGain [unit:dB]", 0.0, -24, 24.0, 0.5) : db2linear; postGain = vslider("[6] postGain [unit:dB]", 0.0, -24, 24.0, 0.5) : db2linear; postGainStereo(x,y) = x*postGain, y*postGain; preGainStereo(x,y) = x*preGain, y*preGain; process = _,_ : preGainStereo : co.compressor_stereo(ratio, thresh, atk, rel) : postGainStereo : _,_;
e2ed7eda288879fcbb99dac9a3b156718f8a3eb293da8894a37d4ace9a9dc3a0
madskjeldgaard/faustquark-example
fq_nylonguitar.dsp
import("stdfaust.lib"); import("physmodels.lib"); nylonguit = pm.nylonGuitar(stringLength,pluckPosition,gain,gate) with{ f = hslider("freq",440,20,20000,0.001); gain = hslider("gain",0.8,0,1,0.01); s = hslider("sustain",0,0,1,1); pluckPosition = hslider("pluckPosition" ,0.8,0,1,0.01) : si.smoo; t = button("gate"); gate = t+s : min(1); freq = f; stringLength = freq : f2l; }; process = nylonguit;
https://raw.githubusercontent.com/madskjeldgaard/faustquark-example/7e1f191b7854a20bd4ec7eb12b44712abb79b6d0/faust/fq_nylonguitar.dsp
faust
import("stdfaust.lib"); import("physmodels.lib"); nylonguit = pm.nylonGuitar(stringLength,pluckPosition,gain,gate) with{ f = hslider("freq",440,20,20000,0.001); gain = hslider("gain",0.8,0,1,0.01); s = hslider("sustain",0,0,1,1); pluckPosition = hslider("pluckPosition" ,0.8,0,1,0.01) : si.smoo; t = button("gate"); gate = t+s : min(1); freq = f; stringLength = freq : f2l; }; process = nylonguit;
4ca5ceaa9c4766f9d3bf4f892fa64eabef226b2e137f62ed8db4f0170b4518a4
tomara-x/magi
table-seq.dsp
import("stdfaust.lib"); scaleRep(scal,octs) = par(i,octs,par(j,outputs(scal),ba.take(j+1,scal)*(i+1))); scale = scaleRep(qu.eolian, 2); list = par(i,14,par(j,8, ((j+1)+(j+1)*i)%14)); step = list : ba.selectn(outputs(list),ba.time); tabSize = outputs(list); sequence(i) = tabSize,step,int(i) : rdtable; t = ba.beat(128*4); c = ba.counter(t)%outputs(list); rat = scale : ba.selectn(outputs(scale),sequence(c)); midc = 261.626; frq = midc*rat/2; process = frq : os.osc*0.1 <: _,_; //a much worse method /* import("stdfaust.lib"); scaleRep(scal,octs) = par(i,octs,par(j,outputs(scal),ba.take(j+1,scal)*(i+1))); scale = scaleRep(qu.eolian, 2); list = par(i,14,par(j,8,rat(num(i,j)))) with { num(i,j) = ((j+1)+(j+1)*i)%14; rat(x) = scale : ba.selectn(outputs(scale),x); }; step = list : ba.selectn(outputs(list),ba.time); tabSize = outputs(list); sequence(i) = tabSize,step,int(i) : rdtable; t = ba.beat(128*4); c = ba.counter(t)%outputs(list); rat = sequence(c); midc = 261.626; frq = midc*rat/2; process = frq : os.osc*0.1 <: _,_; */
https://raw.githubusercontent.com/tomara-x/magi/bcf22a4ef23899cd8ce3bf5e08e374994907f81a/practice/table-seq.dsp
faust
a much worse method import("stdfaust.lib"); scaleRep(scal,octs) = par(i,octs,par(j,outputs(scal),ba.take(j+1,scal)*(i+1))); scale = scaleRep(qu.eolian, 2); list = par(i,14,par(j,8,rat(num(i,j)))) with { num(i,j) = ((j+1)+(j+1)*i)%14; rat(x) = scale : ba.selectn(outputs(scale),x); }; step = list : ba.selectn(outputs(list),ba.time); tabSize = outputs(list); sequence(i) = tabSize,step,int(i) : rdtable; t = ba.beat(128*4); c = ba.counter(t)%outputs(list); rat = sequence(c); midc = 261.626; frq = midc*rat/2; process = frq : os.osc*0.1 <: _,_;
import("stdfaust.lib"); scaleRep(scal,octs) = par(i,octs,par(j,outputs(scal),ba.take(j+1,scal)*(i+1))); scale = scaleRep(qu.eolian, 2); list = par(i,14,par(j,8, ((j+1)+(j+1)*i)%14)); step = list : ba.selectn(outputs(list),ba.time); tabSize = outputs(list); sequence(i) = tabSize,step,int(i) : rdtable; t = ba.beat(128*4); c = ba.counter(t)%outputs(list); rat = scale : ba.selectn(outputs(scale),sequence(c)); midc = 261.626; frq = midc*rat/2; process = frq : os.osc*0.1 <: _,_;
7ab2b87586ebfc4d51dbff929a003b9795c9e9d4ce0a630b18c96112b3275c2c
kylestew/CCRMA-Workshop
instrument.dsp
import("stdfaust.lib"); /* * BELL: Modal bell model with excitation input * strikePosition - 5 strike positions on bell * holdLength - t60 decay time */ bell = _*gainIn : fi.lowpass(3, 800) : pm.churchBellModel(12,strikePosition,holdLength,1,2.5)*0.5 with { gainIn = nentry("gainIn", 0.2, 0, 1, 0.001); strikePosition = nentry("strikePosition", 0,0,4,1); holdLength = nentry("holdLength", 40,1,400,0.1); }; /* * WIND INSTRUMENT: Clarinet * pressure * tubeLength - (in meters) used for note * mouthPosition - (0-1) */ wind = pm.fluteModel(tubeLength, mouthPosition, pressure)*0.5 with { pressure = hslider("pressure", 0, 0, 2, 0.0001); tubeLength = hslider("tubeLength", 0, 0, 2, 0.0001); mouthPosition = hslider("mouthPosition", 0.5, 0, 1, 0.0001); }; // OUTPUTS bellOut = bell; windOut = wind*0.4; process = windOut+bellOut; // testing //process = button("gate") : bell; //process = windOut;
https://raw.githubusercontent.com/kylestew/CCRMA-Workshop/346473174f3fe2d8fab0d4bd35196371e9cc7702/dsp/instrument.dsp
faust
* BELL: Modal bell model with excitation input * strikePosition - 5 strike positions on bell * holdLength - t60 decay time * WIND INSTRUMENT: Clarinet * pressure * tubeLength - (in meters) used for note * mouthPosition - (0-1) OUTPUTS testing process = button("gate") : bell; process = windOut;
import("stdfaust.lib"); bell = _*gainIn : fi.lowpass(3, 800) : pm.churchBellModel(12,strikePosition,holdLength,1,2.5)*0.5 with { gainIn = nentry("gainIn", 0.2, 0, 1, 0.001); strikePosition = nentry("strikePosition", 0,0,4,1); holdLength = nentry("holdLength", 40,1,400,0.1); }; wind = pm.fluteModel(tubeLength, mouthPosition, pressure)*0.5 with { pressure = hslider("pressure", 0, 0, 2, 0.0001); tubeLength = hslider("tubeLength", 0, 0, 2, 0.0001); mouthPosition = hslider("mouthPosition", 0.5, 0, 1, 0.0001); }; bellOut = bell; windOut = wind*0.4; process = windOut+bellOut;
b836bdfdac3433a3e6c66bcd7348ac8d6f2bdeca36adf2504c7f17f2f6be4e09
spluta/SPSynthTools
MoogVCF2.dsp
import("stdfaust.lib"); process(freq, resonance) = ve.moog_vcf_2b(resonance,freq);
https://raw.githubusercontent.com/spluta/SPSynthTools/8e643163c91316c2ee58737498ee12fd0744534d/Filters/FaustSource/MoogVCF2.dsp
faust
import("stdfaust.lib"); process(freq, resonance) = ve.moog_vcf_2b(resonance,freq);
ed18b6e39894012bc5fac75c949198055cf959dfed8e0b729e022836d32e44b3
jpecquais/faustLab
noteDetector.dsp
declare name "Note Detector"; declare author "Jean-Loup Pecquais"; declare version "1.00"; declare license "GPL3"; import("stdfaust.lib"); sigVariation = fi.conv((1,-1)); //Allows to compute de derivation of the input signal process = sigVariation : abs : *(10);
https://raw.githubusercontent.com/jpecquais/faustLab/91f3121f6b82bf05962e676e7731fadef45628b8/dsp/Synth/noteDetector.dsp
faust
Allows to compute de derivation of the input signal
declare name "Note Detector"; declare author "Jean-Loup Pecquais"; declare version "1.00"; declare license "GPL3"; import("stdfaust.lib"); process = sigVariation : abs : *(10);
5fbcc08fb98f49566f377f755b57924c39a392cb6efa95bcd2d3d1830538ea40
polyeffects/poly_filters
moogHalfLadder.dsp
declare name "moogHalfLadder"; declare description "Moog Half Ladder LPF"; declare author "Loki Davison"; import("stdfaust.lib"); Q = hslider("Q",1,0.7072,25,0.01); normFreq = hslider("freq",0.5,0,1,0.001):si.smoo; process = _ : ve.moogHalfLadder(normFreq,Q) <:_;
https://raw.githubusercontent.com/polyeffects/poly_filters/ebf8fd1cea20e5d167f0c04ded12da13bd70829f/faust/moogHalfLadder.dsp
faust
declare name "moogHalfLadder"; declare description "Moog Half Ladder LPF"; declare author "Loki Davison"; import("stdfaust.lib"); Q = hslider("Q",1,0.7072,25,0.01); normFreq = hslider("freq",0.5,0,1,0.001):si.smoo; process = _ : ve.moogHalfLadder(normFreq,Q) <:_;
75922cc41aefc57a0f58c9a302e74cba5c38a66130e982c96c702211880b5d20
michal-cab/faust-snippets
triFilter.dsp
import("stdfaust.lib"); process = osc : filter : gain; osc = os.triangle(carrier) with { carrier = hslider("[1]carrier freq",100,50,2000,0.01) : si.smoo; }; gain = * (hslider("[5]gain",0,0,1,0.01): si.smoo); filter = _ <: fi.resonbp(fr+(ratio*fr),res,gain), fi.resonbp(fr+(ratio * fr * (-1)),res,gain), fi.resonbp(fr,res,gain) :> _ with { fr = hslider("[1]filter freq",200,100,5000,0.01) : si.smoo; ratio = hslider("[4]ratio",0,0,1,0.01) : si.smoo; res = hslider("[2]resonance",1,1,8,0.01) : si.smoo; gain = 1; };
https://raw.githubusercontent.com/michal-cab/faust-snippets/6c77964d29e7640409905a51ec61ce62e052d7cb/triFilter.dsp
faust
import("stdfaust.lib"); process = osc : filter : gain; osc = os.triangle(carrier) with { carrier = hslider("[1]carrier freq",100,50,2000,0.01) : si.smoo; }; gain = * (hslider("[5]gain",0,0,1,0.01): si.smoo); filter = _ <: fi.resonbp(fr+(ratio*fr),res,gain), fi.resonbp(fr+(ratio * fr * (-1)),res,gain), fi.resonbp(fr,res,gain) :> _ with { fr = hslider("[1]filter freq",200,100,5000,0.01) : si.smoo; ratio = hslider("[4]ratio",0,0,1,0.01) : si.smoo; res = hslider("[2]resonance",1,1,8,0.01) : si.smoo; gain = 1; };
f9878fcef283dd08b1ef6112ac90970f6b70b14a63c2ed71d4a2fae28400eaba
HolyCityAudio/ESP32
basicEcho.dsp
import("stdfaust.lib"); echoTime = hslider("[7]echoTime", 0.10, 0.10, 2.5, 0.01) : si.smooth(0.99995); echoFeedback = hslider("[7]echoFeedback", 0.0, 0, 1.0, 0.01) : si.smoo; echoLPF = hslider("[7]echoLPF", 2500.0, 1000.0, 10000.0, 0.01) : si.smoo; //============================================= process = _,_ : + <: _,(( + : de.sdelay(ba.sec2samp(2.5), 1024, ba.sec2samp(echoTime)) : fi.lowpass(2,echoLPF)) ~* (echoFeedback)) * 0.5 :> _ <: _,_;
https://raw.githubusercontent.com/HolyCityAudio/ESP32/9fd8916dc158c4ed3690e4e6ba2b98014f283b80/faust/basicEcho/main/basicEcho.dsp
faust
=============================================
import("stdfaust.lib"); echoTime = hslider("[7]echoTime", 0.10, 0.10, 2.5, 0.01) : si.smooth(0.99995); echoFeedback = hslider("[7]echoFeedback", 0.0, 0, 1.0, 0.01) : si.smoo; echoLPF = hslider("[7]echoLPF", 2500.0, 1000.0, 10000.0, 0.01) : si.smoo; process = _,_ : + <: _,(( + : de.sdelay(ba.sec2samp(2.5), 1024, ba.sec2samp(echoTime)) : fi.lowpass(2,echoLPF)) ~* (echoFeedback)) * 0.5 :> _ <: _,_;
e7b5343f3a3ad4e7f85cb9c6789bf4bdf30150622960ce150ec624dc35a48f9f
T4ngkeke/SonProjet
realTest.dsp
import("stdfaust.lib"); transpose(w, x, s, sig) = de.fdelay(maxDelay,d,sig)*ma.fmin(d/x,1) + de.fdelay(maxDelay,d+w,sig)*(1-ma.fmin(d/x,1)) with { maxDelay = 1000;//2^15 i = 1 - pow(2, s/12); d = i : (+ : +(w) : fmod(_,w)) ~ _; }; pitchshifter=vgroup("Pitch Shifter",transpose(1000,10,6)); //filtre à ajouter process (x)=x:pitchshifter;
https://raw.githubusercontent.com/T4ngkeke/SonProjet/bb2071eb29623a6d4dc93b96b748635a519f90e2/realTest.dsp
faust
2^15 filtre à ajouter
import("stdfaust.lib"); transpose(w, x, s, sig) = de.fdelay(maxDelay,d,sig)*ma.fmin(d/x,1) + de.fdelay(maxDelay,d+w,sig)*(1-ma.fmin(d/x,1)) with { i = 1 - pow(2, s/12); d = i : (+ : +(w) : fmod(_,w)) ~ _; }; pitchshifter=vgroup("Pitch Shifter",transpose(1000,10,6)); process (x)=x:pitchshifter;
d74e8f089afa6cc667c364d422d5518ba46e1767c4612812903657834c7515d0
kretopi/pdToFaust
random.dsp
declare name "Random"; declare author "Piotr Goj"; import("stdfaust.lib"); bang = button("bang") : ba.impulsify; // bang random(number, bang) = (((no.noise + 1) / 2) * number) : int : ba.sAndH(bang); // generate number from 0 to number value after pressing bang button process = random(30, bang) + 50 : ba.midikey2hz : os.osc <: _, _; // connections between objects, <: _, _ (stereo)
https://raw.githubusercontent.com/kretopi/pdToFaust/d00442bd57309a0c20d87a22a6977290ca660a8e/examples/random/random.dsp
faust
bang generate number from 0 to number value after pressing bang button connections between objects, <: _, _ (stereo)
declare name "Random"; declare author "Piotr Goj"; import("stdfaust.lib");
22c01b12e72a7f605b8715f331b62faa9e068b1381b2faa8a2f9ac2acb9604da
t-scale/GrainFMSynth
addfm.dsp
import("stdfaust.lib"); harmFm(cFreq,hRatio,idx) = os.osc(cFreq + os.osc(cFreq * hRatio) * idx * hRatio); fm = hgroup("[0]FM", harmFm(carFreq, harmRatio, index)) with{ harmRatio = nentry("[0]harmonic_ratio",1,0,64,0.01) : si.smoo; index = nentry("mod_index", 100, 0, 8800, 0.01) : si.smoo; carFreq = nentry("freq", 440, 0, 8800, 0.01) : si.smoo; }; envelope = hgroup("[1]envelope", en.adsr(attack,decay,sustain,release,gate) * gain * 0.3) with{ attack = nentry("[0]attack", 50,1,1000,1) * 0.001 : si.smoo; decay = nentry("[1]decay", 50,1,1000,1) * 0.001 : si.smoo; sustain = nentry("[2]sustain", 0.8,0.01,1,0.01) : si.smoo; release = nentry("[3]release", 750,1,1000,1) * 0.001; gain = nentry("[4]gain",1,0,1,0.01) : si.smoo; gate = button("[5]gate") : si.smoo; }; process = fm * envelope <: _;
https://raw.githubusercontent.com/t-scale/GrainFMSynth/ffe1b728bed83c9c331204d286a5ea9189a42c8f/dsp-faust/addfm.dsp
faust
import("stdfaust.lib"); harmFm(cFreq,hRatio,idx) = os.osc(cFreq + os.osc(cFreq * hRatio) * idx * hRatio); fm = hgroup("[0]FM", harmFm(carFreq, harmRatio, index)) with{ harmRatio = nentry("[0]harmonic_ratio",1,0,64,0.01) : si.smoo; index = nentry("mod_index", 100, 0, 8800, 0.01) : si.smoo; carFreq = nentry("freq", 440, 0, 8800, 0.01) : si.smoo; }; envelope = hgroup("[1]envelope", en.adsr(attack,decay,sustain,release,gate) * gain * 0.3) with{ attack = nentry("[0]attack", 50,1,1000,1) * 0.001 : si.smoo; decay = nentry("[1]decay", 50,1,1000,1) * 0.001 : si.smoo; sustain = nentry("[2]sustain", 0.8,0.01,1,0.01) : si.smoo; release = nentry("[3]release", 750,1,1000,1) * 0.001; gain = nentry("[4]gain",1,0,1,0.01) : si.smoo; gate = button("[5]gate") : si.smoo; }; process = fm * envelope <: _;
b062fbe07f19049601938f6d46e4b14b76e55faa5bc5b05223b139e551eab01a
bgaster/aa_examples
gain.dsp
declare name "volume"; declare version "1.0"; declare author "Grame"; declare license "BSD"; declare copyright "(c)GRAME 2006"; //----------------------------------------------- // Volume control in dB //----------------------------------------------- import("stdfaust.lib"); gain = vslider("gain_control", 0, -70, +4, 0.1) : ba.db2linear : si.smoo; process = *(gain);
https://raw.githubusercontent.com/bgaster/aa_examples/98d70668d6784b426726366148a74109b682ec4f/gain/dsp/gain.dsp
faust
----------------------------------------------- Volume control in dB -----------------------------------------------
declare name "volume"; declare version "1.0"; declare author "Grame"; declare license "BSD"; declare copyright "(c)GRAME 2006"; import("stdfaust.lib"); gain = vslider("gain_control", 0, -70, +4, 0.1) : ba.db2linear : si.smoo; process = *(gain);
b51f080a1595502ec1b61404bd6873e3177b29a260a844dcab052dd667de1bfb
ljwall/er-301-units
SDelay.dsp
import("stdfaust.lib"); // Name the ins and outs of the `process` function for use in the er-301 object declare er301_in1 "Length"; declare er301_in2 "In"; declare er301_out1 "Out"; // 10 of these is 25% without -vec -vs 4 process = de.sdelay(1000, 8);
https://raw.githubusercontent.com/ljwall/er-301-units/2d23ab3aa564f50b3f044e76f2f20067ff67d12c/faust-poc/dsp/SDelay.dsp
faust
Name the ins and outs of the `process` function for use in the er-301 object 10 of these is 25% without -vec -vs 4
import("stdfaust.lib"); declare er301_in1 "Length"; declare er301_in2 "In"; declare er301_out1 "Out"; process = de.sdelay(1000, 8);
3a262aeb2bce7b0b4c08c7b1fe0800671c1b192a5aa23661724a6cb9c169b3be
neidhub/smallest-synth
faustSynth.dsp
import("stdfaust.lib"); declare options "[midi:on]"; freq = nentry("freq", 400, 0, 20000, 0.1); gain = nentry("gain", 0.5, 0, 1, 0.01); gate = en.adsr(0,0.1,0.8,0.4, button("gate")) ; //yes we have to do this every time //faust UI mapping the midi 0..127 to the range of slider doesnt work for us //so we do it manually // make it log (optional) cutoff = hslider("cc1[midi:ctrl 1]", 127,0,127,1) /255 : ba.lin2LogGain /2 : * (maxout-minout) + minout : si.smoo with{ minout = 1; maxout = 22000; }; // Teensy Oscillator // lowering the resolution of the sine oscillators' lookup table // in order to make computation easier on the Teensy MCU and memory // from https://github.com/makingsoundmachines/Faust-on-Teensy/blob/main/AdditiveSynth_Faust/faustAdditive.dsp // oscTeensy(f) = rdtable(tablesize, os.sinwaveform(tablesize), int(os.phasor(tablesize,f))) // with{ // tablesize = 1 << 13; // instead of 1 << 16 // }; //process = os.triangle(freq)*gate : fi.lowpass(1, cutoff); process = os.triangle(freq)*gate*gain : fi.resonlp(cutoff,1,0.7); //process = cutoff;
https://raw.githubusercontent.com/neidhub/smallest-synth/83f43794d11b5ad32489c5c9a18b78457ed7cb5a/playground/sawfilter/generic/faustSynth.dsp
faust
yes we have to do this every time faust UI mapping the midi 0..127 to the range of slider doesnt work for us so we do it manually make it log (optional) Teensy Oscillator lowering the resolution of the sine oscillators' lookup table in order to make computation easier on the Teensy MCU and memory from https://github.com/makingsoundmachines/Faust-on-Teensy/blob/main/AdditiveSynth_Faust/faustAdditive.dsp oscTeensy(f) = rdtable(tablesize, os.sinwaveform(tablesize), int(os.phasor(tablesize,f))) with{ tablesize = 1 << 13; // instead of 1 << 16 }; process = os.triangle(freq)*gate : fi.lowpass(1, cutoff); process = cutoff;
import("stdfaust.lib"); declare options "[midi:on]"; freq = nentry("freq", 400, 0, 20000, 0.1); gain = nentry("gain", 0.5, 0, 1, 0.01); gate = en.adsr(0,0.1,0.8,0.4, button("gate")) ; cutoff = hslider("cc1[midi:ctrl 1]", 127,0,127,1) /255 : ba.lin2LogGain /2 : * (maxout-minout) + minout : si.smoo with{ minout = 1; maxout = 22000; }; process = os.triangle(freq)*gate*gain : fi.resonlp(cutoff,1,0.7);
0e26f46ac0700b313e826c97a2ef85f9dc1a8ca87308970d3254c8141ad7dd15
funkyfourier/spitback
fausthighshelf.dsp
import("stdfaust.lib"); freq = hslider("freq",100,50,5000,1); gain = hslider("gain",0,-480,480,0.1); process = _ : fi.highshelf(3, gain, freq) : _;
https://raw.githubusercontent.com/funkyfourier/spitback/c3b1831e2bd1ac9272652309d4fb3d2847f0a67b/externals/src/fausthighshelf/fausthighshelf.dsp
faust
import("stdfaust.lib"); freq = hslider("freq",100,50,5000,1); gain = hslider("gain",0,-480,480,0.1); process = _ : fi.highshelf(3, gain, freq) : _;
f28b94af96d8d663922c60f82b1c5b7e93f556ef68afabc494acdbf8139b6664
funkyfourier/spitback
faustlowshelf.dsp
import("stdfaust.lib"); freq = hslider("freq",100,50,5000,1); gain = hslider("gain",0,-48,48,0.1); process = _ : fi.lowshelf(3, gain, freq) : _;
https://raw.githubusercontent.com/funkyfourier/spitback/c3b1831e2bd1ac9272652309d4fb3d2847f0a67b/externals/src/faustlowshelf/faustlowshelf.dsp
faust
import("stdfaust.lib"); freq = hslider("freq",100,50,5000,1); gain = hslider("gain",0,-48,48,0.1); process = _ : fi.lowshelf(3, gain, freq) : _;
dd3ace9df61f4cc0da353e2991b2a213cd92e8ff2565dd639f3c92eb70bd0f83
leoauri/karplus-keys
karpluskeys.dsp
declare name "Karplus Keys"; declare options "[midi:on]"; declare options "[nvoices:32]"; import("stdfaust.lib"); import("delays.lib"); import("maths.lib"); import("filters.lib"); import("envelopes.lib"); lowest_delay = ma.SR / 27.5; freq = vslider("freq[style:knob]", 27.5, 27.5, 4186.01, 0.01); gain = vslider("gain[style:knob]", 0, 0, 1, 0.01); gate = button("gate"); delay_samples = ma.SR / freq; onset(x) = (x-x') > 0; decay(n,x) = x - (x>0)/n; release(n) = + ~ decay(n); hold(n) = onset : release(n) : >(0.0); env = en.asr(hslider("attack[style:knob]", 0, 0, 1, 0.01), 1, hslider("release[style:knob]", 0, 0, 6, 0.01), gate); ring = (+ : de.delay(lowest_delay, delay_samples) * (env > 0)) ~ (fi.fir((0.5,0.5))); process = _ : *(gate : hold(delay_samples)) : ring * env * gain <: _,_;
https://raw.githubusercontent.com/leoauri/karplus-keys/a8f68a3442a63d413c27469d4e52970228f1848b/karpluskeys.dsp
faust
declare name "Karplus Keys"; declare options "[midi:on]"; declare options "[nvoices:32]"; import("stdfaust.lib"); import("delays.lib"); import("maths.lib"); import("filters.lib"); import("envelopes.lib"); lowest_delay = ma.SR / 27.5; freq = vslider("freq[style:knob]", 27.5, 27.5, 4186.01, 0.01); gain = vslider("gain[style:knob]", 0, 0, 1, 0.01); gate = button("gate"); delay_samples = ma.SR / freq; onset(x) = (x-x') > 0; decay(n,x) = x - (x>0)/n; release(n) = + ~ decay(n); hold(n) = onset : release(n) : >(0.0); env = en.asr(hslider("attack[style:knob]", 0, 0, 1, 0.01), 1, hslider("release[style:knob]", 0, 0, 6, 0.01), gate); ring = (+ : de.delay(lowest_delay, delay_samples) * (env > 0)) ~ (fi.fir((0.5,0.5))); process = _ : *(gate : hold(delay_samples)) : ring * env * gain <: _,_;
7771a539983d370c0e406f810f4ca9e80dfb8ba29a61611e96ebb456b12b8628
monome/norns
ZitaReverb.dsp
declare name "ZitaReverb"; import("stdfaust.lib"); process = re.zita_rev1_stereo(pre_del, lf_x, hf_damp, low_rt60, mid_rt60, fsmax) with{ fsmax = 48000.0; pre_del = vslider("[1] pre_del [unit:ms] [tooltip: reverb pre-delay ]", 20, 0, 200, 1); lf_x = vslider("[2] lf_fc [unit:Hz] [scale:log] [tooltip: low band cutoff frequency ] ", 200, 30, 1200, 1); low_rt60 = vslider("[3] low_rt60 [unit:s] [tooltip: -60db decay time for low band ]", 1, 0.1, 3, 0.1); mid_rt60 = vslider("[4] mid_rt60 [unit:s] [tooltip: -60db decay time for middle band ]", 1, 0.1, 3, 0.1); hf_damp = vslider("[5] hf_damp [unit:Hz] [tooltip: damping frequency (decay time is 1/2 mid) ] [scale:log]", 6000, 1200, 0.49*fsmax, 1); };
https://raw.githubusercontent.com/monome/norns/e8ddf657830f8db99465965d45ade11e9dbbc831/crone/dsp/ZitaReverb.dsp
faust
declare name "ZitaReverb"; import("stdfaust.lib"); process = re.zita_rev1_stereo(pre_del, lf_x, hf_damp, low_rt60, mid_rt60, fsmax) with{ fsmax = 48000.0; pre_del = vslider("[1] pre_del [unit:ms] [tooltip: reverb pre-delay ]", 20, 0, 200, 1); lf_x = vslider("[2] lf_fc [unit:Hz] [scale:log] [tooltip: low band cutoff frequency ] ", 200, 30, 1200, 1); low_rt60 = vslider("[3] low_rt60 [unit:s] [tooltip: -60db decay time for low band ]", 1, 0.1, 3, 0.1); mid_rt60 = vslider("[4] mid_rt60 [unit:s] [tooltip: -60db decay time for middle band ]", 1, 0.1, 3, 0.1); hf_damp = vslider("[5] hf_damp [unit:Hz] [tooltip: damping frequency (decay time is 1/2 mid) ] [scale:log]", 6000, 1200, 0.49*fsmax, 1); };
75128eb161339b88a54e12eb1d30fc8525b753144263c0ea19f3e93889859f04
noqcks/generated
lowCut.dsp
// WARNING: This a "legacy example based on a deprecated library". Check filters.lib // for more accurate examples of filter functions declare name "lowcut"; declare version "1.0"; declare author "Grame"; declare license "BSD"; declare copyright "(c)GRAME 2006"; //------------------------------------------------------------------ // DAFX, Digital Audio Effects (Wiley ed.) // chapter 2 : filters // section 2.3 : Equalizers // page 53 : second order shelving filter design //------------------------------------------------------------------ import("stdfaust.lib"); //------------------- low-frequency shelving cut (table 2.3) -------------------- V0(g) = pow(10,g/-20.0); K(fc) = tan(ma.PI*fc/ma.SR); squ(x) = x*x; denom(fc,g) = 1 + sqrt(2*V0(g))*K(fc) + V0(g)*squ(K(fc)); lfcut(fc, g) = fi.TF2((1 + sqrt(2)*K(fc) + squ(K(fc))) / denom(fc,g), 2 * (squ(K(fc)) - 1) / denom(fc,g), (1 - sqrt(2)*K(fc) + squ(K(fc))) / denom(fc,g), 2 * (V0(g)*squ(K(fc)) - 1) / denom(fc,g), (1 - sqrt(2*V0(g))*K(fc) + V0(g)*squ(K(fc))) / denom(fc,g)); //------------------------------ User Interface ----------------------------------- freq = hslider("freq [unit:Hz][style:knob]", 100, 20, 5000, 1); att = hslider("attenuation [unit:dB][style:knob]", 0, -96, 10, 0.1); //----------------------------------- Process ------------------------------------- process = vgroup("low-freq shelving cut", lfcut(freq,att));
https://raw.githubusercontent.com/noqcks/generated/ac22f46042217caede3b482292a3460d2ad0c062/samples/Faust/lowCut.dsp
faust
WARNING: This a "legacy example based on a deprecated library". Check filters.lib for more accurate examples of filter functions ------------------------------------------------------------------ DAFX, Digital Audio Effects (Wiley ed.) chapter 2 : filters section 2.3 : Equalizers page 53 : second order shelving filter design ------------------------------------------------------------------ ------------------- low-frequency shelving cut (table 2.3) -------------------- ------------------------------ User Interface ----------------------------------- ----------------------------------- Process -------------------------------------
declare name "lowcut"; declare version "1.0"; declare author "Grame"; declare license "BSD"; declare copyright "(c)GRAME 2006"; import("stdfaust.lib"); V0(g) = pow(10,g/-20.0); K(fc) = tan(ma.PI*fc/ma.SR); squ(x) = x*x; denom(fc,g) = 1 + sqrt(2*V0(g))*K(fc) + V0(g)*squ(K(fc)); lfcut(fc, g) = fi.TF2((1 + sqrt(2)*K(fc) + squ(K(fc))) / denom(fc,g), 2 * (squ(K(fc)) - 1) / denom(fc,g), (1 - sqrt(2)*K(fc) + squ(K(fc))) / denom(fc,g), 2 * (V0(g)*squ(K(fc)) - 1) / denom(fc,g), (1 - sqrt(2*V0(g))*K(fc) + V0(g)*squ(K(fc))) / denom(fc,g)); freq = hslider("freq [unit:Hz][style:knob]", 100, 20, 5000, 1); att = hslider("attenuation [unit:dB][style:knob]", 0, -96, 10, 0.1); process = vgroup("low-freq shelving cut", lfcut(freq,att));
b3818be8c071a589775fb0cec34311388a85c482471109ca82939d96f5fb0205
polyeffects/poly_filters
oberheim.dsp
declare name "oberheimBSF"; declare description "Oberheim generic multi-outputs Filter"; declare author "Eric Tarr, GRAME"; import("stdfaust.lib"); Q = hslider("Q",1,0.5,10,0.01); normFreq = hslider("freq",0.5,0,1,0.001):si.smoo; // The BSF, BPF, HPF and LPF outputs are produced process = _ : ve.oberheim(normFreq,Q);
https://raw.githubusercontent.com/polyeffects/poly_filters/ebf8fd1cea20e5d167f0c04ded12da13bd70829f/faust/oberheim.dsp
faust
The BSF, BPF, HPF and LPF outputs are produced
declare name "oberheimBSF"; declare description "Oberheim generic multi-outputs Filter"; declare author "Eric Tarr, GRAME"; import("stdfaust.lib"); Q = hslider("Q",1,0.5,10,0.01); normFreq = hslider("freq",0.5,0,1,0.001):si.smoo; process = _ : ve.oberheim(normFreq,Q);
3d18b0543beaba4f90729f9026c584761887a658575d39d3605a83f086cd98ff
grz0zrg/fas
pulsewave.dsp
// example of a stereo pulse wave with independant duty cycle L/R control import("stdfaust.lib"); freq = nentry("fs_freq",0,0,44100,0.01); // blue channel b = nentry("fs_b",0,0,1,0.01) : si.smoo; // alpha channel a = nentry("fs_a",0,0,1,0.01) : si.smoo; process = os.pulsetrain(freq, b),os.pulsetrain(freq, a);
https://raw.githubusercontent.com/grz0zrg/fas/31983056ca520f03c7b5bc430b0ba9d561587a20/bin/faust/generators/pulsewave.dsp
faust
example of a stereo pulse wave with independant duty cycle L/R control blue channel alpha channel
import("stdfaust.lib"); freq = nentry("fs_freq",0,0,44100,0.01); b = nentry("fs_b",0,0,1,0.01) : si.smoo; a = nentry("fs_a",0,0,1,0.01) : si.smoo; process = os.pulsetrain(freq, b),os.pulsetrain(freq, a);
15b190642910184f90dc6bb043b796d1906c5d92b9ac54c57977bc35111324d7
LSSN/2020-01-25-dsp-4a-annapaolabusio
asdad.dsp
import("stdfaust.lib"); gain= vslider("gain", 0, 0, 1, 0.1 ); process = no.noise : fi.lowpass (4,6000) : fi.fi.highpass (4,6000); // i numeri sono il valore iniziale, valore minimo valore minimo valore massimo e step incrementale (la precisione di un passaggio da un valore al'altro) il valore iniziale può essere un numero qualsiasi tra il valore minimo e il valore massimo // lo spectroscopio ci mostra il contenuto del suon nel dominio della frequenza. sull'asse delle x la frequenza, in quello delle y l'ampiezza. l'oscilloscopio ci mostra il contenuto del suono nel dominio del tempo. sull'a e delle x abbiamo il tempo, in quello delle y le ampiezze // lowpass
https://raw.githubusercontent.com/LSSN/2020-01-25-dsp-4a-annapaolabusio/d1381db691b6619fa639f7e73642dc3c6d0a28f3/asdad.dsp
faust
i numeri sono il valore iniziale, valore minimo valore minimo valore massimo e step incrementale (la precisione di un passaggio da un valore al'altro) il valore iniziale può essere un numero qualsiasi tra il valore minimo e il valore massimo lo spectroscopio ci mostra il contenuto del suon nel dominio della frequenza. sull'asse delle x la frequenza, in quello delle y l'ampiezza. l'oscilloscopio ci mostra il contenuto del suono nel dominio del tempo. sull'a e delle x abbiamo il tempo, in quello delle y le ampiezze lowpass
import("stdfaust.lib"); gain= vslider("gain", 0, 0, 1, 0.1 ); process = no.noise : fi.lowpass (4,6000) : fi.fi.highpass (4,6000);
57798984b0f46f5e663777f8db0f97f668d004fb9b4f942e0369df474303d085
chernenko-victor/csound_edu
rnd_uniform_shift.dsp
import("basics.lib"); import("stdfaust.lib"); import("noises.lib"); min_val = hslider("min_val",0.5,0,100,0.01); max_val = hslider("max_val",2,0,100,0.01); ACoeff = (max_val-min_val)/2; BCoeff = (min_val+max_val)/2; process = ACoeff*no.noise+BCoeff : _;
https://raw.githubusercontent.com/chernenko-victor/csound_edu/164092906ca1eb4c5b083937badd523bcdf7c9ca/lsn7/rnd_uniform_shift.dsp
faust
import("basics.lib"); import("stdfaust.lib"); import("noises.lib"); min_val = hslider("min_val",0.5,0,100,0.01); max_val = hslider("max_val",2,0,100,0.01); ACoeff = (max_val-min_val)/2; BCoeff = (min_val+max_val)/2; process = ACoeff*no.noise+BCoeff : _;
894eaf240e2b9ec888da390669adb8f4af03e85259265e708740ba8c5a07a381
jgelfman/Dataflow-Based-FPGA-Program-Synthesis-Capstone
plus1.dsp
import("stdfaust.lib"); process = +(1);
https://raw.githubusercontent.com/jgelfman/Dataflow-Based-FPGA-Program-Synthesis-Capstone/260340949c8b0f81468825bf7ca68b9060d220a3/Dataflow_Graphs/plus1/plus1.dsp
faust
import("stdfaust.lib"); process = +(1);
598f24d01080a633c144db7b540d5c1613fa7f7f7250a00bf532d444c7b0b368
LSSN/2019-05-25-campionamento-camillacongiu
divide.dsp
import("stdfaust.lib"); process= _ <: _/1,_/2,_/3,_/4,_/5,_/6,_/7,_/8,_/9,_/10,_/11,_/12,_/13,_/14,_/15,_/16; // gli operatori di segnale gestiscono il flusso dei segnali in entrata e in uscita // divide (<:) la copia di caratteri crea l'operatore di segnale divide // divide replica il segnale in entrata N volte dove N è un numero di segnali definito dal programmatore // scrivi un programma che abbia una sola entrata replicata in sedici uscite // ognuna delle quali avente ampiezza 1/n dove n è il numero del relativo canale
https://raw.githubusercontent.com/LSSN/2019-05-25-campionamento-camillacongiu/77e86369a425e8c51bf9010ebfd88711173da1a8/divide.dsp
faust
gli operatori di segnale gestiscono il flusso dei segnali in entrata e in uscita divide (<:) la copia di caratteri crea l'operatore di segnale divide divide replica il segnale in entrata N volte dove N è un numero di segnali definito dal programmatore scrivi un programma che abbia una sola entrata replicata in sedici uscite ognuna delle quali avente ampiezza 1/n dove n è il numero del relativo canale
import("stdfaust.lib"); process= _ <: _/1,_/2,_/3,_/4,_/5,_/6,_/7,_/8,_/9,_/10,_/11,_/12,_/13,_/14,_/15,_/16;
17796631b484e5e0e641dcbacda3c5d11cdec4dea45bed6a84730db98e79707e
rcadiz/web-audiographs
instrument.dsp
// Simple Organ import("stdfaust.lib"); // Data series parameters freq1 = hslider("freq1[unit:Hz]", 0, 100, 800, 1); // series1 frequency freq2 = hslider("freq2[unit:Hz]", 0, 100, 800, 1); // series2 frequency // Timbre parameters //gate = button("gate"); volume = hslider("volume", 1, 0, 1, 0.1); reverb = hslider("reverb", 1, 0, 1, 0.1); brightness = hslider("brightness", 1, 0, 1, 0.1); is_discrete = hslider("is_discrete", 0, 0, 1, 1); envelop_duration = hslider("envelop_duration", 1, 0, 1000, 1); // type_1 = hslider("type_1", 1, 1, 3, 1); type_2 = hslider("type_2", 1, 1, 3, 1); // Frequency dependent variables gate(0) = 0; gate(f) = 1; // Envelop parameters (based on envelop_duration) attack = (envelop_duration * 0.01) / 1000; decay = (envelop_duration * 0.3) / 1000; sustain = (envelop_duration * 0.5) / 1000; release = (envelop_duration * 0.2) / 1000; //TODO: change this to a formula on freqs gain(f) = 0.5; process = play_values(freq1,freq2); // Handle mono vs. stereo according to selected frequencies play_values(0,f2) = voice(f2); // mono play_values(f1,0) = voice(f1); // mono play_values(f1,f2) = voice(f1) , voice(f2); //stereo: f1 = left, f2 = rigth // Implementation (this version ignores timbre parameters) phasor(f) = f/ma.SR : (+,1.0:fmod) ~ _ ; osc(f) = phasor(f) * 6.28318530718 : sin; timbre(freq)= osc(freq) + 0.1*osc(2.0*freq) + 0.25*osc(3.0*freq) + (volume * brightness * reverb * type_1 * type_2); envelop_cont(freq) = gain(freq) : smooth(0.9995) with { smooth(c) = * (1-c) : + ~ * (c) ; } ; envelop_disc(freq) = en.adsr(attack, decay, sustain, release, gate(freq)); envelop(freq) = envelop_disc(freq) * is_discrete + envelop_cont(freq) * (is_discrete - 1); voice(freq) = envelop(freq) * timbre(freq);
https://raw.githubusercontent.com/rcadiz/web-audiographs/25d6d0eebdc1fc343bb8184352c4cff9ea52ceca/instrument.dsp
faust
Simple Organ Data series parameters series1 frequency series2 frequency Timbre parameters gate = button("gate"); Frequency dependent variables Envelop parameters (based on envelop_duration) TODO: change this to a formula on freqs Handle mono vs. stereo according to selected frequencies mono mono stereo: f1 = left, f2 = rigth Implementation (this version ignores timbre parameters)
import("stdfaust.lib"); volume = hslider("volume", 1, 0, 1, 0.1); reverb = hslider("reverb", 1, 0, 1, 0.1); brightness = hslider("brightness", 1, 0, 1, 0.1); is_discrete = hslider("is_discrete", 0, 0, 1, 1); type_1 = hslider("type_1", 1, 1, 3, 1); type_2 = hslider("type_2", 1, 1, 3, 1); gate(0) = 0; gate(f) = 1; attack = (envelop_duration * 0.01) / 1000; decay = (envelop_duration * 0.3) / 1000; sustain = (envelop_duration * 0.5) / 1000; release = (envelop_duration * 0.2) / 1000; gain(f) = 0.5; process = play_values(freq1,freq2); phasor(f) = f/ma.SR : (+,1.0:fmod) ~ _ ; osc(f) = phasor(f) * 6.28318530718 : sin; timbre(freq)= osc(freq) + 0.1*osc(2.0*freq) + 0.25*osc(3.0*freq) + (volume * brightness * reverb * type_1 * type_2); envelop_cont(freq) = gain(freq) : smooth(0.9995) with { smooth(c) = * (1-c) : + ~ * (c) ; } ; envelop_disc(freq) = en.adsr(attack, decay, sustain, release, gate(freq)); envelop(freq) = envelop_disc(freq) * is_discrete + envelop_cont(freq) * (is_discrete - 1); voice(freq) = envelop(freq) * timbre(freq);
fba022b2322ec3319beda83cd370f0375be102dbf9395cf52588114fdc371e76
kretopi/pdToFaust
counter.dsp
declare name "counter"; declare author "Piotr Goj"; import("stdfaust.lib"); // button bang = button("bang") : ba.impulsify; // list midi notes notes = (60, 62, 64, 65, 67, 69, 71, 72); // count from 0 to 7 counter = _~+(bang) : ma.modulo(_, 8); // take from list playNotes = ba.listInterp(notes, counter); // convert midi to frequency and play sinwave process = playNotes : ba.midikey2hz : os.osc <: _, _;
https://raw.githubusercontent.com/kretopi/pdToFaust/5cd56818f1dce9383362a6f5057dbbe818e28c74/examples/counter/counter.dsp
faust
button list midi notes count from 0 to 7 take from list convert midi to frequency and play sinwave
declare name "counter"; declare author "Piotr Goj"; import("stdfaust.lib"); bang = button("bang") : ba.impulsify; notes = (60, 62, 64, 65, 67, 69, 71, 72); counter = _~+(bang) : ma.modulo(_, 8); playNotes = ba.listInterp(notes, counter); process = playNotes : ba.midikey2hz : os.osc <: _, _;
3bcea5d4f156ac5da83bdb0ff3052f197bf002e87848dcf8527570d121fd0be3
JaoRamos/teensy-templates
SierraTeensy.dsp
import("stdfaust.lib"); frec_in = hgroup("MIDI", nentry("freq", 220, 20, 5000, 0.001)); gain_in = hgroup("MIDI", nentry("gain", 0.0, 0.0, 1.0, 0.001)); gate_in = hgroup("MIDI", nentry("gate", 0.0, 0.0, 1.0, 1.0)); envolvente = en.adsr(0.05, 0.01, 0.8, 0.025, gate_in); sierra(f) = os.sawtooth(f)*gain_in*envolvente; sinte = sierra(frec_in), sierra(frec_in*1.005); process = sinte;
https://raw.githubusercontent.com/JaoRamos/teensy-templates/e49110bb181d573e5e309c356a45b821101bffdc/midi_faust/SierraTeensy.dsp
faust
import("stdfaust.lib"); frec_in = hgroup("MIDI", nentry("freq", 220, 20, 5000, 0.001)); gain_in = hgroup("MIDI", nentry("gain", 0.0, 0.0, 1.0, 0.001)); gate_in = hgroup("MIDI", nentry("gate", 0.0, 0.0, 1.0, 1.0)); envolvente = en.adsr(0.05, 0.01, 0.8, 0.025, gate_in); sierra(f) = os.sawtooth(f)*gain_in*envolvente; sinte = sierra(frec_in), sierra(frec_in*1.005); process = sinte;
230a02baff9fea51e2a454d961ec29675092b2559f26141208028bf750e9d6a7
angelamurtas/Programmazione-
Lezione1.dsp
import("stdfaust.lib"); process = + //ilcommento è una parte di testo che viene ingnorata dal compilatore // il compilatore è un programma che legge il codice scritto per ricavarne un ogetto
https://raw.githubusercontent.com/angelamurtas/Programmazione-/bf8cf329460acf7334c7c4c11953ddcdf6d7e612/Lezione1.dsp
faust
ilcommento è una parte di testo che viene ingnorata dal compilatore il compilatore è un programma che legge il codice scritto per ricavarne un ogetto
import("stdfaust.lib"); process = +
9aebf2548ad6d5390ea43be00c4afe0c0e73f7403b50067ba08fe789576fb0eb
eh2k/squares-and-circles
rev_dattorro.dsp
//faust ./rev_dattorro.dsp -cn rev_dattorro > ./rev_dattorro.hxx import("stdfaust.lib"); dw = hslider("[0]D/W",0.5,0,1,0.0001):si.smoo; decay = hslider("[1]Decay",0.5,0,1,0.0001):si.smoo; damping = hslider("[2]Damp",0.5,0,1,0.0001):si.smoo; bw = hslider("[3]BW",0.5,0,1,0.0001):si.smoo; diffd= hslider("[4]DDiff",0.5,0.01,0.99,0.0001):si.smoo; diffi = hslider("[5]IDiff",0.5,0.01,0.99,0.0001):si.smoo; pre_delay = 24; process = _,_ <: (_,_ <:re.dattorro_rev(pre_delay, bw, diffi, diffi, decay, diffd, diffd, damping) : (*(dw),*(dw))), *(1-dw), *(1-dw) :> _,_;
https://raw.githubusercontent.com/eh2k/squares-and-circles/15970d811ef4a253ded0e55c36b08a67fd821a43/lib/faust/rev_dattorro.dsp
faust
faust ./rev_dattorro.dsp -cn rev_dattorro > ./rev_dattorro.hxx
import("stdfaust.lib"); dw = hslider("[0]D/W",0.5,0,1,0.0001):si.smoo; decay = hslider("[1]Decay",0.5,0,1,0.0001):si.smoo; damping = hslider("[2]Damp",0.5,0,1,0.0001):si.smoo; bw = hslider("[3]BW",0.5,0,1,0.0001):si.smoo; diffd= hslider("[4]DDiff",0.5,0.01,0.99,0.0001):si.smoo; diffi = hslider("[5]IDiff",0.5,0.01,0.99,0.0001):si.smoo; pre_delay = 24; process = _,_ <: (_,_ <:re.dattorro_rev(pre_delay, bw, diffi, diffi, decay, diffd, diffd, damping) : (*(dw),*(dw))), *(1-dw), *(1-dw) :> _,_;
a47443892440b89d28fbcd16e9749122710e2d408c2366a2549f483617d1efa6
grz0zrg/fas
oberheim_lpf.dsp
declare name "oberheimLPF"; declare description "Demonstration of the Oberheim Low-Pass Filter"; declare author "Eric Tarr"; import("stdfaust.lib"); Q = nentry("fs_p0",1,0.5,10,0.01); normFreq = nentry("fs_p1",0.5,0,1,0.001) : si.smoo; process = ve.oberheimLPF(normFreq,Q),ve.oberheimLPF(normFreq,Q);
https://raw.githubusercontent.com/grz0zrg/fas/31983056ca520f03c7b5bc430b0ba9d561587a20/bin/faust/effects/oberheim_lpf.dsp
faust
declare name "oberheimLPF"; declare description "Demonstration of the Oberheim Low-Pass Filter"; declare author "Eric Tarr"; import("stdfaust.lib"); Q = nentry("fs_p0",1,0.5,10,0.01); normFreq = nentry("fs_p1",0.5,0,1,0.001) : si.smoo; process = ve.oberheimLPF(normFreq,Q),ve.oberheimLPF(normFreq,Q);
f42e0f593c319a48549913dfbd63075b42b35232033e69233bb2652d43cbf736
nickgang/AFDN-reverb
hoaRotate.dsp
declare name "rotateFirst"; declare version "0.0"; declare author "Nick Gang"; declare description "A first order ambisonic rotation matrix"; import("stdfaust.lib"); import("AFDN.lib"); process = hoaRotate(3,ma.PI/2);
https://raw.githubusercontent.com/nickgang/AFDN-reverb/48224a4de72617adef0c36ceec0814af611f2582/Source/Faust/hoaRotate.dsp
faust
declare name "rotateFirst"; declare version "0.0"; declare author "Nick Gang"; declare description "A first order ambisonic rotation matrix"; import("stdfaust.lib"); import("AFDN.lib"); process = hoaRotate(3,ma.PI/2);
a216d6afe878a4d8769bd6946ae2c7a2c55bd822bdc453e8862a460ecb80cc2e
rasmusnuko/FaustCode
onepole.dsp
import("stdfaust.lib"); one_poll(a1) = _ * (1-a1) : A~B with{ A = +; B = _ * a1; }; process = no.noise : one_poll(0.999);
https://raw.githubusercontent.com/rasmusnuko/FaustCode/f58d7a5d35d28a644e73903ab530fcdce314dfd6/onepole.dsp
faust
import("stdfaust.lib"); one_poll(a1) = _ * (1-a1) : A~B with{ A = +; B = _ * a1; }; process = no.noise : one_poll(0.999);
d657b51665e5aa36060a954ea917682d8c2284bf9a7979b40a1f39aeada5a24b
micbuffa/stageQuentin
brass.dsp
declare name "Brass"; declare description "Simple 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 <: _,_;
https://raw.githubusercontent.com/micbuffa/stageQuentin/a9916d4a45e1d140a6a17688227b855ee1fa9ca7/brass/brass.dsp
faust
declare name "Brass"; declare description "Simple 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 <: _,_;
126417402faf3ffb0479b5771182f00a61a5c60bd00cbb11ed3d87a111cc1708
JoaoSvidzinski/HermesV2
flanger7B.dsp
import("stdfaust.lib"); //flfreq = vslider("h:flanger/flfreq", 0.01, 0.01, 20, 0.01) : si.smoo; //fldepth = vslider("h:flanger/fldepth", 500, 1, 100, 0.01): si.smoo; floffset = vslider("h:flanger/floffset", 5, 2, 100, 0.01): si.smoo; //*(ma.SR / 1000.0) flanger(index) = par(i,index, de.fdelay(1048576, (os.osci(vslider("flfreq%i", 0.05, 0.1, 10, 0.01) : si.smoo) : +(1) : *(0.5) : *(vslider("fldepth%i", 500, 1, 3000, 0.01): si.smoo) : +(floffset))*(ma.SR / 1000.0))); process= flanger(7);
https://raw.githubusercontent.com/JoaoSvidzinski/HermesV2/a96f9cd288d5cb68be2f5bb5788d5869008d8cef/faust/flanger7B.dsp
faust
flfreq = vslider("h:flanger/flfreq", 0.01, 0.01, 20, 0.01) : si.smoo; fldepth = vslider("h:flanger/fldepth", 500, 1, 100, 0.01): si.smoo; *(ma.SR / 1000.0)
import("stdfaust.lib"); floffset = vslider("h:flanger/floffset", 5, 2, 100, 0.01): si.smoo; flanger(index) = par(i,index, de.fdelay(1048576, (os.osci(vslider("flfreq%i", 0.05, 0.1, 10, 0.01) : si.smoo) : +(1) : *(0.5) : *(vslider("fldepth%i", 500, 1, 3000, 0.01): si.smoo) : +(floffset))*(ma.SR / 1000.0))); process= flanger(7);
62aa1b5397bbfdc27a7132aa3f9454d89a65846e789fb8b304ce6fa9af7930ec
ljwall/er-301-units
FDelaylti.dsp
import("stdfaust.lib"); // Name the ins and outs of the `process` function for use in the er-301 object declare er301_in1 "Length"; declare er301_in2 "In"; declare er301_out1 "Out"; // take 8-9% cpu for 5 of these without -vec -vs 4 // take 7-8% cpu for 5 of these with -vec -vs 4 process = de.fdelaylti(2, 1000);
https://raw.githubusercontent.com/ljwall/er-301-units/2d23ab3aa564f50b3f044e76f2f20067ff67d12c/faust-poc/dsp/FDelaylti.dsp
faust
Name the ins and outs of the `process` function for use in the er-301 object take 8-9% cpu for 5 of these without -vec -vs 4 take 7-8% cpu for 5 of these with -vec -vs 4
import("stdfaust.lib"); declare er301_in1 "Length"; declare er301_in2 "In"; declare er301_out1 "Out"; process = de.fdelaylti(2, 1000);
7a585934cd6d7f2c9d976e453d95ce358da02845d83b11048b5e471025a127aa
ljwall/er-301-units
FDelayltv.dsp
import("stdfaust.lib"); // Name the ins and outs of the `process` function for use in the er-301 object declare er301_in1 "Length"; declare er301_in2 "In"; declare er301_out1 "Out"; // 19% CPU for 10 of these with -vec -vs 4 // 16% CPU for 10 of these without -vec -vs 4 process = de.fdelayltv(2, 1000);
https://raw.githubusercontent.com/ljwall/er-301-units/2d23ab3aa564f50b3f044e76f2f20067ff67d12c/faust-poc/dsp/FDelayltv.dsp
faust
Name the ins and outs of the `process` function for use in the er-301 object 19% CPU for 10 of these with -vec -vs 4 16% CPU for 10 of these without -vec -vs 4
import("stdfaust.lib"); declare er301_in1 "Length"; declare er301_in2 "In"; declare er301_out1 "Out"; process = de.fdelayltv(2, 1000);
a173c1aca7a561b99b49f54c0fa3a0c747c95cd6c67a5d6b168891e6793e238f
rasmusnuko/FaustCode
ringmod.dsp
import("stdfaust.lib"); am(index, freq) = _*mod*(1-index) with{ mod = os.osc(freq)*0.5 + 0.5; }; process = am(0, 500);
https://raw.githubusercontent.com/rasmusnuko/FaustCode/f58d7a5d35d28a644e73903ab530fcdce314dfd6/ringmod.dsp
faust
import("stdfaust.lib"); am(index, freq) = _*mod*(1-index) with{ mod = os.osc(freq)*0.5 + 0.5; }; process = am(0, 500);
7cee470bd37205783d9635edaf6b3d79f8e88d1192992f79033e62066281d3ef
italicsjenga/saturator-faust
FaustEffect.dsp
import("stdfaust.lib"); import("aanl.lib"); import("maths.lib"); import("basics.lib"); process = driver : wrapper : softclip : aa.hardclip2 : trimmer; driver(x) = x * drive * squeeze; trimmer(x) = x * (1 / squeeze); wrapper(x) = (clipper(x) * fadeamt) + (x * (1 - fadeamt)); clipper(x) = aa.arctan(clipamt * x)/aa.arctan(clipamt); drive = db2linear(nentry("drive", 0, 0, 1, 0.01) * 20) : si.smoo; squeeze = db2linear(nentry("squeeze", 0, 0, 1, 0.01) * 20) : si.smoo; // trim = db2linear((nentry("trim", 0, 0, 1, 0.01) * 20) - 20); slider_raw = nentry("clipping", 0, 0, 1, 0.01); slider = (.85*slider_raw)+0.15; fadeamt = min(20*slider_raw, 1); clipamt = max(ma.EPSILON, (slider^2)*20); softclip = softclipamt, _ : softclip_maths ; softclip_maths( a1, x ) = min( a0 , atan((a0 - a1)/a2 ) * a2 + a1 ) * a3 with{ a0 = abs(x); a2 = (1-a1) * 2/ma.PI ; a3 = ma.signum(x) ; }; softclipamt = db2linear(nentry("softclip", 0, 0, 1, 0.01) * -3) : si.smoo;
https://raw.githubusercontent.com/italicsjenga/saturator-faust/6a096230227d1acb12756e798a993bbd5e6a14f0/FaustEffect.dsp
faust
trim = db2linear((nentry("trim", 0, 0, 1, 0.01) * 20) - 20);
import("stdfaust.lib"); import("aanl.lib"); import("maths.lib"); import("basics.lib"); process = driver : wrapper : softclip : aa.hardclip2 : trimmer; driver(x) = x * drive * squeeze; trimmer(x) = x * (1 / squeeze); wrapper(x) = (clipper(x) * fadeamt) + (x * (1 - fadeamt)); clipper(x) = aa.arctan(clipamt * x)/aa.arctan(clipamt); drive = db2linear(nentry("drive", 0, 0, 1, 0.01) * 20) : si.smoo; squeeze = db2linear(nentry("squeeze", 0, 0, 1, 0.01) * 20) : si.smoo; slider_raw = nentry("clipping", 0, 0, 1, 0.01); slider = (.85*slider_raw)+0.15; fadeamt = min(20*slider_raw, 1); clipamt = max(ma.EPSILON, (slider^2)*20); softclip = softclipamt, _ : softclip_maths ; softclip_maths( a1, x ) = min( a0 , atan((a0 - a1)/a2 ) * a2 + a1 ) * a3 with{ a0 = abs(x); a2 = (1-a1) * 2/ma.PI ; a3 = ma.signum(x) ; }; softclipamt = db2linear(nentry("softclip", 0, 0, 1, 0.01) * -3) : si.smoo;
8aebbcc4ed83d75e6ba62ca7a7849fa48499477c975450bb269571ac46aced62
jpcima/string-machine
StringFiltersHighshelf.dsp
import("stdfaust.lib"); msp = library("maxmsp.lib"); process(x) = msp.highShelf(x, cutoff, gain, 1./sqrt(2.)) with { cutoff = hslider("[1]Cutoff [unit:Hz] [scale:log] [symbol:cutoff]", 1000., 10., 10000., 1.); gain = hslider("[2]Gain [unit:dB] [symbol:gain]", 3., 1., 10., 0.1); };
https://raw.githubusercontent.com/jpcima/string-machine/188082dd0beb9a3c341035604841c53675fe66c4/sources/dsp/StringFiltersHighshelf.dsp
faust
import("stdfaust.lib"); msp = library("maxmsp.lib"); process(x) = msp.highShelf(x, cutoff, gain, 1./sqrt(2.)) with { cutoff = hslider("[1]Cutoff [unit:Hz] [scale:log] [symbol:cutoff]", 1000., 10., 10000., 1.); gain = hslider("[2]Gain [unit:dB] [symbol:gain]", 3., 1., 10., 0.1); };
95da4daa49c31c4a042d30b09a18725e8d610705add23b761c024730caa4f169
Marquets/MusicPerceptionProject
organ.dsp
// Simple Organ import("stdfaust.lib"); // Midi interface midigate = button ("gate"); // MIDI keyon-keyoff midifreq = hslider("freq[unit:Hz]", 440, 20, 20000, 1); // MIDI keyon key midigain = hslider("gain", 0.5, 0, 10, 0.01); // MIDI keyon velocity process = voice(midigate, midigain, midifreq) * hslider("volume", 0.5, 0, 1, 0.01); // Implementation phasor(f) = f/ma.SR : (+,1.0:fmod) ~ _ ; osc(f) = phasor(f) * 6.28318530718 : sin; timbre(freq) = osc(freq) + 0.5 * osc(2.0*freq) + 0.25 * osc(3.0*freq); envelop(gate, gain) = gate * gain : smooth(0.9995) with { smooth(c) = * (1-c) : + ~ * (c) ; } ; voice(gate, gain, freq) = envelop(gate, gain) * timbre(freq);
https://raw.githubusercontent.com/Marquets/MusicPerceptionProject/4728c8c476cf6d39e80a24e0ae5d9433dda22efa/webaudio/organ.dsp
faust
Simple Organ Midi interface MIDI keyon-keyoff MIDI keyon key MIDI keyon velocity Implementation
import("stdfaust.lib"); process = voice(midigate, midigain, midifreq) * hslider("volume", 0.5, 0, 1, 0.01); phasor(f) = f/ma.SR : (+,1.0:fmod) ~ _ ; osc(f) = phasor(f) * 6.28318530718 : sin; timbre(freq) = osc(freq) + 0.5 * osc(2.0*freq) + 0.25 * osc(3.0*freq); envelop(gate, gain) = gate * gain : smooth(0.9995) with { smooth(c) = * (1-c) : + ~ * (c) ; } ; voice(gate, gain, freq) = envelop(gate, gain) * timbre(freq);
448922f94e9da10680259edbd45cc54f7c92dd06c63cba59dbd2edec3f17b456
matthiasmeissen/sound-generator
engine_01_220304.dsp
import("stdfaust.lib"); freq = hslider("freq",440,20,20000,0.01); gain = hslider("gain",0.1,0,1,0.01); osc1 = os.oscsin(freq); process = osc1 * gain;
https://raw.githubusercontent.com/matthiasmeissen/sound-generator/d46dba338a7397de3f879b9c8490189bb08f5564/engines/engine_01_220304.dsp
faust
import("stdfaust.lib"); freq = hslider("freq",440,20,20000,0.01); gain = hslider("gain",0.1,0,1,0.01); osc1 = os.oscsin(freq); process = osc1 * gain;
ce4eba077f3ac9e40903e43f63a2dbb27b85bc2f4061326acfb6ce12d3cfb9e3
quentinplet/Arpeggiator
arpeggiator_impulsion.dsp
import("stdfaust.lib"); at = hslider("v:env/attack", 0.1, 0.001, 5, 0.001); rel = hslider("v:env/release", 0.5, 0.001, 10, 0.001); gain = 0.5; t = button("v:env/bang"); envelop = en.ar(at,rel,t); impulsion = (os.osc(440)) : * (envelop) *(gain); // delay + feedback n = 524288; dur = hslider("h:delay/dur", 500, 0, 2000, 1); fdbk = hslider("h:delay/fdbk", 0, 0, 0.999, 0.001); d = dur * ma.SR / 1000; delay1 = de.sdelay(n, 1024, d); // transposition shift = hslider("h:pitchshift/shift", 0, -24, 24, 0.01); pitchshift = ef.transpose(1024, 1024, shift); // panoramisation rate = hslider("h:pan/rate", 0, 0, 1, 0.001); p = os.osccos(rate) : +(1) : *(0.5); g = hslider("h:amp/gain", 0.5, 0, 1, 0.01): si.smooth(ba.tau2pole(0.1)); panner = sp.panner(p); process = (impulsion) : ( + : ( (delay1) : (pitchshift) ) )~ (*(fdbk)) : *(g) : (panner);
https://raw.githubusercontent.com/quentinplet/Arpeggiator/ef4213c10d0e63d584a3ff1ec06d412050ccf35c/plugin_Wasm/arpeggiator_impulsion.dsp
faust
delay + feedback transposition panoramisation
import("stdfaust.lib"); at = hslider("v:env/attack", 0.1, 0.001, 5, 0.001); rel = hslider("v:env/release", 0.5, 0.001, 10, 0.001); gain = 0.5; t = button("v:env/bang"); envelop = en.ar(at,rel,t); impulsion = (os.osc(440)) : * (envelop) *(gain); n = 524288; dur = hslider("h:delay/dur", 500, 0, 2000, 1); fdbk = hslider("h:delay/fdbk", 0, 0, 0.999, 0.001); d = dur * ma.SR / 1000; delay1 = de.sdelay(n, 1024, d); shift = hslider("h:pitchshift/shift", 0, -24, 24, 0.01); pitchshift = ef.transpose(1024, 1024, shift); rate = hslider("h:pan/rate", 0, 0, 1, 0.001); p = os.osccos(rate) : +(1) : *(0.5); g = hslider("h:amp/gain", 0.5, 0, 1, 0.01): si.smooth(ba.tau2pole(0.1)); panner = sp.panner(p); process = (impulsion) : ( + : ( (delay1) : (pitchshift) ) )~ (*(fdbk)) : *(g) : (panner);
bf0df4993367a11e64ed05942d55a395598b472a22d384cb97bef88c1198d460
angelamurtas/Programmazione-
metronomo.dsp
import("stdfaust.lib"); bpm2samp(t)= (60*ma.SR)/t; //frek=vslider ("frequenza[style:knob]",1000,1000,5000,1.0); beat= bpm2samp(vslider("tempo[style:knob]", 60,32,240,0.1)); process=ba.pulsen(1,beat) : fi.lowpass(128,1000);
https://raw.githubusercontent.com/angelamurtas/Programmazione-/bf8cf329460acf7334c7c4c11953ddcdf6d7e612/metronomo.dsp
faust
frek=vslider ("frequenza[style:knob]",1000,1000,5000,1.0);
import("stdfaust.lib"); bpm2samp(t)= (60*ma.SR)/t; beat= bpm2samp(vslider("tempo[style:knob]", 60,32,240,0.1)); process=ba.pulsen(1,beat) : fi.lowpass(128,1000);
cf11244b41136c46e287e7edc90506f83644a1063300aaa18b8f00511894cff5
oshibka404/baraban
main.dsp
declare author "Andrey Ozornin"; import("stdfaust.lib"); kick_group(el) = hgroup("[0]kick", el); kick_trigger = button("[0]gate"); kick_freq = vslider("[1]pitch[scale:log]", 55, 20, 200, 1); kick_click = vslider("[2]click[scale:log]", 0.1, 0.005, 1, 0.005); kick_attack = vslider("[3]attack[scale:log]", 0.1, 0.005, 0.4, 0.005); kick_decay = vslider("[4]decay[scale:log]", 0.5, 0.01, 4, 0.01); kick_drive = vslider("[5]drive", 3, 1, 10, 0.1); kick_drum = kick_group( kick_trigger : sy.kick( kick_freq, kick_click, kick_attack, kick_decay, kick_drive ) * kick_trigger ); clap_group(el) = hgroup("[1]clap", el); clap_trigger = button("[0]gate"); clap_freq = vslider("[1]pitch[scale:log]", 1760, 400, 3500, 1); clap_attack = vslider("[2]attack[scale:log]", 0.01, 0.001, 0.2, 0.001); clap_decay = vslider("[3]decay[scale:log]", 0.03, 0.001, 4, 0.001); clap = clap_group( clap_trigger : sy.clap( clap_freq, clap_attack, clap_decay ) * clap_trigger ); hh_group(el) = hgroup("[2]hat", el); hh_trigger = button("[0]gate"); hh_freq = vslider("[1]pitch[scale:log]", 1000, 317, 3170, 1); hh_tone = vslider("[2]tone[scale:log]", 3000, 800, 18000, 1); hh_attack = vslider("[3]attack[scale:log]", 0.01, 0.005, 0.2, 0.005); hh_decay = vslider("[4]decay[scale:log]", 0.1, 0.005, 4, 0.005); hh = hh_group( hh_trigger : sy.hat( hh_freq, hh_tone, hh_attack, hh_decay ) * hh_trigger ); process = kick_drum, clap, hh :> si.smoo <: _,_;
https://raw.githubusercontent.com/oshibka404/baraban/fea440618417619f054bfccb5e1b27665a1a5a8c/DSP/main.dsp
faust
declare author "Andrey Ozornin"; import("stdfaust.lib"); kick_group(el) = hgroup("[0]kick", el); kick_trigger = button("[0]gate"); kick_freq = vslider("[1]pitch[scale:log]", 55, 20, 200, 1); kick_click = vslider("[2]click[scale:log]", 0.1, 0.005, 1, 0.005); kick_attack = vslider("[3]attack[scale:log]", 0.1, 0.005, 0.4, 0.005); kick_decay = vslider("[4]decay[scale:log]", 0.5, 0.01, 4, 0.01); kick_drive = vslider("[5]drive", 3, 1, 10, 0.1); kick_drum = kick_group( kick_trigger : sy.kick( kick_freq, kick_click, kick_attack, kick_decay, kick_drive ) * kick_trigger ); clap_group(el) = hgroup("[1]clap", el); clap_trigger = button("[0]gate"); clap_freq = vslider("[1]pitch[scale:log]", 1760, 400, 3500, 1); clap_attack = vslider("[2]attack[scale:log]", 0.01, 0.001, 0.2, 0.001); clap_decay = vslider("[3]decay[scale:log]", 0.03, 0.001, 4, 0.001); clap = clap_group( clap_trigger : sy.clap( clap_freq, clap_attack, clap_decay ) * clap_trigger ); hh_group(el) = hgroup("[2]hat", el); hh_trigger = button("[0]gate"); hh_freq = vslider("[1]pitch[scale:log]", 1000, 317, 3170, 1); hh_tone = vslider("[2]tone[scale:log]", 3000, 800, 18000, 1); hh_attack = vslider("[3]attack[scale:log]", 0.01, 0.005, 0.2, 0.005); hh_decay = vslider("[4]decay[scale:log]", 0.1, 0.005, 4, 0.005); hh = hh_group( hh_trigger : sy.hat( hh_freq, hh_tone, hh_attack, hh_decay ) * hh_trigger ); process = kick_drum, clap, hh :> si.smoo <: _,_;
bde1bb2c39f6c6c1a4bc5677639a7b94ff0b2821d3181569b5f67afe96e46ca2
orlarey/wahoo
wahoo.dsp
import("stdfaust.lib"); declare name "WAHOO"; oscFreq = vslider("h:WAAHOO/h:OSC/freq[style:knob][unit:Hz]",50,30,500,0.01); oscGain = vslider("h:WAAHOO/h:OSC/gain[style:knob]",0.5,0,1,0.01); lfoFreq = vslider("h:WAAHOO/h:LFO/freq[style:knob][unit:Hz]",0.5,0.01,50,0.01); lfoRange = vslider("h:WAAHOO/h:LFO/range[style:knob]",300,10,5000,0.01); LFO1 = os.lf_triangle(lfoFreq)*0.5 + 0.5; LFO2 = os.lf_triangle(lfoFreq*1.01)*0.5 + 0.5; process = os.sawtooth(oscFreq)*oscGain <: fi.resonlp(LFO1*lfoRange+50,5,1),fi.resonlp(LFO2*lfoRange+50,5,1);
https://raw.githubusercontent.com/orlarey/wahoo/6a0bf5ef82602639bb9bc3f63c492610ceeb3add/examples/wahoo.dsp
faust
import("stdfaust.lib"); declare name "WAHOO"; oscFreq = vslider("h:WAAHOO/h:OSC/freq[style:knob][unit:Hz]",50,30,500,0.01); oscGain = vslider("h:WAAHOO/h:OSC/gain[style:knob]",0.5,0,1,0.01); lfoFreq = vslider("h:WAAHOO/h:LFO/freq[style:knob][unit:Hz]",0.5,0.01,50,0.01); lfoRange = vslider("h:WAAHOO/h:LFO/range[style:knob]",300,10,5000,0.01); LFO1 = os.lf_triangle(lfoFreq)*0.5 + 0.5; LFO2 = os.lf_triangle(lfoFreq*1.01)*0.5 + 0.5; process = os.sawtooth(oscFreq)*oscGain <: fi.resonlp(LFO1*lfoRange+50,5,1),fi.resonlp(LFO2*lfoRange+50,5,1);
fcd2618203d240dc76b0268613c4cd016fb6912a345352044d1d527a1d834481
rasmusnuko/FaustCode
panner.dsp
import("stdfaust.lib"); // Sqrt to perceptionaly linearize 0 - 1 gain. pan = sqrt(hslider("LEFT / RIGHT", 0.5, 0, 1, 0.01)) : si.smoo ; process = _ <: _ * (1-pan), _ * (pan);
https://raw.githubusercontent.com/rasmusnuko/FaustCode/f58d7a5d35d28a644e73903ab530fcdce314dfd6/panner.dsp
faust
Sqrt to perceptionaly linearize 0 - 1 gain.
import("stdfaust.lib"); pan = sqrt(hslider("LEFT / RIGHT", 0.5, 0, 1, 0.01)) : si.smoo ; process = _ <: _ * (1-pan), _ * (pan);
7bc4218c4cce4b026efa9170f04488cec8bec39f79b3363c3fa94f01c2d2c840
s-e-a-m/faust-libraries
tone.dsp
import("stdfaust.lib"); process = +(1)~; //process = +(0.01)~ma.decimal; // grid on // xlim ([0 1000]) // decpart(n) = n - (int(n')); // process = +(0.001)~decpart; // import("stdfaust.lib"); // decpart(n) = n - (floor(n)); // step = 0.1; // process = +(step)~decpart : -(step);
https://raw.githubusercontent.com/s-e-a-m/faust-libraries/9120cccb9335f42407062eb4bf149188d8018b07/plots/dsp/csound/tone.dsp
faust
process = +(0.01)~ma.decimal; grid on xlim ([0 1000]) decpart(n) = n - (int(n')); process = +(0.001)~decpart; import("stdfaust.lib"); decpart(n) = n - (floor(n)); step = 0.1; process = +(step)~decpart : -(step);
import("stdfaust.lib"); process = +(1)~;
f96d45853f6d81025e56dce4068f0ecd72f8d86a5a9d127302cba2e0aaf0f41f
catfact/softcut
LowpassBrickwall.dsp
declare name "BrickwallLowpass"; import("stdfaust.lib"); process = fi.lowpass(6, 16000);
https://raw.githubusercontent.com/catfact/softcut/5fc49c02eb5036d06065ade85f1ccf4861b1a539/faust/LowpassBrickwall.dsp
faust
declare name "BrickwallLowpass"; import("stdfaust.lib"); process = fi.lowpass(6, 16000);
1a63160b8fc8abb1833ca131ea2f18757352c3e33513989445513e92923441a1
pingdynasty/MyPatches
entente.dsp
declare name "L'Entente Cordiale"; declare message "La Fameuse\nEntente Cordiale"; declare description "French and English church bells in unison."; import("stdfaust.lib"); englishBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) = pm.strikeModel(10,strikeCutoff,strikeSharpness,gain,trigger) : pm.englishBellModel(45,strikePosition,30,1,3); // modes >= 46 doesn't work on Genius // process = pm.frenchBell(pos : ba.sAndH(ba.impulsify(lgate)),cutoff,sharp,gain,lgate), // englishBell(pos : ba.sAndH(ba.impulsify(rgate)),cutoff,sharp,gain,rgate) process = pm.frenchBell(pos : ba.latch(lgate), cutoff, sharp, gain, lgate), englishBell(pos : ba.latch(rgate), cutoff, sharp, gain, rgate) with{ pos = nentry("Position[OWL:A]",0,0,6,1); sharp = hslider("Sharpness[OWL:B]",0.5,0.0001,1,0.01), 2 : pow; cutoff = hslider("Cutoff[OWL:C]",6500,20,20000,1); gain = hslider("Gain[OWL:D]",0.5,0,1,0.01); lgate = button("France[OWL:B1]"); rgate = button("England[OWL:B2]"); };
https://raw.githubusercontent.com/pingdynasty/MyPatches/ee20cdb03af54d42984f734fdfb2898d4aecd7ad/entente.dsp
faust
modes >= 46 doesn't work on Genius process = pm.frenchBell(pos : ba.sAndH(ba.impulsify(lgate)),cutoff,sharp,gain,lgate), englishBell(pos : ba.sAndH(ba.impulsify(rgate)),cutoff,sharp,gain,rgate)
declare name "L'Entente Cordiale"; declare message "La Fameuse\nEntente Cordiale"; declare description "French and English church bells in unison."; import("stdfaust.lib"); englishBell(strikePosition,strikeCutoff,strikeSharpness,gain,trigger) = pm.strikeModel(10,strikeCutoff,strikeSharpness,gain,trigger) : process = pm.frenchBell(pos : ba.latch(lgate), cutoff, sharp, gain, lgate), englishBell(pos : ba.latch(rgate), cutoff, sharp, gain, rgate) with{ pos = nentry("Position[OWL:A]",0,0,6,1); sharp = hslider("Sharpness[OWL:B]",0.5,0.0001,1,0.01), 2 : pow; cutoff = hslider("Cutoff[OWL:C]",6500,20,20000,1); gain = hslider("Gain[OWL:D]",0.5,0,1,0.01); lgate = button("France[OWL:B1]"); rgate = button("England[OWL:B2]"); };
88c0c4db66b7a539d22908ff19901b5f652a267194d5d4dd4d155c01ac1e566e
quentinplet/Example-Web-Audio-Master.
flanger1.dsp
import("stdfaust.lib"); //4 contrôles pour le flanger rate = hslider("rate", 0.001, 0.001, 500, 0.001); depth = hslider("depth", 0.001, 0.001, 5000, 0.001); shift = hslider("shift", 0, 0, 5000, 1); fdbk = hslider("fdbk", 0, 0, 1, 0.01); // ndel = 524288; //durée du retard variable en millisecondes retardvariable = os.osccos(rate) : +(1) : *(0.5) : *(depth) : +(shift); //conversion de retardvariable en nombre d'échantillons nsamp = retardvariable / 1000 * ma.SR; // //process = _ <: (_, de.fdelay(ndel, nsamp)) : (_, *(fdbk)) : ((_ <:(_,_)), _) : (_, +); process = _ <: (_, (_ + de.fdelay(ndel, nsamp)) * (fdbk));
https://raw.githubusercontent.com/quentinplet/Example-Web-Audio-Master./b531edc365bedc7af4ae4411168584fd46f543a4/Codes%20Flanger/Faust_test_flanger/test_flanger_Faust_Web_Audio/flanger1.dsp
faust
4 contrôles pour le flanger durée du retard variable en millisecondes conversion de retardvariable en nombre d'échantillons process = _ <: (_, de.fdelay(ndel, nsamp)) : (_, *(fdbk)) : ((_ <:(_,_)), _) : (_, +);
import("stdfaust.lib"); rate = hslider("rate", 0.001, 0.001, 500, 0.001); depth = hslider("depth", 0.001, 0.001, 5000, 0.001); shift = hslider("shift", 0, 0, 5000, 1); fdbk = hslider("fdbk", 0, 0, 1, 0.01); ndel = 524288; retardvariable = os.osccos(rate) : +(1) : *(0.5) : *(depth) : +(shift); nsamp = retardvariable / 1000 * ma.SR; process = _ <: (_, (_ + de.fdelay(ndel, nsamp)) * (fdbk));
032873d61df19cdf875e01c6a4d9c65a9038172675d05b1be1b5d1b6b7a53d3e
magnetophon/faustOscillators
example.dsp
declare author "Bart Brouns"; declare license "GPLv3"; declare name "osc-example"; import("stdfaust.lib"); process(extFMSignal) = sineSquarePulse(extFMSignal)~_<:(_,_); sineSquarePulse(extFMSignal,FB) = it.interpolate_linear(sinSquare,sine,square):clip with { sine = os.osc(f); square = os.pulsetrain(f,width); clip = _*drive:max(-1):min(1); f = freq+(FM*FB)+(extFMSignal * extFMDep); }; freq = hslider ("[0]freq", 440, 27.5, 3520, 0.1) :si.smoo; extFMDep = hslider ("[1]fmdepth", 0, 0.0, 1.0, 0.1 ) :si.smoo; sinSquare = hslider ("[2]sinSquare", 0.5, 0, 1, 0.1) :si.smoo; width = hslider ("[3]width", 0.5, 0, 1, 0.1) :si.smoo; drive = hslider ("[4]drive", 1, 1, 100, 0.1) :si.smoo; FM = hslider ("[5]FM", 0, 0, 100, 0.1) :si.smoo;
https://raw.githubusercontent.com/magnetophon/faustOscillators/6ac2ac572f8a3dc78cc6cb0074d60cce10845300/example.dsp
faust
declare author "Bart Brouns"; declare license "GPLv3"; declare name "osc-example"; import("stdfaust.lib"); process(extFMSignal) = sineSquarePulse(extFMSignal)~_<:(_,_); sineSquarePulse(extFMSignal,FB) = it.interpolate_linear(sinSquare,sine,square):clip with { sine = os.osc(f); square = os.pulsetrain(f,width); clip = _*drive:max(-1):min(1); f = freq+(FM*FB)+(extFMSignal * extFMDep); }; freq = hslider ("[0]freq", 440, 27.5, 3520, 0.1) :si.smoo; extFMDep = hslider ("[1]fmdepth", 0, 0.0, 1.0, 0.1 ) :si.smoo; sinSquare = hslider ("[2]sinSquare", 0.5, 0, 1, 0.1) :si.smoo; width = hslider ("[3]width", 0.5, 0, 1, 0.1) :si.smoo; drive = hslider ("[4]drive", 1, 1, 100, 0.1) :si.smoo; FM = hslider ("[5]FM", 0, 0, 100, 0.1) :si.smoo;
dd675ef24fca606889b139ee8b6f6c0d16183f91c09c97f12b38faa9e7b48ec0
grammaton/metm
0702-senopi2.dsp
import("stdfaust.lib"); process = sin(ma.PI/2);
https://raw.githubusercontent.com/grammaton/metm/e3ca76fc8b8bbb10a0eb77a7056a6056a5c7feda/CAPITOLI/0700/CODES/0702-senopi2.dsp
faust
import("stdfaust.lib"); process = sin(ma.PI/2);
53336e2c9a6c424d00c3b0f11817984ade58dbe0498d6ddbf158b33b02944aad
daniel-kelley/daniel-kelley.github.io
osc.dsp
declare name "osc"; declare version "1.0"; declare author "Grame"; declare license "BSD"; declare copyright "(c)GRAME 2009"; declare options "[osc:on]"; //----------------------------------------------- // Sinusoidal Oscillator //----------------------------------------------- import("stdfaust.lib"); vol = hslider("volume [unit:dB]", -96, -96, 0, 0.1) : ba.db2linear : si.smoo ; freq = hslider("freq [unit:Hz]", 1000, 20, 10000, 1); process = vgroup("Oscillator", os.osc(freq) * vol);
https://raw.githubusercontent.com/daniel-kelley/daniel-kelley.github.io/f1c124b4f7b02366918141f33ab072ce76262735/faust/osc/osc.dsp
faust
----------------------------------------------- Sinusoidal Oscillator -----------------------------------------------
declare name "osc"; declare version "1.0"; declare author "Grame"; declare license "BSD"; declare copyright "(c)GRAME 2009"; declare options "[osc:on]"; import("stdfaust.lib"); vol = hslider("volume [unit:dB]", -96, -96, 0, 0.1) : ba.db2linear : si.smoo ; freq = hslider("freq [unit:Hz]", 1000, 20, 10000, 1); process = vgroup("Oscillator", os.osc(freq) * vol);
a4bdadb2f4cf38339b28d6e549efe42f30bc8cfb9d61c6d062519dbfcff649e3
ManosDim/waveguidesOnBela-
waveguide.dsp
import("stdfaust.lib"); period=ma.SR/(freq*2):si.smoo; p0=period*p; p1=period*(1-p); interpDelay(maxDel,interp,del,t)=_<: de.fdelay4(maxDel,del0)*xfade,de.fdelay4(maxDel,del1)*(1-xfade):>_ with{ switch=t:ba.impulsify:+~%(2); del0=del:ba.sAndH(1-switch); del1=del:ba.sAndH(switch); xfade=en.asr(interp,1,interp,switch); } ; //state machine A= interpDelay(1024,0.01,p0,gate),interpDelay(1024,0.01,p0,gate),_; //INSIDE= de.fdelay4(1024,p1),de.fdelay4(1024,p1),_; B=interpDelay(1024,0.01,p1,gate),interpDelay(1024,0.01,p1,gate),_; model(x)=pm.endChain( pm.chain( pm.lTermination(*(-0.99):fi.lowpass(4,3050),pm.basicBlock): A:pm.in(x):pm.out:B : pm.rTermination(pm.basicBlock,*(-0.99):fi.lowpass(4,1500)) ) ) ; //-0.99 sine inversion gain1= pressure*5; freq=hslider("[1]Frequency[BELA:ANALOG_0]", 440 ,60, 1500, 0.1); p=hslider("[3]Position[BELA:ANALOG_2]",0.3,0,1,0.01); pressure =hslider("[0]ON/OFF (Plucking)[BELA:ANALOG_1]",0,0,1,0.01); gate = pressure > 0.01; gain=hslider("[1]gain[BELA:ANALOG_3]",20,0, 20, 0.1); process=gate:gain1*ba.impulsify:model*gain; //for polyphony the trick is to have a linear interpolator p in the 1st delay line and a p-1 in the 2st delay line
https://raw.githubusercontent.com/ManosDim/waveguidesOnBela-/a8969ec860c154d8d3d28fa74f50a29f006e5dfe/waveguide.dsp
faust
state machine INSIDE= de.fdelay4(1024,p1),de.fdelay4(1024,p1),_; -0.99 sine inversion for polyphony the trick is to have a linear interpolator p in the 1st delay line and a p-1 in the 2st delay line
import("stdfaust.lib"); period=ma.SR/(freq*2):si.smoo; p0=period*p; p1=period*(1-p); interpDelay(maxDel,interp,del,t)=_<: de.fdelay4(maxDel,del0)*xfade,de.fdelay4(maxDel,del1)*(1-xfade):>_ with{ switch=t:ba.impulsify:+~%(2); del0=del:ba.sAndH(1-switch); del1=del:ba.sAndH(switch); xfade=en.asr(interp,1,interp,switch); } A= interpDelay(1024,0.01,p0,gate),interpDelay(1024,0.01,p0,gate),_; B=interpDelay(1024,0.01,p1,gate),interpDelay(1024,0.01,p1,gate),_; model(x)=pm.endChain( pm.chain( pm.lTermination(*(-0.99):fi.lowpass(4,3050),pm.basicBlock): A:pm.in(x):pm.out:B : pm.rTermination(pm.basicBlock,*(-0.99):fi.lowpass(4,1500)) ) ) gain1= pressure*5; freq=hslider("[1]Frequency[BELA:ANALOG_0]", 440 ,60, 1500, 0.1); p=hslider("[3]Position[BELA:ANALOG_2]",0.3,0,1,0.01); pressure =hslider("[0]ON/OFF (Plucking)[BELA:ANALOG_1]",0,0,1,0.01); gate = pressure > 0.01; gain=hslider("[1]gain[BELA:ANALOG_3]",20,0, 20, 0.1); process=gate:gain1*ba.impulsify:model*gain;
78b9c33d312a80e9e5702724a868648aa5f7a7bc4024f5826d343d7577e15b93
sonejostudios/faustdrumseq
drumsequencer.dsp
// compile with: faust2jaqt -soundfile soundfiletest.dsp // https://github.com/grame-cncm/faustlibraries/blob/41163d260be908778d638e1d0211626b8b22b7e7/soundfiles.lib import("stdfaust.lib"); process = k, hh, sn :> _,_; looplength = 16; bpm = hslider("bpm",120,40,240,1)*2; beat_seq = ba.beat(bpm) : ba.pulse_countup_loop(looplength-1,1) : hbargraph("seq",0,looplength-1); playhead(x) = (1:+~_*trigger(x): _*1); // _*1 is speed trigger(x) = steps(x) : par(i,looplength, _<: (_>_@1) : _) :> 1-_ ; steps(x) = hgroup("%x", par(i,looplength, checkbox(" %2i "))) : par(i, looplength, _*(beat_seq==i)); vol(v) = !,!,_*v<:_,_; //k = 0, playhead(1) : soundfile("label[url:k.wav]",1) : vol(k_vol); //hh = 0, playhead(2) : soundfile("label[url:hh.wav]",1) : vol(hh_vol); //sn = 0, playhead(3) : soundfile("label[url:sn.wav]",1) : vol(sn_vol); // unsing a single 'soundfile': sound = soundfile("label[url:{'k.wav';'hh.wav';'sn.wav'}]",1); k = 0, playhead(1) : sound : vol(k_vol); hh = 1, playhead(2) : sound : vol(hh_vol); sn = 2, playhead(3) : sound : vol(sn_vol); //volume gui k_vol = vslider("/h:volume/1 k[style:knob]",1,0,2,0.01); hh_vol = vslider("/h:volume/2 hh[style:knob]",1,0,2,0.01); sn_vol = vslider("/h:volume/3 sn[style:knob]",1,0,2,0.01);
https://raw.githubusercontent.com/sonejostudios/faustdrumseq/60103f024bd98b8603efb04246a74b4e063523b7/drumsequencer.dsp
faust
compile with: faust2jaqt -soundfile soundfiletest.dsp https://github.com/grame-cncm/faustlibraries/blob/41163d260be908778d638e1d0211626b8b22b7e7/soundfiles.lib _*1 is speed k = 0, playhead(1) : soundfile("label[url:k.wav]",1) : vol(k_vol); hh = 0, playhead(2) : soundfile("label[url:hh.wav]",1) : vol(hh_vol); sn = 0, playhead(3) : soundfile("label[url:sn.wav]",1) : vol(sn_vol); unsing a single 'soundfile': volume gui
import("stdfaust.lib"); process = k, hh, sn :> _,_; looplength = 16; bpm = hslider("bpm",120,40,240,1)*2; beat_seq = ba.beat(bpm) : ba.pulse_countup_loop(looplength-1,1) : hbargraph("seq",0,looplength-1); trigger(x) = steps(x) : par(i,looplength, _<: (_>_@1) : _) :> 1-_ ; steps(x) = hgroup("%x", par(i,looplength, checkbox(" %2i "))) : par(i, looplength, _*(beat_seq==i)); vol(v) = !,!,_*v<:_,_; sound = soundfile("label[url:{'k.wav';'hh.wav';'sn.wav'}]",1); k = 0, playhead(1) : sound : vol(k_vol); hh = 1, playhead(2) : sound : vol(hh_vol); sn = 2, playhead(3) : sound : vol(sn_vol); k_vol = vslider("/h:volume/1 k[style:knob]",1,0,2,0.01); hh_vol = vslider("/h:volume/2 hh[style:knob]",1,0,2,0.01); sn_vol = vslider("/h:volume/3 sn[style:knob]",1,0,2,0.01);
934062b523afff2295dd446f6204f93f33b7293db1a9065a27d9c75edfb2c0c7
gllmp/gcode
filters-eq.dsp
import("stdfaust.lib"); /* declare name "equalizer"; import("stdfaust.lib"); peakeq (f) = hgroup("band %f", fi.peak_eq_cq(level,f,Q) with { level = vslider("level[unit:dB][style:knob]", 0, -70, 12, 1); Q = vslider("Q[style:knob]", 1, 1, 100, 0.01); }); process = no.noise : hgroup("Equalizer", seq(i, 5, peakeq(500+500*i))); filters = seq(i,2,someFilter(i)) with{ someFilter(i) = filter(a,b,c(i)) with{ freq = hslider("LFOFreq%i",...); a = LFO(freq)*i; b = LFO(freq)*i*2; c(0) = 1; c(1) = 2; }; }; */ /* nBands = 8; filterBank(N) = hgroup("Filter Bank",seq(i,N,peakeq(i))) with { peakeq(j) = vgroup("[%j]Band %a",fi.peak_eq(l,f,b)) with { a = j+1; l = vslider("[2]Level[unit:db]",0,-70,12,0.01) : si.smoo; f = nentry("[1]Freq",(80+(1000*8/N*(j+1)-80)),20,20000,0.01) : si.smoo; b = f/hslider("[0]Q[style:knob]",1,1,50,0.01) : si.smoo; }; }; // process = filterBank(nBands); */ /* lfoFreq = hslider("LFO Frequency[style:knob]",10,0.1,20,0.01); lfoDepth = hslider("LFO Depth[style:knob]",500,1,10000,1); LFO(freq) = os.osc(lfoFreq)*lfoDepth + freq : max(30); nBands = 4; filters(N) = hgroup("Filter Bank",seq(i,N,peakeq(i))) with{ peakeq(i) = vgroup("[%i]Band %index",fi.peak_eq(l,f,b)) with{ index = i+1; // freq = hslider("LFOFreq%index",2000,50,10000,0.1); freq = 1000 * index; l = vslider("Level[unit:db]",0,-70,12,0.01) : si.smoo; f = nentry("Freq",1000*index,20,20000,1) : si.smoo; b = LFO(freq)/hslider("Q[style:knob]",1,1,50,0.01) : si.smoo; }; }; */ waveGenerator = hgroup("[0]Wave Generator",no.noise,os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave)) : _ <:_,_,_ with{ wave = nentry("[0]Waveform",3,0,3,1); freq = hslider("[1]freq",440,50,2000,0.01); }; filters = hgroup("[1]Filter", fi.resonlp(resFreq,q,1), fi.resonhp(resFreq,q,1), fi.resonbp(resFreq,q,1) : ba.selectn(3,filters)) : _ with{ filters = nentry("[0]Filter Type", 0, 0, 2, 1); ctFreq = hslider("[1]Cutoff Frequency[style:knob]",2000,50,10000,0.1); q = hslider("[2]Q[style:knob]",5,1,30,0.1); lfoFreq = hslider("[3]LFO Frequency[style:knob]",10,0.1,20,0.01); lfoDepth = hslider("[4]LFO Depth[style:knob]",500,1,10000,1); resFreq = os.osc(lfoFreq)*lfoDepth + ctFreq : max(30); }; lfoFreq = hslider("LFO Frequency[style:knob]",10,0.1,20,0.01); lfoDepth = hslider("LFO Depth[style:knob]",500,1,10000,1); LFO(freq) = os.osc(lfoFreq)*lfoDepth + freq : max(30); nBands = 4; eq(N) = hgroup("Peak EQ",seq(i,N,peakeq(i))) with{ peakeq(i) = vgroup("[%i]Band %index",fi.peak_eq(l,f,b)) with{ index = i+1; // freq = hslider("LFOFreq%index",2000,50,10000,0.1); freq = 1000 * index; l = vslider("[0]Level[unit:db]",0,-70,12,0.01) : si.smoo; f = nentry("[1]Peak Frequency[unit:Hz]",freq,20,20000,1) : si.smoo; b = f/hslider("[2]Bandwidth[style:knob][unit:Hz]",1,1,50,0.01) : si.smoo; }; }; subtractive = waveGenerator : filters : eq(nBands); // subtractive = waveGenerator : filters(nBands); envelope = hgroup("[2]Envelope",en.adsr(attack,decay,sustain,release,gate)*gain*0.3) with{ attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001; decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001; sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1); release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001; gain = hslider("[4]gain[style:knob]",1,0,1,0.01); gate = button("[5]gate"); }; process = vgroup("Subtractive Synthesizer",subtractive*envelope);
https://raw.githubusercontent.com/gllmp/gcode/35eef207fa7a08e0d5719582de0cdf5e423f7b8d/src/assets/software/src/filters-eq.dsp
faust
declare name "equalizer"; import("stdfaust.lib"); peakeq (f) = hgroup("band %f", fi.peak_eq_cq(level,f,Q) with { level = vslider("level[unit:dB][style:knob]", 0, -70, 12, 1); Q = vslider("Q[style:knob]", 1, 1, 100, 0.01); }); process = no.noise : hgroup("Equalizer", seq(i, 5, peakeq(500+500*i))); filters = seq(i,2,someFilter(i)) with{ someFilter(i) = filter(a,b,c(i)) with{ freq = hslider("LFOFreq%i",...); a = LFO(freq)*i; b = LFO(freq)*i*2; c(0) = 1; c(1) = 2; }; }; nBands = 8; filterBank(N) = hgroup("Filter Bank",seq(i,N,peakeq(i))) with { peakeq(j) = vgroup("[%j]Band %a",fi.peak_eq(l,f,b)) with { a = j+1; l = vslider("[2]Level[unit:db]",0,-70,12,0.01) : si.smoo; f = nentry("[1]Freq",(80+(1000*8/N*(j+1)-80)),20,20000,0.01) : si.smoo; b = f/hslider("[0]Q[style:knob]",1,1,50,0.01) : si.smoo; }; }; // process = filterBank(nBands); lfoFreq = hslider("LFO Frequency[style:knob]",10,0.1,20,0.01); lfoDepth = hslider("LFO Depth[style:knob]",500,1,10000,1); LFO(freq) = os.osc(lfoFreq)*lfoDepth + freq : max(30); nBands = 4; filters(N) = hgroup("Filter Bank",seq(i,N,peakeq(i))) with{ peakeq(i) = vgroup("[%i]Band %index",fi.peak_eq(l,f,b)) with{ index = i+1; // freq = hslider("LFOFreq%index",2000,50,10000,0.1); freq = 1000 * index; l = vslider("Level[unit:db]",0,-70,12,0.01) : si.smoo; f = nentry("Freq",1000*index,20,20000,1) : si.smoo; b = LFO(freq)/hslider("Q[style:knob]",1,1,50,0.01) : si.smoo; }; }; freq = hslider("LFOFreq%index",2000,50,10000,0.1); subtractive = waveGenerator : filters(nBands);
import("stdfaust.lib"); waveGenerator = hgroup("[0]Wave Generator",no.noise,os.triangle(freq),os.square(freq),os.sawtooth(freq) : ba.selectn(4,wave)) : _ <:_,_,_ with{ wave = nentry("[0]Waveform",3,0,3,1); freq = hslider("[1]freq",440,50,2000,0.01); }; filters = hgroup("[1]Filter", fi.resonlp(resFreq,q,1), fi.resonhp(resFreq,q,1), fi.resonbp(resFreq,q,1) : ba.selectn(3,filters)) : _ with{ filters = nentry("[0]Filter Type", 0, 0, 2, 1); ctFreq = hslider("[1]Cutoff Frequency[style:knob]",2000,50,10000,0.1); q = hslider("[2]Q[style:knob]",5,1,30,0.1); lfoFreq = hslider("[3]LFO Frequency[style:knob]",10,0.1,20,0.01); lfoDepth = hslider("[4]LFO Depth[style:knob]",500,1,10000,1); resFreq = os.osc(lfoFreq)*lfoDepth + ctFreq : max(30); }; lfoFreq = hslider("LFO Frequency[style:knob]",10,0.1,20,0.01); lfoDepth = hslider("LFO Depth[style:knob]",500,1,10000,1); LFO(freq) = os.osc(lfoFreq)*lfoDepth + freq : max(30); nBands = 4; eq(N) = hgroup("Peak EQ",seq(i,N,peakeq(i))) with{ peakeq(i) = vgroup("[%i]Band %index",fi.peak_eq(l,f,b)) with{ index = i+1; freq = 1000 * index; l = vslider("[0]Level[unit:db]",0,-70,12,0.01) : si.smoo; f = nentry("[1]Peak Frequency[unit:Hz]",freq,20,20000,1) : si.smoo; b = f/hslider("[2]Bandwidth[style:knob][unit:Hz]",1,1,50,0.01) : si.smoo; }; }; subtractive = waveGenerator : filters : eq(nBands); envelope = hgroup("[2]Envelope",en.adsr(attack,decay,sustain,release,gate)*gain*0.3) with{ attack = hslider("[0]Attack[style:knob]",50,1,1000,1)*0.001; decay = hslider("[1]Decay[style:knob]",50,1,1000,1)*0.001; sustain = hslider("[2]Sustain[style:knob]",0.8,0.01,1,1); release = hslider("[3]Release[style:knob]",50,1,1000,1)*0.001; gain = hslider("[4]gain[style:knob]",1,0,1,0.01); gate = button("[5]gate"); }; process = vgroup("Subtractive Synthesizer",subtractive*envelope);
7f75eaea628676eeb3d1b573b5cc6f29865c1b18f2435658bc6933cca7b7fe0c
rmichon/faustwebui
newUI0.dsp
import("stdfaust.lib"); // could change poisition parameters, for example make som elements bigger // than others declare UI "[ {'/synth/freq':[{'style':'hslider','width':'50%'}]}, {'/synth/gate':[{'style':'checkbox'}]}, {'/synth':[{'style':'hgroup'}]} ]"; // another option: replace the group by an interface ivolving multiple // parameters declare UI "[ {'/synth':[{'style':'xy','x':'freq','y':'gain'}]} ]"; // or a full smartkeyb interface declare UI "[ {'/synth':[{'style':'smartkeyboard','Number of Keyboards':'5'}]} ]"; freq = nentry("freq",400,50,2000,0.01); gain = nentry("gain[style:knob]",0.5,0,1,0.01); gate = button("gate"); process = group("synth",os.sawtooth(freq)*gain*gate);
https://raw.githubusercontent.com/rmichon/faustwebui/beefaa788c3d67201f30054213b09d516a4fa3dc/newUI/newUI0.dsp
faust
could change poisition parameters, for example make som elements bigger than others another option: replace the group by an interface ivolving multiple parameters or a full smartkeyb interface
import("stdfaust.lib"); declare UI "[ {'/synth/freq':[{'style':'hslider','width':'50%'}]}, {'/synth/gate':[{'style':'checkbox'}]}, {'/synth':[{'style':'hgroup'}]} ]"; declare UI "[ {'/synth':[{'style':'xy','x':'freq','y':'gain'}]} ]"; declare UI "[ {'/synth':[{'style':'smartkeyboard','Number of Keyboards':'5'}]} ]"; freq = nentry("freq",400,50,2000,0.01); gain = nentry("gain[style:knob]",0.5,0,1,0.01); gate = button("gate"); process = group("synth",os.sawtooth(freq)*gain*gate);
026d454a5a2db9efb7ed50f5cae6174f4e08e8b7b72c0a13e19a49c5058a8533
funkyfourier/spitback
faustpeakeq.dsp
import("stdfaust.lib"); freqMid = hslider("freqMid",2200,400,3500,0.1); gainMid = hslider("gainMid",0,-48,48,0.1); qMid = hslider("qMid",50,0,3000,0.1); process = _ : fi.peak_eq(gainMid, freqMid, qMid) : _;
https://raw.githubusercontent.com/funkyfourier/spitback/c3b1831e2bd1ac9272652309d4fb3d2847f0a67b/externals/src/faustpeakeq/faustpeakeq.dsp
faust
import("stdfaust.lib"); freqMid = hslider("freqMid",2200,400,3500,0.1); gainMid = hslider("gainMid",0,-48,48,0.1); qMid = hslider("qMid",50,0,3000,0.1); process = _ : fi.peak_eq(gainMid, freqMid, qMid) : _;