First implementation of tone generator