Last 12 weeks · 392 commits
2 of 6 standards met
The screenless pedal can be programmed over either USB or TRS Type-A MIDI, and the current scene protocol carries schema, state, and routing commands over SysEx. currently treats F0-F7 as zero-length status bytes, so a SysEx request arriving at the physical MIDI input is discarded before sees it. The same reader drops every System Real-Time and System Common message. MIDI Clock arriving at the TRS jack therefore never reaches USB, and a two-byte channel message can retain the final byte of an earlier three-byte packet. This replaces that ad-hoc reader with a byte-stream parser. It preserves channel running status, emits real-time without disturbing a partially received channel or SysEx message, handles System Common and System Reset, packs SysEx into CIN 4..7, and zero-pads unused packet bytes. The host-side validation covers channel running status for two- and three-byte messages, real-time interleaved with channel and SysEx messages, System Reset, System Common, and all three SysEx ending forms. This revision is based on the reorganized tree and updates the validation include to . Validated with: () GCC 13.3 with and AddressSanitizer/UBSan 10,000,000 randomized malformed-stream bytes under AddressSanitizer/UBSan
The fold() function in boost.h relies on an unbounded for (;;) loop. While it mathematically converges by halving the overshoot, floating-point precision limits can theoretically cause the convergence to stall just outside the threshold. If this happens, it hangs the audio core indefinitely. Added a hard limit of 20 iterations to guarantee bounded execution time for realtime safety. If it hits the limit, it returns the closest approximated value.
_biquad_peaking / _biquad_loshelf / _biquad_hishelf (audio/biquad.h) take a gain argument and compute A = sqrtf(gain) internally — i.e. they expect gain = A². Every other caller passes exactly that via db_to_level(db) = 10^(db/20): see klon.h:62, cabsim.h:70, frenchie.h:287. parametric_eq.h is the lone exception. Its peq_pot_A(db) = 10^(db/40) is the correct RBJ value of A itself — but it's passed in where the function wants A². So the internal sqrtf turns it into 10^(db/80), and a band dialed to +20 dB only produces about +10 dB. Both audio and OLED graph share peq_pot_A, so they agree with each other, but the response undershoots the pot labels ("LS Gain" LINEAR(-20.0 20.0) = 0.0 dB) and the graph's own axis (+20dB -> y=0). Fix: drop peq_pot_A(), use db_to_level() like the other three effects. I might be misreading intent here — if thesofter-than-labeled range is deliberate, feel free to ignore. But it looked off against both the dB labels and every other biquad call site, so flagging it.
The audio core retires the pot sequence number whether or not it acts on it: effect->last = seq; if (effect->mix) effect->init(effect->pot_values[seq & 1]); Skipping ->init() for a bypassed effect is deliberate (49db9df), but 'last' moving anyway turns "skip" into "drop", and nothing recomputes the coefficients when the effect comes back. Route the reverb, turn the room size up, unroute, route it again: the UI reads 0.88 and it still sounds like 0.98. So don't retire a sequence number that isn't being acted on. No Pico SDK here so I couldn't flash it. Modeled the seq/last/mix handshake instead, and the pots and coefficients agree again.
Repository: torvalds/GuitarPedal. Description: Linus learns analog circuits Stars: 2249, Forks: 103. Primary language: C. Languages: C (42.2%), Python (31.8%), JavaScript (18.8%), CSS (3.1%), CMake (1.8%). License: GPL-2.0. Open PRs: 2, open issues: 1. Last activity: 23h ago. Community health: 42%. Top contributors: torvalds, clevelandmusicco, LMSBAND, Priyanshu-byte-coder, felix314159.