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 5af311b commit cc4917cCopy full SHA for cc4917c
README.md
@@ -1582,8 +1582,7 @@ get_pause = lambda seconds: repeat(0, int(seconds * F))
1582
get_hz = lambda note: round(16.352 * 2 ** (int(note[:2])/12))
1583
parse_n = lambda note: (get_hz(note), 0.25 if note[2] == 'J' else 0.125)
1584
get_note = lambda note: get_wave(*parse_n(note)) if note else get_pause(0.125)
1585
-notes_seq = f'{S1}{S1}{S2}'
1586
-samples_f = chain.from_iterable(get_note(n) for n in notes_seq.split(','))
+samples_f = chain.from_iterable(get_note(n) for n in f'{S1}{S1}{S2}'.split(','))
1587
samples_b = b''.join(struct.pack('<h', int(a * 30000)) for a in samples_f)
1588
simpleaudio.play_buffer(samples_b, 1, 2, F)
1589
```
0 commit comments