WoW man! Awesome! Even percussion is based on the sample. I have a doubt; Why you use a scale factor 65352 and not 65536 (16 bits) in the Python code?
h is a short. Wikipedia says it's capable of 32767*2 values: (link is only visible to registered users)