Sound effect OXPs

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Sound effects

Post by Norby »

pagroove wrote:
fade out at the end.
I already tried with a total flat sound file but the clicks remain in this case also so a fade out can not help.
pagroove wrote:
combines the extra sounds by Fritz and the system by Norby as I don't like that the chatter and the in-station ambient sounds are now disabled.
The ambientSounds setting of BGS is enabled at me due to no problem if play the original sound together with the changed ones. So simply enable it in the FG version in the 109. line in engine_sound_fg.js.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Re: Sound effects

Post by pagroove »

I already tried with a total flat sound file but the clicks remain in this case also so a fade out can not help.
Ok. well IMO it is not so bad. It adds to the charm that you hear a kind of broken pitch up or down sound.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
Fritz
---- E L I T E ----
---- E L I T E ----
Posts: 591
Joined: Sun Jul 12, 2015 2:30 pm
Location: Bavaria, Germany
Contact:

Re: Sound effects

Post by Fritz »

Fading won't help, even if it is unnoticed when looping. That's because we stop the sound an a random position for starting the next one. The crackling can occur at starting and ending. We can always start at the right position (when using play() instead of volume change), but we can't always stop at a "zero crossing point", as it is called in Audacity.

And yes, you can probably play BGS and Engine Sound FG together, because turning off the accelerating and decelerating sounds in BGS is a separate switch (I didn't find out yet what else this switch turns off). Leaving the ambient engine sound would just add an additional background noise, but you should keep in mind that the BGS noise is identical to the "high speed" noise in Engine Sound (FG), so that probably would sound strange. I never tried it, because I would have turned of the chatter anyhow... it's sounding very realistic, but it was driving me crazy!

I'll make a test and add a BGS-off switch in the config section for the next version. Probably I'll read the BGS chatter and crowd noise switches, and if they are set to false, I can turn off the engine noise in any case.
"You wouldn't kill me just for a few credits, would you?" – "No, I'll do it just for the fun!"
Fritz
---- E L I T E ----
---- E L I T E ----
Posts: 591
Joined: Sun Jul 12, 2015 2:30 pm
Location: Bavaria, Germany
Contact:

Re: Sound effects

Post by Fritz »

The combination is a little bit louder of course but doesn't sound too bad - much better than I had imagined. It's probably a good idea to increase the maneuvering volume in this case, but it is not really necessary.

Btw, I had to leave the chatter zone to hear the difference! :lol:
"You wouldn't kill me just for a few credits, would you?" – "No, I'll do it just for the fun!"
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Sound effects

Post by Svengali »

Just a quick note. If I recall it right SDL provides max. 32 audio channels...
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: Sound effects

Post by another_commander »

Svengali wrote:
Just a quick note. If I recall it right SDL provides max. 32 audio channels...
Yes, but we are running sound on OpenAL now.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Sound effects

Post by Svengali »

@a_c: Please explain it a bit more in depth. Does it mean that Oolite creates an 'infinite' number of concurrent playing sources (if OXPs do request them) until the machine runs out of memory, the CPU locks or the sound-driver says no? Is it then a hardware specific max number? Or does a mix-down happening?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: Sound effects

Post by another_commander »

On Windows OpenAL (and most likely the other two ports too), we have 256 sound sources by default:255 mono + 1 stereo. In practice we are limited by the hardware though. Some devices provide 32 simultaneous sources, others might be capable of handling more.

This article on stackoverflow.com has some interesting information about this.
Fritz
---- E L I T E ----
---- E L I T E ----
Posts: 591
Joined: Sun Jul 12, 2015 2:30 pm
Location: Bavaria, Germany
Contact:

Re: Sound effects

Post by Fritz »

That's good to know! The experimentary version with 25 sounds playing simultaneously (most of them with volume 0) didn't solve the crackling problem, so my OXP currently uses a maximum of 3 sounds playing together: engines, maneuvering and torus. Then we have the core game sounds: espeak voice, lasers, beeping, incoming laser hits, missile launching and perhaps some other sounds, probably less than 10. So if I add generator or cooler sounds, we would be on the safe side even with a limit of 32.
"You wouldn't kill me just for a few credits, would you?" – "No, I'll do it just for the fun!"
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Sound effects

Post by Svengali »

Indeed - a good article. Thanks a_c .-)
ocz
Deadly
Deadly
Posts: 175
Joined: Tue Nov 10, 2015 1:59 pm

Re: Sound effects

Post by ocz »

Does this (Re: [FIXED] Music and Sound stuttering with OpenAL) affect the above mentioned crackle problems?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: Sound effects

Post by another_commander »

ocz wrote:
Does this (Re: [FIXED] Music and Sound stuttering with OpenAL) affect the above mentioned crackle problems?
As far as I can tell, there is no difference.
Fritz
---- E L I T E ----
---- E L I T E ----
Posts: 591
Joined: Sun Jul 12, 2015 2:30 pm
Location: Bavaria, Germany
Contact:

Re: Sound effects

Post by Fritz »

I uploaded version 1.2 of my not-only-engine-sounds OXP. It includes a system shutdown sound when docking and a continuous torus drive sound (using a modulated engine sound file). I also added a cockpit cooling fan that starts when the cabin temperature begins to rise. It's only a small fan, but the implementation is quite complicated, using three sound files for starting, constant running (looping) and stopping. The same technique could be used to simulate the spinning up, running, and shutting down of a generator or something similar, but you need a sound file that contains all three phases to start with.

(I wonder how the core game uses the single injector sound file for creating a similar effect. Could this be made available for the SoundSource object? It would only (?) need 2 additional properties for starting and stopping offsets.)

I've added a switch to disable the BGS ambient sounds, and these sounds now are left on by default (see postings above). The OXP also includes normalized (louder) sound files using Norby's idea to play the sounds using a lower volume.


PS: This thread should probably be moved to the expansion pack section and the title changed to something like "Sound effect OXPs".
"You wouldn't kill me just for a few credits, would you?" – "No, I'll do it just for the fun!"
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Sound effects

Post by Norby »

Fritz wrote:
This thread should probably be moved to the expansion pack section and the title changed to something like "Sound effect OXPs".
You can change the thread title: press the edit button below your first post.
The best way of move and split requests is the red ! button in the bottom right corner of a post.
User avatar
Amah
---- E L I T E ----
---- E L I T E ----
Posts: 486
Joined: Tue Aug 28, 2012 8:05 pm
Location: aboard the Laenina Crowne - Yasen-N class space freighter
Contact:

Re: Sound effect OXPs

Post by Amah »

concerning cracking (pops and clicks). Don't know how sophisticated the OOlite sound infrastructure is, and I doubt, antialiasing on the fly is possible, but crossfading like on a dj set (two independent voices on the same channel) might help.

something like this.

/ center \
voc1 voc2
---- ----
loop | vol75
loop | vol25
loop | vol50
loop | vol75
vol75| loop
vol50| loop
vol25| loop
vol0 | loop
Amah
Post Reply