Go to file
Byron Gamatos 115c3529e9
Some checks are pending
ship-ci / ci (push) Waiting to run
fix(midi): guard non-positive division in the legacy inline tempo path (#805)
convert_midi_track_to_keys_wire builds its own inline tempo map and
divides by the raw midi.ticks_per_beat at two sites (the tempo-table
precompute and the tick_to_seconds closure). A malformed header with
division == 0 raised ZeroDivisionError, and an SMPTE division (which
mido returns as a NEGATIVE signed short) produced negative/garbage
note times.

Guard the divisor with `ticks_per_beat if ticks_per_beat > 0 else 480`
so both the zero and negative cases fall back to the SMF default. The
`> 0` form (not `or 480`) is required because a negative value is
truthy and would slip past `or`. Positive-division behavior is
unchanged.

Follow-up to #796, which fixed the same class of bug in the newer
convert_midi_tempo_map / _build_tick_to_seconds path.

Adds two focused tests: division == 0 no longer crashes and emits a
non-negative time, and a negative/SMPTE division yields sane
non-negative times.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 10:27:45 +02:00
.claude/skills Clean release snapshot 2026-06-16 18:47:13 +02:00
.github Change nightly workflow schedule time 2026-07-05 22:48:01 +02:00
.specify rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
content/starter Delete content/starter/beethoven-ode_to_joy.feedpak 2026-07-03 23:42:45 +02:00
data/progression Clean release snapshot 2026-06-16 18:47:13 +02:00
docs fix(tuner): mic-verify stamps the tuning it actually checked + on-device test plan (#684) 2026-07-01 11:45:26 +02:00
lib fix(midi): guard non-positive division in the legacy inline tempo path (#805) 2026-07-07 10:27:45 +02:00
plugins fix(tuner): anchor injectPlayerButton to a direct-child button (feedBack#800) 2026-07-07 09:54:06 +02:00
scripts Merge remote-tracking branch 'origin/main' into feat/feedpak-jsonc 2026-07-01 03:27:38 -04:00
specs rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
static Fix v3 library Filters drawer crash on saved prefs; rename Stems label 2026-07-06 19:50:34 -04:00
tests fix(midi): guard non-positive division in the legacy inline tempo path (#805) 2026-07-07 10:27:45 +02:00
.dockerignore Clean release snapshot 2026-06-16 18:47:13 +02:00
.gitattributes Purge external-format terminology from code, tests and docs 2026-06-16 19:36:53 +01:00
.gitignore Bundle drum_highway_3d + keys_highway_3d as in-tree core plugins (#693) 2026-07-02 00:25:31 +02:00
build-proxmox-ct.sh rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
CHANGELOG.md feat(midi): convert_midi_tempo_map — extract tempos, time signatures, beat grid (#796) 2026-07-07 10:27:17 +02:00
CLAUDE.md perf: allocation/scan hardening for weaker hardware 2026-07-02 00:02:54 +02:00
CONTRIBUTING.md rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
docker-compose.nas.yml rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
docker-compose.yml rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
Dockerfile fix(docker): repin FFmpeg to autobuild-2026-07-03-13-21 2026-07-03 23:16:50 +02:00
LICENSE Clean release snapshot 2026-06-16 18:47:13 +02:00
main.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
package-lock.json rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
package.json rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
playwright.config.ts Clean release snapshot 2026-06-16 18:47:13 +02:00
pyproject.toml Clean release snapshot 2026-06-16 18:47:13 +02:00
requirements-test.txt Clean release snapshot 2026-06-16 18:47:13 +02:00
requirements.txt Make the library loader sloppak/loose-only 2026-06-16 19:09:53 +01:00
server.py fix(settings): don't let a stale DLC path block saving the Demucs server address (#795) 2026-07-06 20:35:51 +02:00
SUPPORTERS.md rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
tailwind.config.js Re-enable the v3 "Support Us!" donate button (#727) 2026-07-03 00:21:10 +02:00
TODO.md docs: correct plugin URL casing after the feedBack rename (#576) 2026-06-23 11:20:23 +02:00
uv.lock Clean release snapshot 2026-06-16 18:47:13 +02:00
VERSION Bump version to 0.3.0-alpha.1 2026-07-03 13:41:50 +02:00