Convert Hooktheory/Hookpad MIDI files to Clone Hero .chart format for 5-fret guitar.
- Web Interface: Browser-based converter with drag & drop
- YouTube Integration: Download audio directly from YouTube URLs
- MIDI Parsing: Auto-detects lead melody track from Hookpad exports
- Intelligent Mapping: Phrase-based pitch-to-lane mapping with smoothing
- QA Detection: Flags potential charting issues (inspired by midi-ch)
- Configurable: YAML config for tuning phrase detection, smoothing, etc.
cd "Clone Hero Maker"
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -r requirements.txtStart the web server:
python app.pyThen open http://localhost:5000 in your browser.
Features:
- Drag & drop MIDI upload
- YouTube audio download (just paste a URL)
- Track selection UI
- Live lane preview
- Download .chart or bundled .zip with audio
python -m src.cli input.mid output.chartpython -m src.cli song.mid song.chart --name "My Song" --artist "Artist Name"python -m src.cli --inspect song.midpython -m src.cli song.mid song.chart --preview --verbose| Option | Description |
|---|---|
--name, -n |
Song name |
--artist, -a |
Artist name |
--charter, -c |
Charter name |
--track, -t |
Track index (0-based, auto-detect if omitted) |
--config |
Path to config.yaml |
--preview, -p |
Show ASCII lane preview |
--verbose, -v |
Verbose output |
--inspect, -i |
Inspect MIDI without converting |
--no-qa |
Skip QA issue detection |
Edit config.yaml to adjust:
# Phrase detection
phrase_silence_beats: 1.0
# Lane smoothing
max_lane_jump: 2
smoothing_passes: 1
# Track detection patterns
lead_track_patterns:
- "lead"
- "melody"
- "vocal"- Export MIDI from Hookpad (lead melody track)
- Run converter:
python -m src.cli song.mid out/song.chart - Review in Moonscraper - QA markers show potential issues
- Add audio and polish
The converter embeds event markers for potential issues:
| Marker | Meaning |
|---|---|
Bad_Too_Low |
Higher pitch charted to lower fret |
Bad_Too_High |
Lower pitch charted to higher fret |
Bad_Different_Fret |
Same pitch on different frets |
These appear as events in Moonscraper for easy review.
Clone Hero Maker/
├── app.py # Flask web server
├── templates/
│ └── index.html # Web interface
├── static/
│ ├── style.css # Dark theme styles
│ └── app.js # Frontend logic
├── src/
│ ├── parse_midi.py # MIDI parsing & note extraction
│ ├── map_to_frets.py # Pitch → lane mapping
│ ├── chart_writer.py # .chart file generation
│ └── cli.py # Command-line interface
├── tests/
│ ├── test_mapping.py
│ └── test_chart_writer.py
├── uploads/ # Temporary job files
├── config.yaml # Configuration
└── requirements.txt
python -m pytest tests/ -v- Extract lead notes from MIDI with absolute timing
- Segment into phrases based on silence gaps
- Scale each phrase linearly to 0-4 lanes
- Smooth to avoid large jumps between consecutive notes
- Preserve direction - nudge lanes to match pitch motion
- Generate .chart with proper timing and QA events