calculate sound wave