AI-Powered Music Generation & Interactive Composition Toolkit
Project description
๐ OrpheusPyPractice
AI-Powered Music Generation & Interactive Composition Toolkit
Where artificial intelligence meets musical creativity through elegant Python workflows
๐ต What is OrpheusPyPractice?
OrpheusPyPractice is an experimental music and AI practice package that transforms the intersection of artificial intelligence and musical creativity into an elegant, accessible toolkit. It serves as a comprehensive platform for:
- AI-Powered Music Generation using HuggingFace's ChatMusician model
- ABC Notation Processing with automatic multi-format conversion
- Interactive AI Agents for conversational music composition
- Automated Workflows for batch music creation and processing
- Research and Education in computational musicology
๐ Quick Start
Installation
pip install orpheuspypractice
System Dependencies
# Install required music processing tools
odep install musescore # Installs MuseScore3, abc2midi, ImageMagick
Your First Musical Creation
# 1. Set up your API key
export HUGGINGFACE_API_KEY="your_key_here"
# 2. Navigate to an example
cd examples/basic-ohfi-workflow/
# 3. Generate AI music
ohfi
# 4. Convert to playable formats
oabc MyProject_v1_prompt1.json
# 5. Enjoy your AI-generated music!
# Files created: .abc, .mid, .mp3, .jpg
๐ญ Core Commands
๐ผ Music Generation Pipeline
ohfi- HuggingFace Inference: Boot ChatMusician endpoint, generate music from prompts, auto-suspendoabc- ABC Alchemy: Convert ABC notation โ MIDI โ MP3 โ Visual scoresomid2score- MIDI Oracle: Transform MIDI files into beautiful musical scores
๐ค AI Agent System
olca- Interactive LangChain agent with musical knowledge and tool accessoiv- Research agent for ArXiv paper analysis and musical research
โก Automation Workflows
wfohfi_then_oabc_foreach_json_files- Complete automation: AI inference โ batch conversion โ multi-format output
๐ง System Management
odep- Dependency installer for music processing tools
๐๏ธ Architecture
OrpheusPyPractice is built on two core submodules:
jgcmlib(โฅ1.0.59) - ABC notation processing and MIDI conversionjghfmanager(โฅ0.1.5) - HuggingFace endpoint management and inference
๐ Comprehensive Examples
Explore our curated examples that demonstrate real-world usage:
๐ฏ Basic OHFI Workflow
Perfect starting point - complete workflow from configuration to musical output
๐น Chord Progression Generation
Advanced chord progressions across Classical, Jazz, Pop, Blues, and Progressive styles
๐ค AI Agent Integration
Interactive music composition through conversational AI using olca
๐ Workflow Automation
Batch processing multiple musical compositions with complete automation
Each example includes:
- โ Complete configuration files
- โ Step-by-step instructions
- โ Expected outputs
- โ Troubleshooting guides
๐ง Configuration
HuggingFace Setup (orpheus-config.yml)
huggingface:
name: your-endpoint-name
namespace: your-username
repository: m-a-p/ChatMusician
token_env_var: HUGGINGFACE_API_KEY
Musical Prompts (musical.yml)
musical:
name: MyComposition
sname: v1
prompts:
melody: "Create a beautiful melody in C major with ABC notation..."
harmony: "Generate jazz chord progression with extensions..."
AI Agent (olca.yml)
api_keyname: OPENAI_API_KEY
model_name: gpt-4o-mini
temperature: 0.7
tracing: true
system_instructions: "You are a musical AI assistant..."
๐จ Use Cases
๐ Education
- Music theory demonstration through AI generation
- Interactive composition learning
- Comparative analysis of musical styles
๐ฌ Content Creation
- Soundtrack generation for media projects
- Background music for videos and games
- Rapid prototyping of musical ideas
๐ฌ Research
- Computational musicology studies
- AI-human collaboration experiments
- Musical corpus development
๐ต Personal Practice
- Creative composition assistance
- Style exploration and learning
- Musical experimentation playground
๐ Documentation
- OHFI Usage Guide - Complete reference for AI music generation
- CLAUDE.md - Developer guidance and AI agent embodiment instructions
- MIETTE.md - The storytelling perspective on our package architecture
- Examples Directory - Hands-on tutorials and real-world workflows
๐ Advanced Features
๐ Automated Workflows
- Batch Processing: Generate multiple compositions in one session
- Cost Optimization: Automatic endpoint management reduces cloud costs
- Multi-format Output: Every composition becomes ABC, MIDI, MP3, and visual score
๐ง AI Agent Integration
- Conversational Composition: Chat with AI to develop musical ideas
- Tool Integration: Agents can execute music generation commands
- Educational Interactions: Learn music theory through AI dialogue
๐ Research Capabilities
- ArXiv Integration: Research musical AI developments
- Analysis Tools: Study generated compositions programmatically
- Corpus Development: Build datasets for musical AI research
๐ Quality Assurance
- Validated Examples: All examples tested and verified
- Error Handling: Graceful failure recovery in batch processing
- Documentation: Comprehensive guides with troubleshooting
- Type Safety: Modern Python practices with proper error messages
๐ค Contributing
We welcome contributions! Areas of particular interest:
- Additional musical styles and prompts
- New AI model integrations
- Educational example development
- Documentation improvements
- Research applications
๐ Troubleshooting
Common Issues
- Missing ABC notation: Ensure prompts explicitly request ABC format
- Endpoint errors: Verify HuggingFace permissions and endpoint status
- System dependencies: Run
odep install musescorefor complete setup - API limits: Monitor usage and consider endpoint management
Getting Help
- Check the comprehensive OHFI Usage Guide
- Review example configurations in examples/
- Consult troubleshooting sections in individual example READMEs
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ What's Next?
OrpheusPyPractice is continuously evolving. Future developments include:
- Integration with additional AI music models
- Enhanced educational features
- Expanded research capabilities
- Community-contributed musical styles and examples
๐ธ "Every command is a spell, every composition a conversation between human creativity and artificial intelligence." - Miette
Start your musical AI journey today! ๐ตโจ
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orpheuspypractice-0.3.1.tar.gz.
File metadata
- Download URL: orpheuspypractice-0.3.1.tar.gz
- Upload date:
- Size: 25.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5614af833a2d1538b5f15c4a9609f1013205332d180722259eaed2415b03286
|
|
| MD5 |
48a178dc7d352cc889a4d77a998df045
|
|
| BLAKE2b-256 |
d30e041d47e8a8145d5e9e456e6d6d5a111f3b6647f0815f4d758c71d6132526
|
File details
Details for the file orpheuspypractice-0.3.1-py3-none-any.whl.
File metadata
- Download URL: orpheuspypractice-0.3.1-py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
427e383498ef82a0672c49b31c2e24e4b56474894cb7ba199697017ac569d7f5
|
|
| MD5 |
b3650a5732b8ecb75a1c3cbbfb49395f
|
|
| BLAKE2b-256 |
331bf5d523f429aba859ea4c17e608c915b52a7cb6a88ef79cd7a2b6ec393c5d
|