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

Tones aren't right. Arithmetic is wrong. #1

Closed
ClydeHoadley opened this issue Apr 27, 2019 · 0 comments · Fixed by #2
Closed

Tones aren't right. Arithmetic is wrong. #1

ClydeHoadley opened this issue Apr 27, 2019 · 0 comments · Fixed by #2

Comments

@ClydeHoadley
Copy link

Your DTMF tones don't sound like they're working right. The tones are going down in frequency as the numbers on the keypad get bigger. The sounds for the number #9 should be higher in frequency than #1, but your program is producing a lower frequency for #9 than for #1. Compare the sounds of the keypad on your cell phone to the sounds produced by your program to see what I mean.

It appears that you've gotten your arithmetic wrong. The arithmetic should look like this:

array.array('f', ((math.sin(2.0math.piitone[0]/sr) + math.sin(2.0math.piitone[1]/sr)) for i in range(int(sr*length)) )).tostring()

zeyus added a commit that referenced this issue May 5, 2019
@zeyus zeyus closed this as completed in #2 May 5, 2019
zeyus added a commit that referenced this issue May 5, 2019
[#1] Fixes tone geneation math.
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