For those who want to try composing / making music with ABC notation β
this tool watches your .abc files and renders them in real time into PDF and MP3 using MuseScore CLI.
It supports both interleaved and regular ABC formats. Further features remain to be explored π
- Python β₯ 3.8
- MuseScore 4 (CLI accessible as
mscore) Optional: ffmpegβ for MP3 export
Render all .abc files in real time:
python watch.pySpecify custom directories or options:
def parse_args() -> argparse.Namespace:
ap = argparse.ArgumentParser(prog="watch_abc", description="Realtime ABC β MusicXML β PDF/MP3")
ap.add_argument("--src", type=Path, default=ROOT, help="Source directory (default: script dir)")
ap.add_argument("--out", type=Path, default=ROOT / "build", help="Output directory (default: ./build)")
ap.add_argument("--mscore", type=str, default=None, help="MuseScore CLI path (overrides detection)")
ap.add_argument("--python", type=str, default=sys.executable, help="Python executable to run abc2xml.py")
ap.add_argument("--interval", type=float, default=2.0, help="Seconds between scans (default 2s)")
ap.add_argument("--no-audio", action="store_true", help="Disable audio export")
ap.add_argument("--quiet", action="store_true", help="Silent batch build (no tqdm)")
return ap.parse_args()Example datasets:
- π» Kunst der Fuge β Classical pieces
- π΅ ABC Notation Collection β Folk and traditional tunes
License MIT License Β© 2025 Langchu Huang