A high-accuracy Organya to raw audio conversion tool written in Rust
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Luna Catkins e77af1a650
use lanczos kernel size of 3
2 months ago
assets/samples First usable vaguely working alpha! 2 years ago
src use lanczos kernel size of 3 2 months ago
.gitignore .gitignore: ignore flac files 2 years ago
Cargo.lock main.rs: Add total time display and rendering speed display 2 years ago
Cargo.toml main.rs: Add total time display and rendering speed display 2 years ago
LICENSE Initial checkin 2 years ago
README.md implement lanczos interpolation 2 months ago
run ACTUALLY make run script use release build. Git, why\? 2 years ago
run_debug make run script use release build by default (10x faster), add run_debug script 2 years ago



Organism is an Organya to wave audio conversion program.
It is written in Rust, and aims to be fast, easy to use, and produce highly accurate conversions.

Right now, the program works, but the interface is incredibly primitive. See usage for more information.

If you wanna hear how it sounds, you can find a demo here.


git clone https://gitdab.com/LunarLambda/organism.git
cd organism
cargo install --path .


After installing, you can render Organya files like so:

organism organya_file loops "wav" > output_file

If you omit the third argument (which must be the string wav), then only raw PCM data will be output.

Alternatively, you can run organism without installing it, by using the included run script, which always uses wav output:

If you don't specify the number of loops, it defaults to 1.

# Output to wav file
./run organya_file > output.wav

# Output to flac file
./run organya_file | flac -sV8fo output.flac -

# Play
./run organya_file | aplay -q

Prior Art

Programs that have

  • in_org, a plugin for Winamp. It has issues with playing drum tracks at low pitches.

  • Org2Raw, built with code from the Cave Story Engine 2 project. I can't find the source code for it, and it's rather clunky to use.

  • Org2XM, which converts Organya files to FastTracker modules. Requires two-step conversion and the original code is pretty outdated. I might build my own some day.

  • Recording Org Maker or Cave Story in Audacity. Requires lots of manual effort and depends on hardware.


Several aspects of the Organya format and Pixel's original code need to be considered when talking about accuracy.


Org Maker and Cave Story do not verify that Organya files are valid aside from checking the magic number.

This can cause all sorts of mayhem, so Organism will validate all files beforehand. (TODO!)


Pixel's engine is built on Microsoft's (now deprecated) DirectSound APIs.

All playback happens through DirectSound buffers, and frequency, volume, and pan controls can all be emulated very easily.


Timing is done using Windows Multimedia Timers.
This means that playback speed is never 100% consistent, though fluctuations are minimal.

Since Organism does not provide real-time playback, timing is done by counting the number of processed samples.


While Org Maker and Org View use regular Wave files for the percussion samples, Cave Story uses Pixel's own format, PixTone, which will require its own emulation.

PixTone support may be added in the future.

Code References

Alongside my own experimentation with existing tools, these projects have provided a lot of insight into how Organya works.

Org Maker 2, which was built using the original code by Pixel, which is largely still intact.

Cave Story Engine 2, which aims to create a bit-perfect decompilation of the original game.


Organism is released under the MPL-2.0 license. See LICENSE for more information.