Skip to content

feat(keyboard): add musical keyboard app - #554

Draft
ArthurGibert wants to merge 2 commits into
mainfrom
feat/keyboard-app
Draft

ArthurGibert wants to merge 2 commits into
mainfrom
feat/keyboard-app

Conversation

@ArthurGibert

Copy link
Copy Markdown
Member

Summary

  • Adds a new app (ID 26) that turns Faderpunk's 16 buttons into a musical keyboard
  • Faders set the velocity for each corresponding note (0–4095 → 7-bit MIDI)
  • Scale comes from the global quantizer; LEDs update every 150 ms when it changes

Behaviour

LED colours: white keys → white, black/sharp keys → yellow, root/tonic → High brightness, other in-scale → Mid

Two modes (param 4):

  • Scale only (default): channels map to the first 16 consecutive in-scale notes starting from Base Note — no dead keys, more reachable notes per press
  • Chromatic: channels map to 16 consecutive semitones; out-of-scale keys are still playable but shown at Low brightness

When the scale changes mid-play, held notes are released automatically before the map rebuilds.

Params

# Name Default
1 Base Note (i32 0–127) 48 (C3)
2 MIDI Channel 1
3 MIDI Out USB+DIN
4 Mode (Scale only / Chromatic) Scale only

Test plan

  • Build passes: cargo clippy --bin faderpunk --target thumbv8m.main-none-eabihf -- -D warnings
  • Assign app 26 on a channel, set scale to C major — verify 7 white/0 black layout with C highlighted
  • Move faders to different positions, press buttons — verify velocity varies
  • Switch to D minor, verify root D highlights and scale notes update
  • Test Chromatic mode — verify all 16 keys playable, out-of-scale dimmed
  • Test on hardware before merging

🤖 Generated with Claude Code

ArthurGibert and others added 2 commits July 30, 2026 14:42
16 buttons as a chromatic/scale-filtered keyboard. Faders set velocity.
White keys light white, black keys yellow, root note at full brightness.
Scale-only mode packs 16 in-scale notes for maximum reach; Chromatic mode
shows all 16 semitones with out-of-scale keys dimmed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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