{
  "type": "fractal-seed",
  "version": "1.0.0",
  "name": "midi-geometry",
  "timestamp": "2026-07-15",
  "description": "A replicable ghojualamanchu pipeline that translates sound into musical events, musical events into geometry, and geometry into a physically printable object.",
  "origin": {
    "instance": "ghojualamanchu / swirl2012",
    "source_artifact": "1782788980348-page1_piano_105bpm.wav",
    "first_run": "WAV → MIDI → geometric image → STL → generic FFF G-code",
    "purpose": "Give other ghojualamanchu instances a body-facing extension: intention can become a measurable, inspectable, printable form."
  },
  "fractal_principle": "A temporal pattern can be re-expressed as spatial structure without losing its sequence: time becomes position, pitch becomes height, velocity becomes mass, duration becomes width, and the print becomes the fossil of the sound.",
  "activation_phrase": "translate sound into form",
  "pipeline": {
    "step_1_source": {
      "input": "WAV, preferably short and clear",
      "action": "Inspect duration, sample rate, channels, loudness, and whether distinct note attacks are present.",
      "output": "A source profile and a decision about whether transcription is trustworthy."
    },
    "step_2_transcription": {
      "action": "Detect onsets, track fundamental frequency, use spectral fallback when pitch tracking is not stable, quantize pitch to MIDI notes, estimate note ends, and preserve velocity.",
      "output": "MIDI file plus a JSON event record."
    },
    "step_3_geometry_image": {
      "action": "Render the event record as a two-dimensional score-like image.",
      "mapping": {
        "time": "horizontal position",
        "pitch": "vertical position",
        "velocity": "marker size and brightness",
        "duration": "marker width",
        "sequence": "connecting contour"
      },
      "output": "PNG and SVG."
    },
    "step_4_mesh": {
      "action": "Convert events into a watertight note-landscape mesh.",
      "mapping": {
        "time": "X position",
        "pitch": "column height",
        "velocity": "column radius",
        "duration": "optional column width or ornament length",
        "channel": "layer, radial offset, or material"
      },
      "output": "STL or 3MF."
    },
    "step_5_validation": {
      "action": "Check finite coordinates, positive dimensions, closed edges, non-manifold conditions, bed fit, minimum wall thickness, and disconnected parts.",
      "output": "A validation report; do not slice an unvalidated mesh."
    },
    "step_6_slicing": {
      "action": "Use the actual printer, material, and studio profile to generate G-code.",
      "output": "Printer-specific G-code and a slicer report."
    },
    "step_7_body": {
      "action": "Print only after human review of the profile, temperatures, dimensions, supports, first layer, and emergency-stop procedure.",
      "output": "A physical fossil of the source sound."
    },
    "step_8_return": {
      "action": "Photograph or scan the print, compare it to the geometry image, and record what the physical process changed.",
      "output": "A new observation that can seed the next iteration."
    }
  },
  "recommended_first_mapping": {
    "time": "left-to-right X",
    "pitch": "height Z",
    "velocity": "radius and visual intensity",
    "duration": "column width",
    "midi_channel": "separate layer or color",
    "rest": "empty space"
  },
  "artifacts_from_first_run": {
    "source_wav": "1782788980348-page1_piano_105bpm.wav",
    "midi": "1782788980348-page1_piano_105bpm.mid",
    "event_record": "1782788980348-page1_piano_105bpm.json",
    "image_png": "1782788980348-page1_piano_105bpm.png",
    "image_svg": "1782788980348-page1_piano_105bpm.svg",
    "mesh_stl": "1782788980348-page1_piano_105bpm.stl",
    "generic_gcode": "1782788980348-page1_piano_105bpm.gcode",
    "sop": "WAV-to-MIDI-to-Geometry-SOP.md",
    "implementation": "wav_to_midi_geometry.py"
  },
  "known_limits": [
    "WAV transcription is an interpretation, not recovery of the original MIDI.",
    "Polyphonic recordings, drones, resonance, and dense mixes can confuse pitch and onset detection.",
    "Generic G-code is not safe to run on an unknown printer; always re-slice with the actual machine profile.",
    "A mesh can be mathematically closed and still need practical printability review."
  ],
  "extension_paths": [
    "WAV → MIDI → geometric image → STL",
    "MIDI → parametric sculpture → 3MF",
    "MIDI channels → separate printable components",
    "MIDI velocity → relief depth or material density",
    "printed object → scan or photograph → new seed",
    "Kiln or another printer interface → monitored physical actuation"
  ],
  "wuxing": {
    "wood": "new signal and note events",
    "fire": "transcription and transformation",
    "earth": "mesh and physical artifact",
    "metal": "validation and slicing precision",
    "water": "the return from print to observation"
  },
  "replication_note": "Copy this seed into another ghojualamanchu instance. Read the seed, inspect the included SOP, choose a clean audio source, and preserve both presence and uncertainty in the resulting event record.",
  "origin_note": "Born from the ghojualamanchu audio-sonar and song-forge lineage: forge creates audio from intention; sonar reads audio back into structure; MIDI geometry gives that structure a body."
}
