Problems with the design of a MIDI editor
Mixing MIDI files
My MIDI editor HUMidi offers a feature that allows mixing two MIDI
files. You may have experienced that this feature does not always produce
the expected results.
MIDI ist not the best base to start a mix process. The follwing questions
must be answered (this is not a complete list of the problems):
- Can we mix MIDI files with different tempi (Adagio file with an Allegro file)?
- What to do with different tonalities (C major with Bb minor)?
- What to do with different measures (3/4 with 6/8)?
- What to do with anacrusis?
Some of theses questions can be answered in a rather brutal way:
- Different tonalities: MIDI has no mandatory tonality information.
So don't care for tonality
- Different tempi: MIDI has no mandatory tempo information.
So don't care for tempo.
- Different measures: MIDI has no mandatory measure information.
So don't care for measure information.
In fact things are not so simple: instead of not taking are of information like
tempo, tonality, measure I prefer to produce first two clean versions of the
files - i.e. to wipe out all tempo, measure, tonality information and then
to mix the files. As the mixing process can not decide which of these
information should dominate I leave it to the user to reintroduce these
information into the mix result.
There couldbe a special case when tonality, tempo and measure information
could be preserved: when both files are exactly identical in these
parameters. HUMidi at the moment has no solution for this
special case.
The analogy with mixing "normal" audio files should be noticed: a mxing
process for audio files does not take care of tempo, tonality or
measure information simply because audio files (WAVE, MP3 etc.) do not
have these information.
When you mix MIDI files you may however encounter additional problems:
- MIDI files may have different time bases (in MIDI called "division"). It
is thus necessary to normalize the time bases before you mix the files.
- MIDI has no bar information. When you say "mix in file two after
bar 5 / beat 3" then you use information that you (the human user) have
but that is lacking in a MIDI file. Bar/beat information must be reconstructed
in MIDI files - this process can produce errors (see my short article on
the anacrusis problem)
- MIDI has relative (not absolute) time information for the note events.
As the mixing process may introduce new notes in the sequence of the the existing
notes you must modify the time information for the events. This may lead to
unexpected results.
- When you mix two large MIDI files then the resulting mixed file may
show too many tracks. I prefer therefor to mix rather channels than tracks
(channels and tracks are not the same!), i.e. if the first file has
events in channel 5 and the second file also then all events extracted from
both files for channel 5 are combined in the mix file on channel 5 - no
additional track is created.
Kontakt / Contact
If you want to comment this or discuss with me: this is my
mail address