Fixes to audio attenuation jumps and better sample loop script

fixed