[sdiy] MIDI bytestream parser
Dave Manley
dlmanley at sonic.net
Wed Nov 17 06:03:59 CET 2010
On 11/16/2010 3:16 PM, Neil Johnson wrote:
> A hash generates a value from a small set of values given a value
from a large set. There are bound to be clashes (multiple input values
hash to the same output value), but in this specific case the sparse
input values do not cause clashes in the output values, so it all works
out nicely :) The end result is the values 0x80, 0x90, 0xA0, 0xB0,
0xC0, 0xD0, 0xE0, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6 and 0xF7
are hashed, without clashing, onto the range 0-15.
Hi Neil,
But what if the output of the hash created collisions?
I suppose you could look for a different hash that was collision
free, or you could let the collision occur, and then sort it
out later.
I guess I answered my own question. :-p
-Dave
More information about the Synth-diy
mailing list