Skip to content

Commit

Permalink
add dattorro_rev_demo with example GUI.
Browse files Browse the repository at this point in the history
  • Loading branch information
zerbian authored and sletz committed May 15, 2021
1 parent 2815f71 commit 8642594
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 6 deletions.
46 changes: 46 additions & 0 deletions demos.lib
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ zita_light = hgroup("Zita Light",(_,_ <: re.zita_rev1_stereo(rdel,f1,f2,t60dc,t6
with{
fsmax = 48000.0; // highest sampling rate that will be used
rdel = 60;

f1 = 200;
t60dc = 3;
t60m = 2;
Expand Down Expand Up @@ -860,6 +861,51 @@ with{
factor]", -20, -70, 40, 0.1)) : ba.db2linear : si.smoo;
};

//----------------------------------`(dm.)dattorro_rev_demo`------------------------------
// Example GUI for `dattorro_rev` with all parameters exposed. With additional
// dry/wet and output gain control.
//
// #### Usage
//
// ```
// _,_ : dattorro_rev_demo : _,_
// ```
//
//------------------------------------------------------------
// Author: Jakob Zerbian
// License: MIT-style STK-4.3 license

declare dattorro_rev_demo author "Jakob Zerbian";
declare dattorro_rev_demo license "MIT-style STK-4.3 license";

dattorro_rev_demo = _,_ <: re.dattorro_rev(pre_delay, bw, i_diff1, i_diff2, decay, d_diff1, d_diff2, damping),_,_:
dry_wet : out_level
with {
rev_group(x) = hgroup("[0] Dattorro Reverb",x);

in_group(x) = rev_group(hgroup("[0] Input",x));
pre_delay = 0;
bw = in_group(vslider("[1] Prefilter [style:knob] [tooltip: lowpass-like filter, 0 = no signal, 1 = no filtering]",0.7,0.0,1.0,0.001) : si.smoo);
i_diff1 = in_group(vslider("[2] Diffusion 1 [style:knob] [tooltip: diffusion factor, influences reverb color and density]",0.625,0.0,1.0,0.001) : si.smoo);
i_diff2 = in_group(vslider("[3] Diffusion 2 [style:knob] [tooltip: diffusion factor, influences reverb color and density]",0.625,0.0,1.0,0.001) : si.smoo);

fdb_group(x) = rev_group(hgroup("[1] Feedback", x));
d_diff1 = fdb_group(vslider("[1] Diffusion 1 [style:knob] [tooltip: diffusion factor, influences reverb color and density]",0.625,0.0,1.0,0.001) : si.smoo);
d_diff2 = fdb_group(vslider("[2] Diffusion 2 [style:knob] [tooltip: diffusion factor, influences reverb color and density]",0.625,0.0,1.0,0.001) : si.smoo);
decay = fdb_group(vslider("[3] Decay Rate [style:knob] [tooltip: decay length, 1 = infinite]",0.7,0.0,1.0,0.001) : si.smoo);
damping = fdb_group(vslider("[4] Damping [style:knob] [tooltip: dampening in feedback network]",0.625,0.0,1.0,0.001) : si.smoo);

out_group(x) = rev_group(hgroup("[2] Output",x));
dry_wet(x,y) = *(dry) + wet*x, *(dry) + wet*y
with {
wet = 0.5*(drywet+1.0);
dry = 1.0-wet;
};
drywet = out_group(vslider("[1] Dry/Wet Mix [style:knob] [tooltip: -1 = dry, 1 = wet]",0,-1.0,1.0,0.01) : si.smoo);
gain = out_group(vslider("[2] Level [unit:dB] [style:knob] [tooltip: Output Gain]", -6, -70, 40, 0.1) : ba.db2linear : si.smoo);
out_level = *(gain),*(gain);
};


//====================================Generators==========================================
//========================================================================================
Expand Down
12 changes: 6 additions & 6 deletions misceffects.lib
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,9 @@ with {
// considered as "deprecated".
//////////////////////////////////////////////////////////////////////////////////////////

echo1s = vgroup("echo 1000", +~(de.delay(65536, int(hslider("millisecond", 0, 0, 1000, 0.10)*ba.millisec)-1) * (hslider("feedback", 0, 0, 100, 0.1)/100.0)));
echo2s = vgroup("echo 2000", +~(de.delay(131072, int(hslider("millisecond", 0, 0, 2000, 0.25)*ba.millisec)-1) * (hslider("feedback", 0, 0, 100, 0.1)/100.0)));
echo5s = vgroup("echo 5000", +~(de.delay(262144, int(hslider("millisecond", 0, 0, 5000, 0.50)*ba.millisec)-1) * (hslider("feedback", 0, 0, 100, 0.1)/100.0)));
echo10s = vgroup("echo 10000", +~(de.delay(524288, int(hslider("millisecond", 0, 0, 10000, 1.00)*ba.millisec)-1) * (hslider("feedback", 0, 0, 100, 0.1)/100.0)));
echo21s = vgroup("echo 21000", +~(de.delay(1048576, int(hslider("millisecond", 0, 0, 21000, 1.00)*ba.millisec)-1) * (hslider("feedback", 0, 0, 100, 0.1)/100.0)));
echo43s = vgroup("echo 43000", +~(de.delay(2097152, int(hslider("millisecond", 0, 0, 43000, 1.00)*ba.millisec)-1) * (hslider("feedback", 0, 0, 100, 0.1)/100.0)));
echo1s = vgroup("echo 1000", +~(de.delay(65536, int(hslider("millisecond", 0, 0, 1000, 0.10)*ba.millisec)-1) * (hslider("feedback", 0, 0, 100, 0.1)/100.0)));
echo2s = vgroup("echo 2000", +~(de.delay(131072, int(hslider("millisecond", 0, 0, 2000, 0.25)*ba.millisec)-1) * (hslider("feedback", 0, 0, 100, 0.1)/100.0)));
echo5s = vgroup("echo 5000", +~(de.delay(262144, int(hslider("millisecond", 0, 0, 5000, 0.50)*ba.millisec)-1) * (hslider("feedback", 0, 0, 100, 0.1)/100.0)));
echo10s = vgroup("echo 10000", +~(de.delay(524288, int(hslider("millisecond", 0, 0, 10000, 1.00)*ba.millisec)-1) * (hslider("feedback", 0, 0, 100, 0.1)/100.0)));
echo21s = vgroup("echo 21000", +~(de.delay(1048576, int(hslider("millisecond", 0, 0, 21000, 1.00)*ba.millisec)-1) * (hslider("feedback", 0, 0, 100, 0.1)/100.0)));
echo43s = vgroup("echo 43000", +~(de.delay(2097152, int(hslider("millisecond", 0, 0, 43000, 1.00)*ba.millisec)-1) * (hslider("feedback", 0, 0, 100, 0.1)/100.0)));

0 comments on commit 8642594

Please sign in to comment.