updated to allow multiplying the wave value by "amptitude" which is a float