most accurate sound emulation settings for NES/SNES by VideoGameScrapBook at 10:01 PM EDT on September 5, 2008
So I've started a "Brawl Originals" series on my website, which is a collection of all the original versions of the rearranged songs from Brawl. I've searched forever for some recommendations on what to do to achieve the most accurate playback of NSF and SPCs.
I'm fairly certain I have the SNES settings as accurate as they can get. Except I do have analog simulation disabled, because I don't trust it would produce the effect naturally enough, and I assume it's essentially just a filter that could be added later if it's actually wanted.
The NES on the other hand, is a big question mark.
-What sample rate should I be using for NES sound? -Does NES audio need 16 bit resolution for accurate sound, or can the sound be in 8 bit resolution?
I generally use the latest NEZplug for NES. For added accuracy, I use ugetab's $4017 fixes where appropriate. Ages ago, I compared Nosefart's output to that of my actual NES via headphones and concluded that the NES analogue out outputs at ~22050hz, but that might be inaccurate.
For SNES, if I'm going for accuracy, I use mudlord's GME plugin with the "actual SNES output rate" option enabled. As far as SNESamp, just take the "like the SNES" settings and disable the analogue simulation. If you really want to be anal, you could always make wav logs from bsnes or SNESeSe, but I haven't tried that approach yet to verify accuracy.
Thanks JILost for sharing your sample frequency tests! That seems about right to my ear as well, but I'm going to stick with 32000 just in case it's slightly above. I'd rather the output be a smidge too good than a smidge too bad.
I looked up NEZplug and there were a number of people who complained about the inaccuracy. Maybe without the mentioned fixes? It also looks like it isn't being updated anymore, so I'm going to stick with NotSo Fatso. If anybody can prove that that plugin's accuracy leaves much to be desired, I'd be happy to change.
I read some forums b/w mudlord, blargg, and some others that is still being posted to today, about making a more accurate SPC plugin. Since it's a bit early, I'll stick with SNESamp for now, but I'm definitely going to be keeping an eye on it.
NEZplug not being updated? Perhaps not by the original author, but it's certainly being updated regularly. Have a look at http://offgao.no-ip.org/program/nezplug++.html. Give that a try, and see for yourself if it's what you're looking for. As for NotSoFatSo, it's not being updated either. If you're going to use NotSoFatSo though, then you'll probably want to use UNKOWNFILE's build, which has *WAY* better VRC7 support than the original NotSoFatSo has. I've also heard good things about NSFplug, but I don't use it myself, so I don't have much input on that one.
Hope that helps a little though. Mouser X over and out.
Yeah, NEZPlug is long dead, don't use it for recording. NEZPlug++ though, the one Mouser linked, is updated frequently and has the highest compatibility out of all NSF plugins.
Thanks for pointing out UNKNOWNFILE's NotSoFatSo, which I am now using the latest build (April 2008). I tried NESPlug++, but it's not playing nicely with my barebones version of Winamp 2. I assume with UNKOWNFILE's VRC7 support, the output of both plugins should be comparable?
For anybody who is interested concerning SNESAmp accuracy: blargg from ZSNES: "I doubt anyone could tell the difference, except for a few cases where some obscure inaccuracy is exposed. An accurate player will click in Donkey Kong Country - Fear Factory about 41 seconds in, and Cave Dweller Concert around 71 seconds in (1:11) on the right side. The opening monster scream on Chrono Trigger - Last Battle also sounds slightly off if the pitch modulation isn't emulated exactly"
As far as the SPC plugin, there's one out there (in_spc) which uses BSNES's sound core and there's in_mgme, which uses a (possibly related) cycle-accurate SPC core, so there's not much reason not to use that one if you're going for dead-on accuracy. There's actually the occasional incident ("For Pete's Sake" from the first Earthworm Jim, for example) where in_spc is accurate and SNESamp isn't...and it's very, very noticeable. But you're right, SNESamp is very accurate and 95% of the time, it'll do just fine.
I haven't tried NotSo recently, but I do know that when I was recording a Castlevania CD for my friend and wanted the use of emulation to be undetectable, I scrutinized line-in recordings from my Famicom and compared them to the output from several plugins; NEZplug++'s output was, to my ears, indistinguishable from the WAV, so I stopped trying to find a better one. I might have to check a recent version of NotSo out some time and compare that to the WAV, too.
While I'm not the authority on this, I would agree with JILost about NotSo and NEZplug. UF did a comparison recording awhile back, and the difference was noticeable. However, most of UF's comparisons were to show how emulators handled the VRC7 chip. Since UF has been working on NotSoFatSo, I think that as far as VRC7 emulation goes, NotSoFatSo is the plugin of choice. But since there's very few games that use the VRC7, you might want to use NEZplug instead (I've heard enough to believe that overall, NEZplug has the better emulation, but that UF's NotSo build is the one for VRC7 tunes). You can always do a comparison to see which, in your opinion, is the better plugin of choice. If you have a NES cart (and NES) (or can find the right kind of OST), you can get the matching NSF and try various settings to see which is the optimal situation.
Generally, in regards to NSF, I do what Knurek or anewuser tells me. While I like NSF, they both like it a lot more than I do. Sorry I can't help much more than I have. Mouser X over and out.
shameless plug by unknownfile at 1:21 AM EDT on September 7, 2008
hi.
notsofatso ufmix is now using mame code. this means that i am now attempting to piss off people that matter.
Anybody have an opinion on the most accurate GBS and GFS plugin? Is there a maximum sample rate that the original Game Boy uses?
Unknownfile, I've tried several versions of your NotSoFatSo, but all of them are botching the very first note you hear when losing a life in Super Mario Bros. I've matched the settings for the last official release of NotSoFatSo, and that plugin doesn't have a problem. I'm using Winamp 2.
And it's not like you have much choice when it comes to GSF plugins, as there's only one. :)
HOW TO MAKE THE SMB NSF NOT SHIT by unknownfile at 8:22 PM EDT on September 7, 2008
Select Config 3.
1) Force $4017 Write: Force $00 2) Uncheck all in Misc 3) Ignore BRK, Ignore Illegal Opcodes, Reset 6502 regs, Ignore NSF version number are all checked.
1. Which settings can I leave like that without risking compromising the output quality of other NSFs? 2. If I need to do that, does that mean I have a slightly faulty NSF rip? 3. What's the best place to get trustworthy NSF rips? 4. UF, any arguments against NEZPlug++ not being as accurate as NotSoFatSo for games other than those made by Konami?
I'm going to use NEZPlug++ for ripping it seems, but I'm definitely going to hold onto NotSoFatSo for whenever I feel like playing around with the sound.
I've been uploading all emulated music format I could find to Modland (http://www.exotica.org.uk/mediawiki/index.php?title=Special:Modland&md=for&id=203).
If you want most of them in one place, here's my NSF package: http://snesmusic.org/hoot/nsf/nsf_games.rar
Didn't update it yet with some new Gil_Galad rips, but other than that it should be complete (and it's organized a bit better than Modland).
Also, you seem to misunderstand something. UF's work on NotSoFatso was mostly for VRC7 chip (basically an OPLL), which was used in only one commercial game (Konami's Lagrange Point).
edited 3:13 AM EDT September 8, 2008
by unknownfile at 11:10 PM EDT on September 8, 2008
unless you want vrc7 accuracy, don't bother using notsofatso as very little is changed. knurek answered it best, the only thing i did was make a specific soundtrack sound more accurate.
Thanks everybody for the help. Here's my new understanding of what plugins/settings are the most faithful to the original hardware. If any of this is wrong, please correct and I will either update this post, or create a new one in this thread if I can't edit anymore:
NSF - NEZPlug++ v0.9.4.8 + 2 + 17.01 (x86)
GBS - NEZPlug++ v0.9.4.8 + 2 + 17.01 (x86)
SPC - in_spc (very early plugin based on BSNES, no seek/tags support) -Sample Rate - 32000 Hz -alternative: in_mgme: "You can copy the accurate Spc_Dsp.h and Spc_Dsp.cpp files into your MGME plugin source, recompile, and get fully accurate DSP emulation in GME" -blargg from ZSNES Forums
Remaining questions: -What settings would produce the most faithful N64 sound for 64th note? -What is the maximum sample rate used for GBA and DS games? -Do any systems have 8 bit sample resolution instead of 16 bit?
Not going into details, HLE is anything but faithful. It speeds up things a lot, but can introduce *A LOT* of errors here and there.
Here's a little suggestion for NEZPlug based writing. I don't think there will be any quality difference between 32000 and 44100 (if the highest possible frequency NES can output is 16 kHz, the 44100 setting will just have a lot of unneeded data). And having the wavs/mp3s/whatever you plan on doing in 44100 will help when someone wants to write your rips to a CD (no resampling required, and I guess most CD writing programs don't use a good resampler algo). Just something to think about.
Also, if you gotten the NSF pack I've listed, take a look at Super Mario Bros. (1985)(Nintendo). It has two files, the standard NSF and an M3u file with tagging/timing data (should be pretty selfexplaining, but if you have any questions, feel free to ask). Since you're probably gonna make the data anyway for the rips, why not compile it into the M3u file and send it my way. I'll include it in the next update, and more people will be able to listen to the tagged NSF without having to download your MP3 rip. :)
What do you mean by compiling the data into the m3u file? I'm only going to be concentrating on getting the tags correct for the music tracks featured in Brawl instead of all the tracks from every featured game, otherwise I'll go insane by the amount of work that would be required. If I do tag all of the tracks from a game though, I'll be sure to upload a m3u playlist.
I am going to release the emulated files and a playlist with each release (I'm redoing the one that's already on the site). I'm already going slightly batty by the effort this has taken. I think people will be pleased when all is said and done.
So are you certain that the NES outputs at 16kHz? Can you point me to a source? Do you happen to know what the sample rate is for the Game Boy?
NES doesn't output at a particular frequency (well, there is an upper limit, but it's quite high); unlike the SPC where there is a digital signal generated (and then analog filtering), there is a large aspect of analog effects involved in the mixing. Effectively any sample rate you use will involve a resampling of the signal, and the best way to do that (from what I've heard, at least) is the bandlimited synthesis blargg uses in GME. This comes from no real signal processing and little 2A03 background, so take for what it's worth.
What hcs said. And since the 44100 sampling rate doesn't loose anything compared to 32000 (44100 allows for frequencies up to 22050 Hz, 32000 for 16000 Hz), it's pretty much best to leave it at a value that won't cause additional resampling when the user wants to write the files as CD Audio (which by desing has to be in 44100).
Also, yeah, blargg's bandlimited synth does sound nice. I kinda hope Offgao puts that in NEZPlug++ eventually.
Thanks hcs and Knurek, I suspected it would be something like that. Though given a scenario where you have to pick a maximum rate, I wonder which one would produce the most accurate sound. There's distinct differences in the "white noise" sound to me depending on what's chosen. Theoretically, would 48000 Hz be the way to go if we assumed mp3 players were the priority, not CD burning?
What other Nintendo systems use analog effects in the mixing? Are any of the sample rate upper limits known for any Nintendo system other than the SNES/N64/Gamecube/Wii?
I haven't seen much MP3s encoded with 48kHz, so I'm not sure it's a good idea.
Also, take care with NEZPlug++ and large sampling rates. Did a quick test of Super Mario Bros. sampled at 96 kHz and there were some noticable errors in the wave. Might be just my system though.
Yeah, I quickly decided against 96 kHz because I suspected there would be sound card issues, and most mp3 players wouldn't even support that as far as I know.
Yes, I'm aware there aren't many mp3s at 48kHz, but that sample rate isn't so rare in audio recording. I was trying to be forward thinking about things, since the only reason I believe most mp3 is in 44100 is because of the CD being the primary source of our music.
But now I'm thinking 44100 Hz for another reason, that being MP3 compression efficiency. I want the most "bang for the buck", a quality high enough so that it is virtually indistinguishable from the source for about 95% of the population, but at the lowest possible filesize due to distribution concerns. I suspect an even lower sampling rate would be ideal when looking at things through that perspective, but 44.1 kHz would be the answer people would want to hear most.
For N64 (can't speak for others) the sample rate isn't fixed, so depends on the game, but you seem to already know that.
I know nothing about GB hardware.
GC may be fixed at 48khz but I don't actually know. If you're decoding streams using the stream's own sample rate is pretty much the best idea.
As for the NES noise, yeah, that's pretty sensitive... don't know what I'd go with. Maybe do 44.1khz and compare it to Nintendo's CD releases? Finding the settings that sound/look closest to that at 44.1khz?
[edit] 44.1khz is best from a well-supported-plays-everywhere-without-(software)-resampling POV, and the quality is almost universally acceptable.
Oh, I wasn't thinking of using 96kHz for release. But you can wavewrite and resample to 32kHz/44.1kHz using a good resampler (freeware Audacity for one).
And I think the psychoacoustic modelling in MP3s is optimized for 44.1 kHz, though this kind of thing you'd have to check on hydrogenaudio forums or similiar places.
from what I can tell, NotSoFatso cranks DPCM up higher than other NSF players; something to bear in mind if you plan on using it. ISTR Disch recommending using NSFPlug instead as far as accuracy is concerned, though I don't know what the status quo is these days.
Knurek, that's a pretty cool idea. I would do it if if your experiment didn't produce a slightly faulty output and if 96 kHz was tested by a lot more people. I'm afraid of the possibility that there could be some obscure bugs when using a higher frequency than what it's usually tested at.
Lunar, what makes NSFPlug more accurate? I want to go with NEZPlug++ since a lot of people seem to think that's the way to go, but if you can point me somewhere that does a good job of explaining NSFPlug's superiority in accuracy, than I'd definitely be willing to switch.
NSFPlug is more accurate than NotSoFatso. It also has a nice option of selecting few sound presets (few variants of Famicom, NES). But compatibility wise, NEZPlug++ wins clearly, as NSFPlug doesn't have proper $4015 and $4017 APU registers emulation at all (not to mention other stuff as wll), which breaks a lot of NSFs (of the top of my head, Door Door (1985)(Chunsoft, Enix).nsf).
I'm using the latest NEZPlug++ (0.9.4.8 + 2). There is a very quick pop at the very beginning of a number of NES and GB games' songs. Examples include Super Mario Bros., Super Mario Land, and Link's Awakening. Games like Super Mario Bros. 3 don't have the pop when you switch tracks. The pop is most noticeable for the GBS examples. I've been editing it out, but I was wondering if anybody has any clue on how I could avoid this for my Brawl originals rip project. Does an actual NES/GB produce a quick pop right as it starts playing these songs?
i do have an issue with NEZPlug that happens sometimes. i go to change to the next track, and it starts to play twice or even three times (like if you were to press the play button three times in a row). anyone else encounter that?
@VGSB: I just noticed this issue a day or two ago. It seems that I had this problem before, but I cannot remember what I did to fix it.
@Lunar: I never encountered this problem before. It sounds like it may be a plugin conflict. (And the fact that you are also having trouble playing ugetab's USFs seem to confirm my suspicions.)
the problem is with that USF set. it plays, there is no sound. no other USF set does it. it isn't a plugin conflict. if it was, it wouldn't play at all. same goes for any other plugin.
OK. The USF set in question seems to play fine for everyone else, so I figured that it may be a plugin issue on your end. But, I guess that is not the case.
Concerning your NEZPlug issue, I will keep an eye out for that problem as I use NEZPlug and let you know if I figure anything out.
If I'm on going for accuracy, what kind of audio interpolation should I use for Highly Advanced GSF? The default is "bandlimited". Should I switch that to "none"?
The lowpass filter enabled with no interpolation sounds the best (most accurate.) No matter how you slice it, Highly Advanced kinda really sucks. New plugin! New plugin! New plugin!
Something based on VBA-M would be a step in the right direction.
Did you compare it with the low pass filter enabled and disabled for Highly Advanced? How about interpolation and echo? It's possible that the plugin's low pass filter sounds less accurate if the techique isn't similar to the actual hardware. Anybody else care to give their opinion?
VGSB: that thing you point to says that their add-on digitizer hardware has a low-pass filter, not that the GBA itself does. (Indeed, I strongly doubt the GBA has any such thing given that it's primary sonic characteristic is digital hash noise).
So glad I discovered this thread. I recently had a loss of plugins and couldn't remember why the version of NEZplug I'd lost was better than the only one I could find. I'd forgotten that I'd upgraded to the ++ version. Really that was annoying the hell out of me.
Was anyone ever able to figure out the pop/click problem with some GBS files for NEZplug that was mentioned before? Curious on how to fix that
I believe that happens on the real hardware as well. You can always make a .gb file from the .gbs one (ugetab has a nice frontend on his site) and try in one of the good GB emulators (BGB, KiGB) or the original hardware if you have a linker. :)
Can somebody tell me why nezplay.exe sometimes freezes when I switch to the next track? I like using it to listen to .gbs files but I can rarely get to later tracks because it will most likely freeze by the time I get there. The track it freezes on is always random, too. I'm using Vista.
Inspired by hcs's post at the bottom of the second page where he said the NES had no fixed sampling rate but that its max was quite high, I figured, "Hell, I've got an NES right over there. Let's plug it in and record it!" So after some hours of trying to get my worn-out 72-pin connector to work, with the top still off, I found a way I can jam something over the cartridge and get it to work decently.
I have an Alesis io14, which can record up to 192kHz, so I plugged directly into it from the audio output of the NES (not the RF one). It's a little quiet but it's adequate and gives as pure a signal path as possible without a preamp or some such thing altering it in any way. I tested with Mario 2 and 3, Ninja Gaiden, and Rad Racer. Maybe this is basic knowledge to some people, but my conclusion can only be that the NES uses at least a 192kHz sampling rate. And I have a spectogram to prove it.
This is just a short few bleeps from Rad Racer when you press the start button, but it illustrates as well as any music. The right channel had nothing plugged into it but I kept it to show the noise my io14 generates on its own, even when no input is present, so you can identify it in the other channel. The horizontal lines all throughout the left channel are a buzz and its harmonics that I'm not sure is normal or not (it may be because I don't have the metal shield in it because if I put it and the top back on I wouldn't be able to get to where I'm having to wedge something to make the thing to work at all). The reddish bars and the corresponding blue ones above them are the square waves and their harmonics, i.e. what we care about. As you can see, there's a fairly pronounced one up between 91-92kHz and it looks like more right at the top of my device's range. I'm sure they'd go on if I could even record them.
If anyone objects to my methodology or results, I'd be happy to see another test performed to compare with. If you want to examine my Rad Racer bleep recording, here it is.
By "quite high" I meant "on the order of the CPU clock speed". If you wanted to deal with it as a pure digital signal you'd be sampling at rates well into the megahertz range.
The frequency of the pulse channels is a division of the CPU clock (1.789773MHz NTSC, 1.662607MHz PAL). The output frequency (f) of the generator can be determined by the 11-bit period value (t) written to $4002-4003/$4006-4007.
I had a feeling it'd be one of those situations, but since it was never really said its sampling rate would for sure be above what NEZplug could generate, I thought I'd give it a shot. The harmonics were getting quieter and quieter, so I expect it stops producing any detectable music far below the Nyquist frequency of its sampling rate. It'd be somewhat interesting to find out where exactly it stops, though it serves no real purpose for anything.
I figured I'd try to find out which NSF player sounds closest to my recording, and to my ears it seems to be foobar's Game Emu Player. NEZplug++ is pretty decent but NotSoFatso clearly comes in last place. I have mine configured to all channels same volume, panned center, mono output, highpass filter at 50, and I tried the lowpass filter on at 40,000 and off. The noise channel is too loud, but of course that's customizable, though I think theoretically it's supposed to be correct when they're all at the same volume. (Just wanted to say, I'm not knocking NotSoFatso and this does not prevent it from being my favored player since it's the only one that has the features it does. It doesn't sound bad when trying to sound like the NES actually does and greatly succeeds when it's set to perform better.) If anyone wants to hear it themselves, I can save you the work of editing, volume-matching and time-aligning (so you can have them lined up switch back and forth as you're playing) the outputs of the various plugins. Here are my test files, time-aligned as best I could do since they don't really sync up very well.
I also did a recording with the original Game Boy and the sampling rate/frequency thing is essentially the same, but with no apparent quieting of harmonics. And I've gotta say, NEZplug++ sounds damn near PERFECT. Its output's phase is inverted and the waves appear visually different, but doing a volume-matched, aligned comparison of my recording from the hardware to the emulated version, a distinction is only barely discernible and I wouldn't be surprised if that only exists because of slight changes/losses incurred from the analog output and recording. Game Emu Player sounds close but slightly less so. Here are my test files, with the same treatment as the others.
Is there a version of NotsoFatso newer than v0.86 that fixes the audio channel outputs so that the output is consistent every time a song is played?
I've noticed a couple tracks in some NSF's that will sound different almost every single time their played in NotsoFatso and NotsoFatso is my favourite NSF player :/