We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c13862 commit a9de98dCopy full SHA for a9de98d
README.md
@@ -1574,12 +1574,12 @@ wf.close()
1574
import simpleaudio, math, struct
1575
from itertools import chain, repeat
1576
F = 44100
1577
-S1 = '59♪,57,,59♪,54,,50♪,54,,47♪,,,'
1578
-S2 = '59♪,61,,62♪,61,,62,,59,,61♪,59,,61,,57,,59♪,57,,59,,55,,59♪,,,'
+S1 = '71♪,69,,71♪,66,,62♪,66,,59♪,,,'
+S2 = '71♪,73,,74♪,73,,74,,71,,73♪,71,,73,,69,,71♪,69,,71,,67,,71♪,,,'
1579
get_pause = lambda seconds: repeat(0, int(seconds * F))
1580
sin_f = lambda i, hz: math.sin(i * 2 * math.pi * hz / F)
1581
get_wave = lambda hz, seconds: (sin_f(i, hz) for i in range(int(seconds * F)))
1582
-get_hz = lambda n: 16.352 * 2 ** (int(n) / 12)
+get_hz = lambda n: 8.176 * 2 ** (int(n) / 12)
1583
parse_n = lambda note: (get_hz(note[:2]), 0.25 if len(note) > 2 else 0.125)
1584
get_note = lambda note: get_wave(*parse_n(note)) if note else get_pause(0.125)
1585
samples_f = chain.from_iterable(get_note(n) for n in f'{S1}{S1}{S2}'.split(','))
0 commit comments