How to match a piece of very short audio based on key and pitch to find a piece in a large database that is most similar to it?
well, the "sound" of something depends on a lot of different parameters, which are not all well understood, nor all innumerated.

could be


loudness contour.
brightness contour.
pitch contour.
degree of periodicity vs. inharmonicity.
more parameters that might affect this nebulous thing we call "timbre" (like formant locations or even/odd harmonic ratio).


good luck.