Skip to content

Repository files navigation

postfish-rs

postfish-rs is a modern Rust port of the original Postfish, Christopher “Monty” Montgomery’s digital audio restoration and enhancement engine. It provides declipping, multiband dynamics, reverberation control, spectral filtering, and other mastering‑grade cleanup tools for offline processing, plugin workflows, and real‑time visualization.


Project Context

The original C implementation is powerful but shows its age:

  • Legacy UI & Threading: The GTK frontend and early‑2000s threading model limit portability and responsiveness on modern systems.
  • Manual Memory Management: The DSP modules rely on global state, raw pointers, and manual buffer handling, making refactoring and debugging error‑prone.
  • DSP Coupling: Many algorithms are intertwined with UI logic or global configuration, complicating modular reuse.
  • Testing Limitations: Floating‑point behavior and implicit state make deterministic regression testing difficult.

The Rust port restructures Postfish into clean, modular crates with deterministic DSP behavior, modern tooling, and extensive test coverage.


Key Improvements

  • Safe, Deterministic DSP Engine: All modules (declipper, biquad EQ, multiband compressor, bessel filters, LPC, deverberator, freeverb, subband reconstruction) are rewritten in idiomatic Rust with predictable state handling.
  • Modular Audio Pipeline: A unified AudioPipeline abstraction ensures stable block processing, clean state propagation, and easy integration across CLI, UI, and plugin targets.
  • Golden‑Output Regression Tests: Full WAV end‑to‑end tests validate DSP correctness and prevent subtle regressions across declipping, dynamics, and spectral modules.
  • Plugin Support: VST3 and CLAP builds via nih-plug allow Postfish processing inside DAWs with real‑time parameter automation.
  • Cross‑Platform UI: A new egui/eframe interface replaces the legacy GTK frontend, providing responsive visualization and parameter control.
  • Workspace Structure: The project is split into multiple crates, making the DSP engine reusable and the UI/plugin layers cleanly separated.

Workspace Architecture

postfish-rs

Core DSP engine implementing:

  • declipper
  • biquad parametric EQ
  • multiband compressor
  • bessel filters
  • LPC analysis
  • deverberator
  • freeverb
  • subband reconstruction
  • frequency‑domain utilities

postfish-plugin

VST3/CLAP plugin wrapper using nih-plug, enabling DAW integration.

postfish-ui

Standalone desktop application built with egui/eframe, featuring:

  • real‑time visualization
  • adjustable DSP parameters
  • live monitoring
  • cross‑platform support

CLI Processor (main.rs)

Command‑line WAV processor supporting:

  • integer PCM
  • floating‑point PCM
  • block‑based processing
  • deterministic output suitable for regression testing

Building the Project

Ensure Rust and Cargo are installed.

# Clone the repository
cd postfish-rs

# Build the workspace
cargo build --release

Running the Tools

Process a WAV file via CLI

cargo run --bin postfish-rs -- <input.wav> <output.wav>

Launch the UI

cargo run -p postfish-ui

Build plugin targets

cargo build -p postfish-plugin --release

Testing & CI

Run the full test suite, including DSP modules, pipeline integration, randomized chain tests, and golden‑output regression:

cargo test

Golden‑output tests require the included WAV and raw reference files.


Future Roadmap

  • Advanced visualization (spectrogram, declipper diagnostics)
  • Preset system for UI and plugin
  • Batch processing mode with TOML configuration
  • Optional SIMD acceleration for heavy DSP modules
  • Real‑time parameter automation improvements

About

Postfish‑rs is a Rust port of Monty’s Postfish: a full‑stack audio repair engine with declipping, EQ, multiband compression, deverb, freeverb, LPC tools, and spectral reconstruction. Built for reliable, sample‑accurate restoration.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages