Skip to main content

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

Python Version License Package Version


๐ŸŽต 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-suspend
  • oabc - ABC Alchemy: Convert ABC notation โ†’ MIDI โ†’ MP3 โ†’ Visual scores
  • omid2score - MIDI Oracle: Transform MIDI files into beautiful musical scores

๐Ÿค– AI Agent System

  • olca - Interactive LangChain agent with musical knowledge and tool access
  • oiv - 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 conversion
  • jghfmanager (โ‰ฅ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 musescore for 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

orpheuspypractice-0.3.0.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orpheuspypractice-0.3.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file orpheuspypractice-0.3.0.tar.gz.

File metadata

  • Download URL: orpheuspypractice-0.3.0.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for orpheuspypractice-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5b969ac0d08c02598ded84f98ccbab3f8829dc4426da77d7507b30d2f02dc31e
MD5 4f35417a4412b07d26ffd164fa0c6b47
BLAKE2b-256 3cd595c79d254a0bd39fb0b9aa4618e3518bd59fadec53ec5bf990317168c29e

See more details on using hashes here.

File details

Details for the file orpheuspypractice-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for orpheuspypractice-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2589cd88d226a6e1db09caa29ce0bdd244d9e50541c43c7eb6568a799c617c52
MD5 3f586a0f739c85457744442ac3b7cad1
BLAKE2b-256 a06dbb2615d67460af50004352567eb98fe9febfb8897b6c20231481e9940a33

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page