implement tone function add dac