Skip to content

Commit

Permalink
Use less conservative settings for limiter, follow suggestion #45 by …
Browse files Browse the repository at this point in the history
…Rippert
  • Loading branch information
brummer10 committed Dec 24, 2020
1 parent ea7fdba commit 9e465d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion trunk/src/faust-generated/hardlim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void always_inline Dsp::compute(int count, FAUSTFLOAT *input0, FAUSTFLOAT *input
double fTemp4 = ((fRec4[1] > fTemp3) ? fConst5 : fConst4);
fRec5[0] = ((fRec5[1] * fTemp4) + (fTemp3 * (1.0 - fTemp4)));
fRec4[0] = fRec5[0];
fRec3[0] = ((fConst2 * fRec3[1]) + (fConst3 * (0.0 - (0.75 * std::max<double>(((20.0 * std::log10(fRec4[0])) + 6.0), 0.0)))));
fRec3[0] = ((fConst2 * fRec3[1]) + (fConst3 * (0.0 - (0.98999999999999999 * std::max<double>((20.0 * std::log10(fRec4[0])), 0.0)))));
double fTemp5 = std::pow(10.0, (0.050000000000000003 * fRec3[0]));
double fTemp6 = std::max<double>(fConst1, std::fabs((1.0 - fTemp5)));
fRec0[0] = (iTemp1 ? std::max<double>(fRec0[1], fTemp6) : fTemp6);
Expand Down
8 changes: 4 additions & 4 deletions trunk/src/faust/hardlim.dsp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ with {
// compression gain in dB:
outminusindb(ratio,thresh,level) = max(level-thresh,0.0) * (1.0/float(ratio)-1.0) ;
// Note: "float(ratio)" REQUIRED when ratio is an integer > 1!
vmeter1(x) = attach(x, envelop(1.0-x) : vbargraph("v1[nomidi][tooltip:Rack output Limiter]", 0.0, 1.0));

envelop = abs : max ~ (1.0/ma.SR) : rd.maxn(1024); // : max(ba.db2linear(-70)) : ba.linear2db;
// compression meter indicate when the limiter kicks in
vmeter1(x) = attach(x, envelop(1.0-x) : vbargraph("v1[nomidi][tooltip:Rack output Limiter]", 0.0, 1.0));
envelop = abs : max ~ (1.0/ma.SR) : rd.maxn(1024);
};


lim = compressor_stereo(4,-6,0.0008,0.5);
lim = compressor_stereo(100,0,0.0008,0.5);

process = lim;
2 changes: 1 addition & 1 deletion trunk/src/gx_head/engine/gx_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,9 @@ void GxEngine::load_static_plugins() {
pl.add(gx_effects::gx_outputlevel::plugin(), PLUGIN_POS_END);
pl.add(balance::plugin(), PLUGIN_POS_END, PGN_MODE_BYPASS);
pl.add(&stereomute, PLUGIN_POS_END, PGN_MODE_MUTE);
pl.add(hardlim::plugin(), PLUGIN_POS_END, PGN_MODE_NORMAL);
pl.add(&drumout.outputdrum, PLUGIN_POS_END, PGN_MODE_NORMAL);
pl.add(&directout, PLUGIN_POS_END, PGN_MODE_NORMAL);
pl.add(hardlim::plugin(), PLUGIN_POS_END, PGN_MODE_NORMAL);
pl.add(&maxlevel, PLUGIN_POS_END, PGN_MODE_NORMAL|PGN_MODE_BYPASS);

// * fx amp output *
Expand Down

0 comments on commit 9e465d8

Please sign in to comment.