Skip to content

NSFPlay - play back .nsf 'NES Sound Format' files on your PC and render them as .wav files, a custom fork made by KYLXBN for an opinionated listening experience

Notifications You must be signed in to change notification settings

AndrewBHolder/nsfplay

Repository files navigation

NSFPlay fork by KYLXBN

Description

This NSFPlay fork was made to remove so called "chip limitations" that are present on the original hardware which are also emulated by NSFPlay (which is required for accuracy).

These chip limitations are probably a result of cost-cutting when developing the sound chips. While they definitely add to the charm and unique feel of old sound chips like what the NES has (and are in my strong opinion, very important to preserve), they are in the end limitations which I tried to remove (or improve) in this fork.

This is merely a fun experiment to see how such an "idealized" sound chip could sound like. I do not endorse that the 2A03 or any sound chip emulated by NSFPlay "should sound like this." This is never the right way to preserve or emulate retro sound chips. Nevertheless, it is fun and interesting to hear the difference of what it could have sounded like if the chips were manufactured more like the MOS 6581.

Modifications

Here are the modifications that were applied to NSFPlay. These are highly opinionated changes.

2A03

  • Mix audio with floating-point precision
  • Generate a smooth triangle wave (similar to the MOS 6581)
  • Average / antialias the value of the noise channel with floating-point values
  • Apply ISO 226:2003 loudness compensation to the triangle channel to make it easier to hear
  • Force linear mixing of all channels

VRC6

  • Mix audio with floating-point precision
  • Generate a smooth sawtooth wave (similar to the MOS 6581)

VRC7

  • Mix audio with floating-point precision (this is enough to eliminate the bit-crush effect that is audible as hissing noise)

N163

  • Mix audio with floating-point precision
  • Remove all aliasing artifacts

Known limitations

This is a hack-ish project, and I do not claim to have done things in the best way. Here are some problems you might encounter along the way.

  • Triangle wave can sometimes be too loud since many songs expect a non-volume-compensated triangle wave.
  • Most (if not all) of the modifications cannot be disabled. Use the original NSFPlay if you want an accurate emulation.
  • Crashes, maybe?
  • Extremely high CPU usage because of unoptimized floating-point computations. Render to WAV if your PC can't handle real time playback.
  • You can't change the Quality slider, else the audio might sound plain wrong. The code needs it to be set to the default 10 value.

Original readme.txt

NSFPlay/NSFPlug source code

The original code is maintained by Brad Smith. It is a fork of NSFPlay/NSFPlug by Brezza. The latest version should be available at https://bbbradsmith.github.io/nsfplay/.

Unstable preview builds will be automatically generated by Appveyor.

This code contains several modifications to original, see nsfplay.txt for a list of changes.

I have presumed based on text comments and readme files in the original code that it is distributed freely, and modification and redistribution is permitted. The same permissive license applies to this version of the code I maintain. You may reuse this code without restriction, and no warranty or liability is implied on my part.

Feel free to contact me with questions or comments.

Brad Smith
nsfplay AT rainwarrior.ca
http://rainwarrior.ca

Original NSFPlay/NFSPlug project available at: http://www.pokipoki.org/dsa/

About

NSFPlay - play back .nsf 'NES Sound Format' files on your PC and render them as .wav files, a custom fork made by KYLXBN for an opinionated listening experience

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages