예제 #1
0
 def __init__(self, m, n):
     PanelPattern.__init__(self, m, n)
     self.call_name = 'arSpectrum'
     self.frameCount = 0
     self.frame_sleep_time = 0.0
     self.pix_np = np.zeros([3, self.m, self.n])
     self.volThresh = 0.1
     self.stream = micStream.Stream(fps=40, nBuffers=8)
     self.volumeFilter = music.ExpFilter(0.01,
                                         alpha_rise=0.1,
                                         alpha_decay=0.1)
     self.spectrumFilter = music.ExpFilter(np.zeros_like(self.stream.notes),
                                           alpha_rise=0.3,
                                           alpha_decay=0.3)
예제 #2
0
 def __init__(self, m, n):
     PanelPattern.__init__(self, m, n)
     self.call_name = 'arScroll'
     self.frameCount = 0
     self.frame_sleep_time = 0.0
     self.pix_np = np.zeros([3, self.m, self.n])
     self.stream = micStream.Stream(fps=40, nBuffers=8)
     self.volumeFilter = music.ExpFilter(0.01,
                                         alpha_rise=0.1,
                                         alpha_decay=0.1)
     self.spectrumFilter = music.ExpFilter(np.zeros_like(self.stream.notes),
                                           alpha_rise=0.5,
                                           alpha_decay=0.5)
     self.colorWheel = patternHelpers.getColorWheel(300)
예제 #3
0
 def __init__(self, m, n):
     PanelPattern.__init__(self, m, n)
     self.call_name = 'stripBounce'
     self.frame_sleep_time = 0.0
     self.pix_np = np.zeros([3, self.m, self.n])
     self.filter = music.ExpFilter(np.zeros(self.n),
                                   alpha_rise=0.05,
                                   alpha_decay=0.05)
     self.runnerList = []
     self.runnerList.append(
         patternHelpers.Runner(np.random.randint(1, high=8),
                               np.random.rand() * 0.3 + 0.05, 'r', 30,
                               self.n))
     self.runnerList.append(
         patternHelpers.Runner(np.random.randint(1, high=8),
                               np.random.rand() * 0.3 + 0.05, 'p', 30,
                               self.n))
     self.runnerList.append(
         patternHelpers.Runner(np.random.randint(1, high=8),
                               np.random.rand() * 0.3 + 0.05, 'b', 30,
                               self.n))
     self.runnerList.append(
         patternHelpers.Runner(np.random.randint(1, high=8),
                               np.random.rand() * 0.3 + 0.05, 'g', 30,
                               self.n))
     self.runnerList.append(
         patternHelpers.Runner(np.random.randint(1, high=8),
                               np.random.rand() * 0.3 + 0.05, 'r', 30,
                               self.n))
예제 #4
0
 def __init__(self, m, n):
     PanelPattern.__init__(self, m, n)
     self.call_name = 'arTheoryDemo'
     self.frameCount = 0
     self.frame_sleep_time = 0.0
     self.pix_np = np.zeros([3, self.m, self.n])
     self.stream = micStream.Stream()
     self.volume = music.ExpFilter(0.0, alpha_rise=0.8, alpha_decay=0.3)
     self.keyObj = music.Key(self.stream.notes)
     self.noteSumsObj = music.NoteSums(self.stream.notes)
     self.chordObj = music.Chord(self.stream.notes)