Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 83ef252

Browse files
committed
Audio
1 parent 98384e8 commit 83ef252

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,7 @@ get_pause = lambda seconds: repeat(0, int(seconds * F))
15841584
get_hz = lambda note: round(16.352 * 2 ** (int(note[:2])/12))
15851585
parse_n = lambda note: (get_hz(note), 0.25 if note[2] == 'J' else 0.125)
15861586
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}'
1587+
notes_seq = f'{S1}{S1}{S2}'
15881588
samples_f = chain.from_iterable(get_note(n) for n in notes_seq.split(','))
15891589
samples_b = b''.join(struct.pack('<h', int(a * 30000)) for a in samples_f)
15901590
sa.play_buffer(samples_b, 1, 2, F)

0 commit comments

Comments
 (0)