[WIP] Contextual Jukebox OXP

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by Cholmondely »

Thank you for this. It works just fine!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by Cholmondely »

arquebus wrote: Fri Dec 10, 2021 10:19 pm
I don't know what I'm going to actually call it... maybe I'll keep it Contextual Jukebox? No idea.
If you have decided on a name for this .oxp, then I can put up a Wiki page for you! And then you can get user rights for the wiki. And then you can edit your page and pulverise it into oblivion!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by arquebus »

Cholmondely wrote: Sun Dec 12, 2021 2:20 am
If you have decided on a name for this .oxp, then I can put up a Wiki page for you! And then you can get user rights for the wiki. And then you can edit your page and pulverise it into oblivion!
I'm going to tinker with it a bit more (probably just make it smaller... nobody needs that many "whoosh" ambient sounds) and then decide on a real name, and then I'll let you know!

I need to come up with a name that is less interesting, if I'm honest. I'd rather reserve "jukebox" for something that the player could control, and mine doesn't (and never will) do that.
Here is my YouTube channel, where I play poorly: Arquebus X
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by arquebus »

Ok so it turns out the oxz doesn't work, at least not in Windows, because I zipped it on my Mac and it created a special folder.

I zip it on Windows but there's a .zip extension I can't figure out how to get rid of. It's hidden.
Here is my YouTube channel, where I play poorly: Arquebus X
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: [WIP] Contextual Jukebox OXP

Post by hiran »

arquebus wrote: Sun Dec 12, 2021 3:22 am
Ok so it turns out the oxz doesn't work, at least not in Windows, because I zipped it on my Mac and it created a special folder.

I zip it on Windows but there's a .zip extension I can't figure out how to get rid of. It's hidden.
ZIP extenion is hidden? That must be one of the 'features' of Windows Explorer.

In the ribbon, go to 'View'. In the 'show/hide' group, select 'File name extensions'.
Sunshine - Moonlight - Good Times - Oolite
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by arquebus »

hiran wrote: Sun Dec 12, 2021 6:40 am
arquebus wrote: Sun Dec 12, 2021 3:22 am
Ok so it turns out the oxz doesn't work, at least not in Windows, because I zipped it on my Mac and it created a special folder.

I zip it on Windows but there's a .zip extension I can't figure out how to get rid of. It's hidden.
ZIP extenion is hidden? That must be one of the 'features' of Windows Explorer.

In the ribbon, go to 'View'. In the 'show/hide' group, select 'File name extensions'.
Aha! Thanks, I'll see if I can get the oxz working correctly tomorrow.
Here is my YouTube channel, where I play poorly: Arquebus X
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: [WIP] Contextual Jukebox OXP

Post by hiran »

arquebus wrote: Sun Dec 12, 2021 7:55 am
hiran wrote: Sun Dec 12, 2021 6:40 am
arquebus wrote: Sun Dec 12, 2021 3:22 am
Ok so it turns out the oxz doesn't work, at least not in Windows, because I zipped it on my Mac and it created a special folder.

I zip it on Windows but there's a .zip extension I can't figure out how to get rid of. It's hidden.
ZIP extenion is hidden? That must be one of the 'features' of Windows Explorer.

In the ribbon, go to 'View'. In the 'show/hide' group, select 'File name extensions'.
Aha! Thanks, I'll see if I can get the oxz working correctly tomorrow.
On top of that I could have a look at your zip file as well and tell you if I see any anomalies.

But what really caught my attention on this thread was that meanwhile I started enjoying the walz docking music. And thought it might be nice if we had more music background for other situations as well. Situations? Maybe silence or a slight whisper in empty space, something picking up when other ships are near, spiking up in alarm mode and climaxing during a dogfight when your health is just above the attacker's health...

Would that match the phrase 'Contextual Jukebox'? Then we have the same thing on mind. And Slartibartfast tried to add more variety to docking sequences, so he might know how to bring more music into Oolite. Probably we should try to work together.
Sunshine - Moonlight - Good Times - Oolite
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by arquebus »

hiran wrote: Sun Dec 12, 2021 3:45 pm
And thought it might be nice if we had more music background for other situations as well. Situations? Maybe silence or a slight whisper in empty space, something picking up when other ships are near, spiking up in alarm mode and climaxing during a dogfight when your health is just above the attacker's health...
There are some events that I didn't use, mainly because it seems like they were more meant for "sound effects" than for music strictly so called.

But it would be great to have even more fine-grained contextual triggers, just as you say: so that the "soundtrack" to your game would be highly context dependent, and it could soften or crescendo as needed, in a much more granular, smooth fashion.

All of which is way above my skill set. :)
Here is my YouTube channel, where I play poorly: Arquebus X
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by Cholmondely »

arquebus wrote: Sun Dec 12, 2021 4:35 pm
hiran wrote: Sun Dec 12, 2021 3:45 pm
And thought it might be nice if we had more music background for other situations as well. Situations? Maybe silence or a slight whisper in empty space, something picking up when other ships are near, spiking up in alarm mode and climaxing during a dogfight when your health is just above the attacker's health...
There are some events that I didn't use, mainly because it seems like they were more meant for "sound effects" than for music strictly so called.

But it would be great to have even more fine-grained contextual triggers, just as you say: so that the "soundtrack" to your game would be highly context dependent, and it could soften or crescendo as needed, in a much more granular, smooth fashion.

All of which is way above my skill set. :)
I agree with both of you. But! Isn't it just super that we have what we have?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: [WIP] Contextual Jukebox OXP

Post by hiran »

Cholmondely wrote: Sun Dec 12, 2021 7:09 pm
arquebus wrote: Sun Dec 12, 2021 4:35 pm
hiran wrote: Sun Dec 12, 2021 3:45 pm
And thought it might be nice if we had more music background for other situations as well. Situations? Maybe silence or a slight whisper in empty space, something picking up when other ships are near, spiking up in alarm mode and climaxing during a dogfight when your health is just above the attacker's health...
There are some events that I didn't use, mainly because it seems like they were more meant for "sound effects" than for music strictly so called.

But it would be great to have even more fine-grained contextual triggers, just as you say: so that the "soundtrack" to your game would be highly context dependent, and it could soften or crescendo as needed, in a much more granular, smooth fashion.

All of which is way above my skill set. :)
I agree with both of you. But! Isn't it just super that we have what we have?
What we have is super. But if there are ideas to push on, why stay where we are?
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: [WIP] Contextual Jukebox OXP

Post by hiran »

arquebus wrote: Sun Dec 12, 2021 4:35 pm
hiran wrote: Sun Dec 12, 2021 3:45 pm
And thought it might be nice if we had more music background for other situations as well. Situations? Maybe silence or a slight whisper in empty space, something picking up when other ships are near, spiking up in alarm mode and climaxing during a dogfight when your health is just above the attacker's health...
There are some events that I didn't use, mainly because it seems like they were more meant for "sound effects" than for music strictly so called.

But it would be great to have even more fine-grained contextual triggers, just as you say: so that the "soundtrack" to your game would be highly context dependent, and it could soften or crescendo as needed, in a much more granular, smooth fashion.

All of which is way above my skill set. :)
Happy to see you on the same track.

I would not give up just because that is beyond my skill set. Somehow my gut feeling is we need to properly dissect the problem to find digestable chunks.

For a programming model I think one metric could be sufficient: The tension factor - I will just call it tension.
The tension would usually degrade towards relaxation, and we could model that as a number slowly going down to zero. But on distinct events the tension would raise. That could be a witchspace misjump, getting attached/shot by another ship etc, etc. So those events would raise the tension by some value.

Now that we have this tension value and maybe the duration since when we have that value we could decide which music to play. From here the art is to have the right soundtrack for all kinds of situations. But when you look at movie soundtracks like https://www.youtube.com/watch?v=_oR0som ... 6A96CB74B1 it seems they compose music for all the different scenes that may occur, and after that the film team chooses the chunks of what to play when.

So we could - as a start - take some classic opera that is free to use, cut some chunks and try to have them playing in a loop - as long as the tension stays on the same threshold. When we find some other tension should be played introduce a transition chunk, then play the target chunk until tension changes again.

Would that be something we could try out?

Edit: To be on the safe side regarding copyright, let's choose music provided by the FMA.
https://freemusicarchive.org/FAQ_For_Videos/
Sunshine - Moonlight - Good Times - Oolite
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by arquebus »

I think we would also need to have some kind of volume control for the music only. Both for the tension effects but also so that we can pick tracks that have different volume levels and then even them out when they play. I was able to get away with using the soundimage.org music because it all has the same sound level, more or less.
Here is my YouTube channel, where I play poorly: Arquebus X
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 532
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by arquebus »

The job would also be easier if, with volume control, we could fade in/out on the fly. That way we could use looping tracks without worrying about them cutting off.
Here is my YouTube channel, where I play poorly: Arquebus X
User avatar
tsoj
Deadly
Deadly
Posts: 199
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Re: [WIP] Contextual Jukebox OXP

Post by tsoj »

arquebus wrote: Mon Dec 13, 2021 4:15 pm
The job would also be easier if, with volume control, we could fade in/out on the fly. That way we could use looping tracks without worrying about them cutting off.
While adding volume control to the JavaScript interface seems quite doable (if I understand correctly how OpenAL is used), we will have to see if the minimal update time of 0.25 seconds for the JavaScript timers is enough to produce a smooth fade out. I have no experience whatsoever in audio programming, so that might turn out fine or not at all. If it doesn't work, this probably has to be done in the core game loop and will involve much more new code.
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: [WIP] Contextual Jukebox OXP

Post by hiran »

tsoj wrote: Tue Dec 14, 2021 12:32 am
arquebus wrote: Mon Dec 13, 2021 4:15 pm
The job would also be easier if, with volume control, we could fade in/out on the fly. That way we could use looping tracks without worrying about them cutting off.
While adding volume control to the JavaScript interface seems quite doable (if I understand correctly how OpenAL is used), we will have to see if the minimal update time of 0.25 seconds for the JavaScript timers is enough to produce a smooth fade out. I have no experience whatsoever in audio programming, so that might turn out fine or not at all. If it doesn't work, this probably has to be done in the core game loop and will involve much more new code.
For now we should have chunks of music. One of the chunk is the repetitive section in the middle. Not too long. Then another one fading in and another one fading out. Plus all the chunks run through a compressor so they should have the same volume. This does nto have to be done on the fly in the game.

Maybe the effects can still be finetuned later - but we could run our first experiments to see if that enhances gameplay at all.
Sunshine - Moonlight - Good Times - Oolite
Post Reply