Thanks to visit codestin.com Credit goes to github.com
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 98384e8 commit 83ef252Copy full SHA for 83ef252
README.md
@@ -1584,7 +1584,7 @@ get_pause = lambda seconds: repeat(0, int(seconds * F))
1584
get_hz = lambda note: round(16.352 * 2 ** (int(note[:2])/12))
1585
parse_n = lambda note: (get_hz(note), 0.25 if note[2] == 'J' else 0.125)
1586
get_note = lambda note: get_wave(*parse_n(note)) if note else get_pause(0.125)
1587
-notes_seq = f'{S1}{S1}{S2}{S1}{S1}{S2}'
+notes_seq = f'{S1}{S1}{S2}'
1588
samples_f = chain.from_iterable(get_note(n) for n in notes_seq.split(','))
1589
samples_b = b''.join(struct.pack('<h', int(a * 30000)) for a in samples_f)
1590
sa.play_buffer(samples_b, 1, 2, F)
0 commit comments