Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Stilgar

Heretic: SNDCURVE lump?

Recommended Posts

Not sure if it's better to put this here or in editing, but I figure if anyone knows the answer it'd probably be engine coders:

What is the SNDCURVE lump in Heretic? What does it do, what is its format, and do any engines besides vanilla make use of it?

I'm guessing, by a quick glance and by the name, that it has something to do with the way sound fades out with distance... but I could be entirely wrong in that assumption.

Share this post


Link to post

Your assumption is correct. It is used for precisely that purpose. Its format is a simple byte array with values starting at full volume going down to 0, each byte representing one map unit of distance.

To my knowledge and Heretic port uses this lump.

Share this post


Link to post

Interesting. I'm sure there's some cool effect that could be made by hacking this lump to pieces.

Graf Zahl said:

To my knowledge and Heretic port uses this lump.


Run that past us again.

Share this post


Link to post

Does 'Heretic compatible port' sound better? :D


Concerning 'hacking' that lump, that will only work with engines that do their sound mixing completely by themselves. Anything that uses modern sound libraries will have problems because such libraries require that the values stadily decrease.

Share this post


Link to post
Graf Zahl said:

Does 'Heretic compatible port' sound better? :D


Your sentence that I quoted has a grammar snag, so I couldn't catch your meaning.



The Heretic engine seems to have a lot of fun things that could be messed with, but exploiting any of these quirks would restrict your wad to only the most faithful executables. Ah well.

Share this post


Link to post

Exactly! Reverse the SNDCURVE, mess with the palette and colormap a bit, throw in some twisted music, use some of the weirder voodoo doll quirks, write an absurd story and put all of this in the most brain-melting level you can design. I love that stuff.

Share this post


Link to post
Graf Zahl said:

Concerning 'hacking' that lump, that will only work with engines that do their sound mixing completely by themselves. Anything that uses modern sound libraries will have problems because such libraries require that the values stadily decrease.

Not quite, as it's done in the upper level of the sound code. It's used to control the volume levels to set for sound effects, rather than used in the mixing process itself. Chocolate Doom Heretic uses the SNDCURVE lump, for example, but uses SDL_mixer for mixing sound effects.

I do agree that there's probably very little that it can be usefully used for, though. Even for a "weird" level of the kind Creaphis describes, I think it would be difficult to do something that was interesting or added to the atmosphere of the level, rather than just seeming like "the sound is broken".

I can think of a few places where it might be useful, but mainly for tuning the sound behavior for unusual levels. For example, you could have a large wide-open level and want sound to propagate over longer distances than normal. Similarly, you might possibly want the opposite, with a level where sound propagates only a short distance. Finally, you could do the E1M8 thing and have all sound effects at maximum volume all of the time.

Share this post


Link to post
fraggle said:

Not quite, as it's done in the upper level of the sound code. It's used to control the volume levels to set for sound effects, rather than used in the mixing process itself. Chocolate Doom uses the SNDCURVE lump, for example, but uses SDL_mixer for mixing sound effects.

I do agree that there's probably very little that it can be usefully used for, though. Even for a "weird" level of the kind Creaphis describes, I think it would be difficult to do something that was interesting or added to the atmosphere of the level, rather than just seeming like "the sound is broken".


I meant the entire sound processing. Engines using modern sound libraries often use their facilities for sound rolloff and there's often limits involved because these features are limited - if they are at all capable of using SNDCURVE.

ZDoom's FMOD implementation can handle it thanks to a callback but the OpenAL version that some guy on the forum has posted had to circumvent half of OpenAL's features to make this part work as intended. I have no idea how it looks with other sound engines being used in source ports.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×