Shell's Home

May 10, 2012 - 1 minute read - Comments

全部和谐音程表(泛音表)

>>> for i in [(i, j, 12 * math.log(float(j)/i, 2)) for i, j in itertools.permutations([1,2,3,4,5,6], 2) if i < j]: print i

...
(1, 2, 12.0)
(1, 3, 19.019550008653876)
(1, 4, 24.0)
(1, 5, 27.863137138648348)
(1, 6, 31.019550008653873)
(2, 3, 7.019550008653875)
(2, 4, 12.0)
(2, 5, 15.863137138648348)
(2, 6, 19.019550008653876)
(3, 4, 4.980449991346124)
(3, 5, 8.843587129994475)
(3, 6, 12.0)
(4, 5, 3.863137138648348)
(4, 6, 7.019550008653875)
(5, 6, 3.1564128700055254)

Tags: music python thinking

论医 新闻和八卦和概率聚集

comments powered by Disqus