Linnstrument Scale Tool

Official support for: rogerlinndesign.com
RELATED
PRODUCTS

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
I recently created a tool for myself to assist in aligning my linnstrument with my push for performance purposes... All the code in in GitHub here:

https://github.com/CommmandrCody/LinnstrumentScaleTool (https://github.com/CommmandrCody/LinnstrumentScaleTool)

I hope some of you find it as useful as I have for my Ableton workflow.

-CmndrCody

Linnstrument Scale Tool

Automatically set the lights on your Linnstrument to reflect any musical scale of your choice. This tool uses MIDI CC messages to control the LED colors on each pad, making it easy to visualize scales, modes, and other musical patterns.
Three Ways to Use

Command Line Tool - Simple, fast, universal
Max for Live Device - Perfect integration with Ableton Live
MIDI Effect Plugin - Auto-detects scales as you play (advanced)

Features

30+ Built-in Scales: Major, minor, modes, pentatonics, blues, jazz, exotic scales, and more
Flexible Coloring: Root notes, scale degrees, or custom color schemes
Auto-detection: Automatically finds your Linnstrument MIDI port
Configurable: Supports custom Linnstrument tunings and layouts
Multiple Interfaces: Command-line, Max for Live, or MIDI effect plugin

Quick Install

Run the setup script for guided installation:

python setup.py

Or install manually:
Installation

Make sure you have Python 3.7+ installed
Install dependencies:

pip install -r requirements.txt

Make the script executable (optional):

chmod +x scale_tool.py

Quick Start
Basic Usage

Light up a C major scale:

python scale_tool.py C major

Light up D minor pentatonic:

python scale_tool.py D minor_pentatonic

Light up F# Dorian mode:

python scale_tool.py F# dorian

Color Options

Use custom colors for root and scale notes:

python scale_tool.py G major --root-color red --scale-color green

Highlight scale degrees (I, III, V) with different colors:

python scale_tool.py C major --degrees

Use custom color mapping for specific scale degrees:

python scale_tool.py A minor --colors '{"0": "red", "2": "yellow", "4": "green", "6": "cyan"}'

Available Colors

red
yellow
green
cyan
blue
magenta
white
orange
lime
pink
off

List all colors:

python scale_tool.py --list-colors

Available Scales
Major Scales and Modes

major (Ionian)
dorian
phrygian
lydian
mixolydian
aeolian (Natural Minor)
locrian

Minor Scales

minor (Natural Minor)
harmonic_minor
melodic_minor

Pentatonic Scales

major_pentatonic
minor_pentatonic

Blues

blues

Other Common Scales

whole_tone
chromatic
diminished
augmented

Jazz/Advanced

bebop_major
bebop_minor
altered (Super Locrian)

Exotic Scales

harmonic_major
double_harmonic (Byzantine)
hungarian_minor
japanese
spanish (Phrygian Dominant)

List all available scales:

python scale_tool.py --list-scales

Advanced Usage
Custom Linnstrument Tuning

If you've customized your Linnstrument tuning, you can specify the offsets:

python scale_tool.py C major --row-offset 7 --column-offset 1

Specify MIDI Port

If you have multiple MIDI devices, specify the port:

python scale_tool.py C major --port "Linnstrument MIDI 1"

List available MIDI ports:

python scale_tool.py --list-ports

Clear All Lights

Turn off all LEDs:

python scale_tool.py --clear

Using as a Python Library

You can also use the modules directly in your own Python code:

from scales import get_scale_notes, note_name_to_number
from linnstrument import Linnstrument

# Get scale notes
root = note_name_to_number('C')
scale_notes = get_scale_notes(root, 'major')

# Connect to Linnstrument
with Linnstrument() as linn:
# Light up the scale
linn.light_scale(scale_notes, root_color='red', scale_color='blue')

# Or use degree coloring
linn.light_scale_with_degrees(scale_notes)

# Or light individual notes
linn.light_note(60, 'green') # Middle C

How It Works

The tool uses MIDI Control Change (CC) messages to control the Linnstrument LEDs:

CC 20: Column coordinate (0-25)
CC 21: Row coordinate (0-7)
CC 22: Color value (0-11)

The tool calculates which pads on the Linnstrument correspond to notes in your chosen scale, then sends MIDI messages to light them up with your specified colors.
Troubleshooting
"No Linnstrument MIDI port found"

Make sure your Linnstrument is connected via USB
Check that it appears in your system's MIDI devices
Run python scale_tool.py --list-ports to see available ports
If it appears with a different name, use --port "exact name"

LEDs not lighting up

Make sure your Linnstrument firmware is up to date
Check that MIDI CC is enabled in your Linnstrument settings
Try clearing all lights first: python scale_tool.py --clear

Wrong notes are lighting up

Check your Linnstrument tuning settings
Adjust --row-offset and --column-offset to match your configuration
Default is: row offset = 5 semitones, column offset = 1 semitone

Examples
Jazz Practice

# Dorian mode for modal jazz
python scale_tool.py D dorian --degrees

# Altered scale for dominant chords
python scale_tool.py G altered --root-color red --scale-color cyan

Blues

# Classic blues scale
python scale_tool.py E blues --root-color blue --scale-color cyan

World Music

# Japanese pentatonic
python scale_tool.py A japanese --degrees

# Hungarian minor
python scale_tool.py D hungarian_minor --degrees

License

MIT License - feel free to use and modify as you wish.
Contributing

Found a bug or want to add a scale? Feel free to submit issues or pull requests!
Credits

Built using:

mido - MIDI library for Python
python-rtmidi - Python bindings for RtMidi

Linnstrument is a product of Roger Linn Design.

Post

Thank you for your contribution.

Post

Very cool! I guess it is different from the built in in that it support additional scales, etc..?

Post

I think this idea is to turn the Linnstrument into an Ableton Push/Novation Launchpad sort of grid with no wrong notes. I had asked for that a long time ago, and Roger told me that this sort of a setup missed the original point of the Linnstrument's layout, and that I should learn to use it as it was designed to be used before I started filing the edges off. I didn't want to do that, so my original LS128 found a new home with a friend in Finland. I came back to the LS128 some time later and "got it", but I admit this application is sort of intriguing...
Mike Metlay, PhD (nuclear physics -- no, seriously!) :D
listen to me: Mr. Spiral | join the fam: RadioSpiral | my gig: Atomic Words LLC (coming soon)

Post

Hey mate, going through the setup, theres some confusing bits... like for example your script expects the bottom right note to be a C2? when on the Linnstrument it's an F#0 (on the 128) Are we meant to transpose the pads? Or are your instructions really asking what the bottom left most C is?

Post

I did manage to get it working, it's very very cool.

Post

askalex wrote: Mon Mar 02, 2026 8:01 pm I did manage to get it working, it's very very cool.
I am considering buying a 128 and currently using a Push 3 in scale modes only, does this work similarly?

Post

No, unlike the Scale Mode on PUSH, which eliminates any non-diatonic notes, the playing surface on the LinnStrument is always chromatic; but you can light up the notes of any scale, if you need a reference.

Cheers!

Post

Just to say, the Linprovising series helped me get the vibe of the linstrument, and i rarely change scales now even after just a month. That being said, being neuro-spicy... I don't visualize the same way others do. intuitively knowing B comes before C not something my brain does, so I usually just play by ear.... so getting different scale lights is very helpful for that.

Global settings has Octave per row which is also very helpful for certain setups...

I may see if I can train Claude on CmdrCody's code and continue his amazing work. the way he's got it now is different layouts for drum or melodics... which is cool. He left space to add a clip launcher but didn't finish it it seems.

Post

Note... for anyone trying to do this with a Linnstrument 200. there are bugs in the 200 version of the scripts. The way I got it to work was to customize the 128 versions of the scripts. (notably setting columns to 25 instead of 16). I basically opened up the python files, config, linnstrument, and the linnstrument_ableton, and changed anywhere I say 16 to 25. I documented all this on @CmdrCody github, so hopefully it can get fixed.

Post

Note... for anyone trying to do this with a Linnstrument 200. there are bugs in the 200 version of the scripts. The way I got it to work was to customize the 128 versions of the scripts. (notably setting columns to 25 instead of 16). I basically opened up the python files, config, linnstrument, and the linnstrument_ableton, and changed anywhere I say 16 to 25. I documented all this on @CmdrCody github, so hopefully it can get fixed.

(heres the notes from the GITHUB issue log I posted, which will show you what to fix)
in the config.py and several other places (Linstrrument.py, lynstrument_ableton.py) the Linnstrument 200 is noted as haveing 26 columns (it has 25). this causes strange scale lighting behavior.

ALSO

LED manager.py, line 40 -- arg column the array is too short, it's just 16, it should be 25 (for the linnstrument 200)

Post Reply

Return to “Roger Linn Design”