Random Sound Selection
Moderators: winston, another_commander
- staggerlee
- Competent
- Posts: 48
- Joined: Thu Apr 13, 2006 2:24 am
- Location: South Surrey, BC
Random Sound Selection
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)
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)
I haven't double checked it, but I think it's in there already:
replacing
with
should do the trick...
replacing
Code: Select all
"[player-laser-hit]" = "laserhits.ogg";
Code: Select all
"[player-laser-hit]" = { "laser1.ogg","laser2.ogg","laser3.ogg"};
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- staggerlee
- Competent
- Posts: 48
- Joined: Thu Apr 13, 2006 2:24 am
- Location: South Surrey, BC
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!
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!
- Cmd. Cheyd
- ---- E L I T E ----
- Posts: 934
- Joined: Tue Dec 16, 2008 2:52 pm
- Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...
Never tried hacking a plist before, so maybe it's something I wrong, but I just tried this with a negative result.
plist Excert:
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.
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.
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
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
could it be that causing the error?
does this work:
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",
);
does this work:
Code: Select all
"[player-laser-miss]" = ("laser.ogg", "Electrolaser.ogg");
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!
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!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- staggerlee
- Competent
- Posts: 48
- Joined: Thu Apr 13, 2006 2:24 am
- Location: South Surrey, BC
Ok, it now works as expected with lines like
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!
Code: Select all
"[player-laser-miss]" = ("[@witchabort]","laser.ogg","boop.ogg");
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!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- staggerlee
- Competent
- Posts: 48
- Joined: Thu Apr 13, 2006 2:24 am
- Location: South Surrey, BC
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
- staggerlee
- Competent
- Posts: 48
- Joined: Thu Apr 13, 2006 2:24 am
- Location: South Surrey, BC
- staggerlee
- Competent
- Posts: 48
- Joined: Thu Apr 13, 2006 2:24 am
- Location: South Surrey, BC
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.
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.
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!
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!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- staggerlee
- Competent
- Posts: 48
- Joined: Thu Apr 13, 2006 2:24 am
- Location: South Surrey, BC
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
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