A request to the devs: Particle sound volume randomization
Hello
I'm creating a new Ambient/Background sound pack.
Based on the initial idea of the JDoom Ambient Pack (JDAP) I'm using particle generators to spawn the sounds.
Since there is already a Volume syntax, would it be possible to add a Volume Rnd Syntax and if further possible a pitch randomization at values of -/+ 30% or more?
I don't know about the Doomsday initial coding language, but since there is already a Volume value for sounds it would be fairly easy to add random. In C++ It would look something like this:
I'm creating a new Ambient/Background sound pack.
Based on the initial idea of the JDoom Ambient Pack (JDAP) I'm using particle generators to spawn the sounds.
Since there is already a Volume syntax, would it be possible to add a Volume Rnd Syntax and if further possible a pitch randomization at values of -/+ 30% or more?
I don't know about the Doomsday initial coding language, but since there is already a Volume value for sounds it would be fairly easy to add random. In C++ It would look something like this:
Play Sound {
Rnd Volume = Random Number;
Play Sound(Volume *Rnd Volume)
}
Comments
So if you do get this working, it would be cool to see an example
You can download the alpha in the thread DOOM->Add ons->Defining a ambient Sound
I just use a very slow particle generator defined for each map with a huge radius. Then I use the second particle state and define a random tic lenght in the first stage to have random time frequency between each sound.
The volume/pitch randomization would help prevent the sound scape becoming boring
But why is there not a standard volume control in sound defs?
Yeah, the link volume field can be manipulated to function as one, but a standard volume control would simplify things a little bit. I'm assuming the code is basically all there on account of the above two mentioned volume controls.
Having a volume control in sound defs would be good. At the moment I am actually editing the sound file it self and changing the volume, then re-saving.
Notes:
*Use Particles to limit max number sounds simultaneous to this value
*Use Spawn Rate to set a minimum possible time duration between two simultaneous sounds
*Use Tics (first Stage) to define the maximum possible time duration between a sound
*Set Rnd (first Stage) to 1 to randomize between zero and the maximum duration (Tics)
- - - - - - - - - - - - - - - - - - - - - -
The weirdest problem I'm still having is the spawn location of each particle.
I don't place the particle generator at a specific location in the map, I just expect it to spawn at map center (within the world coordinates), setting it do dead-center makes no difference anyway.
The particles/sounds spawn at the window facing right in the Hangar (E1M1) level, where armor is located right at the beginning.
No matter how big the spawn radius or particle direction, 75% of the sounds are coming from this general direction!
Only setting spawn radius to a really huge value like 90000
scatters the spawn location up a bit. Setting the radius any higher does not help or even makes it worse. I don't know how big E1M1 is in world units. But it sure ain't more than 10'000 units? And the map center must be somewhere close to the map, most likely the first door you enter somewhat to the left.
However, a mapper doesn't have to build the physical map anywhere near 0,0,0 on the grid and can build it 10,000's of units away from that point if they wish.
That wall you highlight is almost perfectly south of 0,0,0 on the grid, by about 3000 units.
At such size the scattering would be so uniform, even by coincidence they would never spawn at similar location
But I note you have no spawn co-ordinates for your generator in your def?
If defs with no spawn co-ordinates default to 0,0,0, a minimum spawn radius of 10,000 means your particles will never spawn inside the actual map (the entire E1M1 map is within 10,000 unit's of 0,0,0).
I can pop them in were ever I want a sound in a map and the sound comes from that location. So as I walk away the sound fades. Only problem I have with this method is I cant seem to be able to adjust the volume, so I need to actually edit the sound file its self.
Anyway, here is the code if its any interest. I guess its just a different way of doing things? Though I am very interested in the 'Particle' method, seems thats the best way to do it and has more functions to make it more versatile. However, I did find that when a sound was playing it got cut off once I started shooting bad guys and lots of sounds started playing. The engine can only play so many sounds at any one time.
However, using this method you need to actually 'place' the 'Thing' in the map, while in the other method you have made it emit from a texture and so no map editing needed, easy for an add-on.