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

Mechanism to wake up oscs if amplitude changes #175

Merged
merged 2 commits into from
Aug 20, 2024
Merged

Mechanism to wake up oscs if amplitude changes #175

merged 2 commits into from
Aug 20, 2024

Conversation

dpwe
Copy link
Collaborator

@dpwe dpwe commented Aug 20, 2024

In #164 we noted that once the noise osc within a Juno voice has hit zero amplitude, subsequent changes to its level will not introduce noise, because the zero_amp_clock mechanism has already taken that osc out of AUDIBLE status.

This change introduces a new AUDIBLE_SUSPENDED status for oscillators that have reached zero amplitude. Then, if there are later events that modify the amplitude or envelope generator parameters for that osc, and provided it has not seen a note-off since the last note-on, those changes return it from AUDIBLE_SUSPENDED to AUDIBLE. If, in fact, those parameter changes still leave the output at zero, the max_val check in render_osc_wave() will return it to AUDIBLE_SUSPENDED within a few frames.

@dpwe dpwe merged commit b630874 into main Aug 20, 2024
1 check passed
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.

1 participant