Audio upsampling in emulators

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.
Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
User avatar
johannesmutlu
Posts: 45
Joined: Fri Mar 11, 2011 2:22 pm

Audio upsampling in emulators

Post by johannesmutlu »

Hi.
Does somebody of you guys know if it is possible to update snes9x or zsnes emulator with 16 to 24bit upsampling at 380khz???
My main idea is that it make the audio better, especially if unwanted noise in certain snes games like zelda 3, castlevania 5 etc.. could be pushed to inaudible frequencies.
Also it would be cool if a high quality audio stretching algorithm will be implemented as well.
That’s because most snes games do use shortened samples to make them all fit within that 64KB ram space, as a result, when the snes stretches those audio samples they will sound very dry/ribbing, wich can be clearly heard in games such as supermario allstars or at certain notes in supermario kart.
(Just compare those sound effects from those gba versions of those supermariobros series of games with that of the snes version and you will hear what i mean)
My idea is by using advanced audio stretching those shortened samples will no longer sounding ribbing. And along with 24bit upsampling, those audio samples may sound in theory by far more closer to the original source,not perfect but still just slightly better.
Sure you might could replace all those samples with larger ones and use sound swapping to get around that 64KB ram limit or you may could use the msu1 chip and use those samples straight from those source materials, but i can imagine that that will be a looong tadious process to do so.
If an advanced 24bit upsampling feature along with advanced audio stretching algorithm as a cheaper alternative will be implanted in those snes emulators, those existing audio samples in those snes games might be atleast get sounding much better.
To make it efficient, those emulators should first and only high quality audio stretch those samples once needed,and that 24bit upsampling process should be done after the construction process.
Note: not each instrument or sound effect from each game does suffer from noise or ribbing audio, that depends at how much they were downsampled and stretched,but sadly most audio samples in most snes games do suffer from this.
Now while it is true that sound effects in certain games do get extra stretched on purpose to fake a reverb/echo effect in certain levels like in those underground and castle levels in supermario allstars for instance, but i honestly don’t like that effect, i rather have real echo like in supermarioworld or in those gba versions of those supermariobros series of games.
So the question is, is it possible to give those audio samples in snes games such treatment or not?
I personally believe it’s possible, even if that requires a lot of extra processing power.
Last edited by johannesmutlu on Thu Sep 05, 2024 1:12 am, edited 1 time in total.
User avatar
Dwedit
Posts: 5257
Joined: Fri Nov 19, 2004 7:35 pm

Re: Audio upsampling in emulators

Post by Dwedit »

The instrument samples have already had their high frequency content cut out of the sample, either by BRR compression, reducing the sampling rate, or both. It's gone. There's no magic wand that will give you back your original sample. You can't get it back by resampling the instrument at an extremely high rate.

In order to get better instrument samples, you need track them down. The best case would be finding the original source of the samples. It could be possible to modify an emulator to use higher quality alternative instrument samples.

Yes, I know we are in the era of AI-generated stuff, but I don't know if anyone has had any success with an AI model that takes a low quality instrument sample and generates the same instrument sample in higher quality.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
johannesmutlu
Posts: 45
Joined: Fri Mar 11, 2011 2:22 pm

Re: Audio upsampling in emulators

Post by johannesmutlu »

Well i think we have to indeed track down those oroginal samples and then convert them to BRR at a much higher quality and then use sound swapping instead just to get around that 64KB audio ram limit as seen in tales of fantansia and star ocean etc… in order to allow much better audio quality while using sound streaming and to better ecknoqledge the snes sound capabilities.
So i really do wonder how much better those sound effects & instruments could be in supermario allstars or how about improving those voices in snes streetfighter 2 etc…
Yeah i hate to say it but despites the infirior soundchip of the gba, those sound effects in those supermario advance games are of much better in quality then that of supermario allstars.
Eventhrough in most cases i don’t like those used instruments in those gba versions.
User avatar
creaothceann
Posts: 863
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany

Re: Audio upsampling in emulators

Post by creaothceann »

Dwedit wrote: Thu Aug 29, 2024 3:34 pm In order to get better instrument samples, you need track them down. The best case would be finding the original source of the samples.
There are some people on YT that call this "restored songs":
Lumy does call it "resampled".

johannesmutlu wrote: Fri Aug 30, 2024 12:35 pm we have to indeed track down those oroginal [sic] samples and then convert them to BRR at a much higher quality
Might not be possible, and it's just easier to use MSU1.
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10