Converting signal example to use cos / sine