Repository navigation
Fix v23.0 bugs - #126
Merged
Merged
Fix v23.0 bugs#126
Conversation
heavy.mk runs the pingdynasty hvcc fork under python2.7, whose requirements (enum==0.4.4, Jinja2==2.7.3) are python2 packages. The previous 'pip3 install -r Tools/hvcc/requirements.txt || true' installed them into python3 and swallowed any error, so python2.7 never had 'enum' and every Heavy/PD build failed with 'ImportError: No module named enum'. ubuntu 20.04's python2 ships without pip, so bootstrap pip for python2 (get-pip.py 2.7) and install the fork's requirements into python2. python3 is kept: emscripten 2.0.10's emcc execs 'python3 emcc.py', so the 'make web' / WASM path needs it (verified: hiding python3 breaks emcc). Verified on OWL2: HeavyTest.pd builds via the py2 Heavy path (patch.bin) AND make web builds patch.js via the py3 emcc path.
WavFile::getNumberOfSamples() returns frames per channel, but PatchRun used it as the int16 count of the interleaved buffer. For the stereo input that PatchRun requires, the end pointer landed halfway through the data, so the second half of every output file was the unprocessed input. Span frames*channels, and step the loop guard by a whole interleaved block. Verified with HeavyTest on a 1 s stereo file: 47872 of the 48000 int16s in the second half matched the input before the fix, 1 after.
lambda is a dimensionless coefficient, but SmoothValue declared it as T. For int types it was initialised from the Q12 DEFAULT_LAMBDA (3686), and update() mixed value*3686 + x*(1-3686) without ever rescaling, so integer smoothing produced garbage. PatchProcessor also assigned the float result of normal() into the int lambda, truncating it. - SmoothValue::lambda is float (default 0.9f); the (lambda, init) constructor and normal() take/return float. - PatchProcessor::getParameter keeps l as float. - Remove SimpleValue::DEFAULT_LAMBDA, which nothing uses any more. - Replace the doc comment's unimplemented int formula with the single implemented one, and correct the mean-lag note. - int/weirdint tests assert the actual behaviour: float lambda, one-step smoothing, monotonic convergence and the truncated settling value.
Both were declared, and called from PatchProcessor::getParameter, but their definitions went away with SmoothValue.cpp in the SimpleValue refactor. Any patch that calls getFloatParameter() or getIntParameter() failed to link with an undefined reference (e.g. BeatCounter, BigJotReverb). - SmoothValue::normal(lambda, blocksize) returns powf(lambda, blocksize/128), so a lambda given for 128-sample blocks keeps the same time constant at other block sizes and stays below 1. - StiffValue::normal(delta) returns delta as a float, so an int parameter's fractional delta survives until it is scaled by the range. - Test the normal() values.
pingdynasty
force-pushed
the
fix/hvcc-py2-deps
branch
from
October 25, 2026 13:42
6cebb60 to
7e40c46
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issues introduced in v23.0: Dockerfile hvcc installation, SimpleValue lambda.