Re: how to calculate a MIDI files's chords?
Friday, February 2, 2007 11:44 PM
What exactly are you asking? Are you trying to determine whether successive note values are close enough in time, to be considered as a single "chord"?
If it's from a real human's performance on a real keyboard, there will always be some random delay involved, between the individual notes of a "chord".
That's one reason why MIDI sucks, because it can't easily represent even musical abstractions as simple as a "chord".
Maybe you'll have to decide on a quantization threshold, where if two successive notes are separated by less than that amount of time, you consider them to be "simultaneous" and thus part of a "chord"? and of course you'll have to experiment with your real data and decide where to set this threshold, depending on the skill of the performer, the expressiveness/rubato nature of the performance, etc.