Overlaying audio files at different times and exporting them

Started by
0 comments, last by AmzBee 11 years, 1 month ago

I've built a small Drum Sequencer in XNA. I have used XNA's SoundEffect type for storing the samples and playing them back.

Once a user has created a beat with the sequencer, I want to find a way to take that beat and somehow combine the audio files and save them to a user-defined location as one file. For example, if you make a beat in something like FL Studio you can then save an mp3 or wav file of it. So I have a bunch of samples and they are being played back at certain times, but I want them to then be combined into a new file to save out.

I'm guessing I'll have to use some other audio API for this, but I've never really done much work with audio related programming. Does anyone have an idea of how I could go about this, or what I might need/the concepts behind getting this to work?

Advertisement

You are right, XNA unfortunately doesn't support this sort of functionality, however there are plenty of libraries out there that can help you achieve what you are after. A quick search on Google pointed me to a question asked on Stack Overflow where they suggest BASS.NET maybe a solution to this:

http://stackoverflow.com/questions/6785737/reading-the-system-audio-output-stream

Aimee

We are now on Tumblr, so please come and check out our site!

http://xpod-games.com

This topic is closed to new replies.

Advertisement