Any ideas on how to do it?
Read the value from the pot and use that value as an input paramater to the tone function.