Coder Social home page Coder Social logo

andrewbholder / nsfplay Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.04 MB

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

Batchfile 0.05% Makefile 0.38% C++ 86.12% Shell 0.10% C 13.34% HTML 0.01%
music music-player nes retro sound nintendo nsf wav nsfplay chiptune

nsfplay's Introduction

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/

nsfplay's People

Contributors

admiralcurtiss avatar andrewbholder avatar bbbradsmith avatar eatnumber1 avatar jprjr avatar kylxbn avatar okaxaki avatar rwtodd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.