MP3Mixer

Mp3mixer is a simple system to let you mix multiple mpeg audio streams in real time, with a view to copying the capabilities a DJ will have access to - but obviously without quite the same feedback. The programme is a quick hack which I wrote up ages ago as a front end to mpg123, and really it shows it, but with a bit of practise you can make it do great things. The next step is to integrate it into mp3serv so that the results can be broadcast to the world.

I can't think of much more to say... so download it here.

You might want to look at my mpeg radio braodcasting system or my decidedly more mundane home page

Scott's Mp3 Mixer v0.01

This is a reconstruction of an old piece of software I used to have, the
basic idea is to let you mix 2 audio streams generated from mpeg audio
files with volume and speed control.

The code is basically a wrapper which uses mpg123 to actually decode the
mpeg files to raw audio data. The programme then applies the speed control
and mixes the two audio streams.

Because sustaining the throughput requires a lot of process switching you
need a reasonably high spec machine to keep the audio pipe fed. Because there
is a buffer for talking to the sound card there is a perceptible delay
between hitting a kety and the output changing. It's possible to shrink the
buffer and reduce this delay, but the smaller the buffer the more likley
there will be skips due to the buffer running dry.

This is a quick hack (about an hour and a half) I may improve it...

maybe not.

usage:

You *Need* mpg123 to use this - get it from http://mpg.123.org

compile mpg123 and put it somewhere in your path.
compile the programme.

run it with all the mpeg audio files you want to use on teh command line.

e.g.

./mp3dj ~/mp3/*.mp3

then control overythign from the keyboard.....

'+' - Quit
'1','q','w' - select file for channel 1
'a','z','x' - select file for channel 2
'2' - Start/stop channel 1
's' - Start/stop channel 2
'3','e' - Volume control on channel 1
'd','c' - Volume control on Channel 2
'4','r' - Speed Control on Channel 1
'f','v' - Speed Control on Channel 2
 
 

That's all that's implemented so far.

Notes:
I'm so far too lazy to deal with variable sample rates - 44.1kHz in stereo 16
 bit is all I suuport, if your files are different then they will sound
strange.

The speed control works by skipping samples - not particularyly high quality.

The volume has a smooth clipping algorithm implemented - this means that
single track will show some distortion - but it sounds a lot better when you're
mixing multiple tracks.

Todo:

Command recording - so you don't need to play everyhting live.
interface to mp3serv radio to let you braodcast.
microphone mute to let you speak over recordings.
proper level meter.
TK interface.
Integrate mpg123 code into binary.
rewind/fwd fast.

any ideas?