Writing my own software audio mixer

Hello, all.  My next big project is to write my own software audio mixer, so that I can play multiple audio inputs on a single SourceDataLine.  I need to be able to do the following things with PCM audio data:

  1. Mixing multiple inputs into one 2-channel (left/right) output, maintaining synchronization between the channels
  2. Converting between (or mixing directly) various audio formats (different sample rates/sample sizes/channels)
  3. Changing frequency (pitch)
  4. Changing gain (volume) independently on each channel

    I want to be able to do this in pure Java, completely programatically (i.e. no linking with 3rd-party libraries).  I'm looking for all tips, source code, tutorials, that kind of thing.  I am proficient in several programming languages, so references don't necessarily have to be written specifically for Java.


Have you considered making a JMP plugin?

This could be a great addition to it!