Commit Graph
100 Commits
Author SHA1 Message Date
ash cadb29f234 Reduce exp pedal cal_max from 1180 to 1100 to reach 100% MIDI 2026-07-04 05:20:20 +00:00
ash f055bad4ac Proportional catch-up: send midpoint per update (fast convergence, rejects ±1 jitter) 2026-07-04 05:17:48 +00:00
ash 1dec81e329 Rate-limit exp pedal: step ±1/update, stationary jitter ignored 2026-07-04 05:15:09 +00:00
ash 17def39f93 Remove hysteresis (smoothing handles noise); values now step ±1 per update 2026-07-04 05:11:47 +00:00
ash 4f58d4b8e6 Exponential smoothing on expression pedal ADC (factor 8) to filter noise 2026-07-04 05:05:35 +00:00
ash 33c9dd10c0 Send CC 0 on release (MIDI Learn fix); flash_latency=0 2026-07-03 22:32:24 +00:00
ash dfa339a9b9 Merge branch 'bugfix_tempo' 2026-07-03 08:43:01 +00:00
ash 4aec064f3c Startup animation iterates in pixel pairs (0+1, 2+3, ..., 8+9) 2026-07-03 08:41:36 +00:00
ash 39326e3247 Startup animation iterates in pixel pairs (0+1, 2+3, ..., 8+9) 2026-07-03 08:41:26 +00:00
ash 88fee54f96 Remove beat 1 differentiation - all beats flash white 50ms 2026-07-03 08:36:14 +00:00
ash 868c5eda82 Auto-detect time signature from SPP deltas (bar boundaries) 2026-07-03 08:32:03 +00:00
ash d7f9bb16fd Fix beats_per_bar linkage (remove static) 2026-07-03 08:26:48 +00:00
ash b3f4eb1a8b Add SPP (Song Position Pointer) detection - uses SPP on START to set correct tick position. Add beats_per_bar (default 4) with button combo: hold 10 + press 1=4/4, 2=3/4, 3=6/4 2026-07-03 08:22:47 +00:00
ash 3226986709 Capture tick 0 (last_beat=UINT32_MAX) so downbeat is not skipped 2026-07-03 08:13:08 +00:00
ash e1507d5d7c Beat 1 = % 4 == 1 (last untested offset) 2026-07-03 08:09:35 +00:00
ash 3c5e0b07ae Try % 4 == 2 for beat 1; latency 55ms 2026-07-03 08:07:24 +00:00
ash 9d1a2fdc87 Shift beat-1 detection to % 4 == 3 (was off by 3 beats); latency 60ms 2026-07-03 08:04:40 +00:00
ash 7c93839f94 Bump flash latency to 50ms 2026-07-03 08:00:03 +00:00
ash 907279e1ea Make flash latency tunable at runtime via 'latency N' serial command 2026-07-03 07:57:31 +00:00
ash df1f678845 Add 20ms flash latency to compensate for audio buffer (flash was ahead of beat) 2026-07-03 07:53:04 +00:00
ash b859527169 Beat 1 = RED (100ms), other beats = WHITE (50ms) 2026-07-03 07:50:16 +00:00
ash ad977d3b09 Beat 1 = yellow, other beats = white — visible color contrast 2026-07-03 07:46:26 +00:00
ash acd3cc51fe Beat 1 (every 4th) = full white 50ms snap, others = barely visible 6,6,6 — sharp contrast for phase detection 2026-07-03 07:43:26 +00:00
ash eb5d66d29b Clean baseline: skip tick-0 flash, first flash at tick 24 (first beat boundary) 2026-07-03 07:40:53 +00:00
ash 354f18efe7 Beat 0 (first beat after START) full white, subsequent beats dimmer — marks bar downbeat 2026-07-03 07:27:06 +00:00
ash eda2a959dc Remove time signature assumption — all beats equal brightness 2026-07-03 07:25:58 +00:00
ash 53752365b8 Debug: beat 1 (downbeat) full white, other beats dimmer (64) — visually identify phase 2026-07-03 07:25:21 +00:00
ash ea45c927e7 Fix clock latency: process one USB packet per update() — no more batch-processing 0xF8 bursts 2026-07-03 07:19:05 +00:00
ash 72496d2daf Fix MIDI clock phase: handle 0xFA START to reset tick counter to downbeat 2026-07-03 07:13:38 +00:00
ash 1a70cbe870 Fix duplicate/stray code in midi_task function 2026-07-03 07:05:56 +00:00
ash ec0cdc9438 Fix midi_tick_count declaration and 0xF8 detection: add proper extern + transport clock parsing 2026-07-03 07:04:40 +00:00
ash 9d2872a513 Fix pixel 6 beat timing: align with actual MIDI beats using tick-based counting (24 ticks per beat) 2026-07-03 07:00:02 +00:00
ash c83a500b3c Fix pixel 6 beat timing: align flashes with real-time beats, not just MIDI ticks 2026-07-03 06:55:50 +00:00
ash a483eebd84 Add comprehensive README documenting project architecture, features, configuration, and customization 2026-07-03 03:57:17 +00:00
ash 06479f0ca2 Fix orange 0xFFAA00->0xFF6600, pads 8-9 white->purple 2026-07-02 07:04:22 +00:00
ash 66058a6722 Set per-pad LED colors with dim off state
- Pad 0-1: Blue, 2-4: Orange, 5: Red, 6: White, 7: Amber, 8-9: White
- Off state (velocity=0): dim at ~8% brightness instead of black
- On state: full brightness of assigned color
- clear_all() sets dim colors instead of off
2026-07-02 06:45:42 +00:00
ash 4ddb9a00bf Reduce cal_max 1220->1180 to absorb ADC jitter at toe
Raw ADC jitter of ~40 counts at toe caused MIDI flickering
between 127 and ~123. Lowering cal_max so the >= cal_max
clamp at 127 absorbs the noise.
2026-07-02 06:40:30 +00:00
ash c44bfb033b Fix button-to-MIDI latency: remove blocking serial, reduce debounce, faster loop
Latency sources fixed:
- debounce 50ms -> 5ms (switch_stub.cpp:15)
- Removed [MIDI OUT] Serial.printf from send_cc() (midi_transport.cpp:93-98)
- Removed [APP] Switch pressed/released prints from update() (app_task.cpp:39,43)
- Removed [APP] Switch -> CC print from process_switch_event() (app_task.cpp:140-143)
- loop() delay 10ms -> 1ms (main.cpp:390)

Serial output at 115200 baud was taking 2-5ms per printf call
in the critical button-to-MIDI path, adding 7-15ms+ total latency
per button press. All removed from hot path.
2026-07-02 06:22:23 +00:00
ash 0d22769cf6 Tweak cal_max: 1239 -> 1220 2026-07-02 04:24:29 +00:00
ash 9197294365 Increase pedal read rate: 20ms -> 5ms 2026-07-02 04:21:53 +00:00
ash 2cf49b8deb Calibrate expression pedal: cal_min=36, cal_max=1239
Raw ADC observed range: heel=36, toe=1239.
Maps full pedal travel to MIDI 0-127.
2026-07-02 04:19:30 +00:00
ash f6c0a01a14 Fix expression pedal pin: 5 -> 4
Constructor was still GPIO5 despite physical move to GPIO4.
The pedal was reading the wrong (unconnected) pin, so no ADC changes.
2026-07-02 04:17:30 +00:00
ash f0b6df1477 Remove serial cal commands, just log raw ADC on each value change
- Print raw ADC + mapped MIDI value on every change
- Remove cal min/cal max serial commands (broken with multi-word)
- Keep cal_min=0, cal_max=4095 defaults
- User moves pedal full range and reports min/max raw values
2026-07-02 04:14:39 +00:00
ash 8bde8efaff Add expression pedal calibration: cal min/cal max
- Remove fixed 0-4095 mapping, use cal_min/cal_max instead
- Auto-calibrate minimum at boot (assumes pedal at heel)
- 'cal min' sets current position as heel (0)
- 'cal max' sets current position as toe (127)
- Map cal_min->0, cal_max->127 with clamping
- Update 'exp' command to show raw ADC + cal values
2026-07-02 04:09:22 +00:00
ash 08d6fc8701 Add expression pedal support on GPIO5 (CC 4) 2026-07-02 04:00:06 +00:00
ash ae2891fca8 Fix palette: entries 121-127 now visible (was black). Remove local flash. 2026-06-30 05:05:06 +00:00
ash d59e36a9a5 Add direct local LED feedback on button press 2026-06-30 04:58:22 +00:00
ash 063fa2065d Send visible palette index 21 (yellow) instead of 127 (black) so feedback is visible 2026-06-30 04:49:30 +00:00
ash 62b0604508 Map buttons to custom CC values with reverse-map feedback 2026-06-30 04:43:42 +00:00
ash 3389cc9403 Send CC instead of NOTE_ON for Loopy Pro generic mirror. Clean up flash_activity. 2026-06-30 04:38:28 +00:00
ash 1728413cb8 Fix NOTE_ON feedback: pass led_index to set_led_state 2026-06-30 04:17:18 +00:00
ash c57847db78 Remove flash_activity that was stealing focus to LED 0 2026-06-30 04:14:07 +00:00
ash a4131adf2a Fix CC feedback: route to correct pixel by LED index 2026-06-30 04:04:43 +00:00
ash 1c1fc4d372 Remove heartbeat, relabel USB to JOC Midi 2026-06-30 03:46:31 +00:00
ash ac83ba269f USB name: JOC / JOC Midi (VID/PID still Launchpad X for Loopy Pro recognition) 2026-06-26 00:13:41 +00:00
ash 17c630f850 Fix update(): remove old sysex_flash_active logic 2026-06-26 00:07:50 +00:00
ash 268b793d87 Fix compilation: remove unused flash_sysex/flash_all/flash_one methods and member vars 2026-06-25 23:54:30 +00:00
ash a281eaa46e Clean up LED driver + rename USB to JOC Midi
- Removed flash_sysex/flash_all/flash_one (conflicted with heartbeat)
- Simplified flash_activity: LED 0 white 50ms, restores properly
- Heartbeat only on LED 9 when no activity
- USB renamed: Manufacturer=JOC, Product=JOC Midi
2026-06-25 23:47:39 +00:00
ash 6ccd28362f Add Generic mode CC value visualization
- LED 1 green = CC received
- LED 2 color shows CC value range:
  - Red (0-31) = recording?
  - Amber (32-63) = queued?
  - Green (64-95) = playing?
  - Blue (96-127) = other?
- Helps map Loopy Pro Generic mode values to Launchpad palette
2026-06-25 23:32:24 +00:00
ash 90bbfa7b84 Revert to single MIDI interface (working USB detection)
- Dual interface broke USB enumeration
- Back to working single interface with Novation Launchpad X VID/PID
- Buttons work, MIDI OUT works
2026-06-25 23:17:18 +00:00
ash a209b48720 Add second USB MIDI interface (LPX MIDI) for Programmer mode
- Interface 1 (DAW): Button presses -> Loopy Pro
- Interface 2 (MIDI): SysEx + LED control <- Loopy Pro
- Both interfaces polled in update()
- Sends on DAW interface (like real Launchpad X)
2026-06-25 22:51:44 +00:00
ash c20f1dec2c Add visual MIDI type indicators
- SysEx: ALL LEDs flash white 200ms
- Note: LED 0 flashes red 100ms
- CC: LED 1 flashes green 100ms
- Helps diagnose what MIDI arrives without serial
2026-06-25 22:39:37 +00:00
ash c02121cd09 Add pre-build script to patch core's pins_arduino.h with Launchpad X VID/PID
- pre_build.py patches framework-arduinoespressif32/variants/esp32s3_devkitc/pins_arduino.h
- Replaces USB_VID 0x303a -> 0x1235, USB_PID 0x1001 -> 0x0103
- Adds USB_MANUFACTURER/PRODUCT
2026-06-25 22:21:51 +00:00
ash 109106f1f1 Add custom pins_arduino.h variant with Launchpad X VID/PID
- variants/esp32s3/pins_arduino.h overrides USB_VID/USB_PID
- Included via -I in build_flags before core variant
- This should force USB descriptors at hardware level
2026-06-25 22:03:15 +00:00
ash 75f583b3c4 Revert to standard board, try VID/PID via board_build.arduino.vid/pid 2026-06-25 10:57:12 +00:00
ash fc9b7688c0 Fix board definition: add espidf framework for Arduino core 2026-06-25 08:57:24 +00:00
ash b380133b3e Add custom board definition with Launchpad X VID/PID (0x1235/0x0103)
- boards/launchpad_x_variant.json defines custom board
- platformio.ini uses custom board
- Board sets VID/PID at hardware level
2026-06-25 08:27:47 +00:00
ash 25713707aa Revert to working USB mode (ARDUINO_USB_MODE=0 + CDC) 2026-06-25 08:20:19 +00:00
ash 7558082e7b Try ARDUINO_USB_MODE=2 (native MIDI only)
Disable CDC, use ESP32 core native USB MIDI stack
2026-06-25 08:12:07 +00:00
ash dee60c7d27 Fix compilation: declare 'now' in flash_sysex 2026-06-25 07:54:35 +00:00
ash 1676bbb044 Fix LED flash/restore logic, heartbeat only on LED 9
- flash_activity: only LED 0, restores properly
- flash_sysex: saves ALL LED states, restores all properly
- heartbeat: only LED 9, only when no activity flash active
- Added sysex_saved arrays to track all LED states
2026-06-25 07:48:05 +00:00
ash 0d738a6e5e Fix compilation: add flash_sysex to interface + remove conflicting build flags 2026-06-25 07:40:10 +00:00
ash 399c4341ed Add VID/PID to build flags for ESP32 core + stronger visual indicators
- Set USB VID/PID via ESP32 core build flags (may work better than TinyUSB API)
- Heartbeat on LED 9 (amber pulse every 2s) confirms device is alive
- SysEx flashes ALL LEDs white for 200ms
- Regular MIDI flashes LED 0 white for 50ms
2026-06-25 07:33:12 +00:00
ash b5bbe24977 Add SysEx handling for Launchpad X Programmer mode
- Parse all SysEx CIN types (start, continue, end)
- Reassemble multi-packet SysEx messages
- Handle layout select (Programmer mode = 0x7F)
- Handle Programmer/Live mode switch
2026-06-25 07:20:47 +00:00
ash 8d859ce0af Fix: use setID(vid, pid) not setVID/setPID 2026-06-25 06:53:02 +00:00
ash edb86bf49a Spoof Novation Launchpad X USB VID/PID
Change USB device descriptor to VID 0x1235 PID 0x0103
so Loopy Pro recognizes the device as a Launchpad X
and sends LED control MIDI in Launchpad mode.
2026-06-25 06:51:39 +00:00
ash 500720dadf Add visual MIDI activity indicator
Flash LED 0 white for 30ms on any MIDI input.
Visible without serial - helps diagnose whether MIDI
is arriving when connected to iPad with Loopy Pro.
2026-06-25 06:43:00 +00:00
ash 40dfe775ea Fix Launchpad mode MIDI receive and color palette
- Fixed note matching bug: removed channel check so notes 36-45 match
  across channels 1-3 (Launchpad static/flashing/pulsing)
- Simplified LED lookup to match by note only (channel stored for mode)
- Replaced sparse palette with proper RGB gradients between key
  breakpoints (Red, Orange, Yellow, Green, Cyan, Blue, Purple, Off)
2026-06-25 06:31:16 +00:00
ash fee8ab5b94 Focus on Launchpad X mode: NOTE 36-45 ch1-3, send NOTE_ON/OFF for buttons 2026-06-24 06:43:16 +00:00
ash 4f6ff39af4 Add run_palette_test() declaration to header 2026-06-24 06:32:57 +00:00
ash 6aa3579317 Add palette test mode (hold pad 0+9 for 2s), comprehensive MIDI handling 2026-06-24 06:29:08 +00:00
ash 840bcf9a1e Fix MidiEvent::SYSTEM -> SYSEX 2026-06-24 06:23:42 +00:00
ash 37c6e66584 Add visual MIDI activity indicator (flashes pad 0 on any MIDI receive) 2026-06-24 06:03:27 +00:00
ash 296611ce52 Send CC2-11 for button presses (match Loopy Pro) 2026-06-24 05:58:10 +00:00
ash b5a1710ebd Map CC 2-11 to pads 0-9 for Loopy Pro LED feedback 2026-06-24 05:56:58 +00:00
ash 550fb7616e Add CC (Control Change) handling for Loopy Pro LED control 2026-06-24 05:52:21 +00:00
ash 0e5cbeb73d Clean up: remove boot layout test (Launchpad X mapping confirmed working) 2026-06-24 05:47:09 +00:00
ash e2997a595d Simplify boot layout test to single quick pass (Launchpad X only) 2026-06-24 05:39:39 +00:00
ash 5df74b28e2 Add run_layout_test() declaration to header 2026-06-24 05:32:49 +00:00
ash 26c86be7ea Add boot-time layout test (no serial input needed) 2026-06-24 04:33:02 +00:00
ash 83e9e29520 Add padtest command - tests each pad individually with 3s delay 2026-06-24 04:22:34 +00:00
ash 6ec306bbf7 Replace delay() with vTaskDelay() in miditest to avoid watchdog reset 2026-06-24 04:05:25 +00:00
ash 6c64c91e55 Add miditest and mapping commands for LED layout debugging 2026-06-24 03:56:30 +00:00
ash e5e546ed39 Update pad_mapping to Launchpad X standard notes 36-45 (C2-A2) on channel 1 2026-06-24 03:37:29 +00:00
ash 7f061aecbf Fix palette to 128 entries (3 purple at end) 2026-06-24 03:20:40 +00:00
ash efaec9df71 Fix palette to exactly 128 entries (0-127) 2026-06-24 03:16:50 +00:00
ash 6503799875 Fix palette array size (128) and remove duplicate clear_all() 2026-06-24 01:41:14 +00:00
ash bd20d1938b Fix duplicate set_led_state, add set_led_brightness to interface 2026-06-24 01:28:56 +00:00
ash b2d726a953 Add Launchpad X velocity->color palette and matching startup animation 2026-06-24 01:25:45 +00:00
ash 2eced5c007 Add debug logging for incoming MIDI events 2026-06-24 01:07:00 +00:00