Simulating tinnitus?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Electronic Samurai
Posts: 177
Joined: Mon Mar 27, 2006 1:54 am
Location: Wandering the open plains

Simulating tinnitus?

Post by Electronic Samurai »

Is there any way to simulate the effects of tinnitus from explosions, as in Half-Life? This should play the sound of a high-pitched whine, while muting all other sounds for the same period.
User avatar
Reactor
Posts: 2091
Joined: Thu Feb 03, 2011 6:39 pm
Location: Island's Beauty, Hungary

Re: Simulating tinnitus?

Post by Reactor »

I remember the same effect appears in Quake 4, when grenades explode near you, or get sucked in Dark Matter squirm. The tinnitus can be solved (I think) by checking that the certain projectile explodes within a few tiles from you, and then the game gives you the ear ringing, but I have no idea how to muffle every other sound...
User avatar
Caligari87
Admin
Posts: 6236
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Simulating tinnitus?

Post by Caligari87 »

You'd probably have to code in some kind of special check on the DECORATE code for every single entity in the game to not play sounds when the player has the effect active. Either that or if there's a way to force channels so only a single sound can play during the effect, but any way of doing that is gonna be super hacky, if it's possible at all.

Alternatively, don't worry about the "muting other sounds" part and play it over the other sounds. "close enough" would probably apply here.

8-)
User avatar
Enjay
 
 
Posts: 27155
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Simulating tinnitus?

Post by Enjay »

Go and see a band such as The Foo Fighters, Motörhead or Manowar? The effects can last quite some time. :P

Seriously though, playing a high pitched whine is easy enough but the sound muting may be more problematic. If it is for something map specific, and only single player, you might be able to do it using map-placed reverb items. ZDoom uses whichever reverb item was activated last to create the reverb-soundscape of various areas of the map. If you found a reverb effect that came close enough to what you wanted, you could place sufficient on the map to ensure the whole map was covered (that could just be one BTW, depending on your map layout). You'll also need a "normal" reverb object placed on the map. Then, when you want the tinnitus effect, activate the muted reverb and when you want the tinnitus to wear off, activate the "normal" sounding reverb.

[wiki]REVERBS[/wiki]
User avatar
Caligari87
Admin
Posts: 6236
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Simulating tinnitus?

Post by Caligari87 »

Enjay, I've never played with reverbs. Is it possible to define an "equalizer", so certain frequencies are cut out when the reverb is active?

If so, just cut out anything above 200-300Hz and it'll give a nice "muffled rumbling under the whine" effect.

8-)
Locked

Return to “Editing (Archive)”