Optional "Classic" Mic Filter

I have no clue how hard it would be to implement something like this. I think it would be pretty fun if inside the audio settings of S&box there was a “Classic Mode” that applied some kind of filter to all incoming voice chat audio and made it sound like Garry’s Mod / Source 1 microphones. This would be a fun callback to the old engine. Again I do not know how hard it would be to do this so it’s fine if it would be too difficult or if you hate this idea, just a silly idea.

I think this should rather be a suggestion for mic filters in general. Mic filters for radios for example could be really useful. I however don’t see the use of a Classic mode but to each their own. With a general mic filter system you could implement it yourself.

4 Likes

You will be able to modify the raw voice data being sent and received so it’s entirely possible for someone to make an addon that implements this behavior

5 Likes

Indeed I was wondering if the game would expose a voice API or something. I’ll try to check on already existing piece if code scattered all over github/the wiki and trying to find out.

Exposing voice functions can be a bit of a concern to some users, as then you’re able to record them without their permission, change what they say, potentially listen without them knowing…
All kinda sketchy stuff, so it might not be a thing because of that.

You can already get and modify the raw voice data.

4 Likes

Guessing there’s limits to what can be done with that then? Or will be at some point perhaps.

If you’re able to handle raw voice data I don’t think there’s a need to make this feature part of the game itself but more of a thing to be implemented by an addon.

I don’t think that there will be any limits to that, iirc the voice chat is fully implemented in C#, so if they wanted to do that, they would have to remake it.

This could be used GitHub - ar1st0crat/NWaves: .NET library for 1D signal processing focused specifically on audio processing in order to develop an addon that allows the server host or game mode dev to apply certain filters or almost anything really to the voice. Possibly even linking stuff like map room sizes to different reverb values for the voice chat. Map geometry and materials could then feed reverb probes (either manually or automatically place and fed) the data so it sounds appropriate to the space around you, roughly.

Although doesn’t the engine already do this for every other sound? Perhaps voice chat could be sent through that channel and then you’d benefit directly from the engine’s reverb or even HRTF.

In any case that library could still be used for other FX such as speaker emulations, radio FX, phone FX (those are all basically filters and some saturation at most). It could also allow you to implement voicechat into gameplay and have stuff like areas without signal (voice would cut off randomly or totally depending on it), that perhaps you could amplify by getting the necessary equipment… There’s plenty of things that can be done.

This would be best as an add-on, that way servers can use the filters they want and don’t have a bunch of overblown mics running around

1 Like

I don’t think real-time voice processing will be that usable for most players with a small computer though. I’m worried that it can be really CPU consuming and may have a terrible result when your resources can’t keep up with the load

True to an extent but I think that if they can run s&box, they can afford to process a couple filters. Each player would process their own, so that should reduce the load.

Price of a game can’t be compared to the price of a hardware configuration IMO

I meant afford as in their CPU will be strong enough to process that too.

Something that can be done before even thinking about adding something like NWaves could be just to run some experiments with it in order to compare the impact and performance on small CPU

Maybe trying to implement it with a small unity PoC game (or anything which is using C#) and use the profiler to compare

I think it’s better to wait for s&box altogether and benchmark there. Also I wasn’t suggesting for this to be built-in on s&box but as an add-on that would be tested and tried and only released if it was feasible.

1 Like