How to properly set the range of a sound that can be heard?

Hello, so I’m not really sure what category this belongs in, I’d assume Scripting because it’s regarding the Sound class, if this belongs somewhere else let me know.

But basically, I noticed Roblox released a change to the Sound object, getting rid of the EmitterSize property. Go figure, this change completely screwed up my audio system I had in place for my game, and when I played it recently about half the sounds couldn’t be heard at all.

I’ve been trying to figure out how to use the properties that took EmitterSize’s place to achieve a similar effect as before, but it’s been horrible so far. Any help appreciated, thanks.

2 Likes

You may be thinking about RollOffMaxDistance.

1 Like

So I’m reviving this post. The new RollOff properties seem really hard to figure out. I’m trying to properly configure the sound’s range for different sounds on different models, and it’s either way too quiet when I get close to it or way too loud when I’m very far away from it or up close as well…it’s really stupid.

Any help appreciated, thanks

2 Likes

Just mess around with volume and RollOffMaxDistance until you get the results you like.

1 Like

I’m bumping this again. I’m having serious issues getting this to work right, for whatever reason the sound playing from a part gets louder when I walk away from it, and when I get up close to it, it actually gets a bit quieter.

So either Roblox screwed up sounds, or I’m doing something wrong.

Not gonna lie, I find it insanely frustrating how they decide it’s okay to deprecate a property that works fine with some new untested property that’s just a giant mess right now.

2 Likes

The sound is always going to get quieter the farther you get from it, with all of the rolloff modes.

This makes me think that either the emitter is not where you think it is, or that you’re expecting it use emitter-to-avatar distance, when in fact it’s always emitter-to-camera distance that is used.

Also, while the properties have been renamed again, the math is still the same. RollOffMinDistance is what used to be EmitterSize, and RollOffMaxDistance is what used to be MaxDistance.

1 Like

This is the graph I made a couple of years back in Desmos for my own reference. It shows what the rolloff curves look like between the Min and Max distances. One thing particular to note is that the Inverse rolloff does not go to zero, so when you go outside of the max distance, sound can abruptly cut off. It’s for this reason that I use Inverse Tapered almost exclusively.

42 Likes

An older thread, but I was experiencing the same issue.

It looks like PlayOnRemove may not properly respect rolloff ranges. Any chance this is what you were using @C_Sharper?

I don’t know if this is a new issue or not, but hopefully this tidbit helps future peoples.

2 Likes

Would you mind providing the functions you used for these graphs? I can’t find them anywhere.

1 Like

What functions are you referring to? Inverse, inverse tapered, linear, etc.?

I think the graphs were pulled from roblox data they look strangely familiar.

In order to make a graph like that in Desmos you have to have the mathematical function for the graphed line. That’s the function I need.