Graf Zahl Posted May 23, 2017 (edited) I'll just repeat myself: If you want vanilla at all costs, play with another engine. I think by now it should be obvious that this isn't the ultimate goal of ZDoom-like ports. 0 Share this post Link to post
Xaser Posted May 23, 2017 (edited) 12 hours ago, printz said: Why do you call vanilla-like sound channels insane? Why would anyone call a speaker-blasting system downgrade not insane? I don't even have any fancy words for this. 2 Share this post Link to post
printz Posted May 23, 2017 1 hour ago, Xaser said: Why would anyone call a speaker-blasting system downgrade not insane? I don't even have any fancy words for this. What's a little insanity going to ruin in a game of DOOM? This is Doom, not the town library. 0 Share this post Link to post
esselfortium Posted May 23, 2017 45 minutes ago, printz said: What's a little insanity going to ruin in a game of DOOM? This is Doom, not the town library. Artificially limiting sound channels in a modern port is senseless. In trying to solve the problem of excess noise from too many sounds playing at once at full volume, it creates other problems like audio cut-outs. Ambient sounds and monster-heavy scenes would definitely be affected by such a limit, and even 16 or 32 of the same teleport sound playing at once would likely still be excessively loud compared to the game's audio level, so the limit wouldn't actually solve anything. (And no, distorting the output and blasting the player's ears out does not create a desirable "realism" :P) Modern digital audio processing is so capable and versatile that there are surely actual solutions to the problem, but this isn't one. 0 Share this post Link to post
kb1 Posted May 24, 2017 The number of concurrent sound channels *must be* limited in video games for one specific reason: The sounds being played are identical, sample per sample. Because they are identical, if they are played at exactly the same time, the mixer will full-on-clip at every positive and negative peak. Imagine a game of tug-of-war. You've got a rope stretching west to east. We'll call the west side "Negative" and the right side "Positive". Imagine your speaker is at the center, moving inward when the "Negative" side pulls, and outward when the "Positive side pulls". To continue with this analogy, imagine that each time you add a sound channel to the mixer, you add one person on the west side of the rope, and one on the right. For loud sounds, you add strong people, for quiet sounds you add weaker people. Each person either pulls or rests (based on the current waveform). Now, for random sounds, each side pulls and rests rather evenly. The speaker moves in and out a bit, and you get a mixed sound output. Now, imagine mixing 16 channels (32 people, 16 on each side), but imagine that the same sound will be played thru each channel. That means that everyone on the left pulls when everyone on the right rests, and vice versa. You rip the speaker out of it's cone! That's why you need limits. Typically, your amplifier "bottoms out" before ripping the speaker out of it's cone, but, I've done it. Burnt up plenty of speakers. An interesting note is that you can alleviate some of this issue with pitched sounds, because that causes enough difference in the various samples to prevent this issue, except at the start of the sound. To fix THAT problem, you can introduce a minute random delay before starting the sound. The sound API may already do this. This clipping effect is not easy to resolve. You can try to detect it, and proportionally reduce the amplitude. You can also try to detect that you're playing the same sound multiple times, and simply avoid mixing both of them, while bumping up the volume slightly to fake it. My point is that sound mixing is not trivial, and, yes, some combination of limitations is an absolute requirement, and is being employed in any driver/game where sounds are being mixed, and the possibility of one of them being a duplicate is present. The clipping issue also occurs on non duplicates, but it occurs in small bits at a time. On duplicated sounds, it's a full-cycle square wave, which sounds like shit and obscures everything. 1 Share this post Link to post
Albertoni Posted May 24, 2017 1 hour ago, kb1 said: On duplicated sounds, it's a full-cycle square wave, which sounds like shit and obscures everything. People who make music for the NES would like a word in private with you :P Jokes aside, thanks for taking the time to explain in so much detail! 0 Share this post Link to post
Graf Zahl Posted May 24, 2017 (edited) What kb1 describes is very much what happened on occasion. But there's also another thing: Even if you mix a large number of very quiet sounds, at some point they will become very audible, even if in the distance and each being very quiet. Take 100 'monster active' sounds, all starting at the same time, and all being the same sound. Suddenly you hear things you are not supposed to hear. Sound mixing is indeed a tricky thing and what trivially seems to make sense can very easily backfire. In the context of Doom the most dangerous thing is a large number of barrels exploding (or the Icon of Sin's death) when a large number of instances of a very large sound can be played at the same time. This is no joke, but this can become so loud that it not only may damage the speakers but the listener's ears! In that context: screw vanilla accuracy! I just repeat: Many years ago, when ZDoom tried to go that route and removed the limits it did not work - it sounded horrible. Have fun reading: https://forum.zdoom.org/viewtopic.php?f=7&t=16662 The limit issue was only part of the report but I hope anyone will understand. 0 Share this post Link to post
printz Posted May 24, 2017 I never felt in danger because of multiple barrels or boss brain death in vanilla Doom. Doom 3 is another story though, I once placed 16 imps in a small box and the screech was indeed deafening. But in vanilla Doom? Try placing an arbitrarily huge number of monsters and kill them all. It will not be dangerous. 0 Share this post Link to post
Gez Posted May 24, 2017 Because vanilla Doom has an explicit limit of 8 sounds at any given time. And you're arguing that there shouldn't be limits when talking about ports that have a lot more sound channels than that. No limit for 8 synchronized explosions isn't the same thing as no limit for 256 synchronized explosions. 0 Share this post Link to post
Da Werecat Posted May 24, 2017 8 minutes ago, Gez said: Because vanilla Doom has an explicit limit of 8 sounds at any given time. Which is a problem in itself. As far as I'm concerned, ZDoom solves two problems at once: no sounds get eaten because the engine ran out of channels, and no ear abuse (which is possible even with 8 channels, IIRC). 0 Share this post Link to post
Graf Zahl Posted May 24, 2017 Some comment from ZDoom's internal SNDINFO which is a good illustration on why limits are needed: // Problem: weapons/rocklx needs to be unlimited but // is also used for the MAP30 brain explosion. // This alias remaps to the original but has its own limit // attached so that it doesn't become too loud. $alias misc/brainexplode weapons/rocklx $limit misc/brainexplode 4 $limit weapons/plasmaf 0 $limit weapons/chngun 0 $limit weapons/rocklf 0 // because normal running is almost as fast as a rocket $limit weapons/rocklx 0 // and the cyberdemon shoots 3 at once 0 Share this post Link to post
printz Posted May 25, 2017 11 hours ago, Gez said: Because vanilla Doom has an explicit limit of 8 sounds at any given time. And you're arguing that there shouldn't be limits when talking about ports that have a lot more sound channels than that. No limit for 8 synchronized explosions isn't the same thing as no limit for 256 synchronized explosions. Fine, then try the same thing in Eternity. Again, no damage. 0 Share this post Link to post
Graf Zahl Posted May 25, 2017 Whatever. 'Blowing up the speaker's may be a bit hyperbole, but 'getting too loud', as in 'it hurts listening to that' definitely was one of the reasons for the limit, the other, like I said, that too many identical sounds playing at once with no time separation can amplify distant sounds so much that they become clearly audible. These chamges weren't made out of spite but because real life mods did not work properly without them. 1 Share this post Link to post