Could you explain what kind of lowpass filter is Hardbass using, and what simplification did you use in order to implement it on Atari?
Also, in your Java code SAMPLE_RATE is defined to be 1950 Hz, why not a more accurate value 1773447.0 / (8 * 114), (around 1944.57 Hz)?
Thanks for your questions.
> Could you explain what kind of lowpass filter is Hardbass using, and what simplification did you use in order to implement it on Atari?
It's not a decent/standard low pass filter anymore as it's over simplified.
First I experimented with FIR and IIR filters and various waveforms at around 16KHz in Java at 4bit.
Of course I got amazing results. Then I started to lower the frequency and when I got to the real frequency I wanted to use it turned out that multiple waveforms made no real sense and the different filter implementations & configurations all sounded kind of the same at this low frequency.
So I got the idea to drift away from a proper filter implementation as it was very resource hungry (they used multiple history values and had to re-calculate some values for their sample calculation each time you set the cutoff frequency).
I thought I'd try a single history value and simplifying the reconfiguration step into taking the scaled down values & the new value from a simple short lookup table. (also simplified the number of steps at which I let cutoff set from 256 to 16 to save memory as it gave me similar results anyways)
Then I realized this still sounded something like the lot more expensive proper filters I had implemented at this low frequency.
So that's what I implemented in assembly and that's what became HARDBASS.
> Also, in your Java code SAMPLE_RATE is defined to be 1950 Hz, why not a more accurate value 1773447.0 / (8 * 114), (around 1944.57 Hz)?
I just calculated it as 50 frames * 39 updates (there's 39 char lines per PAL frame if you count all invisible char lines = 312 scan lines).
Edited by Sandor / HARD, Sat Dec 16, 2017 4:04 PM.