Since mission screens can add their own background music, doing anything else would very likely generate some horrible clashing sounds with some missions... You could think of it as going inside a phone box when looking at mission screens, something that would tend to muffle out all external sounds...Thargoid wrote:It just seems odd that everything goes quiet when you go to the mission screen, and then comes straight back afterwards.
BGS - The BackgroundSet
Moderators: winston, another_commander
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Yes, probably the last thing we would like toKaks wrote:You could think of it as going inside a phone box when looking at mission screens, something that would tend to muffle out all external sounds...
Scriptupdate to v1.3.1 is online
Changes:
- Script stops looped ambient sound on GUI_SCREEN_LOAD based on timer interval.
- On entering missionscreen it stops music+looped ambient sound (based on timer interval, one after the other). FX part remains (max 9sec) with fadeout to make the 'break' less feelable.
- Between missionscreens no popping in anymore.
- After leaving missionscreen(s) audio comes back.
- Workaround for player died while on status screen
BGS_ScriptUpdateTo1.3.1.zip (6.4KB)
It would be very interesting to get some feedback, specially about the new missionscreen and LOAD screen handling and about the remaining FX part on missionscreens. The used delay for missionscreens should be big enough (300ms) to avoid the popping in (I've tested it with RandomHits and Thargoids new ship), but I'm not sure if it's the case on all machines.
Patches for other soundpacks are available:
- CustomSounds
- Halsis
- Hawksound
Patches for other soundpacks require the original oxp and BGS-A or BGS-M. They can be installed like any other oxp and will use the mechanism in BGS for the jumpcountdowns with it's own files. The idea behind these patches is that the oxps don't have to be changed, they are still working as standalone oxp and the changes are not necessary anymore when Oolite gets new possibilities, because BGS can detect it (and react on this) then. It's future music (he), but who knows .-)
All in all - an excellent OXP that adds a lot to my enjoyment of the game. I could use a little assistance in modifying it though - assuming that's OK...
I found the radio chatter got pretty wearing pretty quickly. My own fault, I know - I just find the sound of the English language playing backwards a little bit disturbing (too much Judas Priest as a young'un )
I *think* I could solve it by making copies of bgs-m_silence.ogg and using these to replace bgs-m_ambi_chatter1.ogg and
bgs-m_ambi_chatter2.ogg , but it occurs me I'm now using CPU time to 'play' silence, rather than just not playing anything at all... (OK - maybe not a huge problem on a capable machine) I also thought - if I could create a load more 'chatter' .oggs and have it select at random from a longer list than just the two provided, that might offset the problem.
The difficulty is - looking at the code in script.js, I can't see how it defines the sounds for radio chatter when entering station or planet/moon aegis - only when still in aegis after launch in this code:
Could Svengali or pagroove help me out? Point me to what I'm missing if nothing else? I'm not a dedicated javascript coder, but I usually find if you stare at a few bits of code long enough, and know how coding works in general, you can figure out most tweaks...
I found the radio chatter got pretty wearing pretty quickly. My own fault, I know - I just find the sound of the English language playing backwards a little bit disturbing (too much Judas Priest as a young'un )
I *think* I could solve it by making copies of bgs-m_silence.ogg and using these to replace bgs-m_ambi_chatter1.ogg and
bgs-m_ambi_chatter2.ogg , but it occurs me I'm now using CPU time to 'play' silence, rather than just not playing anything at all... (OK - maybe not a huge problem on a capable machine) I also thought - if I could create a load more 'chatter' .oggs and have it select at random from a longer list than just the two provided, that might offset the problem.
The difficulty is - looking at the code in script.js, I can't see how it defines the sounds for radio chatter when entering station or planet/moon aegis - only when still in aegis after launch in this code:
Code: Select all
{start:"LAUNCH",type:"withinStationAegis",init:1,muteOn:false,change:0,src:3,sound:["bgs-m_ambi_chatter1.ogg","bgs-m_ambi_chatter2.ogg"]
,cmp:0},
Could Svengali or pagroove help me out? Point me to what I'm missing if nothing else? I'm not a dedicated javascript coder, but I usually find if you stare at a few bits of code long enough, and know how coding works in general, you can figure out most tweaks...
<insert Random Pithy Comment>
Forgot to add - on the subject of generating additional sounds for radio chatter - grab a bunch of clips of NASA radio traffic, ATC chatter and the like. Perhaps pass it through some filters to muffle it somewhat and thus make it impossible to pick out any actual words/phrases so as not to ruin the illusion...
Maybe see if I can get some in other languages too if possible (not sure how easy it is to get radio chatter from the Chinese Space Program, but I've always wondered how I'd do in a suspected-espionage-interrogation scenario )
Pepper it all with a few beeps, boops, pings and chunks of static and 'squelch', and it could sound pretty good... Opinions, anyone?
Maybe see if I can get some in other languages too if possible (not sure how easy it is to get radio chatter from the Chinese Space Program, but I've always wondered how I'd do in a suspected-espionage-interrogation scenario )
Pepper it all with a few beeps, boops, pings and chunks of static and 'squelch', and it could sound pretty good... Opinions, anyone?
<insert Random Pithy Comment>
Yep - here we go.SpitJock wrote:I could use a little assistance in modifying it though - assuming that's OK...
You've found it already .-)SpitJock wrote:The difficulty is - looking at the code in script.js, I can't see how it defines the sounds for radio chatter when entering station or planet/moon aegis - only when still in aegis after launch in this code:Code: Select all
{start:"LAUNCH",type:"withinStationAegis",init:1,muteOn:false,change:0,src:3,sound:["bgs-m_ambi_chatter1.ogg","bgs-m_ambi_chatter2.ogg"] ,cmp:0},
To make it less like a backward masking technique (rock'n'roll), simply replace the files in, or add your files to that array (e.g. sound:["a.ogg","b.ogg","c.ogg","d.ogg",etc.]).
That's it.
The selection is simply a random selection and happens in this.changePlay = function(obj,mode) (around line 316)
Code: Select all
if(typeof(obj.sound)==='object') sound = obj.sound[Math.floor(Math.random()*obj.sound.length)];
In other words, to not play anything change that to:
If it hasn't got any sound: defined it won't play any!
Code: Select all
{start:"LAUNCH",type:"withinStationAegis",init:1,muteOn:false,change:0,src:3,cmp:0},
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Thanks Svengali and Kaks. I believe I can see it now.
Still thinking I might work up a few sound clips of my own rather than leaving it "dead air". I can see that a bit of ATC chatter will add ambience and make the game even more immersive.
At the risk of just being cheeky now - another question. Does it preload the sound resources files or load/unload on the fly after the random selection? I'm thinking, if I feed it about 20 (or more) 45KB (or larger) soundbites, am I going to start choking the thing up?
And lastly - if I do come up with some clips that I'm happy with - anyone interested in trying them out? They won't exactly be recording-studio quality (in fact, deliberately the reverse) but I'm hoping some messing about with Audacity should generate something that sounds half decent.
Still thinking I might work up a few sound clips of my own rather than leaving it "dead air". I can see that a bit of ATC chatter will add ambience and make the game even more immersive.
At the risk of just being cheeky now - another question. Does it preload the sound resources files or load/unload on the fly after the random selection? I'm thinking, if I feed it about 20 (or more) 45KB (or larger) soundbites, am I going to start choking the thing up?
And lastly - if I do come up with some clips that I'm happy with - anyone interested in trying them out? They won't exactly be recording-studio quality (in fact, deliberately the reverse) but I'm hoping some messing about with Audacity should generate something that sounds half decent.
<insert Random Pithy Comment>
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
The file is in fact ATC Chatter but then can you hear: 'take off from runway 27right"." In space that's not very realistic. I therefore suggested to play the sounds backwards.Still thinking I might work up a few sound clips of my own rather than leaving it "dead air". I can see that a bit of ATC chatter will add ambience and make the game even more immersive.
I know we could do a little more. When I have the time I could edit something with my audio editor but I have no time at this moment and this 'chatter' as is is does the job.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
https://bb.oolite.space/viewtopic.php?f=4&t=13709
And a jolly fine idea it is too - not anyone's fault but mine that it freaks me out... That's why I wanted to check I wasn't treading on anyone's toes if I worked up my own set and offered it up to anyone who might be interested.
I've just grabbed a bunch of ATC chat and audio clips from NASA and the former Russian Space Agency, and I think when I've taken out any phrases that break realism ("Uhhh... Houston - we have a problem") there'll be plenty left... I'll work on them when not working on stuff I get paid for...
I might see if I can generate some less human-sounding chatter too, on the assumption that it's hardly fair to expect our insectoid and feline brethren to speak a language for which they're not physiologically adapted...
I've just grabbed a bunch of ATC chat and audio clips from NASA and the former Russian Space Agency, and I think when I've taken out any phrases that break realism ("Uhhh... Houston - we have a problem") there'll be plenty left... I'll work on them when not working on stuff I get paid for...
I might see if I can generate some less human-sounding chatter too, on the assumption that it's hardly fair to expect our insectoid and feline brethren to speak a language for which they're not physiologically adapted...
<insert Random Pithy Comment>
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Just make sure that the material isn't copyrighted (or, to be more precise, is copyrighted in a way that allows you to use it ).SpitJock wrote:I've just grabbed a bunch of ATC chat and audio clips from NASA and the former Russian Space Agency, and I think when I've taken out any phrases that break realism ("Uhhh... Houston - we have a problem") there'll be plenty left...
No preload, no unload too, everything on the fly and it doesn't matter if the array contains a few more entries.SpitJock wrote:Does it preload the sound resources files or load/unload on the fly after the random selection?
But...
...the current version does not change/mix files until a new state is set. And as the chatter sound is looped and the player usually does not stay that long in the station aegis it is a cheap trick. Changing this would not only require to tweak the script, it would also need consistent soundfiles.
But for sure, other oxps can expand the basic set. An example for the chatter could look like:
Code: Select all
this.name = "ExpandBGSChatter_Set01";
this.author = "Me";
this.copyright = "(c)2010-4125 Again Me";
this.description = "Expand BGS chatter";
this.version = "1.0";
this.startUp = function()
{
delete this.startUp;
if(!worldScripts["BGS-M"]){
for(prop in this){if(prop!=='name' && prop!=='version') delete this[prop];}
log(this.name,this.name+': BGS-A or BGS-M not installed. Disabling...');
return;
} else {
if(worldScripts["BGS-M"].startUp) worldScripts["BGS-M"].startUp();
var myChatter = ["ExpandBGSChatter_Set01a.ogg","ExpandBGSChatter_Set01b.ogg"]; // Place your files in this array
var a = worldScripts["BGS-M"].bgsSoundPool;
for(var i=0;i<a.length;i++){
if(a[i].start==="LAUNCH" && a[i].type==="withinStationAegis"){
for(let s=0;s<myChatter.length;s++){
a[i].sound.push(myChatter[s]);
}
break;
}
}
}
}
And I'd really like to 'see' your first OXP.
He doesn't?? I guess you've never had to wait in line while 15 ships dock before you finally get cleared... For the 'instant-dockers' this might be true, but for the manual-dockers the constantly looping chatter does get a bit old.the player usually does not stay that long in the station aegis
A suggested improvement might be to have a whole bunch of individual short chatter, and then occasionally one gets randomly played rather than the continuous looping.
Not sure if you can do it in JS, but is it possible to load files based on a prefix or wildcard? Ie, all files matching "station_aegis_chatter*.ogg" or something? That way you don't have to hard-code them all into the script, and people can easily add/remove them as they please.
Also, on the engine up/down noises, is it possible to only play them -while- the keys are pressed? Or maybe remove them entirely, but affect the volume of the engine noise based on speed? I find the little engine noise quite annoying as I adjust my speed a lot and have currently removed them, but it would still be nice to have some sort of engine feedback. Just a thought.
Apart from these two niggles I really like the way this OXP freshens up the Oolite soundscape, so keep up the nice work
The glass is twice as big as it needs to be.
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Then there's those of us who often loiter in station space, waiting for a free wormhole ride.Micha wrote:He doesn't?? I guess you've never had to wait in line while 15 ships dock before you finally get cleared... :-D For the 'instant-dockers' this might be true, but for the manual-dockers the constantly looping chatter does get a bit old.the player usually does not stay that long in the station aegis
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
He, yes. I'm a instant docker and even if I have to dock manually and there are 15 ships before me, I'm pushing the current docker to the side or force him to fly into the station and tweak my ship in the station .-) Ha, waiting until 15 ships have docked...Micha wrote:He doesn't?? I guess you've never had to wait in line while 15 ships dock before you finally get cleared... For the 'instant-dockers' this might be true, but for the manual-dockers the constantly looping chatter does get a bit old.
Sounds like a plan .-)Micha wrote:A suggested improvement might be to have a whole bunch of individual short chatter, and then occasionally one gets randomly played rather than the continuous looping.
Wildcards? Hmm, no. It's not possible, I think. Have tried it a while ago, but will repeat the tests.Micha wrote:Not sure if you can do it in JS, but is it possible to load files based on a prefix or wildcard? Ie, all files matching "station_aegis_chatter*.ogg" or something? That way you don't have to hard-code them all into the script, and people can easily add/remove them as they please.
Keypresses? Also not possible. The script does not know anything about keypresses or releases, so everything is based on the timer interval and the length of the soundfile. And altering sounds via pitch or volume is not possible too.Micha wrote:Also, on the engine up/down noises, is it possible to only play them -while- the keys are pressed? Or maybe remove them entirely, but affect the volume of the engine noise based on speed? I find the little engine noise quite annoying as I adjust my speed a lot and have currently removed them, but it would still be nice to have some sort of engine feedback. Just a thought.
The problem is that we don't have any control about the volume per channel and it would sound pretty uggly if a sound gets restarted over and over or stopped in the middle of playing. This was the biggest headache for me while writing it and gave Pagroove also a few sleepless nights when he was creating sounds and music. In the end I'm pretty pleased with the result - within the possibilities of the SoundSource class.
But this also means that the soundwork was tricky and required some thinking. The length and volume of the file and the timer interval are important and I've tried to set the interval as high as possible to avoid using too much CPU time. The looped sounds required even more work and every cut/fade have had to be as pretty precise.
Ahruman stated a while ago that he was thinking about switching to OpenAL - maybe this will give us some more options.
Admittedly I've never tried it with sound files, but I would expect it to be possible by building up the filename ("station_aegis_chatter_" + this.chatterNumber + ".ogg" or somesuch, and then using that in the sound file commands? It certainly works with .png files for textures and such, and I wouldn't expect audio files to work much differently?Svengali wrote:Wildcards? Hmm, no. It's not possible, I think. Have tried it a while ago, but will repeat the tests.Micha wrote:Not sure if you can do it in JS, but is it possible to load files based on a prefix or wildcard? Ie, all files matching "station_aegis_chatter*.ogg" or something? That way you don't have to hard-code them all into the script, and people can easily add/remove them as they please.
You do need the correct filename format, but it should work?
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link