|
@@ -8,7 +8,7 @@ void sound_engine_filter_set_coeff(SoundEngineFilter *flt, uint32_t frequency, u
|
|
|
|
|
|
|
|
void sound_engine_filter_cycle(SoundEngineFilter *flt, int32_t input) // don't ask me how it works, stolen from Furnace tracker TSU synth
|
|
void sound_engine_filter_cycle(SoundEngineFilter *flt, int32_t input) // don't ask me how it works, stolen from Furnace tracker TSU synth
|
|
|
{
|
|
{
|
|
|
- input /= 4;
|
|
|
|
|
|
|
+ input /= 8;
|
|
|
flt->low = flt->low + ((flt->cutoff * flt->band) >> 16);
|
|
flt->low = flt->low + ((flt->cutoff * flt->band) >> 16);
|
|
|
flt->high = input - flt->low - (((256 - flt->resonance) * flt->band) >> 8);
|
|
flt->high = input - flt->low - (((256 - flt->resonance) * flt->band) >> 8);
|
|
|
flt->band = ((flt->cutoff * flt->high) >> 16) + flt->band;
|
|
flt->band = ((flt->cutoff * flt->high) >> 16) + flt->band;
|
|
@@ -16,15 +16,15 @@ void sound_engine_filter_cycle(SoundEngineFilter *flt, int32_t input) // don't a
|
|
|
|
|
|
|
|
int32_t sound_engine_output_lowpass(SoundEngineFilter *flt)
|
|
int32_t sound_engine_output_lowpass(SoundEngineFilter *flt)
|
|
|
{
|
|
{
|
|
|
- return flt->low * 4;
|
|
|
|
|
|
|
+ return flt->low * 8;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int32_t sound_engine_output_highpass(SoundEngineFilter *flt)
|
|
int32_t sound_engine_output_highpass(SoundEngineFilter *flt)
|
|
|
{
|
|
{
|
|
|
- return flt->high * 4;
|
|
|
|
|
|
|
+ return flt->high * 8;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int32_t sound_engine_output_bandpass(SoundEngineFilter *flt)
|
|
int32_t sound_engine_output_bandpass(SoundEngineFilter *flt)
|
|
|
{
|
|
{
|
|
|
- return flt->band * 4;
|
|
|
|
|
|
|
+ return flt->band * 8;
|
|
|
}
|
|
}
|