Totally reworked code. Also there is an unexpected problem. The frequency shifts to its new value when it changes. It sounds great, but this is an accident