Advertisement
here2share

# b_wave_pitch.py

Apr 1st, 2020
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. # b_wave_pitch.py
  2.  
  3. import math
  4.  
  5. z = 0
  6. ttt = []
  7. xy = {}
  8. if 1:
  9.     incr = (360.0/255)/2
  10.     while z < 360:
  11.         s = math.cos(math.radians(z))*128+128
  12.         xy[len(xy)] = min(255,int(s))
  13.         z += incr
  14.     t = [xy[z] for z in range(len(xy))]
  15.     ttt.extend(t)
  16.  
  17. ccc = ttt[:]
  18. for i in range(3,len(ttt),3):
  19.     t = [ttt[z] for z in range(0,len(ttt),i)]
  20.     ccc += t
  21. 0
  22.  
  23. ccc = ccc[:1201]
  24. for i in range(len(ccc)):
  25.     print(i, ccc[i])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement