What Neither Witch Nor Fairy Actually Is

Neither Witch Nor Fairy is a small open-source utility that sits between Python and some older C-based audio processing libraries. It handles resampling and format conversion for game audio pipelines, specifically designed around the constraints of retro-style DSP chains. People who work in indie game audio or preservation projects tend to use it. It is not a general-purpose audio tool like FFmpeg. The project lives on GitHub and is maintained by a small team. It implements a specific set of resampling filters and header manipulation routines that standard tools either ignore or get wrong when dealing with console-era audio formats. That specificity is why it exists, and also why it is not useful for most people. I started using it around 2021 when I was porting a batch of SNES-era audio dumps and found that SoX and FFmpeg were both introducing audible artifacts during the final resampling step. The issue was specific to how those tools handle the filter cutoff near Nyquist for 16-bit PCM data at unusual sample rates like 28571 Hz. Neither Witch Nor Fairy uses a different filter design that preserves transients better in that range. I switched over and the artifacts disappeared.

Installation

The installation is straightforward if you are on Linux or macOS. Windows support exists but has been inconsistent across versions. Clone the repository and run the build commands: git clone https://github.com/nywhame/NWNF.git
cd NWNF
make That gives you a binary in the build directory. For pip users, there is a Python wrapper package available, though the Python bindings are a thin layer and some edge-case features only work through the CLI binary. If you need the full feature set, build from source. I ran into a problem once where the pip-installed version silently skipped certain header options that the CLI version supported. Took me two hours to realize the mismatch.

Basic Usage

The core command looks like this: nwnf resample input.wav output.wav --rate 28571 --filter nwwf The --filter flag is where the difference lies. Standard tools default to their own filter designs. nwwf tells the program to use its own filter kernel, which is tuned for the artifacts I mentioned above. Without that flag, it falls back to default behavior and you lose the benefit of the tool.

Get the Full Details

Korsett mit grüner Spitze | Neither a Witch nor a Fairy 2026 #785 – UNLABELED BERLIN
Korsett mit grüner Spitze | Neither a Witch nor a Fairy 2026 #785 – UNLABELED BERLIN

For batch processing, which is how most people actually use it: find . -name "*.wav" -exec nwnf resample {} {}.out --rate 28571 --filter nwwf \; I usually wrap that in a shell script with logging so I can check which files failed. The tool does not have a built-in retry mechanism, so if a file corrupts mid-process you have to track it down manually.

Advanced Features

There is a header editing mode that lets you modify sample rate and channel information without re-encoding the audio data. This is useful when you have correctly decoded the PCM stream but the container header says the wrong sample rate. I have seen this cause playback issues in emulators repeatedly because the header and the actual data were out of sync. The command is: nwnf edit-header input.wav --sample-rate 28571 --channels 2

This writes directly to the RIFF header. It does not touch the audio data at all. Fast, but one wrong value and your audio plays back at the wrong pitch. I learned that the hard way with a batch of ROM extracts where I had misread the documentation on one of the flags. Took about ten minutes to fix, but it could have been worse.

"Neither witch nor demon." : r/TheOwlHouse
"Neither witch nor demon." : r/TheOwlHouse

Limitations and When It Fails

The tool does not handle floating-point audio well. If your source files are 32-bit float, you will get unexpected results or crashes. Stick to 16-bit or 24-bit integer PCM. It also does not support compressed formats like MP3 or OGG. You need WAV files as input and output. The sample rate options are somewhat limited. It has preset rates for common console hardware (28571, 32000, 44100, 48000) and allows custom rates, but arbitrary custom rates may produce aliasing depending on your source material. The filter is not a universal solution for every resampling problem. If you need broad format support, use FFmpeg. If you need precise resampling behavior for specific retro audio formats, this is one of the few tools that gets it right. There are no other widely available alternatives that handle the nwwf filter design.

A Note on the Name

The name comes from the old joke that the creator was neither a witch nor a fairy and therefore had to solve problems manually. It is a running theme in the commit messages. Not important to the functionality, but worth knowing if you read through the source.