Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Custom music issues - an .OGG question.  (Read 1344 times)

Quemaqua

  • Escaped Lunatic
    • View Profile
Custom music issues - an .OGG question.
« on: January 30, 2009, 12:26:17 pm »

I hope this is the right place to post this.  It seemed the most appropriate even though it doesn't technically relate to a full mod.

Basically, I have occasionally dabbled in tracked music.  A group of friends and I all decided that we're going to make February a Dwarf Fortress month, where we all play the game together at once (mostly to get us all over the hurdle of trying to learn how things work).  To celebrate the epic occasion, a friend of mine made some tilesets, and I myself set to work on making a big piece of tracked music to use as BGM (which I will happily make available here if there's any interest).  It eventually came out as a very dwarfy-sounding 9 minutes of tracked music using some custom samples, and I recorded the output to a .WAV, threw that into Foobar2000, and converted that to .OGG.  Hooray!

So my issue is that this file doesn't seem to play in DF.  The stock music plays fine, and I'm overwriting the correct file, but for some reason the game doesn't like it.  It's confirmed by others that the issue exists on their end as well.  I'm using (I think) the latest version, 0.28.181.40d9, and my .OGG has been tried as a variety of things, but is currently a 2-channel file at 44100 Hz, bitrate of 96.  I've tried lowering various quality values to no avail, and at this point the only thing I can seem to think is that maybe the game doesn't like the length?  Otherwise I can't detect any difference between my file and those included with the game, or those I've downloaded that others have converted for use in the game.

Any help would be very much appreciated, and as stated, if there's actually any interest in the song itself I'm happy to post it up here for general use (though I don't know where the appropriate place to do that would be).

Thanks, and my apologies for all the noobishness.

EDIT - Note also that I did do a metric crap-ton of searching on this issue and came up empty.  Apologies if the information is out there and I just couldn't find it, but I had a cronie working on it as well and neither of us managed to find anything of substance about the problem.
« Last Edit: January 30, 2009, 12:30:42 pm by Quemaqua »
Logged

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: Custom music issues - an .OGG question.
« Reply #1 on: January 30, 2009, 01:40:00 pm »

My guess would be length/file size. I've never tried anything like this, nor have i heard of anyone else trying it.

Personally, i'd take the easy way out and turn off DF's music and use another program in the background. I do that all the time anyway, tho not with any special "DF misic".

I would be interested to hear what you have come up with. I don't think there'd be any objection with using DF File Depot to post it.
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch

Warlord255

  • Bay Watcher
  • Master Building Designer
    • View Profile
Re: Custom music issues - an .OGG question.
« Reply #2 on: January 30, 2009, 02:26:35 pm »

I'd try changing the length to that of the original file; there might be a provision in the code to loop the music every X seconds, where X is hardcoded as the original track's length, rather than loop the song using music-player logic.
Logged
DF Vanilla-Spice Revised: Better balance, more !!fun!!
http://www.bay12forums.com/smf/index.php?topic=173907.msg7968772#msg7968772

LeadfootSlim on Steam, LeadfootSlim#1851 on Discord. Hit me up!

Quemaqua

  • Escaped Lunatic
    • View Profile
Re: Custom music issues - an .OGG question.
« Reply #3 on: January 30, 2009, 03:01:21 pm »

Length is definitely not the issue.  I can swap the title and game music both ways and they play fine.  I also thought it might be the fact that it was stereo, but I note that a couple of the other stock music files in the directory are 2 channel, so that doesn't seem to be the problem either.  I'm going to attempt to cut the file into thirds and convert a third of it, see whether or not that smaller time chunk will play.  If so, length is the problem.

Also, for those who'd like to hear, I uploaded the .OGG itself here, or if you prefer your mod music modular, the original .IT is here.  See if you can identify the musical piece that partially inspired the ending section that starts about 3 quarters in (it was actually another piece suggested by a forum goer here as good BGM for the game).

Will update if I learn anything new of this problem. with the length experiment.

EDIT - Well, damn it.  Apparently file length is the problem.  I chopped it down to 2 minutes and change and it plays just fine.  Granted, people can always just play it in a separate music player, but it's always a little annoying to do so, and I had hoped to integrate it.  I never dreamed there would be a limitation on the length or size of the file.  I wonder why that is?  That seems so arbitrary.
« Last Edit: January 30, 2009, 03:21:26 pm by Quemaqua »
Logged

Jifodus

  • Bay Watcher
  • Resident Lurker
    • View Profile
    • Dwarf Fortress Projects
Re: Custom music issues - an .OGG question.
« Reply #4 on: January 31, 2009, 02:27:22 pm »

EDIT - Well, damn it.  Apparently file length is the problem.  I chopped it down to 2 minutes and change and it plays just fine.  Granted, people can always just play it in a separate music player, but it's always a little annoying to do so, and I had hoped to integrate it.  I never dreamed there would be a limitation on the length or size of the file.  I wonder why that is?  That seems so arbitrary.
I just inspected the code that dealt with sounds, DF doesn't limit the length. I then downloaded renamed the song to the game_title.ogg, aside from a slightly longer load time it works as I'd expect and as best as I can tell plays through completely.

Also, DF doesn't do any sound handling other than telling FMOD to play a sample on repeat.
Logged

Quemaqua

  • Escaped Lunatic
    • View Profile
Re: Custom music issues - an .OGG question.
« Reply #5 on: February 01, 2009, 09:40:13 pm »

Then I am greatly confused.  I'll have to poke at it some more and see if there's something weird happening on my end.  I don't see how that's possible, but I suppose it must be.
Logged

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: Custom music issues - an .OGG question.
« Reply #6 on: February 07, 2009, 04:44:50 pm »

On a related note, the music itself's pretty cool. I like! I haven't tried modding it into my copy of df, but it's rather fitting.

Makes me wish toady'd implement customizeable music sooner.
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch

Quemaqua

  • Escaped Lunatic
    • View Profile
Re: Custom music issues - an .OGG question.
« Reply #7 on: February 07, 2009, 09:55:05 pm »

Thanks!

I haven't had much time to really devote to figuring this out, but I did note that when I copied the music over to song_title.ogg, it didn't play as it seemed to for Jifodus.  So that too is extra perplexing.

I wonder if there's something else I'm missing.  My friend who made the custom tilesets for us to use did a perfectly normal set, but for some reason his wouldn't work in my game.  I got a black screen and nothing else.  This was a reasonably fresh install of the game, too.  Then I deleted the game, unzipped a fresh install again, put the files in... and they worked.  The same thing is happening for another friend of mine, except that for him, he's been trying a fresh extraction of the game every time he copies the files over, and the problem hasn't resolved for him.

EDIT - Okay, so now I feel like a stupid idiot.  Not just an idiot, but a stupid idiot.  I think I figured the issue out.

I didn't realize that 40d9 was like... special.  I'm new to DF, as I think I mentioned as context in the opening post, but I didn't understand what 40d9 was.  I just found out about five minutes ago.  Upon realizing what it was I had actually downloaded (I honestly don't even remember how I found the link), I began to think immediately that the issue was with that, not with DF itself in terms of a "proper" release.  I downloaded the latest official release from the main page, threw my file into the title space, and... bam.  It loads instantly and plays without issue.

Now I'm going to go jump off a bridge.
« Last Edit: February 07, 2009, 10:19:31 pm by Quemaqua »
Logged

Jifodus

  • Bay Watcher
  • Resident Lurker
    • View Profile
    • Dwarf Fortress Projects
Re: Custom music issues - an .OGG question.
« Reply #8 on: February 07, 2009, 11:16:36 pm »

Now I'm going to go jump off a bridge.
Don't do that, I'll get bored if you do.

Also, I admit, I don't use the 0.28.181.40d# versions.  Though you've discovered something interesting.  The song doesn't work in 0.28.181.40d9, which seems to be an issue that should be reported.  I'll have to download it and try it for myself (/me is a programmer and has to prove the bug for himself) to confirm it exists.

Edit: Odd, it seemed to work for me.
« Last Edit: February 07, 2009, 11:19:04 pm by Jifodus »
Logged

Quemaqua

  • Escaped Lunatic
    • View Profile
Re: Custom music issues - an .OGG question.
« Reply #9 on: February 12, 2009, 02:15:58 pm »

Well, then I guess I'm more confused than ever.  I wouldn't guess this has anything to do with my system configuration, but I can't see much left in the way of options.  There seems to be an odd level of inconsistency here.  Something is amiss, but I'll be damned if I can get an inkling as to what.  I suppose it'll have to be left with people more naturally inclined toward this sort of investigation than I.
Logged