project-navigation
Personal tools

Author Topic: Normalizing sounds  (Read 16452 times)

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Normalizing sounds
« Reply #15 on: April 29, 2009, 04:53:05 pm »
Thanks, this is good feedback.  Perhaps it could be used as a new sound for light weapons then?

I manipulated it further, and got another sound which I'm attaching - one dry, another with some reverb and as an automatic fire demo.  I don't know how it compares with the first (I'll need feedback again), although if new sounds are needed for the big guns, I may have to record a new sample to edit.

[attachment deleted by admin]

Offline Hertzila

  • Sergeant
  • *****
  • Posts: 469
    • View Profile
Re: Normalizing sounds
« Reply #16 on: April 29, 2009, 06:32:14 pm »
Perhaps. It does sound like one very well enough IMO.
The new sound doesn't sound like a gunshot but I can imagine it being a laser weapon. The high speed version sounds especially like pulse shooting or the suggested UGV tri-laser shooting in pulse mode (9 lasers). Other possibility is a particle beam, though I think it is better for a laser weapon.
Edit: If we are ever going to use silenced weaponry, this sound is also a good candidate for that.
« Last Edit: April 29, 2009, 06:39:59 pm by Hertzila »

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Normalizing sounds
« Reply #17 on: April 29, 2009, 07:23:20 pm »
looks like it is not really possible in a nice way to add a reverb effect via sdl_mixer... i'll dig a little bit more but maybe you have to add them to the soundfiles (just that you are warned ;) )

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Normalizing sounds
« Reply #18 on: April 30, 2009, 12:28:03 am »
Perhaps. It does sound like one very well enough IMO.
The new sound doesn't sound like a gunshot but I can imagine it being a laser weapon. The high speed version sounds especially like pulse shooting or the suggested UGV tri-laser shooting in pulse mode (9 lasers). Other possibility is a particle beam, though I think it is better for a laser weapon.
Edit: If we are ever going to use silenced weaponry, this sound is also a good candidate for that.

OK, that's actually a good thing considering many of the weapons in the game don't use bullets and I suppose it wouldn't hurt to have more energy weapon sounds.

looks like it is not really possible in a nice way to add a reverb effect via sdl_mixer... i'll dig a little bit more but maybe you have to add them to the soundfiles (just that you are warned ;) )

OK, I can easily add a little reverb on the samples, no problem there, but I'm guessing that without the SDL_Mixer controlling how much reverb and how it sounds, all the weapon sounds will end up sounding the same regardless of if they are indoors or outdoors.

I could, however, as a solution easily make two versions of each weapon sound, one for firing outside and another for indoors for realism.  I know there is already code in place for footsteps on different materials the actors stand on - if you want more realistic sound FX perhaps the materials could be grouped into "indoor" and "outside" - when a soldier/unit is standing on an indoor material and fires a shot the indoor firing sound would play, etc.

On the other hand, if you don't want to code all that I can just make a generic, subtle reverb effect on all the weapon sounds without any special extra ambiance or anything.

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Normalizing sounds
« Reply #19 on: May 02, 2009, 12:57:28 am »
Update:  I did some work on the footsteps, got them normalized and all in the same format, then packaged them up in a ZIP file.  There's just one problem now:  My website hosting service is having issues as it won't talk to Filezilla, regardless of the fact that a few days ago it worked fine with the same settings and nothing has changed on my end.   >:(

Crapwise, the ZIP file is also too big to attach to this post.   :(

As if that wasn't bad enough, I lost where I wrote down the password to my FileFront upload account, and I'm having difficulty recovering it.   :P

As soon as I find a good alternate way of getting it in the hands of Mattn and the other devs, I'll post an update.


Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: Normalizing sounds
« Reply #20 on: May 02, 2009, 01:27:56 am »
You could email it.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Normalizing sounds
« Reply #21 on: May 07, 2009, 10:19:27 pm »
Hi Destructavator,

any news for us?  :)

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: Normalizing sounds
« Reply #22 on: May 07, 2009, 11:56:21 pm »
He sent us both a PM. Didn't you read it?

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Normalizing sounds
« Reply #23 on: May 08, 2009, 04:24:36 am »
He sent us both a PM. Didn't you read it?

Actually I believe he did, and then he asked me to try to do some more work on the footsteps, specifically changing the length of the samples and making them OGG instead of WAV.  Sorry if you got left out of the loop for a moment BTAxis, I forgot to post something back in this thread for you and everyone else.

Regarding the samples,

Hi Destructavator,

any news for us?  :)

...I didn't forget about the footsteps and weapon sounds, I have been rather busy with little spare time lately (I haven't had much time trying to get the game to compile with the new libraries and such since my post in the other thread), but I have tomorrow (Friday) off, I'm almost done with the footsteps, and I should have the footsteps ready tonight or tomorrow.  As for the weapon sounds, I'm still working with them, and for now if you want to add any of the "plastic" gunshot sounds I made to the trunk or data source you are welcome to go ahead and do so (GPL license is fine, if that will work, I think some of the other weapons sounds are in some type of GPL license.)

I actually planned in the last few days to record some new footsteps myself, although it turns out I didn't have time, at least until now, but I'll first get to fixing the existing ones.

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Normalizing sounds
« Reply #24 on: May 08, 2009, 05:05:23 am »
http://destructavator.com/92dl/footsteps.zip

OK, here they are, OGG, 44.1Khz, stereo, VBR encoding, all the same length.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Normalizing sounds
« Reply #25 on: May 08, 2009, 06:55:08 am »
thank you very much

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Normalizing sounds
« Reply #26 on: May 17, 2009, 09:37:12 am »
i've finally bought new sounds equipment and noticed that the footstep sounds are still a little bit too loud. i've removed 5db from flesh1.ogg and this came a little closer. what do you think? can (and should) we reduce the volume again?

if yes - how can one do that in a batch? i would like to be able to normalize them all against each other. the best way would be something like mp3gain or vorbisgain (not sure whether they would do the job - but we could use them in a script) to be scriptable, no?

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Normalizing sounds
« Reply #27 on: May 17, 2009, 04:26:39 pm »
i've finally bought new sounds equipment and noticed that the footstep sounds are still a little bit too loud. i've removed 5db from flesh1.ogg and this came a little closer. what do you think? can (and should) we reduce the volume again?

if yes - how can one do that in a batch? i would like to be able to normalize them all against each other. the best way would be something like mp3gain or vorbisgain (not sure whether they would do the job - but we could use them in a script) to be scriptable, no?

OK, first off, to balance the sounds - meaning to have all the sounds play at the right volume in relationship to each other in the game, such as gunshots being louder than footsteps, and death screams somewhere in-between for example, there are two basic methods to get that end-result, although one is better than the other:

1) Have all the *source* sound files balanced so that the C code plays all the sounds through SDL at a volume simply multiplied by a variable for how loud all sound effects are, which is set by the player in the game settings menu.

Or,

2) Have all the sounds normalized at max volume, and during gameplay the game determines the volume to play the sounds via SDL by multiplying *two* variables, one of which is the SFX volume the player sets, another being a hard-coded constant set in the C code for that group of sounds.  So if, for example, the player goes to the options menu, sets SFX volume at 80%, and plays a battle mission, and the footsteps are supposed to be half as loud as gunshots, footsteps sounds are played in the game at 0.80*0.5=40% volume, while gunshots are played at 0.80*1.0=80% volume.  (The middle number is the hard-coded multiplier.)

I would recommend the second option, because in the second case if gameplay testing shows that something is not balanced right, it would be very easy to tweak the code, simply changing the hard-coded variable that multiplies the volume for that group of sounds.  The trial-and-error for balancing all the sounds would take much less time, just changing one value of one line in the C source code.

Yes, there are ways to process the sounds in batch to globally change the volume of each group, the open-source and cross-platform app Audacity can do this, but I would strongly recommend the second of those two options I listed above.

If, on the other hand, the issue is that volume needs to be adjusted within the group (if some footsteps should be louder than other footsteps), this is something that would take more work with the source sound files, but I'm willing to do the work and get back to you on it.

Did I understand the question correctly?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Normalizing sounds
« Reply #28 on: May 17, 2009, 06:25:11 pm »
yes you understood correctly - i will think about the second solution.

but there are still some sounds that are louder (or have more bass - i don't know) than others. see e.g. the grass.ogg in footsteps compared to wood1.ogg

if you could normalize them all to the same level that would be the best imo (and maybe also convert the wav files to ogg vorbis)

and another question:

Code: [Select]
mattn@mattn-desktop:~/dev/ufoai/trunk/base/sound/footsteps$ file wood1.ogg
wood1.ogg: Ogg data, Vorbis audio, stereo, 44100 Hz, ~499821 bps, created by: Xiph.Org libVorbis I

why do your files have such a strange bps rate compared to others?

Code: [Select]
mattn@mattn-desktop:~/dev/ufoai/trunk/base/sound/ambience$ file sparks_short.ogg
sparks_short.ogg: Ogg data, Vorbis audio, stereo, 44100 Hz, ~160000 bps, created by: Xiph.Org libVorbis I

greetings
martin

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Normalizing sounds
« Reply #29 on: May 17, 2009, 07:00:49 pm »
ok, it's implemented now - footstep sounds have a relative volume of 0.3, weapons and geoscape currently have 1.0