A modern synthetic drum synthesizer built entirely in Python with algorithmic sound generationβno samples required. Features a full-featured GUI, MIDI support, pattern sequencer, and advanced DSP effects.
Perfect for producers, sound designers, and developers interested in audio synthesis and digital signal processing.
- 8 Independent Drum Channels with full parameter control
- Oscillator Section
- Sine, Triangle, and Sawtooth waveforms
- Pitch modulation: Decay, Sine (FM), and Random modes
- Attack and decay envelope shaping
- Noise Generator
- Low-pass, Band-pass, High-pass filtering
- Stereo width control
- Exponential, Linear, and Modulated envelope modes
- Advanced Mixing
- Oscillator/Noise blend control
- Soft-clipping distortion
- Parametric EQ per channel
- Level and Pan controls
- Choke groups for realistic hi-hat behavior
- Vintage Character - Analog warmth and saturation
- Reverb - Space and ambience
- Delay - Rhythmic echoes and timing effects
- Smoothed Parameters - Anti-zipper noise on parameter changes
- MIDI Support - Full MIDI input with velocity sensitivity
- Pattern Manager - Built-in step sequencer with per-step probability and substeps
- Preset System - Save and load complete drum kits
- Preferences Manager - Remembers your settings and folder locations
- Real-time Audio - Low-latency playback via
sounddevice
- Python 3.8+ (tested up to Python 3.12)
- pip package manager
- MIDI interface (optional, for MIDI control)
- Clone or download this repository
cd pythonic- Create a virtual environment (recommended)
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate- Install dependencies
pip install -r requirements.txtNote: If you encounter issues with
midoorpython-rtmidi, they're only required for MIDI functionality. The synth works without them.
python run.pyOr use the provided shell script:
./run.shOn first launch, Pythonic automatically creates:
- Configuration directory for preferences
Pythonic Presetsfolder in your Documents- Default factory presets
| Key | Action |
|---|---|
1-8 |
Trigger drum channels 1-8 |
S |
Save preset |
L |
Load preset |
- Knobs: Click and drag vertically
- Sliders: Click and drag horizontally
- Buttons: Click to toggle
- Double-click knobs: Reset to default
- Mouse wheel: Fine adjustment
- Connect your MIDI controller
- Launch Pythonicβit automatically detects MIDI devices
- Map drum channels to MIDI notes (default: C1-G1)
- Velocity-sensitive response on all channels
Loading: Use the preset combo-box at the top of the window, or click the folder icon to browse
Saving: Click "Save Preset" buttonβthe file browser opens in your preset folder
Preset Location:
- Windows:
%USERPROFILE%\Documents\Pythonic Presets - macOS:
~/Documents/Pythonic Presets - Linux:
~/Documents/Pythonic Presets
Microtonic Compatibility:
- Pythonic can import
.mtpresetfiles from Soniccharge Microtonic - Load drums and patterns directly from Microtonic presets
- Provides an open-source alternative workflow for Microtonic users
Note: Pythonic uses its own synthesis engine. While it can read Microtonic presets, the resulting sounds may differ from the original due to differences in DSP implementation. Pythonic is an independent project and is not affiliated with, endorsed by, or sponsored by Sonic Charge or NuEdge Development. Microtonicβ’ is a trademark of Sonic Charge/NuEdge Development.
Basic Pattern Editing:
- Click steps to toggle triggers, accents, and fills
- Adjust pattern length per channel
- Visual step indicator shows current playback position
Per-Step Probability:
- Enable probability mode to control the chance of each step triggering (0-100%)
- 100% = always plays, 50% = plays half the time, 0% = never plays
- Adds organic variation and humanization to patterns
Substeps (Micro-Timing):
- Right-click any step to access substep menu
- Define subdivisions using 'o' (play) and '-' (skip) notation
- Examples: "oo-" = play twice then skip, "o-o-" = alternating hits
- Creates flams, rolls, and complex rhythmic variations within a single step
pythonic/
βββ pythonic/ # Core synthesis engine
β βββ synthesizer.py # Main 8-channel synthesizer
β βββ drum_channel.py # Individual drum channel
β βββ drum_generator.py # AI drum generation (CVAE inference)
β βββ oscillator.py # Waveform generation
β βββ noise.py # Noise generator
β βββ envelope.py # ADSR envelope generators
β βββ filter.py # State-variable filters
β βββ reverb.py # Reverb effect
β βββ delay.py # Delay effect
β βββ vintage.py # Analog character processing
β βββ midi_manager.py # MIDI input handling
β βββ pattern_manager.py # Step sequencer
β βββ preset_manager.py # Preset save/load
β βββ preferences_manager.py # Settings persistence
β βββ smoothed_parameter.py # Parameter smoothing
βββ gui/ # User interface (Tkinter)
β βββ main_window.py # Main application window
β βββ drum_generator_dialog.py # AI drum generator dialog
β βββ widgets.py # Custom GUI components
βββ tests/ # Unit and integration tests
β βββ test_synthesis.py # Synthesis accuracy tests
β βββ test_patterns.py # Pattern manager tests
β βββ test_reference_wavs.py # Audio comparison tests
βββ test_patches/ # Test presets and analysis
βββ tools/ # Development utilities
βββ run.py # Application entry point
βββ run.sh # Shell launcher script
βββ requirements.txt # Python dependencies
MIDI/Key Input
β
Trigger
β
ββββββββββββββββββββββ
β Oscillator ββββ Envelope βββ
β (Sine/Tri/Saw) β β
ββββββββββββββββββββββ ββββ Mix βββ Distortion βββ EQ βββ Vintage βββ Delay βββ Reverb βββ Output
ββββββββββββββββββββββ β
β Noise Generator ββββ Filter βββββ
β (LP/BP/HP) β Envelope
ββββββββββββββββββββββ
Pythonic includes 8 built-in drum sounds:
- Kick - Deep bass drum with exponential pitch sweep
- Snare - Punchy snare with noise body
- Closed Hi-Hat - Tight, crisp hi-hat
- Open Hi-Hat - Sustaining open hi-hat
- High Tom - Tuned high tom
- Low Tom - Tuned low tom
- Clap - Hand clap with modulated envelope
- Rim Shot - Sharp rimshot click
Pythonic includes an optional AI-powered drum generator that uses a Conditional Variational Autoencoder (CVAE) trained on hundreds of drum patches.
The generator requires PyTorch, which is not included in the base install to keep the app lightweight.
Option A β In-app install: Open the generator dialog (Preset menu β AI Drum Generator...) and click Install ML Support. This runs pip install -r requirements-ml.txt in the current environment after confirmation.
Option B β Manual install:
pip install -r requirements-ml.txtFor GPU acceleration, install the appropriate CUDA/ROCm PyTorch variant first following pytorch.org. The CPU-only build works fine for inference.
The repository includes two pre-trained checkpoints:
| File | Description |
|---|---|
drum_cvae_best.pt |
Best validation loss during training |
drum_cvae_final.pt |
Final epoch checkpoint |
Point the generator to either file via the Load Model... button. The path is saved in preferences for next time.
- Open the preset menu and click AI Drum Generator...
- Load a model checkpoint (
.ptfile) - Adjust Temperature (lower = conservative, higher = experimental), Candidates count, and optional Seed for reproducibility
- Choose a drum type per slot using the dropdown (constrained to TR-8-style families)
- Click Generate per slot or Generate All 8
- Browse candidates with
</>arrows - Preview a single slot (one-shot) or Loop Preview the full pattern with generated drums overlaid on your current kit
- Check the slots you want to keep and click Apply Selected
The live kit is never modified until you explicitly apply β preview is non-destructive.
| Slot | Label | Allowed Types |
|---|---|---|
| 1 | BD | bd |
| 2 | SD | sd |
| 3 | CH | ch, shaker |
| 4 | OH | oh |
| 5 | TOM HI/PERC | tom, perc |
| 6 | TOM LO/PERC | tom, perc, cowbell |
| 7 | CLAP/RIM | clap, blip, zap, cowbell |
| 8 | CY/FX | cy, fx, fuzz, reverse, synth, bass, other |
- Sample Rate: 44.1 kHz (CD quality)
- Bit Depth: 32-bit float internal processing
- Audio Backend: PortAudio via
sounddevice - Latency: ~11.6ms (512-sample buffer, configurable)
- MIDI Backend: RtMidi via
python-rtmidiandmido - GUI Framework: Tkinter (cross-platform)
Run the test suite:
./run_tests.shOr manually:
pytest tests/ -vThe test suite includes:
- Synthesis accuracy validation
- Audio output comparison tests
- Pattern manager functionality
- Reference WAV generation
- Verify
sounddeviceinstallation:pip install --upgrade sounddevice - Check system audio output device is working
- Try increasing buffer size in gui/main_window.py
- List available devices:
python -c "import sounddevice; print(sounddevice.query_devices())"
- Ensure your MIDI device is connected before launching
- Check if
midoandpython-rtmidiare installed - On Linux, you may need ALSA MIDI permissions
- Test MIDI:
python test_midi_input.py
- Increase audio buffer size (reduces real-time load)
- Disable unused effects (Reverb, Delay)
- Close other audio applications
- Use fewer simultaneous voices
macOS: May need to install PortAudio: brew install portaudio
Linux: Install dependencies: sudo apt install python3-dev portaudio19-dev libasound2-dev libjack-dev
Windows: Usually works out of the box with pip
- QUICK_START.md - Detailed guide for new users
Built with Python | Educational & Open Source | No Samples Required
Contributions are welcome! Areas for improvement:
- Pattern sequencer
- MIDI input support
- Preset browser
- Export to WAV
- Additional waveforms
- Effects (reverb, delay)