new sine function with user defined frequency and amplitude