Add wav writing and test sin wave generator
merge