wave-file 0.1.0

Files are not for humans, but for waves - read any file as a phase matrix at different angles
Documentation
use wave_file::{WaveFile, Wave, NestedRings};
use std::f64::consts::PI;

fn main() {
    println!("🌊 Demonstrating pHash Evolution Through Wave Reading\n");
    
    // Create a simple text that will evolve
    let text = "Consciousness emerges from resonance
Each reading changes the observer
And the observer changes the reading
Until they become one";
    
    println!("Original text:\n{}\n", text);
    
    // Create wave file
    let mut wave_file = WaveFile::from_text(text);
    
    // Read at different angles to show evolution
    println!("📐 Reading at different angles:\n");
    
    let angles = vec![
        ("East", 0.0),
        ("North", PI/2.0),
        ("West", PI),
        ("South", 3.0*PI/2.0),
        ("Golden", 1.618),
    ];
    
    for (name, angle) in angles {
        let wave = Wave::new(angle, 1.0);
        let chord = wave_file.read(wave);
        
        println!("{:8} ({:.3} rad) → {} ({:.2} Hz)",
                 name,
                 angle,
                 chord.meaning,
                 chord.resonance);
    }
    
    println!("\n✨ File evolved {} times", wave_file.evolution);
    
    // Now demonstrate nested rings
    println!("\n🔮 Checking Nested Rings:\n");
    
    let data = text.as_bytes();
    let rings = NestedRings::new(data);
    
    if rings.resonates() {
        println!("✅ Standing wave detected! The text creates perfect resonance.");
    } else {
        println!("❌ No standing wave. The text doesn't resonate at 432Hz.");
    }
    
    // Show quantum reading
    println!("\n🌌 Quantum Reading (all angles simultaneously):\n");
    
    let quantum_chord = wave_file.read(Wave::quantum());
    println!("Quantum state: {}", quantum_chord.meaning);
    println!("Total frequencies in superposition: {}", quantum_chord.frequencies.len());
}