-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Audio Effect Reverb #10196
base: main
Are you sure you want to change the base?
Audio Effect Reverb #10196
Conversation
@relic-se If you have a moment this is ready for testing. No rush. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work so far! I haven't dug into everything quite yet, but the biggest issue at the moment is definitely the mix implementation. <0.5 doesn't seem to work for me.
All my testing was on an RP2040 with mono 22050hz sample audio (StreetChicken.wav).
shared-module/audiodelays/Reverb.c
Outdated
|
||
word = output * 30; // Add some volume back don't have to saturate as next step will | ||
|
||
word = sat16(sample_word * mix_sample, 15) + sat16(word * mix_effect, 15); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't quite figured out why, but when mix is <0.5 (ie: 0.499999), there is no effect at all in the output. When mix is 0.5+, then the effect is at full volume and the sample volume decreases as you approach 1.0. The implementation in audiodelays_reverb_get_mix_fixedpoint
appears correct.
shared-bindings/audiodelays/Reverb.c
Outdated
(mp_obj_t)&audiodelays_reverb_set_roomsize_obj); | ||
|
||
//| damp: synthio.BlockInput | ||
//| """How reverbrent the area is. 0.0-1.0""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be spelled "reverberant", but also I feel that this description isn't precise. A higher value "dampens" the high frequency response and reduces reverberation among those frequencies (lower frequencies aren't affected as much).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reworded it.
Okay, I may have changed my mind. What if we did create a new Unless you want to take a swing at allowing independent dry/wet mix control globally, I vote we keep it standardized for now and then expand all effects in the future to support this functionality. This question might be better poised on a separate issue/PR, but how would you handle |
@tannewt @dhalbert Any preference on keeping the reverb in |
The advantage of a separate module is that we can turn it off if there are space problems. So I don't think it's bad. Didn't we have As for further reverbs, how different are they in terms of code? Could you make a parameterized reverb that handles all of those in a single class with parameters, or is there something different in the calcuations? |
There was never a singular
Unfortunately, I think other reverb types will operate very differently. The reverb algorithm implemented here, "Freeverb", is finely-tuned for its particular operation (a general "room" sound). Further research may dispute this. |
I'd go further and put this in a |
I think I may leave it and get this PR in and we can look at how to handle mix better across the board later. I think for |
Adding a reverb effect for audio effects, based on FreeVerb.
Question:
audiodelays
)? Early on we debated more modules but I'm not sure if there is value to make a Reverb only one.Time permitting I may still add in a way to control dry and wet mix independently. So mix could either be
mix=0.5
ormix=(0.3,0.3)