This module is designed for sounds to play in a realistic way depending on the environment the sound is on. This is dynamic too! in which you don’t have to set up zones in your map manually for something like a reverb. It is all handled by the module itself.
Features
Sound Delay
Dynamic Reverb
Realistic Frequency Dampening
Video demo
Source
API is listed in the github, check it out!
Credits to Sleitnick for his sound delay implementation and BoatBomber for his 3D sound implementation!. I only created the dyanmic sound reverb.
I assume that you might be playing the sound using the position in the target parameter in which it makes the sound to your left ear while you move, try to put in an instance (part or an attachment) in the parameter that is with the assembly of your gun.
Do you have any benchmarks or performance tests? Because at present, the code seems to be firing multiple Raycasts per frame for each sound, which imo doesn’t sound like the most performant-friendly method.
Sadly I never did any benchmarks or performance test, and even with that I’m quite sure that this is not the most performant module.
In all honesty I think using this would be bad for performance of a game and I believe this ought to not be used in games where audio is not an important part of the gameplay.
Oh my, thank you for the contribution! you added a lot of improvements on your forked version! I’ll merge it to the main since lots of this improvements makes the module much better.
though i do hope you dont feel forced to start working on the other features when i accept this. It is your choice to work on those if you want. Again, thank you
Hey there! I noticed a problem with your reflections! you were reflecting them the wrong way , I fixed this by just multiplying it by -2 and not 2 as in your original code.
No problem Robert! I’ve made one final pull request to fix some issues with the reverb, the module now also returns the sound instance and the emitter to be destroyed, stopped and etc. Pause support isn’t a thing (and I don’t think it should really be a thing) so for now I’m done!
I had a lot of fun working on this module, thanks for doing all this work and I appreciate it all!
for anyone wondering, on default settings this module is semi performant
8 rays and 3 bounces every frame.
Features of this module include:
Dynamic Reverb
Debug Rays
Sound Delay
Realistic Frequency Dampening
Last update will most likely be using actors for multi threading
Love it! I think I might implement this into my game in the future
If possible, could you also make a game featuring this module with guns/footsteps/music?
Oh my i completely forgot about this, i am very sorry for forgetting about this. Currently im on vacation now so i’ll most likely make the place demo tommorow. Again im sorry for forgetting about this
Hey there, here is the demo. I know its not much due to the limited time i have, and it only shows a footstep sound. but im sure that this can show you the basics on how to use it SoundDemo.rbxl (58.5 KB)