Page 1 of 4
[WIP] Contextual Jukebox OXP
Posted: Fri Dec 10, 2021 10:19 pm
by arquebus
I don't know what I'm going to actually call it... maybe I'll keep it Contextual Jukebox? No idea.
Anyway, this is a placeholder for work I'm going to start tonight digging apart the orchestral music oxp and shoving new guts in. The plan is to add more variation to the music for each event or area, and make the in-space music more "ambient" or "environmental."
EDIT:
Here is the link to version 0.2:
OXP folder:
https://app.box.com/s/453g1khs7a9uephfjglsq6zu4kd2grsu
It's about 115MB. I expect it will get smaller over time as I make more/better decisions about what tracks to include.
The OXZ file is not...right. It fails to load due to a bad manifest? I think it's because I zipped it on a Mac, which creates a special hidden folder. I try to zip it on Windows but I can't figure out how to remove the hidden .zip extension. So for now, OXP folder only.
Re: [WIP] Contextual Jukebox OXP
Posted: Fri Dec 10, 2021 10:22 pm
by arquebus
So here's a question: in the orchestral demo oxp there is the following line:
worldScripts.Lib_Music._addChannel({name:"Rock Hermit",sounds:[
And according to the wiki, this can be done for all station names. Is this essentially matching *any* station with "Rock Hermit" in the name? Or is this a specific station type that is called "Rock Hermit" regardless of what its actual name is?
Re: [WIP] Contextual Jukebox OXP
Posted: Fri Dec 10, 2021 11:11 pm
by tsoj
The "name" parameter basically means the string you get when calling
someShip.name
. To find the exact name for some station, you need to look at the according
shipdata.plist
. For the core stations, you can find this shipdata.plist file somewhere in the
Oolite/oolite.app/Resources/Config/shipdata.plist
. Maybe on Windows this is somewhere else, but probably somewhere similar.
When I look there, I find the following names:
Coriolis Station
Dodecahedron Station
Icosahedron Station
Rock Hermit
Training Station
Every station of type "Rock Hermit" is included in the radio channel, even if to the player it appears to be a station named "Rocky Rock".
Re: [WIP] Contextual Jukebox OXP
Posted: Sat Dec 11, 2021 12:43 am
by arquebus
Got it! So if an OXP adds stations, that will add to the list the game sees, beyond the ones you listed. I'll start with those 5 and then build out as needed.
Re: [WIP] Contextual Jukebox OXP
Posted: Sat Dec 11, 2021 3:56 am
by arquebus
Oh my god it works.
It actually works.
Making my next episode now, with all this lovely music.
Re: [WIP] Contextual Jukebox OXP
Posted: Sat Dec 11, 2021 4:19 am
by Slartibartfast
Hmm .. Jukebox?
i have had a similar idea.
==>>
https://bb.oolite.space/viewtopic.php?p=279837#p279837
meanwhile i have ~100 different songs on docking.....
cheers
matthias
Re: [WIP] Contextual Jukebox OXP
Posted: Sat Dec 11, 2021 4:51 am
by arquebus
Oh that's exciting!
Mine's not really a jukebox, it's just slightly more varied version of the orchestral demo oxp.
Re: [WIP] Contextual Jukebox OXP
Posted: Sat Dec 11, 2021 4:58 am
by arquebus
The OXP is here:
https://app.box.com/s/0pr4nlpjjzb51uwfd6cve5n1602msefr
There are definitely some issues at the moment, mostly involving tracks cutting short. That may be my error (both in track selection and in identifying the durations correctly). I'll have a look at it some time this weekend.
Re: [WIP] Contextual Jukebox OXP
Posted: Sat Dec 11, 2021 1:25 pm
by tsoj
arquebus wrote: ↑Sat Dec 11, 2021 4:58 am
There are definitely some issues at the moment, mostly involving tracks cutting short. That may be my error (both in track selection and in identifying the durations correctly). I'll have a look at it some time this weekend.
This may happen intentionally when some music is playing and then an event happens. Then the current music gets suddenly stopped, and the new music sets in. Unfortunately, when Music gets stopped, it currently can't be made to fade out nicely. This would probably need some changes in the core Oolite code. Or perhaps it's indeed just wrong duration times
.
In case you use any OXP that manipulates the time factor at which the Oolite simulation runs (i.e. speeds up time), then this can also be a cause for music cutting off early. However, as far as I know, you should need to have a trunk version of Oolite for this time factor to be modifiable, so if you don't, then this shouldn't be relevant for you.
In the script, you should put
exitMain
and
exitSun
under
planetOut
, and not under
planetIn
. I think how it is now, both exit categories are just ignored.
Re: [WIP] Contextual Jukebox OXP
Posted: Sat Dec 11, 2021 3:37 pm
by arquebus
tsoj wrote: ↑Sat Dec 11, 2021 1:25 pm
This may happen intentionally when some music is playing and then an event happens. Then the current music gets suddenly stopped, and the new music sets in. Unfortunately, when Music gets stopped, it currently can't be made to fade out nicely. This would probably need some changes in the core Oolite code. Or perhaps it's indeed just wrong duration times
.
I definitely ran into that, but I also ran into situations where there was no event shift - the music really just stopped. For those it's surely a combination of durations and music that was intended to be looping.
In the script, you should put exitMain
and exitSun
under planetOut
, and not under planetIn
. I think how it is now, both exit categories are just ignored.
Ah ok! I'll update that. Orchestral demo oxp didn't have that so I didn't know where to put it.
Re: [WIP] Contextual Jukebox OXP
Posted: Sat Dec 11, 2021 3:40 pm
by arquebus
I updated the script, posted it separately because the whole thing is huge and it's silly to re-download for just a single text file.
https://app.box.com/s/pokymm2b58mn2x1phnf04f38kuq5gnie
Re: [WIP] Contextual Jukebox OXP
Posted: Sat Dec 11, 2021 5:37 pm
by Cholmondely
Would it make more sense to do two separate files: One with the mechanics (for which Library is also needed) and a second with the music (easier to update)?
Re: [WIP] Contextual Jukebox OXP
Posted: Sat Dec 11, 2021 6:04 pm
by arquebus
Probably, but I didn't think of it.
What I will do now, though, is upload two versions: one that's the OXZ file (assuming I did it right), and one that's just the folder. That way people can update parts or whole, as desired.
Here's the (updated) OXZ file:
https://app.box.com/s/bn5effwkuefrulzfml1e7zr8wgg072qm
Here's the (updated) OXP folder:
https://app.box.com/s/453g1khs7a9uephfjglsq6zu4kd2grsu
For this version I recommend just grabbing the OXZ since I ended up renaming some of the files, so the Music folder in the OXP is completely different and the filenames don't necessarily match up. If there are further updates I won't rename files.
I've removed almost all of the looping music. What's left of the looping music I put in a fade in the last few seconds so it's not super jarring. The new OXZ is only about 115MB.
Re: [WIP] Contextual Jukebox OXP
Posted: Sat Dec 11, 2021 8:23 pm
by Cholmondely
arquebus wrote: ↑Sat Dec 11, 2021 6:04 pm
Probably, but I didn't think of it.
What I will do now, though, is upload two versions: one that's the OXZ file (assuming I did it right), and one that's just the folder. That way people can update parts or whole, as desired.
Here's the (updated) OXZ file:
https://app.box.com/s/bn5effwkuefrulzfml1e7zr8wgg072qm
Here's the (updated) OXP folder:
https://app.box.com/s/453g1khs7a9uephfjglsq6zu4kd2grsu
For this version I recommend just grabbing the OXZ since I ended up renaming some of the files, so the Music folder in the OXP is completely different and the filenames don't necessarily match up. If there are further updates I won't rename files.
I've removed almost all of the looping music. What's left of the looping music I put in a fade in the last few seconds so it's not super jarring. The new OXZ is only about 115MB.
Well done you! Downloading now.
Re: [WIP] Contextual Jukebox OXP
Posted: Sat Dec 11, 2021 8:33 pm
by Cody
Welcome to the darkside! Cookies are in the jar!