views:

294

answers:

2

I'm planning to create a program for manipulating multi-track OGG files, but I don't have any experience with the relevant libraries, so I'm looking for recommendations about which language/library to use for this. I don't really have any preference for the language, I'll happily code it in C, C#, Python, whatever makes things the easiest (or even possible). Perhaps it's even a possibility to automate Audacity somehow?

In terms of requirements, I'm not looking for anything particularly fancy. It will probably be a command-line program, I don't need to be able to play the audio, draw image representations of the waveforms, etc. The program will basically be used as a converter, but I need to do some processing before outputting. That is, I need the ability to programatically remove some tracks, set panning per-track, change track volumes, etc. Nothing too complex, just some basic processing, and then output the result in either MP3 or a format easily converted to MP3, such as WAV.

Any suggestions or general information would be appreciated, thanks.

A: 

Try the BASS Library. it's located at http://www.un4seen.com/bass.html and it does play ogg/wav/mp3 and a whole other bunch of formats. You can convert/join then and do DSP like Compressor/EQ/etc.

Rick Ratayczak
+2  A: 

SoX can do a lot of this stuff, just using command-line scripts.

I've used Python + Audiolab to do more complex audio processing stuff:

from audiolab import oggread, wavwrite

# Read in a file
data, fs, enc = oggread('test.ogg')

# Keep just the first two channels
newdata = data[:,0:2]

# Reduce by -6 dB
newdata *= 0.5

# Write to a new file
wavwrite(data, 'filename.wav', fs, enc)
endolith