filter parameter tweaks
This commit is contained in:
parent
699600315c
commit
0b66a8d893
|
@ -165,12 +165,25 @@ void vcf(nekobee_synth_t *synth, float *out, uint32_t count) {
|
|||
// printf("cutoff = %04fHz, ct=%f\n", cutoff, ct);
|
||||
|
||||
float hpc = 6.28 * 16 * synth->deltat;
|
||||
float fout, hp;
|
||||
float fout, fb, hp;
|
||||
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
for (uint32_t ovs = 0; ovs < 4; ovs++) {
|
||||
float in = voice->osc_audio[i];
|
||||
float fb = tanh(in - ((fout - 0.25*in) * synth->resonance * 6));
|
||||
|
||||
float clip = 1.0;
|
||||
fb = (in - ((fout - .33*in) * synth->resonance * 4)) / clip;
|
||||
|
||||
//fb = in * synth->resonance*5;
|
||||
|
||||
if (fb > 1) fb=1;
|
||||
if (fb < -1) fb=-1;
|
||||
|
||||
fb = 1.5 * fb - 0.5 * fb*fb*fb;
|
||||
|
||||
fb *= clip;
|
||||
|
||||
//fb *= 0.5;
|
||||
|
||||
delay1 = ((fb - delay1) * ct) + delay1;
|
||||
delay2 = ((delay1 - delay2) * ct) + delay2;
|
||||
|
|
Loading…
Reference in New Issue