Skip to content

Commit

Permalink
Tweak modulation parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ljwall committed Nov 15, 2021
1 parent bcda209 commit 4f59543
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 92 deletions.
81 changes: 13 additions & 68 deletions faustian/Andromeda.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,13 @@ end
function Andromeda:onLoadGraph(channelCount)
local rev = self:addObject("rev", lib.Andromeda())

local mod1 = self:addObject("mod1", app.ParameterAdapter())
tie(rev, "Mod1", mod1, "Out")
self:addMonoBranch("mod1", mod1, "In", mod1, "Out")

local mod2 = self:addObject("mod2", app.ParameterAdapter())
tie(rev, "Mod2", mod2, "Out")
self:addMonoBranch("mod2", mod2, "In", mod2, "Out")

local mod3 = self:addObject("mod3", app.ParameterAdapter())
tie(rev, "Mod3", mod3, "Out")
self:addMonoBranch("mod3", mod3, "In", mod3, "Out")

local mod4 = self:addObject("mod4", app.ParameterAdapter())
tie(rev, "Mod4", mod4, "Out")
self:addMonoBranch("mod4", mod4, "In", mod4, "Out")
local mod = self:addObject("mod", app.ParameterAdapter())
tie(rev, "mod", mod, "Out")
self:addMonoBranch("mod", mod, "In", mod, "Out")

local high = self:addObject("HighCut", app.ParameterAdapter())
local low = self:addObject("LowCut", app.ParameterAdapter())
local decay = self:addObject("Decay", app.ParameterAdapter())
-- local damping = self:addObject("Damping", app.ParameterAdapter())
local drywet = self:addObject("DryWet", app.ParameterAdapter())

tie(rev, "HighCut", high, "Out")
Expand All @@ -51,9 +38,6 @@ function Andromeda:onLoadGraph(channelCount)
tie(rev, "Decay", decay, "Out")
self:addMonoBranch("decay", decay, "In", decay, "Out")

-- tie(rev, "Damping", damping, "Out")
-- self:addMonoBranch("damping", damping, "In", damping, "Out")

tie(rev, "DryWet", drywet, "Out")
self:addMonoBranch("drywet", drywet, "In", drywet, "Out")

Expand All @@ -70,16 +54,10 @@ end

local views = {
expanded = {
-- "predelay",
-- "bandwidth",
"highcut",
"lowcut",
"mod1",
"mod2",
"mod3",
"mod4",
"highcut",
"decay",
-- "damping",
"mod",
"drywet",
},
collapsed = {},
Expand All @@ -90,51 +68,18 @@ local views = {
local fbMap = app.LinearDialMap(0, 5)
fbMap:setSteps(0.1, 0.01, 0.001, 0.0001)

local modmap = app.LinearDialMap(1, 1000)
modmap:setSteps(100, 10, 5, 1)

function Andromeda:onLoadViews(objects, branches)
local controls = {}

controls.mod1 = GainBias {
button = "mod1",
description = "mod1",
branch = branches.mod1,
gainbias = objects.mod1,
range = objects.mod1,
controls.mod = GainBias {
button = "Mod",
description = "Mod Rate",
branch = branches.mod,
gainbias = objects.mod,
range = objects.mod,
biasUnits = app.unitNone,
biasMap = modmap,
initialBias = 130,
}
controls.mod2 = GainBias {
button = "mod2",
description = "mod2",
branch = branches.mod2,
gainbias = objects.mod2,
range = objects.mod2,
biasUnits = app.unitNone,
biasMap = modmap,
initialBias = 63,
}
controls.mod3 = GainBias {
button = "mod3",
description = "mod3",
branch = branches.mod3,
gainbias = objects.mod3,
range = objects.mod3,
biasUnits = app.unitNone,
biasMap = modmap,
initialBias = 43,
}
controls.mod4 = GainBias {
button = "mod4",
description = "mod4",
branch = branches.mod4,
gainbias = objects.mod4,
range = objects.mod4,
biasUnits = app.unitNone,
biasMap = modmap,
initialBias = 20,
biasMap = Encoder.getMap("int[0,100]"),
initialBias = 50,
}

controls.highcut = GainBias {
Expand Down
2 changes: 1 addition & 1 deletion faustian/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# Override these defaults on the commandline:
PKGNAME ?= faustian
PKGVERSION ?= 0.0.2
PKGVERSION ?= 0.1.0
LIBNAME ?= libfaustian
PROFILE ?= testing
SDKPATH ?= ../er-301
Expand Down
45 changes: 22 additions & 23 deletions faustian/dsp/Andromeda.dsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,34 @@ andromeda(decay, low_pass, high_pass) = _,_ : + : *(0.5) : diffusion_network : (
line = de.fdelayltv(2, 28800);
taps = (0.047, 0.120, 0.134, 0.146, 0.158, 0.169, 0.180, 0.190, 0.200, 0.209, 0.217, 0.233, 0.240, 0.244, 0.225, 0.247);

//epsilon = 0.00013; // Around 1Hz
mod = hslider("mod", 50, 0, 100, 0);

//epsilon1 = 0.000130;
//epsilon2 = 0.000063;
//epsilon3 = 0.000043;
//epsilon4 = 0.000020;
min_mod = 31, 25, 19, 11;
mid_mod = 130, 63, 43, 20;
max_mod = 313, 310, 251, 250;

//epsilon1 = 0.000063;
//epsilon2 = 0.000043;
//epsilon3 = 0.000020;
//epsilon4 = 0.000005;

epsilon1 = hslider("Mod1", 130, 1, 1000, 1) / 1000000;
epsilon2 = hslider("Mod2", 63, 1, 1000, 1) / 1000000;
epsilon3 = hslider("Mod3", 43, 1, 1000, 1) / 1000000;
epsilon4 = hslider("Mod4", 20, 1, 1000, 1) / 1000000;
epsilon = par(i, 4,
(mod <= 50)*(ba.take(i+1, min_mod) + (mod/50) * (ba.take(i+1, mid_mod) - ba.take(i+1, min_mod))) +
(mod > 50)*(ba.take(i+1, mid_mod) + (mod/50 - 1) * (ba.take(i+1, max_mod) - ba.take(i+1, mid_mod)))
);
e1 = ba.take(1, epsilon) / 1000000;
e2 = ba.take(2, epsilon) / 1000000;
e3 = ba.take(3, epsilon) / 1000000;
e4 = ba.take(4, epsilon) / 1000000;

mods = x,xq,-x,-xq , y,yq,-y,-yq, z,zq,-z,-zq, a,aq,-a,-aq letrec {
'xq = os.impulse + xq - epsilon1*x;
'x = epsilon1 * (xq - epsilon1 *x) + x;
'xq = os.impulse + xq - e1*x;
'x = e1 * (xq - e1 *x) + x;

'yq = os.impulse + yq - epsilon2*y;
'y = epsilon2 * (yq - epsilon2 *y) + y;
'yq = os.impulse + yq - e2*y;
'y = e2 * (yq - e2 *y) + y;

'zq = os.impulse + zq - epsilon3*z;
'z = epsilon3 * (zq - epsilon3 *z) + z;
'zq = os.impulse + zq - e3*z;
'z = e3 * (zq - e3 *z) + z;

'aq = os.impulse + aq - epsilon4*a;
'a = epsilon4 * (aq - epsilon4 *a) + a;
'aq = os.impulse + aq - e4*a;
'a = e4 * (aq - e4 *a) + a;
};
limiter(x) = 2 * x / sqrt(x*x +4);
depth = ba.sec2samp(0.004);
Expand All @@ -68,8 +67,8 @@ declare er301_out2 "OutR";

process = _,_ <: _,_,andromeda(decay_ctrl, low_ctrl, high_ctrl): dry_wet_mix(dry_wet_ctr) with {
decay_ctrl = hslider("Decay", 0.8, 0, 5, 0.001) : si.smoo;
low_ctrl = hslider("HighCut", 20000, 100, 20000, 100) : min(20000);
high_ctrl = hslider("LowCut", 20, 20, 20000, 100) : max(20);
low_ctrl = hslider("HighCut", 20000, 100, 20000, 100) : min(20000) : max(100);
high_ctrl = hslider("LowCut", 20, 20, 20000, 100) : min(20000) : max(20);
dry_wet_ctr = hslider("DryWet", 0.25, 0, 1, 0.001) : si.smoo;
dry_wet_mix(mix, dry_l, dry_r, wet_l, wet_r) = (1-mix) * dry_l, (1-mix) * dry_r, mix * wet_l, mix * wet_r :> _,_;
};

0 comments on commit 4f59543

Please sign in to comment.