Skip to content

Commit ae43324

Browse files
authored
Merge pull request #2 from zeyus/dev/tonefix
[#1] Fixes tone geneation math.
2 parents ec88f42 + 0aca4ab commit ae43324

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PythonBlueBox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
continue
7575

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

8080

0 commit comments

Comments
 (0)