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)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#include "midi_transport.h"
|
||||
#include "midi_clock.h"
|
||||
#include <Arduino.h>
|
||||
#include "Adafruit_TinyUSB.h"
|
||||
|
||||
@@ -52,20 +51,6 @@ void UsbMidiTransport::update() {
|
||||
while (usb_midi.available()) {
|
||||
uint8_t packet[4];
|
||||
if (usb_midi.readPacket(packet)) {
|
||||
uint8_t cin = packet[0] & 0x0F;
|
||||
|
||||
if (cin == 0x0F) {
|
||||
uint8_t rt = packet[1];
|
||||
if (rt == 0xF8) {
|
||||
MidiClock::tick();
|
||||
} else if (rt == 0xFA || rt == 0xFB) {
|
||||
MidiClock::start();
|
||||
} else if (rt == 0xFC) {
|
||||
MidiClock::stop();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
MidiEvent event;
|
||||
parse_midi_packet(packet, 4, event);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user