Page 1 of 1

About in-game music

Posted: Fri Aug 30, 2013 2:03 am
by iperich
I don't know you guys, but for me, music is to a game as... music is to Star Wars, right?

I was wondering if you can put some nice music to oxp's or to the game itself (through a "music oxp" for instance) to be played at some events. Example: when near to a Bar (Random Hits) play some badass mob party tune... or when near to a Rock Hermit asteroid, play some other tune, when being attacked play antoher, etc...

I have a lot of stupid tunes i've composed (i'm a musician), and I would like to try them in the game... I found these "Random Docking Music" and "Hyperradio" OXPs, but i understood that they're not the same I'm asking here. (event-based music)

Can this be done?

Re: About in-game music

Posted: Fri Aug 30, 2013 10:24 am
by JazHaz
Sounds like what you're asking for would be catered for by events music ie Hyperradio. As far as I know you can add your own music to it, I think it needs to be in .ogg vorbis format. Apart from that I can't get more specific as I don't use Hyperradio.

Re: About in-game music

Posted: Fri Aug 30, 2013 1:46 pm
by Svengali
Right. There's no OXP which really offers what you are after, simply because OXPs can't do it properly. What they can is done in the mentioned OXPs and Cabal_Common_Music (see [wiki]Cabal_Common_Library[/wiki]).

Cabal_Common_Music is event driven and probably the only OXP which comes close to your request. It targets missions though and I've never changed it to a more generic working thing (lack of interest for such a mechanism and the somewhat *cough* weak support of music by Oolite stopped me from going further with it).

Re: About in-game music

Posted: Fri Aug 30, 2013 3:08 pm
by Diziet Sma
CommonSenseOTB developed an OXP which apparently did do event-driven music properly.. but most of the music he chose had copyright encumbrances, so he was unable to release it. I discussed it with him, and it seems that finding suitable unencumbered music would be a massive undertaking, so he has shelved the project for the time being.

Re: About in-game music

Posted: Fri Aug 30, 2013 3:29 pm
by metatheurgist
Maybe he could release the framework with some kind of interface that would let players attach whatever music they have on their hard-drives to play on an event. So he's just releasing the skeleton and people can hang whatever they like on it. Legality or otherwise would not then be the responsibility of the oxp.

Re: About in-game music

Posted: Fri Aug 30, 2013 3:40 pm
by Diziet Sma
Unfortunately, he hasn't logged in here since Feb 2 of this year.. I've sent him a PM posing your question, but unless he has email notifications set up, there's a good chance he won't even know there's a message waiting for him.

Re: About in-game music

Posted: Fri Aug 30, 2013 5:13 pm
by Svengali
Diziet Sma wrote:
CommonSenseOTB developed an OXP which apparently did do event-driven music properly..
Currently - for streamed music - we only have 2 methods (.playMusic() and .stopMusic()). .playMusic() does not return anything, there's no way to check if a specific track is playing, no readout for durations, no volume control, no fades, switching tracks is a hard cut. This means a script has absolutely no clue and can't control anything - all it can do is to guess and this will be in a Multi-OXP environment often enough wrong.

Would be interesting if the switch to OpenAL is still on the list for Oolite enhancements...?

Re: About in-game music

Posted: Fri Aug 30, 2013 5:26 pm
by cim
Svengali wrote:
Would be interesting if the switch to OpenAL is still on the list for Oolite enhancements...?
Theoretically, yes, since it would be considerably easier to implement enhancements of any sort to the sound system (even the "easy" ones like volume control) if there weren't two different sound libraries in use.

In practice it's waiting on someone familiar with OpenAL to volunteer to do it.

Re: About in-game music

Posted: Fri Aug 30, 2013 7:15 pm
by iperich
Well... sad to hear that... but anyway, I can release some music tracks in ogg if necesary, I don't give a fsck about the copyrights, etc... I will upload some stuff to Jamendo and show it to you, ok?

Re: About in-game music

Posted: Fri Aug 30, 2013 7:38 pm
by Smivs
iperich wrote:
...I don't give a fsck about the copyrights, etc...
It might be wise to attach a licence though, particularly if you want or expect others to use them. :)

Re: About in-game music

Posted: Fri Aug 30, 2013 7:41 pm
by Cody
I got the impression he was talking about oggifying commercially released music - I'd be very cautious about doing that.

Re: About in-game music

Posted: Fri Aug 30, 2013 8:26 pm
by Diziet Sma
No.. I'm pretty sure iperich was talking about his own music..
iperich wrote:
I have a lot of stupid tunes i've composed (i'm a musician), and I would like to try them in the game...

Re: About in-game music

Posted: Fri Aug 30, 2013 8:27 pm
by Cody
<face/palm>

Re: About in-game music

Posted: Fri Aug 30, 2013 8:28 pm
by Diziet Sma
For those wondering, this is a compilation of what CommonSenseOTB has said about his OXP
CommonSenseOTB wrote:
Wait till you try the experimental event driven music that has been in my addons folder for several months. Different styles of music for each economy type and currently looking at fugues for thargoids. Still a prototype and very experimental but it adds alot to the game and I find I even miss it when it is removed to test other things. Release date: whenever I finally finish it. :lol:
CommonSenseOTB wrote:
CaptSolo wrote:
Sounds great! Will the music cut out with red alert? Wouldn't mind if it doesn't.
Oh, actually it is reactive music. Like a movie, the tracks change either to reflect the mood or enhance the mood of what is going on. The dogfight music with red alert is quite excellent for most of the soundtracks and even switches to a cautionary/panic type of dogfight music when shields and energy go below a certain threshold. My favorites have to be the poor agricultural soundtrack with lots of war drums for combat and odyssey travelling type sounds and the rich industrial soundtrack with fast paced techno for the combat. The soundtrack type of music has been chosen to reflect a kind of similarity with the economy type. It was difficult to find complete sets of music with a similar soundtype that just sound right together and with the correct license to use it in an oxp. There are lots of appropriate fugues that sound good together so I should be able to make a decent thargoid theme that will override the others when needed or in witchspace. Well that's the plan anyway. :roll: :lol:
CommonSenseOTB wrote:
The reactive music oxp has been ready and playing on my HDD for over 4 months. But I can't release it. The creative commons listed music, listed on 2 different websites, was actually copyrighted and not supposed to be there. So, I can't distribute it.

The large version that uses different music which is ok is very much too large and not suitable for this, not like the small version that I can't release.

Sorry guys, looks like I'll have too hunt down some similar music as in the small version but I'm sure it will not be easy and I don't have time right now.

Re: About in-game music

Posted: Fri Aug 30, 2013 8:56 pm
by iperich
Diziet Sma wrote:
No.. I'm pretty sure iperich was talking about his own music..
Indeed.....