doing the work on hw04 for audio synthesizer