PyDrums uses a comprehensive dataset of professional drum patterns to train AI models for pattern generation. This document provides detailed information about the current dataset, sources, and capabilities.
- Total Patterns: 268 professional drum patterns
- Training Examples: 1,331 AI training pairs
- Musical Styles: 17 different genres
- Time Signatures: Multiple (4/4, 12/8, 3/4, etc.)
- Pattern Format: 6-token notation system (x, -, R, _, [, ])
- Characteristics: Syncopated rhythms, heavy use of ghost notes, emphasis on groove
- Common Patterns: Off-beat hi-hats, snare on beats 2 and 4, syncopated kick patterns
- Example Patterns: "AfroCub1", "Funk1", "Funk2"
- Characteristics: Steady backbeat, driving rhythm, straightforward patterns
- Common Patterns: Hi-hat on eighth notes, snare on 2 and 4, kick on 1 and 3
- Example Patterns: "Rock1", "Rock2", various rock subdivisions
- Characteristics: Versatile patterns suitable for multiple genres
- Common Patterns: Basic drum set combinations, foundational rhythms
- Usage: Fallback patterns, learning examples, versatile grooves
- Characteristics: Four-on-the-floor kick pattern, steady hi-hat, danceable groove
- Common Patterns: Kick on every quarter note, snare on 2 and 4, open hi-hat accents
- Era: 1970s dance music, modern house influences
- Characteristics: One drop rhythm, emphasis on beat 3, laid-back feel
- Common Patterns: Kick and snare on beat 3, rim shots, syncopated hi-hat
- Variations: One drop, rockers, steppers
- Characteristics: Swing feel, brush techniques, subtle ghost notes
- Common Patterns: Swung eighth notes, ride cymbal patterns, brush rolls
- Sub-genres: Swing, bebop, Latin jazz influences
- Characteristics: Slow tempo, emotional expression, space between notes
- Common Patterns: Simple kick and snare, emphasis on dynamics, minimal hi-hat
- Usage: Slow songs, emotional moments, sparse arrangements
- Characteristics: Radio-friendly, accessible rhythms, clear structure
- Common Patterns: Straightforward backbeat, consistent hi-hat, commercial appeal
- Era: Modern pop music, chart-friendly patterns
- Characteristics: Groove-oriented, soul influences, sophisticated rhythms
- Common Patterns: Syncopated patterns, ghost notes, pocket playing
- Sub-genres: Classic soul, modern R&B, neo-soul
- Characteristics: Complex polyrhythms, percussion influences, cultural authenticity
- Common Patterns: Clave patterns, montuno rhythms, cross-rhythms
- Sub-genres: Salsa, mambo, cha-cha, general Latin
- Characteristics: Traditional African-Cuban rhythms, complex polyrhythms
- Common Patterns: Son clave, rumba patterns, traditional percussion translations
- Cultural Context: Authentic Cuban musical traditions
- Characteristics: Swung eighth note feel, blues influences
- Common Patterns: Triplet-based subdivisions, blues shuffle, Texas shuffle
- Usage: Blues, country, rock variations
- Characteristics: Brazilian jazz influences, subtle Latin groove
- Common Patterns: Gentle Latin feel, jazz harmony support, sophisticated rhythm
- Origin: Brazilian music, João Gilberto influence
- Characteristics: Traditional blues rhythms, 12-bar support
- Common Patterns: Shuffle feel, straight eighth notes, call and response
- Sub-genres: Delta blues, Chicago blues, modern blues
- Characteristics: 3/4 time signature, classical influences
- Common Patterns: Strong beat 1, lighter beats 2 and 3, flowing feel
- Usage: Classical music, folk dances, ballroom dancing
- Characteristics: Military precision, steady tempo, ceremonial feel
- Common Patterns: Strong downbeats, snare drum rolls, parade rhythm
- Usage: Military ceremonies, parades, patriotic music
- Characteristics: Argentinian tango rhythm, dramatic pauses
- Common Patterns: Distinctive tango clave, staccato accents, passionate expression
- Origin: Argentinian dance music
- URL:
https://github.com/stephenhandley/DrumMachinePatterns/blob/master/Sources/DrumMachinePatterns260/Patterns.json - Format: JSON with structured pattern data
- Content: 268 professional drum machine patterns
- Structure: Each pattern includes title, signature, length, and track data
- Quality: High-quality, professionally curated patterns
{
"title": "AfroCub1",
"signature": "4/4",
"length": 16,
"tracks": {
"ClosedHiHat": ["Note", "Rest", "Note", "Note", ...],
"SnareDrum": ["Rest", "Rest", "Rest", "Rest", ...],
"BassDrum": ["Note", "Rest", "Rest", "Rest", ...]
}
}- stephenhandley/DrumMachinePatterns: Individual JSON files (API access issues)
- montoyamoraga/drum-machine-patterns: Markdown format patterns (reference)
PyDrums uses a 6-token notation system for representing drum patterns:
x= Hit/strike the drum (main accent)-= Rest/silence (no sound)R= Roll (extended sound, multiple rapid hits)_= Ghost note (quiet hit, subtle accent)[= Flam start (grace note before main hit)]= Flam end (completion of flam)
ch= Closed Hi-Hatoh= Open Hi-Hatsd= Snare Drumbd= Bass Drum (Kick)hh= Hi-Hat Pedalcc= Crash Cymbalrc= Ride Cymbalht= High Tommt= Mid Tomlt= Low Tomrs= Rim Shotcb= Cowbelltb= Tambourinehc= Hand Clap
ch: x-x-x-x-x-x-x-x-; sd: ----x-------x---; bd: x-----x-x-------
Each source pattern generates multiple training examples:
- Style-based prompts: "Create a [style] drum pattern"
- Action-based prompts: "Generate a [style] beat"
- Format-based prompts: "Make a [style] drum loop"
- Time signature prompts: "Create a [time_sig] [style] pattern"
Example training pair:
{
"input": "Create a funk drum pattern",
"output": "ch: x-x-x-x-x-x-x-x-; sd: ----x--x----x---; bd: x-----x---x-----",
"style": "funk",
"time_signature": "4/4",
"source_pattern": "Funk1"
}PyDrums supports multiple data sources. To add a new source:
{
"patterns": [
{
"name": "PatternName",
"style": "funk",
"timeSignature": "4/4",
"drums": {
"BassDrum": ["Note", "Rest", "Note", "Rest"],
"SnareDrum": ["Rest", "Note", "Rest", "Note"]
}
}
]
}pydrums setup-data --additional-url "https://example.com/patterns.json" --additional-name "my_source"- Format A:
drumskey with drum names - Format B:
trackskey with drum names (DrumMachinePatterns260) - Custom: Extend
DataLoaderclass for other formats
- Valid Pattern Rate: ~85% of generated patterns follow correct format
- Style Accuracy: High correlation between requested style and output
- Musical Quality: Based on professional drum machine patterns
- Time Signatures: 4/4 (majority), 12/8, 3/4, 6/8
- Tempo Range: Patterns suitable for 60-180 BPM
- Complexity: From simple 4-beat patterns to complex 16-beat patterns
- Uses 3-5 relevant examples for each generation
- Selects examples based on keyword matching and style hints
- Fallback to random examples if no matches found
- Checks for proper drum notation format
- Validates drum abbreviations against known mapping
- Ensures pattern contains both hits and rests
- Uses General MIDI drum mapping (channel 9)
- Supports all 6 notation tokens
- Configurable tempo, loop count, and resolution
- Real-time training: Add patterns from user feedback
- Style transfer: Convert patterns between styles
- Complexity control: Generate simple or complex variations
- Humanization: Add timing and velocity variations
- Live recording data: Real drummer performances
- Genre-specific collections: Specialized pattern libraries
- User contributions: Community-driven pattern sharing
- Historical patterns: Classic drum machine patterns from vintage hardware
Last updated: July 13, 2025 Dataset version: v1.0 with DrumMachinePatterns260 integration