You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on the CPC, if you type SOUND 1,1,500,15 you hear an high pitched note but actually it should be inaudible (it's a 62 kHz tone). Same if tone is 1,2,3... (any low numbered value).
I think this is due to aliasing generating when downsampling from 62.5 kHz (chip frequency) to 44.1 kHz. The solution is apply a low pass filter to the 62.5 kHz signal before the decimation step.
Unfortunately I'm not good at filter at design, I guess a simple IIR filter should be ok, the only issue is that it has to be variable because you can vary both the chip and the final audio frequency.
The text was updated successfully, but these errors were encountered:
I applied a low pass filter and the effect is way much less noticeable (it depends on the design of the LP filter).
Basically you calculate the sample at chip frequency instead of audio frequency, and then apply the filter on the sample. At audio frequency you only pick the filtered sample.
I am not satisfied yet because the filter needs to be calculated offline, making chip instantiation more complex. Perhaps there could be a sort of filter callback ?
Another downside is that it's more CPU intensive and the resulting audio is less rich in higher frequencies.
on the CPC, if you type
SOUND 1,1,500,15
you hear an high pitched note but actually it should be inaudible (it's a 62 kHz tone). Same if tone is 1,2,3... (any low numbered value).I think this is due to aliasing generating when downsampling from 62.5 kHz (chip frequency) to 44.1 kHz. The solution is apply a low pass filter to the 62.5 kHz signal before the decimation step.
Unfortunately I'm not good at filter at design, I guess a simple IIR filter should be ok, the only issue is that it has to be variable because you can vary both the chip and the final audio frequency.
The text was updated successfully, but these errors were encountered: