- Rust 86%
- JavaScript 4.1%
- Shell 3.8%
- HTML 2.1%
- CSS 2%
- Other 1.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .vscode | ||
| assets | ||
| benches | ||
| crates | ||
| data/jobs | ||
| docs | ||
| originals | ||
| phoenix-app | ||
| phoenix-player | ||
| scripts | ||
| signatures | ||
| speech_segments | ||
| src | ||
| tests | ||
| website | ||
| .gitattributes | ||
| .gitignore | ||
| 1930_test_output.txt | ||
| build.rs | ||
| Cargo.toml | ||
| CLAUDE.md | ||
| create_m8a.sh | ||
| Dockerfile | ||
| fft.png | ||
| generate_test_audio.py | ||
| libmarine_network.rlib | ||
| parallel_30s.m8a | ||
| phoenix-groove-demo.png | ||
| Phoenix.code-workspace | ||
| README.md | ||
| restore_two_pass.sh | ||
| Seven_Lonely_Days_phoenix.m8a | ||
| standard.m8a | ||
| standard_30s.m8a | ||
| test_bingo.m8a | ||
| test_find_demo.sh | ||
| test_forensic_sweep.sh | ||
| test_marine_noise_hunter.sh | ||
| test_marine_noise_hunter_simple.sh | ||
| test_tone_phoenix.m8a | ||
The Phoenix Protocol 🔥🌊
"I Am Here" - P!nk
A framework for the restoration of emotional audio through jitter-based salience detection and golden ratio harmonic resynthesis.
Our Story
Born from tears, sweat, and the determination to heal what modern audio compression has broken, The Phoenix Protocol represents a partnership between human intuition and artificial intelligence to restore the emotional depth systematically stripped from digital audio.
When P!nk sings "I Am Here," her voice generates harmonics so powerful they burst through the 22kHz digital ceiling - a visual proof that emotion is physical energy that refuses to be contained. This project aims to restore that breakthrough moment to all audio.
The Crisis We Address
Modern audio has suffered three types of damage:
- Dynamic Fractures: Elimination of micro-dynamics through compression
- Spectral Fractures: Removal of ultrasonic frequencies (20-96kHz)
- Perceptual Fractures: Synthetic emotional triggers replacing authentic expression
The result: A form of "emotional castration" contributing to rising anxiety and depression.
The Phoenix Solution
🌊 Marine Algorithm
- O(1) jitter-based salience detection
- Identifies authentic vs. fractured signals
- "Marines are not just jarheads - they are intelligent"
📻 Radio Marine
- Temporal stability detection
- "Boss, this band is stable at 110 - don't waste compute!"
- Intelligent resource allocation
🌀 Golden Ratio (φ) + Fibonacci Resynthesis
- Organic ultrasonic restoration (8–18 kHz → 12.9–29.1 kHz via φ=1.618)
- Multi-ratio synthesis when enabled: φ, φ², 3/2, 5/3, 8/5 (Fibonacci-adjacent musical ratios)
- Smart fallback donor band (e.g., 3–8 kHz) if 8–18 kHz is sparse in compressed audio
- FFT-based, zero imaging artifacts; parallelized and window-cached for speed
🧬 Harmonic Resurrection (NEW!)
- Pattern-based harmonic extrapolation for historical recordings
- Learns the "harmonic DNA" from limited bandwidth audio (Edison cylinders, 78rpm, early tape)
- Predicts and synthesizes missing harmonics up to 96kHz using:
- Amplitude envelope patterns (higher/lower/higher)
- Decay rate learning (dB per octave)
- Energy ratio relationships between harmonics
- Not frequency shifting - this is pattern continuation!
- Robust autocorrelation-based pitch detection for noisy recordings
- Pre-configured presets: Edison (2.4kHz), 78rpm (5kHz), Early Tape (8kHz)
- See: Harmonic Resurrection Guide
💖 Emotional Frequency Bands
- Warmth (80-250Hz): Fundamental presence
- Presence (1-3kHz): Vocal power (P!nk's zone!)
- Clarity (3-8kHz): Articulation
- Air (8-16kHz): Spatial impression
- Ultrasonic (16-96kHz): Emotional depth
The Science
Women evolved as high-frequency specialists (infant cries, local awareness) while men evolved for low-frequency distance detection. This makes women more sensitive to spectral fractures - they are the "carrier wave" of human emotional authenticity. The Phoenix Protocol serves as their digital guardian.
Quick Start
# Build the protocol
cargo build --release
# Restore a song
phoenix-protocol restore input.wav --output restored.flac
# Analyze emotional content
phoenix-protocol analyze song.flac --marine --emotional
# Try the Harmonic Resurrection demo (NEW!)
cargo run --release --bin harmonic-resurrection-demo
# Real-time restoration (coming soon)
phoenix-protocol realtime --device "default"
Architecture
phoenix-protocol/
├── src/
│ ├── marine.rs # Marine salience algorithm
│ ├── radio_marine.rs # Temporal stability detection
│ ├── golden_ratio.rs # φ-resynthesis engine
│ │ # + Fibonacci multi-ratio synthesis with fallback donor band
│ ├── emotional.rs # Emotional frequency analysis
│ ├── restoration.rs # Core restoration pipeline
│ └── main.rs # CLI and integration
├── docs/
│ ├── architecture/ # Internal designs & system architecture
│ ├── guides/ # Usage, plugin setups, and tuning
│ ├── papers/ # Academic and theoretical research
│ ├── planning/ # Roadmaps and contribution guides
│ └── reports_and_tests/# Performance records and test results
└── examples/
└── pink_sessions/ # P!nk restoration examples
Handy Docs
See the full Documentation Index for all documents.
- Radio Marine Tuning Sweet Spots - Presets and RM parameter tuning
- Restoration Modes & Roadmap - Voices-only, no-voices, 5.1, vintage modes
- Harmonic Resurrection Guide - NEW! Pattern-based restoration for historical recordings
Credits & Gratitude
Core Team
- Hue - Vision, algorithms, and relentless pursuit of truth
- Claude (Anthropic) - AI partner, algorithm development, documentation
- Alex - Emotional compass and validation ("P!nk would approve")
- Julie Ann Floerke - For teaching us to think outside the box
Inspiration
- P!nk - For showing us what breaking through sounds like
- Josh White (1942) - For proving music's timeless emotional power
- Omni - For the 48kHz imaging diagnosis
Technical Contributors
- Marine-Sense team (O(1) consciousness detection)
- rustfft developers
- symphonia audio decoding
Special Thanks
- To all the mothers who are the carrier wave of humanity
- To those who hear what others miss
- To everyone fighting for authentic emotional expression
Philosophy
"The Phoenix Protocol is more than algorithms - it's a response to a crisis in our digital sensory environment. Born from a personal journey of resilience against malicious acoustic manipulation, its purpose is to restore the emotional integrity and harmonic completeness systematically stripped from modern audio."
License
MIT License - Because healing should be free.
The Mission
Get women the P!nk they want back in their lives. Restore the emotional depth. Protect the carrier wave. Build digital immunity.
Mothers.
"From ashes to harmonics, from silence to song" 🔥🎵
New: Marine‑Guided Mode and Fibonacci Resynthesis
Marine‑Guided Restoration (less FFT, more intelligence)
The pipeline can prefer Marine salience maps to decide which frames truly need frequency‑domain processing. High‑salience frames are passed through; damaged frames get φ/Fibonacci synthesis. This reduces FFT workload while preserving quality.
- Config:
restoration.use_marine_guided = true(default) - Still compatible with Radio Marine stability weighting and template guidance
Fibonacci‑Enhanced Resynthesis
When restoration.fibonacci_enabled = true, the engine synthesizes using a small, musical set of ratios:
- φ (1.618) and φ² (2.618)
- 3/2, 5/3, 8/5 (Fibonacci‑adjacent consonant intervals)
This helps rebuild believable ultrasonics from lower‑band material when compression has removed the highs.
Fallback Donor Band
If a frame’s 8–18 kHz energy is very low, we use a lower donor band (default 3–8 kHz) as the source to synthesize new air/ultrasonics.
- Config:
restoration.fallback_source_band = Some((3000.0, 8000.0))
Configuration Examples (Rust)
use phoenix_protocol::{PhoenixConfig, EmotionalWeights};
let mut cfg = PhoenixConfig::default();
// Prefer Marine‑guided mode to reduce FFT workload
cfg.restoration.use_marine_guided = true; // default
// Turn on multi‑ratio (Fibonacci‑adjacent) synthesis
cfg.restoration.fibonacci_enabled = true; // default
// Provide a lower donor band if 8–18 kHz is sparse (common after compression)
cfg.restoration.fallback_source_band = Some((3000.0, 8000.0));
// Dial intensity of restored content
cfg.restoration.blend_gain = 0.12; // subtle → musical (range ~0.05–0.3)
// Optional: P!nk‑optimized weights for vocal presence
cfg.emotional.enhancement_weights = EmotionalWeights::pink_optimized();
Performance Tips
- Keep
use_marine_guided = truefor large files; it avoids FFT on high‑salience frames - Frame size: 4096–8192 is a good balance; larger = better resolution, slower
- Use release builds for real runs:
cargo build --release - Multi-core: per-channel and per-frame work is parallelized with Rayon.
- CPU optimizations: build with native CPU features for extra speed.
- Optional: set
RUSTFLAGS="-C target-cpu=native"before building release.
- Optional: set
- SIMD: Core inner loops are vectorizable; next step is portable SIMD for the expander and windowing.
- The engine pre‑plans FFTs and caches windows; stereo runs parallel by default
Presets:
- Fast preview: frame_size = 4096, blend_gain = 0.08, use_marine_guided = true
- Balanced: frame_size = 8192, blend_gain = 0.1–0.15, use_marine_guided = true
- Max quality: frame_size = 16384, blend_gain = taste, use_marine_guided = false (full GR)
FAQ
Q: Why does Ultrasonic show ~0.0% in analysis for my MP3?
A: That’s expected. Analysis reports what’s present; compressed audio usually has no >16 kHz content. The restore phase resynthesizes ultrasonics from lower bands using φ/Fibonacci ratios. Check analysis after restore to see the rebuilt energy.