Commit Graph
28 Commits
Author SHA1 Message Date
ash 748d2ef99f Pixel 6 pulses on MIDI Clock beat (0xF8) - all on Core 0
- Detect 0xF8 in midi_transport.cpp (runs on Core 0)
- Every 24th tick = beat, flash pixel 6 white
- Instant-on, quadratic fade over 80ms, restore to dim
- All FastLED calls stay on Core 0, no cross-core conflict
2026-07-02 08:37:36 +00:00
ash af14c2f759 Replace MIDI clock with internal BPM timer for pixel 6 pulse
Revert:
- Remove midi_clock.h/cpp (was causing cross-core crash)
- Remove real-time MIDI message parsing from midi_transport.cpp

New approach:
- Pixel 6 (and all active LEDs) pulse to internal BPM timer
- Default 120 BPM (500ms beat interval)
- 'bpm <n>' serial command to change tempo (20-300)
- Only calls FastLED.show() when actively pulsing (avoids USB/WS2812 interference)
- 33ms update rate (30fps)
- Inactive LEDs left untouched (no unnecessary show() calls)
2026-07-02 07:27:26 +00:00
ash 5dc10eea87 Add MIDI clock-driven LED pulsing
- New MidiClock module: tracks 24 PPQN clock ticks, computes beat phase
  and smooth sine pulse from incoming MIDI Clock (0xF8)
- midi_transport: detect CIN=0xF real-time packets, route 0xF8 to
  MidiClock::tick(), 0xFA/FB to start(), 0xFC to stop()
- led_stub update(): every 20ms, modulates active LED brightness
  using pulse curve (50%-100%), pixel 6 always throbs when clock
  is running even if no loops active
- Aligned set_led_state() all paths to use pad_base_colors
- Removed dead activity flash code
2026-07-02 07:15:53 +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 ac83ba269f USB name: JOC / JOC Midi (VID/PID still Launchpad X for Loopy Pro recognition) 2026-06-26 00:13:41 +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 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 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 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 ec0834ed48 Remove isInitialized() check - not in v3.1.0 API 2026-06-24 00:56:44 +00:00
ash 9c95225a37 Back to Adafruit TinyUSB Library v3.1.0 with full init ownership (no USE_TINYUSB=1 conflict) 2026-06-24 00:53:13 +00:00
ash 10f5117a15 Try USB.h only for USB MIDI 2026-06-24 00:45:53 +00:00
ash 9fd0231b48 Switch to ESP32 Arduino core native USB MIDI API (USB.h + USBMIDI.h), remove Adafruit TinyUSB dependency 2026-06-24 00:31:15 +00:00
ash 9ebd568b9c Add detach/attach re-enumeration after MIDI interface added 2026-06-24 00:20:45 +00:00
ash 9379d0c0eb Fix build: remove TinyUSBDevice.idVendor/idProduct (API doesn't exist) 2026-06-23 23:24:23 +00:00
ash 8bbf572414 Fix crash/reboot: remove conflicting TinyUSB core sources from Adafruit lib instead of allow-multiple-definition 2026-06-23 23:23:40 +00:00
ash a3e86d0ddf Fix USB MIDI enumeration: switch from ARDUINO_USB_MODE=1 to 0 (matches working Adafruit TinyUSB example), add explicit TinyUSBDevice.begin(0) and detach/attach re-enumeration, remove conflicting tusb_config.h 2026-06-23 23:10:20 +00:00
ash 0db36a0129 Better MUX probe: 5 rounds, CLK before/after DI reads, single LED test 2026-06-23 14:01:51 +00:00
ash bb32ec65d1 Fix USB MIDI, add GPIO for switches and LEDs
- Remove TinyUSBDevice.begin() conflict with Arduino core
- Switch stub now reads GPIO with debounce (pins 1-10)
- LED stub now drives GPIO pins (pins 11-20) with startup animation
- All pins printed to console on init
2026-06-23 13:18:20 +00:00
ash 22572b9baa Fix Adafruit TinyUSB API: TinyUSBDevice, writePacket, mounted() 2026-06-23 13:12:32 +00:00
ash 987288fd41 Fix USB MIDI: use Adafruit TinyUSB Library for proper MIDI support
- Add Adafruit TinyUSB Library dependency
- Create tusb_config.h enabling MIDI class
- USB device named 'Loopy Foot Controller'
- is_connected() check before sending
2026-06-23 13:10:25 +00:00
ash 4d81386f78 Fix USB MIDI, add LED startup animation, improve logging
- Use ArduinoUSBMIDI library for proper USB MIDI device recognition
- Add LED startup colour cycle (red, green, blue, yellow, magenta, cyan, white)
- Add comprehensive console logging for all MIDI in/out and switch events
- Log unmapped MIDI messages
2026-06-23 13:06:57 +00:00
ash c1b163c8b8 Fix MIDI transport: use TinyUSB directly instead of non-existent USBMIDI.h 2026-06-23 13:00:39 +00:00
ash ad7495dc1c Move all source files to src/ to fix LDF linking 2026-06-23 12:57:54 +00:00