8000 fix #259 init debounce counter by tremblap · Pull Request #264 · flucoma/flucoma-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix #259 init debounce counter #264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

tremblap
Copy link
Member

Fixes #259 by setting the init of the debounce counter in the 3 slicers that had it to 0 instead of 1. when 1, the condition when the (infinite state of 0 input) to (any signal) which should correctly trigger an attack at frame 0 was ignored, which is a conceptual error compare to our RT one.

Conceptually, we always assumed silence padding as it is what happens in the CCE in RT to these inputs. It is the less worse option. that counter was starting at 1 and dismissing signal at input.

see the bug report to have a comparison patch. or just approve :)

thanks

@weefuzzy
Copy link
Member

I haven't yet properly understood either the problem or the diagnosis, but if the cause of it is in the boundary conditions assumed by the NRT wrapper, then fixing there is the way to go: if the RT object works as expected, then it oughtn't be changed.

@tremblap
Copy link
Member Author

the RT worked only because one would need to start the DAC and the play at the same time to 'miss' that attack. So I think we just never caught it. With this fix, it works both in RT and NRT.

@weefuzzy
Copy link
Member

So now the slicers will always emit an event at t==0 if the first sample they see is greater than the threshold?

@tremblap
Copy link
Member Author

yes (not the sample, but the value of the algo - in amp it is a diff between properly initialised env, I've checked) - this is what we expect in RT (from silence) so not having that (from assumed padded silence) in NRT was problematic (for instance in Rod's case)

@weefuzzy
Copy link
Member

Well, if it still passes all your detailed supercollider tests, have at it

@AlexHarker
Copy link
Contributor

As far as I can see the code as it was prevented slices at t==0 and it's unclear if that was a design, or an accident. However, I don't see a clear rationale for disallowing that in either RT or NRT case (and in the latter is more likely problematic). I think the change here is probably better default behaviour.

@g-roma
Copy link
Member
g-roma commented Feb 28, 2024

Clearly this was by design, explicitly to avoid detecting an onset at the first sample. I think the rationale was linked to the padding which happens outside the object. I am not sure whether this may have changed. The design was based on a number of test cases, sometimes with potentially conflicting requirements, so it was "the less worse option" at the time, but if this passes all of these now then I guess it should be fine.

@tremblap
Copy link
Member Author

it passes all the unit tests so I'd merge in

@tremblap tremblap merged commit 52c8621 into flucoma:main Feb 28, 2024
@tremblap tremblap deleted the fix/init-debounce-in-slicers branch March 1, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fluid.bufampslice~ not working correctly (when using @numframes)
4 participants
0