Music Library & Licensing (Can It Be Used Commercially? Depends on the License, Not on "Is It AI-Generated")
1. Two Supply Routes
| Route | Tool | License Type | When to Use |
|---|---|---|---|
| Online Sources (preferred) | bgmwrite.fetch (Jamendo / Freesound / Mubert / Customer self-built index) | Track-by-track: CC0/CC BY/CC BY-SA/Royalty-Free; NC/ND/Unknown → reject | Network available, needs finished arrangement quality |
| Local Library (fallback) | bgmread.library (customer self-built → shipped fallback 50 tracks → workspace-local tagged library) | Same whitelist; shipped fallback is a royalty-free pack from the owner (royalty-free, source in licenseSource) | Network unavailable or offline preference |
| Self-Composed (last resort) | bgmwrite.compose | Synthesized in-warehouse, no third-party rights, commercial use OK, no attribution required | Timing needs to match video, needs beat sync, reproducibility needed; no suitable track in upper tiers |
Track selection order is fixed: Online → Local → Self-Composed. Each downgrade must include the reason in the receipt (network/unconfigured/license non-compliance/no match).
1.4 Library Tagging (Turning Your Music Collection into a Searchable Library)
Customer/workspace media packs (often thousands of tracks) are ingested via bgmwrite.tag / bgm-cli tag, with three rules:
- License must be declared first (
licenserequired and in the commercial whitelist): Tracks with unknown sources are not allowed into the library (fence G-BGM8); Overwriting an existing library index requires explicitallow_overwrite=trueto avoid wiping customer-collected libraries with a single misconfiguration; - No guessing: If BPM cannot be reliably detected, set
bpm=null, confidence=low; loudness, true peak, clipping evidence, structural segments, spectrum, silence are all written per track intotag-evidence.json; embedded ID3 metadata takes precedence over filenames (which are often abbreviations); if both are missing, leave blank; - Low confidence requires human review: Tracks with
confidence.style=lowmay be added to the fallback library but must be human-ear-reviewed before delivery (fence G-BGM9).
1.5 Library Relocation & "Customer's Separate Download Folder" (Auto-Association Rules)
- Bundled folders must use relative paths: Use
bgmwrite.library action=pack(bgm-cli library --pack) to writetracks.jsoninto the asset directory and convert paths torelative— unpacking anywhere (downloads/external drive/shared drive) will auto-discover and work immediately; - Absolute path indexes must be rebound after relocation: Re-bind by filename+size (
verify=size, default) or content hash (verify=sha256), reporting three states truthfully:matched / missing / ambiguous— never pretend a file is available when it's not; - Auto-discovery is "convenience", not "implicit": Discovered libraries appear as
local-discoveredafter explicit configurations (customer-built/shipped-fallback/workspace-local), with same-id first-come-first-served;WORKLOOM_BGM_SCAN_ROOTScontrols scan roots,WORKLOOM_BGM_DISCOVER=0disables it. A library is "available" only after sample verification passes.
A quick note on "AI music licensing traps": External model weights often carry NC/ND (e.g., MusicGen weights CC-BY-NC), the weight license is not the same as the output license — which is why this warehouse defaults to "self-composed synthesis + declared commercial-use music packs".
1.2 Rules for Online Source Fetching (New)
1.3 Catalog Presets & "I Want Western Pop / Chinese Classical" (2026-09-23)
bgmwrite.fetch / bgmwrite.best support the catalog parameter, translating "what style" into search criteria for each source:
| catalog | Meaning | Jamendo Tags | Freesearch Terms |
|---|---|---|---|
western-pop | Western pop style (modern pop/electronic/dance), not "the latest commercial hits" | pop / dance / electronic | pop music loop upbeat |
chinese-classical | Chinese classical / national style (guzheng, erhu, pipa, dizi, folk music) | traditional / chinese / world | guzheng erhu pipa dizi chinese traditional |
cinematic-score | Film score (orchestral/atmospheric/driving) | soundtrack / classical / cinematic | cinematic orchestral score |
Copyright boundaries (must be clearly stated to the customer, no ambiguity):
-
"The latest Western pop hits" (e.g., current chart-toppers) cannot be fetched or stored: They are copyright-protected commercial recordings; distributing them with open-source libraries or using them in customer deliveries is infringement. The only legal paths are:
- Connect to a licensed commercial library (customer's own subscription account / customer's own library → point to it via
generic-http, or place purchased tracks inWORKLOOM_BGM_LIBRARY_DIR); - Use same-style CC0/CC BY/royalty-free tracks (
catalog=western-popdoes this).
- Connect to a licensed commercial library (customer's own subscription account / customer's own library → point to it via
-
Chinese classical music: Scores of traditional pieces (e.g., "Spring River Flower Moon Night", "High Mountains Flowing Water") are mostly public domain, but recordings carry performer and producer rights — so use CC0/CC BY or licensed sources, don't grab any recording.
-
The workspace does only three things: search (register provider), license gate, download cache; no scraping, no bypassing authentication, no forging licenses.
-
Only use public APIs or customer-built indexes, no web scraping, no authentication bypass, no unauthorized sources (fence G-BGM7 — one-vote veto);
-
First-time enablement of a provider or provider change requires human review (fence G-BGM6); credentials read only from environment variables/controlled secret storage, never echoed, never written to file;
-
Check license before download (
license_ccurl/ Freesoundlicense/ Mubert royalty-free declaration): Non-commercial tracks are rejected — never "download first, check later"; -
Downloads land in workspace cache (
WORKLOOM_BGM_CACHE_DIR, default~/.workloom-bgm/cache), with sha256; duplicate tracks hit cache and skip download; -
Size limit and protocol validation (only http(s),
WORKLOOM_BGM_MAX_DOWNLOAD_BYTESdefault 80MB); -
Attribution-required tracks produce a TASL attribution file with delivery; if online fetch fails, fall back to local library and list each failure reason in the
attemptsfield of the receipt.
2. License Whitelist (Enforceable, Fence G-BGM5)
| license | Commercial Use | Requires Attribution | Notes |
|---|---|---|---|
cc0-1.0 | ✅ | ❌ | Public domain |
cc-by-4.0 | ✅ | ✅ | Attribution required for commercial use |
cc-by-sa-4.0 | ✅ | ✅ | Derivatives must be shared under same license (note: viral) |
royalty-free | ✅ | ❌ | Subject to platform terms (keep order/license ID) |
workloom-self-generated | ✅ | ❌ | Self-composed synthesis in this warehouse |
cc-by-nc-4.0 / cc-by-nd-4.0 / cc-by-nc-nd-4.0 | ❌ | — | One-vote veto for commercial use |
| Unmarked / Unknown source | ❌ | — | Treat as non-compliant (fail-closed) |
No "use first, ask later": Tracks with unknown licenses cannot enter commercial deliveries; G-BGM1 requires human review for first-time library ingestion.
3. TASL Attribution How-To
CC BY / CC BY-SA license family requires attribution using the TASL format:
"Title" — Author · Source (Link) · License
Workspace behavior: bgmwrite.mix with attribution_out=CREDITS.md automatically writes the attribution file;
bgmread.library --attribution-out can produce attribution at the track selection stage for early scheduling.
The attribution file is part of the delivery: it must accompany the video description/press release, not stay in the workspace.
4. AI Music Licensing Traps (Easiest to Trip Over)
| Project | Code License | Model Weight License | Can Be Used in Commercial Deliveries |
|---|---|---|---|
| Meta MusicGen / AudioCraft | MIT | CC-BY-NC 4.0 (no commercial use) | ❌ No (unless separately licensed) |
| Mubert (Commercial API) | — | — | ✅ Officially stated generated/streamed tracks are royalty-free and commercial-use OK (subject to contract terms) |
| Self-Composed (this warehouse) | This warehouse's own | No third-party weights | ✅ |
Bottom line: "AI-generated" does not equal "no copyright risk"; you must check weight licenses, training data sources, and platform terms.
5. Rules for Integrating External Libraries
- Library directory +
tracks.jsonprovided by customer/workspace (contract inlibrary/bgm-library/README.md); workspace does not download or re-upload; - Each track registers: title/author/source/license/path/BPM/duration/mood/topic;
- Commercial delivery only searches
commercialOk=truetracks; NC/ND are filtered at search stage; - First-time library ingestion requires
G-BGM1human review; pre-verified tracks auto-pass; - Platform credentials (API key / license token) go only into controlled secret storage, not into files, logs, or events.
6. Relationship with Common Music Libraries (2026-09-22 Verified Stance)
- Jamendo: Developer API clearly separates Non-Commercial / Commercial plans; library contains mixed CC licenses, NC tracks require separate licensing for commercial use → only connect to Commercial plan and register per-track.
- ccMixter / Free Music Archive: Per-track CC, requires automatic NC/ND filtering before use.
- Mubert: Commercial API, outputs claimed royalty-free and commercial-use OK; register contract/order ID as proof.
- Tunetank MCP endpoint (third-party MCP service): Not locally verified for availability or terms; must self-verify before integration (don't skip compliance just because "no API key needed").
7. Evidence (Prove It When Problems Arise)
Every delivery must answer: Where is this track's license/order ID, was attribution delivered with the video, who approved it and when?
Corresponding artifacts: license field in bgm_report, TASL attribution file, approval record (G-BGM1), five-element event.
8. Failure Modes (Symptom → Detector → Action)
| Symptom | Detector | Action | Example |
|---|---|---|---|
| NC/ND track slipped into commercial delivery | License whitelist filter + G-BGM5 hard gate | Block and replace; search only commercialOk=true | FC-BGM-003 |
| Attribution required but no TASL file | Delivery checklist validation (CREDITS.md present?) | Add attribution before delivery; attribution file is part of delivery | — |
| Unmarked/unknown source track used | license required + fail-closed decision | Treat as non-compliant: reject, no "use first, ask later" | FC-BGM-004 |
| Web scraping / authentication bypass | G-BGM7 one-vote veto | Block and log; only public APIs or customer indexes | — |
| Platform credentials in file/log/event | Secret scan + credentials-only-from-env rule | Rotate credentials immediately; treat as incident and sanitize | — |
| First-time library ingestion without human review | G-BGM1 approval record check | Block ingestion, require approval before use | — |
| Low-confidence (style=low) track used directly in delivery | G-BGM9 human ear review record | Add human ear review; no review means no delivery | — |
| Online fetch failure treated as "no music available" | Track selection order (online→local→compose) + attempts receipt | Downgrade step by step with each failure reason, no skipping or silent replacement | FC-BGM-005 |
Knowledge Base Reference
Knowledge Base:
library/bgm-kb/— SCORE-005 Music License Compliance Quick Reference (whitelist, TASL attribution, AI music trap criteria), SCORE-008 Common Incident Case Library (licensing incident post-mortem). Entry point:library/bgm-kb/_INDEX.md