Skip to content
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

slopes.c timing compensation for event queue approach #112

Closed
trentgill opened this issue Apr 19, 2019 · 2 comments
Closed

slopes.c timing compensation for event queue approach #112

trentgill opened this issue Apr 19, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@trentgill
Copy link
Collaborator

3 techniques:

1 set a flag & start counting samples when the (*self->action)() is called. when the next toward() is called, we can compensate for this delay

2 setup a continuation so if the toward() is called before the samples have been served to the dac, they can be updated with the next slope. this may be more difficult once the shaper engine is implemented?

3 change boundary checks so self->action is run one dsp block before the breakpoint. the event loop is run between dsp blocks, so this hopefully means the toward() will have been called by the time the next sample runs. we update the slopes.c handling of toward to store the new values, which will be executed without a callback when the threshold is crossed. this will actually make it way easier to handle sub-sample compensation as there's no opaque state-change happening.

@trentgill
Copy link
Collaborator Author

The main S_step_v function needs to handle the edge cases recursively to allow for nested event triggers.

Note, the current timing compensation doesn't carry the timing buffer through nested triggers (eg. a sawtooth LFO will cancel the timing compensation when it instantly jumps to the destination, where it should note that it had 'countdown' leftover and pass it along to the following call.)

@trentgill trentgill modified the milestones: 1.1, 1.2 Oct 6, 2019
@trentgill trentgill modified the milestones: 1.0.3, 1.0.4 Nov 25, 2019
@trentgill trentgill removed this from the 1.0.4 milestone Jun 10, 2020
@trentgill
Copy link
Collaborator Author

Will be unnecessary with ASL2. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant