maple-looper CLI & AI Agent Catalog API
An MIT-licensed NumPy + FFmpeg tool that turns raw music into mathematically verified seamless game loops, paired with our machine-readable catalog.json.
maple-looper is an MIT-licensed Python CLI requiring only NumPy and FFmpeg to locate bar-aligned seamless loop points via chroma self-similarity, master audio to -16 LUFS, embed RPG Maker LOOPSTART tags, and audit seam clicks automatically.
How the Beat-Synchronous SSM Algorithm Works
Instead of fragile silence trimming, maple-looper refines BPM via spectral-flux autocorrelation, builds 12-bin chroma plus 8-band log-energy descriptors, scores integer 16/24/32-bar windows, applies a 35ms equal-power cosine crossfade at 48 kHz, and verifies boundary discontinuities under -24 dBFS.
Quick CLI Usage
Install directly from GitHub with pip install git+https://github.com/tbpfs/purplemaple-bgm.git and run: maple-looper cut input.wav --out-dir ./out --id battle-01 --bpm 150 --license CC0-1.0
AI Coding Agent Integration (/catalog.json)
Point Cursor, Claude Code, or Antigravity to https://bgm.ai-purplemaple.com/catalog.json to query tracks by genre, BPM, dialogue safety, and license, then download directly from stable /dl/<id>-loop.ogg URLs.
FAQ
Does maple-looper require librosa or heavy C++ builds?
No. It depends solely on NumPy and standard FFmpeg/FFprobe binaries, keeping installation fast on Windows, macOS, and Linux.
Need exclusive non-shared tracks or vocal themes?
Public library tracks are shared with every developer. Commission bespoke vocal themes, stems, or exclusive OST rights directly from Purple Maple.