Can't get music to work

Oct 11, 2011 at 10:27 PM

Hi

I cant seem to get the music to work.

I see the "music" attribute is set some places in the sample, like in the MainMenu.xml

<Window music="track1,track2">

In the /Audio/Music/ folder I don't see any music files, so my first guess were that only the files were missing.

So, I added a .wav file I had and renamed it to track1...but nothing happened.

I then tried to debug a little, but very quickly realized that i needed to debug the pipeline processors, which isn't easy it seems, so I turned to this forum, as I'm maybe not seem a small thing here, as I guess music is working in the engine?

Thanks in advance.

Developer
Oct 12, 2011 at 3:05 AM
Edited Oct 12, 2011 at 3:08 AM

This is a feature that is in there, but wasn't done as well as I would have liked, and in the end we didn't create Music assets to go with the sample.

To add music, you add the track names as above to Audio/Music/ but you also need to add those as Songs to your content project in Visual Studio. This way the system will compile them properly, and then the Game screen and Main Menu screen should play the listed tracks automatically.

Make sure that the track names in the GUI XML do *not* have file extensions, and the names themselves match the names of the music files. These values are comma separated.

I realise this is inconsistent with how much of the application works, but as I mentioned it was half done, and was unfortunately not a priority. This is something I will rectify in 2.0, where I can drastically change how the music system works, and make asset loading consistent. But if you follow the instructions above, you should be able to get a playlist going for v1.2+, sorry about that.

Oct 12, 2011 at 5:38 AM

Thanks for your quick response - I'll give it a try when I get home :)

Is there a roadmap and schedule for the next release (v2.0?) for this project?

Oct 12, 2011 at 7:12 PM

Hmm, still doesn't work sadly.

I'm playing around with v1.2 (latest release), I'm in the MainMenu.xml, playing with the "music" attribute, which from the start has the value of "track1,track2".

I added a music fil (.wma format) to the Content project in Audio/Music/track1.wma. I checked that it actually set the Content Importer to "WMA Audio File" and the Content Processor to Song - XNA Framework.

So, according to your guidance, I should be on the right track :)

So, I hit F5, game starts and there is no music. The sounds are there, but no music.

I try to change the value of the music attribute to only one track, so now it's music="track1" in the MainMenu.xml - then I get this error:

"Song playback failed. Please verify that the song is not DRM protected. DRM protected songs are not supported for creator games."

The file should be DRM free, so I don't see why it prompts me with this...

I tried with a .wav file too, same error, but I could see in the debugger that is were looking for a .wma file....it should support .wav and .mp3 too right?

Can you help me here...can't get it to work... :(

Oct 12, 2011 at 7:14 PM
Edited Oct 12, 2011 at 7:18 PM

Ok found the error myself :)

The Manifest were missing:

<Capability Name="ID_CAP_MEDIALIB"/>

Works now - it also works with the two tracks, it's just importen both tracks are there and are valid .wma files, else none of them are playing.

Developer
Oct 14, 2011 at 8:43 AM
Qbus wrote:

Thanks for your quick response - I'll give it a try when I get home :)

Is there a roadmap and schedule for the next release (v2.0?) for this project?

Great to hear you fixed it.

There is no roadmap or schedule just yet. I'm trying to plan out a Roadmap for the future (and figure out v2 features from there), whilst working around some other responsibilities that I have right now. I want to use the chance to revamp some parts of 2.0, so in the meanwhile I'll look to fixing the path-finding bugs that exist as v1.3, and then focus on 2.0.

Developer
Oct 16, 2011 at 4:37 AM

I just re-added this in revision 70576, so with that version music will work again. (If added)

Oct 16, 2011 at 7:41 PM

Great to see progress on this project :)

I see you added/fixed other stuff too - great!

Nov 18, 2011 at 4:11 AM

Hi there,

I am having trouble getting music to work also.  I have the most recent version of the source code downloaded, but the songs in the music file won't play.  If I need to add the songs to the content project could you expand a bit on how I would go about doing that?  Thanks

 

Developer
Nov 18, 2011 at 4:21 AM

Hi,

You do need to add the music to the content project. The easiest way to do that is to create the folder inside visual studio (in the content project) and then drag the mp3 file (or wma) into the folder inside visual studio. VS should auto-detect the type and set things up accordingly.

Michael

From: camronnba [email removed]
Sent: Friday, 18 November 2011 4:12 PM
To: Michael Quandt
Subject: Re: Can't get music to work [scripttd:275513]

From: camronnba

Hi there,

I am having trouble getting music to work also. I have the most recent version of the source code downloaded, but the songs in the music file won't play. If I need to add the songs to the content project could you expand a bit on how I would go about doing that? Thanks

Nov 18, 2011 at 4:36 AM

Got it!  Thanks so much for your help.  I gotta say, for this being my first ever game, I couldn't have found a better engine/dev team!  You guys are great!!