Attenuation of sound waves in drill strings