Skip to content

poll the plus encoder every 50ms - #42

Merged
llozd merged 2 commits into
mainfrom
encoder-50ms
Nov 16, 2026
Merged

llozd merged 2 commits into
mainfrom
encoder-50ms

Conversation

@llozd

@llozd llozd commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Summary & Goal

The Tracker+ jog wheel felt laggy. The encoder was only read every 100 ms (a setting carried over from the Original's driver), so each turn could take up to 100 ms to reach the UI and fast turns arrived in chunks.

Behavior & Changes

  • EncoderImpl on IMX now polls the hardware quadrature counter every 50 ms instead of 100 ms (kUpdateTimeMs).
  • Side effect: the acceleration table counts pulses per poll window, so acceleration now needs roughly twice the turning speed to kick in (about 50 detents/s instead of 25). Most turns are 1:1.
  • Mini is unaffected (it has no encoder; the code is under #ifndef TRACKER_MINI). The Original uses its own MK66 driver and is unchanged.

Target Devices

  • Original Polyend Tracker (MK66)
  • Polyend Tracker+ (IMX)
  • Polyend Tracker Mini (IMX)

Hardware Testing Status

Device Tested on Hardware by Author Needs Community Hardware Testing Not Applicable Notes / Tested By
Original Tracker (MK66) [ ] [ ] [x]
Tracker+ (IMX) [x] [ ] [ ] Feels more responsive
Tracker Mini (IMX) [ ] [ ] [x]

How to Test

  1. Flash the Tracker+ build and open the pattern editor.
  2. Turn the jog wheel one detent at a time on a value: each click should register right away.
  3. Turn it slowly and quickly through a long range (for example tempo or a step's volume): movement should be smoother, and acceleration should only kick in on fast turns.

Developer Checklist

  • I have read and understood the Contribution & Pull Request Guidelines (CONTRIBUTING.md).
  • This PR implements one single feature or bug fix (no unrelated refactors or formatting sweeps).
  • make all compiles cleanly for all three devices (Original, Plus, Mini).
  • Memory usage (SRAM_DTC, EXTERNAL_RAM, FLASH) was checked and stays within safe hardware headroom.
  • No heap allocations (new/malloc) or SD card I/O were added to real-time audio callbacks.
  • Existing .mt projects, .pti instruments, .pts synth patches, and mtConfig settings remain backward-compatible.

@llozd
llozd merged commit 6eedfc1 into main Nov 16, 2026
1 check passed
@llozd
llozd deleted the encoder-50ms branch November 23, 2026 18:44
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