Skip to content

Commit

Permalink
Merge pull request #2 from zeyus/dev/tonefix
Browse files Browse the repository at this point in the history
[#1] Fixes tone geneation math.
  • Loading branch information
zeyus committed May 5, 2019
2 parents ec88f42 + 0aca4ab commit ae43324
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PythonBlueBox.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
continue

stream.write(array.array('f',
((volume * math.sin(i / (tone[0] / 100.)) + volume * math.sin(i / (tone[1] / 100.)))
((volume * math.sin(2.0 * math.pi * i * tone[0] / sr) + volume * math.sin(2.0 * math.pi * i * tone[1] / sr))
for i in range(int(sr*length)))).tostring())


Expand Down

0 comments on commit ae43324

Please sign in to comment.