feat: Complete music project templates and generation system

🎵 Major Additions:

📁 2000s Pop Project Templates:
- Chords & melody patterns
- Drum patterns and rhythms
- Synth bass configurations
- Effects and mixing guides
- Complete project structure documentation

🧬 ALS Generation System:
- Fixed ALS generator with enhanced capabilities
- Setup scripts for easy deployment
- Comprehensive README and documentation
- Quick start guide for users
- Utility commands reference

🎼 Musical Projects:
- Salsa project (Hector Lavoe inspired) with full documentation
- 2000s Pop project with complete production guide

🔧 Utility Scripts:
- generate_salsa_project.py: Salsa-specific generator
- generate_versioned_als.py: Versioned project generation
- register_project.py: Project registration system

This significantly expands MusiaIA's capabilities with pre-built project templates and production-ready examples for multiple genres!

Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
renato97
2025-12-02 01:14:03 +00:00
parent 1e634e8b2d
commit 85db177636
16 changed files with 3733 additions and 19 deletions

View File

@@ -0,0 +1,50 @@
#!/usr/bin/env python3
"""Utility to generate ALS files tagged with different Ableton versions."""
import os
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
sys.path.append(str(ROOT / "src" / "backend"))
from als.als_generator import ALSGenerator # noqa: E402
OUTPUT_DIR = ROOT / "output" / "als" / "version_tests"
VARIANTS = [
("Ableton Live 11.0", "11.0_0"),
("Ableton Live 11.2", "11.2_5"),
("Ableton Live 11.3", "11.3_10"),
("Ableton Live 12.0", "12.0_0"),
("Ableton Live 12.1", "12.1_5"),
]
def build_config(label: str) -> dict:
return {
"name": f"Version Test {label}",
"bpm": 100,
"key": "C",
"tracks": [
{"type": "AudioTrack", "name": "Drums", "samples": [], "color": 10},
{"type": "MidiTrack", "name": "Keys", "samples": [], "color": 25},
],
}
def main() -> None:
OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
for creator, minor_version in VARIANTS:
os.environ["ABLETON_LIVE_CREATOR"] = creator
os.environ["ABLETON_LIVE_MINOR_VERSION"] = minor_version
generator = ALSGenerator(output_dir=str(OUTPUT_DIR))
config = build_config(f"{creator} ({minor_version})")
path = generator.generate_project(config)
print(f"Generated {path} for {creator} / {minor_version}")
if __name__ == "__main__":
main()

51
scripts/register_project.py Executable file
View File

@@ -0,0 +1,51 @@
#!/usr/bin/env python3
"""Utility to register a manually generated ALS file in the MusiaIA project metadata store."""
import argparse
import json
import os
import uuid
from pathlib import Path
PROJECTS_DIR = Path('/home/ren/musia/output/projects')
PROJECTS_DIR.mkdir(parents=True, exist_ok=True)
def main():
parser = argparse.ArgumentParser(description='Register an ALS project for the MusiaIA dashboard.')
parser.add_argument('--user', required=True, help='User ID (must match the one used in the UI)')
parser.add_argument('--name', required=True, help='Project name to display')
parser.add_argument('--file', required=True, help='Path to the ALS file')
parser.add_argument('--genre', default='Unknown', help='Genre label (optional)')
parser.add_argument('--bpm', type=int, default=120, help='BPM value (optional)')
parser.add_argument('--key', default='C', help='Key signature (optional)')
parser.add_argument('--project-id', help='Optional custom project ID (otherwise auto)')
args = parser.parse_args()
file_path = Path(args.file).expanduser().resolve()
if not file_path.exists():
raise SystemExit(f'ALS file not found: {file_path}')
project_id = args.project_id or str(uuid.uuid4())[:8]
metadata = {
'id': project_id,
'user_id': args.user,
'name': args.name,
'genre': args.genre,
'bpm': args.bpm,
'key': args.key,
'file_path': str(file_path),
'download_url': f'/api/download/{project_id}'
}
metadata_path = PROJECTS_DIR / f'{project_id}.json'
with open(metadata_path, 'w', encoding='utf-8') as fh:
json.dump(metadata, fh)
print(f'Registered {file_path} as project {project_id}')
print(f'Metadata: {metadata_path}')
if __name__ == '__main__':
main()