-
-
Notifications
You must be signed in to change notification settings - Fork 18
Add convolution node #75
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
Conversation
|
Ah yeah, I suppose adding a supertrait for |
|
As for wet/dry mix, I realize I should add wet/dry mix DSP in (Also don't forget that you will need to delay the dry signal by the same number of frames as the latency of the convolution effect.) |
|
Oh and actually, we might not need an |
|
Thanks for the comments - it would be nice to have wet/dry in DSP core. I imagine a lot of it is similar to the crossfade node. |
|
Ok, I added a |
90f2249 to
3187fa5
Compare
|
Ok, got some more progress on this.
|
|
Hmm, I'm not sure if declicking is necessary or not when changing IR samples. Do you notice any clicking when you change samples? |
|
I think panicking if |
|
Alright, I think this is more or less ready. I added a wet amplitude to account for amplitude of convolved samples, and removed true stereo stuff. one thing I still want to investigate is if the IR buffer can be replaced without re-initializing the convolution buffer (I believe that is why I am hearing clicking when changing samples). I think i might need to open a PR/fork the fft-convolver crate. But yeah, I don't think there is currently a way to mix between two IRs, only two convolution nodes, which isn't ideal. |
|
ack, i forgot about the pause/play function mentioned on discord for reverb - i think it is applicable here as well. will push a change with a fix. Edit: pushed |
b74abfe to
e3be44b
Compare
added attribution for IR samples fixed docs
|
I think this should be good to go
|
(Draft) Implements #15. Managed to get something working and wanted to start a draft with some notes to get any early thoughts. Feel free to reject entirely if this isn't up to snuff, I'm not the best at this, and is good practice in any case! Appreciate any feedback or comments on performance.
Still to-do
Changes with explanation
Dependencies
This adds the
fft-convolvercrate as an optional dependency tofirewheel-nodes."True Stereo"
The "true stereo" setting for convolution requires the allocation of +2x buffers compared to independent stereo. Because this option is not likely to need to change at runtime, it is a config parameter.
Mono-to-stereo convolution
One potential application of convolution is to add space to a mono audio signal using a stereo IR. I explored adding const generics for both inputs and outputs, but found this overcomplicates things, and instead that users should simply use the mono to stereo node to achieve the same result.
Other
.DS_Storeto.gitignorefor Mac developers since it was bugging meQ: Would make sense to add a supertrait for the
num_channelsandlen_framesdefinition since bothSampleResourceandSampleResourceF32implement it? It could make blanket impls (e.g. on Vecs) a bit more concise.