A visual drum machine and pattern sequencer built with Strudel.cc, React Flow, and styled using Tailwind CSS and shadcn/ui. Create complex musical patterns by connecting instrument nodes to effect nodes with a drag-and-drop interface.
Table of Contents
Getting Started
To get started, follow these steps:
-
Install dependencies:
npm install # or yarn install # or pnpm install # or bun install
-
Run the development server:
npm run dev # or yarn dev # or pnpm dev # or bun dev
Tech Stack
-
Audio Engine: Strudel.cc - Web-based live coding environment
-
React Flow Components: The project uses React Flow Components to build nodes. These components are designed to help you quickly get up to speed on projects.
-
shadcn CLI: The project uses the shadcn CLI to manage UI components. This tool builds on top of Tailwind CSS and shadcn/ui components, making it easy to add and customize UI elements.
-
State Management with Zustand: The application uses Zustand for state management, providing a simple and efficient way to manage the state of nodes, edges, and other workflow-related data.
Node Types
π΅ Instruments
- Pad Node - Grid-based step sequencer with scales and modifiers
- Beat Machine - Classic drum machine with multiple instrument tracks
- Arpeggiator - Pattern-based arpeggiated sequences with visual feedback
- Chord Node - Interactive chord player with scale selection
- Polyrhythm - Multiple overlapping rhythmic patterns
- Custom Node - Direct Strudel pattern input
ποΈ Synths
- Drum Sounds - Sample-based drum sound selection
- Sample Select - Custom sample playback and selection
ποΈ Audio Effects
- Gain - Volume control and amplification
- PostGain - Secondary gain stage
- Distortion - Saturation and harmonic distortion
- LPF - Low-pass filtering with cutoff control
- Pan - Stereo positioning and width
- Phaser - Sweeping phase modulation effect
- Crush - Bit-crushing and sample rate reduction
- Jux - Alternating left/right channel effects
- FM - Frequency modulation synthesis
- Room - Realistic acoustic space simulation with size, fade, and filtering controls
β±οΈ Time Effects
- Fast - Speed multiplication (Γ2, Γ3, Γ4)
- Slow - Speed division (Γ·2, Γ·3, Γ·4)
- Late - Pattern delay and offset timing
- ASDR - Manages Attack, Release, Sustain and Decay controls
- Reverse - Reverse pattern playback
- Palindrome - Bidirectional pattern playback
- Mask - Probabilistic pattern masking
- Ply - Pattern subdivision and multiplication
Usage Guide
Creating Patterns
-
Basic Pattern:
- Add a drum machine or pad node
- Click buttons to activate steps
- Adjust tempo with BPM control
-
Complex Patterns:
- Use Shift+click to select multiple notes for grouping
- Apply row modifiers for per-step effects
- Chain multiple nodes for layered sounds
Connecting Nodes
- Source to Effect: Drag from sound source to effect node
- Effect Chaining: Connect multiple effects in series
- Multiple Sources: Connect multiple sources to the same effect
Pattern Modifiers
Each step can have modifiers applied:
- Normal: Standard playback
- Fast (Γ2, Γ3, Γ4): Speed multiplication
- Slow (/2, /3, /4): Speed division
- Replicate (!2, !3, !4): Note repetition
- Elongate (@2, @3, @4): Note duration extension
Performance Controls
- Global Play/Pause: Press spacebar to pause/resume all active patterns
- Group Controls: Pause/resume connected node groups independently
- Live Pattern Editing: Modify patterns while playing with real-time updates
- Pattern Preview: View generated Strudel code for each node
Keyboard Shortcuts
- Spacebar: Global play/pause toggle
- Shift + Click: Multi-select grid cells for grouping (in Pad nodes)
- Right-click: Context menu for pattern modifiers
Development
Project Structure
src/
βββ components/ # React components
β βββ nodes/ # Flow node components
β β βββ instruments/ # Instrument node implementations
β β βββ effects/ # Effect node implementations
β β βββ synths/ # Synthesizer node implementations
β βββ ui/ # shadcn/ui components
β βββ workflow/ # Flow editor components
β βββ edges/ # Custom edge components
βββ data/ # Static data and configurations
βββ hooks/ # Custom React hooks
βββ lib/ # Utility libraries and core logic
βββ store/ # Zustand state management
βββ types/ # TypeScript type definitions
Acknowledgments
Contact Us
Weβre here to help! If you have any questions, feedback, instrument recommendations, or just want to share your project with us, feel free to reach out:
- Contact Form: Use the contact form on our website.
- Email: Drop us an email at info@xyflow.com.
- Discord: Join our Discord server to connect with the community and get support.