Monogame - Content Pipeline (Sound effects)

The content pipeline is very easy to use and so this is not a difficult thing to do, but still it did trip me up a little

I was trying to added sound an didn’t think the format was supported. I thought I had to use a .fx format but in fact the just simply wasn’t the case.

Open the Content manager, write click and add existing item:

.

Once it is added, make sure to change the processor to sound effect, not song. I kept getting an error that it was of the wrong object type when importing in my code.

.

Then its simply a case of calling the Content.Load:

.

Essentially make sure that the and string name is the same as in the content manager and it should all work no problems. With SoundEffects, to use them you should really make an instance of them using the built-in CreateInstance() function. This is also how you can manipulate an individual sound effect’s volume etc.