Sane values for filter

master
Peter Nelson 2010-01-13 11:37:26 +00:00
parent a0d54946b1
commit 864e4d1431
1 changed files with 4 additions and 4 deletions

View File

@ -17,8 +17,8 @@ static inline void voice_tick(struct voice_t *voice)
voice->sample++;
}
static double _R = 2.7;
static double _C = 4.3;
static double _R = 4700.0;
static double _C = 0.000000047;
static inline void voice_filter(struct voice_t *voice, float l, float r)
{
@ -53,8 +53,8 @@ void voice_run(struct voice_t *voice, uint32_t samples, float *left, float *righ
amplitude = env_getamplitude(&_env2, voice->sample, voice->released) * voice->velocity * voice->velocity * 1.5;
if (amplitude > 0.0) {
l *= voice->osc[1].tri * (1.0 + voice->osc[2].sin * 0.25);
r *= voice->osc[1].tri * (1.0 + voice->osc[2].sin * 0.25);
l += amplitude * voice->osc[1].tri * (1.0 + voice->osc[2].sin * 0.25);
r += amplitude * voice->osc[1].tri * (1.0 + voice->osc[2].sin * 0.25);
}
voice_filter(voice, l, r);