michail-nikolaev / task-force-arma-3-radio

TeamSpeak integration for Arma 3
http://radio.task-force.ru/en/
Other
315 stars 169 forks source link

A fourth option for speaking volume #1311

Open TTTRedd opened 7 years ago

TTTRedd commented 7 years ago

Is it possible to get a fourth option for volume: e.q.

  1. whisper
  2. speak
  3. speak loud
  4. yelling

or.

  1. whisper
  2. speak quite
  3. speak
  4. yelling

the range of normal speak at the moment is a bit to long and whispering is to short. would be nice to have an option between them.

john681611 commented 7 years ago

Why not go all the way and have a 0-10 loudness? Then have short cuts for the current options

dedmen commented 7 years ago

You can do that with Scripting :D I think.. Shouldn't be that hard..

john681611 commented 7 years ago

Point me in the right direction and I'll have a shot if I ever find time :D

dedmen commented 7 years ago

https://github.com/michail-nikolaev/task-force-arma-3-radio/blob/1.0/addons/core/functions/fnc_setVoiceVolume.sqf You can call that with whatever you want.. But the default CTRL+TAB volume switching thingy will ignore them. https://github.com/michail-nikolaev/task-force-arma-3-radio/blob/1.0/addons/core/functions/events/keys/fnc_onSpeakVolumeChangePressed.sqf#L5 This is ugly anyway and I wanted to change that at some point.

john681611 commented 7 years ago

On a side note have you ever had a look at adding sound effects for wispering and shouting. I guess its way more complex

dedmen commented 7 years ago

Not that hard.. theoretically. But I don't see a point in that

john681611 commented 7 years ago

Well, that or either mess with the player's output volume. Just feels odd that within a certain distance it's just normal volume even if someone is supposed to be shouting.

That feature would also allow players to actually shout over the sounds of combat.

dedmen commented 7 years ago

Ah yeah.. shouting doesn't increase volume. The max is always 100%. whisper/normal/shout just set your voice range. If you are out of range you hear nothing. And in range it interpolates between 100% volume at 1m or lower distance and close to 0% volume at max range. That's not linear a linear curve though. For that it is using https://docs.unrealengine.com/latest/INT/Engine/Audio/DistanceModelAttenuation/ NaturalSound

The code is here: https://github.com/michail-nikolaev/task-force-arma-3-radio/blob/1.0/ts/src/helpers.hpp#L108-L132

john681611 commented 7 years ago

Apparently, men can be damn loud: http://www.guinnessworldrecords.com/world-records/farthest-distance-travelled-by-a-human-voice http://wiki.secondlife.com/wiki/How_far_away_can_people_hear_me

so I'm going to mess with a min of 1 (ear whisper) and a max of 100m, for now as its kinda convenient :D

plus there is a lot of duplicate code in the events is it only pressed that matters?