gb_test2

diff gensine @ 0:cacfa0888410

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 10 Jan 2019 04:16:47 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gensine	Thu Jan 10 04:16:47 2019 +0200
     1.3 @@ -0,0 +1,14 @@
     1.4 +#!/usr/bin/python
     1.5 +
     1.6 +import math
     1.7 +
     1.8 +def main():
     1.9 +    s = 16
    1.10 +    x = 0.0
    1.11 +    dx = 2.0 * math.pi / 256.0
    1.12 +    for i in range(256):
    1.13 +        sx = math.sin(x) * s# + s
    1.14 +        print "\tdb ", int(sx)
    1.15 +        x += dx
    1.16 +
    1.17 +main()