Ejemplo n.º 1
0
 def get_line(self):
     #       last_val = self.out[2]
     #       self.out = rfft_to_rgb(data_to_rfft(self.listener.data),last_val)
     data = self.listener.data
     #       red_val = rfft_to_val(data_to_rfft(data),
     #                             freq_range=[5000,10000],gain=255/2000000)
     red_val = 0
     #       blue_val = rfft_to_val(data_to_rfft(data),
     #                              freq_range=[0,100],gain=255/35000)
     blue_val = rfft_to_val(data_to_rfft(data), freq_range=[0, 10000], gain=255 / 1000000)
     self.row = np.roll(self.row, 3)
     self.row.put([0, 1, 2], [red_val, 0, blue_val])
     return bytearray(self.row)
Ejemplo n.º 2
0
 def get_line(self):
     #       last_val = self.out[2]
     #       self.out = rfft_to_rgb(data_to_rfft(self.listener.data),last_val)
     data = self.listener.data
     #       red_val = rfft_to_val(data_to_rfft(data),
     #                             freq_range=[5000,10000],gain=255/2000000)
     red_val = 0
     #       blue_val = rfft_to_val(data_to_rfft(data),
     #                              freq_range=[0,100],gain=255/35000)
     blue_val = rfft_to_val(data_to_rfft(data),
                            freq_range=[0,10000],gain=255/1000000)
     self.row = np.roll(self.row,3)
     self.row.put([0,1,2],[red_val,0,blue_val])
     return bytearray(self.row)
Ejemplo n.º 3
0
 def get_coeffs(self):
     while self.parent_conn.poll():
         self.data = self.parent_conn.recv()
     c = data_to_rfft(self.data)
     self.normalized = [int(abs(i) * self.gain) for i in c]
Ejemplo n.º 4
0
 def get_coeffs(self):
     while self.parent_conn.poll():
         self.data = self.parent_conn.recv()
     c = data_to_rfft(self.data)
     self.normalized = [int(abs(i)*self.gain) for i in c]