- attached wa2-bad.ogg
Resampler reduces quality a bit
While listening VGM songs with YM2612 chip, I hearing that sound is smoothed which can be better recognized while listening FM-generated drums.
Here is my shitty attempt which fixes quality of VGM, but damages quality of SPC even more:
https://bitbucket.org/Wohlstand/game-music-emu/commits/branch/better-resampler
I have attached next files:
- “wa2-bad.ogg“ - how it sounds now
- “wa2-good.ogg“ - how it should sound
- “397 - h-game.xmi-GEMS.vgm“ - sample file (required to merge this PR to play it correctly)
Comments (9)
-
Account Deactivated reporter -
Account Deactivated reporter - attached 397 - h-game.xmi-GEMS.vgm
Sample VGM file (to play it correctly this PR is required)
-
Account Deactivated reporter - edited description
-
repo owner Fir_Resampler has templated parameters to adjust quality of resampling, it would be possible to use different settings for VGM vs. SPC. VGM seems to use Dual_Resampler (which uses Fir_Resampler<12> behind the scenes), do you think it makes sense to try increasing the resampler width for VGM to fix audio quality instead?)
-
Account Deactivated reporter -
assigned issue to
-
assigned issue to
-
Account Deactivated reporter I also have tried to increase this number, however, nothing is changing. Anyway, FM chips doesn’t needs resampling and their output should be passed non-distorted. This resampler does distorsion of sound by unnecessary smoothing.
-
Account Deactivated reporter Okay, for the case of FM, I made next: https://bitbucket.org/Wohlstand/game-music-emu/commits/03d70998bbbb065231c8c70f58c62ccd24e6896a
which is a very quick solution which avoids resampling when it’s not needed: simply pass data as-is, but don’t distort it by unnecessary smoothing.
-
repo owner - changed status to resolved
resampler: Don't resample when sample rates are matched.
The FIR resampler is always in use on some emulators (VGM in particular but also SPC). The resampler produces high quality output when we have to resample, but we don't always have to resample and in that situation it's better to avoid adding noise.
This is a rework of a patch Wohlstand submitted [1] since it felt cleaner to me and doesn't rely on floating point arithmetic to be exact.
This fixes
#34. I can't even tell apart the "bad" and "good" quality samples though so if I've still got it wrong, please reopen.[1] https://bitbucket.org/Wohlstand/game-music-emu/commits/03d70998bbbb065231c8c70f58c62ccd24e6896a
→ <<cset 06b0125cb5fc>>
-
Account Deactivated reporter One commit you forgot to take: https://bitbucket.org/mpyne/game-music-emu/pull-requests/18/mame-ym2612-enable-internal-re-sampler-to
I have re-enabled MAME’s internal resampler which improves the sounding accuracy on it. Nuked is already accurate, MAME needed a little trick I made long time ago, but I have forgot to enable it here.
- Log in to comment
How it sounds now (it's smoother and it's hearing some of sound damage)