Home : Tune Toys : MIDI Mixup 
  MIDI Mixup is an interactive toy that takes three MIDI files as input and processes them to produce another MIDI file. You can specify the input files by either selecting a collection (from which a random file will be chosen), or using an explicit URL. The pitch, channel, time, and duration of the notes in the three input files is then used to make a single new output file.

Use pitches from -or-URL:
Use Channel & Time from -or-URL:
Use Duration from -or-URL: 
Maximize Length
 

The algorithm for MIDI Mixup is written in KeyKit, and here's the source code.