-
Notifications
You must be signed in to change notification settings - Fork 0
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Checking mergeability…
Don’t worry, you can still create the pull request.
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: todbot/CircuitPython_TMIDI
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: todbot/CircuitPython_TMIDI
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: big_fixes
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 15 commits
- 15 files changed
- 1 contributor
Commits on May 13, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 44e2d6a - Browse repository at this point
Copy the full SHA 44e2d6aView commit details -
Configuration menu - View commit details
-
Copy full SHA for b51f2c8 - Browse repository at this point
Copy the full SHA b51f2c8View commit details -
Optimize receive() for CircuitPython, fix three correctness bugs
Performance (hot path in receive()): - Switch port reads from read(1) — which allocates a new bytes object on every call — to `readinto(self._read_buf)`, reusing the bytearray already allocated in `__init__` but previously unused - Cache `self._in_port` and `self._read_buf` as locals to avoid repeated dict lookups on self inside the tight loop - Replace two `_LEN_*_MESSAGES` set membership checks with a single `_MSG_DATA_LEN.get()` dict lookup to determine data byte count - Inline data-byte reads and corruption checks; remove the tuple allocation that the old validation loop created on every call - Use a module-level `_msg_buf` scratch bytearray in `__bytes__()` instead of `bytes([...])`, avoiding a list allocation per serialization Correctness: - Fix SysEx desync: SYSEX was in `_LEN_0_MESSAGES` so `receive()` returned immediately after the 0xF0 status byte, leaving the variable-length payload in the port buffer and causing all subsequent receive() calls to fail with error_count increments. Now the parser consumes bytes until 0xF7 before returning Message(SYSEX). - Fix channel-0 silent drop: `send(msg, channel=0)` was a no-op because `if channel:` is falsy for 0. Changed to `if channel is not None:`. - Fix pitch bend full-down corruption: `Message.__init__` triggered the user-API shortcut (treating data0 as a full pitchbend value) whenever data1==0, which corrupted wire bytes [0xE0, 0x00, 0x00] (-8192) into [0xE0, 0x00, 0x40] (center 0). The condition now also requires data0 to be outside the valid raw-MIDI-byte range (0–127).
Configuration menu - View commit details
-
Copy full SHA for 871d43f - Browse repository at this point
Copy the full SHA 871d43fView commit details -
examples/tmidi_test_device.py (CircuitPython, copy to device as code.py): - Echo loop — receives any MIDI message and sends it back, except SysEx which is consumed silently - LED blinks on each message; prints each message to the REPL with running error count - USE_USB_MIDI = True (default) for USB MIDI; set to False + add usb_cdc.enable() in boot.py for the serial path examples/tmidi_test_host.py (CPython): - --usb-midi mode uses mido + python-rtmidi; auto-detects "circuit/pico" in port names, or --port NAME to specify - --serial PORT mode uses pyserial; sends raw MIDI bytes and parses the echo stream - 9 tests: NOTE_ON/OFF, CC, Program Change, pitch bend (center / full-up / full-down), Clock, and the SysEx desync test - Pass/fail per test with elapsed ms; exits with code 0 on all-pass, 1 on any failure
Configuration menu - View commit details
-
Copy full SHA for 1352b96 - Browse repository at this point
Copy the full SHA 1352b96View commit details -
Configuration menu - View commit details
-
Copy full SHA for ed36aea - Browse repository at this point
Copy the full SHA ed36aeaView commit details
Commits on May 14, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 2f786dc - Browse repository at this point
Copy the full SHA 2f786dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for d9a9702 - Browse repository at this point
Copy the full SHA d9a9702View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b4f202 - Browse repository at this point
Copy the full SHA 6b4f202View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9566c0b - Browse repository at this point
Copy the full SHA 9566c0bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 07811d0 - Browse repository at this point
Copy the full SHA 07811d0View commit details -
improve synthetic test to more accurately reflect what a real project…
… would need for MIDI messages
Configuration menu - View commit details
-
Copy full SHA for 6e3431d - Browse repository at this point
Copy the full SHA 6e3431dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 00238d7 - Browse repository at this point
Copy the full SHA 00238d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 274ab0a - Browse repository at this point
Copy the full SHA 274ab0aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f116e34 - Browse repository at this point
Copy the full SHA f116e34View commit details
Commits on May 16, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 6c55863 - Browse repository at this point
Copy the full SHA 6c55863View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...big_fixes