Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offset phase in Signal #181

Open
viktaur opened this issue Jan 16, 2024 · 2 comments
Open

Offset phase in Signal #181

viktaur opened this issue Jan 16, 2024 · 2 comments

Comments

@viktaur
Copy link

viktaur commented Jan 16, 2024

Hi, is it currently possible to offset the phase of a Signal (in dasp_signal)?

For example, when defining a sine wave, how could I displace it by x rad?
signal::rate(sample_rate).const_hz(freq).sine()

If this has not yet been implemented, I'm happy to start a PR.

@Smona
Copy link

Smona commented Feb 12, 2024

I tried using Phase.next_phase_wrapped_to to accomplish this, but for some reason I could not get any signals created with the offset phase to generate anything but silence. I would love to see this supported!

@viktaur
Copy link
Author

viktaur commented Feb 27, 2024

I have started a PR #183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants