Page 1 of 2
Random Sound Selection
Posted: Tue Mar 24, 2009 10:36 pm
by staggerlee
Instead of playing one sound e.g. laserhit.ogg - would it be possible to modify the program to select at random one of a series of sounds (laserhit1.ogg, laserhit2.ogg and so on). Each sound could be marginally different (I would happily provide a detailed sound set of my own making). This would make the sounds far more dynamic, realistic and less tiring to the ear.
If anyone wants to do this, I will make you a huge soundset using some professional equipment I have. I was wokring on a basic soundset replacement, but it occurred to me this would be MUCH better.
(I proposed this in simplfied form a while ago, but noone really indicate whether this would be possible)
Posted: Wed Mar 25, 2009 4:17 am
by Kaks
I haven't double checked it, but I think it's in there already:
replacing
Code: Select all
"[player-laser-hit]" = "laserhits.ogg";
with
Code: Select all
"[player-laser-hit]" = { "laser1.ogg","laser2.ogg","laser3.ogg"};
should do the trick...
....
Posted: Wed Mar 25, 2009 10:52 am
by Lestradae
Looking forwards to staggerlee's huge new soundset then
Posted: Wed Mar 25, 2009 10:48 pm
by staggerlee
Wow.
That'll choose randomly from the laserhits and I can have an unlimited N of different sounds in the brackets?
How do I make an OXP of this? - I can make the soundsets no problem. But I want to be able to make a provisional oxp so I can test it.
Gimme a week or so.
I might even do a couple of themes (minimalist, loud, military, etc)
Has anyone taken advantage of this yet? All the replacement soundsets seem very basic.
Cheers!
Posted: Wed Mar 25, 2009 11:35 pm
by Cmd. Cheyd
Never tried hacking a plist before, so maybe it's something I wrong, but I just tried this with a negative result.
plist Excert:
Code: Select all
"[player-laser-miss]" = { "laser.ogg","Electrolaser.ogg"};
Log File:
[plist.parse.foundation.failed]: Failed to parse AddOns/Hawksound.oxp/Config/customsounds.plist as a property list using Foundation. Retrying using homebrew parser. WARNING: the homebrew parser is deprecated and will be removed in a future version of Oolite.
Parse failed at line 70 (char 3145) - unexpected character (wanted '=')
[plist.homebrew.parseError]: Property list isn't in XML format, homebrew parser can't help you.
Posted: Thu Mar 26, 2009 12:02 am
by Griff
i don't know what i'm on about, but things like the exhaust list in the shipdata.plist use the round brackets ( and ) instead of the curly ones, eg
Code: Select all
exhaust = (
"10.7601 6.3008 -31.8587 6.3 5.6 9.0",
"10.7601 6.3008 -31.8587 3.0 3.0 6.0",
"-10.7601 6.3008 -31.8587 6.3 5.6 9.0",
"-10.7601 6.3008 -31.8587 3.0 3.0 6.0",
);
could it be that causing the error?
does this work:
Code: Select all
"[player-laser-miss]" = ("laser.ogg", "Electrolaser.ogg");
Posted: Thu Mar 26, 2009 1:32 am
by Kaks
Oops! What Griff says!
Apart from my wrong use of brackets, the option isn't yet there in 1.72.
I'm enabling it now, & will commit the change to trunk asap!
Posted: Thu Mar 26, 2009 1:57 am
by staggerlee
SIgh.
Let me know when it's ready to go - in the meantime I will release a standard soundset. Do I just release the oggs or is there a fancy way to make an OXP (I have no idea how to make an OXP)
Cheers.
Posted: Thu Mar 26, 2009 2:34 am
by Kaks
Ok, it now works as expected with lines like
Code: Select all
"[player-laser-miss]" = ("[@witchabort]","laser.ogg","boop.ogg");
inside customsounds.plist.
For the time being, you'd have to compile Oolite from source to test the new sound options properly, though: unfortunately there's still quite a lot of bugs that need squashing before we can release 1.73.
staggerlee, all you need for a custom sounds oxp is :
a folder called something like 'newsounds.oxp'. Inside that folder, you need to have two folders, one called 'Sounds', the other called 'Config'. Inside Config you need a file called
'customsounds.plist'
You can copy the customsounds.plist file found inside Resources into your own oxp as a starting point, then put all the new sounds inside your oxp's Sounds folder. Have a look inside the existing sound packs to see what I mean.
PS: if you're on a mac, 'something-or-other.oxp' will look like a file, not a directory. If you display its contents from the context menu you'll be able to use it as a directory again... If it's all a bit too much, you can still package the new sounds & customsounds.plist in a zip file, and I'm sure we can help making it into a 'proper' OXP!
Posted: Thu Mar 26, 2009 12:55 pm
by staggerlee
cool I'll get on it. I'll trust that you guys will release 1.73 soon enough and just make the oxp anyway.
Posted: Thu Mar 26, 2009 1:13 pm
by another_commander
staggerlee wrote:cool I'll get on it. I'll trust that you guys will release 1.73 soon enough and just make the oxp anyway.
Depends on how you interpret "soon enough"
Posted: Thu Mar 26, 2009 3:51 pm
by staggerlee
another_commander wrote:staggerlee wrote:cool I'll get on it. I'll trust that you guys will release 1.73 soon enough and just make the oxp anyway.
Depends on how you interpret "soon enough"
I'm giving you 3 months after which I will instruct my counsel to sue for breach of contract
Posted: Mon Mar 30, 2009 2:43 am
by staggerlee
Guys.
I have a replacement soundset for the standard sounds. Only problem is afterburner1 - the game loops the sample to make a continuous engine sound, but unless you know the specific loop time it clips and pops at the loop point. How have other sound engineers dealt with this problem?
Otherwise I can upload these sounds for criticism before I make an oxp.
Cheers.
Posted: Mon Mar 30, 2009 6:58 am
by Kaks
If IIRC, the afterburner sound starts with a few milliseconds of silence, ramps up smoothly, then ramps down at the same rate to end with a few milliseconds of silence again. Silence + silence doesn't produce any pops!
It's all white/pink noise, so not immediately obvious, but it's basically a pulse...
PS: wow, does it mean you've already got alternate laser sounds, etc? That was quick!
Posted: Tue Mar 31, 2009 1:22 pm
by staggerlee
Laser sounds = basic wave + rapid pitch shift envelope + mild delay + distortion + phaser. Synth that in about 3 minutes.
Explosions take a bit longer - lots of snare drum samples played at various speeds, distorted and patched and reverbed. Maybe 30 mins of tinkering to get a good one.
This is only a basic soundset (i.e. one sound for each event) but I want feedback before I turn it into a dynamic soundset.
Will post in few days after some school work I have to do