mirror of
https://github.com/python/cpython.git
synced 2025-08-06 18:08:48 +00:00
Update markov demo.
This commit is contained in:
parent
30fd2bb884
commit
86d38e9ecc
2 changed files with 35 additions and 31 deletions
|
@ -61,7 +61,7 @@ def mkwave(octave):
|
|||
sinewave = ''
|
||||
for i in range(100):
|
||||
val = int(math.sin(math.pi * i * octave / 50.0) * 30000)
|
||||
sinewave = sinewave + chr((val >> 8) & 255) + chr(val & 255)
|
||||
sinewave += chr((val >> 8) & 255) + chr(val & 255)
|
||||
return sinewave
|
||||
|
||||
defaultwave = mkwave(OCTAVE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue