Skip to content

Commit 63e52c5

Browse files
committed
Audio
1 parent 8e3fd1a commit 63e52c5

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
@@ -1579,7 +1579,7 @@ S2 = '59♪,61,,62♪,61,,62,,59,,61♪,59,,61,,57,,59♪,57,,59,,55,,59♪,,,'
15791579
sin_f = lambda i, hz: math.sin(i * 2 * math.pi * hz / F)
15801580
get_wave = lambda hz, seconds: (sin_f(i, hz) for i in range(int(seconds * F)))
15811581
get_pause = lambda seconds: repeat(0, int(seconds * F))
1582-
get_hz = lambda note: round(16.352 * 2 ** (int(note[:2])/12))
1582+
get_hz = lambda note: round(16.352 * 2 ** (int(note[:2]) / 12))
15831583
parse_n = lambda note: (get_hz(note), 0.25 if len(note) > 2 else 0.125)
15841584
get_note = lambda note: get_wave(*parse_n(note)) if note else get_pause(0.125)
15851585
samples_f = chain.from_iterable(get_note(n) for n in f'{S1}{S1}{S2}'.split(','))

0 commit comments

Comments
 (0)