replaced harmonic generator with one line of ruby functions getting the same result