vlad2305m / Sound-Physics-Fabric

A Minecraft mod that provides realistic sound attenuation, reverberation, and absorption through blocks.
GNU General Public License v3.0
39 stars 6 forks source link

Plasmo Voice capture reverb #23

Closed thedocruby closed 2 years ago

thedocruby commented 2 years ago

Issue for tracking the development of mic capture reverb with Plasmo Voice client

Apehum commented 2 years ago

I've made a working prototype but it needs polishing.

Demo: https://youtu.be/wjrzTiDVztI

I've copied functions onPlaySound and evaluateEnvironment and renamed them to onPlayReverb and evaluateReverb. They are not much different from the original, the only difference is that directGain is set to 0.0f so that it outputs only reverb, without the original signal. Output is affected not only by reverb, but also by everything else, because I'm not sure what needs to be removed so that only reverb is calculated.

It will be nice to make it so that onPlayReverb returns true or false, depending on whether there is reverb or not. If that is possible. Also, evaluateReverb should output only reverb.

Test branch for Plasmo Voice: https://github.com/plasmoapp/plasmo-voice/tree/1.18-capture-reverb https://github.com/plasmoapp/plasmo-voice/releases/tag/1.2.9-test-client

Sound Physics Fork: https://github.com/Apehum/Sound-Physics-Fabric/tree/pvoice-reverb https://github.com/Apehum/Sound-Physics-Fabric/releases/tag/0.4.1-capture-pre

thedocruby commented 2 years ago

@Apehum Nice work! Seems to work well in the demo! When I get time I will see what I can do about polishing the code on my end. Thanks so much for all your help!

thedocruby commented 2 years ago

Fixed with b5de7df43fa5b49ddc4f7df4ad27fa2372576680

thedocruby commented 2 years ago

Ran into some issues, reopening until publicly released