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 selecting a collection from which a random file will be chosen. The pitch, channel, time, and duration of the notes in the three input files is then used to make a single new output file.
The algorithm for MIDI Mixup is written in KeyKit, and here's the source code.