Page 1 of 2
Questions about making an audio OXP
Posted: Tue Mar 19, 2013 1:30 pm
by Corny
Hey there,
while my previous attempt to make an audio OXP resulted in letting other people do the work and then acting like a diva for not getting 1000+ instantly and therefore not finishing my own version, I'd like do it properly this time.
However, I'm lacking the answers for the questions "what's scriptable" and "how to script that". One of the main problems I had with making the Crew Sound Pack was that I couldn't get it done that the same event wouldn't be triggered before the sound file of the first even finished playing, which was a bit unfortunate. However, this seems to be possible somehow, at least the sound for scooping works properly in the BGS.
For example, sounds I'd like to make would be different engine sounds for different ships and different conditions. A Ferdy should be much quieter than a Python, and an Anaconda should sound more calm and majestic than an Adder (in my opinion, that is). Also, I'd like to include different engine sounds for damaged or unmaintained ships. Would that be scriptable?
Oh, and higher speed should result in a faster (more high-pitched) engine, but I think Oolite itself can't pitch, right?
Also, as far as I know, Oolite itself can't fade, is that right? iTunes can, but it only does if it's the next item on a playlist, so that wouldn't apply to Oolite starting another song (e.g. transition between condition green and condition red). Plus, it'd be a Mac-only feature.
Re: Questions about making an audio OXP
Posted: Tue Mar 19, 2013 4:09 pm
by Svengali
Corny wrote:For example, sounds I'd like to make would be different engine sounds for different ships and different conditions. A Ferdy should be much quieter than a Python, and an Anaconda should sound more calm and majestic than an Adder (in my opinion, that is).
With BGS it is already possible to use a different set of sounds by simply adding script_info keys in shipdata.plist.
Code: Select all
script_info = {"bgs_engine" = "myEngine.ogg"; "bgs_engineUp" = "myEngineUp.ogg"; "bgs_engineDown" = "myEngineDown.ogg";};
Corny wrote:Also, I'd like to include different engine sounds for damaged or unmaintained ships. Would that be scriptable? Oh, and higher speed should result in a faster (more high-pitched) engine, but I think Oolite itself can't pitch, right?
Also, as far as I know, Oolite itself can't fade, is that right? iTunes can, but it only does if it's the next item on a playlist, so that wouldn't apply to Oolite starting another song (e.g. transition between condition green and condition red). Plus, it'd be a Mac-only feature.
Yep - no pitch, no fades, no volume control. Switching sounds on the fly may result in a somewhat annoying gap. And without a smooth transition between sounds it won't work well.
Re: Questions about making an audio OXP
Posted: Wed Mar 20, 2013 10:20 am
by Corny
Oh, nice! I didn't know that. That does work as a separate oxp, right? So I could make a ship engines-OXP with only the script_info for each ship in the .plist, and it plays nicely with the shipdata.plists of other OXPs?
Re: Questions about making an audio OXP
Posted: Wed Mar 20, 2013 12:14 pm
by Svengali
Corny wrote:Oh, nice! I didn't know that. That does work as a separate oxp, right? So I could make a ship engines-OXP with only the script_info for each ship in the .plist, and it plays nicely with the shipdata.plists of other OXPs?
No. It's a bit more complicated, because script_info entries in shipdata.plist are not merged together, they are overriding each other.
Using it via like_ship or shipdata-overrides.plist is no option, because it may discard existing script_info entries.
And the scriptInfo is read-only, so you can't expand/change it via script.
The option in BGS was added specifically for ship creators. To make it more flexible BGS could check if a playership has script properties with the same name (bgs_engine, bgs_engineUp, bgs_engineDown).
Re: Questions about making an audio OXP
Posted: Wed Mar 20, 2013 1:21 pm
by Corny
Svengali wrote:
The option in BGS was added specifically for ship creators. To make it more flexible BGS could check if a playership has script properties with the same name (bgs_engine, bgs_engineUp, bgs_engineDown).
Does that mean BGS can do that already and I have to tell it to, or that it will be able to do that in the future?
Re: Questions about making an audio OXP
Posted: Wed Mar 20, 2013 1:49 pm
by Svengali
Corny wrote:Does that mean BGS can do that already and I have to tell it to, or that it will be able to do that in the future?
Yes, BGS reads the script_info keys since it was released in 2010.
I'll add the checks for properties for the next version.
Re: Questions about making an audio OXP
Posted: Wed Mar 20, 2013 4:33 pm
by pagroove
Svengali answered a lot of questions already. BGS was indead designed around the principle that it is modular. A plan I had was to make different engine sounds. However looping is tricky so you have to use a good sound editor for it. I use Soundforge but there are tons of audio editors out there.
For making sounds I use various forms/blends of sampling an synthesizers.
The output format of your sound has to be in .ogg. If your source material is in .wav then you can convert it to .ogg with programs such as (win)lame.
Re: Questions about making an audio OXP
Posted: Wed Mar 20, 2013 5:29 pm
by Corny
Thanks for the tips, pagroove. I'm working with Logic Pro 9, so I guess I have enough synthies to work with already.
For converting, I use
Max, which can convert from and to every audio format I've ever heard of - plus a few more. Did I mention it's free and open source?
If anyone is looking for tools, be aware that both of these softwares are mac-only.
Re: Questions about making an audio OXP
Posted: Wed Mar 20, 2013 5:44 pm
by pagroove
For engine sounds a noise generator always comes in handy. If you got a synth with more oscillators then you can provide a low sine on osc1 and a noise generator on osc2 and then blend the sounds. Making sounds at different pitch already gives more variety in engine sounds.
When making sounds it always comes in handy to read about synthesis.
.
Re: Questions about making an audio OXP
Posted: Sun Apr 07, 2013 6:27 pm
by Paradox
Svengali wrote:With BGS it is already possible to use a different set of sounds by simply adding script_info keys in shipdata.plist.
Code: Select all
script_info = {"bgs_engine" = "myEngine.ogg"; "bgs_engineUp" = "myEngineUp.ogg"; "bgs_engineDown" = "myEngineDown.ogg";};
Where do I need to put the sound (.ogg) files when I am setting this up?
Re: Questions about making an audio OXP
Posted: Sun Apr 07, 2013 7:42 pm
by Commander McLane
Paradox wrote:Svengali wrote:With BGS it is already possible to use a different set of sounds by simply adding script_info keys in shipdata.plist.
Code: Select all
script_info = {"bgs_engine" = "myEngine.ogg"; "bgs_engineUp" = "myEngineUp.ogg"; "bgs_engineDown" = "myEngineDown.ogg";};
Where do I need to put the sound (.ogg) files when I am setting this up?
In a folder named "Sounds" in your OXP.
Re: Questions about making an audio OXP
Posted: Wed Jul 03, 2013 8:26 pm
by Corny
Can I influence if a sound is looped? Is the length of a clip fixed?
E.g. I noticed that there's the clip in the BGS that says "scoop active", but it would always start the next loop after "scoop" already, so you hear the "...active" only when the scoop is actually no longer active. So... just making sure, the answers are "No" and "Yes" respectively?
Re: Questions about making an audio OXP
Posted: Wed Jul 03, 2013 8:50 pm
by JensAyton
Corny wrote:Can I influence if a sound is looped? Is the length of a clip fixed?
E.g. I noticed that there's the clip in the BGS that says "scoop active", but it would always start the next loop after "scoop" already, so you hear the "...active" only when the scoop is actually no longer active. So... just making sure, the answers are "No" and "Yes" respectively?
You can loop a sound by using the
loop
or
repeatCount
property of
SoundSource.
The length of a clip is the length of the sound file.
You can play multiple overlapping copies of a sound using multiple sound sources playing the same sound. The BGS scoop case is happening because only one sound source is used for that sound, which is played periodically, and the sound provided is way too long.
Re: Questions about making an audio OXP
Posted: Wed Jul 03, 2013 9:09 pm
by Corny
Ah, that's awesome, thanks! I don't really get the length issue, though.
The length of the clip is the length of the sound file, but still the scoop-sound is too long...? How can it be too long if the length of the sound file defines the length of the clip? Or is it just the scooping interval (which calls the sound again) which is fixed?
Re: Questions about making an audio OXP
Posted: Wed Jul 03, 2013 9:53 pm
by JensAyton
For scooping in particular, the sound is played at a fixed interval using a single sound source.