_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
|
---|---|---|---|---|---|---|---|
49039b1eb8217c4ebf01eb27bdcc7d1cf0801c2326b8dbdd8e8bb96e7c4b3059 | rottingsounds/bitDSP-faust | ca.dsp | // This is a simple example showing pattern-formation through
// elementary cellular automata. The cellular automata function
// is called with four integer arguments: size of the circular lattice;
// the rule that determines the next state of each cell; the initial
// state of the cells; the iteration rate.
//
// The size of the lattice also determines the number of outputs of the
// function. The patterns can be displayed easily compiling the
// faust2csvplot program as indicated below.
declare name "ca";
declare description "Elementary cellular automata – size-16 lattice example; rule 110";
declare author "Dario Sanfilippo";
declare reference "Stephen Wolfram – A New Kind of Science (2002)";
import("stdfaust.lib");
bitBus = library("bitDSP_bitBus.lib");
// plot
// CXXFLAGS="-I ../include" faust2csvplot -double -I ../lib ca-example.dsp
// ./ca-example -n 50
// compile
// CXXFLAGS="-I ../../../include" faust2caqt -double -I ../lib ca-example.dsp
// ./ca-example
process = bitBus.eca(16, 110, 24, ma.SR);
| https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/examples/ca.dsp | faust | This is a simple example showing pattern-formation through
elementary cellular automata. The cellular automata function
is called with four integer arguments: size of the circular lattice;
the rule that determines the next state of each cell; the initial
state of the cells; the iteration rate.
The size of the lattice also determines the number of outputs of the
function. The patterns can be displayed easily compiling the
faust2csvplot program as indicated below.
plot
CXXFLAGS="-I ../include" faust2csvplot -double -I ../lib ca-example.dsp
./ca-example -n 50
compile
CXXFLAGS="-I ../../../include" faust2caqt -double -I ../lib ca-example.dsp
./ca-example |
declare name "ca";
declare description "Elementary cellular automata – size-16 lattice example; rule 110";
declare author "Dario Sanfilippo";
declare reference "Stephen Wolfram – A New Kind of Science (2002)";
import("stdfaust.lib");
bitBus = library("bitDSP_bitBus.lib");
process = bitBus.eca(16, 110, 24, ma.SR);
|
7ed8741eaa65eec19727d603d1f5dd21dfdf030e86208ef7887a05106ce710f0 | SpotlightKid/faustfilters | korg35hpf.dsp | declare name "Korg35HPF";
declare description "FAUST Korg 35 24 dB HPF";
declare author "Eric Tarr";
declare license "MIT-style STK-4.3 license";
import("stdfaust.lib");
//===================================Korg 35 Filters======================================
// The following filters are virtual analog models of the Korg 35 low-pass
// filter and high-pass filter found in the MS-10 and MS-20 synthesizers.
// The virtual analog models for the LPF and HPF are different, making these
// filters more interesting than simply tapping different states of the same
// circuit.
//
// These filters were implemented in Faust by Eric Tarr during the
// [2019 Embedded DSP With Faust Workshop](https://ccrma.stanford.edu/workshops/faust-embedded-19/).
//
// Modified by Christopher Arndt to change the cutoff frequency param
// to be given in Hertz instead of normalized 0.0 - 1.0.
//
// #### Filter history:
//
// <https://secretlifeofsynthesizers.com/the-korg-35-filter/>
//========================================================================================
//------------------`korg35HPF`-----------------
// Virtual analog models of the Korg 35 high-pass filter found in the MS-10 and
// MS-20 synthesizers.
//
// #### Usage
//
// ```
// _ : korg35HPF(normFreq,Q) : _
// ```
//
// Where:
//
// * `freq`: cutoff frequency (20-20000 Hz)
// * `Q`: q (0.5 - 10.0)
//---------------------------------------------------------------------
declare korg35HPF author "Eric Tarr";
declare korg35HPF license "MIT-style STK-4.3 license";
korg35HPF(freq,Q) = _ <: (s1,s2,s3,y) : !,!,!,_
letrec{
's1 = _-s1:_*(alpha*2):_+s1;
's2 = _<:(_-s1:_*alpha:_+s1)*-1,_:>_+(s3*B3):_+(s2*B2):_*alpha0:_*K:_-s2:_*alpha*2:_+s2;
's3 = _<:(_-s1:_*alpha:_+s1)*-1,_:>_+(s3*B3):_+(s2*B2):_*alpha0:_*K:_<:(_-s2:_*alpha:_+s2)*-1,_:>_-s3:_*alpha*2:_+s3;
'y = _<:(_-s1:_*alpha:_+s1)*-1,_:>_+(s3*B3):_+(s2*B2):_*alpha0;
}
with{
// freq = 2*(10^(3*normFreq+1));
K = 2.0*(Q - 0.707)/(10.0 - 0.707);
wd = 2*ma.PI*freq;
T = 1/ma.SR;
wa = (2/T)*tan(wd*T/2);
g = wa*T/2;
G = g/(1.0 + g);
alpha = G;
B3 = 1.0/(1.0 + g);
B2 = -1.0*G/(1.0 + g);
alpha0 = 1/(1 - K*G + K*G*G);
};
q = hslider("[1]Q[symbol: q][abbrev: q][style:knob]", 1.0, 0.5, 10.0, 0.01);
cutoff = hslider("[0]Cutoff frequency[symbol: cutoff][abbrev: cutoff][unit: hz][scale: log][style: knob]", 20000.0, 20.0, 20000, 0.1):si.smoo;
process = korg35HPF(cutoff, q);
| https://raw.githubusercontent.com/SpotlightKid/faustfilters/8dfb35de7b83935806abe950187e056623b6c01a/faust/korg35hpf.dsp | faust | ===================================Korg 35 Filters======================================
The following filters are virtual analog models of the Korg 35 low-pass
filter and high-pass filter found in the MS-10 and MS-20 synthesizers.
The virtual analog models for the LPF and HPF are different, making these
filters more interesting than simply tapping different states of the same
circuit.
These filters were implemented in Faust by Eric Tarr during the
[2019 Embedded DSP With Faust Workshop](https://ccrma.stanford.edu/workshops/faust-embedded-19/).
Modified by Christopher Arndt to change the cutoff frequency param
to be given in Hertz instead of normalized 0.0 - 1.0.
#### Filter history:
<https://secretlifeofsynthesizers.com/the-korg-35-filter/>
========================================================================================
------------------`korg35HPF`-----------------
Virtual analog models of the Korg 35 high-pass filter found in the MS-10 and
MS-20 synthesizers.
#### Usage
```
_ : korg35HPF(normFreq,Q) : _
```
Where:
* `freq`: cutoff frequency (20-20000 Hz)
* `Q`: q (0.5 - 10.0)
---------------------------------------------------------------------
freq = 2*(10^(3*normFreq+1)); | declare name "Korg35HPF";
declare description "FAUST Korg 35 24 dB HPF";
declare author "Eric Tarr";
declare license "MIT-style STK-4.3 license";
import("stdfaust.lib");
declare korg35HPF author "Eric Tarr";
declare korg35HPF license "MIT-style STK-4.3 license";
korg35HPF(freq,Q) = _ <: (s1,s2,s3,y) : !,!,!,_
letrec{
's1 = _-s1:_*(alpha*2):_+s1;
's2 = _<:(_-s1:_*alpha:_+s1)*-1,_:>_+(s3*B3):_+(s2*B2):_*alpha0:_*K:_-s2:_*alpha*2:_+s2;
's3 = _<:(_-s1:_*alpha:_+s1)*-1,_:>_+(s3*B3):_+(s2*B2):_*alpha0:_*K:_<:(_-s2:_*alpha:_+s2)*-1,_:>_-s3:_*alpha*2:_+s3;
'y = _<:(_-s1:_*alpha:_+s1)*-1,_:>_+(s3*B3):_+(s2*B2):_*alpha0;
}
with{
K = 2.0*(Q - 0.707)/(10.0 - 0.707);
wd = 2*ma.PI*freq;
T = 1/ma.SR;
wa = (2/T)*tan(wd*T/2);
g = wa*T/2;
G = g/(1.0 + g);
alpha = G;
B3 = 1.0/(1.0 + g);
B2 = -1.0*G/(1.0 + g);
alpha0 = 1/(1 - K*G + K*G*G);
};
q = hslider("[1]Q[symbol: q][abbrev: q][style:knob]", 1.0, 0.5, 10.0, 0.01);
cutoff = hslider("[0]Cutoff frequency[symbol: cutoff][abbrev: cutoff][unit: hz][scale: log][style: knob]", 20000.0, 20.0, 20000, 0.1):si.smoo;
process = korg35HPF(cutoff, q);
|
bb7836e2967e0e8dddeb484ddb0c7be6ce1d3ebe2a9ec76707e28d8779b9158c | SpotlightKid/faustfilters | korg35lpf.dsp | declare name "Korg35LPF";
declare description "FAUST Korg 35 24 dB LPF";
declare author "Christopher Arndt";
declare license "MIT-style STK-4.3 license";
import("stdfaust.lib");
//===================================Korg 35 Filters======================================
// The following filters are virtual analog models of the Korg 35 low-pass
// filter and high-pass filter found in the MS-10 and MS-20 synthesizers.
// The virtual analog models for the LPF and HPF are different, making these
// filters more interesting than simply tapping different states of the same
// circuit.
//
// These filters were implemented in Faust by Eric Tarr during the
// [2019 Embedded DSP With Faust Workshop](https://ccrma.stanford.edu/workshops/faust-embedded-19/).
//
// Modified by Christopher Arndt to change the cutoff frequency param
// to be given in Hertz instead of normalized 0.0 - 1.0.
//
// #### Filter history:
//
// <https://secretlifeofsynthesizers.com/the-korg-35-filter/>
//========================================================================================
//------------------`korg35LPF`-----------------
// Virtual analog models of the Korg 35 low-pass filter found in the MS-10 and
// MS-20 synthesizers.
//
// #### Usage
//
// ```
// _ : korg35LPF(normFreq,Q) : _
// ```
//
// Where:
//
// * `freq`: cutoff frequency (20-20000 Hz)
// * `Q`: q (0.5 - 10.0)
//---------------------------------------------------------------------
declare korg35LPF author "Eric Tarr";
declare korg35LPF license "MIT-style STK-4.3 license";
korg35LPF(freq,Q) = _ <: (s1,s2,s3,y) : !,!,!,_
letrec{
's1 = _-s1:_*(alpha*2):_+s1;
's2 = _-s1:_*alpha:_+s1:_+(s3*B3):_+(s2*B2):_*alpha0:_-s3:_*alpha:_+s3:_*K:_-s2:_*(alpha*2):_+s2;
's3 = _-s1:_*alpha:_+s1:_+(s3*B3):_+(s2*B2):_*alpha0:_-s3:_*(alpha*2):_+s3;
'y = _-s1:_*alpha:_+s1:_+(s3*B3):_+(s2*B2) :_*alpha0:_-s3:_*alpha:_+s3;
}
with{
// freq = 2*(10^(3*normFreq+1));
K = 2.0*(Q - 0.707)/(10.0 - 0.707);
wd = 2*ma.PI*freq;
T = 1/ma.SR;
wa = (2/T)*tan(wd*T/2);
g = wa*T/2;
G = g/(1.0 + g);
alpha = G;
B3 = (K - K*G)/(1 + g);
B2 = -1/(1 + g);
alpha0 = 1/(1 - K*G + K*G*G);
};
q = hslider("[1]Q[symbol: q][abbrev: q][style:knob]", 1.0, 0.5, 10.0, 0.01);
cutoff = hslider("[0]Cutoff frequency[symbol: cutoff][abbrev: cutoff][unit: hz][scale: log][style: knob]", 20000.0, 20.0, 20000, 0.1):si.smoo;
process = korg35LPF(cutoff, q);
| https://raw.githubusercontent.com/SpotlightKid/faustfilters/8dfb35de7b83935806abe950187e056623b6c01a/faust/korg35lpf.dsp | faust | ===================================Korg 35 Filters======================================
The following filters are virtual analog models of the Korg 35 low-pass
filter and high-pass filter found in the MS-10 and MS-20 synthesizers.
The virtual analog models for the LPF and HPF are different, making these
filters more interesting than simply tapping different states of the same
circuit.
These filters were implemented in Faust by Eric Tarr during the
[2019 Embedded DSP With Faust Workshop](https://ccrma.stanford.edu/workshops/faust-embedded-19/).
Modified by Christopher Arndt to change the cutoff frequency param
to be given in Hertz instead of normalized 0.0 - 1.0.
#### Filter history:
<https://secretlifeofsynthesizers.com/the-korg-35-filter/>
========================================================================================
------------------`korg35LPF`-----------------
Virtual analog models of the Korg 35 low-pass filter found in the MS-10 and
MS-20 synthesizers.
#### Usage
```
_ : korg35LPF(normFreq,Q) : _
```
Where:
* `freq`: cutoff frequency (20-20000 Hz)
* `Q`: q (0.5 - 10.0)
---------------------------------------------------------------------
freq = 2*(10^(3*normFreq+1)); | declare name "Korg35LPF";
declare description "FAUST Korg 35 24 dB LPF";
declare author "Christopher Arndt";
declare license "MIT-style STK-4.3 license";
import("stdfaust.lib");
declare korg35LPF author "Eric Tarr";
declare korg35LPF license "MIT-style STK-4.3 license";
korg35LPF(freq,Q) = _ <: (s1,s2,s3,y) : !,!,!,_
letrec{
's1 = _-s1:_*(alpha*2):_+s1;
's2 = _-s1:_*alpha:_+s1:_+(s3*B3):_+(s2*B2):_*alpha0:_-s3:_*alpha:_+s3:_*K:_-s2:_*(alpha*2):_+s2;
's3 = _-s1:_*alpha:_+s1:_+(s3*B3):_+(s2*B2):_*alpha0:_-s3:_*(alpha*2):_+s3;
'y = _-s1:_*alpha:_+s1:_+(s3*B3):_+(s2*B2) :_*alpha0:_-s3:_*alpha:_+s3;
}
with{
K = 2.0*(Q - 0.707)/(10.0 - 0.707);
wd = 2*ma.PI*freq;
T = 1/ma.SR;
wa = (2/T)*tan(wd*T/2);
g = wa*T/2;
G = g/(1.0 + g);
alpha = G;
B3 = (K - K*G)/(1 + g);
B2 = -1/(1 + g);
alpha0 = 1/(1 - K*G + K*G*G);
};
q = hslider("[1]Q[symbol: q][abbrev: q][style:knob]", 1.0, 0.5, 10.0, 0.01);
cutoff = hslider("[0]Cutoff frequency[symbol: cutoff][abbrev: cutoff][unit: hz][scale: log][style: knob]", 20000.0, 20.0, 20000, 0.1):si.smoo;
process = korg35LPF(cutoff, q);
|
ab490387c7aad2d9560b61b65e4dd0af49864e743b0ca0304e3e51d28d30d425 | Sylcantor/wam-web-components | Kpp_fuzz.dsp | /*
* Copyright (C) 2018-2020 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
*/
/*
* This plugin is a vintage fuzz pedal emulator.
*
* Process chain:
*
* input->pre_filter->*drive_knob->fuzz->tone->*volume_knob->output
*
* pre-filter - lowpass, 1 order, 1720 Hz. Emulates effect
* of low impedance of vintage pedal.
*
* distortion - 2 cascades, asymmetric distortion and clipper.
* Emulates distortion of old bad class A transistor cascades.
* tone - highshelf 720 Hz.
*/
declare name "kpp_fuzz";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "1.2";
import("stdfaust.lib");
process = output with {
// Bypass button, 0 - pedal on, 1 -pedal off (bypass on)
bypass = checkbox("99_bypass");
fuzz = vslider("fuzz[style:knobs]",50,0,100,0.01);
tone = vslider("tone[style:knobs]",-7.5,-15,0,0.1);
volume = vslider("volume[style:knobs]",0.5,0,1,0.001);
clamp = min(2.0) : max(-2.0);
pre_filter = fi.dcblocker : fi.lowpass(1, 2000.0);
biaser(Uin) = Uout letrec {
'Ulimited = Uin : max(-50.0 + Ubias) : -(Ubias);
'Ubias = min(Ubias + 100.0*Ulimited/ma.SR - 0.0*Ubias/ma.SR, 2000.0);
'Uout = Uin - Ubias;
};
distortion = *(100.0) : *(ba.db2linear(fuzz/5.0) - 1.0) : biaser :
*(ba.db2linear(fuzz/100.0*6.0)) :
max(-50.0) : min(100.0) : fi.dcblocker;
filter = fi.high_shelf(tone + 12.5, 720.0);
stomp = pre_filter : filter : distortion :
*(ba.db2linear(volume * 25.0 ) / 100.0) :
/(20.0);
output = _,_ : + : ba.bypass1(bypass, stomp) <: _,_;
}; | https://raw.githubusercontent.com/Sylcantor/wam-web-components/c54352dae5b80bcf6d8d4c306ea22e2c91a12b08/plugins/Kpp_fuzz/Kpp_fuzz.dsp | faust |
* Copyright (C) 2018-2020 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
* This plugin is a vintage fuzz pedal emulator.
*
* Process chain:
*
* input->pre_filter->*drive_knob->fuzz->tone->*volume_knob->output
*
* pre-filter - lowpass, 1 order, 1720 Hz. Emulates effect
* of low impedance of vintage pedal.
*
* distortion - 2 cascades, asymmetric distortion and clipper.
* Emulates distortion of old bad class A transistor cascades.
* tone - highshelf 720 Hz.
Bypass button, 0 - pedal on, 1 -pedal off (bypass on) |
declare name "kpp_fuzz";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "1.2";
import("stdfaust.lib");
process = output with {
bypass = checkbox("99_bypass");
fuzz = vslider("fuzz[style:knobs]",50,0,100,0.01);
tone = vslider("tone[style:knobs]",-7.5,-15,0,0.1);
volume = vslider("volume[style:knobs]",0.5,0,1,0.001);
clamp = min(2.0) : max(-2.0);
pre_filter = fi.dcblocker : fi.lowpass(1, 2000.0);
biaser(Uin) = Uout letrec {
'Ulimited = Uin : max(-50.0 + Ubias) : -(Ubias);
'Ubias = min(Ubias + 100.0*Ulimited/ma.SR - 0.0*Ubias/ma.SR, 2000.0);
'Uout = Uin - Ubias;
};
distortion = *(100.0) : *(ba.db2linear(fuzz/5.0) - 1.0) : biaser :
*(ba.db2linear(fuzz/100.0*6.0)) :
max(-50.0) : min(100.0) : fi.dcblocker;
filter = fi.high_shelf(tone + 12.5, 720.0);
stomp = pre_filter : filter : distortion :
*(ba.db2linear(volume * 25.0 ) / 100.0) :
/(20.0);
output = _,_ : + : ba.bypass1(bypass, stomp) <: _,_;
}; |
7eb6c378874ffe24c117b48c757a02f710db2eb09bb67616a057875ae99854ba | Sylcantor/wam-web-components | deathgate.dsp | /*
* Copyright (C) 2018 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
*/
/*
* This pugin is effective noise gate.
*
* Process chain:
*
* input->deadzone->multigate->output
*
* deadzone - INSTANTLY eliminates the signal below the threshold level.
* This kills noise in pauses but distorts the signal around zero level.
*
* multigate - 7-band noise gate. The input signal is divided into 7 frequency bands.
* In each band, the signal is eliminated when falling below the
* threshold level with attack time 10 ms, hold time 100 ms, release
* time 20 ms.
*
*/
declare name "kpp_deadgate";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "0.1b";
import("stdfaust.lib");
process = output with {
deadzone_knob = ba.db2linear(vslider("DeadZone[style:knob]", -100, -120, 0, 0.001));
noizegate_knob = vslider("NoiseGate[style:knob]", -120, -120, 0, 0.001);
deadzone = _ <: (max(deadzone_knob) : -(deadzone_knob)),
(min(-deadzone_knob) : +(deadzone_knob)) : + ;
multigate = _ : fi.filterbank(3, (65, 150, 300, 600, 1200, 2400)) :
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02) :> _;
output = _,_ :> fi.highpass(1,10) : deadzone : multigate <: _,_ ;
}; | https://raw.githubusercontent.com/Sylcantor/wam-web-components/c54352dae5b80bcf6d8d4c306ea22e2c91a12b08/plugins/deathgate/deathgate.dsp | faust |
* Copyright (C) 2018 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
* This pugin is effective noise gate.
*
* Process chain:
*
* input->deadzone->multigate->output
*
* deadzone - INSTANTLY eliminates the signal below the threshold level.
* This kills noise in pauses but distorts the signal around zero level.
*
* multigate - 7-band noise gate. The input signal is divided into 7 frequency bands.
* In each band, the signal is eliminated when falling below the
* threshold level with attack time 10 ms, hold time 100 ms, release
* time 20 ms.
*
|
declare name "kpp_deadgate";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "0.1b";
import("stdfaust.lib");
process = output with {
deadzone_knob = ba.db2linear(vslider("DeadZone[style:knob]", -100, -120, 0, 0.001));
noizegate_knob = vslider("NoiseGate[style:knob]", -120, -120, 0, 0.001);
deadzone = _ <: (max(deadzone_knob) : -(deadzone_knob)),
(min(-deadzone_knob) : +(deadzone_knob)) : + ;
multigate = _ : fi.filterbank(3, (65, 150, 300, 600, 1200, 2400)) :
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02) :> _;
output = _,_ :> fi.highpass(1,10) : deadzone : multigate <: _,_ ;
}; |
fa6b2203b0c56695a3d2a4c68e550d0ec4b80f0d540480aedd7c3f3dafc3b78f | grame-cncm/smartfaust | sfGretchensCat.dsp | declare name "sfGretchenCat";
declare version "0.3";
declare author "Christophe Lebreton";
declare license "BSD";
declare copyright "SmartFaust - GRAME(c)2013-2018";
import("stdfaust.lib");
//-------------------- MAIN -------------------------------
process = FM_synth:*(out):max(-0.99):min(0.99)
with {
out = checkbox ("v:sfGretchen's Cat/ON/OFF"):si.smooth(0.998);
};
//-----------------------------------------------------------
// Defined Chroma Table of carrier FM synthesis
chroma = waveform {130.81, 138.59, 146.83, 155.56, 164.81, 174.61, 184.99,
195.99, 207.65, 220.00, 233.08, 246.94, 261.62, 277.18,
293.66, 311.12, 329.62, 349.22, 369.99, 391.99, 415.30,
440.00, 466.16, 493.88, 523.25, 554.36, 587.32, 622.25,
659.25, 698.45, 739.98, 783.99, 830.60, 880.00, 932.32,
987.76, 1046.50, 1108.73, 1174.65, 1244.50, 1318.51, 1396.91,
1479.97, 1567.98, 1661.21, 1760.00, 1864.65, 1975.53 };
readSoundFileChroma = int:rdtable(chroma);
//-----------------------------------------------------------
lowpassfilter = fi.lowpass(N,fc)
with {
fc = hslider("v:sfGretchen's Cat parameter(s)/high_cut [hidden:1] [acc:2 1 -10 0 10][color:0 255 0]",0.5,0.01,10,0.01):fi.lowpass(1,0.5);
N = 1; // order of filter
};
//-----------------------------------------------------------
// simple FM synthesis /////////////////////////////////
FM_synth = carrier_freq <: (*(harmonicity_ratio)<: os.osci,*(modulation_index):*),_:+:os.osci:*(vol)
with {
carrier_freq = hslider ( "v:sfGretchen's Cat parameter(s)/freq [acc:0 0 -10 0 10][color:255 0 0][hidden:1]",0,0,47,1):lowpassfilter:readSoundFileChroma;
harmonicity_ratio = hslider ( "v:sfGretchen's Cat parameter(s)/harmoni [color:255 0 0][acc:0 1 -10 0 10][hidden:1]",0.437,0.,10,0.001):lowpassfilter;
modulation_index = hslider ("v:sfGretchen's Cat parameter(s)/freqmod [acc:1 0 -10 0 10][color:255 255 0][hidden:1]", 0.6,0.,10,0.001):si.smooth(0.998);
vol = hslider ( "v:sfGretchen's Cat parameter(s)/vol [acc:0 0 -10 0 10] [color:255 0 0][hidden:1]",0.6,0,1,0.0001):lowpassfilter;
};
| https://raw.githubusercontent.com/grame-cncm/smartfaust/0a9c93ea7eda9899e1401402901848f221366c99/src/sfGretchensCat/sfGretchensCat.dsp | faust | -------------------- MAIN -------------------------------
-----------------------------------------------------------
Defined Chroma Table of carrier FM synthesis
-----------------------------------------------------------
order of filter
-----------------------------------------------------------
simple FM synthesis ///////////////////////////////// | declare name "sfGretchenCat";
declare version "0.3";
declare author "Christophe Lebreton";
declare license "BSD";
declare copyright "SmartFaust - GRAME(c)2013-2018";
import("stdfaust.lib");
process = FM_synth:*(out):max(-0.99):min(0.99)
with {
out = checkbox ("v:sfGretchen's Cat/ON/OFF"):si.smooth(0.998);
};
chroma = waveform {130.81, 138.59, 146.83, 155.56, 164.81, 174.61, 184.99,
195.99, 207.65, 220.00, 233.08, 246.94, 261.62, 277.18,
293.66, 311.12, 329.62, 349.22, 369.99, 391.99, 415.30,
440.00, 466.16, 493.88, 523.25, 554.36, 587.32, 622.25,
659.25, 698.45, 739.98, 783.99, 830.60, 880.00, 932.32,
987.76, 1046.50, 1108.73, 1174.65, 1244.50, 1318.51, 1396.91,
1479.97, 1567.98, 1661.21, 1760.00, 1864.65, 1975.53 };
readSoundFileChroma = int:rdtable(chroma);
lowpassfilter = fi.lowpass(N,fc)
with {
fc = hslider("v:sfGretchen's Cat parameter(s)/high_cut [hidden:1] [acc:2 1 -10 0 10][color:0 255 0]",0.5,0.01,10,0.01):fi.lowpass(1,0.5);
};
FM_synth = carrier_freq <: (*(harmonicity_ratio)<: os.osci,*(modulation_index):*),_:+:os.osci:*(vol)
with {
carrier_freq = hslider ( "v:sfGretchen's Cat parameter(s)/freq [acc:0 0 -10 0 10][color:255 0 0][hidden:1]",0,0,47,1):lowpassfilter:readSoundFileChroma;
harmonicity_ratio = hslider ( "v:sfGretchen's Cat parameter(s)/harmoni [color:255 0 0][acc:0 1 -10 0 10][hidden:1]",0.437,0.,10,0.001):lowpassfilter;
modulation_index = hslider ("v:sfGretchen's Cat parameter(s)/freqmod [acc:1 0 -10 0 10][color:255 255 0][hidden:1]", 0.6,0.,10,0.001):si.smooth(0.998);
vol = hslider ( "v:sfGretchen's Cat parameter(s)/vol [acc:0 0 -10 0 10] [color:255 0 0][hidden:1]",0.6,0,1,0.0001):lowpassfilter;
};
|
25e8d23d3455dff66c9897d0bf1641e16071453671d8205cb8aabf18316e87ee | rottingsounds/bitDSP-faust | LowPressure.dsp | declare name "LowPressure";
declare author "Till Bovermann";
declare reference "http://rottingsounds.org";
import("stdfaust.lib");
bit_gen = library("bitDSP_gen.lib");
// plot
// CXXFLAGS="-I ../include" faust2csvplot -I ../lib LowPressure.dsp
// ./boolOsc0 -n 10
// compile
// CXXFLAGS="-I ../../../include" faust2caqt -I ../lib -double LowPressure.dsp
// ./LowPressure
c1 = hslider("c1",0,0,1,0.001);
c2 = hslider("c2",0.5,0,1,0.001);
rot = hslider("rot",0.5,0, ma.PI, 0.001) : si.smoo;
lFreq = hslider("lFreq [scale:log]",100,25, 10000, 1) : si.smoo;
hFreq = hslider("hFreq [scale:log]",100,25, 10000, 1) : si.smoo;
vol = hslider("vol", 0, 0, 1, 0.0001) : si.smoo;
rotate2(r, x, y) = xout, yout with {
xout = cos(r) * x + sin(r) * y;
yout = cos(r) * y - sin(r) * x;
};
// process = bit_gen.lowPressure(c1, c2) : par(i, 2, (_ * vol));
process = bit_gen.lowPressure(c1, c2)
: par( i, 2, _ * vol)
: par( i, 2, _ * 2 -1 <: fi.svf.lp(lFreq, 20) - fi.svf.lp(hFreq, 50))
: rotate2(rot);
| https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/c436ecad29c57d46d5e3e59110c25e71a3761fc5/synths/LowPressure.dsp | faust | plot
CXXFLAGS="-I ../include" faust2csvplot -I ../lib LowPressure.dsp
./boolOsc0 -n 10
compile
CXXFLAGS="-I ../../../include" faust2caqt -I ../lib -double LowPressure.dsp
./LowPressure
process = bit_gen.lowPressure(c1, c2) : par(i, 2, (_ * vol)); | declare name "LowPressure";
declare author "Till Bovermann";
declare reference "http://rottingsounds.org";
import("stdfaust.lib");
bit_gen = library("bitDSP_gen.lib");
c1 = hslider("c1",0,0,1,0.001);
c2 = hslider("c2",0.5,0,1,0.001);
rot = hslider("rot",0.5,0, ma.PI, 0.001) : si.smoo;
lFreq = hslider("lFreq [scale:log]",100,25, 10000, 1) : si.smoo;
hFreq = hslider("hFreq [scale:log]",100,25, 10000, 1) : si.smoo;
vol = hslider("vol", 0, 0, 1, 0.0001) : si.smoo;
rotate2(r, x, y) = xout, yout with {
xout = cos(r) * x + sin(r) * y;
yout = cos(r) * y - sin(r) * x;
};
process = bit_gen.lowPressure(c1, c2)
: par( i, 2, _ * vol)
: par( i, 2, _ * 2 -1 <: fi.svf.lp(lFreq, 20) - fi.svf.lp(hFreq, 50))
: rotate2(rot);
|
6a6a5f51e9e18ab59a4817ee2a058ffcbbf6ff46d3c658016e6fc303707d7ade | rottingsounds/bitDSP-faust | DSM2PCM.dsp | declare name "DSM2PCM";
declare author "Till Bovermann, Dario Sanfilippo";
declare reference "http://rottingsounds.org";
import("stdfaust.lib");
bit = library("bitDSP.lib");
// plot
// CXXFLAGS="-I ../include" faust2csvplot -double -I ../lib DSM2PCM.dsp
// ./DSM2PCM -n 10
// compile
// CXXFLAGS="-I ../../../include" faust2caqt -double -I ../lib DSM2PCM.dsp
// ./DSM2PCM
// SuperCollider
// export SUPERCOLLIDER_HEADERS=/localvol/sound/src/supercollider/include/
// faust2supercollider -double -I ../faust/bitDSP-faust/lib -noprefix DSM2PCM.dsp
// downsample_factor = hslider("downsample",2,2,64,2);
freq = hslider("freq", 100, 100, 192000, 0);
// Bipolar one-bit signal to bipolar multi-bit signal
// The process of low-passing corresponds to averaging
// The low-pass cut-off sets the target bandwidth
// The low-pass resolution of the coefficients sets the bitdepth
// The low-pass order determines the accuracy in the noise removal
// process = fi.lowpass(8, ma.SR / downsample_factor);
process = fi.lowpass(8, freq);
| https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/examples/_sc/DSM2PCM.dsp | faust | plot
CXXFLAGS="-I ../include" faust2csvplot -double -I ../lib DSM2PCM.dsp
./DSM2PCM -n 10
compile
CXXFLAGS="-I ../../../include" faust2caqt -double -I ../lib DSM2PCM.dsp
./DSM2PCM
SuperCollider
export SUPERCOLLIDER_HEADERS=/localvol/sound/src/supercollider/include/
faust2supercollider -double -I ../faust/bitDSP-faust/lib -noprefix DSM2PCM.dsp
downsample_factor = hslider("downsample",2,2,64,2);
Bipolar one-bit signal to bipolar multi-bit signal
The process of low-passing corresponds to averaging
The low-pass cut-off sets the target bandwidth
The low-pass resolution of the coefficients sets the bitdepth
The low-pass order determines the accuracy in the noise removal
process = fi.lowpass(8, ma.SR / downsample_factor); | declare name "DSM2PCM";
declare author "Till Bovermann, Dario Sanfilippo";
declare reference "http://rottingsounds.org";
import("stdfaust.lib");
bit = library("bitDSP.lib");
freq = hslider("freq", 100, 100, 192000, 0);
process = fi.lowpass(8, freq);
|
0124dd8413cc39fd19963e5db04ba0143c8ac1eca2e576c1b24f1764b317f798 | madskjeldgaard/komet | madstorro.dsp | declare name "madstorro";
declare version "0.1";
declare author "Jakob Zerbian";
declare author "Mads Kjeldgaard";
declare description "Dattorro reverb, mono";
import("stdfaust.lib");
/*
This is a modified version of the datorro reverb that comes with faust.
The modification is to make it mono
*/
madstorro_rev(pre_delay, bw, i_diff1, i_diff2, decay, d_diff1, d_diff2, damping) =
si.bus(1) : *(0.5) : predelay : bw_filter : diffusion_network <: ((si.bus(2) :> _) ~ (reverb_network : ro.cross(1)))
with {
// allpass using delay with fixed size
allpass_f(t, a) = (+ <: @(t),*(a)) ~ *(-a) : mem,_ : +;
// input pre-delay and diffusion
predelay = @(pre_delay);
bw_filter = *(bw) : +~(mem : *(1-bw));
diffusion_network = allpass_f(142, i_diff1) : allpass_f(107, i_diff1) : allpass_f(379, i_diff2) : allpass_f(277, i_diff2);
// reverb loop
reverb_network = par(i, 1, block(i)) with {
d = (672, 908, 4453, 4217, 1800, 2656, 3720, 3163);
block(i) = allpass_f(ba.take(i+1, d),-d_diff1) : @(ba.take(i+3, d)) : damp :
allpass_f(ba.take(i+5, d), d_diff2) : @(ba.take(i+5, d)) : *(decay)
with {
damp = *(1-damping) : +~*(damping) : *(decay);
};
};
};
madstorrodemo = _ <: madstorro_rev(pre_delay, bw, i_diff1, i_diff2, decay, d_diff1, d_diff2, damping)
with {
pre_delay = 0;
bw = hslider("Prefilter",0.7,0.0,1.0,0.001) : si.smoo;
i_diff1 = hslider("InputDiffusion1",0.625,0.0,1.0,0.001) : si.smoo;
i_diff2 = hslider("InputDiffusion2",0.625,0.0,1.0,0.001) : si.smoo;
d_diff1 = hslider("DecayDiffusion1",0.625,0.0,1.0,0.001) : si.smoo;
d_diff2 = hslider("DecayDiffusion2",0.625,0.0,1.0,0.001) : si.smoo;
decay = hslider("DecayRate",0.7,0.0,1.0,0.001) : si.smoo;
damping = hslider("Damping",0.625,0.0,1.0,0.001) : si.smoo;
};
process = madstorrodemo;
| https://raw.githubusercontent.com/madskjeldgaard/komet/b7123007d7af668181d4741f6c9746b37fca8729/faust/madstorro.dsp | faust |
This is a modified version of the datorro reverb that comes with faust.
The modification is to make it mono
allpass using delay with fixed size
input pre-delay and diffusion
reverb loop | declare name "madstorro";
declare version "0.1";
declare author "Jakob Zerbian";
declare author "Mads Kjeldgaard";
declare description "Dattorro reverb, mono";
import("stdfaust.lib");
madstorro_rev(pre_delay, bw, i_diff1, i_diff2, decay, d_diff1, d_diff2, damping) =
si.bus(1) : *(0.5) : predelay : bw_filter : diffusion_network <: ((si.bus(2) :> _) ~ (reverb_network : ro.cross(1)))
with {
allpass_f(t, a) = (+ <: @(t),*(a)) ~ *(-a) : mem,_ : +;
predelay = @(pre_delay);
bw_filter = *(bw) : +~(mem : *(1-bw));
diffusion_network = allpass_f(142, i_diff1) : allpass_f(107, i_diff1) : allpass_f(379, i_diff2) : allpass_f(277, i_diff2);
reverb_network = par(i, 1, block(i)) with {
d = (672, 908, 4453, 4217, 1800, 2656, 3720, 3163);
block(i) = allpass_f(ba.take(i+1, d),-d_diff1) : @(ba.take(i+3, d)) : damp :
allpass_f(ba.take(i+5, d), d_diff2) : @(ba.take(i+5, d)) : *(decay)
with {
damp = *(1-damping) : +~*(damping) : *(decay);
};
};
};
madstorrodemo = _ <: madstorro_rev(pre_delay, bw, i_diff1, i_diff2, decay, d_diff1, d_diff2, damping)
with {
pre_delay = 0;
bw = hslider("Prefilter",0.7,0.0,1.0,0.001) : si.smoo;
i_diff1 = hslider("InputDiffusion1",0.625,0.0,1.0,0.001) : si.smoo;
i_diff2 = hslider("InputDiffusion2",0.625,0.0,1.0,0.001) : si.smoo;
d_diff1 = hslider("DecayDiffusion1",0.625,0.0,1.0,0.001) : si.smoo;
d_diff2 = hslider("DecayDiffusion2",0.625,0.0,1.0,0.001) : si.smoo;
decay = hslider("DecayRate",0.7,0.0,1.0,0.001) : si.smoo;
damping = hslider("Damping",0.625,0.0,1.0,0.001) : si.smoo;
};
process = madstorrodemo;
|
46168b59d5a51ee79a3c368223fe6226bba817a7908fcc8bfb53277f291d0673 | DBraun/DawDreamer | polyphonic_wavetable.dsp | declare name "MyInstrument";
declare options "[nvoices:8]"; // FaustProcessor has a property which will override this.
import("stdfaust.lib");
// This example demonstrates using lagrange interpolation to improve
// the sampling of a short wavetable.
// Specifically, from Python we pass myCycle, 4 samples of a sine wave,
// so the values are {0, 1, 0, -1}.
// However, with Lagrange interpolation, we can turn these into a smooth sine wave!
// The following variable is excluded from this file because they come
// from substitution with Python.
// LAGRANGE_ORDER = 4; // lagrange order. [2-4] are good choices.
freq = hslider("freq",200,50,1000,0.01); // note pitch
gain = hslider("gain",0.1,0,1,0.01); // note velocity
gate = button("gate"); // note on/off
soundfile_full = soundfile("myCycle",1): _, !, _;
S = 0, 0 : soundfile_full : _, !;
soundfile_table = 0, _ : soundfile_full : !, _;
declare lagrangeCoeffs author "Dario Sanfilippo";
declare lagrangeCoeffs copyright "Copyright (C) 2021 Dario Sanfilippo
<[email protected]>";
declare lagrangeCoeffs license "MIT license";
// NOTE: this is a modification of the original it.frdtable so that
// it works with a soundfile
// https://github.com/grame-cncm/faustlibraries/blob/master/interpolators.lib
frdtable(N, S, init, idx) =
it.lagrangeN(N, f_idx, par(i, N + 1, table(i_idx - int(N / 2) + i)))
with {
table(j) = int(ma.modulo(j, S)) : init;
f_idx = ma.frac(idx) + int(N / 2);
i_idx = int(idx);
};
envVol = en.adsr(.002, 0.1, 0.9, .1, gate);
ridx = os.hs_phasor(S, freq, envVol == 0.); // or (abs(envVol) < 1e-4)
process = frdtable(LAGRANGE_ORDER, S, soundfile_table, ridx)*gain*envVol*0.5 <: _, _;
effect = _, _; | https://raw.githubusercontent.com/DBraun/DawDreamer/a67f66107ae02afc8334052dd9d806dbf93b4550/tests/faust_dsp/polyphonic_wavetable.dsp | faust | FaustProcessor has a property which will override this.
This example demonstrates using lagrange interpolation to improve
the sampling of a short wavetable.
Specifically, from Python we pass myCycle, 4 samples of a sine wave,
so the values are {0, 1, 0, -1}.
However, with Lagrange interpolation, we can turn these into a smooth sine wave!
The following variable is excluded from this file because they come
from substitution with Python.
LAGRANGE_ORDER = 4; // lagrange order. [2-4] are good choices.
note pitch
note velocity
note on/off
NOTE: this is a modification of the original it.frdtable so that
it works with a soundfile
https://github.com/grame-cncm/faustlibraries/blob/master/interpolators.lib
or (abs(envVol) < 1e-4) | declare name "MyInstrument";
import("stdfaust.lib");
soundfile_full = soundfile("myCycle",1): _, !, _;
S = 0, 0 : soundfile_full : _, !;
soundfile_table = 0, _ : soundfile_full : !, _;
declare lagrangeCoeffs author "Dario Sanfilippo";
declare lagrangeCoeffs copyright "Copyright (C) 2021 Dario Sanfilippo
<[email protected]>";
declare lagrangeCoeffs license "MIT license";
frdtable(N, S, init, idx) =
it.lagrangeN(N, f_idx, par(i, N + 1, table(i_idx - int(N / 2) + i)))
with {
table(j) = int(ma.modulo(j, S)) : init;
f_idx = ma.frac(idx) + int(N / 2);
i_idx = int(idx);
};
envVol = en.adsr(.002, 0.1, 0.9, .1, gate);
process = frdtable(LAGRANGE_ORDER, S, soundfile_table, ridx)*gain*envVol*0.5 <: _, _;
effect = _, _; |
0e9c54c68d60ebbaf06f88e9ee0b250c62cdd063c62e60cb0601ce7175904a6d | magnetophon/DigiDrie | oberheim_test.dsp | declare oberheim author "Eric Tarr";
declare oberheim license "MIT-style STK-4.3 license";
import("stdfaust.lib");
oberheimF(freq,Q) = _<:(s1,s2,ybsf,ybpf,yhpf,ylpf) : !,!,_,_,_,_
letrec{
's1 = _-s2:_-(s1*FBs1):_*alpha0:_*g<:_,(_+s1:ef.cubicnl(0.0,0)):>_;
's2 = _-s2:_-(s1*FBs1):_*alpha0:_*g:_+s1:ef.cubicnl(0.0,0):_*g*2:_+s2;
// Compute the BSF, BPF, HPF, LPF outputs
'ybsf = _-s2:_-(s1*FBs1):_*alpha0<:(_*g:_+s1:ef.cubicnl(0.0,0):_*g:_+s2),_:>_;
'ybpf = _-s2:_-(s1*FBs1):_*alpha0:_*g:_+s1:ef.cubicnl(0.0,0);
'yhpf = _-s2:_-(s1*FBs1):_*alpha0;
'ylpf = _-s2:_-(s1*FBs1):_*alpha0:_*g :_+s1:ef.cubicnl(0.0,0):_*g:_+s2;
}
with{
wd = 2*ma.PI*freq;
T = 1/ma.SR;
wa = (2/T)*tan(wd*T/2);
g = wa*T/2; // target.
R = 1/(2*Q);
FBs1 = (2*R+g); // target.
alpha0 = 1/(1 + 2*R*g + g*g); // target.
};
oberheimF_approx(freq,Q) = _<:(s1,s2,ybsf,ybpf,yhpf,ylpf) : !,!,_,_,_,_
letrec{
's1 = _-s2:_-(s1*FBs1):_*alpha0:_*g<:_,(_+s1:ef.cubicnl(0.0,0)):>_;
's2 = _-s2:_-(s1*FBs1):_*alpha0:_*g:_+s1:ef.cubicnl(0.0,0):_*g*2:_+s2;
// Compute the BSF, BPF, HPF, LPF outputs
'ybsf = _-s2:_-(s1*FBs1):_*alpha0<:(_*g:_+s1:ef.cubicnl(0.0,0):_*g:_+s2),_:>_;
'ybpf = _-s2:_-(s1*FBs1):_*alpha0:_*g:_+s1:ef.cubicnl(0.0,0);
'yhpf = _-s2:_-(s1*FBs1):_*alpha0;
'ylpf = _-s2:_-(s1*FBs1):_*alpha0:_*g :_+s1:ef.cubicnl(0.0,0):_*g:_+s2;
}
with{
// Only valid in [0, 0.498). 0.5 is nyquist frequency.
tan_halfpi_approx(x) = (
4.189308700355015e-05 +
4.290568649086532 * x +
-2.657498976290899 * x * x +
-1.5163927048819992 * x * x * x
) / (
1.3667229106607917 +
-0.8644224895636948 * x +
-4.828883069406347 * x * x +
2.181672945531366 * x * x * x
);
g = tan_halfpi_approx(freq / ma.SR);
R = 1/(2*Q);
FBs1 = (2*R+g);
alpha0 = 1/(1 + 2*R*g + g*g);
};
freq = hslider("normFreq", 124, -12, 124, 1e-5) : ba.pianokey2hz : min(20000);
Q = hslider("Q", 0.1, 0.1, 10, 1e-5);
process = _ <:
(oberheimF(freq, Q) : !, !, !, _),
(oberheimF_approx(freq, Q) : !, !, !, _);
| https://raw.githubusercontent.com/magnetophon/DigiDrie/a9f79d502e1f8d522e5f47e0c460ae99e80f9441/faust/benchmark/oberheim/oberheim_test.dsp | faust | Compute the BSF, BPF, HPF, LPF outputs
target.
target.
target.
Compute the BSF, BPF, HPF, LPF outputs
Only valid in [0, 0.498). 0.5 is nyquist frequency. | declare oberheim author "Eric Tarr";
declare oberheim license "MIT-style STK-4.3 license";
import("stdfaust.lib");
oberheimF(freq,Q) = _<:(s1,s2,ybsf,ybpf,yhpf,ylpf) : !,!,_,_,_,_
letrec{
's1 = _-s2:_-(s1*FBs1):_*alpha0:_*g<:_,(_+s1:ef.cubicnl(0.0,0)):>_;
's2 = _-s2:_-(s1*FBs1):_*alpha0:_*g:_+s1:ef.cubicnl(0.0,0):_*g*2:_+s2;
'ybsf = _-s2:_-(s1*FBs1):_*alpha0<:(_*g:_+s1:ef.cubicnl(0.0,0):_*g:_+s2),_:>_;
'ybpf = _-s2:_-(s1*FBs1):_*alpha0:_*g:_+s1:ef.cubicnl(0.0,0);
'yhpf = _-s2:_-(s1*FBs1):_*alpha0;
'ylpf = _-s2:_-(s1*FBs1):_*alpha0:_*g :_+s1:ef.cubicnl(0.0,0):_*g:_+s2;
}
with{
wd = 2*ma.PI*freq;
T = 1/ma.SR;
wa = (2/T)*tan(wd*T/2);
R = 1/(2*Q);
};
oberheimF_approx(freq,Q) = _<:(s1,s2,ybsf,ybpf,yhpf,ylpf) : !,!,_,_,_,_
letrec{
's1 = _-s2:_-(s1*FBs1):_*alpha0:_*g<:_,(_+s1:ef.cubicnl(0.0,0)):>_;
's2 = _-s2:_-(s1*FBs1):_*alpha0:_*g:_+s1:ef.cubicnl(0.0,0):_*g*2:_+s2;
'ybsf = _-s2:_-(s1*FBs1):_*alpha0<:(_*g:_+s1:ef.cubicnl(0.0,0):_*g:_+s2),_:>_;
'ybpf = _-s2:_-(s1*FBs1):_*alpha0:_*g:_+s1:ef.cubicnl(0.0,0);
'yhpf = _-s2:_-(s1*FBs1):_*alpha0;
'ylpf = _-s2:_-(s1*FBs1):_*alpha0:_*g :_+s1:ef.cubicnl(0.0,0):_*g:_+s2;
}
with{
tan_halfpi_approx(x) = (
4.189308700355015e-05 +
4.290568649086532 * x +
-2.657498976290899 * x * x +
-1.5163927048819992 * x * x * x
) / (
1.3667229106607917 +
-0.8644224895636948 * x +
-4.828883069406347 * x * x +
2.181672945531366 * x * x * x
);
g = tan_halfpi_approx(freq / ma.SR);
R = 1/(2*Q);
FBs1 = (2*R+g);
alpha0 = 1/(1 + 2*R*g + g*g);
};
freq = hslider("normFreq", 124, -12, 124, 1e-5) : ba.pianokey2hz : min(20000);
Q = hslider("Q", 0.1, 0.1, 10, 1e-5);
process = _ <:
(oberheimF(freq, Q) : !, !, !, _),
(oberheimF_approx(freq, Q) : !, !, !, _);
|
32c79d5b3c7c3ae28d9623b136034b44e71210fbc44a50c86a9482018a21c7c1 | pingdynasty/OwlPatches | HarpAuto.dsp | //-----------------------------------------------
// Kisana : 3-loops string instrument
// (based on Karplus-Strong)
//
//-----------------------------------------------
declare name "Kisana";
declare author "Yann Orlarey";
import("stdfaust.lib");
KEY = 60; // basic midi key
NCY = 15; // note cycle length
CCY = 15; // control cycle length
BPS = 360; // general tempo (beat per sec)
//-------------------------------kisana----------------------------------
// USAGE: kisana : _,_;
// 3-loops string instrument
//-----------------------------------------------------------------------
process = _,(harpe(C,9,48) :> *(l)) :> _
with {
l = hslider("Master[OWL:PARAMETER_D]",0, 0, 1, 0.01);
C = hslider("Timbre[OWL:PARAMETER_C]",0, 0, 1, 0.01);
};
//----------------------------------Harpe--------------------------------
// USAGE: harpe(C,10,60) : _,_;
// C is the filter coefficient 0..1
// Build a N (10) strings harpe using a pentatonic scale
// based on midi key b (60)
// Each string is triggered by a specific
// position of the "hand"
//-----------------------------------------------------------------------
harpe(C,N,b) = hand <: par(i, N, position(i+1)
: string(C,Penta(b).degree2Hz(i), att, lvl)
: pan((i+0.5)/N) )
:> _,_
with {
att = 4;
bpm = hslider("Rate[OWL:PARAMETER_B]", 360, 120, 640, 1)*2;
hand = hslider("Note[OWL:PARAMETER_A]", 0, 0, N, 1) : int : ba.automat(bpm, 15, 0.0);
lvl = 1;
pan(p) = _ <: *(sqrt(1-p)), *(sqrt(p));
position(a,x) = abs(x - a) < 0.5;
db2linear(x) = pow(10, x/20.0);
};
//----------------------------------Penta-------------------------------
// Pentatonic scale with degree to midi and degree to Hz conversion
// USAGE: Penta(60).degree2midi(3) ==> 67 midikey
// Penta(60).degree2Hz(4) ==> 440 Hz
//-----------------------------------------------------------------------
Penta(key) = environment {
A4Hz = 440;
degree2midi(0) = key+0;
degree2midi(1) = key+2;
degree2midi(2) = key+4;
degree2midi(3) = key+7;
degree2midi(4) = key+9;
degree2midi(d) = degree2midi(d-5)+12;
degree2Hz(d) = A4Hz*semiton(degree2midi(d)-69) with { semiton(n) = 2.0^(n/12.0); };
};
//----------------------------------String-------------------------------
// A karplus-strong string.
//
// USAGE: string(440Hz, 4s, 1.0, button("play"))
// or button("play") : string(440Hz, 4s, 1.0)
//-----------------------------------------------------------------------
string(coef, freq, t60, level, trig) = no.noise*level
: *(trig : trigger(freq2samples(freq)))
: resonator(freq2samples(freq), att)
with {
resonator(d,a) = (+ : @(d-1)) ~ (average : *(a));
average(x) = (x*(1+coef)+x'*(1-coef))/2;
trigger(n) = upfront : + ~ decay(n) : >(0.0);
upfront(x) = (x-x') > 0.0;
decay(n,x) = x - (x>0.0)/n;
freq2samples(f) = 44100.0/f;
att = pow(0.001,1.0/(freq*t60)); // attenuation coefficient
random = +(12345)~*(1103515245);
noise = random/2147483647.0;
};
| https://raw.githubusercontent.com/pingdynasty/OwlPatches/2be8a65bb257b53ee7ee0b9d4b5a1ad249e16dab/Faust/HarpAuto.dsp | faust | -----------------------------------------------
Kisana : 3-loops string instrument
(based on Karplus-Strong)
-----------------------------------------------
basic midi key
note cycle length
control cycle length
general tempo (beat per sec)
-------------------------------kisana----------------------------------
USAGE: kisana : _,_;
3-loops string instrument
-----------------------------------------------------------------------
----------------------------------Harpe--------------------------------
USAGE: harpe(C,10,60) : _,_;
C is the filter coefficient 0..1
Build a N (10) strings harpe using a pentatonic scale
based on midi key b (60)
Each string is triggered by a specific
position of the "hand"
-----------------------------------------------------------------------
----------------------------------Penta-------------------------------
Pentatonic scale with degree to midi and degree to Hz conversion
USAGE: Penta(60).degree2midi(3) ==> 67 midikey
Penta(60).degree2Hz(4) ==> 440 Hz
-----------------------------------------------------------------------
----------------------------------String-------------------------------
A karplus-strong string.
USAGE: string(440Hz, 4s, 1.0, button("play"))
or button("play") : string(440Hz, 4s, 1.0)
-----------------------------------------------------------------------
attenuation coefficient |
declare name "Kisana";
declare author "Yann Orlarey";
import("stdfaust.lib");
process = _,(harpe(C,9,48) :> *(l)) :> _
with {
l = hslider("Master[OWL:PARAMETER_D]",0, 0, 1, 0.01);
C = hslider("Timbre[OWL:PARAMETER_C]",0, 0, 1, 0.01);
};
harpe(C,N,b) = hand <: par(i, N, position(i+1)
: string(C,Penta(b).degree2Hz(i), att, lvl)
: pan((i+0.5)/N) )
:> _,_
with {
att = 4;
bpm = hslider("Rate[OWL:PARAMETER_B]", 360, 120, 640, 1)*2;
hand = hslider("Note[OWL:PARAMETER_A]", 0, 0, N, 1) : int : ba.automat(bpm, 15, 0.0);
lvl = 1;
pan(p) = _ <: *(sqrt(1-p)), *(sqrt(p));
position(a,x) = abs(x - a) < 0.5;
db2linear(x) = pow(10, x/20.0);
};
Penta(key) = environment {
A4Hz = 440;
degree2midi(0) = key+0;
degree2midi(1) = key+2;
degree2midi(2) = key+4;
degree2midi(3) = key+7;
degree2midi(4) = key+9;
degree2midi(d) = degree2midi(d-5)+12;
degree2Hz(d) = A4Hz*semiton(degree2midi(d)-69) with { semiton(n) = 2.0^(n/12.0); };
};
string(coef, freq, t60, level, trig) = no.noise*level
: *(trig : trigger(freq2samples(freq)))
: resonator(freq2samples(freq), att)
with {
resonator(d,a) = (+ : @(d-1)) ~ (average : *(a));
average(x) = (x*(1+coef)+x'*(1-coef))/2;
trigger(n) = upfront : + ~ decay(n) : >(0.0);
upfront(x) = (x-x') > 0.0;
decay(n,x) = x - (x>0.0)/n;
freq2samples(f) = 44100.0/f;
random = +(12345)~*(1103515245);
noise = random/2147483647.0;
};
|
c0ad723e3cfb9a559946a0be60ec7407fd98ae0e96b63a83f8b30e9ef7b5353c | magnetophon/faustOscillators | fof.dsp | declare author "Bart Brouns";
declare license "GPLv3";
declare name "fof";
import("stdfaust.lib");
import("CZ.lib");
// process =
// fof;
// adapted from:
// https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf
/////////////////////////////////////////////////////////////////////////////
// Hard-Syncing Wavetable Oscillator //
/////////////////////////////////////////////////////////////////////////////
// resettable phasor, clock val > 0 resets phase to 0
ph(f0,c)=
inc
:(+:d)~
(-(_<:(_,*(_,clk))))
:*(pl.tablesize)
with {
clk = c>0;
d = ma.decimal;
inc = f0/float(ma.SR);
};
// sin lookup table with resettable phase
oscpr(f0,c) =
rdtable(pl.tablesize
, os.sinwaveform(pl.tablesize)
, int(ph(f0,c)));
oscpr2(f0,c) =
fund(f0,0,c)
: basicCZosc(oscType,index,res);
// sinwaveform = float(time)*(2.0*PI)/float(tablesize) : sin;
// sinwaveform(tablesize) = float(ba.time)*(2.0*ma.PI)/float(tablesize) : sin;
///////////////////////////////////////////////////////////////////////////////
// FOF Generation System //
///////////////////////////////////////////////////////////////////////////////
// function to generate a single Formant-Wave-Function
fof(fc,bw,a,g) =
_ <: (_',_)
: (f * s)
with {
T
= 1/ma.SR;
// sampling period
pi = ma.PI;
u1 = exp(-a*pi*T);
u2 = exp(-bw*pi*T);
a1 = -1*(u1+u2);
a2 = u1*u2;
G0 = 1/(1+a1+a2);
// dc magnitude response
b0 = g/G0;
// normalized filter gain
s
= oscpr2(fc);
// wavetable oscillator
f
= fi.tf2(b0,0,0,a1,a2); // biquad filter
};
///////////////////////////////////////////////////////////////////////////////
// Cyclic Impulse Train Streams //
///////////////////////////////////////////////////////////////////////////////
// import the oscillator library
ol = library("oscillator.lib");
// impulse train at frequency f0
clk(f0) = (1-1')+ol.lf_imptrain(f0)';
// impulse train at frequency f0 split into n cycles
clkCycle(n,f0) = clk(f0) <: par(i,n,resetCtr(n,(i+1)));
// function that lets through the mth impulse out of
// each consecutive group of n impulses
resetCtr(n,m) = _ <: (_,ctr(n)) : (_,(_==m)) : *;
// function to count nonzero inputs and reset after
// receiving x of them
ctr(x) = (+(_)~(negSub(x)));
// function that subtracts value x from
// input stream value if input stream value >= x
negSub(x)= _<: (_>=x,_,_):((-1*_),_,_):((_*_),_):(_+_);
///////////////////////////////////////////////////////////////////////////////
// FOF with Sample-and-Hold //
///////////////////////////////////////////////////////////////////////////////
// sample and hold filter coefficients
curbw = (_,bw) : ba.latch;
cura = (_,a) : ba.latch;
// FOF sample and hold mechanism
fofSH =
_ <: (curbw,cura,_) : (fc,_,_,g,_') : fof ;
///////////////////////////////////////////////////////////////////////////////
// Example Program //
///////////////////////////////////////////////////////////////////////////////
/************** parameters/GUI controls **************/
// fundamental freq (in Hz)
f0 = hslider("f0",220,0,2000,0.01):si.smoo;
// formant center freq (in Hz)
fc = hslider("Fc",800,100,6000,0.01):si.smoo;
// FOF filter gain (in dB)
g = ba.db2linear(hslider("Gain",0,-40,40,0.01)):si.smoo;
// FOF bandwidth (in Hz)
bw = hslider("BW",80,1,10000,1):si.smoo;
// FOF attack value (in Hz)
a = hslider("A",90,1,10000,1):si.smoo;
// main process
process =
// fof
// rdtable(pl.tablesize, (ba.time:os.sinwaveform), int(ph(f0,c)))
clkCycle(multi,f0)
<:
par(i,multi,fofSH*OctMuliply(i))
:> _
;
OctMuliply(i) =
(OctMuliplyPart(i,floor(octaviation+1))* ma.decimal(octaviation)) +
(OctMuliplyPart(i,floor(octaviation ))* (1-ma.decimal(octaviation)));
OctMuliplyPart(i,oct) = select2(i>0,1,
(((i % int(2:pow(oct)))):min(1)*-1)+1
);
multi = 2:pow(maxOctavation);
maxOctavation = 4;
octaviation = hslider("octaviation",0,0,maxOctavation,0.001):si.smoo;
| https://raw.githubusercontent.com/magnetophon/faustOscillators/6ac2ac572f8a3dc78cc6cb0074d60cce10845300/fof.dsp | faust | process =
fof;
adapted from:
https://ccrma.stanford.edu/~mjolsen/pdfs/smc2016_MOlsenFOF.pdf
///////////////////////////////////////////////////////////////////////////
Hard-Syncing Wavetable Oscillator //
///////////////////////////////////////////////////////////////////////////
resettable phasor, clock val > 0 resets phase to 0
sin lookup table with resettable phase
sinwaveform = float(time)*(2.0*PI)/float(tablesize) : sin;
sinwaveform(tablesize) = float(ba.time)*(2.0*ma.PI)/float(tablesize) : sin;
/////////////////////////////////////////////////////////////////////////////
FOF Generation System //
/////////////////////////////////////////////////////////////////////////////
function to generate a single Formant-Wave-Function
sampling period
dc magnitude response
normalized filter gain
wavetable oscillator
biquad filter
/////////////////////////////////////////////////////////////////////////////
Cyclic Impulse Train Streams //
/////////////////////////////////////////////////////////////////////////////
import the oscillator library
impulse train at frequency f0
impulse train at frequency f0 split into n cycles
function that lets through the mth impulse out of
each consecutive group of n impulses
function to count nonzero inputs and reset after
receiving x of them
function that subtracts value x from
input stream value if input stream value >= x
/////////////////////////////////////////////////////////////////////////////
FOF with Sample-and-Hold //
/////////////////////////////////////////////////////////////////////////////
sample and hold filter coefficients
FOF sample and hold mechanism
/////////////////////////////////////////////////////////////////////////////
Example Program //
/////////////////////////////////////////////////////////////////////////////
************* parameters/GUI controls *************
fundamental freq (in Hz)
formant center freq (in Hz)
FOF filter gain (in dB)
FOF bandwidth (in Hz)
FOF attack value (in Hz)
main process
fof
rdtable(pl.tablesize, (ba.time:os.sinwaveform), int(ph(f0,c))) | declare author "Bart Brouns";
declare license "GPLv3";
declare name "fof";
import("stdfaust.lib");
import("CZ.lib");
ph(f0,c)=
inc
:(+:d)~
(-(_<:(_,*(_,clk))))
:*(pl.tablesize)
with {
clk = c>0;
d = ma.decimal;
inc = f0/float(ma.SR);
};
oscpr(f0,c) =
rdtable(pl.tablesize
, os.sinwaveform(pl.tablesize)
, int(ph(f0,c)));
oscpr2(f0,c) =
fund(f0,0,c)
: basicCZosc(oscType,index,res);
fof(fc,bw,a,g) =
_ <: (_',_)
: (f * s)
with {
T
= 1/ma.SR;
pi = ma.PI;
u1 = exp(-a*pi*T);
u2 = exp(-bw*pi*T);
a1 = -1*(u1+u2);
a2 = u1*u2;
G0 = 1/(1+a1+a2);
b0 = g/G0;
s
= oscpr2(fc);
f
};
ol = library("oscillator.lib");
clk(f0) = (1-1')+ol.lf_imptrain(f0)';
clkCycle(n,f0) = clk(f0) <: par(i,n,resetCtr(n,(i+1)));
resetCtr(n,m) = _ <: (_,ctr(n)) : (_,(_==m)) : *;
ctr(x) = (+(_)~(negSub(x)));
negSub(x)= _<: (_>=x,_,_):((-1*_),_,_):((_*_),_):(_+_);
curbw = (_,bw) : ba.latch;
cura = (_,a) : ba.latch;
fofSH =
_ <: (curbw,cura,_) : (fc,_,_,g,_') : fof ;
f0 = hslider("f0",220,0,2000,0.01):si.smoo;
fc = hslider("Fc",800,100,6000,0.01):si.smoo;
g = ba.db2linear(hslider("Gain",0,-40,40,0.01)):si.smoo;
bw = hslider("BW",80,1,10000,1):si.smoo;
a = hslider("A",90,1,10000,1):si.smoo;
process =
clkCycle(multi,f0)
<:
par(i,multi,fofSH*OctMuliply(i))
:> _
;
OctMuliply(i) =
(OctMuliplyPart(i,floor(octaviation+1))* ma.decimal(octaviation)) +
(OctMuliplyPart(i,floor(octaviation ))* (1-ma.decimal(octaviation)));
OctMuliplyPart(i,oct) = select2(i>0,1,
(((i % int(2:pow(oct)))):min(1)*-1)+1
);
multi = 2:pow(maxOctavation);
maxOctavation = 4;
octaviation = hslider("octaviation",0,0,maxOctavation,0.001):si.smoo;
|
22535a942c5512b9376de3b052884932a7607658bfd842944778ed586ee961f6 | rottingsounds/bitDSP-faust | Bfb.dsp | declare name "Bfb";
declare description "bool_osc FB alternative 1";
declare author "Till Bovermann";
declare reference "http://rottingsounds.org";
import("stdfaust.lib");
bit_gen = library("bitDSP_gen.lib");
// bit = library("bitDSP.lib");
// SuperCollider
// CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix Bfb.dsp
// plot
// CXXFLAGS="-I ../include" faust2csvplot -I ../lib Bfb.dsp
// ./boolOsc_fb -n 10
// compile
// CXXFLAGS="-I ../../../include" faust2caqt -I ../lib -double Bfb.dsp
// ./Bfb
c1 = hslider("c1",0,0,1,0.001);
c2 = hslider("c2",0.5,0,1,0.001);
rot = hslider("rot",0.5,0, ma.PI, 0.001) : si.smoo;
lFreq = hslider("lFreq [scale:log]",100,25, 10000, 1) : si.smoo;
hFreq = hslider("hFreq [scale:log]",100,25, 10000, 1) : si.smoo;
vol = hslider("vol", 0, 0, 1, 0.0001) : si.smoo;
rotate2(r, x, y) = xout, yout with {
xout = cos(r) * x + sin(r) * y;
yout = cos(r) * y - sin(r) * x;
};
// process = bit_gen.bfb(c1, c2) : par(i, 2, (_ * vol));
process = bit_gen.bfb(c1, c2)
: par( i, 2, _ * vol)
: par( i, 2, _ * 2 -1 <: fi.svf.lp(lFreq, 20) - fi.svf.lp(hFreq, 50))
: rotate2(rot); | https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/c436ecad29c57d46d5e3e59110c25e71a3761fc5/synths/Bfb.dsp | faust | bit = library("bitDSP.lib");
SuperCollider
CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix Bfb.dsp
plot
CXXFLAGS="-I ../include" faust2csvplot -I ../lib Bfb.dsp
./boolOsc_fb -n 10
compile
CXXFLAGS="-I ../../../include" faust2caqt -I ../lib -double Bfb.dsp
./Bfb
process = bit_gen.bfb(c1, c2) : par(i, 2, (_ * vol)); | declare name "Bfb";
declare description "bool_osc FB alternative 1";
declare author "Till Bovermann";
declare reference "http://rottingsounds.org";
import("stdfaust.lib");
bit_gen = library("bitDSP_gen.lib");
c1 = hslider("c1",0,0,1,0.001);
c2 = hslider("c2",0.5,0,1,0.001);
rot = hslider("rot",0.5,0, ma.PI, 0.001) : si.smoo;
lFreq = hslider("lFreq [scale:log]",100,25, 10000, 1) : si.smoo;
hFreq = hslider("hFreq [scale:log]",100,25, 10000, 1) : si.smoo;
vol = hslider("vol", 0, 0, 1, 0.0001) : si.smoo;
rotate2(r, x, y) = xout, yout with {
xout = cos(r) * x + sin(r) * y;
yout = cos(r) * y - sin(r) * x;
};
process = bit_gen.bfb(c1, c2)
: par( i, 2, _ * vol)
: par( i, 2, _ * 2 -1 <: fi.svf.lp(lFreq, 20) - fi.svf.lp(hFreq, 50))
: rotate2(rot); |
498951efd0cb5822634ce8d154c68d31e9c8cbc4d87d00fa1bdd0354d59cc362 | rottingsounds/bitDSP-faust | rbn.dsp | // This is a simple example showing the possibilities offered by
// recursivity combined with nonlinear properties of Boolean operators.
// The network in this example is a fourth-order one, hence with four nodes,
// combining identity and circular topologies. The system parameters are
// the delays between the connections, which determine different chaotic
// behaviours ranging from limit cycles to strange attractors and
// unpredictability.
declare name "RBN";
declare description "Recursive Boolean network";
declare author "Dario Sanfilippo";
declare reference "Stuart A Kauffman, “Metabolic stability and epigenesis
in randomly constructed genetic nets,” Journal of theoretical
biology, vol. 22, no. 3, pp. 437–467, 1969.";
import("stdfaust.lib");
bit = library("bitDSP.lib");
// plot
// CXXFLAGS="-I ../include" faust2csvplot -double -I ../lib rbn-example.dsp
// ./rbn-example -n 50
// compile
// CXXFLAGS="-I ../../../include" faust2caqt -double -I ../lib rbn-example.dsp
// ./rbn-example
d1 = hslider("del1", 0, 0, 9600, 1);
d2 = hslider("del2", 0, 0, 9600, 1);
d3 = hslider("del3", 0, 0, 9600, 1);
d4 = hslider("del4", 0, 0, 9600, 1);
process = bit.bool_osc0(d1, d2, d3, d4);
| https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/examples/rbn.dsp | faust | This is a simple example showing the possibilities offered by
recursivity combined with nonlinear properties of Boolean operators.
The network in this example is a fourth-order one, hence with four nodes,
combining identity and circular topologies. The system parameters are
the delays between the connections, which determine different chaotic
behaviours ranging from limit cycles to strange attractors and
unpredictability.
plot
CXXFLAGS="-I ../include" faust2csvplot -double -I ../lib rbn-example.dsp
./rbn-example -n 50
compile
CXXFLAGS="-I ../../../include" faust2caqt -double -I ../lib rbn-example.dsp
./rbn-example |
declare name "RBN";
declare description "Recursive Boolean network";
declare author "Dario Sanfilippo";
declare reference "Stuart A Kauffman, “Metabolic stability and epigenesis
in randomly constructed genetic nets,” Journal of theoretical
biology, vol. 22, no. 3, pp. 437–467, 1969.";
import("stdfaust.lib");
bit = library("bitDSP.lib");
d1 = hslider("del1", 0, 0, 9600, 1);
d2 = hslider("del2", 0, 0, 9600, 1);
d3 = hslider("del3", 0, 0, 9600, 1);
d4 = hslider("del4", 0, 0, 9600, 1);
process = bit.bool_osc0(d1, d2, d3, d4);
|
4a98645de0c92aae1e3cd28b01c24439a57c91dee214b50b05a18c4c3b38f4aa | tomara-x/magi | moodygirl.dsp | //trans rights
declare name "moodygirl";
declare author "amy universe";
declare version "0.14";
declare license "WTFPL";
import("stdfaust.lib");
N = 32; //modes per group //faust compiler: "alarm clock" with 128
mood(g) = _ : pm.modalModel(N,par(i,N,frq(i,g)),
par(i,N,dur(i,g)),
par(i,N,amp(i,g) * (i < m(g))))/N : _
with {
m(y) = vslider("v:%2y/[-1]modes [style:knob] [tooltip:number of active modes in group]",N,0,N,1);
frq(x,y) = f*(m*x+(m*x==0))+s*x : min(ma.SR/2) //make em stick at the nyquist
with {
f = vslider("v:%2y/[0]base freq [style:knob] [tooltip:frequency of first mode in group]",220,1,1.5e4,0.1);
m = vslider("v:%2y/[1]freq mult [style:knob] [tooltip:multiplier for each mode's freq]",1,0,2,0.001);
s = vslider("v:%2y/[2]freq shift [style:knob] [tooltip:spacing between modes in hz (added to mult)]",0,0,5e3,0.1);
}; // f, fm+s, f2m+2s, f3m+3s, ... (for each mode in the group)
dur(x,y) = d * ((dd!=2) * (1/(dd*x+(x==0))) + (1-(dd!=2)))
with {
d = vslider("v:%2y/[3]base dur [style:knob] [tooltip:duration of resonance for modes (seconds)]",1,0,10,0.001);
dd = vslider("v:%2y/[5]dur div [style:knob] [tooltip:divider for each mode's duration (2 to disable)]",1,0.001,2,0.001);
}; // d, d/dd, d/2dd, d/3dd, ... (same) (all modes durations = d if dd == 2)
amp(x,y) = a * ((d!=2) * (1/(d*x+(x==0))) + (1-(d!=2)))
with {
a = vslider("v:%2y/[6]base amp [style:knob] [tooltip:amplitude of modes]",0.1,0,4,0.001);
d = vslider("v:%2y/[7]amp div [style:knob] [tooltip:divider for each mode's amp (2 to disable)]",1,0.01,2,0.001);
}; // a, a/d, a/2d, a/3d, ... (same) (all modes amps = a if d == 2)
};
process = hgroup("moodygirl 0.14", par(j,2, _ <: par(i,8,mood(i)) :> _/8 : _));
| https://raw.githubusercontent.com/tomara-x/magi/28dedc9ef9d34079a5bbf6844fe94f98eefea983/effect/moodygirl.dsp | faust | trans rights
modes per group //faust compiler: "alarm clock" with 128
make em stick at the nyquist
f, fm+s, f2m+2s, f3m+3s, ... (for each mode in the group)
d, d/dd, d/2dd, d/3dd, ... (same) (all modes durations = d if dd == 2)
a, a/d, a/2d, a/3d, ... (same) (all modes amps = a if d == 2) |
declare name "moodygirl";
declare author "amy universe";
declare version "0.14";
declare license "WTFPL";
import("stdfaust.lib");
mood(g) = _ : pm.modalModel(N,par(i,N,frq(i,g)),
par(i,N,dur(i,g)),
par(i,N,amp(i,g) * (i < m(g))))/N : _
with {
m(y) = vslider("v:%2y/[-1]modes [style:knob] [tooltip:number of active modes in group]",N,0,N,1);
with {
f = vslider("v:%2y/[0]base freq [style:knob] [tooltip:frequency of first mode in group]",220,1,1.5e4,0.1);
m = vslider("v:%2y/[1]freq mult [style:knob] [tooltip:multiplier for each mode's freq]",1,0,2,0.001);
s = vslider("v:%2y/[2]freq shift [style:knob] [tooltip:spacing between modes in hz (added to mult)]",0,0,5e3,0.1);
dur(x,y) = d * ((dd!=2) * (1/(dd*x+(x==0))) + (1-(dd!=2)))
with {
d = vslider("v:%2y/[3]base dur [style:knob] [tooltip:duration of resonance for modes (seconds)]",1,0,10,0.001);
dd = vslider("v:%2y/[5]dur div [style:knob] [tooltip:divider for each mode's duration (2 to disable)]",1,0.001,2,0.001);
amp(x,y) = a * ((d!=2) * (1/(d*x+(x==0))) + (1-(d!=2)))
with {
a = vslider("v:%2y/[6]base amp [style:knob] [tooltip:amplitude of modes]",0.1,0,4,0.001);
d = vslider("v:%2y/[7]amp div [style:knob] [tooltip:divider for each mode's amp (2 to disable)]",1,0.01,2,0.001);
};
process = hgroup("moodygirl 0.14", par(j,2, _ <: par(i,8,mood(i)) :> _/8 : _));
|
fbe3a4edd3d48e4a090de342b09647b825f2c9408136efa2482667975b209026 | s-e-a-m/faust-libraries | vcs3.dsp | declare name "EMS VCS3 Eploration";
declare version "001";
declare author "Giuseppe Silvi";
declare license "GNU-GPL-v3";
declare copyright "(c)SEAM 2019";
declare description "EMS VCS3 Eploration";
import("stdfaust.lib");
//import("../../seam.lib");
osc1_g(x) = hgroup("[001]OSCILLATOR 1", x);
freq = osc1_g(vslider("[001]FREQUENCY[style:knob]", 100,1,10000,0.01) : si.smoo);
shape = osc1_g(vslider("[002]SHAPE[style:knob]", 5,0,10,0.1)/10 : si.smoo);
samp = osc1_g(vslider("[003]SINE[style:knob]",0,0,10,0.001)/10:si.smoo);
pamp = osc1_g(vslider("[004]SAW[style:knob]",0,0,10,00.1)/10:si.smoo);
sqPI = 3.141592653589793238462643383279502797479068098137295573004504331874296718662975536062731407582759857177734375;
vcs3osc1(f,s,sl,pl) = shaped(f,s,sl), saw(f,pl)
with{
phasor(f) = os.lf_sawpos(f);
sine(f,s) = sin(phasor(f)*2*ma.PI) : *(0.5*sin(s*(ma.PI)));
wsine(f,s) = sin(phasor(f)*(-1)*ma.PI) : +(2/sqPI) : *(cos(s*(ma.PI)));
shaped(f,s,sl) = (sine(f,s)+wsine(f,s))*sl;
saw(f,pl) = (phasor(f)-(0.5))*pl;
};
//process = vcs3osc1(freq,shape,samp,pamp) : fi.lowpass(2,10000), fi.lowpass(2,10000) : fi.lowpass6e(20000), fi.lowpass6e(20000) : fi.dcblocker, fi.dcblocker;
process = vcs3osc1(freq,shape,samp,pamp) : fi.lowpass6e(24000), fi.lowpass6e(24000);
| https://raw.githubusercontent.com/s-e-a-m/faust-libraries/9120cccb9335f42407062eb4bf149188d8018b07/examples/app/vcs3.dsp | faust | import("../../seam.lib");
process = vcs3osc1(freq,shape,samp,pamp) : fi.lowpass(2,10000), fi.lowpass(2,10000) : fi.lowpass6e(20000), fi.lowpass6e(20000) : fi.dcblocker, fi.dcblocker; | declare name "EMS VCS3 Eploration";
declare version "001";
declare author "Giuseppe Silvi";
declare license "GNU-GPL-v3";
declare copyright "(c)SEAM 2019";
declare description "EMS VCS3 Eploration";
import("stdfaust.lib");
osc1_g(x) = hgroup("[001]OSCILLATOR 1", x);
freq = osc1_g(vslider("[001]FREQUENCY[style:knob]", 100,1,10000,0.01) : si.smoo);
shape = osc1_g(vslider("[002]SHAPE[style:knob]", 5,0,10,0.1)/10 : si.smoo);
samp = osc1_g(vslider("[003]SINE[style:knob]",0,0,10,0.001)/10:si.smoo);
pamp = osc1_g(vslider("[004]SAW[style:knob]",0,0,10,00.1)/10:si.smoo);
sqPI = 3.141592653589793238462643383279502797479068098137295573004504331874296718662975536062731407582759857177734375;
vcs3osc1(f,s,sl,pl) = shaped(f,s,sl), saw(f,pl)
with{
phasor(f) = os.lf_sawpos(f);
sine(f,s) = sin(phasor(f)*2*ma.PI) : *(0.5*sin(s*(ma.PI)));
wsine(f,s) = sin(phasor(f)*(-1)*ma.PI) : +(2/sqPI) : *(cos(s*(ma.PI)));
shaped(f,s,sl) = (sine(f,s)+wsine(f,s))*sl;
saw(f,pl) = (phasor(f)-(0.5))*pl;
};
process = vcs3osc1(freq,shape,samp,pamp) : fi.lowpass6e(24000), fi.lowpass6e(24000);
|
7b7cb4e432e128a18ec4d502e461c5cc0426869d0f51ed4eeaf1ea0cb26d45fc | friskgit/snares | snares_fb.dsp | // -*- compile-command: "cd .. && make jack src=src/snares_fb.dsp && cd -"; -*-
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare author " henrikfr ";
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
import("stdfaust.lib");
//---------------`Filterbank for snaredrum` --------------------------
//
// A filterbank for use with snare drum synths and channel disperser.
//
// 18 Juli 2019 Henrik Frisk [email protected]
//---------------------------------------------------
channels = 2;
imp = ba.pulse(hslider("tempo", 1000, 500, 10000, 1));
master_env = 1;//en.smoothEnvelope(0.1, button("play"));
env = en.ar(attack, rel, imp) * amp
with {
attack = hslider("attack", 0.00000001, 0, 0.1, 0.000000001) : si.smooth(0.1);
rel = hslider("rel", 0.1, 0.0000001, 0.5, 0.0000001) : si.smooth(0.2);
amp = hslider("vol", 0.5, 0, 1, 0.0001);
};
// Control the output channel
focus = hslider("focus", 1, 0, 1, 0.0001);
position = hslider("position", 1, 0, channels, 1);
rate = ma.SR/1000.0;
rndctrl = (no.lfnoise(rate) * (channels + 1)) * focus : ma.fabs + position : int ;
outputctrl = rndctrl : ba.sAndH(imp);
n = no.multinoise(8) : par(i, 8, _ * env * 0.1);
filt = fi.resonbp(frq, q, gain)
with {
frq = hslider("freq", 200, 50, 5000, 0.1);
q = hslider("q", 1, 0.01, 10, 0.01);
gain = hslider("gain", 0, 0, 2, 0.00001);
};
fb = fi.mth_octave_filterbank(order,M,ftop,N) : par(i, N, (*(ba.db2linear(fader(N-i))))) :
par(i, N, de.sdelay(8192, 512, *(hslider("delay", 0, 0, 1024, 1), i)))
with {
M = 2;
order = 1;
ftop = 10000;
N = 16;
bp1 = ba.bypass1;
slider_group(x) = mofb_group(hgroup("[1]", x));
mofb_group(x) = vgroup("CONSTANT-Q FILTER BANK (Butterworth dyadic tree)
[tooltip: See Faust's filters.lib for documentation and references]", x);
fader(i) = slider_group(vslider("Band%2i [unit:dB] [tooltip: Bandpass filter
gain in dB]", -10, -70, 10, 0.1)) : si.smoo;
bp = bypass_group(checkbox("[0] Bypass
[tooltip: When this is checked, the filter-bank has no effect]"));
};
ch_wrapped = ma.modulo(outputctrl, channels);
process = n : par(i, 8, filt) :> -,- :> *(_, master_env) : fb ;
// :> ba.selectoutn(channels, ch_wrapped);
//process = n : par(i, 8, filt) :> _,_;
| https://raw.githubusercontent.com/friskgit/snares/bb43ea5e706a0ead6d65dd176a5c492b2f5d8f74/faust/snare/src/extras/snares_fb.dsp | faust | -*- compile-command: "cd .. && make jack src=src/snares_fb.dsp && cd -"; -*-
---------------`Filterbank for snaredrum` --------------------------
A filterbank for use with snare drum synths and channel disperser.
18 Juli 2019 Henrik Frisk [email protected]
---------------------------------------------------
en.smoothEnvelope(0.1, button("play"));
Control the output channel
:> ba.selectoutn(channels, ch_wrapped);
process = n : par(i, 8, filt) :> _,_; |
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare author " henrikfr ";
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
import("stdfaust.lib");
channels = 2;
imp = ba.pulse(hslider("tempo", 1000, 500, 10000, 1));
env = en.ar(attack, rel, imp) * amp
with {
attack = hslider("attack", 0.00000001, 0, 0.1, 0.000000001) : si.smooth(0.1);
rel = hslider("rel", 0.1, 0.0000001, 0.5, 0.0000001) : si.smooth(0.2);
amp = hslider("vol", 0.5, 0, 1, 0.0001);
};
focus = hslider("focus", 1, 0, 1, 0.0001);
position = hslider("position", 1, 0, channels, 1);
rate = ma.SR/1000.0;
rndctrl = (no.lfnoise(rate) * (channels + 1)) * focus : ma.fabs + position : int ;
outputctrl = rndctrl : ba.sAndH(imp);
n = no.multinoise(8) : par(i, 8, _ * env * 0.1);
filt = fi.resonbp(frq, q, gain)
with {
frq = hslider("freq", 200, 50, 5000, 0.1);
q = hslider("q", 1, 0.01, 10, 0.01);
gain = hslider("gain", 0, 0, 2, 0.00001);
};
fb = fi.mth_octave_filterbank(order,M,ftop,N) : par(i, N, (*(ba.db2linear(fader(N-i))))) :
par(i, N, de.sdelay(8192, 512, *(hslider("delay", 0, 0, 1024, 1), i)))
with {
M = 2;
order = 1;
ftop = 10000;
N = 16;
bp1 = ba.bypass1;
slider_group(x) = mofb_group(hgroup("[1]", x));
mofb_group(x) = vgroup("CONSTANT-Q FILTER BANK (Butterworth dyadic tree)
[tooltip: See Faust's filters.lib for documentation and references]", x);
fader(i) = slider_group(vslider("Band%2i [unit:dB] [tooltip: Bandpass filter
gain in dB]", -10, -70, 10, 0.1)) : si.smoo;
bp = bypass_group(checkbox("[0] Bypass
[tooltip: When this is checked, the filter-bank has no effect]"));
};
ch_wrapped = ma.modulo(outputctrl, channels);
process = n : par(i, 8, filt) :> -,- :> *(_, master_env) : fb ;
|
0a4e2eac6759da936e135d5e7ba4d0311df08c1b34186d913e32cf99f2429aba | RuolunWeng/ruolunweng.github.io | SRandomFrequencyGenerator.dsp | declare name "Random Frequency Generator";
declare author "ER";
/* ============ DESCRIPTION ============
- Random Frequency Generator
- Head = High Frequencies
- Bottom = Low frequencies
- Left = Slow rhythm
- Right = Fast rhythm
*/
import("stdfaust.lib");
process = vgroup("Random Frequency Generator", randfreq : os.osc);
sampleAndhold(t) = select2(t) ~_;
randfreq = no.noise : sampleAndhold(gate)*(lowhigh) : si.smooth(0.99)
with{
lowhigh = hslider("[2]Hight[tooltip: frequency range hight factor][acc:1 1 -10 0 10]", 1000, 300, 2500, 1):si.smooth(0.999):min(1500):max(10);
};
gate = hand : upfront : counter <=(0)
with{
hand = hslider("[1]Instrument Hand[acc:0 1 -10 0 10]", 8, 0, 15, 1) :ba.automat(bps, 15, 0.0);
bps = hslider("[4]Speed[style:knob][acc:0 1 -10 0 10]", 420, 180, 720, 1) : si.smooth(0.999) : min(720) : max(180) : int;
upfront(x) = abs(x-x') > 0;
counter(g) = (+(1):*(1-g))~_;
};
| https://raw.githubusercontent.com/RuolunWeng/ruolunweng.github.io/035564bb7e36eb4e810ca80077ffa8a9d3e5130b/faustplayground/faust-modules/generators/SRandomFrequencyGenerator.dsp | faust | ============ DESCRIPTION ============
- Random Frequency Generator
- Head = High Frequencies
- Bottom = Low frequencies
- Left = Slow rhythm
- Right = Fast rhythm
| declare name "Random Frequency Generator";
declare author "ER";
import("stdfaust.lib");
process = vgroup("Random Frequency Generator", randfreq : os.osc);
sampleAndhold(t) = select2(t) ~_;
randfreq = no.noise : sampleAndhold(gate)*(lowhigh) : si.smooth(0.99)
with{
lowhigh = hslider("[2]Hight[tooltip: frequency range hight factor][acc:1 1 -10 0 10]", 1000, 300, 2500, 1):si.smooth(0.999):min(1500):max(10);
};
gate = hand : upfront : counter <=(0)
with{
hand = hslider("[1]Instrument Hand[acc:0 1 -10 0 10]", 8, 0, 15, 1) :ba.automat(bps, 15, 0.0);
bps = hslider("[4]Speed[style:knob][acc:0 1 -10 0 10]", 420, 180, 720, 1) : si.smooth(0.999) : min(720) : max(180) : int;
upfront(x) = abs(x-x') > 0;
counter(g) = (+(1):*(1-g))~_;
};
|
124f022fd7301906d0f1690069098d54fcabf152b7167068ae5c574dad0d3e45 | RuolunWeng/ruolunweng.github.io | SRandomAndHold.dsp | declare name "Random and Hold";
declare author "ER";
/* ========= DESCRIPTION ============
- Random frequency generator with hold function
- Head = Hold the last sampled note
- Swing = Generate random notes
- Left = Slow rhythm
- Right = Fast rhythm
*/
import("stdfaust.lib");
process = no.noise : sampleAndhold(gate) * (1500) : si.smooth(0.99) : os.osc : sampleAndhold(reverse(hold))<:select2(reverse(hold),(si.smooth(0.999) : *(1500):os.osc),_);
sampleAndhold(g) = select2(g) ~_;
reverse(t) = select2(t,1,0);
hold = hslider("[2]Hold[acc:1 1 -8 0 12]", 0, 0, 1, 1);
gate = hand : upfront : counter <=(0)
with {
hand = hslider("[1]Instrument hand[acc:1 0 -10 0 10]", 5, 0, 10, 1):ba.automat(bps, 15, 0.0);
bps = hslider("[3]Speed[style:knob][acc:0 1 -10 0 10]", 480, 120, 720, 1) : si.smooth(0.999) : min(720) : max(120) : int;
upfront(x) = abs(x-x') > 0;
counter(g) = (+(1):*(1-g))~_;
};
| https://raw.githubusercontent.com/RuolunWeng/ruolunweng.github.io/035564bb7e36eb4e810ca80077ffa8a9d3e5130b/faustplayground/faust-modules/generators/SRandomAndHold.dsp | faust | ========= DESCRIPTION ============
- Random frequency generator with hold function
- Head = Hold the last sampled note
- Swing = Generate random notes
- Left = Slow rhythm
- Right = Fast rhythm
| declare name "Random and Hold";
declare author "ER";
import("stdfaust.lib");
process = no.noise : sampleAndhold(gate) * (1500) : si.smooth(0.99) : os.osc : sampleAndhold(reverse(hold))<:select2(reverse(hold),(si.smooth(0.999) : *(1500):os.osc),_);
sampleAndhold(g) = select2(g) ~_;
reverse(t) = select2(t,1,0);
hold = hslider("[2]Hold[acc:1 1 -8 0 12]", 0, 0, 1, 1);
gate = hand : upfront : counter <=(0)
with {
hand = hslider("[1]Instrument hand[acc:1 0 -10 0 10]", 5, 0, 10, 1):ba.automat(bps, 15, 0.0);
bps = hslider("[3]Speed[style:knob][acc:0 1 -10 0 10]", 480, 120, 720, 1) : si.smooth(0.999) : min(720) : max(120) : int;
upfront(x) = abs(x-x') > 0;
counter(g) = (+(1):*(1-g))~_;
};
|
cb0b6036d4d08a34a733cd9eae78578d5300559d7854a104acebec8992484221 | dariosanfilippo/modified_rossler | modified_rossler.dsp | // =============================================================================
// Modified Rössler complex generator
// =============================================================================
//
// Complex sound generator based on modified Rössler equations.
// The model is structurally-stable through hyperbolic tangent function
// saturators and allows for parameters in unstable ranges to explore
// different dynamics. Furthermore, this model includes DC-blockers in the
// feedback paths to counterbalance a tendency towards fixed-point attractors
// – thus enhancing complex behaviours – and obtain signals suitable for audio.
// Besides the original parameters in the model, this system includes a
// saturating threshold determining the positive and negative bounds in the
// equations, while the output peaks are within the [-1.0; 1.0] range.
//
// The system can be triggered by an impulse or by a constant of arbitrary
// values for deterministic and reproducable behaviours. Alternatively,
// the oscillator can be fed with external inputs to be used as a nonlinear
// distortion unit.
//
// =============================================================================
import("stdfaust.lib");
declare name "Modified Rössler complex generator";
declare author "Dario Sanfilippo";
declare copyright "Copyright (C) 2021 Dario Sanfilippo
<[email protected]>";
declare version "1.1";
declare license "GPL v3.0 license";
rossler(l, a, b, c, dt, x_0, y_0, z_0) = x_level(out * (x / l)) ,
y_level(out * (y / l)) ,
z_level(out * (z / l))
letrec {
'x = fi.highpass(1, 10, tanh(l, (x_0 + x + (-y - z) * dt)));
'y = fi.highpass(1, 10, tanh(l, (y_0 + y + (x + a * y) * dt)));
'z = fi.highpass(1, 10, tanh(l, (z_0 + z + (b + z * (x - c)) * dt)));
};
// tanh() saturator with adjustable saturating threshold
tanh(l, x) = l * ma.tanh(x / l);
// smoothing function for click-free parameter variations using
// a one-pole low-pass with a 20-Hz cut-off frequency.
smooth(x) = fi.pole(pole, x * (1.0 - pole))
with {
pole = exp(-2.0 * ma.PI * 20.0 / ma.SR);
};
// GUI parameters
x_level(x) = attach(x , abs(x) : ba.linear2db :
levels_group(hbargraph("[0]x[style:dB]", -60, 0)));
y_level(x) = attach(x , abs(x) : ba.linear2db :
levels_group(hbargraph("[1]y[style:dB]", -60, 0)));
z_level(x) = attach(x , abs(x) : ba.linear2db :
levels_group(hbargraph("[2]z[style:dB]", -60, 0)));
global_group(x) = vgroup("[1]Global", x);
levels_group(x) = hgroup("[2]Levels (dB)", x);
a = global_group(hslider("[4]a[scale:exp]", 3, 0, 20, .000001) : smooth);
b = global_group(hslider("[5]b", 3, -20, 20, .000001) : smooth);
c = global_group(hslider("[6]c[scale:exp]", 3, 0, 20, .000001) : smooth);
dt = global_group(
hslider("[7]dt (integration step)[scale:exp]", 0.1, 0.000001, 1, .000001) :
smooth);
input(x) = global_group(nentry("[3]Input value", 1, 0, 10, .000001) <:
_ * impulse + _ * checkbox("[1]Constant inputs") +
x * checkbox("[0]External inputs"));
impulse = button("[2]Impulse inputs") : ba.impulsify;
limit = global_group(
hslider("[8]Saturation limit[scale:exp]", 4, 1, 1024, .000001) : smooth);
out = global_group(hslider("[9]Output scaling[scale:exp]", 0, 0, 1, .000001) :
smooth);
process(x1, x2, x3) = rossler(limit, a, b, c, dt, input(x1), input(x2),
input(x3));
| https://raw.githubusercontent.com/dariosanfilippo/modified_rossler/b44a671bcb941d90830121d1911a2b9957645588/modified_rossler.dsp | faust | =============================================================================
Modified Rössler complex generator
=============================================================================
Complex sound generator based on modified Rössler equations.
The model is structurally-stable through hyperbolic tangent function
saturators and allows for parameters in unstable ranges to explore
different dynamics. Furthermore, this model includes DC-blockers in the
feedback paths to counterbalance a tendency towards fixed-point attractors
– thus enhancing complex behaviours – and obtain signals suitable for audio.
Besides the original parameters in the model, this system includes a
saturating threshold determining the positive and negative bounds in the
equations, while the output peaks are within the [-1.0; 1.0] range.
The system can be triggered by an impulse or by a constant of arbitrary
values for deterministic and reproducable behaviours. Alternatively,
the oscillator can be fed with external inputs to be used as a nonlinear
distortion unit.
=============================================================================
tanh() saturator with adjustable saturating threshold
smoothing function for click-free parameter variations using
a one-pole low-pass with a 20-Hz cut-off frequency.
GUI parameters |
import("stdfaust.lib");
declare name "Modified Rössler complex generator";
declare author "Dario Sanfilippo";
declare copyright "Copyright (C) 2021 Dario Sanfilippo
<[email protected]>";
declare version "1.1";
declare license "GPL v3.0 license";
rossler(l, a, b, c, dt, x_0, y_0, z_0) = x_level(out * (x / l)) ,
y_level(out * (y / l)) ,
z_level(out * (z / l))
letrec {
'x = fi.highpass(1, 10, tanh(l, (x_0 + x + (-y - z) * dt)));
'y = fi.highpass(1, 10, tanh(l, (y_0 + y + (x + a * y) * dt)));
'z = fi.highpass(1, 10, tanh(l, (z_0 + z + (b + z * (x - c)) * dt)));
};
tanh(l, x) = l * ma.tanh(x / l);
smooth(x) = fi.pole(pole, x * (1.0 - pole))
with {
pole = exp(-2.0 * ma.PI * 20.0 / ma.SR);
};
x_level(x) = attach(x , abs(x) : ba.linear2db :
levels_group(hbargraph("[0]x[style:dB]", -60, 0)));
y_level(x) = attach(x , abs(x) : ba.linear2db :
levels_group(hbargraph("[1]y[style:dB]", -60, 0)));
z_level(x) = attach(x , abs(x) : ba.linear2db :
levels_group(hbargraph("[2]z[style:dB]", -60, 0)));
global_group(x) = vgroup("[1]Global", x);
levels_group(x) = hgroup("[2]Levels (dB)", x);
a = global_group(hslider("[4]a[scale:exp]", 3, 0, 20, .000001) : smooth);
b = global_group(hslider("[5]b", 3, -20, 20, .000001) : smooth);
c = global_group(hslider("[6]c[scale:exp]", 3, 0, 20, .000001) : smooth);
dt = global_group(
hslider("[7]dt (integration step)[scale:exp]", 0.1, 0.000001, 1, .000001) :
smooth);
input(x) = global_group(nentry("[3]Input value", 1, 0, 10, .000001) <:
_ * impulse + _ * checkbox("[1]Constant inputs") +
x * checkbox("[0]External inputs"));
impulse = button("[2]Impulse inputs") : ba.impulsify;
limit = global_group(
hslider("[8]Saturation limit[scale:exp]", 4, 1, 1024, .000001) : smooth);
out = global_group(hslider("[9]Output scaling[scale:exp]", 0, 0, 1, .000001) :
smooth);
process(x1, x2, x3) = rossler(limit, a, b, c, dt, input(x1), input(x2),
input(x3));
|
93b3eb6c889fa51280771f05798b289603643a8a73f62aed9fafc14beded3e40 | rottingsounds/bitDSP-faust | Higks.dsp | declare name "Higks";
declare author "Till Bovermann";
declare reference "http://rottingsounds.org";
import("stdfaust.lib");
bit_gen = library("bitDSP_gen.lib");
// SuperCollider
// CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix Higks.dsp
// plot
// CXXFLAGS="-I ../include" faust2csvplot -I ../lib Higks.dsp
// ./Higks -n 10
// compile
// CXXFLAGS="-I ../../../include" faust2caqt -I ../lib -double Higks.dsp
// ./Higks
c1 = hslider("c1",0,0,1,0.001);
c2 = hslider("c2",0.5,0,1,0.001);
rot = hslider("rot",0.5,0, ma.PI, 0.001) : si.smoo;
lFreq = hslider("lFreq [scale:log]",100,25, 10000, 1) : si.smoo;
hFreq = hslider("hFreq [scale:log]",100,25, 10000, 1) : si.smoo;
vol = hslider("vol", 0, 0, 1, 0.0001) : si.smoo;
rotate2(r, x, y) = xout, yout with {
xout = cos(r) * x + sin(r) * y;
yout = cos(r) * y - sin(r) * x;
};
// process = bit_gen.higks(c1, c2) : par(i, 2, (_ * vol));
process = bit_gen.higks(c1, c2)
: par( i, 2, _ * vol)
: par( i, 2, _ * 2 -1 <: fi.svf.lp(lFreq, 20) - fi.svf.lp(hFreq, 50))
: rotate2(rot);
| https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/c436ecad29c57d46d5e3e59110c25e71a3761fc5/synths/Higks.dsp | faust | SuperCollider
CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix Higks.dsp
plot
CXXFLAGS="-I ../include" faust2csvplot -I ../lib Higks.dsp
./Higks -n 10
compile
CXXFLAGS="-I ../../../include" faust2caqt -I ../lib -double Higks.dsp
./Higks
process = bit_gen.higks(c1, c2) : par(i, 2, (_ * vol)); | declare name "Higks";
declare author "Till Bovermann";
declare reference "http://rottingsounds.org";
import("stdfaust.lib");
bit_gen = library("bitDSP_gen.lib");
c1 = hslider("c1",0,0,1,0.001);
c2 = hslider("c2",0.5,0,1,0.001);
rot = hslider("rot",0.5,0, ma.PI, 0.001) : si.smoo;
lFreq = hslider("lFreq [scale:log]",100,25, 10000, 1) : si.smoo;
hFreq = hslider("hFreq [scale:log]",100,25, 10000, 1) : si.smoo;
vol = hslider("vol", 0, 0, 1, 0.0001) : si.smoo;
rotate2(r, x, y) = xout, yout with {
xout = cos(r) * x + sin(r) * y;
yout = cos(r) * y - sin(r) * x;
};
process = bit_gen.higks(c1, c2)
: par( i, 2, _ * vol)
: par( i, 2, _ * 2 -1 <: fi.svf.lp(lFreq, 20) - fi.svf.lp(hFreq, 50))
: rotate2(rot);
|
cdf21cc6a8f27698c220a98f053e059dd2ee45824dd56ecc5664417a0536df33 | Rickr922/Faust-FDS | StiffString.dsp | import("stdfaust.lib");
declare name "StiffString";
declare description "Linear string model with impulse excitation.";
declare author "Riccardo Russo";
//----------------------------------String Settings---------------------------//
//nPoints=int(Length/h);
nPoints = 100;
k = 1/ma.SR;
//Stability condition
coeff = c^2*k^2 + 4*sigma1*k;
h = sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
T = 150; // Tension [N]
radius = 3.5560e-04; // Radius (0.016 gauge) [m]
rho = 8.05*10^3; // Density [kg/m^3];
Area = ma.PI*radius^2; // Area of string section
I = (ma.PI*radius^4)/ 4; // Moment of Inertia
Emod = 174e4; // Young modulus [Pa]
K = sqrt(Emod*I/rho/Area); // Stiffness parameter
c = sqrt(T/rho/Area); // Wave speed
sigma1 = 0.01; // Frequency dependent damping
sigma0 = 0.0005; // Frequency independent damping
//----------------------------------Equations--------------------------------//
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2-6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2+4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = -K^2*k^2/den/h^4;
midCoeff = E,C,A,C,E;
midCoeffDel = 0,D,B,D,0;
r = 2;
t = 1;
scheme(points) = par(i,points,midCoeff,midCoeffDel);
//----------------------------------Controls---------------------------------//
play = button("Play");
inPoint = hslider("Input Point",floor(nPoints/2),0,nPoints-1,0.01);
outPoint = hslider("Output Point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
//----------------------------------Force---------------------------------//
forceModel = play:ba.impulsify;
//----------------------------------Process---------------------------------//
process = forceModel<:fd.linInterp1D(nPoints,inPoint):
fd.model1D(nPoints,r,t,scheme(nPoints)):
fd.linInterp1DOut(nPoints,outPoint)<:_,_;
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ead5c05c0eced6ed111dcfd8eeea14d313f74ef6/library/CorrectExamples/StiffString.dsp | faust | ----------------------------------String Settings---------------------------//
nPoints=int(Length/h);
Stability condition
Tension [N]
Radius (0.016 gauge) [m]
Density [kg/m^3];
Area of string section
Moment of Inertia
Young modulus [Pa]
Stiffness parameter
Wave speed
Frequency dependent damping
Frequency independent damping
----------------------------------Equations--------------------------------//
----------------------------------Controls---------------------------------//
----------------------------------Force---------------------------------//
----------------------------------Process---------------------------------//
| import("stdfaust.lib");
declare name "StiffString";
declare description "Linear string model with impulse excitation.";
declare author "Riccardo Russo";
nPoints = 100;
k = 1/ma.SR;
coeff = c^2*k^2 + 4*sigma1*k;
h = sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2-6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2+4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = -K^2*k^2/den/h^4;
midCoeff = E,C,A,C,E;
midCoeffDel = 0,D,B,D,0;
r = 2;
t = 1;
scheme(points) = par(i,points,midCoeff,midCoeffDel);
play = button("Play");
inPoint = hslider("Input Point",floor(nPoints/2),0,nPoints-1,0.01);
outPoint = hslider("Output Point",floor(nPoints/2),0,nPoints-1,0.01):si.smoo;
forceModel = play:ba.impulsify;
process = forceModel<:fd.linInterp1D(nPoints,inPoint):
fd.model1D(nPoints,r,t,scheme(nPoints)):
fd.linInterp1DOut(nPoints,outPoint)<:_,_;
|
89bfa6642acdb15889749f2b266e6ac154cebbba322a0575f49d99ec07c9cf2c | grame-cncm/smartfaust | sfWindy.dsp | declare name "sfWindy";
declare version "1.1";
declare author "Christophe Lebreton";
declare license "BSD";
declare copyright "SmartFaust - GRAME(c)2013-2018";
import("stdfaust.lib");
//--------------------------------------------------------------------------------------------------
// MAIN PROCESS
process= no.pink_noise :*(Motion):moog_vcf_wind:*(out)
with {
out = checkbox ("v:sfWindy/ON/OFF"):si.smooth(0.998);
};
//Motion = hslider("Motion",0,0,1,0.001);
//--------------------------------------------------------------------------------------------------
// MOTION ANALYSE accelerometers
// defined a mapping from smartphones accelerometers
// accelerometer units: m/s2 ( 10 m/s2 == 1 g )
accel_x = vslider("v:sfWindy parameter(s)/acc_x [acc:0 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1);
accel_y = vslider("v:sfWindy parameter(s)/acc_y [acc:1 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1);
accel_z = vslider("v:sfWindy parameter(s)/acc_z [acc:2 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1);
// normalize 0 to 1 of 3 axes accelerometers ( pythagoria )
Motion = quad(accel_x),quad(accel_y),quad(accel_z):> sqrt:-(offset):max(0.):min(1.): an.amp_follower_ud (env_up,env_down)
with{
// DC filter to cancel low frequency from acceleromters ( inclinometers )
dc(x)=x:fi.dcblockerat(fb);
fb=hslider("v:sfWindy parameter(s)/low_cut[freq DC filter] [hidden:1]",12,0.,15,0.01);
// square function with DC filter integrated
quad(x)=dc(x)*dc(x);
// offset to cancel unstable motion ( stress motion ;))
offset = hslider ("v:sfWindy parameter(s)/threshold [hidden:1]",6,0,100,0.1);
// envelop follower to create smooth motion from acceleration
env_up = hslider ( "v:sfWindy parameter(s)/[1]envup [hidden:1][acc:0 0 -10 0 10][color: 0 255 0 ]", 670,0,1300,1)*0.001: fi.lowpass(1,0.5);
env_down = hslider ( "v:sfWindy parameter(s)/[2]envdown [hidden:1][acc:1 0 -10 0 10][color: 0 255 0 ]", 0,0,500,1)*0.001;
};
//--------------------------------------------------------------------------------------------------
// MOOG_VCF
// from demo.lib of Julius Smith
// this adapted for this project, read moog_vcf_demo for more information
moog_vcf_wind = vcfarch :*(5)
with {
//freq = hslider("h:Moogfilter/Frequency [1] [unit:PK] [style:knob]",25, 1, 88, 0.01) : ba.pianokey2hz : si.smooth(0.999);
freq = (Motion*87)+1: ba.pianokey2hz : si.smooth(0.999);
//res = hslider("h:Moogfilter/Resonance [2] ", 0.9, 0, 1, 0.01));
res = Motion;
vcfbq = _ <: select2(1, ve.moog_vcf_2b(res,freq), ve.moog_vcf_2bn(res,freq)); // fix select 2biquad
vcfarch = _ <: select2(1, ve.moog_vcf(res^4,freq), vcfbq); // fix select normalized
};
| https://raw.githubusercontent.com/grame-cncm/smartfaust/0a9c93ea7eda9899e1401402901848f221366c99/src/sfWindy/sfWindy.dsp | faust | --------------------------------------------------------------------------------------------------
MAIN PROCESS
Motion = hslider("Motion",0,0,1,0.001);
--------------------------------------------------------------------------------------------------
MOTION ANALYSE accelerometers
defined a mapping from smartphones accelerometers
accelerometer units: m/s2 ( 10 m/s2 == 1 g )
normalize 0 to 1 of 3 axes accelerometers ( pythagoria )
DC filter to cancel low frequency from acceleromters ( inclinometers )
square function with DC filter integrated
offset to cancel unstable motion ( stress motion ;))
envelop follower to create smooth motion from acceleration
--------------------------------------------------------------------------------------------------
MOOG_VCF
from demo.lib of Julius Smith
this adapted for this project, read moog_vcf_demo for more information
freq = hslider("h:Moogfilter/Frequency [1] [unit:PK] [style:knob]",25, 1, 88, 0.01) : ba.pianokey2hz : si.smooth(0.999);
res = hslider("h:Moogfilter/Resonance [2] ", 0.9, 0, 1, 0.01));
fix select 2biquad
fix select normalized | declare name "sfWindy";
declare version "1.1";
declare author "Christophe Lebreton";
declare license "BSD";
declare copyright "SmartFaust - GRAME(c)2013-2018";
import("stdfaust.lib");
process= no.pink_noise :*(Motion):moog_vcf_wind:*(out)
with {
out = checkbox ("v:sfWindy/ON/OFF"):si.smooth(0.998);
};
accel_x = vslider("v:sfWindy parameter(s)/acc_x [acc:0 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1);
accel_y = vslider("v:sfWindy parameter(s)/acc_y [acc:1 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1);
accel_z = vslider("v:sfWindy parameter(s)/acc_z [acc:2 0 -10 0 10][color: 0 255 0 ][hidden:1]",0,-100,100,1);
Motion = quad(accel_x),quad(accel_y),quad(accel_z):> sqrt:-(offset):max(0.):min(1.): an.amp_follower_ud (env_up,env_down)
with{
dc(x)=x:fi.dcblockerat(fb);
fb=hslider("v:sfWindy parameter(s)/low_cut[freq DC filter] [hidden:1]",12,0.,15,0.01);
quad(x)=dc(x)*dc(x);
offset = hslider ("v:sfWindy parameter(s)/threshold [hidden:1]",6,0,100,0.1);
env_up = hslider ( "v:sfWindy parameter(s)/[1]envup [hidden:1][acc:0 0 -10 0 10][color: 0 255 0 ]", 670,0,1300,1)*0.001: fi.lowpass(1,0.5);
env_down = hslider ( "v:sfWindy parameter(s)/[2]envdown [hidden:1][acc:1 0 -10 0 10][color: 0 255 0 ]", 0,0,500,1)*0.001;
};
moog_vcf_wind = vcfarch :*(5)
with {
freq = (Motion*87)+1: ba.pianokey2hz : si.smooth(0.999);
res = Motion;
};
|
9b47711aa2bb150586f6355cb4cbfdd6fd56498417dec64e1c3d71f9f1d2fa26 | afalaize/faust | lowBoost.dsp | // WARNING: This a "legacy example based on a deprecated library". Check filters.lib
// for more accurate examples of filter functions
declare name "lowboost";
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 boost (table 2.3) --------------------
V0(g) = pow(10,g/20.0);
K(fc) = tan(ma.PI*fc/ma.SR);
square(x) = x*x;
denom(fc) = 1 + sqrt(2)*K(fc) + square(K(fc));
lfboost(fc, g) = fi.TF2((1 + sqrt(2*V0(g))*K(fc) + V0(g)*square(K(fc))) / denom(fc),
2 * (V0(g)*square(K(fc)) - 1) / denom(fc),
(1 - sqrt(2*V0(g))*K(fc) + V0(g)*square(K(fc))) / denom(fc),
2 * (square(K(fc)) - 1) / denom(fc),
(1 - sqrt(2)*K(fc) + square(K(fc))) / denom(fc));
//------------------------------ User Interface -----------------------------------
freq = hslider("[1]freq [unit:Hz][style:knob]", 1000, 20, 20000, 0.1);
gain = hslider("[2]gain [unit:dB][style:knob]", 0, -20, 20, 0.1);
//----------------------------------- Process -------------------------------------
process = vgroup("low-freq shelving boost", lfboost(freq,gain));
| https://raw.githubusercontent.com/afalaize/faust/8f9f5fe3aa167eaeecc15a99d4da984ac2797be3/examples/filtering/lowBoost.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 boost (table 2.3) --------------------
------------------------------ User Interface -----------------------------------
----------------------------------- Process ------------------------------------- |
declare name "lowboost";
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);
square(x) = x*x;
denom(fc) = 1 + sqrt(2)*K(fc) + square(K(fc));
lfboost(fc, g) = fi.TF2((1 + sqrt(2*V0(g))*K(fc) + V0(g)*square(K(fc))) / denom(fc),
2 * (V0(g)*square(K(fc)) - 1) / denom(fc),
(1 - sqrt(2*V0(g))*K(fc) + V0(g)*square(K(fc))) / denom(fc),
2 * (square(K(fc)) - 1) / denom(fc),
(1 - sqrt(2)*K(fc) + square(K(fc))) / denom(fc));
freq = hslider("[1]freq [unit:Hz][style:knob]", 1000, 20, 20000, 0.1);
gain = hslider("[2]gain [unit:dB][style:knob]", 0, -20, 20, 0.1);
process = vgroup("low-freq shelving boost", lfboost(freq,gain));
|
10d69be3cce10c57737d0e6be6965f896b069d2b404563e7e83206eae624592b | afalaize/faust | fourSourcesToOcto.dsp | declare name "fourSourcesToOcto";
declare version "1.0";
declare author "CICM";
declare license "BSD";
declare copyright "(c)CICM 2013";
import("stdfaust.lib");
r1 = hslider("Radius1", 1.0, 0, 5, 0.001) : si.smooth(ba.tau2pole(0.02));
a1 = hslider("Angle1", 0, ma.PI*(-2), ma.PI*2, 0.001) : si.smooth(ba.tau2pole(0.02));
r2 = hslider("Radius2", 1.0, 0, 5, 0.001) : si.smooth(ba.tau2pole(0.02));
a2 = hslider("Angle2", 0, ma.PI*(-2), ma.PI*2, 0.001) : si.smooth(ba.tau2pole(0.02));
r3 = hslider("Radius3", 1.0, 0, 5, 0.001) : si.smooth(ba.tau2pole(0.02));
a3 = hslider("Angle3", 0, ma.PI*(-2), ma.PI*2, 0.001) : si.smooth(ba.tau2pole(0.02));
r4 = hslider("Radius4", 1.0, 0, 5, 0.001) : si.smooth(ba.tau2pole(0.02));
a4 = hslider("Angle4", 0, ma.PI*(-2), ma.PI*2, 0.001) : si.smooth(ba.tau2pole(0.02));
process(sig1, sig2, sig3, sig4) = ho.map(3, sig1, r1, a1), ho.map(3, sig2, r2, a2), ho.map(3, sig3, r3, a3), ho.map(3, sig4, r4, a4) :> ho.optimInPhase(3) : ho.decoder(3, 8);
| https://raw.githubusercontent.com/afalaize/faust/8f9f5fe3aa167eaeecc15a99d4da984ac2797be3/examples/ambisonics/fourSourcesToOcto.dsp | faust | declare name "fourSourcesToOcto";
declare version "1.0";
declare author "CICM";
declare license "BSD";
declare copyright "(c)CICM 2013";
import("stdfaust.lib");
r1 = hslider("Radius1", 1.0, 0, 5, 0.001) : si.smooth(ba.tau2pole(0.02));
a1 = hslider("Angle1", 0, ma.PI*(-2), ma.PI*2, 0.001) : si.smooth(ba.tau2pole(0.02));
r2 = hslider("Radius2", 1.0, 0, 5, 0.001) : si.smooth(ba.tau2pole(0.02));
a2 = hslider("Angle2", 0, ma.PI*(-2), ma.PI*2, 0.001) : si.smooth(ba.tau2pole(0.02));
r3 = hslider("Radius3", 1.0, 0, 5, 0.001) : si.smooth(ba.tau2pole(0.02));
a3 = hslider("Angle3", 0, ma.PI*(-2), ma.PI*2, 0.001) : si.smooth(ba.tau2pole(0.02));
r4 = hslider("Radius4", 1.0, 0, 5, 0.001) : si.smooth(ba.tau2pole(0.02));
a4 = hslider("Angle4", 0, ma.PI*(-2), ma.PI*2, 0.001) : si.smooth(ba.tau2pole(0.02));
process(sig1, sig2, sig3, sig4) = ho.map(3, sig1, r1, a1), ho.map(3, sig2, r2, a2), ho.map(3, sig3, r3, a3), ho.map(3, sig4, r4, a4) :> ho.optimInPhase(3) : ho.decoder(3, 8);
|
|
21f972108f9f839b768dbc20cfa1a7aa15a618ddbf9a6f35ca3fd501e7608cb9 | SKyzZz/test | korg35LPF.dsp | declare name "korg35LPF";
declare description "Demonstration of the Korg 35 LPF";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise *switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.korg35LPF(normFreq,Q) <:_,_; | https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/examples/filtering/korg35LPF.dsp | faust | declare name "korg35LPF";
declare description "Demonstration of the Korg 35 LPF";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise *switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.korg35LPF(normFreq,Q) <:_,_; |
|
0bf452e28acafa817e86b10f333e106792dd185783d0569d7b2e98c58ae18293 | SKyzZz/test | korg35HPF.dsp | declare name "korg35HPF";
declare description "Demonstration of the Korg 35 HPF";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise *switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.korg35HPF(normFreq,Q) <:_,_; | https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/examples/filtering/korg35HPF.dsp | faust | declare name "korg35HPF";
declare description "Demonstration of the Korg 35 HPF";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise *switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.korg35HPF(normFreq,Q) <:_,_; |
|
40c1b4f57dfc92b917ad1781b969f2744f8128899b7d42361cd2122a007fadad | SpotlightKid/faustfilters | mooghalfladder.dsp | declare name "MoogHalfLadder";
declare description "FAUST Moog Half Ladder 12 dB LPF";
declare author "Eric Tarr";
declare license "MIT-style STK-4.3 license";
import("stdfaust.lib");
//------------------`moogHalfLadder`-----------------
// Virtual analog model of the 2nd-order Moog Half Ladder (simplified version of
// `(ve.)moogLadder`). Several 1st-order filters are cascaded in series.
// Feedback is then used, in part, to control the cut-off frequency and the
// resonance.
//
// This filter was implemented in Faust by Eric Tarr during the
// [2019 Embedded DSP With Faust Workshop](https://ccrma.stanford.edu/workshops/faust-embedded-19/).
//
// Modified by Christopher Arndt to change the cutoff frequency param
// to be given in Hertz instead of normalized 0.0 - 1.0.
//
// #### References
//
// * <https://www.willpirkle.com/app-notes/virtual-analog-moog-half-ladder-filter>
// * <http://www.willpirkle.com/Downloads/AN-8MoogHalfLadderFilter.pdf>
//
// #### Usage
//
// ```
// _ : moogHalfLadder(freq,Q) : _
// ```
//
// Where:
//
// * `freq`: cutoff frequency (20-20000 Hz)
// * `Q`: filter Q (0.707 - 25.0)
//---------------------------------------------------------------------
declare moogHalfLadder author "Eric Tarr";
declare moogHalfLadder license "MIT-style STK-4.3 license";
moogHalfLadder(freq,Q) = _ <: (s1,s2,s3,y) : !,!,!,_
letrec{
's1 = -(s3*B3*k):-(s2*B2*k):-(s1*B1*k):*(alpha0):-(s1):*(alpha*2):+(s1);
's2 = -(s3*B3*k):-(s2*B2*k):-(s1*B1*k):*(alpha0):-(s1):*(alpha):+(s1):-(s2):*(alpha*2):+(s2);
's3 = -(s3*B3*k):-(s2*B2*k):-(s1*B1*k):*(alpha0):-(s1):*(alpha):+(s1):-(s2):*(alpha):+(s2):-(s3):*(alpha*2):+(s3);
'y = -(s3*B3*k):-(s2*B2*k):-(s1*B1*k):*(alpha0):-(s1):*(alpha):+(s1):-(s2):*(alpha):+(s2) <:_*-1,((-(s3):*(alpha):+(s3))*2):>_;
}
with{
// freq = 2*(10^(3*normFreq+1));
normFreq = (log10(freq) - log10(2)) / 3.0 - (1.0 / 3.0);
k = 2.0*(Q - 0.707)/(25.0 - 0.707);
wd = 2*ma.PI*freq;
T = 1/ma.SR;
wa = (2/T)*tan(wd*T/2);
g = wa*T/2;
G = g/(1.0 + g);
alpha = G;
GA = 2*G-1; // All-pass gain
B1 = GA*G/(1+g);
B2 = GA/(1+g);
B3 = 2/(1+g);
alpha0 = 1/(1 + k*GA*G*G);
};
q = hslider("[1]Q[symbol: q][abbrev: q][style:knob]", 1.0, 0.707, 25, 0.01);
cutoff = hslider("[0]Cutoff frequency[symbol: cutoff][abbrev: cutoff][unit: hz][scale: log][style: knob]", 20000.0, 20.0, 20000, 0.1):si.smoo;
process = moogHalfLadder(cutoff, q);
| https://raw.githubusercontent.com/SpotlightKid/faustfilters/8dfb35de7b83935806abe950187e056623b6c01a/faust/mooghalfladder.dsp | faust | ------------------`moogHalfLadder`-----------------
Virtual analog model of the 2nd-order Moog Half Ladder (simplified version of
`(ve.)moogLadder`). Several 1st-order filters are cascaded in series.
Feedback is then used, in part, to control the cut-off frequency and the
resonance.
This filter was implemented in Faust by Eric Tarr during the
[2019 Embedded DSP With Faust Workshop](https://ccrma.stanford.edu/workshops/faust-embedded-19/).
Modified by Christopher Arndt to change the cutoff frequency param
to be given in Hertz instead of normalized 0.0 - 1.0.
#### References
* <https://www.willpirkle.com/app-notes/virtual-analog-moog-half-ladder-filter>
* <http://www.willpirkle.com/Downloads/AN-8MoogHalfLadderFilter.pdf>
#### Usage
```
_ : moogHalfLadder(freq,Q) : _
```
Where:
* `freq`: cutoff frequency (20-20000 Hz)
* `Q`: filter Q (0.707 - 25.0)
---------------------------------------------------------------------
freq = 2*(10^(3*normFreq+1));
All-pass gain | declare name "MoogHalfLadder";
declare description "FAUST Moog Half Ladder 12 dB LPF";
declare author "Eric Tarr";
declare license "MIT-style STK-4.3 license";
import("stdfaust.lib");
declare moogHalfLadder author "Eric Tarr";
declare moogHalfLadder license "MIT-style STK-4.3 license";
moogHalfLadder(freq,Q) = _ <: (s1,s2,s3,y) : !,!,!,_
letrec{
's1 = -(s3*B3*k):-(s2*B2*k):-(s1*B1*k):*(alpha0):-(s1):*(alpha*2):+(s1);
's2 = -(s3*B3*k):-(s2*B2*k):-(s1*B1*k):*(alpha0):-(s1):*(alpha):+(s1):-(s2):*(alpha*2):+(s2);
's3 = -(s3*B3*k):-(s2*B2*k):-(s1*B1*k):*(alpha0):-(s1):*(alpha):+(s1):-(s2):*(alpha):+(s2):-(s3):*(alpha*2):+(s3);
'y = -(s3*B3*k):-(s2*B2*k):-(s1*B1*k):*(alpha0):-(s1):*(alpha):+(s1):-(s2):*(alpha):+(s2) <:_*-1,((-(s3):*(alpha):+(s3))*2):>_;
}
with{
normFreq = (log10(freq) - log10(2)) / 3.0 - (1.0 / 3.0);
k = 2.0*(Q - 0.707)/(25.0 - 0.707);
wd = 2*ma.PI*freq;
T = 1/ma.SR;
wa = (2/T)*tan(wd*T/2);
g = wa*T/2;
G = g/(1.0 + g);
alpha = G;
B1 = GA*G/(1+g);
B2 = GA/(1+g);
B3 = 2/(1+g);
alpha0 = 1/(1 + k*GA*G*G);
};
q = hslider("[1]Q[symbol: q][abbrev: q][style:knob]", 1.0, 0.707, 25, 0.01);
cutoff = hslider("[0]Cutoff frequency[symbol: cutoff][abbrev: cutoff][unit: hz][scale: log][style: knob]", 20000.0, 20.0, 20000, 0.1):si.smoo;
process = moogHalfLadder(cutoff, q);
|
cc71f75205f4c937e38537f2e25b866c6218ba9e1222243c9dbe19596db76c61 | SpotlightKid/faustfilters | moogladder.dsp | declare name "MoogLadder";
declare description "FAUST Moog Ladder 24 dB LPF";
declare author "Christopher Arndt";
declare license "MIT-style STK-4.3 license";
import("stdfaust.lib");
//------------------`moogLadder`-----------------
// Virtual analog model of the 4th-order Moog Ladder, which is arguably the
// most well-known ladder filter in analog synthesizers. Several
// 1st-order filters are cascaded in series. Feedback is then used, in part, to
// control the cut-off frequency and the resonance.
//
// This filter was implemented in Faust by Eric Tarr during the
// [2019 Embedded DSP With Faust Workshop](https://ccrma.stanford.edu/workshops/faust-embedded-19/).
//
// Modified by Christopher Arndt to change the cutoff frequency param
// to be given in Hertz instead of normalized 0.0 - 1.0.
//
// #### References
//
// * <https://www.willpirkle.com/706-2/>
// * <http://www.willpirkle.com/Downloads/AN-4VirtualAnalogFilters.pdf>
//
// #### Usage
//
// ```
// _ : moogLadder(normFreq,Q) : _
// ```
//
// Where:
//
// * `freq`: cutoff frequency (20-20000 Hz)
// * `Q`: q (0.707 - 25.0)
//---------------------------------------------------------------------
declare moogLadder author "Eric Tarr";
declare moogLadder license "MIT-style STK-4.3 license";
moogLadder(freq,Q) = _<:(s1,s2,s3,s4,y) : !,!,!,!,_
letrec{
's1 = -(s4*k):-(s3*g*k):-(s2*g*g*k):-(s1*g*g*g*k):*(A):-(s1):*(B*2):+(s1);
's2 = -(s4*k):-(s3*g*k):-(s2*g*g*k):-(s1*g*g*g*k):*(A):-(s1):*(B):+(s1):-(s2):*(B*2):+(s2);
's3 = -(s4*k):-(s3*g*k):-(s2*g*g*k):-(s1*g*g*g*k):*(A):-(s1):*(B):+(s1):-(s2):*(B):+(s2):-(s3):*(B*2):+(s3);
's4 = -(s4*k):-(s3*g*k):-(s2*g*g*k):-(s1*g*g*g*k):*(A):-(s1):*(B):+(s1):-(s2):*(B):+(s2):-(s3):*(B):+(s3):-(s4):*(B*2):+(s4);
'y = -(s4*k):-(s3*g*k):-(s2*g*g*k):-(s1*g*g*g*k):*(A):-(s1):*(B):+(s1):-(s2):*(B):+(s2):-(s3):*(B):+(s3):-(s4):*(B):+(s4);
}
with{
// freq = 2*(10^(3*normFreq+1));
normFreq = (log10(freq) - log10(2)) / 3.0 - (1.0 / 3.0);
k = (3.9 - (normFreq^0.2)*0.9)*(Q - 0.707)/(25.0 - 0.707);
//k = 3.9*(Q - 0.707)/(25.0 - 0.707);
wd = 2*ma.PI*freq;
T = 1/ma.SR;
wa = (2/T)*tan(wd*T/2);
g = wa*T/2;
G = g*g*g*g;
A = 1/(1+(k*G));
B = g/(1+g);
};
q = hslider("[1]Q[symbol: q][abbrev: q][style:knob]", 1.0, 0.7072, 25, 0.01);
cutoff = hslider("[0]Cutoff frequency[symbol: cutoff][abbrev: cutoff][unit: hz][scale: log][style: knob]", 20000.0, 20.0, 20000, 0.1):si.smoo;
process = moogLadder(cutoff, q);
| https://raw.githubusercontent.com/SpotlightKid/faustfilters/8dfb35de7b83935806abe950187e056623b6c01a/faust/moogladder.dsp | faust | ------------------`moogLadder`-----------------
Virtual analog model of the 4th-order Moog Ladder, which is arguably the
most well-known ladder filter in analog synthesizers. Several
1st-order filters are cascaded in series. Feedback is then used, in part, to
control the cut-off frequency and the resonance.
This filter was implemented in Faust by Eric Tarr during the
[2019 Embedded DSP With Faust Workshop](https://ccrma.stanford.edu/workshops/faust-embedded-19/).
Modified by Christopher Arndt to change the cutoff frequency param
to be given in Hertz instead of normalized 0.0 - 1.0.
#### References
* <https://www.willpirkle.com/706-2/>
* <http://www.willpirkle.com/Downloads/AN-4VirtualAnalogFilters.pdf>
#### Usage
```
_ : moogLadder(normFreq,Q) : _
```
Where:
* `freq`: cutoff frequency (20-20000 Hz)
* `Q`: q (0.707 - 25.0)
---------------------------------------------------------------------
freq = 2*(10^(3*normFreq+1));
k = 3.9*(Q - 0.707)/(25.0 - 0.707); | declare name "MoogLadder";
declare description "FAUST Moog Ladder 24 dB LPF";
declare author "Christopher Arndt";
declare license "MIT-style STK-4.3 license";
import("stdfaust.lib");
declare moogLadder author "Eric Tarr";
declare moogLadder license "MIT-style STK-4.3 license";
moogLadder(freq,Q) = _<:(s1,s2,s3,s4,y) : !,!,!,!,_
letrec{
's1 = -(s4*k):-(s3*g*k):-(s2*g*g*k):-(s1*g*g*g*k):*(A):-(s1):*(B*2):+(s1);
's2 = -(s4*k):-(s3*g*k):-(s2*g*g*k):-(s1*g*g*g*k):*(A):-(s1):*(B):+(s1):-(s2):*(B*2):+(s2);
's3 = -(s4*k):-(s3*g*k):-(s2*g*g*k):-(s1*g*g*g*k):*(A):-(s1):*(B):+(s1):-(s2):*(B):+(s2):-(s3):*(B*2):+(s3);
's4 = -(s4*k):-(s3*g*k):-(s2*g*g*k):-(s1*g*g*g*k):*(A):-(s1):*(B):+(s1):-(s2):*(B):+(s2):-(s3):*(B):+(s3):-(s4):*(B*2):+(s4);
'y = -(s4*k):-(s3*g*k):-(s2*g*g*k):-(s1*g*g*g*k):*(A):-(s1):*(B):+(s1):-(s2):*(B):+(s2):-(s3):*(B):+(s3):-(s4):*(B):+(s4);
}
with{
normFreq = (log10(freq) - log10(2)) / 3.0 - (1.0 / 3.0);
k = (3.9 - (normFreq^0.2)*0.9)*(Q - 0.707)/(25.0 - 0.707);
wd = 2*ma.PI*freq;
T = 1/ma.SR;
wa = (2/T)*tan(wd*T/2);
g = wa*T/2;
G = g*g*g*g;
A = 1/(1+(k*G));
B = g/(1+g);
};
q = hslider("[1]Q[symbol: q][abbrev: q][style:knob]", 1.0, 0.7072, 25, 0.01);
cutoff = hslider("[0]Cutoff frequency[symbol: cutoff][abbrev: cutoff][unit: hz][scale: log][style: knob]", 20000.0, 20.0, 20000, 0.1):si.smoo;
process = moogLadder(cutoff, q);
|
8a2bc9d0ea4367d53e1520e00e6ce014ed5237c92ac5ef79c5af1062fe7454e3 | unicornsasfuel/reverb_trickery | reverbtrickery.dsp | declare name "Reverb Trickery";
declare author "Evermind";
import("stdfaust.lib");
not(x) = x <= 0;
////////////////
// UI Controls
////////////////
//"octave"
bypass_octave = not(checkbox("v:Reverb Trickery/h:[0]Trick Selection/[1]Octave"));
octave_direction = hslider("v:Reverb Trickery/t:[1]Parameters/v:[1]Octave/[0]Direction[style:menu{'Up':0;'Down':1}]",0,0,1,1);
//"distort"
bypass_distort = not(checkbox("v:Reverb Trickery/h:[0]Trick Selection/[2]Distort"));
distort_drive = hslider("v:Reverb Trickery/t:[1]Parameters/v:[2]Distort/[0]Drive",5,0,100,0.1) : /(100);
//"band"
bypass_band = not(checkbox("v:Reverb Trickery/h:[0]Trick Selection/[3]Band"));
low_cutoff = hslider("v:Reverb Trickery/t:[1]Parameters/v:[3]Band/[0]Low cutoff[unit:Hz]",20,20,20000,1);
high_cutoff = hslider("v:Reverb Trickery/t:[1]Parameters/v:[3]Band/[1]High cutoff[unit:Hz]",20000,20,20000,1);
//"gate"
bypass_gate = not(checkbox("v:Reverb Trickery/h:[0]Trick Selection/[2]Gate"));
gate_threshold = hslider("v:Reverb Trickery/t:[1]Parameters/v:[2]Gate/[0]Threshold[unit:dB]",-30,-90,0,1);
gate_attack = hslider("v:Reverb Trickery/t:[1]Parameters/v:[2]Gate/[1]Attack[unit:ms]",5,0,500,0.1) : /(1000);
gate_hold = hslider("v:Reverb Trickery/t:[1]Parameters/v:[2]Gate/[2]Hold[unit:ms]",5,0,1000,0.1) : /(1000);
gate_release = hslider("v:Reverb Trickery/t:[1]Parameters/v:[2]Gate/[3]Release[unit:ms]",5,0,1000,0.1) : /(1000);
//"bloom"
//reverb controls + wet/dry
reverb_decay = hslider("v:Reverb Trickery/t:[1]Parameters/v:[0]Reverb/[2]Sustain",50,0,100,1) : /(100);
narrowing_coefficient = 100 - hslider("v:Reverb Trickery/t:[1]Parameters/v:[0]Reverb/Narrowing %[tooltip:Adjust how much faster the stereo reverb decays. (e.g. 0 is stereo reverb, 50 is stereo reverb that fades to mono halfway through its tail, 100 is mono reverb.)]",0,0,100,1) : /(100);
wet = hslider("v:Reverb Trickery/t:[1]Parameters/v:[0]Reverb/[3]Wet %",0,0,100,1) : /(100);
//wet/dry
dry = 1-wet;
////////////////
// Process definition
////////////////
process = _,_ <: sp.stereoize(_ * dry), (effectize : reverberate(reverb_decay) : sp.stereoize(_ * wet)) :> _,_;
////////////////
// Helpers
////////////////
effectize = octave : distort : band : gate;
//"octave"
octave = ba.bypass2(bypass_octave,
sp.stereoize(
ef.transpose(
ba.sec2samp(.05),
ba.sec2samp(.05),
12 - (24 * octave_direction)
)
)
);
//"band"
band = ba.bypass2(bypass_band,
sp.stereoize(
fi.resonhp(low_cutoff, 1, 1) : fi.resonlp(high_cutoff, 1, 1)
)
);
//"gate"
gate = ba.bypass2(bypass_gate,
ef.gate_stereo(
gate_threshold,
gate_attack,
gate_hold,
gate_release
)
);
//"distort"
distort = ba.bypass2(bypass_distort,
sp.stereoize(
ef.cubicnl(distort_drive,0)
)
);
reverberate(decay) = _,_ <: wide_reverb(decay), narrow_reverb(decay) :> _,_ : sp.stereoize(_ * 0.5);
wide_reverb(decay) = reverb(decay * narrowing_coefficient);
narrow_reverb(decay) = reverb(decay) :> _ <: _,_;
reverb(decay) = re.dattorro_rev(0, 0.9995, .75, 0.625, decay, 0.7, 0.5, 0.0005);
//"bloom"
//wet/dry control
| https://raw.githubusercontent.com/unicornsasfuel/reverb_trickery/12ba709638c0061c28a1923d8bf5c57a2d5a8e86/reverbtrickery.dsp | faust | //////////////
UI Controls
//////////////
"octave"
"distort"
"band"
"gate"
"bloom"
reverb controls + wet/dry
wet/dry
//////////////
Process definition
//////////////
//////////////
Helpers
//////////////
"octave"
"band"
"gate"
"distort"
"bloom"
wet/dry control | declare name "Reverb Trickery";
declare author "Evermind";
import("stdfaust.lib");
not(x) = x <= 0;
bypass_octave = not(checkbox("v:Reverb Trickery/h:[0]Trick Selection/[1]Octave"));
octave_direction = hslider("v:Reverb Trickery/t:[1]Parameters/v:[1]Octave/[0]Direction[style:menu{'Up':0;'Down':1}]",0,0,1,1);
bypass_distort = not(checkbox("v:Reverb Trickery/h:[0]Trick Selection/[2]Distort"));
distort_drive = hslider("v:Reverb Trickery/t:[1]Parameters/v:[2]Distort/[0]Drive",5,0,100,0.1) : /(100);
bypass_band = not(checkbox("v:Reverb Trickery/h:[0]Trick Selection/[3]Band"));
low_cutoff = hslider("v:Reverb Trickery/t:[1]Parameters/v:[3]Band/[0]Low cutoff[unit:Hz]",20,20,20000,1);
high_cutoff = hslider("v:Reverb Trickery/t:[1]Parameters/v:[3]Band/[1]High cutoff[unit:Hz]",20000,20,20000,1);
bypass_gate = not(checkbox("v:Reverb Trickery/h:[0]Trick Selection/[2]Gate"));
gate_threshold = hslider("v:Reverb Trickery/t:[1]Parameters/v:[2]Gate/[0]Threshold[unit:dB]",-30,-90,0,1);
gate_attack = hslider("v:Reverb Trickery/t:[1]Parameters/v:[2]Gate/[1]Attack[unit:ms]",5,0,500,0.1) : /(1000);
gate_hold = hslider("v:Reverb Trickery/t:[1]Parameters/v:[2]Gate/[2]Hold[unit:ms]",5,0,1000,0.1) : /(1000);
gate_release = hslider("v:Reverb Trickery/t:[1]Parameters/v:[2]Gate/[3]Release[unit:ms]",5,0,1000,0.1) : /(1000);
reverb_decay = hslider("v:Reverb Trickery/t:[1]Parameters/v:[0]Reverb/[2]Sustain",50,0,100,1) : /(100);
narrowing_coefficient = 100 - hslider("v:Reverb Trickery/t:[1]Parameters/v:[0]Reverb/Narrowing %[tooltip:Adjust how much faster the stereo reverb decays. (e.g. 0 is stereo reverb, 50 is stereo reverb that fades to mono halfway through its tail, 100 is mono reverb.)]",0,0,100,1) : /(100);
wet = hslider("v:Reverb Trickery/t:[1]Parameters/v:[0]Reverb/[3]Wet %",0,0,100,1) : /(100);
dry = 1-wet;
process = _,_ <: sp.stereoize(_ * dry), (effectize : reverberate(reverb_decay) : sp.stereoize(_ * wet)) :> _,_;
effectize = octave : distort : band : gate;
octave = ba.bypass2(bypass_octave,
sp.stereoize(
ef.transpose(
ba.sec2samp(.05),
ba.sec2samp(.05),
12 - (24 * octave_direction)
)
)
);
band = ba.bypass2(bypass_band,
sp.stereoize(
fi.resonhp(low_cutoff, 1, 1) : fi.resonlp(high_cutoff, 1, 1)
)
);
gate = ba.bypass2(bypass_gate,
ef.gate_stereo(
gate_threshold,
gate_attack,
gate_hold,
gate_release
)
);
distort = ba.bypass2(bypass_distort,
sp.stereoize(
ef.cubicnl(distort_drive,0)
)
);
reverberate(decay) = _,_ <: wide_reverb(decay), narrow_reverb(decay) :> _,_ : sp.stereoize(_ * 0.5);
wide_reverb(decay) = reverb(decay * narrowing_coefficient);
narrow_reverb(decay) = reverb(decay) :> _ <: _,_;
reverb(decay) = re.dattorro_rev(0, 0.9995, .75, 0.625, decay, 0.7, 0.5, 0.0005);
|
f1aa42cebba34c91ceeb8d33e525081fdea43c9c6df9f1bb8ef35973a1427048 | micbuffa/WebAudioPlugins | kpp_deadgate.dsp | /*
* Copyright (C) 2018 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
*/
/*
* This pugin is effective noise gate.
*
* Process chain:
*
* input->deadzone->multigate->output
*
* deadzone - INSTANTLY eliminates the signal below the threshold level.
* This kills noise in pauses but distorts the signal around zero level.
*
* multigate - 7-band noise gate. The input signal is divided into 7 frequency bands.
* In each band, the signal is eliminated when falling below the
* threshold level with attack time 10 ms, hold time 100 ms, release
* time 20 ms.
*
*/
declare name "kpp_deadgate";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "0.1b";
import("stdfaust.lib");
process = output with {
deadzone_knob = ba.db2linear(vslider("Dead Zone", -120, -120, 0, 0.001));
noizegate_knob = vslider("Noise Gate", -120, -120, 0, 0.001);
deadzone = _ <: (max(deadzone_knob) : -(deadzone_knob)),
(min(-deadzone_knob) : +(deadzone_knob)) : + ;
multigate = _ : fi.filterbank(3, (65, 150, 300, 600, 1200, 2400)) :
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02) :> _;
output = _,_ :> fi.highpass(1,10) : deadzone : multigate <: _,_ ;
};
| https://raw.githubusercontent.com/micbuffa/WebAudioPlugins/2fab2ee55d131aa5de753dc2dd3b3723fbd5b274/examples/plugins/Faust/DeadGate/Original%20Faust%20Code/kpp_deadgate.dsp | faust |
* Copyright (C) 2018 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
* This pugin is effective noise gate.
*
* Process chain:
*
* input->deadzone->multigate->output
*
* deadzone - INSTANTLY eliminates the signal below the threshold level.
* This kills noise in pauses but distorts the signal around zero level.
*
* multigate - 7-band noise gate. The input signal is divided into 7 frequency bands.
* In each band, the signal is eliminated when falling below the
* threshold level with attack time 10 ms, hold time 100 ms, release
* time 20 ms.
*
|
declare name "kpp_deadgate";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "0.1b";
import("stdfaust.lib");
process = output with {
deadzone_knob = ba.db2linear(vslider("Dead Zone", -120, -120, 0, 0.001));
noizegate_knob = vslider("Noise Gate", -120, -120, 0, 0.001);
deadzone = _ <: (max(deadzone_knob) : -(deadzone_knob)),
(min(-deadzone_knob) : +(deadzone_knob)) : + ;
multigate = _ : fi.filterbank(3, (65, 150, 300, 600, 1200, 2400)) :
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.1, 0.02) :> _;
output = _,_ :> fi.highpass(1,10) : deadzone : multigate <: _,_ ;
};
|
3563aaef491375077a8daeea1cd18c0a2af547c236c30c0b90da3804802a6e5a | spencersalazar/faust2ck | freeverbStereo.dsp | declare name "stereoFreeverb";
declare version "0.0";
declare author "RM-CC";
declare description "Original freeverb demo application, modified so it doesn't mix inputs to mono";
import("stdfaust.lib");
//===============================Freeverb===================================
// compile with faust2jaqt freeverbStereo.dsp
// or no gui with faust2jackconsole freeverbStereo.dsp
// only change is to remove the following + <:
// stereo_freeverb(fb1, fb2, damp, spread) = + <: mono_freeverb(fb1, fb2, damp, 0), mono_freeverb(fb1, fb2, damp, spread);
// so it's now
// stereo_freeverb(fb1, fb2, damp, spread) = mono_freeverb(fb1, fb2, damp, 0), mono_freeverb(fb1, fb2, damp, spread);
//==========================================================================
//----------------------------`(re.)mono_freeverb`-------------------------
// A simple Schroeder reverberator primarily developed by "Jezar at Dreampoint" that
// is extensively used in the free-software world. It uses four Schroeder allpasses in
// series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each
// audio channel, and is said to be especially well tuned.
//
// `mono_freeverb` is a standard Faust function.
//
// #### Usage
//
// ```
// _ : mono_freeverb(fb1, fb2, damp, spread) : _;
// ```
//
// Where:
//
// * `fb1`: coefficient of the lowpass comb filters (0-1)
// * `fb2`: coefficient of the allpass comb filters (0-1)
// * `damp`: damping of the lowpass comb filter (0-1)
// * `spread`: spatial spread in number of samples (for stereo)
//
// #### License
// While this version is licensed LGPL (with exception) along with other GRAME
// library functions, the file freeverb.dsp in the examples directory of older
// Faust distributions, such as faust-0.9.85, was released under the BSD license,
// which is less restrictive.
//------------------------------------------------------------
// TODO: author RM
mono_freeverb(fb1, fb2, damp, spread) = _ <: par(i,8,lbcf(combtuningL(i)+spread,fb1,damp))
:> seq(i,4,fi.allpass_comb(1024, allpasstuningL(i)+spread, -fb2))
with {
// Filters parameters
combtuningL(0) = adaptSR(1116);
combtuningL(1) = adaptSR(1188);
combtuningL(2) = adaptSR(1277);
combtuningL(3) = adaptSR(1356);
combtuningL(4) = adaptSR(1422);
combtuningL(5) = adaptSR(1491);
combtuningL(6) = adaptSR(1557);
combtuningL(7) = adaptSR(1617);
allpasstuningL(0) = adaptSR(556);
allpasstuningL(1) = adaptSR(441);
allpasstuningL(2) = adaptSR(341);
allpasstuningL(3) = adaptSR(225);
// Lowpass Feedback Combfilter:
// https://ccrma.stanford.edu/~jos/pasp/Lowpass_Feedback_Comb_Filter.html
lbcf(dt, fb, damp) = (+:@(dt)) ~ (*(1-damp) : (+ ~ *(damp)) : *(fb));
origSR = 44100;
adaptSR(val) = val*ma.SR/origSR : int;
};
//----------------------------`(re.)stereo_freeverb`-------------------------
// A simple Schroeder reverberator primarily developed by "Jezar at Dreampoint" that
// is extensively used in the free-software world. It uses four Schroeder allpasses in
// series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each
// audio channel, and is said to be especially well tuned.
//
// #### Usage
//
// ```
// _,_ : stereo_freeverb(fb1, fb2, damp, spread) : _,_;
// ```
//
// Where:
//
// * `fb1`: coefficient of the lowpass comb filters (0-1)
// * `fb2`: coefficient of the allpass comb filters (0-1)
// * `damp`: damping of the lowpass comb filter (0-1)
// * `spread`: spatial spread in number of samples (for stereo)
//------------------------------------------------------------
// TODO: author RM
stereo_freeverb(fb1, fb2, damp, spread) = mono_freeverb(fb1, fb2, damp, 0), mono_freeverb(fb1, fb2, damp, spread);
//----------------------------`(dm.)freeverb_demo`-------------------------
// Freeverb demo application.
//
// #### Usage
//
// ```
// _,_ : freeverb_demo : _,_;
// ```
//------------------------------------------------------------
// Author: Romain Michon
// License: LGPL
freeverb_demo = _,_ <: (*(g)*fixedgain,*(g)*fixedgain :
stereo_freeverb(combfeed, allpassfeed, damping, spatSpread)),
*(1-g), *(1-g) :> _,_
with{
scaleroom = 0.28;
offsetroom = 0.7;
allpassfeed = 0.5;
scaledamp = 0.4;
fixedgain = 0.1;
origSR = 44100;
parameters(x) = hgroup("Freeverb",x);
knobGroup(x) = parameters(vgroup("[0]",x));
damping = knobGroup(vslider("[0] Damp [style: knob] [tooltip: Somehow control the
density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR);
combfeed = knobGroup(vslider("[1] RoomSize [style: knob] [tooltip: The room size
between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*
origSR/ma.SR + offsetroom);
spatSpread = knobGroup(vslider("[2] Stereo Spread [style: knob] [tooltip: Spatial
spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR
: int);
g = parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal
between 0 and 1 with 1 for the maximum amount of reverb.]", 0.12, 0, 1, 0.025));
};
process = freeverb_demo;
| https://raw.githubusercontent.com/spencersalazar/faust2ck/23065bfb2d5e9c6351b3067ddb19babe5b066e9d/src/test/freeverbStereo.dsp | faust | ===============================Freeverb===================================
compile with faust2jaqt freeverbStereo.dsp
or no gui with faust2jackconsole freeverbStereo.dsp
only change is to remove the following + <:
stereo_freeverb(fb1, fb2, damp, spread) = + <: mono_freeverb(fb1, fb2, damp, 0), mono_freeverb(fb1, fb2, damp, spread);
so it's now
stereo_freeverb(fb1, fb2, damp, spread) = mono_freeverb(fb1, fb2, damp, 0), mono_freeverb(fb1, fb2, damp, spread);
==========================================================================
----------------------------`(re.)mono_freeverb`-------------------------
A simple Schroeder reverberator primarily developed by "Jezar at Dreampoint" that
is extensively used in the free-software world. It uses four Schroeder allpasses in
series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each
audio channel, and is said to be especially well tuned.
`mono_freeverb` is a standard Faust function.
#### Usage
```
_ : mono_freeverb(fb1, fb2, damp, spread) : _;
```
Where:
* `fb1`: coefficient of the lowpass comb filters (0-1)
* `fb2`: coefficient of the allpass comb filters (0-1)
* `damp`: damping of the lowpass comb filter (0-1)
* `spread`: spatial spread in number of samples (for stereo)
#### License
While this version is licensed LGPL (with exception) along with other GRAME
library functions, the file freeverb.dsp in the examples directory of older
Faust distributions, such as faust-0.9.85, was released under the BSD license,
which is less restrictive.
------------------------------------------------------------
TODO: author RM
Filters parameters
Lowpass Feedback Combfilter:
https://ccrma.stanford.edu/~jos/pasp/Lowpass_Feedback_Comb_Filter.html
----------------------------`(re.)stereo_freeverb`-------------------------
A simple Schroeder reverberator primarily developed by "Jezar at Dreampoint" that
is extensively used in the free-software world. It uses four Schroeder allpasses in
series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each
audio channel, and is said to be especially well tuned.
#### Usage
```
_,_ : stereo_freeverb(fb1, fb2, damp, spread) : _,_;
```
Where:
* `fb1`: coefficient of the lowpass comb filters (0-1)
* `fb2`: coefficient of the allpass comb filters (0-1)
* `damp`: damping of the lowpass comb filter (0-1)
* `spread`: spatial spread in number of samples (for stereo)
------------------------------------------------------------
TODO: author RM
----------------------------`(dm.)freeverb_demo`-------------------------
Freeverb demo application.
#### Usage
```
_,_ : freeverb_demo : _,_;
```
------------------------------------------------------------
Author: Romain Michon
License: LGPL | declare name "stereoFreeverb";
declare version "0.0";
declare author "RM-CC";
declare description "Original freeverb demo application, modified so it doesn't mix inputs to mono";
import("stdfaust.lib");
mono_freeverb(fb1, fb2, damp, spread) = _ <: par(i,8,lbcf(combtuningL(i)+spread,fb1,damp))
:> seq(i,4,fi.allpass_comb(1024, allpasstuningL(i)+spread, -fb2))
with {
combtuningL(0) = adaptSR(1116);
combtuningL(1) = adaptSR(1188);
combtuningL(2) = adaptSR(1277);
combtuningL(3) = adaptSR(1356);
combtuningL(4) = adaptSR(1422);
combtuningL(5) = adaptSR(1491);
combtuningL(6) = adaptSR(1557);
combtuningL(7) = adaptSR(1617);
allpasstuningL(0) = adaptSR(556);
allpasstuningL(1) = adaptSR(441);
allpasstuningL(2) = adaptSR(341);
allpasstuningL(3) = adaptSR(225);
lbcf(dt, fb, damp) = (+:@(dt)) ~ (*(1-damp) : (+ ~ *(damp)) : *(fb));
origSR = 44100;
adaptSR(val) = val*ma.SR/origSR : int;
};
stereo_freeverb(fb1, fb2, damp, spread) = mono_freeverb(fb1, fb2, damp, 0), mono_freeverb(fb1, fb2, damp, spread);
freeverb_demo = _,_ <: (*(g)*fixedgain,*(g)*fixedgain :
stereo_freeverb(combfeed, allpassfeed, damping, spatSpread)),
*(1-g), *(1-g) :> _,_
with{
scaleroom = 0.28;
offsetroom = 0.7;
allpassfeed = 0.5;
scaledamp = 0.4;
fixedgain = 0.1;
origSR = 44100;
parameters(x) = hgroup("Freeverb",x);
knobGroup(x) = parameters(vgroup("[0]",x));
damping = knobGroup(vslider("[0] Damp [style: knob] [tooltip: Somehow control the
density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR);
combfeed = knobGroup(vslider("[1] RoomSize [style: knob] [tooltip: The room size
between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom*
origSR/ma.SR + offsetroom);
spatSpread = knobGroup(vslider("[2] Stereo Spread [style: knob] [tooltip: Spatial
spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR
: int);
g = parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal
between 0 and 1 with 1 for the maximum amount of reverb.]", 0.12, 0, 1, 0.025));
};
process = freeverb_demo;
|
4dff3889923fbc22ad5fdb5258f64b8dae4612900c94a417a531beea0842830d | olegkapitonov/KPP-VST3 | kpp_octaver.dsp | /*
* Copyright (C) 2018-2020 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
*/
/*
* This plugin is an octaver pedal emulator.
* Model of analog octaver.
*
* Process:
*
* Extract 1-st harmonics,
* convert to squire form,
* divide it's frequency by 2 and by 4,
* modulate input with this signals.
*
* Creates 2 additional tones - 1 and 2 octaves below.
*/
declare name "kpp_octaver";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "1.2";
import("stdfaust.lib");
process = output with {
// Bypass button, 0 - pedal on, 1 -pedal off (bypass on)
bypass = checkbox("99_bypass");
level_d1 = ba.db2linear(-20 + vslider("octave1",0,0,30,0.01));
level_d2 = ba.db2linear(-20 + vslider("octave2",0,0,30,0.01));
level_dry = ba.db2linear(-30 + vslider("dry",30,0,30,0.01));
cutoff_freq = vslider("cutoff frequency",160,100,200,0.1);
// Extract 1-st harmonics
pre_filter = fi.dcblocker : fi.lowpass(3, 80) : fi.peak_eq(30, 100, 80) :
fi.peak_eq(20, 440, 200);
// Convert to squire form (Shmitt trigger)
distortion = (+ : co.compressor_mono(100, -80, 0.1, 0.1) :
ma.signum : max(-0.0000001) : min(0.0000001)) ~ _;
octaver = distortion : fi.zero(1) : max(0.0) : ma.signum : *(-2.0) : +(1.0) :
(* : +(0.1) : *(10000.0) : max(-1.0) : min(1.0)) ~ _ :
max(0.0) : min(1.0);
// Divide 1-st harmonics by 2 - 1 octave below
down1 = _ <: fi.highpass(1,260) ,(pre_filter : octaver) : * :
fi.lowpass(3, cutoff_freq) : fi.highpass(3, 40) : fi.highpass(1, 80);
// Divide by 4 - 2 octaves below
down2 = _ <: fi.highpass(5,240) ,(pre_filter : octaver : -(0.5) : octaver) : * :
fi.lowpass(3, cutoff_freq / 2.0);
// Modulate input signal
stomp = _ <: down1,down2 : *(level_d1),*(level_d2) :
+ : *(2.0) : fi.dcblocker;
output = _,_ : + <: *(level_dry),ba.bypass1(bypass, stomp) : + <: _,_;
};
| https://raw.githubusercontent.com/olegkapitonov/KPP-VST3/91af48938c94d5a72009e01ef139bc3de8cf8dcd/kpp_octaver/include/kpp_octaver.dsp | faust |
* Copyright (C) 2018-2020 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
* This plugin is an octaver pedal emulator.
* Model of analog octaver.
*
* Process:
*
* Extract 1-st harmonics,
* convert to squire form,
* divide it's frequency by 2 and by 4,
* modulate input with this signals.
*
* Creates 2 additional tones - 1 and 2 octaves below.
Bypass button, 0 - pedal on, 1 -pedal off (bypass on)
Extract 1-st harmonics
Convert to squire form (Shmitt trigger)
Divide 1-st harmonics by 2 - 1 octave below
Divide by 4 - 2 octaves below
Modulate input signal |
declare name "kpp_octaver";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "1.2";
import("stdfaust.lib");
process = output with {
bypass = checkbox("99_bypass");
level_d1 = ba.db2linear(-20 + vslider("octave1",0,0,30,0.01));
level_d2 = ba.db2linear(-20 + vslider("octave2",0,0,30,0.01));
level_dry = ba.db2linear(-30 + vslider("dry",30,0,30,0.01));
cutoff_freq = vslider("cutoff frequency",160,100,200,0.1);
pre_filter = fi.dcblocker : fi.lowpass(3, 80) : fi.peak_eq(30, 100, 80) :
fi.peak_eq(20, 440, 200);
distortion = (+ : co.compressor_mono(100, -80, 0.1, 0.1) :
ma.signum : max(-0.0000001) : min(0.0000001)) ~ _;
octaver = distortion : fi.zero(1) : max(0.0) : ma.signum : *(-2.0) : +(1.0) :
(* : +(0.1) : *(10000.0) : max(-1.0) : min(1.0)) ~ _ :
max(0.0) : min(1.0);
down1 = _ <: fi.highpass(1,260) ,(pre_filter : octaver) : * :
fi.lowpass(3, cutoff_freq) : fi.highpass(3, 40) : fi.highpass(1, 80);
down2 = _ <: fi.highpass(5,240) ,(pre_filter : octaver : -(0.5) : octaver) : * :
fi.lowpass(3, cutoff_freq / 2.0);
stomp = _ <: down1,down2 : *(level_d1),*(level_d2) :
+ : *(2.0) : fi.dcblocker;
output = _,_ : + <: *(level_dry),ba.bypass1(bypass, stomp) : + <: _,_;
};
|
6432fd68ff1e4742f782d8162a6180ac10d0a3c2134e934dde6eea25cc78c8b3 | olegkapitonov/KPP-VST3 | kpp_deadgate.dsp | /*
* Copyright (C) 2018-2020 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
*/
/*
* This pugin is effective noise gate.
*
* Process chain:
*
* input->deadzone->multigate->output
*
* deadzone - INSTANTLY eliminates the signal below the threshold level.
* This kills noise in pauses but distorts the signal around zero level.
*
* multigate - 7-band noise gate. The input signal is divided into 7 frequency bands.
* In each band, the signal is eliminated when falling below the
* threshold level with attack time 10 ms, hold time 100 ms, release
* time 20 ms.
*
*/
declare name "kpp_deadgate";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "1.2";
import("stdfaust.lib");
process = output with {
deadzone_knob = ba.db2linear(vslider("Dead Zone", -120, -120, 0, 0.001));
noizegate_knob = vslider("Noise Gate", -120, -120, 0, 0.001);
deadzone = _ <: (max(deadzone_knob) : -(deadzone_knob)),
(min(-deadzone_knob) : +(deadzone_knob)) : + ;
multigate = _ : fi.filterbank(3, (65, 150, 300, 600, 1200, 2400)) :
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02) :> _;
output = _,_ :> fi.highpass(1,10) : deadzone : multigate :
*(ba.db2linear(-6.0)) <: _,_ ;
};
| https://raw.githubusercontent.com/olegkapitonov/KPP-VST3/91af48938c94d5a72009e01ef139bc3de8cf8dcd/kpp_deadgate/include/kpp_deadgate.dsp | faust |
* Copyright (C) 2018-2020 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
* This pugin is effective noise gate.
*
* Process chain:
*
* input->deadzone->multigate->output
*
* deadzone - INSTANTLY eliminates the signal below the threshold level.
* This kills noise in pauses but distorts the signal around zero level.
*
* multigate - 7-band noise gate. The input signal is divided into 7 frequency bands.
* In each band, the signal is eliminated when falling below the
* threshold level with attack time 10 ms, hold time 100 ms, release
* time 20 ms.
*
|
declare name "kpp_deadgate";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "1.2";
import("stdfaust.lib");
process = output with {
deadzone_knob = ba.db2linear(vslider("Dead Zone", -120, -120, 0, 0.001));
noizegate_knob = vslider("Noise Gate", -120, -120, 0, 0.001);
deadzone = _ <: (max(deadzone_knob) : -(deadzone_knob)),
(min(-deadzone_knob) : +(deadzone_knob)) : + ;
multigate = _ : fi.filterbank(3, (65, 150, 300, 600, 1200, 2400)) :
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02) :> _;
output = _,_ :> fi.highpass(1,10) : deadzone : multigate :
*(ba.db2linear(-6.0)) <: _,_ ;
};
|
a556931eabb198ddad0d76567f9bad269310904d6950f36a3be9a821b9548354 | rottingsounds/bitDSP-faust | lfsrNoGUI.dsp | declare name "LFSRNoGUI";
declare description "linear feedback shift register example without GUI";
declare author "Till Bovermann";
declare reference "http://rottingsounds.org";
// see https://en.wikipedia.org/wiki/Linear-feedback_shift_register
import("stdfaust.lib");
bit32 = library("bitDSP_int32.lib");
// plot
// CXXFLAGS="-I ../include" faust2csvplot -I ../lib lfsrNoGUI.dsp
// ./lfsrNoGUI -n 10
// compile
// CXXFLAGS="-I ../../../include" faust2caqt -I ../lib lfsrNoGUI.dsp
// // open lfsrNoGUI.app
// dac_bits = int(nentry("dac bits",1,1,32,1));
// dac_offset = min(int(nentry("dac offset",0,0,31,1)), 32-dac_bits);
dac_bits = 31;
dac_offset = 0;
// lfsr_bits = int(nentry("lfsr bits",1,1,32,1));
lfsr_bits = 16;
// lfsr_init = nentry("init val",1,1,492000,1);
lfsr_init = 12356;
// lfsr_mask = bit32.bit_mask(
// par(i,6,
// nentry("parity source bit %i",i,0,31,1)
// )
// );
lfsr_mask = bit32.bit_mask((15, 13, 11, 10, 2));
lfsr = (
bit32.lfsr(lfsr_bits, lfsr_mask, lfsr_init),
bit32.lfsr(lfsr_bits, lfsr_mask, lfsr_init + 1)
);
// select which bit range should be used to create the PCM signal
process = lfsr : par(i, outputs(lfsr), bit32.bitDAC(dac_offset, dac_bits));
| https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/examples/lfsrNoGUI.dsp | faust | see https://en.wikipedia.org/wiki/Linear-feedback_shift_register
plot
CXXFLAGS="-I ../include" faust2csvplot -I ../lib lfsrNoGUI.dsp
./lfsrNoGUI -n 10
compile
CXXFLAGS="-I ../../../include" faust2caqt -I ../lib lfsrNoGUI.dsp
// open lfsrNoGUI.app
dac_bits = int(nentry("dac bits",1,1,32,1));
dac_offset = min(int(nentry("dac offset",0,0,31,1)), 32-dac_bits);
lfsr_bits = int(nentry("lfsr bits",1,1,32,1));
lfsr_init = nentry("init val",1,1,492000,1);
lfsr_mask = bit32.bit_mask(
par(i,6,
nentry("parity source bit %i",i,0,31,1)
)
);
select which bit range should be used to create the PCM signal | declare name "LFSRNoGUI";
declare description "linear feedback shift register example without GUI";
declare author "Till Bovermann";
declare reference "http://rottingsounds.org";
import("stdfaust.lib");
bit32 = library("bitDSP_int32.lib");
dac_bits = 31;
dac_offset = 0;
lfsr_bits = 16;
lfsr_init = 12356;
lfsr_mask = bit32.bit_mask((15, 13, 11, 10, 2));
lfsr = (
bit32.lfsr(lfsr_bits, lfsr_mask, lfsr_init),
bit32.lfsr(lfsr_bits, lfsr_mask, lfsr_init + 1)
);
process = lfsr : par(i, outputs(lfsr), bit32.bitDAC(dac_offset, dac_bits));
|
f9872f47998d9ee59496d038492684cb0df39e4d9fbdcbb7c071cf11b038b365 | rottingsounds/bitDSP-faust | lfsr32.dsp | declare name "LFSR32";
declare author "Till Bovermann";
declare description "linear feedback shift register (32bit) example";
declare reference "http://rottingsounds.org";
// see https://en.wikipedia.org/wiki/Linear-feedback_shift_register
import("stdfaust.lib");
bit32 = library("bitDSP_int32.lib");
// plot
// CXXFLAGS="-I ../include" faust2csvplot -I ../lib lfsr32.dsp
// ./lfsr32 -n 10
// compile
// CXXFLAGS="-I ../../../include" faust2caqt -I ../lib lfsr32.dsp
// // open lfsr32.app
dac_bits = int(nentry("dac bits" ,1,1,32,1));
dac_offset = min(int(nentry("dac offset",0,0,31,1)), 32-dac_bits);
// initial state of the LFSR (!=0)
// change to reset LFSR to start with that new value
lfsr_init = nentry("init val",1,1,492000,1);
// set your own bits
// lfsr_mask = bit32.bit_mask(
// par(i,6,
// nentry("parity source bit %i",i,0,31,1)
// )
// );
// an example that reasonable sense...
lfsr_mask = bit32.bit_mask((8, 31, 10)); // bits to set high
// lfsr = bit32.lfsr32(lfsr_mask, lfsr_init) <: _,_;
lfsr = bit32.lfsr32(lfsr_mask, lfsr_init);
// select which bit range should be used to create the PCM signal
process = lfsr : par(i, outputs(lfsr), bit32.bitDAC(dac_offset, dac_bits));
| https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/examples/lfsr32.dsp | faust | see https://en.wikipedia.org/wiki/Linear-feedback_shift_register
plot
CXXFLAGS="-I ../include" faust2csvplot -I ../lib lfsr32.dsp
./lfsr32 -n 10
compile
CXXFLAGS="-I ../../../include" faust2caqt -I ../lib lfsr32.dsp
// open lfsr32.app
initial state of the LFSR (!=0)
change to reset LFSR to start with that new value
set your own bits
lfsr_mask = bit32.bit_mask(
par(i,6,
nentry("parity source bit %i",i,0,31,1)
)
);
an example that reasonable sense...
bits to set high
lfsr = bit32.lfsr32(lfsr_mask, lfsr_init) <: _,_;
select which bit range should be used to create the PCM signal | declare name "LFSR32";
declare author "Till Bovermann";
declare description "linear feedback shift register (32bit) example";
declare reference "http://rottingsounds.org";
import("stdfaust.lib");
bit32 = library("bitDSP_int32.lib");
dac_bits = int(nentry("dac bits" ,1,1,32,1));
dac_offset = min(int(nentry("dac offset",0,0,31,1)), 32-dac_bits);
lfsr_init = nentry("init val",1,1,492000,1);
lfsr = bit32.lfsr32(lfsr_mask, lfsr_init);
process = lfsr : par(i, outputs(lfsr), bit32.bitDAC(dac_offset, dac_bits));
|
2320684e6ca896ed7e5e773ca113fb878546e99e8352745491ef0566ef6411c6 | rottingsounds/bitDSP-faust | RawLFSR.dsp | declare name "RawLFSR";
declare author "Till Bovermann";
declare description "linear feedback shift register example, raw output";
declare reference "http://rottingsounds.org";
// compute lfsr on an n-bit integer bitset (assuming it to be unsigned, [0 < n <= 32] ).
// see https://en.wikipedia.org/wiki/Linear-feedback_shift_register
import("stdfaust.lib");
bit32 = library("bitDSP_int32.lib");
// SuperCollider
// CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix RawLFSR.dsp
// plot
// CXXFLAGS="-I ../include" faust2csvplot -I ../../lib RawLFSR.dsp
// ./lfsr -n 10
// compile
// CXXFLAGS="-I ../../../include" faust2caqt -I ../../lib RawLFSR.dsp
// // open lfsr.app
// how many bits the LFSR runs on (1-32)
lfsr_num_bits = int(nentry("bits",1,1,32,1));
// initial state of the LFSR as 32bit (!=0)
// change to reset LFSR to start with that new value
lfsr_init_state = nentry("init",1,1,492000,1);
lfsr_parity_mask = bit32.bit_mask(
par(i,32,
nentry("bit%i",i,0,31,1)
)
);
// lfsr = (
// bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state),
// bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state + 1)
// );
lfsr = bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state);
process = lfsr;
| https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/examples/_sc/RawLFSR.dsp | faust | compute lfsr on an n-bit integer bitset (assuming it to be unsigned, [0 < n <= 32] ).
see https://en.wikipedia.org/wiki/Linear-feedback_shift_register
SuperCollider
CXXFLAGS="-I ../../../../include" faust2supercollider -I ../../lib -noprefix RawLFSR.dsp
plot
CXXFLAGS="-I ../include" faust2csvplot -I ../../lib RawLFSR.dsp
./lfsr -n 10
compile
CXXFLAGS="-I ../../../include" faust2caqt -I ../../lib RawLFSR.dsp
// open lfsr.app
how many bits the LFSR runs on (1-32)
initial state of the LFSR as 32bit (!=0)
change to reset LFSR to start with that new value
lfsr = (
bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state),
bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state + 1)
); | declare name "RawLFSR";
declare author "Till Bovermann";
declare description "linear feedback shift register example, raw output";
declare reference "http://rottingsounds.org";
import("stdfaust.lib");
bit32 = library("bitDSP_int32.lib");
lfsr_num_bits = int(nentry("bits",1,1,32,1));
lfsr_init_state = nentry("init",1,1,492000,1);
lfsr_parity_mask = bit32.bit_mask(
par(i,32,
nentry("bit%i",i,0,31,1)
)
);
lfsr = bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state);
process = lfsr;
|
b37b222005dce88a4272602686a4c48b1468241bf82c4bb161a5495ecd892ebe | SKyzZz/test | diodeLadder.dsp | declare name "diodeLadder";
declare description "Demonstration of diodeLadder";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.7072,25,0.01);
normFreq = hslider("freq",0.1,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise *switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.diodeLadder(normFreq,Q) <:_,_; | https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/examples/filtering/diodeLadder.dsp | faust | declare name "diodeLadder";
declare description "Demonstration of diodeLadder";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.7072,25,0.01);
normFreq = hslider("freq",0.1,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise *switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.diodeLadder(normFreq,Q) <:_,_; |
|
3d6a4a3995b0a8dad7427ac3fe0cb0539ddebde4be2cd479389f7509c06cf6b7 | SKyzZz/test | moogLadder.dsp | declare name "moogLadder";
declare description "Demonstration of moogLadder";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.7072,25,0.01);
normFreq = hslider("freq",0.1,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise *switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.moogLadder(normFreq,Q) <:_,_; | https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/examples/filtering/moogLadder.dsp | faust | declare name "moogLadder";
declare description "Demonstration of moogLadder";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.7072,25,0.01);
normFreq = hslider("freq",0.1,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise *switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.moogLadder(normFreq,Q) <:_,_; |
|
fdb43f7d5ed02876ce1bfbe974e3baceb042104233cce2e5810667ea92479d64 | RuolunWeng/faust2smartphone | oscplugin.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]", 1, 0, 5, 0.01);
process = vgroup("Oscillator", os.osc(freq) * vol);
| https://raw.githubusercontent.com/RuolunWeng/faust2smartphone/78f502aeb42af3d8fa48b0cbfef01d3b267dc038/examples/3_Plugin_Mode/oscplugin.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]", 1, 0, 5, 0.01);
process = vgroup("Oscillator", os.osc(freq) * vol);
|
6355d2d4831f4d7839306301da7be4445eba04d8403fc3dc7c2654704d556677 | SKyzZz/test | oberheimBSF.dsp | declare name "oberheimBSF";
declare description "Demonstration of the Oberheim Band-Stop Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.oberheimBSF(normFreq,Q) <:_,_;
| https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/examples/filtering/oberheimBSF.dsp | faust | declare name "oberheimBSF";
declare description "Demonstration of the Oberheim Band-Stop Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.oberheimBSF(normFreq,Q) <:_,_;
|
|
59bf240bb2f8e6054a3dd68b1367f558c9a24e16a1b4e90fbebec59b2f4655e0 | SKyzZz/test | oberheimBPF.dsp | declare name "oberheimBPF";
declare description "Demonstration of the Oberheim Band-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.oberheimBPF(normFreq,Q) <:_,_;
| https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/examples/filtering/oberheimBPF.dsp | faust | declare name "oberheimBPF";
declare description "Demonstration of the Oberheim Band-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.oberheimBPF(normFreq,Q) <:_,_;
|
|
20f579b63baa2ce89a05211f3e83f3356f0fa5907b1d11d0eb8d8ed2c6dec23a | SKyzZz/test | oberheimHPF.dsp | declare name "oberheimHPF";
declare description "Demonstration of the Oberheim High-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.oberheimHPF(normFreq,Q) <:_,_;
| https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/examples/filtering/oberheimHPF.dsp | faust | declare name "oberheimHPF";
declare description "Demonstration of the Oberheim High-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.oberheimHPF(normFreq,Q) <:_,_;
|
|
dfc427992e63109d08771e9778e0d37e28c5579d73bc2259e9b28b921e966617 | SKyzZz/test | oberheimLPF.dsp | declare name "oberheimLPF";
declare description "Demonstration of the Oberheim Low-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.oberheimLPF(normFreq,Q) <:_,_;
| https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/examples/filtering/oberheimLPF.dsp | faust | declare name "oberheimLPF";
declare description "Demonstration of the Oberheim Low-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.oberheimLPF(normFreq,Q) <:_,_;
|
|
1d6752f472e288cd07ea8022951ad2ce67158464cba5f1ba8848bf17facbb265 | tonal-glyph/faustus | karplus32.dsp | declare name "karplus32";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
//-----------------------------------------------
// karplus-strong
// with 32 resonators in parallel
//-----------------------------------------------
import("stdfaust.lib");
// Excitator
//--------
upfront(x) = (x-x') > 0.0;
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = upfront : release(n) : >(0.0) : +(leak);
leak = 1.0/65536.0;
size = hslider("excitation (samples)", 128, 2, 512, 1);
// Resonator
//-----------------
dur = hslider("duration (samples)", 128, 2, 512, 1);
att = hslider("attenuation", 0.1, 0, 1, 0.01);
average(x) = (x+x')/2;
resonator(d, a) = (+ : de.delay(4096, d-1.5)) ~ (average : *(1.0-a)) ;
// Polyphony
//-----------------
detune = hslider("detune", 32, 0, 512, 1);
polyphony = hslider("polyphony", 1, 0, 32, 1);
output = hslider("output volume", 0.5, 0, 1, 0.1);
process = vgroup("karplus32",
vgroup("noise generator", no.noise * hslider("level", 0.5, 0, 1, 0.1))
: vgroup("excitator", *(button("play"): trigger(size)))
<: vgroup("resonator x32", par(i,32, resonator(dur+i*detune, att) * (polyphony > i)))
:> *(output),*(output)
);
| https://raw.githubusercontent.com/tonal-glyph/faustus/cc887b115aceaee202edbdb37ee0e4087bfb5a33/benchmark/karplus32.dsp | faust | -----------------------------------------------
karplus-strong
with 32 resonators in parallel
-----------------------------------------------
Excitator
--------
Resonator
-----------------
Polyphony
----------------- | declare name "karplus32";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
import("stdfaust.lib");
upfront(x) = (x-x') > 0.0;
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = upfront : release(n) : >(0.0) : +(leak);
leak = 1.0/65536.0;
size = hslider("excitation (samples)", 128, 2, 512, 1);
dur = hslider("duration (samples)", 128, 2, 512, 1);
att = hslider("attenuation", 0.1, 0, 1, 0.01);
average(x) = (x+x')/2;
resonator(d, a) = (+ : de.delay(4096, d-1.5)) ~ (average : *(1.0-a)) ;
detune = hslider("detune", 32, 0, 512, 1);
polyphony = hslider("polyphony", 1, 0, 32, 1);
output = hslider("output volume", 0.5, 0, 1, 0.1);
process = vgroup("karplus32",
vgroup("noise generator", no.noise * hslider("level", 0.5, 0, 1, 0.1))
: vgroup("excitator", *(button("play"): trigger(size)))
<: vgroup("resonator x32", par(i,32, resonator(dur+i*detune, att) * (polyphony > i)))
:> *(output),*(output)
);
|
6baf9b0f086ef883cc7ba1c6d83a006099d2788fc1bf44739f061aae54758639 | s-e-a-m/faust-libraries | ORTF_plot.dsp | declare name "MID SIDE PANNER - LEFT RIGHT LOUDSPEAKER";
declare version "001";
declare author "Giuseppe Silvi";
declare license "GNU-GPL-v3";
declare copyright "(c)SEAM 2019";
declare description "MID SIDE PANNER - LEFT RIGHT LOUDSPEAKER";
import("stdfaust.lib");
import("../../seam.lib");
//radsweep = (os.lf_trianglepos(1)*90)-45 : deg2rad;
radsweep = (os.lf_trianglepos(1)*360)-180 : deg2rad;
radfix = 23 : deg2rad;
process = 1,radsweep : ortf <: _,_,nsum;
//process = os.osc(20000),radsweep : ortf <: _,_,nsum,ndif;
band1 = os.osc(20000),radfix : ortf : nsum;// : RMS(1000);
band2 = os.osc(10000),radfix : ortf : nsum;// : RMS(1000);
band3 = os.osc(5000),radfix : ortf : nsum;// : RMS(1000);
band4 = os.osc(2500),radfix : ortf : nsum;// : RMS(1000);
band5 = os.osc(1250),radfix : ortf : nsum;// : RMS(1000);
band6 = os.osc(625),radfix : ortf : nsum;// : RMS(1000);
band7 = os.osc(312),radfix : ortf : nsum;// : RMS(1000);
band8 = os.osc(150),radfix : ortf : nsum;// : RMS(1000);
band9 = os.osc(75),radfix : ortf : nsum;// : RMS(1000);
band10 = os.osc(35),radfix : ortf : nsum;// : RMS(1000);
//process = band1, band2, band3, band4, band5, band6, band7, band8, band9, band10 :> _;
ortfnoise = no.pink_noise, radfix : ortf <: nsum,ndif;
//process = ortfnoise;
| https://raw.githubusercontent.com/s-e-a-m/faust-libraries/9120cccb9335f42407062eb4bf149188d8018b07/plots/dsp/ORTF_plot.dsp | faust | radsweep = (os.lf_trianglepos(1)*90)-45 : deg2rad;
process = os.osc(20000),radsweep : ortf <: _,_,nsum,ndif;
: RMS(1000);
: RMS(1000);
: RMS(1000);
: RMS(1000);
: RMS(1000);
: RMS(1000);
: RMS(1000);
: RMS(1000);
: RMS(1000);
: RMS(1000);
process = band1, band2, band3, band4, band5, band6, band7, band8, band9, band10 :> _;
process = ortfnoise; | declare name "MID SIDE PANNER - LEFT RIGHT LOUDSPEAKER";
declare version "001";
declare author "Giuseppe Silvi";
declare license "GNU-GPL-v3";
declare copyright "(c)SEAM 2019";
declare description "MID SIDE PANNER - LEFT RIGHT LOUDSPEAKER";
import("stdfaust.lib");
import("../../seam.lib");
radsweep = (os.lf_trianglepos(1)*360)-180 : deg2rad;
radfix = 23 : deg2rad;
process = 1,radsweep : ortf <: _,_,nsum;
ortfnoise = no.pink_noise, radfix : ortf <: nsum,ndif;
|
bcfb3bc9970fd274711044bebdb43bd62c78d8539ebe4b07055d19ff72f543ec | ossia/score-user-library | midiStereoVolume.dsp | declare name "midiStereoVolume";
declare author "SCRIME";
import("stdfaust.lib");
v = hslider("volume", 0, 0, 127, 1) /127: si.smoo : ba.lin2LogGain;
process = _,_:*(v), *(v);
| https://raw.githubusercontent.com/ossia/score-user-library/1de4c36f179105f1728e72b02e96f68d1c9130c2/Presets/Faust/midiStereoVolume.dsp | faust | declare name "midiStereoVolume";
declare author "SCRIME";
import("stdfaust.lib");
v = hslider("volume", 0, 0, 127, 1) /127: si.smoo : ba.lin2LogGain;
process = _,_:*(v), *(v);
|
|
a082dfa5d952cf8dec4fe5bdaf8bcb75621755bb6c004b9311a3d8b598921998 | SKyzZz/test | oberheim.dsp | declare name "oberheimBSF";
declare description "Demonstration of the 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;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
// The BSF, BPF, HPF and LPF outputs are produced
process = inputSignal : ve.oberheim(normFreq,Q);
| https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/examples/filtering/oberheim.dsp | faust | The BSF, BPF, HPF and LPF outputs are produced | declare name "oberheimBSF";
declare description "Demonstration of the 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;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.oberheim(normFreq,Q);
|
1043968e2d9905297d73aa6d9583f80fc74256c080305f093fd85af373eaae8f | ossia/score-user-library | midiStereoAttenuator.dsp | declare name "midiStereoAtenuator";
declare author "SCRIME";
import("stdfaust.lib");
v =1 - ( hslider("attenuation", 127, 0, 127, 1) / 127): si.smoo : ba.lin2LogGain * 0.5;
process = _,_:*(v), *(v);
| https://raw.githubusercontent.com/ossia/score-user-library/1de4c36f179105f1728e72b02e96f68d1c9130c2/Presets/Faust/midiStereoAttenuator.dsp | faust | declare name "midiStereoAtenuator";
declare author "SCRIME";
import("stdfaust.lib");
v =1 - ( hslider("attenuation", 127, 0, 127, 1) / 127): si.smoo : ba.lin2LogGain * 0.5;
process = _,_:*(v), *(v);
|
|
19780803ee55a157c912ba190967401b3555e0f5d7ae21df0ff89d66dd370ce8 | ossia/score-user-library | SOscillator.dsp | declare name "os.osc";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2009";
//-----------------------------------------------
// Sinusoidal Oscillator
//-----------------------------------------------
/* =========== DESCRIPTION =============
- Simple sine wave oscillator
- Left = low frequencies
- Right = high frequencies
- Front = around 300Hz
- Rocking = from low to high
*/
import("stdfaust.lib");
freq = hslider("Frequency [unit:Hz] [acc:0 1 -10 0 10]", 300, 70, 2400, 0.01):si.smooth(0.999);
process = vgroup("Oscillator", os.osc(freq));
| https://raw.githubusercontent.com/ossia/score-user-library/1de4c36f179105f1728e72b02e96f68d1c9130c2/Presets/Faust/faustplayground/generators/SOscillator.dsp | faust | -----------------------------------------------
Sinusoidal Oscillator
-----------------------------------------------
=========== DESCRIPTION =============
- Simple sine wave oscillator
- Left = low frequencies
- Right = high frequencies
- Front = around 300Hz
- Rocking = from low to high
| declare name "os.osc";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2009";
import("stdfaust.lib");
freq = hslider("Frequency [unit:Hz] [acc:0 1 -10 0 10]", 300, 70, 2400, 0.01):si.smooth(0.999);
process = vgroup("Oscillator", os.osc(freq));
|
95e1fc2c9ad68da743d716c36060a5e26543d82974f7badc17580d1b7d355038 | SKyzZz/test | mixer.dsp | declare name "mixer";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006-2020";
import("stdfaust.lib");
//-------------------------------------------------
// Simple 8x2 mixer
//-------------------------------------------------
vol = component("../dynamic/volume.dsp");
pan = component("../spat/panpot.dsp");
mute = *(1 - checkbox("mute"));
vumeter(i, x) = attach(x, envelop(x) : vbargraph("chan %i[2][unit:dB]", -70, +5))
with {
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
};
voice(v) = vgroup("Ch %v", mute : hgroup("[2]", vol : vumeter(v)) : pan);
stereo = hgroup("stereo out", (vol, vol : vgroup("L", vumeter(0)), vgroup("R", vumeter(1))));
process = hgroup("mixer", par(i, 8, voice(i)) :> stereo);
| https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/examples/misc/mixer.dsp | faust | -------------------------------------------------
Simple 8x2 mixer
------------------------------------------------- | declare name "mixer";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006-2020";
import("stdfaust.lib");
vol = component("../dynamic/volume.dsp");
pan = component("../spat/panpot.dsp");
mute = *(1 - checkbox("mute"));
vumeter(i, x) = attach(x, envelop(x) : vbargraph("chan %i[2][unit:dB]", -70, +5))
with {
envelop = abs : max ~ -(1.0/ma.SR) : max(ba.db2linear(-70)) : ba.linear2db;
};
voice(v) = vgroup("Ch %v", mute : hgroup("[2]", vol : vumeter(v)) : pan);
stereo = hgroup("stereo out", (vol, vol : vgroup("L", vumeter(0)), vgroup("R", vumeter(1))));
process = hgroup("mixer", par(i, 8, voice(i)) :> stereo);
|
4f7d73066475b026c0e0d1bc4c852fe090125f28a6aa67a73a01b0372b5f2719 | kfl02/Teengie2 | Wingie2.dsp | declare name "Wingie";
declare version "3.0";
declare author "Meng Qi";
declare license "BSD";
declare copyright "(c)Meng Qi 2020";
declare date "2020-09-30";
declare editDate "2022-04-26";
//-----------------------------------------------
// Wingie
//-----------------------------------------------
import("stdfaust.lib");
nHarmonics = 9;
decay = hslider("decay", 5, 0.1, 10, 0.01) : si.smoo;
output_gain = 1 : ba.lin2LogGain;
left_thresh = hslider("left_thresh", 0.1, 0, 1, 0.01);
right_thresh = hslider("right_thresh", 0.1, 0, 1, 0.01);
amp_follower_decay = 0.025;
resonator_input_gain = hslider("resonator_input_gain", 0.5, 0, 1, 0.01) : ba.lin2LogGain;
pre_clip_gain = hslider("pre_clip_gain", 0.5, 0, 1, 0.01) : ba.lin2LogGain;
post_clip_gain = hslider("post_clip_gain", 0.5, 0, 1, 0.01) : ba.lin2LogGain;
env_mode_change_decay = hslider("env_mode_change_decay", 0.05, 0, 1, 0.01);
//hp_cutoff = hslider("hp_cutoff", 85, 35, 500, 0.1);
bar_factor = 0.44444;
a3_freq = hslider("a3_freq", 440, 300, 600, 0.01);
mtof(note) = a3_freq * pow(2., (note - 69) / 12);
volume0 = hslider("volume0", 0.25, 0, 1, 0.01) : ba.lin2LogGain : si.smoo;
volume1 = hslider("volume1", 0.25, 0, 1, 0.01) : ba.lin2LogGain : si.smoo;
mix0 = hslider("mix0", 1, 0, 1, 0.01) : si.smoo;
mix1 = hslider("mix1", 1, 0, 1, 0.01) : si.smoo;
vol_wet0 = mix0;
vol_dry0 = (1 - mix0);
vol_wet1 = mix1;
vol_dry1 = (1 - mix1);
note0 = hslider("note0", 36, 12, 127, 1);
note1 = hslider("note1", 36, 12, 96, 1);
mode0 = hslider("mode0", 0, 0, 4, 1);
mode1 = hslider("mode1", 0, 0, 4, 1);
env_mode_change = 1 - en.ar(0.002, env_mode_change_decay, button("mode_changed"));
env_mute(t) = 1 - en.asr(0.25, 1., 0.25, t);
bar_ratios(freq, n) = freq * bar_factor * pow((n + 1) + 0.5, 2);
int_ratios(freq, n) = freq * (n + 1);
//odd_ratios(freq, n) = freq * (2 * n + 1);
//cymbal_808(n) = 130.812792, 193.957204, 235.501256, 333.053319, 344.076511, 392.438376, 509.742979, 581.871611, 706.503769, 999.16, 1032.222378, 1529.218338: ba.selectn(12, n); // chromatic
req(n) = 62, 115, 218, 411, 777, 1500, 2800, 5200, 11000 : ba.selectn(nHarmonics, n);
cave(n) = par(i, nHarmonics, vslider("cave_freq_%i", req(i), 50, 16000, 1)) : ba.selectn(nHarmonics, n);
poly(n) = a, a * 2, a * 3, b, b * 2, b * 3, c, c * 2, c * 3 : ba.selectn(nHarmonics, n)
with
{
a = vslider("poly_note_0", 36, 24, 96, 1) : mtof;
b = vslider("poly_note_1", 36, 24, 96, 1) : mtof;
c = vslider("poly_note_2", 36, 24, 96, 1) : mtof;
};
//bianzhong(n) = 212.3, 424.6, 530.8, 636.9, 1061.6, 1167.7, 2017.0, 2335.5, 2653.9, 3693 : ba.selectn(10, n);
//cymbal_808(n) = 205.3, 304.4, 369.6, 522.7, 540, 615.9, 800, 913.2, 1108.8, 1568.1 : ba.selectn(10, n); // original
//circular_membrane_ratios(n) = 1, 1.59, 2.14, 2.30, 2.65, 2.92, 3.16, 3.50, 3.60, 3.65 : ba.selectn(10, n);
note_ratio(note) = pow(2., note / 12);
f(note, n, s) =
poly(n),
int_ratios(mtof(note), n),
bar_ratios(mtof(note), n),
//odd_ratios(ba.midikey2hz(note), n),
//cymbal_808(n) * note_ratio(note - 48),
cave(n)
: ba.selectn(4, s);
scale(x, in_low, in_high, out_low, out_high, e) = (out_low + (out_high - out_low) * ((x - in_low) / (in_high - in_low)) ^ e);
r(note, index, source) = pm.modeFilter(a, b, ba.lin2LogGain(c))
with
{
a = min(f(note, index, source), 16000);
//decay_factor = scale(a, 8, 16000, 1, 0, 0.4);
b = (env_mode_change * decay) + 0.05;
c = env_mute(button("mute_%index")) * (ba.if(a == 16000, 0, 1) : si.smoo);
};
process = _,_
: fi.dcblocker, fi.dcblocker
: (_ <: attach(_, _ : an.amp_follower(amp_follower_decay) : _ > left_thresh : hbargraph("left_trig", 0, 1))),
(_ <: attach(_, _ : an.amp_follower(amp_follower_decay) : _ > right_thresh : hbargraph("right_trig", 0, 1)))
: (_ * env_mode_change * volume0), (_ * env_mode_change * volume1)
<: (_ * resonator_input_gain : fi.lowpass(1, 4000) <: hgroup("left", sum(i, nHarmonics, r(note0, i, mode0))) * pre_clip_gain),
(_ * resonator_input_gain : fi.lowpass(1, 4000) <: hgroup("right", sum(i, nHarmonics, r(note1, i, mode1))) * pre_clip_gain),
_,
_
: ef.cubicnl(0.01, 0), ef.cubicnl(0.01, 0), _, _
: _ * vol_wet0 * post_clip_gain, _ * vol_wet1 * post_clip_gain, _ * vol_dry0, _ * vol_dry1
//:> co.limiter_1176_R4_mono, co.limiter_1176_R4_mono
//:> aa.cubic1, aa.cubic1
:> (_ * output_gain), (_ * output_gain)
; | https://raw.githubusercontent.com/kfl02/Teengie2/d996ae06cf5268459dd27b323c3f0a1db918238c/Wingie2.dsp | faust | -----------------------------------------------
Wingie
-----------------------------------------------
hp_cutoff = hslider("hp_cutoff", 85, 35, 500, 0.1);
odd_ratios(freq, n) = freq * (2 * n + 1);
cymbal_808(n) = 130.812792, 193.957204, 235.501256, 333.053319, 344.076511, 392.438376, 509.742979, 581.871611, 706.503769, 999.16, 1032.222378, 1529.218338: ba.selectn(12, n); // chromatic
bianzhong(n) = 212.3, 424.6, 530.8, 636.9, 1061.6, 1167.7, 2017.0, 2335.5, 2653.9, 3693 : ba.selectn(10, n);
cymbal_808(n) = 205.3, 304.4, 369.6, 522.7, 540, 615.9, 800, 913.2, 1108.8, 1568.1 : ba.selectn(10, n); // original
circular_membrane_ratios(n) = 1, 1.59, 2.14, 2.30, 2.65, 2.92, 3.16, 3.50, 3.60, 3.65 : ba.selectn(10, n);
odd_ratios(ba.midikey2hz(note), n),
cymbal_808(n) * note_ratio(note - 48),
decay_factor = scale(a, 8, 16000, 1, 0, 0.4);
:> co.limiter_1176_R4_mono, co.limiter_1176_R4_mono
:> aa.cubic1, aa.cubic1 | declare name "Wingie";
declare version "3.0";
declare author "Meng Qi";
declare license "BSD";
declare copyright "(c)Meng Qi 2020";
declare date "2020-09-30";
declare editDate "2022-04-26";
import("stdfaust.lib");
nHarmonics = 9;
decay = hslider("decay", 5, 0.1, 10, 0.01) : si.smoo;
output_gain = 1 : ba.lin2LogGain;
left_thresh = hslider("left_thresh", 0.1, 0, 1, 0.01);
right_thresh = hslider("right_thresh", 0.1, 0, 1, 0.01);
amp_follower_decay = 0.025;
resonator_input_gain = hslider("resonator_input_gain", 0.5, 0, 1, 0.01) : ba.lin2LogGain;
pre_clip_gain = hslider("pre_clip_gain", 0.5, 0, 1, 0.01) : ba.lin2LogGain;
post_clip_gain = hslider("post_clip_gain", 0.5, 0, 1, 0.01) : ba.lin2LogGain;
env_mode_change_decay = hslider("env_mode_change_decay", 0.05, 0, 1, 0.01);
bar_factor = 0.44444;
a3_freq = hslider("a3_freq", 440, 300, 600, 0.01);
mtof(note) = a3_freq * pow(2., (note - 69) / 12);
volume0 = hslider("volume0", 0.25, 0, 1, 0.01) : ba.lin2LogGain : si.smoo;
volume1 = hslider("volume1", 0.25, 0, 1, 0.01) : ba.lin2LogGain : si.smoo;
mix0 = hslider("mix0", 1, 0, 1, 0.01) : si.smoo;
mix1 = hslider("mix1", 1, 0, 1, 0.01) : si.smoo;
vol_wet0 = mix0;
vol_dry0 = (1 - mix0);
vol_wet1 = mix1;
vol_dry1 = (1 - mix1);
note0 = hslider("note0", 36, 12, 127, 1);
note1 = hslider("note1", 36, 12, 96, 1);
mode0 = hslider("mode0", 0, 0, 4, 1);
mode1 = hslider("mode1", 0, 0, 4, 1);
env_mode_change = 1 - en.ar(0.002, env_mode_change_decay, button("mode_changed"));
env_mute(t) = 1 - en.asr(0.25, 1., 0.25, t);
bar_ratios(freq, n) = freq * bar_factor * pow((n + 1) + 0.5, 2);
int_ratios(freq, n) = freq * (n + 1);
req(n) = 62, 115, 218, 411, 777, 1500, 2800, 5200, 11000 : ba.selectn(nHarmonics, n);
cave(n) = par(i, nHarmonics, vslider("cave_freq_%i", req(i), 50, 16000, 1)) : ba.selectn(nHarmonics, n);
poly(n) = a, a * 2, a * 3, b, b * 2, b * 3, c, c * 2, c * 3 : ba.selectn(nHarmonics, n)
with
{
a = vslider("poly_note_0", 36, 24, 96, 1) : mtof;
b = vslider("poly_note_1", 36, 24, 96, 1) : mtof;
c = vslider("poly_note_2", 36, 24, 96, 1) : mtof;
};
note_ratio(note) = pow(2., note / 12);
f(note, n, s) =
poly(n),
int_ratios(mtof(note), n),
bar_ratios(mtof(note), n),
cave(n)
: ba.selectn(4, s);
scale(x, in_low, in_high, out_low, out_high, e) = (out_low + (out_high - out_low) * ((x - in_low) / (in_high - in_low)) ^ e);
r(note, index, source) = pm.modeFilter(a, b, ba.lin2LogGain(c))
with
{
a = min(f(note, index, source), 16000);
b = (env_mode_change * decay) + 0.05;
c = env_mute(button("mute_%index")) * (ba.if(a == 16000, 0, 1) : si.smoo);
};
process = _,_
: fi.dcblocker, fi.dcblocker
: (_ <: attach(_, _ : an.amp_follower(amp_follower_decay) : _ > left_thresh : hbargraph("left_trig", 0, 1))),
(_ <: attach(_, _ : an.amp_follower(amp_follower_decay) : _ > right_thresh : hbargraph("right_trig", 0, 1)))
: (_ * env_mode_change * volume0), (_ * env_mode_change * volume1)
<: (_ * resonator_input_gain : fi.lowpass(1, 4000) <: hgroup("left", sum(i, nHarmonics, r(note0, i, mode0))) * pre_clip_gain),
(_ * resonator_input_gain : fi.lowpass(1, 4000) <: hgroup("right", sum(i, nHarmonics, r(note1, i, mode1))) * pre_clip_gain),
_,
_
: ef.cubicnl(0.01, 0), ef.cubicnl(0.01, 0), _, _
: _ * vol_wet0 * post_clip_gain, _ * vol_wet1 * post_clip_gain, _ * vol_dry0, _ * vol_dry1
:> (_ * output_gain), (_ * output_gain)
; |
534de1af784621b24e889abad83f4922d3223ff698f55315987daf4e672be9b9 | RuolunWeng/faust2smartphone | 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 [acc:0 0 -10 -10 10] [unit:Hz]", 220, 220, 1000, 1);
process = vgroup("Oscillator", os.osc(freq) * vol);
| https://raw.githubusercontent.com/RuolunWeng/faust2smartphone/78f502aeb42af3d8fa48b0cbfef01d3b267dc038/examples/1_Simple_Mode/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 [acc:0 0 -10 -10 10] [unit:Hz]", 220, 220, 1000, 1);
process = vgroup("Oscillator", os.osc(freq) * vol);
|
b40b8e37ef70b4a67ec8ffc3adfa2fc605f3d6f2f1397877d5bc4b60f72e7c86 | SKyzZz/test | sallenKeyOnePole.dsp | declare name "sallenKeyOnePoleLPF";
declare description "Demonstration of the Sallen-Key One Pole generic multi-ouputs Filter";
declare author "Eric Tarr, GRAME";
import("stdfaust.lib");
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
// The LPF, BPF and HPF outputs are produced
process = inputSignal : ve.sallenKeyOnePole(normFreq);
| https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/examples/filtering/sallenKeyOnePole.dsp | faust | The LPF, BPF and HPF outputs are produced | declare name "sallenKeyOnePoleLPF";
declare description "Demonstration of the Sallen-Key One Pole generic multi-ouputs Filter";
declare author "Eric Tarr, GRAME";
import("stdfaust.lib");
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.sallenKeyOnePole(normFreq);
|
3d2ec3bfbf9e1f1e22a6dfac28b00d6f9d100b42e31943983c4b8a620da3264c | SKyzZz/test | sallenKey2ndOrder.dsp | declare name "sallenKey2ndOrderBPF";
declare description "Demonstration of the Sallen-Key Second Order generic multi-ourputs 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;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _ ;
// The LPF and HPF outputs are produced
process = inputSignal : ve.sallenKey2ndOrder(normFreq,Q);
| https://raw.githubusercontent.com/SKyzZz/test/9b03adce666adb85e5ae2d8af5262e0acb4b91e1/Dependencies/Build/mac/share/faust/examples/filtering/sallenKey2ndOrder.dsp | faust | The LPF and HPF outputs are produced | declare name "sallenKey2ndOrderBPF";
declare description "Demonstration of the Sallen-Key Second Order generic multi-ourputs 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;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _ ;
process = inputSignal : ve.sallenKey2ndOrder(normFreq,Q);
|
a1530a035852fe0389b17d0d8e4ccdd98b8c432301e28543165a1c90fe7ad10a | tonal-glyph/faustus | tester2.dsp | declare name "tester2";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2014";
//-----------------------------------------------
// Stereo Audio Tester : send a test signal (sine,
// noise, pink) on a stereo channel
//-----------------------------------------------
import("stdfaust.lib");
pink = f : (+ ~ g) with {
f(x) = 0.04957526213389*x - 0.06305581334498*x' + 0.01483220320740*x'';
g(x) = 1.80116083982126*x - 0.80257737639225*x';
};
// User interface
//----------------
transition(n) = \(old,new).(ba.if(old<new, min(old+1.0/n,new), max(old-1.0/n,new))) ~ _;
vol = hslider("[2] volume [unit:dB]", -96, -96, 0, 1): ba.db2linear : si.smoo;
freq = hslider("[1] freq [unit:Hz][scale:log]", 440, 40, 20000, 1);
wave = nentry("[3] signal [style:menu{'white noise':0;'pink noise':1;'sine':2}]", 0, 0, 2, 1) : int;
dest = nentry("[4] channel [style:radio{'none':0;'left':1;'right':2;'both':3}]", 0, 0, 3, 1) : int;
testsignal = no.noise, pink(no.noise), os.osci(freq): select3(wave);
process = vgroup("Stereo Audio Tester",
testsignal*vol
<: par(i, 2, *((dest & (i+1)) != 0 : transition(4410)))
);
| https://raw.githubusercontent.com/tonal-glyph/faustus/cc887b115aceaee202edbdb37ee0e4087bfb5a33/examples/misc/tester2.dsp | faust | -----------------------------------------------
Stereo Audio Tester : send a test signal (sine,
noise, pink) on a stereo channel
-----------------------------------------------
User interface
---------------- | declare name "tester2";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2014";
import("stdfaust.lib");
pink = f : (+ ~ g) with {
f(x) = 0.04957526213389*x - 0.06305581334498*x' + 0.01483220320740*x'';
g(x) = 1.80116083982126*x - 0.80257737639225*x';
};
transition(n) = \(old,new).(ba.if(old<new, min(old+1.0/n,new), max(old-1.0/n,new))) ~ _;
vol = hslider("[2] volume [unit:dB]", -96, -96, 0, 1): ba.db2linear : si.smoo;
freq = hslider("[1] freq [unit:Hz][scale:log]", 440, 40, 20000, 1);
wave = nentry("[3] signal [style:menu{'white noise':0;'pink noise':1;'sine':2}]", 0, 0, 2, 1) : int;
dest = nentry("[4] channel [style:radio{'none':0;'left':1;'right':2;'both':3}]", 0, 0, 3, 1) : int;
testsignal = no.noise, pink(no.noise), os.osci(freq): select3(wave);
process = vgroup("Stereo Audio Tester",
testsignal*vol
<: par(i, 2, *((dest & (i+1)) != 0 : transition(4410)))
);
|
8676b7403b8ca11a55877f3e865314baf497f186a51fcf79f178ec9203172e32 | dxinteractive/mosfez-faust-dsp | harpy.dsp | //-----------------------------------------------
// Kisana : 3-loops string instrument
// (based on Karplus-Strong)
//
//-----------------------------------------------
declare name "Kisana";
declare author "Yann Orlarey";
import("stdfaust.lib");
KEY = 60; // basic midi key
NCY = 16; // note cycle length
CCY = 16; // control cycle length
BPS = 360; // general tempo (beat per sec)
//-------------------------------kisana----------------------------------
// USAGE: kisana : _,_;
// 3-loops string instrument
//-----------------------------------------------------------------------
process = harpe(C,11,38) :> *(l),*(l)
with {
l = hslider("master",-20, -60, 0, 0.01) : ba.db2linear;
C = hslider("timbre",0, 0, 1, 0.01);
};
//----------------------------------Harpe--------------------------------
// USAGE: harpe(C,10,60) : _,_;
// C is the filter coefficient 0..1
// Build a N (10) strings harpe using a pentatonic scale
// based on midi key b (60)
// Each string is triggered by a specific
// position of the "hand"
//-----------------------------------------------------------------------
harpe(C,N,b) = hand <: par(i, N, position(i+1)
: string(C,Penta(b).degree2Hz(i), att, lvl)
: pan((i+0.5)/N) )
:> _,_
with {
att = 4;
hand = vgroup("loop%b", hslider("[1]note", 4, 0, N, 1) : int : ba.automat(360, 5, 0.0));
lvl = 1;
pan(p) = _ <: *(sqrt(1-p)), *(sqrt(p));
position(a,x) = abs(x - a) < 0.5;
db2linear(x) = pow(10, x/20.0);
};
//----------------------------------Penta-------------------------------
// Pentatonic scale with degree to midi and degree to Hz conversion
// USAGE: Penta(60).degree2midi(3) ==> 67 midikey
// Penta(60).degree2Hz(4) ==> 440 Hz
//-----------------------------------------------------------------------
Penta(key) = environment {
A4Hz = 440;
degree2midi(0) = key+0;
degree2midi(1) = key+2;
degree2midi(2) = key+4;
degree2midi(3) = key+7;
degree2midi(4) = key+9;
degree2midi(d) = degree2midi(d-5)+12;
degree2Hz(d) = A4Hz*semiton(degree2midi(d)-69) with { semiton(n) = 2.0^(n/12.0); };
};
//----------------------------------String-------------------------------
// A karplus-strong string.
//
// USAGE: string(440Hz, 4s, 1.0, button("play"))
// or button("play") : string(440Hz, 4s, 1.0)
//-----------------------------------------------------------------------
string(coef, freq, t60, level, trig) = noise*level
: *(trig : trigger(freq2samples(freq)))
: resonator(freq2samples(freq), att)
with {
resonator(d,a) = (+ : @(d-1)) ~ (average : *(a));
average(x) = (x*(1+coef)+x'*(1-coef))/2;
trigger(n) = upfront : + ~ decay(n) : >(0.0);
upfront(x) = (x-x') > 0.0;
decay(n,x) = x - (x>0.0)/n;
freq2samples(f) = 44100.0/f;
att = pow(0.001,1.0/(freq*t60)); // attenuation coefficient
random = +(12345)~*(1103515245);
noise = random/2147483647.0;
};
| https://raw.githubusercontent.com/dxinteractive/mosfez-faust-dsp/a2d7029a6d7ebe31e5bce808c3bc225420426984/test-nodejs/harpy.dsp | faust | -----------------------------------------------
Kisana : 3-loops string instrument
(based on Karplus-Strong)
-----------------------------------------------
basic midi key
note cycle length
control cycle length
general tempo (beat per sec)
-------------------------------kisana----------------------------------
USAGE: kisana : _,_;
3-loops string instrument
-----------------------------------------------------------------------
----------------------------------Harpe--------------------------------
USAGE: harpe(C,10,60) : _,_;
C is the filter coefficient 0..1
Build a N (10) strings harpe using a pentatonic scale
based on midi key b (60)
Each string is triggered by a specific
position of the "hand"
-----------------------------------------------------------------------
----------------------------------Penta-------------------------------
Pentatonic scale with degree to midi and degree to Hz conversion
USAGE: Penta(60).degree2midi(3) ==> 67 midikey
Penta(60).degree2Hz(4) ==> 440 Hz
-----------------------------------------------------------------------
----------------------------------String-------------------------------
A karplus-strong string.
USAGE: string(440Hz, 4s, 1.0, button("play"))
or button("play") : string(440Hz, 4s, 1.0)
-----------------------------------------------------------------------
attenuation coefficient |
declare name "Kisana";
declare author "Yann Orlarey";
import("stdfaust.lib");
process = harpe(C,11,38) :> *(l),*(l)
with {
l = hslider("master",-20, -60, 0, 0.01) : ba.db2linear;
C = hslider("timbre",0, 0, 1, 0.01);
};
harpe(C,N,b) = hand <: par(i, N, position(i+1)
: string(C,Penta(b).degree2Hz(i), att, lvl)
: pan((i+0.5)/N) )
:> _,_
with {
att = 4;
hand = vgroup("loop%b", hslider("[1]note", 4, 0, N, 1) : int : ba.automat(360, 5, 0.0));
lvl = 1;
pan(p) = _ <: *(sqrt(1-p)), *(sqrt(p));
position(a,x) = abs(x - a) < 0.5;
db2linear(x) = pow(10, x/20.0);
};
Penta(key) = environment {
A4Hz = 440;
degree2midi(0) = key+0;
degree2midi(1) = key+2;
degree2midi(2) = key+4;
degree2midi(3) = key+7;
degree2midi(4) = key+9;
degree2midi(d) = degree2midi(d-5)+12;
degree2Hz(d) = A4Hz*semiton(degree2midi(d)-69) with { semiton(n) = 2.0^(n/12.0); };
};
string(coef, freq, t60, level, trig) = noise*level
: *(trig : trigger(freq2samples(freq)))
: resonator(freq2samples(freq), att)
with {
resonator(d,a) = (+ : @(d-1)) ~ (average : *(a));
average(x) = (x*(1+coef)+x'*(1-coef))/2;
trigger(n) = upfront : + ~ decay(n) : >(0.0);
upfront(x) = (x-x') > 0.0;
decay(n,x) = x - (x>0.0)/n;
freq2samples(f) = 44100.0/f;
random = +(12345)~*(1103515245);
noise = random/2147483647.0;
};
|
e3a540a000b8ad680e47f0cae920bc58610a5307eedadc83216dd1bb5e1aef66 | maximalexanian/guitarix-vst | sloop.dsp | declare id "sloop";
declare version "1.0";
declare author "brummer";
declare license "BSD";
import("stdfaust.lib");
B = checkbox("Capture"); // Capture sound while pressed
C = checkbox("Play");
I = int(B); // convert button signal from float to integer
R = (I-I') <= 0; // Reset capture when button is pressed
D = (+(I):*(R))~_; // Compute capture duration while button is pressed: 0..NNNN0..MMM
capture = ( *(B) : (+ : de.fdelay(2097152, D-1)) ~ *(1.0-B)) *(C);
si.smooth(c) = *(1-c) : +~*(c);
level = hslider("gain", 0, -96, 4, 0.1) : ba.db2linear : si.smooth(0.999);
process = vgroup( "SampleLooper", _ <:_, (capture : *(level)):>_ ) ;
| https://raw.githubusercontent.com/maximalexanian/guitarix-vst/83fd0cbec9588fb2ef47d80f7c6cb0775bfb9f89/guitarix/src/LV2/faust/sloop.dsp | faust | Capture sound while pressed
convert button signal from float to integer
Reset capture when button is pressed
Compute capture duration while button is pressed: 0..NNNN0..MMM | declare id "sloop";
declare version "1.0";
declare author "brummer";
declare license "BSD";
import("stdfaust.lib");
C = checkbox("Play");
capture = ( *(B) : (+ : de.fdelay(2097152, D-1)) ~ *(1.0-B)) *(C);
si.smooth(c) = *(1-c) : +~*(c);
level = hslider("gain", 0, -96, 4, 0.1) : ba.db2linear : si.smooth(0.999);
process = vgroup( "SampleLooper", _ <:_, (capture : *(level)):>_ ) ;
|
0555a9df8300e457bdfa725f7f55bbc2e35148fa7241742d68270bf1bedfce0e | RuolunWeng/ruolunweng.github.io | SModulation4.dsp | declare name "Modulation 2";
declare author "ER";
import("stdfaust.lib");
instrument = library("instruments.lib");
/* =========== DESCRIPTION ==============
- Non Linear Filter Modulators applied to a sinewave
- Head = Silence/Higher Frequencies
- Bottom = Lower Frequencies
- Right = No modulation
- Left = Modulation n°4
*/
//======================== INSTRUMENT =============================
process = vgroup("NLFMs",oscil : NLFM4 : fi.lowpass(1,2000) *(0.6) *(vol));
NLFM4 = _ : instrument.nonLinearModulator((nonlinearity:si.smooth(0.999)),env,freq,typeMod,freqMod,nlfOrder) : _;
oscil = os.osci(freq);
//======================== GUI SPECIFICATIONS =====================
freq = hslider("[2]Frequency [unit:Hz][acc:1 1 -10 0 15]", 330, 100, 1200, 0.1):si.smooth(0.999);
freqMod = hslider("[4]Modulating Frequency[style:knob][unit:Hz][acc:0 0 -10 0 10]", 1200, 900, 1700, 0.1):si.smooth(0.999);
vol = (hslider("[3]Volume[style:knob][acc:1 0 -10 0 10]", 0.5, 0, 1, 0.01)^2):si.smooth(0.999);
//------------------------ NLFM PARAMETERS ------------------------
nlfOrder = 6;
nonlinearity = 0.8;
typeMod = 4;
env = ASR;
ASR = en.asr(a,s,r,t);
a = 3;
s = 1;
r = 2;
t = gate;
gate = hslider("[1]Modulation Type 4[acc:0 0 -30 0 10]", 0,0,1,1);
| https://raw.githubusercontent.com/RuolunWeng/ruolunweng.github.io/035564bb7e36eb4e810ca80077ffa8a9d3e5130b/faustplayground/faust-modules/generators/SModulation4.dsp | faust | =========== DESCRIPTION ==============
- Non Linear Filter Modulators applied to a sinewave
- Head = Silence/Higher Frequencies
- Bottom = Lower Frequencies
- Right = No modulation
- Left = Modulation n°4
======================== INSTRUMENT =============================
======================== GUI SPECIFICATIONS =====================
------------------------ NLFM PARAMETERS ------------------------ | declare name "Modulation 2";
declare author "ER";
import("stdfaust.lib");
instrument = library("instruments.lib");
process = vgroup("NLFMs",oscil : NLFM4 : fi.lowpass(1,2000) *(0.6) *(vol));
NLFM4 = _ : instrument.nonLinearModulator((nonlinearity:si.smooth(0.999)),env,freq,typeMod,freqMod,nlfOrder) : _;
oscil = os.osci(freq);
freq = hslider("[2]Frequency [unit:Hz][acc:1 1 -10 0 15]", 330, 100, 1200, 0.1):si.smooth(0.999);
freqMod = hslider("[4]Modulating Frequency[style:knob][unit:Hz][acc:0 0 -10 0 10]", 1200, 900, 1700, 0.1):si.smooth(0.999);
vol = (hslider("[3]Volume[style:knob][acc:1 0 -10 0 10]", 0.5, 0, 1, 0.01)^2):si.smooth(0.999);
nlfOrder = 6;
nonlinearity = 0.8;
typeMod = 4;
env = ASR;
ASR = en.asr(a,s,r,t);
a = 3;
s = 1;
r = 2;
t = gate;
gate = hslider("[1]Modulation Type 4[acc:0 0 -30 0 10]", 0,0,1,1);
|
59f7c4bbad7c90f8b5968f06ad6cc86852e349f64e83eb3d4eaea7d39b48fa9c | RuolunWeng/ruolunweng.github.io | SModulation2.dsp | declare name "Modulation 2";
declare author "ER";
import("stdfaust.lib");
instrument = library("instruments.lib");
/* =========== DESCRIPTION ==============
- Non Linear Filter Modulators applied to a sinewave
- Head = Silence/Higher Frequencies
- Bottom = Lower Frequencies
- Back = No modulation
- Front = Modulation n°2
*/
//======================== INSTRUMENT =============================
process = vgroup("NLFMs",oscil : NLFM2 : fi.lowpass(1,2000) *(0.6)*(vol));
NLFM2 = _ : instrument.nonLinearModulator((nonlinearity:si.smooth(0.999)),env,freq,typeMod,freqMod,nlfOrder) : _;
oscil = os.osci(freq);
//======================== GUI SPECIFICATIONS =====================
freq = hslider("[2]Frequency [unit:Hz][acc:1 1 -10 0 15]", 330, 100, 1200, 0.1):si.smooth(0.999);
freqMod = hslider("[4]Modulating Frequency[style:knob][unit:Hz][acc:0 0 -10 0 10]", 1200, 900, 1700, 0.1):si.smooth(0.999);
vol = (hslider("[3]Volume[style:knob][acc:1 0 -10 0 10]", 0.5, 0, 1, 0.01)^2):si.smooth(0.999);
//------------------------ NLFM PARAMETERS ------------------------
nlfOrder = 6;
nonlinearity = 0.8;
typeMod = 2;
env = ASR;
ASR = en.asr(a,s,r,t);
a = 3;
s = 1;
r = 2;
t = gate;
gate = hslider("[1]Modulation Type 2[acc:2 1 -30 0 10]", 0,0,1,1);
| https://raw.githubusercontent.com/RuolunWeng/ruolunweng.github.io/035564bb7e36eb4e810ca80077ffa8a9d3e5130b/faustplayground/faust-modules/generators/SModulation2.dsp | faust | =========== DESCRIPTION ==============
- Non Linear Filter Modulators applied to a sinewave
- Head = Silence/Higher Frequencies
- Bottom = Lower Frequencies
- Back = No modulation
- Front = Modulation n°2
======================== INSTRUMENT =============================
======================== GUI SPECIFICATIONS =====================
------------------------ NLFM PARAMETERS ------------------------ | declare name "Modulation 2";
declare author "ER";
import("stdfaust.lib");
instrument = library("instruments.lib");
process = vgroup("NLFMs",oscil : NLFM2 : fi.lowpass(1,2000) *(0.6)*(vol));
NLFM2 = _ : instrument.nonLinearModulator((nonlinearity:si.smooth(0.999)),env,freq,typeMod,freqMod,nlfOrder) : _;
oscil = os.osci(freq);
freq = hslider("[2]Frequency [unit:Hz][acc:1 1 -10 0 15]", 330, 100, 1200, 0.1):si.smooth(0.999);
freqMod = hslider("[4]Modulating Frequency[style:knob][unit:Hz][acc:0 0 -10 0 10]", 1200, 900, 1700, 0.1):si.smooth(0.999);
vol = (hslider("[3]Volume[style:knob][acc:1 0 -10 0 10]", 0.5, 0, 1, 0.01)^2):si.smooth(0.999);
nlfOrder = 6;
nonlinearity = 0.8;
typeMod = 2;
env = ASR;
ASR = en.asr(a,s,r,t);
a = 3;
s = 1;
r = 2;
t = gate;
gate = hslider("[1]Modulation Type 2[acc:2 1 -30 0 10]", 0,0,1,1);
|
76dda0282a54844b0ac3a6f5733d8c7bd164bc04b8132762a2a71f842feaba70 | RuolunWeng/ruolunweng.github.io | SWhistles2.dsp | declare name "Whistles 2";
declare author "ER";
declare version "1.0";
/* =========== DESCRIPTION ============
- Triple whistle
- Head = Silence
- Rocking/Swing/Fishing Rod = Alternating the different whistles
- Vary your gestures' speed to increase sound
*/
import("stdfaust.lib");
instrument = library("instruments.lib");
//----------------- INSTRUMENT ------------------//
process = vgroup("Whistles", nOise.white * (0.5) <: par(i, 3, whistle(i))):>_;
whistle(n) = BP(n) : EQ(n) : @(10 + (12000*n)) <:Reson(0),_*(1.5):> *(Env)*gain(n);
//----------------- NOISES ----------------------//
nOise = environment {
// white no.noise generator:
random = +(12345)~*(1103515245);
white = random/2147483647.0;
};
//----------------- FILTERS -------------------//
freq = hslider("[2]Frequency[unit:Hz][acc:1 1 -10 0 10]", 400, 220, 660, 0.01):si.smooth(0.999);
gain(n) = hslider("[3]Volume %n[style:knob][acc:%n 0 -10 15 0 0.5]", 0.5, 0, 2, 0.001):si.smooth(0.999);
hight(n) = freq * (n+1);
level = 20;
Lowf(n) = hight(n) - Q;
Highf(n) = hight(n) + Q;
Q = 1.5 : si.smooth(0.999);//hslider("Q - Filter Bandwidth[style:knob][unit:Hz][tooltip: Band width = 2 * Frequency]",2.5,1,10,0.0001):si.smooth(0.999);
BP(n) = fi.bandpass(1, Lowf(n), Highf(n));
EQ(n) = fi.peak_eq(level,hight(n),Q) : fi.lowpass(1, 6000);
Reson(n) = fi.resonbp(hight(n),Q,1) : fi.lowpass(1,3000);
Env = (instrument.envVibrato(b,a,s,r,t))
with {
b = 0.25;
a = 0.1;
s = 100;
r = 0.8;
t = hslider("[1]ON/OFF (Vibrato Envelope)[acc:1 0 -12 0 2]", 1, 0, 1, 1);
};
| https://raw.githubusercontent.com/RuolunWeng/ruolunweng.github.io/035564bb7e36eb4e810ca80077ffa8a9d3e5130b/faustplayground/faust-modules/generators/SWhistles2.dsp | faust | =========== DESCRIPTION ============
- Triple whistle
- Head = Silence
- Rocking/Swing/Fishing Rod = Alternating the different whistles
- Vary your gestures' speed to increase sound
----------------- INSTRUMENT ------------------//
----------------- NOISES ----------------------//
white no.noise generator:
----------------- FILTERS -------------------//
hslider("Q - Filter Bandwidth[style:knob][unit:Hz][tooltip: Band width = 2 * Frequency]",2.5,1,10,0.0001):si.smooth(0.999); | declare name "Whistles 2";
declare author "ER";
declare version "1.0";
import("stdfaust.lib");
instrument = library("instruments.lib");
process = vgroup("Whistles", nOise.white * (0.5) <: par(i, 3, whistle(i))):>_;
whistle(n) = BP(n) : EQ(n) : @(10 + (12000*n)) <:Reson(0),_*(1.5):> *(Env)*gain(n);
nOise = environment {
random = +(12345)~*(1103515245);
white = random/2147483647.0;
};
freq = hslider("[2]Frequency[unit:Hz][acc:1 1 -10 0 10]", 400, 220, 660, 0.01):si.smooth(0.999);
gain(n) = hslider("[3]Volume %n[style:knob][acc:%n 0 -10 15 0 0.5]", 0.5, 0, 2, 0.001):si.smooth(0.999);
hight(n) = freq * (n+1);
level = 20;
Lowf(n) = hight(n) - Q;
Highf(n) = hight(n) + Q;
BP(n) = fi.bandpass(1, Lowf(n), Highf(n));
EQ(n) = fi.peak_eq(level,hight(n),Q) : fi.lowpass(1, 6000);
Reson(n) = fi.resonbp(hight(n),Q,1) : fi.lowpass(1,3000);
Env = (instrument.envVibrato(b,a,s,r,t))
with {
b = 0.25;
a = 0.1;
s = 100;
r = 0.8;
t = hslider("[1]ON/OFF (Vibrato Envelope)[acc:1 0 -12 0 2]", 1, 0, 1, 1);
};
|
7a91eb375605abf1e86f8144bf02fa4110f5871ed73abd22f310dfed4cf322b5 | RuolunWeng/ruolunweng.github.io | SWhistles3.dsp | declare name "Whistles 3";
declare author "ER";
declare version "1.0";
/* =========== DESCRIPTION ============
- Triple whistle
- Head = Silence
- Rocking/Swing/Fishing Rod = Alternating the different whistles
- Vary your gestures' speed to increase sound
*/
import("stdfaust.lib");
instrument = library("instruments.lib");
//----------------- INSTRUMENT ------------------//
process = vgroup("Whistles", nOise.white * (0.5) <: par(i, 3, whistle(i))):>_;
whistle(n) = BP(n) : EQ(n) : @(10 + (12000*n)) <:Reson(0),_*(1.5):> *(Env)*gain(n);
//----------------- NOISES ----------------------//
nOise = environment {
// white no.noise generator:
random = +(12345)~*(1103515245);
white = random/2147483647.0;
};
//----------------- FILTERS -------------------//
freq = hslider("[2]Frequency[unit:Hz][acc:1 1 -10 0 10]", 820, 660, 1100, 0.01):si.smooth(0.999);
gain(n) = hslider("[3]Volume %n[style:knob][acc:%n 0 -10 15 0 0.5]", 0.5, 0, 2, 0.001):si.smooth(0.999);
hight(n) = freq * (n+1);
level = 20;
Lowf(n) = hight(n) - Q;
Highf(n) = hight(n) + Q;
Q = 1.5 : si.smooth(0.999);//hslider("Q - Filter Bandwidth[style:knob][unit:Hz][tooltip: Band width = 2 * Frequency]",2.5,1,10,0.0001):si.smooth(0.999);
BP(n) = fi.bandpass(1, Lowf(n), Highf(n));
EQ(n) = fi.peak_eq(level,hight(n),Q) : fi.lowpass(1, 6000);
Reson(n) = fi.resonbp(hight(n),Q,1) : fi.lowpass(1,3000);
Env = (instrument.envVibrato(b,a,s,r,t))
with {
b = 0.25;
a = 0.1;
s = 100;
r = 0.8;
t = hslider("[1]ON/OFF (Vibrato Envelope)[acc:1 0 -12 0 2]", 1, 0, 1, 1);
};
| https://raw.githubusercontent.com/RuolunWeng/ruolunweng.github.io/035564bb7e36eb4e810ca80077ffa8a9d3e5130b/faustplayground/faust-modules/generators/SWhistles3.dsp | faust | =========== DESCRIPTION ============
- Triple whistle
- Head = Silence
- Rocking/Swing/Fishing Rod = Alternating the different whistles
- Vary your gestures' speed to increase sound
----------------- INSTRUMENT ------------------//
----------------- NOISES ----------------------//
white no.noise generator:
----------------- FILTERS -------------------//
hslider("Q - Filter Bandwidth[style:knob][unit:Hz][tooltip: Band width = 2 * Frequency]",2.5,1,10,0.0001):si.smooth(0.999); | declare name "Whistles 3";
declare author "ER";
declare version "1.0";
import("stdfaust.lib");
instrument = library("instruments.lib");
process = vgroup("Whistles", nOise.white * (0.5) <: par(i, 3, whistle(i))):>_;
whistle(n) = BP(n) : EQ(n) : @(10 + (12000*n)) <:Reson(0),_*(1.5):> *(Env)*gain(n);
nOise = environment {
random = +(12345)~*(1103515245);
white = random/2147483647.0;
};
freq = hslider("[2]Frequency[unit:Hz][acc:1 1 -10 0 10]", 820, 660, 1100, 0.01):si.smooth(0.999);
gain(n) = hslider("[3]Volume %n[style:knob][acc:%n 0 -10 15 0 0.5]", 0.5, 0, 2, 0.001):si.smooth(0.999);
hight(n) = freq * (n+1);
level = 20;
Lowf(n) = hight(n) - Q;
Highf(n) = hight(n) + Q;
BP(n) = fi.bandpass(1, Lowf(n), Highf(n));
EQ(n) = fi.peak_eq(level,hight(n),Q) : fi.lowpass(1, 6000);
Reson(n) = fi.resonbp(hight(n),Q,1) : fi.lowpass(1,3000);
Env = (instrument.envVibrato(b,a,s,r,t))
with {
b = 0.25;
a = 0.1;
s = 100;
r = 0.8;
t = hslider("[1]ON/OFF (Vibrato Envelope)[acc:1 0 -12 0 2]", 1, 0, 1, 1);
};
|
168eb73b758d13d899b28e2a5376bc3d69081f339287d4c4dd190100a6ebd9d4 | HMaxime/CONDUCT | pitchShifter.dsp | declare name "pitchShifter";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
//--------------------------------------
// very simple real time pitch shifter
//--------------------------------------
import("stdfaust.lib");
pitchshifter1 = vgroup("Pitch Shifter", ef.transpose(
hslider("window1", 1000, 50, 10000, 1),
hslider("xfade1", 10, 1, 10000, 1),
hslider("shift1", 0, -12, +12, 0.1)
)
);
pitchshifter2 = vgroup("Pitch Shifter", ef.transpose(
hslider("window2", 1000, 50, 10000, 1),
hslider("xfade2", 10, 1, 10000, 1),
hslider("shift2", 0, -12, +12, 0.1)
)
);
process = pitchshifter1, pitchshifter2;
| https://raw.githubusercontent.com/HMaxime/CONDUCT/a70e4ab8db098cf38fb32d9fa948eb3c2939f07e/Faust%26PureData/old/example/pitchShifter.dsp | faust | --------------------------------------
very simple real time pitch shifter
-------------------------------------- | declare name "pitchShifter";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
import("stdfaust.lib");
pitchshifter1 = vgroup("Pitch Shifter", ef.transpose(
hslider("window1", 1000, 50, 10000, 1),
hslider("xfade1", 10, 1, 10000, 1),
hslider("shift1", 0, -12, +12, 0.1)
)
);
pitchshifter2 = vgroup("Pitch Shifter", ef.transpose(
hslider("window2", 1000, 50, 10000, 1),
hslider("xfade2", 10, 1, 10000, 1),
hslider("shift2", 0, -12, +12, 0.1)
)
);
process = pitchshifter1, pitchshifter2;
|
167e09b2938569b719b25bb46eaee06bc8fe1e096f7609df3845f349e59a6f92 | ossia/score-user-library | Volume.dsp | declare name "Volume";
declare author "GRAME";
/* ========== DESCRITPION ===========
- Simple volume slider
- Head = Silence
- Bottom = Max volume
*/
import("stdfaust.lib");
process = par(i,2,*(hslider("Volume[acc:1 0 -10 0 10]", 0.75, 0, 1, 0.01):si.smooth(0.999)));
| https://raw.githubusercontent.com/ossia/score-user-library/1de4c36f179105f1728e72b02e96f68d1c9130c2/Presets/Faust/faustplayground/effects/Volume.dsp | faust | ========== DESCRITPION ===========
- Simple volume slider
- Head = Silence
- Bottom = Max volume
| declare name "Volume";
declare author "GRAME";
import("stdfaust.lib");
process = par(i,2,*(hslider("Volume[acc:1 0 -10 0 10]", 0.75, 0, 1, 0.01):si.smooth(0.999)));
|
075776a2880b511b0e5e97fdd14cdbe198305e3d565391487531ea3031493e49 | dariosanfilippo/modified_lotka-volterra_A | modified_LV_A.dsp | // =============================================================================
// Modified Lotka-Volterra complex generator (A)
// =============================================================================
//
// Complex sound generator based on modified Lotka-Volterra equations.
// The model is structurally-stable through hyperbolic tangent function
// saturators and allows for parameters in unstable ranges to explore
// different dynamics. Furthermore, this model includes DC-blockers in the
// feedback paths to counterbalance a tendency towards fixed-point attractors
// – thus enhancing complex behaviours – and obtain signals suitable for audio.
// Besides the original parameters in the model, this system includes a
// saturating threshold determining the positive and negative bounds in the
// equations, while the output peaks are within the [-1.0; 1.0] range.
//
// The system can be triggered by an impulse or by a constant of arbitrary
// values for deterministic and reproducable behaviours. Alternatively,
// the oscillator can be fed with external inputs to be used as a nonlinear
// distortion unit.
//
// =============================================================================
import("stdfaust.lib");
declare name "Modified Lotka-Volterra complex generator (A)";
declare author "Dario Sanfilippo";
declare copyright "Copyright (C) 2021 Dario Sanfilippo
<[email protected]>";
declare version "1.1";
declare license "GPL v3.0 license";
lotkavolterra(L, a, b, c, g, dt, x_0, y_0) = prey_level(out * (x / L)) ,
pred_level(out * (y / L))
letrec {
'x = fi.highpass(1, 10, tanh(L, (x_0 + x + dt * (a * x - b * x * y))));
'y = fi.highpass(1, 10, tanh(L, (y_0 + y + dt * (g * x * y - c * y))));
};
// tanh() saturator with adjustable saturating threshold
tanh(l, x) = l * ma.tanh(x / l);
// smoothing function for click-free parameter variations using
// a one-pole low-pass with a 20-Hz cut-off frequency.
smooth(x) = fi.pole(pole, x * (1.0 - pole))
with {
pole = exp(-2.0 * ma.PI * 20.0 / ma.SR);
};
// GUI parameters
prey_level(x) = attach(x , abs(x) : ba.linear2db :
levels_group(hbargraph("[0]Prey[style:dB]", -60, 0)));
pred_level(x) = attach(x , abs(x) : ba.linear2db :
levels_group(hbargraph("[1]Predator[style:dB]", -60, 0)));
prey_group(x) = vgroup("[1]Prey", x);
pred_group(x) = vgroup("[2]Predator", x);
global_group(x) = vgroup("[3]Global", x);
levels_group(x) = hgroup("[4]Levels (dB)", x);
a = prey_group(hslider("[0]Growth rate[scale:exp]", 4, 0, 10, .000001)
: smooth);
b = prey_group(hslider("[1]Interaction parameter[scale:exp]", 1, 0, 10, .000001)
: smooth);
c = pred_group(hslider("[0]Extinction rate[scale:exp]", 2, 0, 10, .000001)
: smooth);
g = pred_group(hslider("[1]Interaction parameter[scale:exp]", 1, 0, 10, .000001)
: smooth);
dt = global_group(
hslider("[4]dt (integration step)[scale:exp]", 0.1, .000001, 1, .000001)
: smooth);
input(x) = global_group(nentry("[3]Input value", 1, 0, 10, .000001)
<: _ * impulse + _ * checkbox("[1]Constant inputs")
+ x * checkbox("[0]External inputs"));
impulse = button("[2]Impulse inputs") : ba.impulsify;
limit = global_group(
hslider("[5]Saturation limit[scale:exp]", 4, 1, 1024, .000001) : smooth);
out = global_group(hslider("[6]Output scaling[scale:exp]", 0, 0, 1, .000001)
: smooth);
process(x1, x2) = lotkavolterra(limit, a, b, c, g, dt, input(x1), input(x2));
| https://raw.githubusercontent.com/dariosanfilippo/modified_lotka-volterra_A/8c1dd77757d06241e5df518f3562b0806781c77a/modified_LV_A.dsp | faust | =============================================================================
Modified Lotka-Volterra complex generator (A)
=============================================================================
Complex sound generator based on modified Lotka-Volterra equations.
The model is structurally-stable through hyperbolic tangent function
saturators and allows for parameters in unstable ranges to explore
different dynamics. Furthermore, this model includes DC-blockers in the
feedback paths to counterbalance a tendency towards fixed-point attractors
– thus enhancing complex behaviours – and obtain signals suitable for audio.
Besides the original parameters in the model, this system includes a
saturating threshold determining the positive and negative bounds in the
equations, while the output peaks are within the [-1.0; 1.0] range.
The system can be triggered by an impulse or by a constant of arbitrary
values for deterministic and reproducable behaviours. Alternatively,
the oscillator can be fed with external inputs to be used as a nonlinear
distortion unit.
=============================================================================
tanh() saturator with adjustable saturating threshold
smoothing function for click-free parameter variations using
a one-pole low-pass with a 20-Hz cut-off frequency.
GUI parameters |
import("stdfaust.lib");
declare name "Modified Lotka-Volterra complex generator (A)";
declare author "Dario Sanfilippo";
declare copyright "Copyright (C) 2021 Dario Sanfilippo
<[email protected]>";
declare version "1.1";
declare license "GPL v3.0 license";
lotkavolterra(L, a, b, c, g, dt, x_0, y_0) = prey_level(out * (x / L)) ,
pred_level(out * (y / L))
letrec {
'x = fi.highpass(1, 10, tanh(L, (x_0 + x + dt * (a * x - b * x * y))));
'y = fi.highpass(1, 10, tanh(L, (y_0 + y + dt * (g * x * y - c * y))));
};
tanh(l, x) = l * ma.tanh(x / l);
smooth(x) = fi.pole(pole, x * (1.0 - pole))
with {
pole = exp(-2.0 * ma.PI * 20.0 / ma.SR);
};
prey_level(x) = attach(x , abs(x) : ba.linear2db :
levels_group(hbargraph("[0]Prey[style:dB]", -60, 0)));
pred_level(x) = attach(x , abs(x) : ba.linear2db :
levels_group(hbargraph("[1]Predator[style:dB]", -60, 0)));
prey_group(x) = vgroup("[1]Prey", x);
pred_group(x) = vgroup("[2]Predator", x);
global_group(x) = vgroup("[3]Global", x);
levels_group(x) = hgroup("[4]Levels (dB)", x);
a = prey_group(hslider("[0]Growth rate[scale:exp]", 4, 0, 10, .000001)
: smooth);
b = prey_group(hslider("[1]Interaction parameter[scale:exp]", 1, 0, 10, .000001)
: smooth);
c = pred_group(hslider("[0]Extinction rate[scale:exp]", 2, 0, 10, .000001)
: smooth);
g = pred_group(hslider("[1]Interaction parameter[scale:exp]", 1, 0, 10, .000001)
: smooth);
dt = global_group(
hslider("[4]dt (integration step)[scale:exp]", 0.1, .000001, 1, .000001)
: smooth);
input(x) = global_group(nentry("[3]Input value", 1, 0, 10, .000001)
<: _ * impulse + _ * checkbox("[1]Constant inputs")
+ x * checkbox("[0]External inputs"));
impulse = button("[2]Impulse inputs") : ba.impulsify;
limit = global_group(
hslider("[5]Saturation limit[scale:exp]", 4, 1, 1024, .000001) : smooth);
out = global_group(hslider("[6]Output scaling[scale:exp]", 0, 0, 1, .000001)
: smooth);
process(x1, x2) = lotkavolterra(limit, a, b, c, g, dt, input(x1), input(x2));
|
79ca735314a12730882f1af6f01f67614261597d396f6bcc5a02bd2cf00bee38 | afalaize/faust | harpe.dsp | //-----------------------------------------------
// Basic harpe simulation with OSC control
// (based on Karplus-Strong)
//
//-----------------------------------------------
declare name "harpe";
declare author "Grame";
import("stdfaust.lib");
process = harpe(11); // an 11 strings harpe
//-----------------------------------------------
// String simulation
//-----------------------------------------------
string(freq, att, level, trig) = no.noise*level
: *(trig : trigger(freq2samples(freq)))
: resonator(freq2samples(freq), att)
with {
resonator(d, a) = (+ : @(d-1)) ~ (average : *(1.0-a));
average(x) = (x+x')/2;
trigger(n) = upfront : + ~ decay(n) : >(0.0);
upfront(x) = (x-x') > 0.0;
decay(n,x) = x - (x>0.0)/n;
freq2samples(f) = 44100.0/f;
};
//-----------------------------------------------
// Build a N strings harpe
// Each string is triggered by a specific
// position [0..1] of the "hand"
//-----------------------------------------------
harpe(N) = hand <: par(i, N, position((i+0.5)/N)
: string( 440 * 2.0^(i/5.0), att, lvl)
: pan((i+0.5)/N) )
:> _,_
with {
lvl = hslider("level [unit:f][osc:/accxyz/0 -10 10]", 0.5, 0, 1, 0.01)^2;
att = hslider("attenuation [osc:/1/fader3]", 0.005, 0, 0.01, 0.001);
hand = hslider("hand[osc:/accxyz/1 -10 10]", 0, 0, 1, 0.01):smooth(0.9);
pan(p) = _ <: *(sqrt(1-p)), *(sqrt(p));
position(a,x) = (min(x,x') < a) & (a < max(x, x'));
smooth(c) = *(1.0-c) : + ~ *(c);
};
| https://raw.githubusercontent.com/afalaize/faust/8f9f5fe3aa167eaeecc15a99d4da984ac2797be3/examples/physicalModeling/old/harpe.dsp | faust | -----------------------------------------------
Basic harpe simulation with OSC control
(based on Karplus-Strong)
-----------------------------------------------
an 11 strings harpe
-----------------------------------------------
String simulation
-----------------------------------------------
-----------------------------------------------
Build a N strings harpe
Each string is triggered by a specific
position [0..1] of the "hand"
----------------------------------------------- |
declare name "harpe";
declare author "Grame";
import("stdfaust.lib");
string(freq, att, level, trig) = no.noise*level
: *(trig : trigger(freq2samples(freq)))
: resonator(freq2samples(freq), att)
with {
resonator(d, a) = (+ : @(d-1)) ~ (average : *(1.0-a));
average(x) = (x+x')/2;
trigger(n) = upfront : + ~ decay(n) : >(0.0);
upfront(x) = (x-x') > 0.0;
decay(n,x) = x - (x>0.0)/n;
freq2samples(f) = 44100.0/f;
};
harpe(N) = hand <: par(i, N, position((i+0.5)/N)
: string( 440 * 2.0^(i/5.0), att, lvl)
: pan((i+0.5)/N) )
:> _,_
with {
lvl = hslider("level [unit:f][osc:/accxyz/0 -10 10]", 0.5, 0, 1, 0.01)^2;
att = hslider("attenuation [osc:/1/fader3]", 0.005, 0, 0.01, 0.001);
hand = hslider("hand[osc:/accxyz/1 -10 10]", 0, 0, 1, 0.01):smooth(0.9);
pan(p) = _ <: *(sqrt(1-p)), *(sqrt(p));
position(a,x) = (min(x,x') < a) & (a < max(x, x'));
smooth(c) = *(1.0-c) : + ~ *(c);
};
|
b1f8bc3bb20860c675b9bee6a023d4a9d657493ca7f67cb5842d827594d3d0fb | friskgit/snares | i_filtered_snare_dispersed.dsp | // -*- compile-command: "cd .. && make jack src=i_filtered_snare_dispersed.dsp && cd -"; -*-&& cd -"; -*-
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare author " henrikfr ";
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
import("stdfaust.lib");
import("math.lib") ; // for PI definition
import("music.lib") ; // for osci definition
//---------------`Snare drum split up in X channels` --------------------------
//
// Taking an impulse as input and feeding it to a generic_snarefs and on to a disperser which
// outputs each filter band on a separate channel. The input control 'port' offsets the filterbands with
// the given amount.
//
// Main controls:
// - tempo: (unless impulse is taken from input)
// - random: if uncecked the output control is done by 'output', else it is randomly distributed
// - output: the offset for the distributed filterbands, if 0 then the lowest band is output to
// the 0th speaker (if the checkbox above is checked this does nothing)
//
// Other controls are inherited from 'generic_snarefs' and 'filter_bank'.
//
// 18 Juli 2019 Henrik Frisk [email protected]
//---------------------------------------------------
// Number of bands and number of output channels. Offset is if channels < bands.
bands=16;
channels = 29;
offset = outgrp(hslider("offset", 0, 0, channels, 1));
// Impulse control
impgrp(x) = vgroup("impulse", x);
imp = ba.pulse(impgrp(hslider("tempo", 5000, 50, 48000, 1)));
// Output control
outgrp(x) = vgroup("[1]output", x);
port = outgrp(hslider("output port", 0, 0, 16, 1));
// Two distribution possibilities, wrapped or wrapped_rnd
ch_wrapped_rnd(x) = ma.modulo(+(outputctrl, x), channels);
ch_wrapped(x) = ma.modulo(+(port, x), channels);
disperser(x) = ch_wrapped(x), ch_wrapped_rnd(x) : ba.selectn(2, outgrp(checkbox("[0]random")));
// Generate a random signal triggered by the impulse
rate = ma.SR/1000.0;
rndctrl = (no.lfnoise(rate) * (channels + 1)) : ma.fabs : int ;
outputctrl = rndctrl : ba.sAndH(imp);
// Main process
process = imp : component("generic_snarefs.dsp") :
component("filter_bank.dsp")[bands=bands;] :
par(i, bands, ba.selectoutn(bands, disperser(i))) :>
par(i, bands, _);
| https://raw.githubusercontent.com/friskgit/snares/bb43ea5e706a0ead6d65dd176a5c492b2f5d8f74/faust/snare/src/i_filtered_snare_dispersed.dsp | faust | -*- compile-command: "cd .. && make jack src=i_filtered_snare_dispersed.dsp && cd -"; -*-&& cd -"; -*-
for PI definition
for osci definition
---------------`Snare drum split up in X channels` --------------------------
Taking an impulse as input and feeding it to a generic_snarefs and on to a disperser which
outputs each filter band on a separate channel. The input control 'port' offsets the filterbands with
the given amount.
Main controls:
- tempo: (unless impulse is taken from input)
- random: if uncecked the output control is done by 'output', else it is randomly distributed
- output: the offset for the distributed filterbands, if 0 then the lowest band is output to
the 0th speaker (if the checkbox above is checked this does nothing)
Other controls are inherited from 'generic_snarefs' and 'filter_bank'.
18 Juli 2019 Henrik Frisk [email protected]
---------------------------------------------------
Number of bands and number of output channels. Offset is if channels < bands.
Impulse control
Output control
Two distribution possibilities, wrapped or wrapped_rnd
Generate a random signal triggered by the impulse
Main process |
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare author " henrikfr ";
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
import("stdfaust.lib");
bands=16;
channels = 29;
offset = outgrp(hslider("offset", 0, 0, channels, 1));
impgrp(x) = vgroup("impulse", x);
imp = ba.pulse(impgrp(hslider("tempo", 5000, 50, 48000, 1)));
outgrp(x) = vgroup("[1]output", x);
port = outgrp(hslider("output port", 0, 0, 16, 1));
ch_wrapped_rnd(x) = ma.modulo(+(outputctrl, x), channels);
ch_wrapped(x) = ma.modulo(+(port, x), channels);
disperser(x) = ch_wrapped(x), ch_wrapped_rnd(x) : ba.selectn(2, outgrp(checkbox("[0]random")));
rate = ma.SR/1000.0;
rndctrl = (no.lfnoise(rate) * (channels + 1)) : ma.fabs : int ;
outputctrl = rndctrl : ba.sAndH(imp);
process = imp : component("generic_snarefs.dsp") :
component("filter_bank.dsp")[bands=bands;] :
par(i, bands, ba.selectoutn(bands, disperser(i))) :>
par(i, bands, _);
|
df803ec77d2e4af69e25104f5bde5b28d0a22efa1c4bd1903824505c0b8ec32d | friskgit/snares | snarefs.dsp | // -*- compile-command: "cd .. && make jack src=src/snarefs.dsp && cd -"; -*-&& cd -"; -*-
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare author " henrikfr ";
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
import("stdfaust.lib");
import("math.lib") ; // for PI definition
import("music.lib") ; // for osci definition
//---------------`Snare drum synth` --------------------------
// A snare drum synth based on a frequency shifted osc.
//
// Where:
// * midi note 67-89
// * stiffness 0-0.55 (mapped to note as in note 67 -> 0)
// * midi velocity 75-127
// * midi velocity is mapped to pressure
// A useful parameter setting is:
//
//
// 30 Juni 2018 Henrik Frisk [email protected]
//---------------------------------------------------
osc1f = hslider("osc 1 freq", 330, 50, 2000, 0.1);
osc2f = hslider("osc 2 freq", 180, 50, 2000, 0.1);
tri1f = hslider("triangle freq", 111, 50, 2000, 0.1);
osc1 = os.osc(osc1f) *(0.1);
osc2 = os.osc(osc2f) *(0.1);
tri1 = os.triangle(tri1f) *(0.1);
imp = ba.pulse(hslider("tempo", 5000, 500, 10000, 1));
env = en.ar(attack, rel, imp)
with {
attack = hslider("attack", 0.00000001, 0, 0.1, 0.000000001) : si.smooth(0.1);
rel = hslider("rel", 0.1, 0.0000001, 0.5, 0.0000001) : si.smooth(0.2);
};
noiseenv = en.ar(attack, rel, imp)
with {
attack = hslider("noise attack", 0.00000001, 0, 0.1, 0.000000001) : si.smooth(0.1);
rel = hslider("noise rel", 0.1, 0.0000001, 0.5, 0.0000001) : si.smooth(0.2);
};
// Noise
n = no.multinoise(8) : par(i, 8, _ * env * hslider("noise lvl", 0.1, 0, 1.5, 0.0001));
// Reduce to stereo
nse = n :> _ * noiseenv ;
// filt = fi.resonbp(frq, q, gain)
// with {
// frq = hslider("frq", 200, 50, 5000, 0.1);
// q = hslider("q", 1, 0.01, 10, 0.01);
// gain = hslider("gn", 0, 0, 2, 0.00001);
// };
// Frequence shift
mSR = fconstant(int fSamplingFreq , <math.h>);
f2smp(freq) = (mSR, freq : / ) ;
phasor(smp) = 1 : +~_ : _,smp : fmod : _,smp : / ;
unit(v1) = (_ <: *(v1) , _'' : - ) : + ~ (_', v1 : *);
filters = _ <: _,_' :( unit(0.161758): unit(.733029) : unit (.94535) : unit(.990598) ), (unit(.479401) : unit(.876218) : unit (.976599) : unit(.9975) ) ;
cmpl_osc(freq) = f2smp(freq) : phasor : _, 6.2831853 : *<: sin,cos;
cmpl_mul(in1,in2,in3,in4) = in1*(in3), in2*(in4) ;
trimod = tri1, tri1 : (filters, cmpl_osc) : cmpl_mul <: +,- ;
oscs = osc1, osc2 : par(i, 2, _* env);
process = trimod : par(i, 2, _ * env), oscs :> _+nse ,_+nse :> _;
//process = nse;
| https://raw.githubusercontent.com/friskgit/snares/bb43ea5e706a0ead6d65dd176a5c492b2f5d8f74/faust/snare/src/extras/snarefs.dsp | faust | -*- compile-command: "cd .. && make jack src=src/snarefs.dsp && cd -"; -*-&& cd -"; -*-
for PI definition
for osci definition
---------------`Snare drum synth` --------------------------
A snare drum synth based on a frequency shifted osc.
Where:
* midi note 67-89
* stiffness 0-0.55 (mapped to note as in note 67 -> 0)
* midi velocity 75-127
* midi velocity is mapped to pressure
A useful parameter setting is:
30 Juni 2018 Henrik Frisk [email protected]
---------------------------------------------------
Noise
Reduce to stereo
filt = fi.resonbp(frq, q, gain)
with {
frq = hslider("frq", 200, 50, 5000, 0.1);
q = hslider("q", 1, 0.01, 10, 0.01);
gain = hslider("gn", 0, 0, 2, 0.00001);
};
Frequence shift
process = nse; |
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare author " henrikfr ";
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
import("stdfaust.lib");
osc1f = hslider("osc 1 freq", 330, 50, 2000, 0.1);
osc2f = hslider("osc 2 freq", 180, 50, 2000, 0.1);
tri1f = hslider("triangle freq", 111, 50, 2000, 0.1);
osc1 = os.osc(osc1f) *(0.1);
osc2 = os.osc(osc2f) *(0.1);
tri1 = os.triangle(tri1f) *(0.1);
imp = ba.pulse(hslider("tempo", 5000, 500, 10000, 1));
env = en.ar(attack, rel, imp)
with {
attack = hslider("attack", 0.00000001, 0, 0.1, 0.000000001) : si.smooth(0.1);
rel = hslider("rel", 0.1, 0.0000001, 0.5, 0.0000001) : si.smooth(0.2);
};
noiseenv = en.ar(attack, rel, imp)
with {
attack = hslider("noise attack", 0.00000001, 0, 0.1, 0.000000001) : si.smooth(0.1);
rel = hslider("noise rel", 0.1, 0.0000001, 0.5, 0.0000001) : si.smooth(0.2);
};
n = no.multinoise(8) : par(i, 8, _ * env * hslider("noise lvl", 0.1, 0, 1.5, 0.0001));
nse = n :> _ * noiseenv ;
mSR = fconstant(int fSamplingFreq , <math.h>);
f2smp(freq) = (mSR, freq : / ) ;
phasor(smp) = 1 : +~_ : _,smp : fmod : _,smp : / ;
unit(v1) = (_ <: *(v1) , _'' : - ) : + ~ (_', v1 : *);
filters = _ <: _,_' :( unit(0.161758): unit(.733029) : unit (.94535) : unit(.990598) ), (unit(.479401) : unit(.876218) : unit (.976599) : unit(.9975) ) ;
cmpl_osc(freq) = f2smp(freq) : phasor : _, 6.2831853 : *<: sin,cos;
cmpl_mul(in1,in2,in3,in4) = in1*(in3), in2*(in4) ;
trimod = tri1, tri1 : (filters, cmpl_osc) : cmpl_mul <: +,- ;
oscs = osc1, osc2 : par(i, 2, _* env);
process = trimod : par(i, 2, _ * env), oscs :> _+nse ,_+nse :> _;
|
8d6a07cfe36b6543601273ce747bde9368314f47a911cccb33cbef78cd936b4e | jpcima/Hera | HeraChorus.dsp | // SPDX-License-Identifier: ISC
declare author "Jean Pierre Cimalando";
declare license "ISC";
import("stdfaust.lib");
buttonI = checkbox("[1] Chorus I") : >(0.5);
buttonII = checkbox("[2] Chorus II") : >(0.5);
process = chorus with {
/* Mode: 0=Off 1=(I), 2=(II), 3=(I + II) */
mode = buttonI | (buttonII << 1);
enabled = mode != 0;
selectByMode = ba.selectn(3, mode-1);
/* (I) */
I = environment {
lfoRate = 0.513;
lfoShape = 0; /* triangle */
delaymin(0) = 1.54e-3;
delaymax(0) = 5.15e-3;
delaymin(1) = 1.51e-3;
delaymax(1) = 5.40e-3;
stereo = 1;
};
/* (II) */
II = environment {
lfoRate = 0.863;
lfoShape = 0; /* triangle */
delaymin(0) = 1.54e-3;
delaymax(0) = 5.15e-3;
delaymin(1) = 1.51e-3;
delaymax(1) = 5.40e-3;
stereo = 1;
};
/* (I + II) */
III = environment {
lfoRate = 9.75; /* by ear and experiment */
// found in documents and not matching the Juno60 sample:
// 15.175 Hz (too fast), 8 Hz (too slow)
lfoShape = 1; /* sine-like */
delaymin(0) = 3.22e-3;
delaymax(0) = 3.56e-3;
delaymin(1) = 3.28e-3;
delaymax(1) = 3.65e-3;
stereo = 0;
};
/**/
s = environment {
lfoRate = (I.lfoRate, II.lfoRate, III.lfoRate) : selectByMode : smooth;
lfoShape = (I.lfoShape, II.lfoShape, III.lfoShape) : selectByMode : smooth;
delaymin(i) = (I.delaymin(i), II.delaymin(i), III.delaymin(i)) : selectByMode : smooth;
delaymax(i) = (I.delaymax(i), II.delaymax(i), III.delaymax(i)) : selectByMode : smooth;
stereo = (I.stereo, II.stereo, III.stereo) : selectByMode : smooth;
};
/**/
chorus(x) =
((x, out1) : si.interpolate(enabled : smooth)),
((x, out2) : si.interpolate(enabled : smooth))
with {
out1 = x <: (*(0.83), delayModel.line1(lfo1 : delayAt(0))) :> +;
out2 = x <: (*(0.83), delayModel.line2(lfo2 : delayAt(1))) :> +;
/* Delay model */
delayModel = analogDelayModel;
//delayModel = digitalDelayModel;
/* Capacity of delay */
delaycapframes = 2048;
/* LFO */
rawLfo = (triangle, sine) : si.interpolate(s.lfoShape) with {
triangle = os.lf_trianglepos(s.lfoRate);
sine = os.osc(s.lfoRate) : +(1.) : *(0.5);
};
rawInverseLfo = 1. - rawLfo;
lfo1 = rawLfo;
lfo2 = (rawLfo, rawInverseLfo) : si.interpolate(s.stereo);
/* Filter */
delayLPF = fi.lowpass(4, 10000.); // a simulation of BBD antialising LPF at input and output
/* Delay */
digitalDelayModel = environment {
line1(d) = delayLPF : de.fdelay(delaycapframes, d*ma.SR) : delayLPF;
line2(d) = line1(d);
};
analogDelayModel = environment {
/* external functions call the BBD which is implemented in C++ code */
line1 = ffunction(float AnalogDelay1(float, float), <math.h>, "");
line2 = ffunction(float AnalogDelay2(float, float), <math.h>, "");
};
delayAt(i) = *(s.delaymax(i) - s.delaymin(i)) : +(s.delaymin(i));
};
/**/
smooth = si.smooth(ba.tau2pole(100e-3));
};
| https://raw.githubusercontent.com/jpcima/Hera/eec43c0b5cb5aaa71c647b2e5597fc1ba383dd13/Source/HeraChorus.dsp | faust | SPDX-License-Identifier: ISC
Mode: 0=Off 1=(I), 2=(II), 3=(I + II)
(I)
triangle
(II)
triangle
(I + II)
by ear and experiment
found in documents and not matching the Juno60 sample:
15.175 Hz (too fast), 8 Hz (too slow)
sine-like
Delay model
delayModel = digitalDelayModel;
Capacity of delay
LFO
Filter
a simulation of BBD antialising LPF at input and output
Delay
external functions call the BBD which is implemented in C++ code
|
declare author "Jean Pierre Cimalando";
declare license "ISC";
import("stdfaust.lib");
buttonI = checkbox("[1] Chorus I") : >(0.5);
buttonII = checkbox("[2] Chorus II") : >(0.5);
process = chorus with {
mode = buttonI | (buttonII << 1);
enabled = mode != 0;
selectByMode = ba.selectn(3, mode-1);
I = environment {
lfoRate = 0.513;
delaymin(0) = 1.54e-3;
delaymax(0) = 5.15e-3;
delaymin(1) = 1.51e-3;
delaymax(1) = 5.40e-3;
stereo = 1;
};
II = environment {
lfoRate = 0.863;
delaymin(0) = 1.54e-3;
delaymax(0) = 5.15e-3;
delaymin(1) = 1.51e-3;
delaymax(1) = 5.40e-3;
stereo = 1;
};
III = environment {
delaymin(0) = 3.22e-3;
delaymax(0) = 3.56e-3;
delaymin(1) = 3.28e-3;
delaymax(1) = 3.65e-3;
stereo = 0;
};
s = environment {
lfoRate = (I.lfoRate, II.lfoRate, III.lfoRate) : selectByMode : smooth;
lfoShape = (I.lfoShape, II.lfoShape, III.lfoShape) : selectByMode : smooth;
delaymin(i) = (I.delaymin(i), II.delaymin(i), III.delaymin(i)) : selectByMode : smooth;
delaymax(i) = (I.delaymax(i), II.delaymax(i), III.delaymax(i)) : selectByMode : smooth;
stereo = (I.stereo, II.stereo, III.stereo) : selectByMode : smooth;
};
chorus(x) =
((x, out1) : si.interpolate(enabled : smooth)),
((x, out2) : si.interpolate(enabled : smooth))
with {
out1 = x <: (*(0.83), delayModel.line1(lfo1 : delayAt(0))) :> +;
out2 = x <: (*(0.83), delayModel.line2(lfo2 : delayAt(1))) :> +;
delayModel = analogDelayModel;
delaycapframes = 2048;
rawLfo = (triangle, sine) : si.interpolate(s.lfoShape) with {
triangle = os.lf_trianglepos(s.lfoRate);
sine = os.osc(s.lfoRate) : +(1.) : *(0.5);
};
rawInverseLfo = 1. - rawLfo;
lfo1 = rawLfo;
lfo2 = (rawLfo, rawInverseLfo) : si.interpolate(s.stereo);
digitalDelayModel = environment {
line1(d) = delayLPF : de.fdelay(delaycapframes, d*ma.SR) : delayLPF;
line2(d) = line1(d);
};
analogDelayModel = environment {
line1 = ffunction(float AnalogDelay1(float, float), <math.h>, "");
line2 = ffunction(float AnalogDelay2(float, float), <math.h>, "");
};
delayAt(i) = *(s.delaymax(i) - s.delaymin(i)) : +(s.delaymin(i));
};
smooth = si.smooth(ba.tau2pole(100e-3));
};
|
3582f95207c4d0e31b52d88284fa3d7b7319f23bf7b813dfe112b329dc2fdc0d | jpcima/Hera | HeraDCO.dsp | // SPDX-License-Identifier: GPL-3.0-or-later
declare author "Jean Pierre Cimalando";
declare license "GPL-3.0-or-later";
// Converted from original at pendragon-andyh/junox
import("stdfaust.lib");
import("HeraCommon.dsp");
process(det, pw) = dco(f*det, pw, lsaw*mix, lpulse*mix, lsub*mix, lnoise*mix) with {
f = hslider("[1] frequency", 0.0, 0.0, 20000.0, 1.0) : fsmooth(10e-3);
lsaw = hslider("[2] saw level", 0.5, 0.0, 1.0, 0.01) : *(0.2) : fsmooth(10e-3);
lpulse = hslider("[3] pulse level", 0.0, 0.0, 1.0, 0.01) : *(0.2) : fsmooth(10e-3);
lsub = hslider("[4] sub level", 0.0, 0.0, 1.0, 0.01) : *(0.195) : fsmooth(10e-3);
lnoise = hslider("[5] noise level", 0.0, 0.0, 1.0, 0.01) : *(0.21) : max(ba.db2linear(-120)) : fsmooth(10e-3);
lsum = lsaw+lpulse+lsub+lnoise;
mix = 0.26/(0.26+(max(lsum, 0.26)-0.26)*0.3);
};
///
dco(frequency, pulseWidth, sawLevel, pulseLevel, subLevel, noiseLevel) =
sawOut+pulseOut+subOut+noiseOut
with {
sawOut = saw(frequency)*sawLevel;
pulseOut = pulse(pulseWidth, frequency)*pulseLevel;
subOut = sub(frequency)*subLevel;
noiseOut = no.pink_noise_m*noiseLevel;
};
///
saw(f) = (2*wrap(phase)-1.0)-polyBLEP2(wrap(phase), inc(f), 1.0)
letrec {
'phase = wrap(phase)+inc(f);
};
///
pulse(w, f) = ba.if(pos, ppos, pneg)-nblep+pblep
with {
nblep = polyBLEP2(wrap(phase), inc(f), ph);
pblep = polyBLEP2(ba.if(x<0.0, x+1.0, x), inc(f), ph) with { x = wrap(phase)-pw; };
}
letrec {
'ppos = ba.if(tr, 1.0-w*0.95, ba.if(pos, ppos*pole, ppos));
'pneg = ba.if(tr, -1.0, ba.if(pos, pneg, pneg*pole));
'ph = ba.if(tr, 0.45*(2.0-w*0.95), ph);
}
with {
pos = wrap(phase)>pw;
pole = ba.tau2pole(10e-3);
}
letrec {
'pw = ba.if(tr, 0.5-0.45*w, pw);
}
with {
tr = phase>=1.0;
}
letrec {
'phase = wrap(phase)+inc(f);
};
///
sub(f) = out-blep
with {
blep = polyBLEP2(y, inc(f), out'*pole);
}
letrec {
'out = ba.if(tr, ba.if(out>0.0, -1.0, 1.0), out*pole);
}
with {
y = ba.if(z<0.0, z+1.0, z) with { z = wrap(phase)-0.5; };
pole = ba.tau2pole(10e-3);
tr = (wrap(phase')<0.5)&(wrap(phase)>=0.5);
}
letrec {
'phase = wrap(phase)+inc(f);
};
///
polyBLEP2(phase, inc, height) =
height*ba.if(phase<inc, right, ba.if(phase+inc>1.0, left, 0.0))
with {
right = (t+t-t*t-1.0) with { t = phase/inc; };
left = (t*t+(t+t)+1.0) with { t = (phase-1.0)/inc; };
};
/* -gnuplot-
r(t) = t+t-t*t-1.0
l(t) = t*t+(t+t)+1.0
polyBLEP2(p, i) = (p<i)?r(p/i):(p+i>1.0)?l((p-1.0)/i):0.0
*/
///
inc(f) = f*(1.0/ma.SR);
wrap(x) = x-int(x);
| https://raw.githubusercontent.com/jpcima/Hera/eec43c0b5cb5aaa71c647b2e5597fc1ba383dd13/Source/HeraDCO.dsp | faust | SPDX-License-Identifier: GPL-3.0-or-later
Converted from original at pendragon-andyh/junox
/
/
/
/
/
-gnuplot-
r(t) = t+t-t*t-1.0
l(t) = t*t+(t+t)+1.0
polyBLEP2(p, i) = (p<i)?r(p/i):(p+i>1.0)?l((p-1.0)/i):0.0
/ |
declare author "Jean Pierre Cimalando";
declare license "GPL-3.0-or-later";
import("stdfaust.lib");
import("HeraCommon.dsp");
process(det, pw) = dco(f*det, pw, lsaw*mix, lpulse*mix, lsub*mix, lnoise*mix) with {
f = hslider("[1] frequency", 0.0, 0.0, 20000.0, 1.0) : fsmooth(10e-3);
lsaw = hslider("[2] saw level", 0.5, 0.0, 1.0, 0.01) : *(0.2) : fsmooth(10e-3);
lpulse = hslider("[3] pulse level", 0.0, 0.0, 1.0, 0.01) : *(0.2) : fsmooth(10e-3);
lsub = hslider("[4] sub level", 0.0, 0.0, 1.0, 0.01) : *(0.195) : fsmooth(10e-3);
lnoise = hslider("[5] noise level", 0.0, 0.0, 1.0, 0.01) : *(0.21) : max(ba.db2linear(-120)) : fsmooth(10e-3);
lsum = lsaw+lpulse+lsub+lnoise;
mix = 0.26/(0.26+(max(lsum, 0.26)-0.26)*0.3);
};
dco(frequency, pulseWidth, sawLevel, pulseLevel, subLevel, noiseLevel) =
sawOut+pulseOut+subOut+noiseOut
with {
sawOut = saw(frequency)*sawLevel;
pulseOut = pulse(pulseWidth, frequency)*pulseLevel;
subOut = sub(frequency)*subLevel;
noiseOut = no.pink_noise_m*noiseLevel;
};
saw(f) = (2*wrap(phase)-1.0)-polyBLEP2(wrap(phase), inc(f), 1.0)
letrec {
'phase = wrap(phase)+inc(f);
};
pulse(w, f) = ba.if(pos, ppos, pneg)-nblep+pblep
with {
nblep = polyBLEP2(wrap(phase), inc(f), ph);
pblep = polyBLEP2(ba.if(x<0.0, x+1.0, x), inc(f), ph) with { x = wrap(phase)-pw; };
}
letrec {
'ppos = ba.if(tr, 1.0-w*0.95, ba.if(pos, ppos*pole, ppos));
'pneg = ba.if(tr, -1.0, ba.if(pos, pneg, pneg*pole));
'ph = ba.if(tr, 0.45*(2.0-w*0.95), ph);
}
with {
pos = wrap(phase)>pw;
pole = ba.tau2pole(10e-3);
}
letrec {
'pw = ba.if(tr, 0.5-0.45*w, pw);
}
with {
tr = phase>=1.0;
}
letrec {
'phase = wrap(phase)+inc(f);
};
sub(f) = out-blep
with {
blep = polyBLEP2(y, inc(f), out'*pole);
}
letrec {
'out = ba.if(tr, ba.if(out>0.0, -1.0, 1.0), out*pole);
}
with {
y = ba.if(z<0.0, z+1.0, z) with { z = wrap(phase)-0.5; };
pole = ba.tau2pole(10e-3);
tr = (wrap(phase')<0.5)&(wrap(phase)>=0.5);
}
letrec {
'phase = wrap(phase)+inc(f);
};
polyBLEP2(phase, inc, height) =
height*ba.if(phase<inc, right, ba.if(phase+inc>1.0, left, 0.0))
with {
right = (t+t-t*t-1.0) with { t = phase/inc; };
left = (t*t+(t+t)+1.0) with { t = (phase-1.0)/inc; };
};
inc(f) = f*(1.0/ma.SR);
wrap(x) = x-int(x);
|
e24c93d850e509fc90d9d736e12158101388d1ce6e66970aea9755d94df159c5 | jameslnrd/mi_introduction_workshop_2020 | polyTriangle.dsp | declare name "Polyphonic Triangles";
declare author "James Leonard";
declare date "April 2020";
/* ========= DESCRITPION =============
A series of small triangle structures are excited by force impulses.
- inputs: force impulse.
- outputs: one mass of the triangle
- controls: triangle stiffness, damping.
Note: use this model with Poly mode to control voices dynamically according to MIDI input.
*/
declare options "[midi:on][nvoices:12]";
import("stdfaust.lib");
gate = button("gate"):ba.impulsify;
in1 = gate * 0.1;
freq = hslider("freq",200,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
m_K = 0.001 * freq * hslider("Model Stiffness", 0.1, 0.0001, 0.3, 0.00001) ;
m_Z = hslider("Model Damping", 0.0001, 0.00001, 0.001, 0.000001) ;
OutGain = 0.3;
model = (
mi.ground(0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
par(i, nbFrcIn,_):
RoutingMassToLink ,
par(i, nbFrcIn,_):
mi.springDamper(0.05, 0.01, 0., 0.),
mi.springDamper(m_K, m_Z, 0., 0.),
mi.springDamper(m_K, m_Z, 0., 0.),
mi.springDamper(m_K, m_Z, 0., 0.),
par(i, nbOut+nbFrcIn, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
RoutingMassToLink(m0, m1, m2, m3) = /* routed positions */ m0, m1, m1, m2, m2, m3, m3, m1, /* outputs */ m3;
RoutingLinkToMass(l0_f1, l0_f2, l1_f1, l1_f2, l2_f1, l2_f2, l3_f1, l3_f2, p_out1, f_in1) = /* routed forces */ l0_f1, l0_f2 + l1_f1 + l3_f2, f_in1 + l1_f2 + l2_f1, l2_f2 + l3_f1, /* pass-through */ p_out1;
nbMass = 4;
nbFrcIn = 1;
nbOut = 1;
};
process = in1 : model:*(OutGain);
/*
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# Define global parameter attributes
@m_K param 0.1
@m_Z param 0.001
# Create material points
@m_s0 ground 0.
@m_m0 mass 1. 0. 0.
@m_m1 mass 1. 0. 0.
@m_m2 mass 1. 0. 0.
# Create and connect interaction modules
@m_r0 springDamper @m_s0 @m_m0 0.05 0.01
@m_r1 springDamper @m_m0 @m_m1 m_K m_Z
@m_r2 springDamper @m_m1 @m_m2 m_K m_Z
@m_r3 springDamper @m_m2 @m_m0 m_K m_Z
# Force input, applied to m1
@in1 frcInput @m_m1
# Position output, observed on m2
@out1 posOutput @m_m2
*/ | https://raw.githubusercontent.com/jameslnrd/mi_introduction_workshop_2020/2f487dbc5b8e7cd83cbd962254e737bdb82948f6/14_Polyphonic/polyTriangle.dsp | faust | ========= DESCRITPION =============
A series of small triangle structures are excited by force impulses.
- inputs: force impulse.
- outputs: one mass of the triangle
- controls: triangle stiffness, damping.
Note: use this model with Poly mode to control voices dynamically according to MIDI input.
routed positions
outputs
routed forces
pass-through
========= MIMS SCRIPT USED FOR MODEL GENERATION =============
# Define global parameter attributes
@m_K param 0.1
@m_Z param 0.001
# Create material points
@m_s0 ground 0.
@m_m0 mass 1. 0. 0.
@m_m1 mass 1. 0. 0.
@m_m2 mass 1. 0. 0.
# Create and connect interaction modules
@m_r0 springDamper @m_s0 @m_m0 0.05 0.01
@m_r1 springDamper @m_m0 @m_m1 m_K m_Z
@m_r2 springDamper @m_m1 @m_m2 m_K m_Z
@m_r3 springDamper @m_m2 @m_m0 m_K m_Z
# Force input, applied to m1
@in1 frcInput @m_m1
# Position output, observed on m2
@out1 posOutput @m_m2
| declare name "Polyphonic Triangles";
declare author "James Leonard";
declare date "April 2020";
declare options "[midi:on][nvoices:12]";
import("stdfaust.lib");
gate = button("gate"):ba.impulsify;
in1 = gate * 0.1;
freq = hslider("freq",200,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
m_K = 0.001 * freq * hslider("Model Stiffness", 0.1, 0.0001, 0.3, 0.00001) ;
m_Z = hslider("Model Damping", 0.0001, 0.00001, 0.001, 0.000001) ;
OutGain = 0.3;
model = (
mi.ground(0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
mi.mass(1., 0, 0., 0.),
par(i, nbFrcIn,_):
RoutingMassToLink ,
par(i, nbFrcIn,_):
mi.springDamper(0.05, 0.01, 0., 0.),
mi.springDamper(m_K, m_Z, 0., 0.),
mi.springDamper(m_K, m_Z, 0., 0.),
mi.springDamper(m_K, m_Z, 0., 0.),
par(i, nbOut+nbFrcIn, _):
RoutingLinkToMass
)~par(i, nbMass, _):
par(i, nbMass, !), par(i, nbOut , _)
with{
nbMass = 4;
nbFrcIn = 1;
nbOut = 1;
};
process = in1 : model:*(OutGain);
|
3faff80654ea3239d5799a276b7d5c01c8e83c712ac9781adbbf59347068b34b | s-e-a-m/faust-libraries | ap90deg.dsp | declare name "CURTIS ROADS ALLPASS FILTER";
declare version "001";
declare author "Giuseppe Silvi";
declare license "GNU-GPL-v3";
declare copyright "(c)SEAM 2020";
declare description "CURTIS ROADS ALLPASS FILTER";
import("stdfaust.lib");
import("../../../seam.lib");
// ap1 = fi.tf2(1.94632, -0.94657, 0.94657, -1.94632, 1);
// ap2 = fi.tf2(0.83774, -006338, 0.06338, -0.83774, 1);
// ap1b = biquad(1.94632, -0.94657, 0.94657, -1.94632, 1);
// ap2b = biquad(0.83774, -006338, 0.06338, -0.83774, 1);
// ap1c = biquad(0.87747, -1.86141, 1, -1.86141, 0.87747);
// ap2c = biquad(0.77083, -1.71048, 1, -1.71048, 0.77083);
process = os.osc(zsweep(ma.SR/2)) <: _+(apbiquad(1250,0.01):apbiquad(4500,2)) : *(0.25);
//process = os.osc(lsweep(2)) <: _+(fi.pospass(8,1000):*(2),!);
biquad(a0c,a1c,a2c,b1c,b2c) = a(a0c,a1c,a2c) : ma.sub~(b(b1c,b2c))
with{
a0(a0c) = *(a0c);
a1(a1c) = @(1) : *(a1c);
a2(a2c) = @(2) : *(a2c);
a(a0c,a1c,a2c) = _ <: a0(a0c), a1(a1c), a2(a2c) :> _;
b1(b1c) = *(b1c);
b2(b2c) = @(1) : *(b2c);
b(b1c,b2c) = _ <: b1(b1c),b2(b2c) :> _ ;
};
apbiquad(fc,q) = biquad(b0(fc,q), b1(fc,q), b2, a1(fc,q), a2(fc,q))
with{
g(fc) = tan(ma.PI*(fc/ma.SR));
d(q) = 1/q;
k(fc,q) = 1/(1 + (d(q)*g(fc)) + (g(fc)*g(fc)));
b0(fc,q) = (1 - (g(fc)*d(q)) + (g(fc)*g(fc))) * k(fc,q);
b1(fc,q) = 2 * ((g(fc)*g(fc)) - 1) * k(fc,q);
b2 = 1;
a1 = b1;
a2 = b0;
};
| https://raw.githubusercontent.com/s-e-a-m/faust-libraries/9120cccb9335f42407062eb4bf149188d8018b07/plots/dsp/allpass/ap90deg.dsp | faust | ap1 = fi.tf2(1.94632, -0.94657, 0.94657, -1.94632, 1);
ap2 = fi.tf2(0.83774, -006338, 0.06338, -0.83774, 1);
ap1b = biquad(1.94632, -0.94657, 0.94657, -1.94632, 1);
ap2b = biquad(0.83774, -006338, 0.06338, -0.83774, 1);
ap1c = biquad(0.87747, -1.86141, 1, -1.86141, 0.87747);
ap2c = biquad(0.77083, -1.71048, 1, -1.71048, 0.77083);
process = os.osc(lsweep(2)) <: _+(fi.pospass(8,1000):*(2),!); | declare name "CURTIS ROADS ALLPASS FILTER";
declare version "001";
declare author "Giuseppe Silvi";
declare license "GNU-GPL-v3";
declare copyright "(c)SEAM 2020";
declare description "CURTIS ROADS ALLPASS FILTER";
import("stdfaust.lib");
import("../../../seam.lib");
process = os.osc(zsweep(ma.SR/2)) <: _+(apbiquad(1250,0.01):apbiquad(4500,2)) : *(0.25);
biquad(a0c,a1c,a2c,b1c,b2c) = a(a0c,a1c,a2c) : ma.sub~(b(b1c,b2c))
with{
a0(a0c) = *(a0c);
a1(a1c) = @(1) : *(a1c);
a2(a2c) = @(2) : *(a2c);
a(a0c,a1c,a2c) = _ <: a0(a0c), a1(a1c), a2(a2c) :> _;
b1(b1c) = *(b1c);
b2(b2c) = @(1) : *(b2c);
b(b1c,b2c) = _ <: b1(b1c),b2(b2c) :> _ ;
};
apbiquad(fc,q) = biquad(b0(fc,q), b1(fc,q), b2, a1(fc,q), a2(fc,q))
with{
g(fc) = tan(ma.PI*(fc/ma.SR));
d(q) = 1/q;
k(fc,q) = 1/(1 + (d(q)*g(fc)) + (g(fc)*g(fc)));
b0(fc,q) = (1 - (g(fc)*d(q)) + (g(fc)*g(fc))) * k(fc,q);
b1(fc,q) = 2 * ((g(fc)*g(fc)) - 1) * k(fc,q);
b2 = 1;
a1 = b1;
a2 = b0;
};
|
9dc60ffb59474f8b7b664f19cd04aea7d3d1f66dc0338881c7b21aff85516de9 | HMaxime/CONDUCT | sallenKey2ndOrderHPF.dsp | declare name "sallenKey2ndOrderHPF";
declare description "Demonstration of the Sallen-Key Second Order Low-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.sallenKey2ndOrderHPF(normFreq,Q) <:_,_;
| https://raw.githubusercontent.com/HMaxime/CONDUCT/a70e4ab8db098cf38fb32d9fa948eb3c2939f07e/Faust%26PureData/old/faust-master-dev/examples/filtering/sallenKey2ndOrderHPF.dsp | faust | declare name "sallenKey2ndOrderHPF";
declare description "Demonstration of the Sallen-Key Second Order Low-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.sallenKey2ndOrderHPF(normFreq,Q) <:_,_;
|
|
a05a585a6d117de57a20c1c3df585450d210d5245b27a96ced03c31767ff3974 | HMaxime/CONDUCT | sallenKeyOnePoleLPF.dsp | declare name "sallenKeyOnePoleLPF";
declare description "Demonstration of the Sallen-Key One Pole Low-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.sallenKeyOnePoleLPF(normFreq) <:_,_;
| https://raw.githubusercontent.com/HMaxime/CONDUCT/a70e4ab8db098cf38fb32d9fa948eb3c2939f07e/Faust%26PureData/old/faust-master-dev/examples/filtering/sallenKeyOnePoleLPF.dsp | faust | declare name "sallenKeyOnePoleLPF";
declare description "Demonstration of the Sallen-Key One Pole Low-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.sallenKeyOnePoleLPF(normFreq) <:_,_;
|
|
0ea09aed79596f2f7cd2fe91860499ac226f02f96002644d494b36b541d205a0 | HMaxime/CONDUCT | sallenKey2ndOrderLPF.dsp | declare name "sallenKey2ndOrderLPF";
declare description "Demonstration of the Sallen-Key Second Order Low-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.sallenKey2ndOrderLPF(normFreq,Q) <:_,_;
| https://raw.githubusercontent.com/HMaxime/CONDUCT/a70e4ab8db098cf38fb32d9fa948eb3c2939f07e/Faust%26PureData/old/faust-master-dev/examples/filtering/sallenKey2ndOrderLPF.dsp | faust | declare name "sallenKey2ndOrderLPF";
declare description "Demonstration of the Sallen-Key Second Order Low-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.sallenKey2ndOrderLPF(normFreq,Q) <:_,_;
|
|
4f547e429e8948c41dc36bd680ffe96939b4ded360aface0178d0da70d107533 | HMaxime/CONDUCT | sallenKey2ndOrderBPF.dsp | declare name "sallenKey2ndOrderBPF";
declare description "Demonstration of the Sallen-Key Second Order Band-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.sallenKey2ndOrderBPF(normFreq,Q) <:_,_;
| https://raw.githubusercontent.com/HMaxime/CONDUCT/a70e4ab8db098cf38fb32d9fa948eb3c2939f07e/Faust%26PureData/old/faust-master-dev/examples/filtering/sallenKey2ndOrderBPF.dsp | faust | declare name "sallenKey2ndOrderBPF";
declare description "Demonstration of the Sallen-Key Second Order Band-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
Q = hslider("Q",1,0.5,10,0.01);
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.sallenKey2ndOrderBPF(normFreq,Q) <:_,_;
|
|
f6353c0b4cb599dcf3b94a6af741517a92a5208b4e45d5856074d492371374d2 | HMaxime/CONDUCT | sallenKeyOnePoleHPF.dsp | declare name "sallenKeyOnePoleHPF";
declare description "Demonstration of the Sallen-Key One Pole High-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.sallenKeyOnePoleHPF(normFreq) <:_,_;
| https://raw.githubusercontent.com/HMaxime/CONDUCT/a70e4ab8db098cf38fb32d9fa948eb3c2939f07e/Faust%26PureData/old/faust-master-dev/examples/filtering/sallenKeyOnePoleHPF.dsp | faust | declare name "sallenKeyOnePoleHPF";
declare description "Demonstration of the Sallen-Key One Pole High-Pass Filter";
declare author "Eric Tarr";
import("stdfaust.lib");
normFreq = hslider("freq",0.5,0,1,0.001):si.smoo;
switch = checkbox("Saw/Noise");
inputSignal = (no.noise*switch) , (os.sawtooth(100)*(1-switch)) :> _;
process = inputSignal : ve.sallenKeyOnePoleHPF(normFreq) <:_,_;
|
|
a999d3f5ddba1161d82efc7ad3d2353bf938cf8117d230c87c8a369990bfacad | gabrielsanchez/faust-guitarix-sc37 | expander.dsp |
/* Expander unit. */
/* This is pretty much the same as compressor.dsp, but here the given ratio is
applied to *attenuate* levels *below* the threshold. */
declare name "Expander";
declare category "Guitar Effects";
declare description "expander unit";
declare author "Albert Graef";
declare version "1.0";
import("stdfaust.lib");
import("reduce.lib");
/* Controls. */
ratio = nentry("ratio", 2, 1, 20, 0.1);
threshold = nentry("threshold", -40, -96, 10, 0.1);
knee = nentry("knee", 3, 0, 20, 0.1);
attack = hslider("attack", 0.001, 0, 1, 0.001) : max(1/ma.SR);
release = hslider("release", 0.1, 0, 10, 0.01) : max(1/ma.SR);
t = 0.1;
g = exp(-1/(ma.SR*t));
env = abs : *(1-g) : + ~ *(g);
rms = sqr : *(1-g) : + ~ *(g) : sqrt;
sqr(x) = x*x;
env2(x) = max(env(x));
expand(env) = level*(1-r)
with {
level = env : h ~ _ : ba.linear2db : (threshold+knee-_) : max(0)
with {
h(x,y) = f*x+(1-f)*y with { f = (x<y)*ga+(x>=y)*gr; };
ga = exp(-1/(ma.SR*attack));
gr = exp(-1/(ma.SR*release));
};
p = level/(knee+eps) : max(0) : min(1) with { eps = 0.001; };
r = 1-p+p*ratio;
};
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
envelop = abs : max ~ (1.0/ma.SR) : reduce(max,4096); // : max(ba.db2linear(-70)) : ba.linear2db;
process(x) = (g(x)*x)
with {
g = env2(x) : expand : vmeter1 : ba.db2linear;
};
| https://raw.githubusercontent.com/gabrielsanchez/faust-guitarix-sc37/c0608695e24870abb56f7f0d1355cbf2f563ed30/Faust/expander.dsp | faust | Expander unit.
This is pretty much the same as compressor.dsp, but here the given ratio is
applied to *attenuate* levels *below* the threshold.
Controls.
: max(ba.db2linear(-70)) : ba.linear2db; |
declare name "Expander";
declare category "Guitar Effects";
declare description "expander unit";
declare author "Albert Graef";
declare version "1.0";
import("stdfaust.lib");
import("reduce.lib");
ratio = nentry("ratio", 2, 1, 20, 0.1);
threshold = nentry("threshold", -40, -96, 10, 0.1);
knee = nentry("knee", 3, 0, 20, 0.1);
attack = hslider("attack", 0.001, 0, 1, 0.001) : max(1/ma.SR);
release = hslider("release", 0.1, 0, 10, 0.01) : max(1/ma.SR);
t = 0.1;
g = exp(-1/(ma.SR*t));
env = abs : *(1-g) : + ~ *(g);
rms = sqr : *(1-g) : + ~ *(g) : sqrt;
sqr(x) = x*x;
env2(x) = max(env(x));
expand(env) = level*(1-r)
with {
level = env : h ~ _ : ba.linear2db : (threshold+knee-_) : max(0)
with {
h(x,y) = f*x+(1-f)*y with { f = (x<y)*ga+(x>=y)*gr; };
ga = exp(-1/(ma.SR*attack));
gr = exp(-1/(ma.SR*release));
};
p = level/(knee+eps) : max(0) : min(1) with { eps = 0.001; };
r = 1-p+p*ratio;
};
vmeter1(x) = attach(x, envelop(x) : vbargraph("v1[nomidi:no]", -70, +5));
process(x) = (g(x)*x)
with {
g = env2(x) : expand : vmeter1 : ba.db2linear;
};
|
f6010d633c3ebe1c023902b3f1770c8a6ae3d7aa9c268323ba71a1dcc9ff51af | rottingsounds/bitDSP-faust | lfsr.dsp | declare name "LFSR";
declare author "Till Bovermann";
declare description "linear feedback shift register example";
declare reference "http://rottingsounds.org";
// compute lfsr on an n-bit integer bitset (assuming it to be unsigned, [0 < n <= 32] ).
// see https://en.wikipedia.org/wiki/Linear-feedback_shift_register
import("stdfaust.lib");
bit32 = library("bitDSP_int32.lib");
// plot
// CXXFLAGS="-I ../include" faust2csvplot -I ../lib lfsr.dsp
// ./lfsr -n 10
// compile
// CXXFLAGS="-I ../../../include" faust2caqt -I ../lib lfsr.dsp
// // open lfsr.app
dac_bits = int(nentry("dac bits",1,1,32,1));
dac_offset = min(int(nentry("dac offset",0,0,31,1)), 32-dac_bits);
// how many bits the LFSR runs on (1-32)
lfsr_num_bits = int(nentry("lfsr bits",1,1,32,1));
// initial state of the LFSR as 32bit (!=0)
// change to reset LFSR to start with that new value
lfsr_init_state = nentry("init val",1,1,492000,1);
lfsr_parity_mask = bit32.bit_mask(
par(i,6,
nentry("parity source bit %i",i,0,31,1)
)
);
lfsr = (
bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state),
bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state + 1)
);
// select which bit range should be used to create the PCM signal
process = lfsr : par(i, outputs(lfsr), bit32.bitDAC(dac_offset, dac_bits));
| https://raw.githubusercontent.com/rottingsounds/bitDSP-faust/21cf36105c55b6e18969a867a319530a0ef1ea63/examples/lfsr.dsp | faust | compute lfsr on an n-bit integer bitset (assuming it to be unsigned, [0 < n <= 32] ).
see https://en.wikipedia.org/wiki/Linear-feedback_shift_register
plot
CXXFLAGS="-I ../include" faust2csvplot -I ../lib lfsr.dsp
./lfsr -n 10
compile
CXXFLAGS="-I ../../../include" faust2caqt -I ../lib lfsr.dsp
// open lfsr.app
how many bits the LFSR runs on (1-32)
initial state of the LFSR as 32bit (!=0)
change to reset LFSR to start with that new value
select which bit range should be used to create the PCM signal | declare name "LFSR";
declare author "Till Bovermann";
declare description "linear feedback shift register example";
declare reference "http://rottingsounds.org";
import("stdfaust.lib");
bit32 = library("bitDSP_int32.lib");
dac_bits = int(nentry("dac bits",1,1,32,1));
dac_offset = min(int(nentry("dac offset",0,0,31,1)), 32-dac_bits);
lfsr_num_bits = int(nentry("lfsr bits",1,1,32,1));
lfsr_init_state = nentry("init val",1,1,492000,1);
lfsr_parity_mask = bit32.bit_mask(
par(i,6,
nentry("parity source bit %i",i,0,31,1)
)
);
lfsr = (
bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state),
bit32.lfsr(lfsr_num_bits, lfsr_parity_mask, lfsr_init_state + 1)
);
process = lfsr : par(i, outputs(lfsr), bit32.bitDAC(dac_offset, dac_bits));
|
d67ce2c08df4fe4971b8656e14c4f4176c861d659021fc14906efdd97b8b1950 | RuolunWeng/ruolunweng.github.io | SModulation1.dsp | declare name "Modulation 1";
declare author "ER";
import("stdfaust.lib");
instrument = library("instruments.lib");
/* =========== DESCRIPTION ==============
- Non Linear Filter Modulators applied to a sinewave
- Head = Silence/Higher Frequencies
- Bottom = Lower Frequencies
- Right = No modulation
- Left = Modulation n°1
*/
//======================== INSTRUMENT =============================
process = vgroup("NLFM",oscil : NLFM1 : fi.lowpass(1,2000) *(0.6)*(vol));
NLFM1 = _ : instrument.nonLinearModulator((nonlinearity:si.smooth(0.999)),env,freq,typeMod,freqMod,nlfOrder) : _;
oscil = os.osc(freq);
//======================== GUI SPECIFICATIONS =====================
freq = hslider("[2]Frequency [unit:Hz][acc:1 1 -10 0 15]", 330, 100, 1200, 0.1):si.smooth(0.999);
vol = (hslider("[3]Volume[style:knob][acc:1 0 -10 0 10]", 0.5, 0, 1, 0.01)^2):si.smooth(0.999);
//------------------------ NLFM PARAMETERS ------------------------
nlfOrder = 6;
nonlinearity = 0.8;
typeMod = 1;
freqMod = hslider("[4]Modulating Frequency[style:knob][unit:Hz][acc:0 0 -10 0 10]", 1200, 900, 1700, 0.1):si.smooth(0.999);
env = ASR;
ASR = en.asr(a,s,r,t);
a = 3;
s = 1;
r = 2;
t = gate;
gate = hslider("[1]Modulation Type 1[tooltip:noteOn = 1, noteOff = 0][acc:0 0 -30 0 5]", 0,0,1,1);
| https://raw.githubusercontent.com/RuolunWeng/ruolunweng.github.io/035564bb7e36eb4e810ca80077ffa8a9d3e5130b/faustplayground/faust-modules/generators/SModulation1.dsp | faust | =========== DESCRIPTION ==============
- Non Linear Filter Modulators applied to a sinewave
- Head = Silence/Higher Frequencies
- Bottom = Lower Frequencies
- Right = No modulation
- Left = Modulation n°1
======================== INSTRUMENT =============================
======================== GUI SPECIFICATIONS =====================
------------------------ NLFM PARAMETERS ------------------------ | declare name "Modulation 1";
declare author "ER";
import("stdfaust.lib");
instrument = library("instruments.lib");
process = vgroup("NLFM",oscil : NLFM1 : fi.lowpass(1,2000) *(0.6)*(vol));
NLFM1 = _ : instrument.nonLinearModulator((nonlinearity:si.smooth(0.999)),env,freq,typeMod,freqMod,nlfOrder) : _;
oscil = os.osc(freq);
freq = hslider("[2]Frequency [unit:Hz][acc:1 1 -10 0 15]", 330, 100, 1200, 0.1):si.smooth(0.999);
vol = (hslider("[3]Volume[style:knob][acc:1 0 -10 0 10]", 0.5, 0, 1, 0.01)^2):si.smooth(0.999);
nlfOrder = 6;
nonlinearity = 0.8;
typeMod = 1;
freqMod = hslider("[4]Modulating Frequency[style:knob][unit:Hz][acc:0 0 -10 0 10]", 1200, 900, 1700, 0.1):si.smooth(0.999);
env = ASR;
ASR = en.asr(a,s,r,t);
a = 3;
s = 1;
r = 2;
t = gate;
gate = hslider("[1]Modulation Type 1[tooltip:noteOn = 1, noteOff = 0][acc:0 0 -30 0 5]", 0,0,1,1);
|
867f9644d6704bd945f1701edc7e1b433b460db6220915a98ce715a6245aa53e | RuolunWeng/ruolunweng.github.io | SModulation3.dsp | declare name "Modulation 3";
declare author "ER";
import("stdfaust.lib");
instrument = library("instruments.lib");
/* =========== DESCRIPTION ==============
- Non Linear Filter Modulators applied to a sinewave
- Head = Silence/Higher Frequencies/No modulation
- Bottom = Lower Frequencies/ Modulation n°3
- Rocking = Modulating Frequency (low to high)
*/
//======================== INSTRUMENT =============================
process = vgroup("NLFMs",oscil : NLFM3 : fi.lowpass(1,2000) *(0.6)*(vol));
NLFM3 = _ : instrument.nonLinearModulator((nonlinearity:si.smooth(0.999)),env,freq,typeMod,freqMod,nlfOrder) : _;
oscil = os.osci(freq);
//======================== GUI SPECIFICATIONS =====================
freq = hslider("[2]Frequency [unit:Hz][acc:1 1 -10 0 15]", 330, 100, 1200, 0.1):si.smooth(0.999);
freqMod = hslider("[4]Modulating Frequency[style:knob][unit:Hz][acc:0 0 -10 0 10]", 1200, 900, 1700, 0.1):si.smooth(0.999);
vol = (hslider("[3]Volume[style:knob][acc:1 0 -10 0 10]", 0.5, 0, 1, 0.01)^2):si.smooth(0.999);
//------------------------ NLFM PARAMETERS ------------------------
nlfOrder = 6;
nonlinearity = 0.8;
typeMod = 3;
env = ASR;
ASR = en.asr(a,s,r,t);
a = 3;
s = 1;
r = 2;
t = gate;
gate = hslider("[1]Modulation Type 3[acc:1 0 -10 0 10]", 0,0,1,1);
| https://raw.githubusercontent.com/RuolunWeng/ruolunweng.github.io/035564bb7e36eb4e810ca80077ffa8a9d3e5130b/faustplayground/faust-modules/generators/SModulation3.dsp | faust | =========== DESCRIPTION ==============
- Non Linear Filter Modulators applied to a sinewave
- Head = Silence/Higher Frequencies/No modulation
- Bottom = Lower Frequencies/ Modulation n°3
- Rocking = Modulating Frequency (low to high)
======================== INSTRUMENT =============================
======================== GUI SPECIFICATIONS =====================
------------------------ NLFM PARAMETERS ------------------------ | declare name "Modulation 3";
declare author "ER";
import("stdfaust.lib");
instrument = library("instruments.lib");
process = vgroup("NLFMs",oscil : NLFM3 : fi.lowpass(1,2000) *(0.6)*(vol));
NLFM3 = _ : instrument.nonLinearModulator((nonlinearity:si.smooth(0.999)),env,freq,typeMod,freqMod,nlfOrder) : _;
oscil = os.osci(freq);
freq = hslider("[2]Frequency [unit:Hz][acc:1 1 -10 0 15]", 330, 100, 1200, 0.1):si.smooth(0.999);
freqMod = hslider("[4]Modulating Frequency[style:knob][unit:Hz][acc:0 0 -10 0 10]", 1200, 900, 1700, 0.1):si.smooth(0.999);
vol = (hslider("[3]Volume[style:knob][acc:1 0 -10 0 10]", 0.5, 0, 1, 0.01)^2):si.smooth(0.999);
nlfOrder = 6;
nonlinearity = 0.8;
typeMod = 3;
env = ASR;
ASR = en.asr(a,s,r,t);
a = 3;
s = 1;
r = 2;
t = gate;
gate = hslider("[1]Modulation Type 3[acc:1 0 -10 0 10]", 0,0,1,1);
|
49ff82e09c9bb393ee2b017b992c89a52af5aa027c8a2b0e0aeab08a3fbea61f | CesarChaussinand/GramoCollection | basseBourdonnante.dsp | declare name "Basse bourdonnante";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = os.triangle(bourdon)+os.square(freq):fi.resonlp(fcut,3,vol):ef.cubicnl(0,0);
bourdon = hslider("fréquence du bourdon[knob:2]",55,30,60,1):qu.quantize(110,qu.eolian);
freq = hslider("fréquence[acc: 0 0 -9 0 9]",80,55,130,1):qu.quantize(110,qu.eolian);
fcut = hslider("fréquence de coupure du filtre[acc:1 0 -9 0 9]", 200,100,500,1);
vol = button("gate[switch:1]"):en.asr(0.1,1,0.1);
| https://raw.githubusercontent.com/CesarChaussinand/GramoCollection/58f63f2fdb1fe4d01b4e0416d3a0c14639a347f2/basseBourdonnante.dsp | faust | declare name "Basse bourdonnante";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = os.triangle(bourdon)+os.square(freq):fi.resonlp(fcut,3,vol):ef.cubicnl(0,0);
bourdon = hslider("fréquence du bourdon[knob:2]",55,30,60,1):qu.quantize(110,qu.eolian);
freq = hslider("fréquence[acc: 0 0 -9 0 9]",80,55,130,1):qu.quantize(110,qu.eolian);
fcut = hslider("fréquence de coupure du filtre[acc:1 0 -9 0 9]", 200,100,500,1);
vol = button("gate[switch:1]"):en.asr(0.1,1,0.1);
|
|
03288edd1f8ef8571868968b85a10a2f9313e13ef22c014deba1b56b0e0f6bd0 | CesarChaussinand/GramoCollection | alarmeFiltree.dsp | declare name "Alarme filtrée";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = os.sawtooth(freq*lfo) : fi.resonlp(frcut,4,env) : ef.cubicnl(0,0);
lfo = 1.25 + (os.osc(rate)>=0)*0.25;
freq = hslider("fréquence de base[acc:0 0 -9 0 9]",270,180,360,1):qu.quantize(110,qu.eolian) * env;
rate = hslider("vitesse de l'oscillation[knob:2]",5,1,20,1);
frcut = hslider("frequence filtre[acc:1 0 -9 0 9]",500,100,2000,1)*(1+env);
env = button("trig[switch:1]"):en.asr(0.25,1,0.1);
| https://raw.githubusercontent.com/CesarChaussinand/GramoCollection/58f63f2fdb1fe4d01b4e0416d3a0c14639a347f2/alarmeFiltree.dsp | faust | declare name "Alarme filtrée";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = os.sawtooth(freq*lfo) : fi.resonlp(frcut,4,env) : ef.cubicnl(0,0);
lfo = 1.25 + (os.osc(rate)>=0)*0.25;
freq = hslider("fréquence de base[acc:0 0 -9 0 9]",270,180,360,1):qu.quantize(110,qu.eolian) * env;
rate = hslider("vitesse de l'oscillation[knob:2]",5,1,20,1);
frcut = hslider("frequence filtre[acc:1 0 -9 0 9]",500,100,2000,1)*(1+env);
env = button("trig[switch:1]"):en.asr(0.25,1,0.1);
|
|
e5b654d84d8b3ea88565871c625130b26926f64ca6456ffd5b144ff3fb89c795 | CesarChaussinand/GramoCollection | harmoniesSombres.dsp | declare name "Harmonies sombres";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = os.osc(freq1),os.osc(freq2),os.osc(freq3) :> _ *env : ef.cubicnl(0,0);
freq1 = hslider("fréquence 1[knob:2]",120,80,160,1):qu.quantize(220,qu.eolian);
freq2 = hslider("fréquence 2[acc: 0 0 -9 0 9]",180,120,240,1):qu.quantize(220,qu.eolian);
freq3 = hslider("fréquence 3[acc: 1 0 -9 0 9]",320,180,360,1):qu.quantize(220,qu.eolian);
env = button("trig[switch:1]"):en.asr(0.1,0.35,0.5);
| https://raw.githubusercontent.com/CesarChaussinand/GramoCollection/58f63f2fdb1fe4d01b4e0416d3a0c14639a347f2/harmoniesSombres.dsp | faust | declare name "Harmonies sombres";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = os.osc(freq1),os.osc(freq2),os.osc(freq3) :> _ *env : ef.cubicnl(0,0);
freq1 = hslider("fréquence 1[knob:2]",120,80,160,1):qu.quantize(220,qu.eolian);
freq2 = hslider("fréquence 2[acc: 0 0 -9 0 9]",180,120,240,1):qu.quantize(220,qu.eolian);
freq3 = hslider("fréquence 3[acc: 1 0 -9 0 9]",320,180,360,1):qu.quantize(220,qu.eolian);
env = button("trig[switch:1]"):en.asr(0.1,0.35,0.5);
|
|
e776f6c4408d182cb04ee580ddf49506f5c5ae96203f0f1898685de17848c37e | levinericzimmermann/oT2kb | multiguitar.dsp | declare name "multiguitar";
declare version "1.0";
declare author "Levin Eric Zimmermann";
declare options "[midi:on][nvoices:16]";
//-----------------------------------------------
// Odd guitar
//-----------------------------------------------
import("stdfaust.lib");
baseFreq = 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 = bend * baseFreq;
impulseGate = ba.impulsify(gate);
scale(value, old_min, old_max, new_min, new_max) = new_value
with {
old_range = old_max - old_min;
new_range = new_max - new_min;
percentage = (value - old_min) * old_range;
new_value = (percentage * new_range) + new_min;
};
oddGuitar(
freqFactor,
minDelayLength,
maxDelayLength,
delayModulationFrequency,
guitarModelTypeLfoFrequency,
pluckPositionLfoRate,
minimalGain,
nModes,
bodySizeLfoFrequency,
bodyFormLfoFrequency,
freqEnvelopeDurationLfoFrequency
) = filteredGuitar
with {
envelopeDuration = (no.lfnoise0(freqEnvelopeDurationLfoFrequency) + 1) * 0.5 * 0.23;
freqEnvelope = (en.asr(envelopeDuration, 1, 0, gate) * 0.06) + 0.94;
adjustedFreqEnvelope = 1, freqEnvelope : select2(gate);
stringLength = pm.f2l(freqFactor * freq * adjustedFreqEnvelope);
sharpness = scale(gain, 0, 1, 0.5, 1);
pluck = pm.pluckString(stringLength, 1, 1.5, sharpness, gain, gate);
// pluckPosition = (no.lfnoise0(pluckPositionLfoRate) + 1) * 0.5 : ba.sAndH(impulseGate);
// pluckPosition = (no.lfnoise0(pluckPositionLfoRate) + 1) * 0.5;
pluckPosition = 0.5;
strings = pluck <:
pm.nylonGuitarModel(stringLength, pluckPosition),
pm.elecGuitarModel(stringLength, pluckPosition, 1);
stringSelectorLfo = 0.5 * (os.lf_triangle(guitarModelTypeLfoFrequency) + 1);
string = strings : _ * stringSelectorLfo, _ * abs(1 - stringSelectorLfo) :> _;
maxDelayLengthAsSamples = int(ma.SR * maxDelayLength);
delayLength = (
(os.lf_triangle(delayModulationFrequency) + 1) *
0.5 *
(maxDelayLength - minDelayLength)) +
minDelayLength;
delayLengthAsSamples = int(ma.SR * delayLength);
guitarString = string : de.sdelay(maxDelayLengthAsSamples, 1024, delayLengthAsSamples);
// bodySize = (os.lf_triangle(bodySizeLfoFrequency) + 1) * 1;
// bodyForm = (os.lf_triangle(bodyFormLfoFrequency) + 1) * 1;
// guitar = guitarString : pm.modeInterpRes(nModes, bodyForm, bodySize);
// filteredGuitar= 0, guitar : select2(gain >= minimalGain);
filteredGuitar= 0, guitarString : select2(gain >= minimalGain);
};
strings = (oddGuitar(1, 0, 0.001, 0.001, 0.312, 11, 0, 32, 0.1032, 0.10842, 7) * 0.5) +
// (oddGuitar(1.0001, 0.08, 0.192, 0.02, 0.12, 23, 0.12, 20, 0.232, 0.2832, 23) * 0.24) +
(oddGuitar(2, 0.03, 0.214, 0.01, 0.12, 13, 0.2, 20, 0.232, 0.2832, 33) * 0.25);
// (oddGuitar(0.5, 0.1, 0.21, 0.009242, 0.132, 17, 0.22, 27, 0.072, 0.098, 19) * 0.15);
bodySize = (os.lf_triangle(0.22) + 1) * 1;
bodyForm = (os.lf_triangle(0.292) + 1) * 1;
marimba = pm.marimba(freq, 1, 2000, 0.15, gain, gate);
instruments = strings : pm.modeInterpRes(25, bodyForm, bodySize) : (_ * 0.5) + (strings * 0.3);
firstHarmonic = os.osc(freq);
secondHarmonic = os.osc(freq * 2) * 0.5;
thirdHarmonic = os.osc(freq * 2) * 0.2;
harmonicsEnvelope = en.asr(0.35, 1, 1.2, gate);
harmonics = firstHarmonic + secondHarmonic + thirdHarmonic : _ * harmonicsEnvelope * gain * 0.0185;
guitarEnvelope = en.asr(0.0001, 1, 2, gate);
attack = no.noise : _ * en.ar(0.0008, 0.001, gate) * 0.06 * gain : fi.bandpass(4, 40, 8000);
process = (instruments * guitarEnvelope) + harmonics + attack <: _, _;
effect = dm.greyhole_demo;
| https://raw.githubusercontent.com/levinericzimmermann/oT2kb/202685282c585def5e62791ff784196e127e910a/src/multiguitar.dsp | faust | -----------------------------------------------
Odd guitar
-----------------------------------------------
pluckPosition = (no.lfnoise0(pluckPositionLfoRate) + 1) * 0.5 : ba.sAndH(impulseGate);
pluckPosition = (no.lfnoise0(pluckPositionLfoRate) + 1) * 0.5;
bodySize = (os.lf_triangle(bodySizeLfoFrequency) + 1) * 1;
bodyForm = (os.lf_triangle(bodyFormLfoFrequency) + 1) * 1;
guitar = guitarString : pm.modeInterpRes(nModes, bodyForm, bodySize);
filteredGuitar= 0, guitar : select2(gain >= minimalGain);
(oddGuitar(1.0001, 0.08, 0.192, 0.02, 0.12, 23, 0.12, 20, 0.232, 0.2832, 23) * 0.24) +
(oddGuitar(0.5, 0.1, 0.21, 0.009242, 0.132, 17, 0.22, 27, 0.072, 0.098, 19) * 0.15); | declare name "multiguitar";
declare version "1.0";
declare author "Levin Eric Zimmermann";
declare options "[midi:on][nvoices:16]";
import("stdfaust.lib");
baseFreq = 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 = bend * baseFreq;
impulseGate = ba.impulsify(gate);
scale(value, old_min, old_max, new_min, new_max) = new_value
with {
old_range = old_max - old_min;
new_range = new_max - new_min;
percentage = (value - old_min) * old_range;
new_value = (percentage * new_range) + new_min;
};
oddGuitar(
freqFactor,
minDelayLength,
maxDelayLength,
delayModulationFrequency,
guitarModelTypeLfoFrequency,
pluckPositionLfoRate,
minimalGain,
nModes,
bodySizeLfoFrequency,
bodyFormLfoFrequency,
freqEnvelopeDurationLfoFrequency
) = filteredGuitar
with {
envelopeDuration = (no.lfnoise0(freqEnvelopeDurationLfoFrequency) + 1) * 0.5 * 0.23;
freqEnvelope = (en.asr(envelopeDuration, 1, 0, gate) * 0.06) + 0.94;
adjustedFreqEnvelope = 1, freqEnvelope : select2(gate);
stringLength = pm.f2l(freqFactor * freq * adjustedFreqEnvelope);
sharpness = scale(gain, 0, 1, 0.5, 1);
pluck = pm.pluckString(stringLength, 1, 1.5, sharpness, gain, gate);
pluckPosition = 0.5;
strings = pluck <:
pm.nylonGuitarModel(stringLength, pluckPosition),
pm.elecGuitarModel(stringLength, pluckPosition, 1);
stringSelectorLfo = 0.5 * (os.lf_triangle(guitarModelTypeLfoFrequency) + 1);
string = strings : _ * stringSelectorLfo, _ * abs(1 - stringSelectorLfo) :> _;
maxDelayLengthAsSamples = int(ma.SR * maxDelayLength);
delayLength = (
(os.lf_triangle(delayModulationFrequency) + 1) *
0.5 *
(maxDelayLength - minDelayLength)) +
minDelayLength;
delayLengthAsSamples = int(ma.SR * delayLength);
guitarString = string : de.sdelay(maxDelayLengthAsSamples, 1024, delayLengthAsSamples);
filteredGuitar= 0, guitarString : select2(gain >= minimalGain);
};
strings = (oddGuitar(1, 0, 0.001, 0.001, 0.312, 11, 0, 32, 0.1032, 0.10842, 7) * 0.5) +
(oddGuitar(2, 0.03, 0.214, 0.01, 0.12, 13, 0.2, 20, 0.232, 0.2832, 33) * 0.25);
bodySize = (os.lf_triangle(0.22) + 1) * 1;
bodyForm = (os.lf_triangle(0.292) + 1) * 1;
marimba = pm.marimba(freq, 1, 2000, 0.15, gain, gate);
instruments = strings : pm.modeInterpRes(25, bodyForm, bodySize) : (_ * 0.5) + (strings * 0.3);
firstHarmonic = os.osc(freq);
secondHarmonic = os.osc(freq * 2) * 0.5;
thirdHarmonic = os.osc(freq * 2) * 0.2;
harmonicsEnvelope = en.asr(0.35, 1, 1.2, gate);
harmonics = firstHarmonic + secondHarmonic + thirdHarmonic : _ * harmonicsEnvelope * gain * 0.0185;
guitarEnvelope = en.asr(0.0001, 1, 2, gate);
attack = no.noise : _ * en.ar(0.0008, 0.001, gate) * 0.06 * gain : fi.bandpass(4, 40, 8000);
process = (instruments * guitarEnvelope) + harmonics + attack <: _, _;
effect = dm.greyhole_demo;
|
0f8964633b2060415be0c78bb1fad78ee61377a4bf8cce1bec0eee30342eeccf | friskgit/kmh_ls | KMHLS_channel_map.dsp | declare name "KMHLS ChannelMap - 29+16+4";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
//---------------`Channel mapping plugin` --------------------------
//
// Channel mapping plugin that takes 52 inputs, although only the 49 first channels are routed.
// These are routed to the Crescendo mixer channel layout.
//
// Insert this plugin on the master track or similar to get channels to map correctly to the Crescendo, i.e.:
//
// * Channel 1-29 of the input maps to Crescendo 1-29 (Layer A)
// * Channel 30-45 of the input maps to Crescendo 33-48 (Layer B)
// * Channel 46-49 maps to Crescendo 49-52 (Layer B)
//---------------------------------------------------
import("stdfaust.lib");
domevol = hslider("Volume dome", 1., 0., 1., 0.001) : si.smoo;
floorvol = hslider("Volume floor", 1., 0., 1., 0.001) : si.smoo;
bassvol = hslider("Volume bass", 1., 0., 1., 0.001) : si.smoo;
process ( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16,
b1, b2, b3, b4, b5, b6, b7, b8,
c1, c2, c3, c4, c5,
d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16,
sub1, sub2, sub3, sub4, x1, x2, x3) = a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16,
b1, b2, b3, b4, b5, b6, b7, b8,
c1, c2, c3, c4, c5, 0, 0, 0,
d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16,
sub1, sub2, sub3, sub4
: hgroup("lower ring", par(i, 29, _ * domevol)), _, _, _,
hgroup("floor ring", par(i, 16, _ * floorvol)),
hgroup("subs", par(i, 4, _ * bassvol));
| https://raw.githubusercontent.com/friskgit/kmh_ls/3273d90bee62a0200a96166b6f690705a3e82fcc/KMHLS_utility/src/KMHLS_channel_map.dsp | faust | ---------------`Channel mapping plugin` --------------------------
Channel mapping plugin that takes 52 inputs, although only the 49 first channels are routed.
These are routed to the Crescendo mixer channel layout.
Insert this plugin on the master track or similar to get channels to map correctly to the Crescendo, i.e.:
* Channel 1-29 of the input maps to Crescendo 1-29 (Layer A)
* Channel 30-45 of the input maps to Crescendo 33-48 (Layer B)
* Channel 46-49 maps to Crescendo 49-52 (Layer B)
--------------------------------------------------- | declare name "KMHLS ChannelMap - 29+16+4";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
import("stdfaust.lib");
domevol = hslider("Volume dome", 1., 0., 1., 0.001) : si.smoo;
floorvol = hslider("Volume floor", 1., 0., 1., 0.001) : si.smoo;
bassvol = hslider("Volume bass", 1., 0., 1., 0.001) : si.smoo;
process ( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16,
b1, b2, b3, b4, b5, b6, b7, b8,
c1, c2, c3, c4, c5,
d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16,
sub1, sub2, sub3, sub4, x1, x2, x3) = a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16,
b1, b2, b3, b4, b5, b6, b7, b8,
c1, c2, c3, c4, c5, 0, 0, 0,
d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16,
sub1, sub2, sub3, sub4
: hgroup("lower ring", par(i, 29, _ * domevol)), _, _, _,
hgroup("floor ring", par(i, 16, _ * floorvol)),
hgroup("subs", par(i, 4, _ * bassvol));
|
c56c89ab0737afa090c9f173b2b77884458e5aa89381637c413caa622ee7e6a8 | friskgit/kmh_ls | KMHLS_channel_map.dsp | declare name "KMHLSChannelMap 29+16+4";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
//---------------`Channel mapping plugin` --------------------------
//
// Channel mapping plugin that takes 52 inputs, although only the 49 first channels are routed.
// these are routed to the Crescendo mixer channel layout.
//
// Insert this plugin on the master track or similar to get channels to map correctly to the Crescendo, i.e.:
//
// * Channel 1-29 of the input maps to Crescendo 1-29 (Layer A)
// * Channel 30-45 of the input maps to Crescendo 33-48 (Layer B)
// * Channel 46-49 maps to Crescendo 49-52 (Layer B)
//---------------------------------------------------
import("stdfaust.lib");
domevol = hslider("Volume dome", 1., 0., 1., 0.001) : si.smoo;
floorvol = hslider("Volume floor", 1., 0., 1., 0.001) : si.smoo;
bassvol = hslider("Volume bass", 1., 0., 1., 0.001) : si.smoo;
process ( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16,
b1, b2, b3, b4, b5, b6, b7, b8,
c1, c2, c3, c4, c5,
d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16,
sub1, sub2, sub3, sub4, x1, x2, x3) = a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16,
b1, b2, b3, b4, b5, b6, b7, b8,
c1, c2, c3, c4, c5, 0, 0, 0,
d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16,
sub1, sub2, sub3, sub4
: hgroup("lower ring", par(i, 29, _ * domevol)), _, _, _,
hgroup("floor ring", par(i, 16, _ * floorvol)),
hgroup("subs", par(i, 4, _ * bassvol));
| https://raw.githubusercontent.com/friskgit/kmh_ls/3273d90bee62a0200a96166b6f690705a3e82fcc/KMHLS_utility/doc/KMHLS_channel_map-mdoc/src/KMHLS_channel_map.dsp | faust | ---------------`Channel mapping plugin` --------------------------
Channel mapping plugin that takes 52 inputs, although only the 49 first channels are routed.
these are routed to the Crescendo mixer channel layout.
Insert this plugin on the master track or similar to get channels to map correctly to the Crescendo, i.e.:
* Channel 1-29 of the input maps to Crescendo 1-29 (Layer A)
* Channel 30-45 of the input maps to Crescendo 33-48 (Layer B)
* Channel 46-49 maps to Crescendo 49-52 (Layer B)
--------------------------------------------------- | declare name "KMHLSChannelMap 29+16+4";
declare version " 0.1 ";
declare author " Henrik Frisk " ;
declare license " BSD ";
declare copyright "(c) dinergy 2018 ";
import("stdfaust.lib");
domevol = hslider("Volume dome", 1., 0., 1., 0.001) : si.smoo;
floorvol = hslider("Volume floor", 1., 0., 1., 0.001) : si.smoo;
bassvol = hslider("Volume bass", 1., 0., 1., 0.001) : si.smoo;
process ( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16,
b1, b2, b3, b4, b5, b6, b7, b8,
c1, c2, c3, c4, c5,
d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16,
sub1, sub2, sub3, sub4, x1, x2, x3) = a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16,
b1, b2, b3, b4, b5, b6, b7, b8,
c1, c2, c3, c4, c5, 0, 0, 0,
d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15, d16,
sub1, sub2, sub3, sub4
: hgroup("lower ring", par(i, 29, _ * domevol)), _, _, _,
hgroup("floor ring", par(i, 16, _ * floorvol)),
hgroup("subs", par(i, 4, _ * bassvol));
|
b8db2bc08e5db857196c804baaaf55d09a74204fbdf6e4163017c99628be9cdb | olegkapitonov/Kapitonov-Plugins-Pack | kpp_octaver.dsp | /*
* Copyright (C) 2018-2020 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
*/
/*
* This plugin is an octaver pedal emulator.
* Model of analog octaver.
*
* Process:
*
* Extract 1-st harmonics,
* convert to squire form,
* divide it's frequency by 2 and by 4,
* modulate input with this signals.
*
* Creates 2 additional tones - 1 and 2 octaves below.
*/
declare name "kpp_octaver";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "1.1";
import("stdfaust.lib");
process = output with {
level_d1 = ba.db2linear(-20 + vslider("octave1",0,0,30,0.01));
level_d2 = ba.db2linear(-20 + vslider("octave2",0,0,30,0.01));
level_dry = ba.db2linear(-30 + vslider("dry",30,0,30,0.01));
cutoff_freq = vslider("cutoff frequency",160,100,200,0.1);
// Extract 1-st harmonics
pre_filter = fi.dcblocker : fi.lowpass(3, 80) : fi.peak_eq(30, 100, 80) :
fi.peak_eq(20, 440, 200);
// Convert to squire form (Shmitt trigger)
distortion = (+ : co.compressor_mono(100, -80, 0.1, 0.1) :
ma.signum : max(-0.0000001) : min(0.0000001)) ~ _;
octaver = distortion : fi.zero(1) : max(0.0) : ma.signum : *(-2.0) : +(1.0) :
(* : +(0.1) : *(10000.0) : max(-1.0) : min(1.0)) ~ _ :
max(0.0) : min(1.0);
// Divide 1-st harmonics by 2 - 1 octave below
down1 = _ <: fi.highpass(1,260) ,(pre_filter : octaver) : * :
fi.lowpass(3, cutoff_freq) : fi.highpass(3, 40) : fi.highpass(1, 80);
// Divide by 4 - 2 octaves below
down2 = _ <: fi.highpass(5,240) ,(pre_filter : octaver : -(0.5) : octaver) : * :
fi.lowpass(3, cutoff_freq / 2.0);
// Modulate input signal
stomp = _ <: down1,down2 : *(level_d1),*(level_d2) :
+ : *(2.0) : fi.dcblocker;
output = _ <: *(level_dry), stomp : + : _;
};
| https://raw.githubusercontent.com/olegkapitonov/Kapitonov-Plugins-Pack/ed4541172d53ecf04bad43cd583365f278ccf176/LADSPA/kpp_octaver/kpp_octaver.dsp | faust |
* Copyright (C) 2018-2020 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
* This plugin is an octaver pedal emulator.
* Model of analog octaver.
*
* Process:
*
* Extract 1-st harmonics,
* convert to squire form,
* divide it's frequency by 2 and by 4,
* modulate input with this signals.
*
* Creates 2 additional tones - 1 and 2 octaves below.
Extract 1-st harmonics
Convert to squire form (Shmitt trigger)
Divide 1-st harmonics by 2 - 1 octave below
Divide by 4 - 2 octaves below
Modulate input signal |
declare name "kpp_octaver";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "1.1";
import("stdfaust.lib");
process = output with {
level_d1 = ba.db2linear(-20 + vslider("octave1",0,0,30,0.01));
level_d2 = ba.db2linear(-20 + vslider("octave2",0,0,30,0.01));
level_dry = ba.db2linear(-30 + vslider("dry",30,0,30,0.01));
cutoff_freq = vslider("cutoff frequency",160,100,200,0.1);
pre_filter = fi.dcblocker : fi.lowpass(3, 80) : fi.peak_eq(30, 100, 80) :
fi.peak_eq(20, 440, 200);
distortion = (+ : co.compressor_mono(100, -80, 0.1, 0.1) :
ma.signum : max(-0.0000001) : min(0.0000001)) ~ _;
octaver = distortion : fi.zero(1) : max(0.0) : ma.signum : *(-2.0) : +(1.0) :
(* : +(0.1) : *(10000.0) : max(-1.0) : min(1.0)) ~ _ :
max(0.0) : min(1.0);
down1 = _ <: fi.highpass(1,260) ,(pre_filter : octaver) : * :
fi.lowpass(3, cutoff_freq) : fi.highpass(3, 40) : fi.highpass(1, 80);
down2 = _ <: fi.highpass(5,240) ,(pre_filter : octaver : -(0.5) : octaver) : * :
fi.lowpass(3, cutoff_freq / 2.0);
stomp = _ <: down1,down2 : *(level_d1),*(level_d2) :
+ : *(2.0) : fi.dcblocker;
output = _ <: *(level_dry), stomp : + : _;
};
|
2091805f10747250ec7cb7904e2b85a4ba8072bb9e787f79f6c2d802783c3f65 | olegkapitonov/Kapitonov-Plugins-Pack | kpp_deadgate.dsp | /*
* Copyright (C) 2018-2020 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
*/
/*
* This pugin is effective noise gate.
*
* Process chain:
*
* input->deadzone->multigate->output
*
* deadzone - INSTANTLY eliminates the signal below the threshold level.
* This kills noise in pauses but distorts the signal around zero level.
*
* multigate - 7-band noise gate. The input signal is divided into 7 frequency bands.
* In each band, the signal is eliminated when falling below the
* threshold level with attack time 10 ms, hold time 100 ms, release
* time 20 ms.
*
*/
declare name "kpp_deadgate";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "1.1";
import("stdfaust.lib");
process = output with {
deadzone_knob = ba.db2linear(vslider("Dead Zone", -120, -120, 0, 0.001));
noizegate_knob = vslider("Noise Gate", -120, -120, 0, 0.001);
deadzone = _ <: (max(deadzone_knob) : -(deadzone_knob)),
(min(-deadzone_knob) : +(deadzone_knob)) : + ;
multigate = _ : fi.filterbank(3, (65, 150, 300, 600, 1200, 2400)) :
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02) :> _;
output = _ : fi.highpass(1,10) : deadzone : multigate :
*(ba.db2linear(-6.0)) : _ ;
};
| https://raw.githubusercontent.com/olegkapitonov/Kapitonov-Plugins-Pack/ed4541172d53ecf04bad43cd583365f278ccf176/LADSPA/kpp_deadgate/kpp_deadgate.dsp | faust |
* Copyright (C) 2018-2020 Oleg Kapitonov
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* --------------------------------------------------------------------------
* This pugin is effective noise gate.
*
* Process chain:
*
* input->deadzone->multigate->output
*
* deadzone - INSTANTLY eliminates the signal below the threshold level.
* This kills noise in pauses but distorts the signal around zero level.
*
* multigate - 7-band noise gate. The input signal is divided into 7 frequency bands.
* In each band, the signal is eliminated when falling below the
* threshold level with attack time 10 ms, hold time 100 ms, release
* time 20 ms.
*
|
declare name "kpp_deadgate";
declare author "Oleg Kapitonov";
declare license "GPLv3";
declare version "1.1";
import("stdfaust.lib");
process = output with {
deadzone_knob = ba.db2linear(vslider("Dead Zone", -120, -120, 0, 0.001));
noizegate_knob = vslider("Noise Gate", -120, -120, 0, 0.001);
deadzone = _ <: (max(deadzone_knob) : -(deadzone_knob)),
(min(-deadzone_knob) : +(deadzone_knob)) : + ;
multigate = _ : fi.filterbank(3, (65, 150, 300, 600, 1200, 2400)) :
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02),
ef.gate_mono(noizegate_knob, 0.01, 0.02, 0.02) :> _;
output = _ : fi.highpass(1,10) : deadzone : multigate :
*(ba.db2linear(-6.0)) : _ ;
};
|
69e9948d6441c28f20de6585615dc02d21e99a4496f8ec668caec0c5c352fa0e | CesarChaussinand/GramoCollection | basseVibrante.dsp | declare name "Basse vibrante";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = os.sawtooth(freq * vib) : fi.resonlp(env*300+100,5,env) : hardClip(clip);
hardClip(l) = min(l,max(-l,_));
freq = hslider("freq[acc: 0 0 -9 0 9]",80,50,150,1):qu.quantize(220,qu.eolian):si.smoo;
vib = (100+os.osc(rate)*depth)/100;
rate = 4+0.3*depth;
depth = hslider("vibrato depth[acc: 1 0 -9 0 9]",0,0,6,0.1);
env = button("note[switch:1]"):en.adsr(0.1,0,1,0.1);
clip = hslider("clip level[knob:2]",0.5,0,1,0.01);
| https://raw.githubusercontent.com/CesarChaussinand/GramoCollection/58f63f2fdb1fe4d01b4e0416d3a0c14639a347f2/basseVibrante.dsp | faust | declare name "Basse vibrante";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = os.sawtooth(freq * vib) : fi.resonlp(env*300+100,5,env) : hardClip(clip);
hardClip(l) = min(l,max(-l,_));
freq = hslider("freq[acc: 0 0 -9 0 9]",80,50,150,1):qu.quantize(220,qu.eolian):si.smoo;
vib = (100+os.osc(rate)*depth)/100;
rate = 4+0.3*depth;
depth = hslider("vibrato depth[acc: 1 0 -9 0 9]",0,0,6,0.1);
env = button("note[switch:1]"):en.adsr(0.1,0,1,0.1);
clip = hslider("clip level[knob:2]",0.5,0,1,0.01);
|
|
6cfdf8397b654dfd0db1ca2447604297ca0aa0dd0e264df185c8388f8ce3ee78 | CesarChaussinand/GramoCollection | melodieBruiteuse.dsp | declare name "Mélodie bruiteuse";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = os.sawtooth(freq*mod)*env:ef.echo(0.2,0.2,fdbk):fi.lowpass3e(6*freq*env+10);
mod = (100+no.noise*bruit)/100;
freq = hslider("fréquence[acc:0 0 -9 0 9]",300,150,600,1):qu.quantize(110,qu.eolian):si.smoo;
bruit = hslider("bruit[acc:1 0 -9 0 9]",30,0,100,1); //pourcentage de bruit à ajouter
env = button("gate[switch:1]"):en.adsr(0.01,0.1,0.6,0.3);
fdbk = hslider("feedback de l'écho[knob:2]",0.2,0,0.5,0.01);
| https://raw.githubusercontent.com/CesarChaussinand/GramoCollection/58f63f2fdb1fe4d01b4e0416d3a0c14639a347f2/melodieBruiteuse.dsp | faust | pourcentage de bruit à ajouter | declare name "Mélodie bruiteuse";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = os.sawtooth(freq*mod)*env:ef.echo(0.2,0.2,fdbk):fi.lowpass3e(6*freq*env+10);
mod = (100+no.noise*bruit)/100;
freq = hslider("fréquence[acc:0 0 -9 0 9]",300,150,600,1):qu.quantize(110,qu.eolian):si.smoo;
env = button("gate[switch:1]"):en.adsr(0.01,0.1,0.6,0.3);
fdbk = hslider("feedback de l'écho[knob:2]",0.2,0,0.5,0.01);
|
be6b4b3464d4d4d889832aae40b8d492e7978d4f40df6cfaa829368c7e4dd7d8 | Rickr922/Faust-FDS | BowedString.dsp | import("stdfaust.lib");
declare name "BowedString";
declare description "Linear string model coupled with a bowing model for excitation.";
declare author "Riccardo Russo";
//----------------------------------String Settings---------------------------//
// Generic string
//nPoints=int(Length/h);
nPoints1 = 100;
k = 1/ma.SR;
//Stability condition
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
T = 150; // Tension [N]
radius = 3.5560e-04; // Radius (0.016 gauge) [m]
rho = 8.05*10^3; // Density [kg/m^3];
Area = ma.PI*radius^2; // Area of string section
I = (ma.PI*radius^4)/ 4; // Moment of Inertia
Emod = 174e4; // Young modulus [Pa]
K = sqrt(Emod*I/rho/Area);// Stiffness parameter
c = sqrt(T/rho/Area); // Wave speed
sigma1 = 0.01; // Frequency dependent damping
sigma0 = 0.0005;
//----------------------------------Equations--------------------------------//
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2-6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2+4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = -K^2*k^2/den/h^4;
midCoeff = E,C,A,C,E;
midCoeffDel = 0,D,B,D,0;
r = 2;
t = 1;
scheme(points) = par(i,points,midCoeff,midCoeffDel);
//----------------------------------Controls---------------------------------//
play = button("hit");
inPoint = hslider("input point",floor(nPoints1/2),0,nPoints1-1,1);
outPoint = hslider("output point",floor(nPoints1/2),0,nPoints1-1,0.01):si.smoo;
//----------------------------------Force---------------------------------//
Vb = hslider("bow vel", 0,-10,10,0.01); //bow velocity [m/s]
Fb = 1000000; //[m/s^2]
J = Fb*k^2/den/h;
alpha = 0.0001;
//----------------------------------Process---------------------------------//
//TODO: lin interp in input causes 0 output at .5 due to opposite phase
process =
(fd.stairsInterp1D(nPoints1,inPoint):>fd.bow(J,alpha,k,Vb)<:fd.linInterp1D(nPoints1,inPoint):
fd.model1D(nPoints1,r,t,scheme(nPoints1)))~si.bus(nPoints1):fd.linInterp1DOut(nPoints1,outPoint)
<:_,_;
| https://raw.githubusercontent.com/Rickr922/Faust-FDS/ead5c05c0eced6ed111dcfd8eeea14d313f74ef6/library/CorrectExamples/BowedString.dsp | faust | ----------------------------------String Settings---------------------------//
Generic string
nPoints=int(Length/h);
Stability condition
Tension [N]
Radius (0.016 gauge) [m]
Density [kg/m^3];
Area of string section
Moment of Inertia
Young modulus [Pa]
Stiffness parameter
Wave speed
Frequency dependent damping
----------------------------------Equations--------------------------------//
----------------------------------Controls---------------------------------//
----------------------------------Force---------------------------------//
bow velocity [m/s]
[m/s^2]
----------------------------------Process---------------------------------//
TODO: lin interp in input causes 0 output at .5 due to opposite phase
| import("stdfaust.lib");
declare name "BowedString";
declare description "Linear string model coupled with a bowing model for excitation.";
declare author "Riccardo Russo";
nPoints1 = 100;
k = 1/ma.SR;
coeff = c^2*k^2 + 4*sigma1*k;
h =sqrt((coeff + sqrt((coeff)^2 + 16*k^2*K^2))/2);
sigma0 = 0.0005;
den = 1+sigma0*k;
A = (2*h^4-2*c^2*k^2*h^2-4*sigma1*k*h^2-6*K^2*k^2)/den/h^4;
B = (sigma0*k*h^2-h^2+4*sigma1*k)/den/h^2;
C = (c^2*k^2*h^2+2*sigma1*k*h^2+4*K^2*k^2)/den/h^4;
D = -2*sigma1*k/den/h^2;
E = -K^2*k^2/den/h^4;
midCoeff = E,C,A,C,E;
midCoeffDel = 0,D,B,D,0;
r = 2;
t = 1;
scheme(points) = par(i,points,midCoeff,midCoeffDel);
play = button("hit");
inPoint = hslider("input point",floor(nPoints1/2),0,nPoints1-1,1);
outPoint = hslider("output point",floor(nPoints1/2),0,nPoints1-1,0.01):si.smoo;
J = Fb*k^2/den/h;
alpha = 0.0001;
process =
(fd.stairsInterp1D(nPoints1,inPoint):>fd.bow(J,alpha,k,Vb)<:fd.linInterp1D(nPoints1,inPoint):
fd.model1D(nPoints1,r,t,scheme(nPoints1)))~si.bus(nPoints1):fd.linInterp1DOut(nPoints1,outPoint)
<:_,_;
|
9678e67b6cb065ee84be0118ae18399552c6ffa60fec997dd662fdd2c722f891 | tonal-glyph/faustus | karplus32.dsp | declare name "karplus32";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
//-----------------------------------------------
// karplus-strong
// with 32 resonators in parallel
//-----------------------------------------------
import("stdfaust.lib");
// Excitator
//-----------
upfront(x) = (x-x') > 0.0;
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
//trigger(n) = upfront : release(n) : >(0.0) : +(leak);
//leak = 1.0/65536.0; // avoid denormals on Intel : removed since ftz is done at hardware level, and can be activated with -ftz for wasm
trigger(n) = upfront : release(n) : >(0.0);
size = hslider("excitation (samples)", 128, 2, 512, 1);
// Resonator
//-----------
dur = hslider("duration (samples)", 128, 2, 512, 1);
att = hslider("attenuation", 0.1, 0, 1, 0.01);
average(x) = (x+x')/2;
resonator(d, a) = (+ : de.delay(4096, d-1.5)) ~ (average : *(1.0-a)) ;
// Polyphony
//-----------
detune = hslider("detune", 32, 0, 512, 1);
polyphony = hslider("polyphony", 1, 0, 32, 1);
output = hslider("output volume", 0.5, 0, 1, 0.1);
process = vgroup("karplus32",
vgroup("noise generator", no.noise * hslider("level", 0.5, 0, 1, 0.1))
: vgroup("excitator", *(button("play"): trigger(size)))
<: vgroup("resonator x32", par(i,32, resonator(dur+i*detune, att) * (polyphony > i)))
:> *(output),*(output)
);
| https://raw.githubusercontent.com/tonal-glyph/faustus/cc887b115aceaee202edbdb37ee0e4087bfb5a33/examples/physicalModeling/old/karplus32.dsp | faust | -----------------------------------------------
karplus-strong
with 32 resonators in parallel
-----------------------------------------------
Excitator
-----------
trigger(n) = upfront : release(n) : >(0.0) : +(leak);
leak = 1.0/65536.0; // avoid denormals on Intel : removed since ftz is done at hardware level, and can be activated with -ftz for wasm
Resonator
-----------
Polyphony
----------- | declare name "karplus32";
declare version "1.0";
declare author "Grame";
declare license "BSD";
declare copyright "(c)GRAME 2006";
import("stdfaust.lib");
upfront(x) = (x-x') > 0.0;
decay(n,x) = x - (x>0)/n;
release(n) = + ~ decay(n);
trigger(n) = upfront : release(n) : >(0.0);
size = hslider("excitation (samples)", 128, 2, 512, 1);
dur = hslider("duration (samples)", 128, 2, 512, 1);
att = hslider("attenuation", 0.1, 0, 1, 0.01);
average(x) = (x+x')/2;
resonator(d, a) = (+ : de.delay(4096, d-1.5)) ~ (average : *(1.0-a)) ;
detune = hslider("detune", 32, 0, 512, 1);
polyphony = hslider("polyphony", 1, 0, 32, 1);
output = hslider("output volume", 0.5, 0, 1, 0.1);
process = vgroup("karplus32",
vgroup("noise generator", no.noise * hslider("level", 0.5, 0, 1, 0.1))
: vgroup("excitator", *(button("play"): trigger(size)))
<: vgroup("resonator x32", par(i,32, resonator(dur+i*detune, att) * (polyphony > i)))
:> *(output),*(output)
);
|
f14bb6145696cb3fa889bec111f7ad2d670149381ea77c6428b8cd989264ee15 | unicornsasfuel/6171_reverb | 6171_reverb.dsp | import("stdfaust.lib");
declare author "Evermind";
declare license "BSD 3-clause";
//Parameters
feedback_amount = vslider("t:6171 Reverb/h:Main/[0]Feedback %", 70, 0, 90, 0.1) / 100;
crosstalk = vslider("t:6171 Reverb/h:Main/[1]Crosstalk", 30, 0, 100, 1) / 100;
wet_level = vslider("t:6171 Reverb/h:Main/[2]Wet %", 25, 0, 100, 1) / 100;
outgain = vslider("t:6171 Reverb/h:Main/[3]Out Gain", 0, -24, 24, .1) : ba.db2linear : si.smoo;
ldelay1 = hslider("t:6171 Reverb/v:[3]Timings/h:Left Channel/Delay 1[unit:ms][style:knob]", 100, 1, 400, 0.1) / 1000 : ba.sec2samp;
ldelay2 = hslider("t:6171 Reverb/v:[3]Timings/h:Left Channel/Delay 2[unit:ms][style:knob]", 68, 1, 400, 0.1) / 1000 : ba.sec2samp;
ldelay3 = hslider("t:6171 Reverb/v:[3]Timings/h:Left Channel/Delay 3[unit:ms][style:knob]", 19.7, 1, 400, 0.1) / 1000 : ba.sec2samp;
ldelay4 = hslider("t:6171 Reverb/v:[3]Timings/h:Left Channel/Delay 4[unit:ms][style:knob]", 5.9, 1, 400, 0.1) / 1000 : ba.sec2samp;
rdelay1 = hslider("t:6171 Reverb/v:[3]Timings/h:Right Channel/Delay 1[unit:ms][style:knob]", 112, 1, 400, 0.1) / 1000 : ba.sec2samp;
rdelay2 = hslider("t:6171 Reverb/v:[3]Timings/h:Right Channel/Delay 2[unit:ms][style:knob]", 53, 1, 400, 0.1) / 1000 : ba.sec2samp;
rdelay3 = hslider("t:6171 Reverb/v:[3]Timings/h:Right Channel/Delay 3[unit:ms][style:knob]", 21.7, 1, 400, 0.1) / 1000 : ba.sec2samp;
rdelay4 = hslider("t:6171 Reverb/v:[3]Timings/h:Right Channel/Delay 4[unit:ms][style:knob]", 7, 1, 400, 0.1) / 1000 : ba.sec2samp;
//Functions
allpass(dt,gain) = (+ <: de.delay(ma.SR/2,dt-1),*(gain)) ~ *(-gain) : mem,_ : +;
schroeder_verb(dt1, dt2, dt3, gain) = allpass(dt1,gain) : allpass(dt2, gain) : allpass(dt3, gain);
schroeder_delays(dt1, dt2, dt3, dt4, dt5, dt6, lgain, rgain) = schroeder_verb(dt1, dt2, dt3, lgain),
schroeder_verb(dt4, dt5, dt6, rgain);
gerzon_delays(dt1, dt2) = (allpass(dt1,1),
allpass(dt2,1));
routing(a,b,c,d) = (a+c), (b+d);
mix_channels(ct) = _,_ <: *(1-ct)+*(ct), *(ct)+*(1-ct);
reverb = schroeder_delays(ldelay1, ldelay2, ldelay3, rdelay1, rdelay2, rdelay3, feedback_amount, feedback_amount) :
(routing : gerzon_delays(ldelay4, rdelay4) : mix_channels(crosstalk)) ~ (*(feedback_amount), *(feedback_amount));
process = _,_ <: (_,_), reverb: ro.interleave(2,2) : it.interpolate_linear(wet_level), it.interpolate_linear(wet_level) : * (outgain), *(outgain);
| https://raw.githubusercontent.com/unicornsasfuel/6171_reverb/ee1d89af1315e92d2d5673fb09208872466b008c/6171_reverb.dsp | faust | Parameters
Functions | import("stdfaust.lib");
declare author "Evermind";
declare license "BSD 3-clause";
feedback_amount = vslider("t:6171 Reverb/h:Main/[0]Feedback %", 70, 0, 90, 0.1) / 100;
crosstalk = vslider("t:6171 Reverb/h:Main/[1]Crosstalk", 30, 0, 100, 1) / 100;
wet_level = vslider("t:6171 Reverb/h:Main/[2]Wet %", 25, 0, 100, 1) / 100;
outgain = vslider("t:6171 Reverb/h:Main/[3]Out Gain", 0, -24, 24, .1) : ba.db2linear : si.smoo;
ldelay1 = hslider("t:6171 Reverb/v:[3]Timings/h:Left Channel/Delay 1[unit:ms][style:knob]", 100, 1, 400, 0.1) / 1000 : ba.sec2samp;
ldelay2 = hslider("t:6171 Reverb/v:[3]Timings/h:Left Channel/Delay 2[unit:ms][style:knob]", 68, 1, 400, 0.1) / 1000 : ba.sec2samp;
ldelay3 = hslider("t:6171 Reverb/v:[3]Timings/h:Left Channel/Delay 3[unit:ms][style:knob]", 19.7, 1, 400, 0.1) / 1000 : ba.sec2samp;
ldelay4 = hslider("t:6171 Reverb/v:[3]Timings/h:Left Channel/Delay 4[unit:ms][style:knob]", 5.9, 1, 400, 0.1) / 1000 : ba.sec2samp;
rdelay1 = hslider("t:6171 Reverb/v:[3]Timings/h:Right Channel/Delay 1[unit:ms][style:knob]", 112, 1, 400, 0.1) / 1000 : ba.sec2samp;
rdelay2 = hslider("t:6171 Reverb/v:[3]Timings/h:Right Channel/Delay 2[unit:ms][style:knob]", 53, 1, 400, 0.1) / 1000 : ba.sec2samp;
rdelay3 = hslider("t:6171 Reverb/v:[3]Timings/h:Right Channel/Delay 3[unit:ms][style:knob]", 21.7, 1, 400, 0.1) / 1000 : ba.sec2samp;
rdelay4 = hslider("t:6171 Reverb/v:[3]Timings/h:Right Channel/Delay 4[unit:ms][style:knob]", 7, 1, 400, 0.1) / 1000 : ba.sec2samp;
allpass(dt,gain) = (+ <: de.delay(ma.SR/2,dt-1),*(gain)) ~ *(-gain) : mem,_ : +;
schroeder_verb(dt1, dt2, dt3, gain) = allpass(dt1,gain) : allpass(dt2, gain) : allpass(dt3, gain);
schroeder_delays(dt1, dt2, dt3, dt4, dt5, dt6, lgain, rgain) = schroeder_verb(dt1, dt2, dt3, lgain),
schroeder_verb(dt4, dt5, dt6, rgain);
gerzon_delays(dt1, dt2) = (allpass(dt1,1),
allpass(dt2,1));
routing(a,b,c,d) = (a+c), (b+d);
mix_channels(ct) = _,_ <: *(1-ct)+*(ct), *(ct)+*(1-ct);
reverb = schroeder_delays(ldelay1, ldelay2, ldelay3, rdelay1, rdelay2, rdelay3, feedback_amount, feedback_amount) :
(routing : gerzon_delays(ldelay4, rdelay4) : mix_channels(crosstalk)) ~ (*(feedback_amount), *(feedback_amount));
process = _,_ <: (_,_), reverb: ro.interleave(2,2) : it.interpolate_linear(wet_level), it.interpolate_linear(wet_level) : * (outgain), *(outgain);
|
68b5dc59fc0ff52100f0a72cf5b6023d96f695d5ea0feb7adbf632216d09346d | CesarChaussinand/GramoCollection | alarmeDouce.dsp | declare name "Alarme douce";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = sy.fm(frqs(note1),indices)*lfo,sy.fm(frqs(note2),indices)*(1-lfo):>_*gate;
frqs(f) = (f,3*f,5*f);
indices = (120,500);
note1 = hslider("fréquence n°1[acc:0 0 -9 0 9]",150,100,200,1):qu.quantize(110,qu.eolian):si.smoo;
note2 = hslider("fréquence n°2[acc:1 0 -9 0 9]",200,150,300,1):qu.quantize(110,qu.eolian):si.smoo;
gate = button("gate[switch:1]"):en.asr(0.2,1,0.5);
lfo = os.osc(rate)*0.5+0.5;
rate = hslider("lfo rate[knob:2]",3,1,10,0.1);
| https://raw.githubusercontent.com/CesarChaussinand/GramoCollection/58f63f2fdb1fe4d01b4e0416d3a0c14639a347f2/alarmeDouce.dsp | faust | declare name "Alarme douce";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = sy.fm(frqs(note1),indices)*lfo,sy.fm(frqs(note2),indices)*(1-lfo):>_*gate;
frqs(f) = (f,3*f,5*f);
indices = (120,500);
note1 = hslider("fréquence n°1[acc:0 0 -9 0 9]",150,100,200,1):qu.quantize(110,qu.eolian):si.smoo;
note2 = hslider("fréquence n°2[acc:1 0 -9 0 9]",200,150,300,1):qu.quantize(110,qu.eolian):si.smoo;
gate = button("gate[switch:1]"):en.asr(0.2,1,0.5);
lfo = os.osc(rate)*0.5+0.5;
rate = hslider("lfo rate[knob:2]",3,1,10,0.1);
|
|
37124ddbba9eaad81057880b77fe82f682a6e490ac39af2207154404b8cf8b06 | CesarChaussinand/GramoCollection | melodiePulsee.dsp | declare name "Mélodie pulsée";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = osc(219.9),osc(freq):>_*amp:ef.echo(0.2,0.2,0.2) , beat :>
ef.cubicnl(0.1,0);
osc(f) = os.osc(f)*0.5+os.osc(f*2)*0.25+os.osc(f*3)*0.125;
beat = (no.noise*0.2+os.osc(kickEnv*130+20))*kickEnv*kickVol;
kickEnv = ba.pulse(22050): en.ar(0.01,0.1);
freq = hslider("v:synthétiseur/[1]fréquence[acc:0 0 -10 0 10]",440,220,660,1):qu.quantizeSmoothed(220,qu.kumoi):si.smoo;
amp = button("v:synthétiseur/[0]gate[switch:1]"):en.asr(0.1,1,0.9);
kickVol = hslider("v:kick/[2]volume[knob:2]",0,0,5,0.1);
| https://raw.githubusercontent.com/CesarChaussinand/GramoCollection/58f63f2fdb1fe4d01b4e0416d3a0c14639a347f2/melodiePulsee.dsp | faust | declare name "Mélodie pulsée";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = osc(219.9),osc(freq):>_*amp:ef.echo(0.2,0.2,0.2) , beat :>
ef.cubicnl(0.1,0);
osc(f) = os.osc(f)*0.5+os.osc(f*2)*0.25+os.osc(f*3)*0.125;
beat = (no.noise*0.2+os.osc(kickEnv*130+20))*kickEnv*kickVol;
kickEnv = ba.pulse(22050): en.ar(0.01,0.1);
freq = hslider("v:synthétiseur/[1]fréquence[acc:0 0 -10 0 10]",440,220,660,1):qu.quantizeSmoothed(220,qu.kumoi):si.smoo;
amp = button("v:synthétiseur/[0]gate[switch:1]"):en.asr(0.1,1,0.9);
kickVol = hslider("v:kick/[2]volume[knob:2]",0,0,5,0.1);
|
|
c41e8fa90508495f0c9629e2c193601b0c253c5850419c71fab89339caaa224b | CesarChaussinand/GramoCollection | grognementControle.dsp | declare name "Grognement contrôlé";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = (os.sawtooth(80+gro*120)*gro) +
(no.noise*(0.9*gro+0.1)) :
fi.resonlp(gro*500+100,5,gro*0.5) : fx * gate : ef.cubicnl(0.2,0);
fx = _<: _*(1-ring)+_*os.osc(44)*ring;
mod = no.noise:ba.latch(ba.pulse(7000/(rand+1)))*rand*0.1;
gro = hslider("grognement[acc: 0 0 -9 0 9]",0.3, 0,1,0.01)+mod:si.smoo;
ring = hslider("modulation en anneaux[acc:1 0 -9 0 0]",0.5,0,1,0.01);
gate = button("gate[switch:1]"):en.asr(0.01,1,0.01);
rand = hslider("random modulation[knob:2]",0.5,0,1,0.01);
| https://raw.githubusercontent.com/CesarChaussinand/GramoCollection/58f63f2fdb1fe4d01b4e0416d3a0c14639a347f2/grognementControle.dsp | faust | declare name "Grognement contrôlé";
declare version "1.0";
declare author "César Chaussinand";
declare license "MIT";
declare copyright "(c) César Chaussinand 2022";
import("stdfaust.lib");
process = (os.sawtooth(80+gro*120)*gro) +
(no.noise*(0.9*gro+0.1)) :
fi.resonlp(gro*500+100,5,gro*0.5) : fx * gate : ef.cubicnl(0.2,0);
fx = _<: _*(1-ring)+_*os.osc(44)*ring;
mod = no.noise:ba.latch(ba.pulse(7000/(rand+1)))*rand*0.1;
gro = hslider("grognement[acc: 0 0 -9 0 9]",0.3, 0,1,0.01)+mod:si.smoo;
ring = hslider("modulation en anneaux[acc:1 0 -9 0 0]",0.5,0,1,0.01);
gate = button("gate[switch:1]"):en.asr(0.01,1,0.01);
rand = hslider("random modulation[knob:2]",0.5,0,1,0.01);
|
|
321c6663c236dff9b13b9db825058e03127586f9dcc725d902e0da67a68bc932 | s-e-a-m/fc1969lais | 1969lais_LR.dsp | declare name "ALVIN LUCIER - I AM SITTING IN A ROOM (1969) - STEREO VERSION";
declare version "010";
declare author "Giuseppe Silvi";
declare license "GNU-GPL-v3";
declare copyright "(c)SEAM 2019";
declare description "Alvin Lucier, I am sitting in a room - live electronic Stereo model";
declare options "[midi:on] [httpd:on]";
import("stdfaust.lib");
import("../faust-libraries/seam.lib");
ctrlgroup(x) = hgroup("[02]", x);
main = vgroup("[01] Check both boxes to start",
*(L) : de.delay(maxdel, D-1))
with{
maxdel = ma.SR *(180);
I = int(checkbox("[01] Uncheck me after the incipit"));
// Clear
R = (I-I') <= 0;
// Compute the delay time during Incipit
D = (+(I):*(R))~_;
L = int(checkbox("[02] I am Sitting... Uncheck me at the end"));
};
fader = *(g88), *(g88);
meters = svmeter, svmeter;
process = ctrlgroup(lrstrip) : main, main : ctrlgroup(hgroup("[03] ", fader : meters));
| https://raw.githubusercontent.com/s-e-a-m/fc1969lais/27bd20a1b8d0657d3d3f3c68459a791e083595f3/sources/1969lais_LR.dsp | faust | Clear
Compute the delay time during Incipit | declare name "ALVIN LUCIER - I AM SITTING IN A ROOM (1969) - STEREO VERSION";
declare version "010";
declare author "Giuseppe Silvi";
declare license "GNU-GPL-v3";
declare copyright "(c)SEAM 2019";
declare description "Alvin Lucier, I am sitting in a room - live electronic Stereo model";
declare options "[midi:on] [httpd:on]";
import("stdfaust.lib");
import("../faust-libraries/seam.lib");
ctrlgroup(x) = hgroup("[02]", x);
main = vgroup("[01] Check both boxes to start",
*(L) : de.delay(maxdel, D-1))
with{
maxdel = ma.SR *(180);
I = int(checkbox("[01] Uncheck me after the incipit"));
R = (I-I') <= 0;
D = (+(I):*(R))~_;
L = int(checkbox("[02] I am Sitting... Uncheck me at the end"));
};
fader = *(g88), *(g88);
meters = svmeter, svmeter;
process = ctrlgroup(lrstrip) : main, main : ctrlgroup(hgroup("[03] ", fader : meters));
|
fc858b42b826939cd9d02d83b753f747685c46d9f9d3ef275ab45db6573099f3 | s-e-a-m/fc1969lais | 1969lais.dsp | declare name "ALVIN LUCIER - I am SITTING IN A ROOM (1969)";
declare version "010";
declare author "Giuseppe Silvi";
declare license "GNU-GPL-v3";
declare copyright "(c)SEAM 2019";
declare description "Alvin Lucier, I am sitting in a room - live electronic model";
declare options "[midi:on] [httpd:on]";
import("stdfaust.lib");
import("../faust-libraries/seam.lib");
ctrlgroup(x) = hgroup("[02]", x);
main = vgroup("[01] Check both boxes to start",
*(L) : de.delay(maxdel, D-1))
with{
maxdel = ma.SR *(180);
I = int(checkbox("[01] Uncheck me after the incipit"));
// Clear
R = (I-I') <= 0;
// Compute the delay time during Incipit
D = (+(I):*(R))~_;
L = int(checkbox("[02] I am Sitting... Uncheck me at the end"));
};
input = ctrlgroup(chstrip);
output = ctrlgroup(hgroup("[03] ", *(shw.g88) : san.pvmeter));
//process = input : main : output;
process = main : output; // web example
| https://raw.githubusercontent.com/s-e-a-m/fc1969lais/27bd20a1b8d0657d3d3f3c68459a791e083595f3/sources/1969lais.dsp | faust | Clear
Compute the delay time during Incipit
process = input : main : output;
web example | declare name "ALVIN LUCIER - I am SITTING IN A ROOM (1969)";
declare version "010";
declare author "Giuseppe Silvi";
declare license "GNU-GPL-v3";
declare copyright "(c)SEAM 2019";
declare description "Alvin Lucier, I am sitting in a room - live electronic model";
declare options "[midi:on] [httpd:on]";
import("stdfaust.lib");
import("../faust-libraries/seam.lib");
ctrlgroup(x) = hgroup("[02]", x);
main = vgroup("[01] Check both boxes to start",
*(L) : de.delay(maxdel, D-1))
with{
maxdel = ma.SR *(180);
I = int(checkbox("[01] Uncheck me after the incipit"));
R = (I-I') <= 0;
D = (+(I):*(R))~_;
L = int(checkbox("[02] I am Sitting... Uncheck me at the end"));
};
input = ctrlgroup(chstrip);
output = ctrlgroup(hgroup("[03] ", *(shw.g88) : san.pvmeter));
|
Subsets and Splits