Most people rarely realize how extraordinarily easy this is if you have an api to support it, any device that is. get python distrobution and then win32api bindings from say like sourceforge or some place like that. there is an example of reading from a gamepad (ps2 controller) on my website. <a href=“http://sites.google.com/site/abstractind”> [email protected]</a>
as for sound analyses I think fourier transforms are a good start but latency and problematic variances of precision are rooted in the process.
power evaluation(exponential rhythm), deviation matrices and harmonic tables of common materials are all that come to mind other than that good luck.