Creating a frequency function so that we can use the piezo with note frequencies

When someone wants to play the note A, it is common for them to use the
frequency (440) instead of the obscure duty cycle (1136).  This gives a
convenience function to achieve that.