Change music?

Change music?

Postby fstltna » Fri May 23, 2014 2:27 am

Hi, how can i change the music on my server?
---- https://LugdunonCity.org - portal for the Lugdunon RPG & Lugdunon hosting
---- https://LugdunonCity.org/HostSplash/ - About my Lugdunon hosting
Image
User avatar
fstltna
 
Posts: 155
Joined: Wed May 21, 2014 8:54 am
Location: South San Francisco, CA

Re: Change music?

Postby lugdunon » Fri May 23, 2014 1:15 pm

Hi there!

Are you wanting to add your own music, or change the tracks that currently are available in a given instance?
User avatar
lugdunon
Site Admin
 
Posts: 407
Joined: Tue Nov 05, 2013 5:53 pm

Re: Change music?

Postby fstltna » Fri May 23, 2014 10:35 pm

Change what is already there, for now...

Thx!
---- https://LugdunonCity.org - portal for the Lugdunon RPG & Lugdunon hosting
---- https://LugdunonCity.org/HostSplash/ - About my Lugdunon hosting
Image
User avatar
fstltna
 
Posts: 155
Joined: Wed May 21, 2014 8:54 am
Location: South San Francisco, CA

Re: Change music?

Postby lugdunon » Sat May 24, 2014 12:53 am

Ok, so all music in Lugdunon (and all audio / image / sprite assets for that matter) are loaded from mods. To add new music will require the creation and installation of a mod, which is fairly straightforward. Mods take the form of .jar files, which are simply .zip archives that follow an expected path structure.

You must provide both .ogg and .mp3 (.mp3 may be changing to .m4a very soon however) versions of your audio files.

An example mod, named 'com.fstltna.music', and consisting of a single music track named 'MyMusicTrack' would be structured like this:
Code: Select all
META-INF/
  MANIFEST.MF
com/
  fstltna/
    music/
      MyMusicTrack.mp3
      MyMusicTrack.ogg
      mod.json

The META-INF/MANIFEST.MF file is a plain-text file that must contain the following:
Code: Select all
Manifest-Version: 1.0
Lugdunon-Asset-Provider: true

The com/fstltna/music/mod.json file is a plain-text file containing the mod definition in json format, and might look something like this:
Code: Select all
{
   name       :"FSTLTNA's Music",
   description:"Provides FSTLTNA's musical score in Lugdunon.",
   version    :"0.0.1",
   manifest   :{
      AUD:
      [
         {key:"MUSIC.MY.MUSIC.TRACK",def:"com.fstltna.music.MyMusicTrack"},
      ]
   }
}

Once you have created your mod file structure, zip it up, and rename it to com.fstltna.music.jar. You can then place it into your SERVER-ROOT/dat/world/mods/ directory, then edit the SERVER-ROOT/dat/world/etc/mods.json file to add your mod "com.fstltna.music". NOTE: This step will be changing slightly for 0.6.4, and I will update it next week when the release actually goes out.

Once that is done, you should be able to start up your server and play the new music track in game by typing the following into the chat console and hitting enter:
Code: Select all
/ex game.playMusic("MUSIC.MY.MUSIC.TRACK");

I hope this helps, and tomorrow I will post up instructions on how to make specific tracks play automatically for a give instance.

Cheers,
Chris
User avatar
lugdunon
Site Admin
 
Posts: 407
Joined: Tue Nov 05, 2013 5:53 pm

Re: Change music?

Postby fstltna » Sat May 24, 2014 12:56 am

Thats great, thanks! Ill wait till you post how to autoplay the tracks to try it...
---- https://LugdunonCity.org - portal for the Lugdunon RPG & Lugdunon hosting
---- https://LugdunonCity.org/HostSplash/ - About my Lugdunon hosting
Image
User avatar
fstltna
 
Posts: 155
Joined: Wed May 21, 2014 8:54 am
Location: South San Francisco, CA

Re: Change music?

Postby fstltna » Sat May 24, 2014 8:16 am

Ok, i tried this but i don't seem to get any music playing when i do this, just the default music. I tried 22khz/64kb and 44khz/128kb for the music files. Any more tips?
---- https://LugdunonCity.org - portal for the Lugdunon RPG & Lugdunon hosting
---- https://LugdunonCity.org/HostSplash/ - About my Lugdunon hosting
Image
User avatar
fstltna
 
Posts: 155
Joined: Wed May 21, 2014 8:54 am
Location: South San Francisco, CA

Re: Change music?

Postby fstltna » Fri Jun 06, 2014 1:52 am

Any updates on this? I know you are on vacation so no hurry :) what formats should the music be in, kbps and samp,e rate i mean...
---- https://LugdunonCity.org - portal for the Lugdunon RPG & Lugdunon hosting
---- https://LugdunonCity.org/HostSplash/ - About my Lugdunon hosting
Image
User avatar
fstltna
 
Posts: 155
Joined: Wed May 21, 2014 8:54 am
Location: South San Francisco, CA

Re: Change music?

Postby lugdunon » Fri Jun 06, 2014 4:11 pm

Hey there,

Apologies for not replying before heading out for vacation. I'll be back on Monday and will provide a much more detailed reply.

Current formats are ogg and mp3. MP3 may be replaced by m4a in the future however. Bit and sample rates can be whatever you like, however you should try to find the best balance between size and quality to prevent longer load times.

Cheers,
Chris
User avatar
lugdunon
Site Admin
 
Posts: 407
Joined: Tue Nov 05, 2013 5:53 pm

Re: Change music?

Postby fstltna » Sat Jun 07, 2014 1:13 am

I tried replacing the default audio.music jar file with my own mp3&ogg files, but i dont hear any music when i try it out in the client... Ill wait for your tips...
---- https://LugdunonCity.org - portal for the Lugdunon RPG & Lugdunon hosting
---- https://LugdunonCity.org/HostSplash/ - About my Lugdunon hosting
Image
User avatar
fstltna
 
Posts: 155
Joined: Wed May 21, 2014 8:54 am
Location: South San Francisco, CA

Re: Change music?

Postby lugdunon » Fri Jun 20, 2014 3:10 pm

Could you post your music .jar here, or email it chris@lugdunon.net? I'll take a look at it and see what needs fixing.
User avatar
lugdunon
Site Admin
 
Posts: 407
Joined: Tue Nov 05, 2013 5:53 pm

Next

Return to Ideas

Who is online

Users browsing this forum: No registered users and 12 guests

cron