Closed biermanncarl closed 1 year ago
If there's one thing I've learned, it's that I have a terrible ear for these things. @ZeroByteOrg, on the other hand, seems to have a great ear for this stuff, so I'd really like his opinion on how this sounds.
Also, setting aside the build warnings-as-errors on Windows, do you happen to have a working sound player you can upload to this discussion thread? Mine all seem to be out-of-date.
I got one of the zsound examples working, so there's that at least. But I'd still like to get Zero's opinion on how much better this is over the existing audio.
Thanks for taking a look! I tested with TUNE.PRG, which uses both PSG and YM2151, so it is also useful to detect latency. The difference between old and new resampling method should be fairly apparent in SOLO.PRG, which is basically one phrase out of TUNE.PRG, where the aliasing is very prominent. sound_examples.zip
Should I add documentation on how I obtained the filter coefficients, so that the filter can be adjusted if need be?
And should the filter coefficients perhaps be offloaded into a .inl
file?
Well, the truth of the matter is that I'm not sure if anyone else would be able to take up the task of improving the collection of values unless they know what the values mean, and I'm not sure I follow the magic, personally, without a link to some article describing the algorithm, or at least a description of what the algorithm is called so I could look it up on my own.
@ZeroByteOrg asked me to generate some audio clip examples, et voila. wav-examples.zip
Personally, I think even I can hear the difference and think this is somewhat better. Not perfect, but improved over what's there. (The "with" examples are using this PR, the "without" examples are using the latest available build of Box16.)
Caught up with Zero, and he agrees it sounds much better.
Sounds pretty good to me. Certainly good enough to accept IMO.
Thanks for the feedback and for checking out the sound examples! Albeit I think the current status is already an improvement, I still would like to tweak the settings. The algo introduces a tiny bit of latency, which could be improved.
I have added some documentation on the approach with external links, and also adjusted the filter settings a bit. Probably no one will ever care about it, but incase they will, here it is... ;)
Thank you so much! This is even more than I'd hoped for. :3
I tried fixing the R8Brain resampling and was able to remove the crackling noise. However, it then suffered from huge latency, which made it unusable.
Hence I decided to write my own simple resampling algo, which removes most of the aliasing that the YM2151 was plagued with.