ModalGrid breathes new life into the classic Novation Launchpad MK1 by transforming it from a simple clip launcher into a smart melodic instrument. Built for Linux, it maps musical scales and modes directly to the grid—ensuring you never hit a wrong note. With native ALSA MIDI integration and on-device configuration, it turns your hardware into a powerful, expressive surface for your DAW.
- Hardware Awareness: Respects the limitations of the MK1 (Red/Green/Amber LEDs only), using color meaningfully (e.g., Amber = Root Note, Green = In-Key, Red = Out-of-Key).
- Musicality: Actively helps the user play in key, acting as a filter and a guide.
- Connectivity: Native integration using virtual ALSA MIDI ports, easily bridged to JACK.
- Root & Scale Selection: Extensive library of scales including Major, Minor, Modes, Pentatonics, and exotic scales (Bhairav, Pelog, etc.).
- Tuning: Exotic and non-Western scales are approximated to 12-Tone Equal Temperament (12-TET) to ensure compatibility with standard MIDI synthesizers.
- Layout Modes:
- Diatonic 4th (Default): Standard "Keyboard" feel where moving up a row moves a 4th degree in the scale.
- Diatonic 3rd: Layout where moving up a row moves a 3rd degree.
- Sequent: Continuous diatonic layout.
- Chromatic: All semitones are mapped, with scale notes highlighted.
- Chromatic Guitar: Layout mimicking guitar tuning (bottom rows).
- Drum Rack: 4x4 quadrants for standard drum rack mapping (chromatic, no scale filtering).
- Visual Feedback:
- Root Notes: Amber.
- In-Scale Notes: Green.
- Out-of-Scale: Off (in Diatonic modes) or Dim (in Chromatic modes).
- Activation: In Config Mode, press the button at Row 1, Column 7 (Green). This activates the Quick Scale overlay.
- Usage: In Play Mode, the top 2 rows are replaced by Quick Scale controls.
- Sub-Pages: Press the Top-Right Button (Row 0, Col 7) of the overlay to cycle between:
- Root Note: Select Root Note, Relative Scale, Circle of Fifths.
- Modus: Select Scale Mode (Major, Minor, Dorian, etc.).
- Note Repeat: (Placeholder) Configuration for note repeat.
- Enter Config Mode: Press the Top-Right Side Button (Session/Vol).
- Config Grid Layout:
- Row 0 (Top): Layout Selection (Diatonic 4th, Chromatic, Guitar, etc.).
- Row 1-2: Root Note Selection & Helpers (Relative Scale, Circle of Fifths, Quick Scale).
- Row 3: Octave Selection (-2 to +5).
- Row 4-7: Scale Selection (Major, Minor, Modes, Exotic Scales).
- Auto-detection of connected Launchpad MK1 devices.
- Creates a virtual ALSA MIDI output port (
ModalGrid). - Routes notes from the Launchpad to the virtual port.
-
Clone the repository:
git clone https://github.com/dtk1985/ModalGrid.git cd ModalGrid -
Set up a virtual environment (recommended):
python -m venv .venv # Bash / Zsh source .venv/bin/activate # Fish source .venv/bin/activate.fish
-
Install dependencies:
python -m pip install -r requirements.txt
python src/main.py- Start your JACK audio server (or PipeWire).
- Run the script.
- Use a patchbay like qpwgraph or Catia to connect the
ModalGridALSA MIDI port to your DAW or synth.- Note: If using pure JACK, you may need an ALSA-to-JACK bridge (like
a2jmidid). PipeWire handles this automatically.
- Note: If using pure JACK, you may need an ALSA-to-JACK bridge (like
- Language: Python 3.10+
- Libraries:
mido,python-rtmidi
LaunchpadDriver: Handles raw MIDI communication and abstracts LED color codes.TheoryEngine: Pure logic class that calculates MIDI note numbers based onRoot + Scale + Interval.ModalGridApp(Main Controller): Handles state (Current Key, Current Mode), renders the UI, and routes input events.
- Grid: 8x8 (Notes) + Top Row (CC) + Right Column (Notes).
- Colors: Limited to Red, Green, and Amber (Mix) with low/high brightness levels.