Skip to content

feat(settings): add keyboard note range calibration - #432

Merged
PolyMeilex merged 1 commit into
PolyMeilex:masterfrom
KVKcodes:feat/calibrate-note-range
Sep 8, 2026
Merged

PolyMeilex merged 1 commit into
PolyMeilex:masterfrom
KVKcodes:feat/calibrate-note-range

Conversation

@KVKcodes

@KVKcodes KVKcodes commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a "Calibrate" button to the "Note Range" settings section that lets users automatically configure their piano note range directly from their connected MIDI keyboard.

Problem

Setting the note range manually via the plus/minus spin buttons can be tedious, especially when using keyboards with non-standard or varying key counts (e.g., 25, 49, 61, 76, or 88 keys).

Solution

  • Added a Calibrate button inside the "Note Range" section in Settings.
  • When clicked, it guides the user through two steps:
    1. Step 1/2: "Play the far-left key on your keyboard..."
    2. Step 2/2: "Far-left key: . Play the far-right key..."
  • Automatically detects the played notes from the connected MIDI keyboard and configures the note range. Handles both standard (left-then-right) and reversed (right-then-left) press order.
  • Includes debounce protection (>=150ms) to guard against accidental chord brushes or ghost notes.
  • Calibration can be cancelled at any time by clicking "Cancel" or pressing Escape.
  • Added comprehensive unit tests for note formatting and calibration state transitions.

@PolyMeilex PolyMeilex left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The app just randomly crasches during calibration.
Then it saves the broken configuration to the config file, and the app refuses to start ever again.

But the idea is quite cool, I'll take over from here and implement this with human guidance in the loop.

Comment thread neothesia/src/scene/menu_scene/mod.rs Outdated
Co-Authored-By: KVK Siddartha <85823619+KVKcodes@users.noreply.github.com>
@PolyMeilex
PolyMeilex force-pushed the feat/calibrate-note-range branch from 7b86f0f to 7d08880 Compare September 8, 2026 19:11
@PolyMeilex
PolyMeilex enabled auto-merge (squash) September 8, 2026 19:14
@PolyMeilex
PolyMeilex merged commit 24de7ac into PolyMeilex:master Sep 8, 2026
6 checks passed
@PolyMeilex

PolyMeilex commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Thanks! This is very usefull.

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.

2 participants