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

Sine tone generated is one octave too low #259

Closed
hweij opened this issue Jan 12, 2024 · 0 comments · Fixed by #260
Closed

Sine tone generated is one octave too low #259

hweij opened this issue Jan 12, 2024 · 0 comments · Fixed by #260

Comments

@hweij
Copy link

hweij commented Jan 12, 2024

When generating a sine tone using "src/utils/sineTone.ts", the tone is one octave too low.

The reason is probably located here:

const angle = hertz * time * Math.PI;

This will give the half angle only. Multiplication factor should be 2 * PI instead of PI:

const angle = hertz * time * 2 * Math.PI;

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

Successfully merging a pull request may close this issue.

1 participant