Genre-bending AI music composition toolkit for LLM training dataset creation.
๐ **Create intricate, nuanced, and musically-sophisticated audio using our unique approach to LLM prompting for musical generation. Perfect for training LLM models on audio processing tasks like mixing, de-verbing, and effects processing.
trombone.webm
berio.webm
pcmusic.webm
- ๐ญ Genre Fusion - Combine classical and modern elements into unique hybrids
- ๐ค AI Composition - Generate ABC notation using Claude 3.7 Sonnet or Ollama
- ๐ผ Format Conversion - ABC โ MIDI โ WAV pipeline with PDF scores
- ๐๏ธ Audio Processing - Apply reverb, delay, distortion and more
- ๐ Dataset Building - Create structured datasets for ML training
- ๐ฅ๏ธ Interactive TUI - Browse compositions with playback and rating system
- ๐ Model Flexibility - Switch between Anthropic Claude and Ollama models
# Global installation
npm install mediocre-music -g
# Using Anthropic Claude
export ANTHROPIC_API_KEY=your_key_here
# OR Using Ollama (running locally)
export AI_PROVIDER=ollama
export OLLAMA_ENDPOINT=http://localhost:11434
export OLLAMA_MODEL=llama3
# Clone and setup
git clone https://github.com/yourusername/mediocre.git
cd mediocre
npm install
# Create .env with your API key settings
# For Anthropic:
echo "ANTHROPIC_API_KEY=your_key_here" > .env
# OR for Ollama:
echo "AI_PROVIDER=ollama" > .env
echo "OLLAMA_ENDPOINT=http://localhost:11434" >> .env
echo "OLLAMA_MODEL=llama3" >> .env
- Node.js 18+
- AI Provider (choose one):
- Anthropic API key (Claude 3.7 Sonnet recommended)
- Ollama with a compatible model (llama3, mistral, etc.)
- External tools:
abcmidi
- ABC โ MIDI conversionabcm2ps
&ghostscript
- PDF score generationtimidity
- MIDI โ WAV conversionsox
- Audio effects processing
Note: All commands that work with existing music files (like
modify
,mix-and-match
,info
,more-like-this
, etc.) accept direct file paths to ABC notation files, allowing precise control of which files to manipulate.
# Create 5 hybrid genres
mediocre genres -n 5
# Customize genre combinations
mediocre genres -c "baroque,serialist,minimalist" -m "techno,trap,vaporwave" -n 3
# Generate a composition for a specific hybrid
mediocre generate -g "Baroque_x_Techno" -c 1
# Generate multiple pieces with random hybrids
mediocre generate -C "baroque,classical" -M "techno,ambient" -c 3
# Use custom system prompt
mediocre generate -g "Renaissance_x_Trap" --system-prompt examples/custom-system-prompt.txt
# Use Ollama instead of Anthropic Claude
mediocre generate -g "Baroque_x_Techno" --ai-provider ollama --ollama-model llama3
# Convert ABC โ MIDI โ WAV
mediocre convert --to midi -d ./output
mediocre convert --to wav -d ./output
# Convert to WAV with individual instrument stems
mediocre convert --to wav -d ./output --stems
# Generate PDF scores
mediocre convert --to pdf -d ./output
# Add effects
mediocre process -d ./output -e reverb
# Extend or transform existing pieces
mediocre modify "/path/to/baroque_x_jazz-score1-1234567890.abc" -i "Add a dramatic breakdown with harpsichord solo"
# Display detailed information about a composition
mediocre info "/path/to/baroque_x_jazz-score1-1234567890.abc"
# Create compositions similar to an existing one
mediocre more-like-this "/path/to/baroque_x_jazz-score1-1234567890.abc" -c 2 --solo
# Create a new composition by combining elements from multiple ABC files
mediocre mix-and-match -f "/path/to/first.abc" "/path/to/second.abc" --instruments "Piano,Violin,Synthesizer"
# Add lyrics to an existing MIDI file using a corresponding ABC file
mediocre lyrics -m "/path/to/composition.mid" -a "/path/to/composition.abc" -p "A song about the beauty of nature" --instruments "Piano,Vocals"
# Create structured dataset
mediocre dataset -d ./output
# Process a single file
mediocre validate-abc -i "/path/to/composition.abc" -o "/path/to/fixed.abc"
# Process all ABC files in the output directory
mediocre validate-abc
Mix and match from these example categories to create unique sonic fusions:
|
|
Come up with your own crazy ideas and give them a try! I merged Cardi B and John Zorn and I think it turned out really great.
- Genre Fusion - AI combines musical traditions into hybrid forms
- Composition - AI (Claude or Ollama) creates ABC notation with abc2midi extensions
- Conversion - Pipeline transforms notation into playable formats
- Processing - Effects chain generates training pairs
- Dataset - Organized structure with complete metadata
Read OBSERVATIONS.md
for some helpful hints about how to most
effectively utilize the tool.
mediocre/
โโโ src/ # Source code
โ โโโ commands/ # Command implementations
โ โโโ utils/ # Utility functions
โ โโโ index.js # Entry point
โโโ output/ # Generated music files
โโโ dataset/ # Final processed dataset
โโโ temp/ # Temporary files
MIT