Over half a year ago i asked the dev for options regarding positional audio and ambient sounds. Positional audio means that when a ship passed you on the left side, and it emits some engine sound, you will also hear it passing on your left. Basically positional audio is the most important and from it can come ambient sounds.
I don't know what this community's view is on adding more sound too Oolite, but being a sound engineer i see a lot of possibilities. Stations produce ambient sounds, your ship etc. (Hum, metal screech, computer sound, ships internal and external views).
Ahruman said this on the subject:
Ahruman wrote:
.. the sound code is custom. I started on support for positional audio, but the problem lies in making the rest of the game tell the sound code where sounds are supposed to be played… this is a heavy rearchitecting thing, regardless of the underlying sound code..
there is already a way to play specific sounds. playSound. I don't know if it's working on Macs or Linux, but for Windows it is working (Version 1.65 and 1.69.1-test / wav + ogg). I've used it for my own OXP, but it seems that there is no kind of method to control if a specific sound is running (by the way: what means isPlaying? Is it implemeted and how does it work?) and no way to stop or fade something. I've tried playCustomSound but it doesn't work. And missionMusic does not work on Windows.
I would like to see something like a radiostation while STATUS_IN_FLIGHT that chooses songs randomly, but I don't know if there is any chance to control it. Maybe there are other restrictions like memory usage,... And think about that there are a lot of players running Oolite on somewhat slow computers - so all sound files have to be small.
And last but not least the ambience thing. I think it is a good idea using some ambience effects (maybe for the spacer bar and for Equipment-GUIs), but without any control method it will clash with other sounds (mission screens,...).
If Ahruman (or 3rd party) ever programs more abilities for sound emitting in Oolite, i would be glad to help out adding sounds. I'm positive Oolite will have so much more immersive effect on players when there's a audible sense of life to go with the rest of this sublime game.
I'm on the pc myself so if we're missing out on more sound abilities here i feel bad about that..
For what it's worth i'm doing a soundpack for now. Just some sparse sounds to replace most of the basic sounds. It's not much work but when i feel good about it i'll release it.
even if advanced sound support would be a little much at this time without major restructuring, what about adding support for code-activated sounds which can be targeted at specific sound channels?
arukibito ga michi wo erabu no ka, michi ga arukibito wo erabu no deshou ka?
So lets make a test. Download this OXP <removed>, install it, launch from station and press F7 (SYSTEM_DATA_SCREEN). Can you hear it? Please don't forget to post what kind of OS you are using.
Maybe we can find a method that will work for all OS.
So playing a music fike is possible for menu's. Is it also possible to stop it when i.e. another theme starts playing? I did see something mentioned in your code so i guess it works that way too.
Looping sounds is unsupported though afaik, so that option will have to be added or any ambient sound will have to be a long file which is a bad route to take.
Can two sounds play together if you'd were to make another tune play for i.e. menu 6? Will different sound cancel eachother out? So how many sounds can play at the same time?
I have to learn this scripting fast!
Last edited by zeep on Sun Dec 02, 2007 6:05 pm, edited 1 time in total.
I'm really liking this, I wish you well in your endeavours.
Thanks for your answer . But what does it exactly mean? Is it working on your computer and what kind of OS is it? As you can see I'm very interested in finding a solution for that.
zeep wrote:
So playing a music fike is possible for menu's.
Not only for menu's. Take a look in my OXP (localhero thread). There it is used as commsMessage, too.
Is it also possible to stop it when i.e. another theme starts playing? I did see something mentioned in your code so i guess it works that way too.
That is just a prevention. If the player stays on the SYSTEM_DATA_SCREEN (for more than a few secs) he would here more than one song (if there is a definition in descriptions.plist) at the same time. So I've implemented a 'counter' (clock_mins_number doesn't work). And if the same song is started again, that is no problem. The running theme stops and will be restarted. But stopping a running theme? I don't know. There are a lot of routines in the SDL-thing, but I'm no progger at all, so maybe this will end in trial and error .
So I've implemented a 'counter' (clock_mins_number doesn't work).
Works from 1.70 onwards. But the relevant time counter is clock_number anyway, which always worked.
*****
Generally for ambient sound: May I just throw in a quick reminder here, that there is no transmission of soundwaves in vacuum, so, contrary to what we are used to from SF-movies, space is quiet? (Myself I actually play most of the time with sound completely off, but admittedly for other reasons than realism. Has more to do with not waking up wife etc. )
With regards to possible music; I'm thinking lush / easy listening. Fitting the theme, not setting the tone. But ofcourse, different people have different taste so the end user can always disable stuff, even if it's as simple as just deleting some files. Or with a custom(izable) install package. But i'm ahead of myself, first things first, we'll see how everything goes.
Generally for ambient sound: May I just throw in a quick reminder here, that there is no transmission of soundwaves in vacuum, so, contrary to what we are used to from SF-movies, space is quiet? (Myself I actually play most of the time with sound completely off, but admittedly for other reasons than realism. Has more to do with not waking up wife etc. )
True, but I think we can assume we're dealing with highly sophisticated command consoles here, which can use all sorts of gizmos to expand our perceptions (e.g. enabling us to see laser beams, for a start...). If you want to rationalise Star Wars-esque "zhhwhooo" noises as ships fly past, you could imagine a system which was cunningly designed to feed information about the surrounding environment through a variety of sensory channels. Youc cabin could be fitted out with Doolby surround-sound speakers, giving you simulated audible as well as visual information. Maybe even, depending on the species, chemical cues too: if you're an insectoid, a pheromonal squirt onto your antennae from the upper-rear-left, signalling a hostile presence there, might enable you to react far more quickly than visual information only.