Polyrhythms From Dots — User Guide
Visual and auditory polyrhythm generator: creates complex rhythmic patterns using dot notation with stereo panning and visual display.
What this does
This script implements polyrhythm generation from dot notation — a comprehensive tool for creating, visualizing, and hearing complex rhythmic patterns where two different rhythms play simultaneously. The system generates both visual dot patterns and corresponding audio with stereo panning, making it ideal for rhythm education, composition, and analysis.
Key Features:
- 9 Built-in Polyrhythm Presets — From simple to complex patterns
- Custom Rhythm Creation — Any two numbers for unique polyrhythms
- Visual Dot Display — Clear graphical representation of rhythms
- Stereo Panning — Spatial separation of rhythmic layers
- Adjustable Timing — Control bar duration and note length
- Musical Parameters — Customizable pitch and amplitude
- Real-time Playback — Immediate auditory feedback
Technical Implementation: (1) Rhythm Calculation: Computes timing based on bar duration and number of dots. (2) Visual Generation: Draws circle patterns representing rhythmic events. (3) Audio Synthesis: Creates sine wave bursts at rhythmic positions. (4) Stereo Processing: Applies panning to separate rhythmic layers spatially. (5) Preset System: Pre-configured musical polyrhythms with optimized parameters. (6) Customization: Flexible parameter control for unique creations. (7) Quality Control: Automatic naming and cleanup for smooth workflow.
Quick start
- In Praat, ensure no objects are selected (script creates new sounds).
- Run script… →
polyrhythms_from_dots.praat. - Choose Preset or select "Custom" for manual control.
- If using custom, set dots1 and dots2 for each rhythm.
- Adjust barDuration for overall timing (seconds).
- Set dotDur for individual note length.
- Configure baseFreq and amplitude for sound character.
- Adjust panAmount for stereo separation.
- Click OK — visual display appears and sound plays automatically.
Polyrhythm Theory
What are Polyrhythms?
🎵 Simultaneous conflicting rhythms
Definition: Two or more independent rhythms with different subdivisions played together
Mathematical basis: Ratio of rhythmic densities (e.g., 3:4, 5:7)
Musical effect: Creates tension, complexity, and rhythmic interest
Basic polyrhythm concept:
Common Polyrhythm Types
Simple Ratios (2:3, 3:4)
Characteristics and uses:
Complex Ratios (5:7, 7:8, 5:9)
Advanced polyrhythms:
Mathematical Foundation
Least Common Multiple and Pattern Repetition
When do patterns repeat?
Phase Relationships
How rhythms interact over time:
Rhythm Presets
Preset 1: 3 vs 4 (Waltz)
🎵 Classic Three Against Four
Musical character: Flowing, dance-like, elegant
Cultural origins: European classical, jazz standards
Best for: Introduction to polyrhythms, waltz variations
Preset parameters:
Preset 2: 5 vs 7 (Complex)
🎵 Medium Complexity
Musical character: Mathematical, precise, intricate
Cultural origins: Progressive rock, fusion
Best for: Intermediate study, composition ideas
Preset parameters:
Preset 3: 2 vs 3 (Simple)
🎵 Fundamental Polyrhythm
Musical character: Basic, foundational, cross-rhythmic
Cultural origins: African, Latin American
Best for: Beginners, rhythm fundamentals
Preset 4: 4 vs 5 (Jazz)
🎵 Jazz Quarter-Note Feel
Musical character: Swinging, sophisticated, modern
Cultural origins: Jazz, contemporary classical
Best for: Jazz studies, modern composition
Preset 5: 3 vs 5 (African)
🎵 Cross-Cultural Pattern
Musical character: Organic, layered, traditional
Cultural origins: West African, Afro-Cuban
Best for: World music studies, percussion
Preset 6: 7 vs 8 (Dense)
🎵 High-Density Texture
Musical character: Complex, busy, virtuosic
Cultural origins: Fusion, math rock, contemporary
Best for: Advanced study, complex textures
Preset 7: 4 vs 7 (Progressive)
🎵 Progressive Rock Feel
Musical character: Driving, mathematical, energetic
Cultural origins: Progressive rock, metal
Best for: Rock applications, rhythmic intensity
Preset 8: 5 vs 9 (Math Rock)
🎵 Extreme Complexity
Musical character: Intricate, disorienting, mathematical
Cultural origins: Math rock, experimental
Best for: Advanced rhythm concepts, experimental music
Preset Comparison Table
| Preset | Ratio | Complexity | Bar Duration | Musical Style |
|---|---|---|---|---|
| 2 vs 3 | 2:3 | Beginner | 2.0s | Fundamental |
| 3 vs 4 | 3:4 | Easy | 3.0s | Waltz/Classical |
| 3 vs 5 | 3:5 | Intermediate | 2.5s | African |
| 4 vs 5 | 4:5 | Intermediate | 4.0s | Jazz |
| 4 vs 7 | 4:7 | Advanced | 3.0s | Progressive |
| 5 vs 7 | 5:7 | Advanced | 3.5s | Complex |
| 5 vs 9 | 5:9 | Expert | 5.0s | Math Rock |
| 7 vs 8 | 7:8 | Expert | 4.0s | Dense |
Visual Display System
Dot Notation
● Visual Rhythm Representation
Concept: Each dot represents a rhythmic event in time
Layout: Top line = left channel, Bottom line = right channel
Spacing: Even distribution across bar duration
Visual generation algorithm:
Stereo Panning System
Spatial Rhythm Separation
Panning calculation:
Panning Examples
Different panning scenarios:
Audio Synthesis
Sine Wave Generation
Sound creation algorithm:
Sound Design Considerations
Parameter effects on sound character:
Applications
Music Education
Use case: Teaching polyrhythm concepts and coordination
Technique: Start with simple ratios, progress to complex ones
Settings: Use visual display and stereo separation for clarity
Composition and Arranging
Use case: Creating complex rhythmic patterns for music
Technique: Experiment with unusual ratios for unique textures
Settings: Custom rhythms with musical parameter tuning
Percussion Practice
Use case: Developing limb independence and coordination
Technique: Assign rhythms to different limbs/hands
Settings: Use panning to simulate different drum positions
Music Therapy
Use case: Rhythmic stimulation and coordination therapy
Technique: Use simpler ratios for motor skill development
Settings: Gentle amplitudes, comfortable frequency ranges
Ethnomusicology Research
Use case: Studying rhythmic patterns from world music
Technique: Recreate documented polyrhythms for analysis
Settings: Culturally appropriate ratios and timings
Practical Workflow Examples
🎓 Rhythm Education Session
Goal: Introduce students to polyrhythm concepts
Settings:
- Start with: 2 vs 3 (Simple)
- Progress to: 3 vs 4 (Waltz)
- Advanced: 4 vs 5 (Jazz)
- barDuration: 3.0-4.0 seconds
- panAmount: 0.8 (clear separation)
Result: Gradual understanding of increasing complexity
🥁 Drum Set Coordination
Goal: Develop limb independence for drummers
Settings:
- Rhythm: 3 vs 4 or 4 vs 5
- barDuration: 2.0-3.0 seconds
- dotDur: 0.03-0.05s (percussive)
- baseFreq: Different for each limb
Result: Improved coordination between hands and feet
🎵 Contemporary Composition
Goal: Create unique rhythmic material for composition
Settings:
- Rhythm: 5 vs 7 or 7 vs 8
- barDuration: 4.0-5.0 seconds
- Complex patterns for texture
- Experiment with extreme parameters
Result: Sophisticated rhythmic foundation for pieces
Creative Techniques
- Start simple: 2:3, 3:4 with longer durations
- Add complexity: 4:5, 3:5 with moderate durations
- Advanced patterns: 5:7, 4:7 with musical timing
- Expert challenges: 7:8, 5:9 with precise parameters
- Custom exploration: Prime number ratios for uniqueness
- Vary barDuration: Affects pattern clarity and speed
- Adjust dotDur: Changes sound character from staccato to legato
- Modify panAmount: Controls spatial separation intensity
- Change frequencies: Creates different musical intervals
- Custom ratios: Discover unique polyrhythmic relationships
Troubleshooting Common Issues
Cause: Too many dots, short bar duration, long dot duration
Solution: Use simpler ratio, increase bar duration, shorten dot duration
Cause: Low panAmount, mono playback, similar rhythms
Solution: Increase panAmount, use headphones, choose distinct ratios
Cause: High dot counts, small display area
Solution: Use simpler rhythms, increase bar duration for spacing
Cause: Extreme amplitude values, system volume issues
Solution: Use amplitude 0.3-0.7, check system audio levels
Cause: Too complex ratio, unfamiliar pattern
Solution: Start with 2:3 or 3:4, listen multiple times, use visual aid
Technical Reference
Complete Parameter Reference
| Parameter | Type | Default | Description |
|---|---|---|---|
| Preset | optionmenu | 1 | Pre-configured rhythm patterns |
| dots1 | integer | 5 | Number of dots in top rhythm (left channel) |
| dots2 | integer | 7 | Number of dots in bottom rhythm (right channel) |
| barDuration | real | 2.0 | Total duration of pattern in seconds |
| dotDur | real | 0.05 | Duration of each individual dot sound |
| baseFreq | real | 220 | Base frequency for top rhythm in Hz |
| samplerate | integer | 22050 | Audio sampling rate in Hz |
| dotRadius | real | 0.01 | Visual size of dots in normalized units |
| amplitude | real | 0.5 | Overall sound amplitude (0.0-1.0) |
| panAmount | real | 0.8 | Stereo panning intensity (0.0-1.0) |
Output Characteristics
Generated Sound Properties
Technical specifications:
Performance Characteristics
Processing Time Factors
Major time consumers:
Memory Usage
Storage requirements: