Skip to content

Conversation

@zitongcharliedeng
Copy link

@zitongcharliedeng zitongcharliedeng commented Jan 19, 2026

Summary

Adds software-side chromatic (12-TET) quantization for whole-tone layouts, allowing semitones to be hit between whole-tone pads.

Depends on PR #13 (pitch bend scaling) - merge that first.

Demo video and discussion: #14

Why This Is Needed

Without any quantization, every note has slight microtonal errors from human imprecision - making chords sound slightly off and unintentional. At this pad scale, you can only realistically aim for semitones or whole tones, not microtones.

Hardware quantization (LinnStrument Quantize=ON) only snaps to pad centers (whole tones on whole-tone layouts), completely missing the semitones between pads. It also removes the ability to do vibrato/tremolo.

This software quantization snaps to ALL 12 chromatic semitones while preserving vibrato through movement detection.

New Settings

  • chromatic_quantize (bool): Enable 12-TET semitone snapping
  • whole_tone_bias (float, -1.0 to 1.0): Adjust zone balance for mechanical surface compensation
    • 0.0 = equal zones (50/50)
    • Positive = favor whole tones (harder to hit semitones accidentally)
    • Negative = favor semitones
    • 0.4375 recommended for speed bump surface
  • quantize_hold_threshold (float, 0 to 1): Movement sensitivity for vibrato detection
    • 0.0 = always snap (no vibrato passthrough)
    • 0.5 = balanced (recommended default)
    • 1.0 = never snap (all microtones pass through)
    • Detects wiggling (vibrato) vs holding still - when moving, microtones pass through; when stationary, snaps to semitone

Requirements

Must disable ALL LinnStrument quantization settings:

  • Quantize = OFF
  • Quantize Tap = OFF
  • Quantize Hold = OFF

This software quantization then handles semitone snapping with proper support for notes between pads, while preserving intentional vibrato (which hardware quantization removes).

- Add bend_scale setting (default 1.0) for adjusting pitch bend intensity
- Fix compose_pitch_bend() overflow bug: max bend (16384) wrapped to min
- Add helpful comments: LinnStrument Pitch Quantize must be OFF for smooth slides
@zitongcharliedeng zitongcharliedeng force-pushed the chromatic-quantize branch 5 times, most recently from a4925f1 to f0452d5 Compare January 19, 2026 20:56
Allows semitones to be hit between whole-tone pads via software quantization.

New settings:
- chromatic_quantize: Enable 12-TET semitone snapping (default: false)
- whole_tone_bias: Adjust zone balance, range -1.0 to 1.0 (default: 0.0)
  - 0.15 recommended for LinnStrument speed bump surface

Requirements:
- LinnStrument Quantize=OFF, Quantize Tap=OFF, Quantize Hold=OFF
- This setting overrides hardware quantization with proper semitone support
- Replace string-based quantize_hold (off/fast/medium/slow) with numeric quantize_hold_threshold (0-1)
- 0 = always snap (no vibrato), 1 = never snap (all microtones), 0.5 = balanced default
- Movement detection: wiggling passes through microtones, stationary snaps to semitones
- Preserves whole_tone_bias for mechanical surface compensation
- Layout-independent: works regardless of underlying interval (semitones, whole tones, etc.)
- Comprehensive docs in settings.py (single source of truth)
- Updated settings.ini.example with grouped chromatic quantization settings
- Default quantize_hold_threshold=0.5 (balanced vibrato sensitivity)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant