示例#1
0
def set_sizes(pset):
    return [interval(x, y) for x, y in zip(rotate(pset, len(pset) - 1), pset)]
示例#2
0
def interval_tie(pset):
    # return interval of between second-to-last and first, according to Straus.
    return interval(pset[-2], pset[0])
示例#3
0
文件: pcset.py 项目: Jbaud/pyknon
def set_sizes(pset):
    return [interval(x, y) for x,y in zip(rotate(pset, len(pset) - 1), pset)]
示例#4
0
文件: pcset.py 项目: Jbaud/pyknon
def interval_tie(pset):
    # return interval of between second-to-last and first, according to Straus.
    return interval(pset[-2], pset[0])
示例#5
0
 def test_interval(self):
     self.assertEqual(music.interval(3, 4), 11)
     self.assertEqual(music.interval(4, 3), 1)
     self.assertEqual(music.interval(0, 12), 0)
     self.assertEqual(music.interval(1, 10), 3)
     self.assertEqual(music.interval(10, 1), 9)
 def test_interval(self):
     self.assertEqual(music.interval(3, 4), 11)
     self.assertEqual(music.interval(4, 3), 1)
     self.assertEqual(music.interval(0, 12), 0)
     self.assertEqual(music.interval(1, 10), 3)
     self.assertEqual(music.interval(10, 1), 9)