set amplitude from gain parameter