Page 1 of 2

Is randomising the docking music achievable?

Posted: Thu Mar 18, 2010 1:07 pm
by dalek501
Sorry for all the questions I have been posing in other threads recently! In an effort to find this out myself I have been searching the boards and can't come up with anything that actually answers this specifically. There are a number of threads on bringing music into the game on certain events, but that doesn't seem randomised.

I've tried looking through the plists etc. in the resources folder and I can''t find anything that seems to reference the docking music.

Is it as easy (a very subjective term I know!) as creating an OXP with your music folder, with a script and some sort of plist with an array of the track list? Or is the command for docking music hard coded and not reachable.

Its easy enough to change the music to my own preferences, but it would be nice to have a random list. I have thought about doing it for the theme music too although I understand it maybe not the "done thing" to change that. :wink: :D

Posted: Thu Mar 18, 2010 1:16 pm
by JazHaz
Are you using a Mac or PC?

If you use a Mac, then you can use the iTunes integration to play music. I have a PC so I don't know much about it, but I believe you have to set up an Oolite playlist in iTunes and then the game will play from that playlist automatically.

However, for all versions, I think it may be possible to edit the game to add other music tracks in addition to the standard tracks. Then the game would select music randomly from the available tracks. I've not investigated this myself, but maybe someone else has?

Posted: Thu Mar 18, 2010 1:20 pm
by dalek501
I'm using a PC, although I do have iTunes. I understand from the other threads thats Oolite cant control iTunes in windows as yet.

I did wonder if it was just a case of adding more music into the folder, but as there are two bits that are there and you only ever hear one when docking I assume it doesnt randomly pick from that folder.

Posted: Thu Mar 18, 2010 1:21 pm
by JazHaz
There is always the Hyperradio OXP. Not used it myself so I can't advise.

Posted: Thu Mar 18, 2010 1:43 pm
by dalek501
Yeah I did see that, and maybe it will do the job? I had the impression that it didnt quite work in the way I wanted it to? IE. You need to keep going back to the F7 screen to restart a track.

Re: Is randomising the docking music achievable?

Posted: Thu Mar 18, 2010 4:36 pm
by Frame
As to your Question in the header
dalek501 wrote:
Is randomising the docking music achievable?
No not with the current way these things work... you can substitute the docking music with another piece of music, but not so that it will be different each time you activate the docking computer..

Cheers Frame...

Posted: Thu Mar 18, 2010 5:15 pm
by dalek501
Cheers Frame. That saves me time with more digging!

Posted: Thu Mar 18, 2010 9:28 pm
by Kaks
Err... I think I'll have to contradict Frame here:

https://bb.oolite.space/viewtopic.php?t=5914

does mention how to assign more than one sound to a specific event. When that's done, a - hopefully different - random sound should be played every time. Should work OK in 1.73+... :)

Posted: Thu Mar 18, 2010 10:04 pm
by Eric Walch
Kaks wrote:
Edoes mention how to assign more than one sound to a specific event. When that's done, a - hopefully different - random sound should be played every time. Should work OK in 1.73+... :)
That is only the docking sound, heard when docking. Not the music played while being docked as we have on the Mac with i-Tunes integration.

The docking sound is only the break pattern. As code below shows there are 3 events that play the same breakpattern sound.

Code: Select all

	// Tunnel effects
	"[@breakpattern]"				= "breakpattern.ogg";	// Not used directly by game, only by references below.
	"[player-launch-from-station]"	= "[@breakpattern]";
	"[player-dock-with-station]"	= "[@breakpattern]";
	"[player-exit-witchspace]"		= "[@breakpattern]";
But it is easy to attach different sounds to each of the 3 events by an oxp. And since 1.73 those sounds can even be lists of sounds from which a random one is selected on each occasion.

Posted: Fri Mar 19, 2010 10:51 am
by Commander McLane
I guess that Dalek's question is about the Blue Danube, not the docking sound or music to be played whilst docked.

Perhaps the wizards could answer again with regard to this specification?

Posted: Fri Mar 19, 2010 11:08 am
by dalek501
Yeah I suppose what I'd like is to have is a range of different music for docking, which is randomised.

Although I'm very proficient at manual docking, I got in the habit of using instant dock to speed the game up. However that removes the immersive aspect. And so I'd like something to keep that aspect. I like using DC's and range of music would make it that much more interesting maybe?

Perhaps it could be piped into your ship from the station?

"Lave Station control: Please relax and listen to the smoothing sounds of Richard Clayderman as you dock"

That sort of thing...

Although I suppose you wouldnt be able to reference actual artists as if it was for a personal OXP everyone would use their own music.

Posted: Fri Mar 19, 2010 11:12 am
by Commander McLane
One problem with this is of course that the Blue Danube is quite canon in Elite. I don't even know whether the game supports a mechanism to exchange it for another piece of music. It may as well be hard-coded.

But I'm no coder, so I was asking the wizards.

Posted: Fri Mar 19, 2010 11:57 am
by Frame
Kaks wrote:
Err... I think I'll have to contradict Frame here:

https://bb.oolite.space/viewtopic.php?t=5914

does mention how to assign more than one sound to a specific event. When that's done, a - hopefully different - random sound should be played every time. Should work OK in 1.73+... :)
Well what I wrote still stands, however, I forgot to think out side the box, it requires some work around but it would work (in theory)

The process to do it would be:

1. you make a BlueDanube.ogg file that plays nothing, make it about 10 sec long

2. script a timer that detects the activation of the docking computer, and let it start with 1 second delay so that it, stops the file that plays nothing

The scriptevent is named

Code: Select all

this.playerStartedAutoPilot
{
//code to start a timer in 1 second(let oolite start up its own blueDanube)
//code to select a random piece of docking music..
}
3. write a script that randomly selects one of your preferred music pieces for playing..

4. make sure it stops upon docking (it should automaticly though(

5. make sure you have these pieces of music on your OXPs music folder

Cheers Frame..

Posted: Fri Mar 19, 2010 12:00 pm
by DaddyHoggy
Commander McLane wrote:
One problem with this is of course that the Blue Danube is quite canon in Elite.
Praise Be - 2001: A Space Odyssey

:wink:

Posted: Fri Mar 19, 2010 2:26 pm
by dalek501
Well what I wrote still stands, however, I forgot to think out side the box, it requires some work around but it would work (in theory)

The process to do it would be:

1. you make a BlueDanube.ogg file that plays nothing, make it about 10 sec long

2. script a timer that detects the activation of the docking computer, and let it start with 1 second delay so that it, stops the file that plays nothing

The scriptevent is named

Code: Select all

this.playerStartedAutoPilot
{
//code to start a timer in 1 second(let oolite start up its own blueDanube)
//code to select a random piece of docking music..
}
3. write a script that randomly selects one of your preferred music pieces for playing..

4. make sure it stops upon docking (it should automaticly though(

5. make sure you have these pieces of music on your OXPs music folder

Cheers Frame..
You make that sound very easy! I take it that it isn't? Certainly beyond my 'never scripted before' capabilities :lol:

Is there any similar oxp that does you are suggesting for something else that I could examine? With a view to having a go myself? Not that I'm very confident!