Floofy Posted January 18, 2012 Report Share Posted January 18, 2012 Is there any way I could create some sort of system to increase the volume of a sound depending on the distance from an object? Link to comment Share on other sites More sharing options...
DimensionWarped Posted January 18, 2012 Report Share Posted January 18, 2012 Sure, you can do this with stereo audio anyway. Doubt you can do 3D positional audio in MMF, but eh... You need to use channels and control your sound playing a little more deliberately... and you'll be limiting yourself ideally to no more than half of the audio channels, and honestly you could probably get away with 8 pretty easily and never run into any overlap issues. here is a simple proof of concept. Simply click somewhere to generate a sound at that position. It is limited to channels 8-15 by means of some easy math in a rotational queue, so you can play 8 simultaneous sounds this way, but that could easily be increased to half or even all of the channels set aside for this if you wanted. Ideally you'd want to create some kind of function for picking your sounds based on positional input and which sound you want to play, and that's actually pretty easy. For the record, I programmed this whole thing in less time than an interview on the Daily Show. positional_audio.mfa Link to comment Share on other sites More sharing options...
Floofy Posted January 18, 2012 Author Report Share Posted January 18, 2012 That should do it, Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts