I made a program for creating my tone but not working good