Skip to content

About

Wave to NES converter using only base generators, without DPCM.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

SampleToNES

PyPI Python License

SampleToNES

SampleToNES

Overview

SampleToNES (sampletones) is a desktop tool for people writing music for the NES 2A03 sound chip, mainly in FamiTracker or Bitphase.

SampleToNES

The core idea is to approximate an audio sample using only the chip's basic oscillators — two pulse channels, a triangle, and noise — without any DPCM samples.

A built-in sequencer lets you arrange the reconstructed samples into patterns and play them back inside the application, so you can experiment with the results before exporting the instruments into FamiTracker.

With it you can:

  • convert your own recordings — WAV, MP3, FLAC, OGG, AIFF or AU — into NES instruments
  • choose which of the four channels each recording may use, and how loud it plays on them
  • arrange the results into a song and play it back in the app
  • export instruments and songs for:

Installation

You can install SampleToNES in three ways:

  • Download a release for Windows or Linux from the releases page, extract it, and start sampletones.

  • Install from PyPI on Windows, macOS or Linux. You need Python 3.12 or newer. On Linux and macOS, install the audio and file dialog libraries first:

    sudo apt-get install libportaudio2 libasound2 python3-tk    # Debian and Ubuntu
    brew install portaudio                                      # macOS

    Then install the app and start it:

    uv tool install sampletones      # or: pipx install sampletones
    sampletones
  • Run from source with Python 3.12 or newer and uv: make system-deps, make setup, then make run.

An NVIDIA graphics card can speed up conversion. The installation guide covers the system libraries each way needs, GPU support, and building a standalone app yourself.

Usage

sampletones starts the app. Your work is saved in a SampleToNES folder inside your documents folder.

Every operation is also a named command — sampletones convert <audio-path> reconstructs a recording without the interface, for example. Run sampletones --help for the list, and see the command-line guide.

Documentation

The user guide explains how to use the app, step by step. The app opens it in your browser from Help ▸ Documentation. The rest of docs/ covers the reconstruction algorithms, the file formats, the Python API and the developer notes.

License

SampleToNES is released under the MIT License.

The bundled fonts are third-party works under their own licenses (SIL Open Font License 1.1 and the Bitstream Vera license) and are not covered by the MIT License.

The standalone bundles on the releases page additionally contain the Python runtime and every dependency, including several LGPL-licensed libraries. THIRD-PARTY-NOTICES.md lists everything they redistribute and what its license requires; the full license texts are in THIRD-PARTY-LICENSES.txt and ship inside each bundle.

About

Wave to NES converter using only base generators, without DPCM.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages