LazyUSF Resampling? by shrimp at 10:44 AM EDT on October 21, 2014
Is this possible? I've tried all of Foobars resamplers but none work or am I doing something wrong? I make them active but I don't gain any resolution whatsoever. The reason I want to do this is to resample most low frequency N64 games.
by nothingtosay at 1:41 PM EDT on October 21, 2014
Upsampling something does not improve quality. Indeed, a theoretically ideal resampler would not change the sound at all. In fact, pretty much every digital-to-analog converter upsamples its output automatically anyway (it's a routine part of reconstruction), so everything you're listening to on your computer is upsampled anyway.

That said, if you're trying to artificially generate new frequencies through resampling, kode54's MultiResampler does that when you set it to use any interpolation besides sinc. Testing it on Banjo-Kazooie, it seems to mainly make the music sound noisier, even with linear and cubic interpolation and not just the very noisy zero order hold, but I could understand preferring the sound with it on.

Unfortunately, I doubt it's possible with USF as a format, and certainly not with LazyUSF or 64th Note as players, to increase the sampling rate in the way we can with SPC files, which would lead to real improved sound for those games with low sampling rates.
by shrimp at 2:40 PM EDT on October 21, 2014
Yeah I understand that no quality is gained but it does make the lower frequency games sound sharper and slightly more clearer. Especially Jet Force Gemini. I guess I just had to set it to another method other than Sinc Interpolation. A shame there isn't a method like resampling a SPC file for N64 music.
Thanks!
by kode54 at 3:13 PM EDT on October 22, 2014
The only way to resample those games would be to use HLE audio, and only at a much higher level than the existing HLE audio.

Even with HLE audio, the game still processes the low sample rate signal itself through the R4300i code.

Basically, you'd need to do the following:

1) Catch all the right HLE audio functions.
2) Duplicate process them to a higher sample rate output, scaling any sample rate or delay parameters accordingly, outputting to special side buffers. This will be really troublesome for IIR filtering, since the parameters for that are frequency dependent.
3) Duplicate any R4300i side processing on the audio signal, since it may not be 100% RSP side processing.
4) Observe that the DMA unit is being fed a block of low sample rate audio mixed by the above process, and instead substitute a high sample rate mixed block.

Merely resampling the output of the internal mixing routines will not make the quality better.

An alternative to that, is to apply hacks to each affected game or soundtrack, so they internally mix at ~44100Hz, like Mystical Ninja Starring Goemon does. Apparently the system has the CPU power to mix complex music at that rate, so it should still be possible to hack just the USF sets to mix their music at that rate. This assumes their mixer code is capable of calculating anything at arbitrary sample rates, such as IIR coefficients for CBFD's Rock Solid.

Either way of adjusting the game soundtracks to produce higher quality involves more work. The second method probably requires less work, since it will presumably work with existing USF players without modifications to the player, only requiring hacks to the USF set itself.
by shrimp at 3:32 PM EDT on October 22, 2014
Appreciate the response but I have no clue how to do any of that. I guess I'll just stick with your Multiresampler.
by nothingtosay at 5:17 PM EDT on October 22, 2014
That hack idea is very interesting. Wish I had the capability of attempting it, but I'm not a programmer. I recall reading on Wikipedia, which did not really have a source for the information, that the N64 was able to output up to 48 kHz.
by kode54 at 6:02 PM EDT on October 22, 2014
While the Nintendo 64 is capable of outputting arbitrary sample rates up to 48KHz, most games do not use rates that high, probably to conserve processing resources.

Yes, a post resampler will make it work with sound devices incapable of playing arbitrary rates, but it won't improve the quality in any way. Just thought I'd point that out.


Go to Page 0

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source