Fix the LPF cutoff
This commit is contained in:
parent
b56821db00
commit
823088b629
1 changed files with 6 additions and 1 deletions
|
|
@ -21,6 +21,7 @@
|
||||||
#include "Disto.h"
|
#include "Disto.h"
|
||||||
#include "Opcode.h"
|
#include "Opcode.h"
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
|
#include "MathHelpers.h"
|
||||||
#include <hiir/Upsampler2xFpu.h>
|
#include <hiir/Upsampler2xFpu.h>
|
||||||
#include <hiir/Downsampler2xFpu.h>
|
#include <hiir/Downsampler2xFpu.h>
|
||||||
#include <absl/types/span.h>
|
#include <absl/types/span.h>
|
||||||
|
|
@ -57,7 +58,11 @@ struct Disto::Impl {
|
||||||
std::unique_ptr<float[]> _temp8x[2];
|
std::unique_ptr<float[]> _temp8x[2];
|
||||||
|
|
||||||
// use the same formula as reverb
|
// use the same formula as reverb
|
||||||
float toneCutoff() const noexcept { return 21.0f + _tone * 1.08f; }
|
float toneCutoff() const noexcept
|
||||||
|
{
|
||||||
|
float mk = 21.0f + _tone * 1.08f;
|
||||||
|
return 440.0f * std::exp2((mk - 69.0f) * (1.0f / 12.0f));
|
||||||
|
}
|
||||||
|
|
||||||
#define DEFINE_SET_GET(type, ident, name, var, def, min, max, step) \
|
#define DEFINE_SET_GET(type, ident, name, var, def, min, max, step) \
|
||||||
float get_##ident(size_t c, size_t s) const noexcept { return _stages[c][s].var; } \
|
float get_##ident(size_t c, size_t s) const noexcept { return _stages[c][s].var; } \
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue