Realtime_PyAudio_FFT
Realtime_PyAudio_FFT copied to clipboard
visualizer.py", line 213, in plot_bars self.prev_screen.set_alpha(self.prev_screen.get_alpha()*self.alpha_multiplier) TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
On windows is get
I had the same issue. It seems like a bug from pygame. My work around was from there(https://stackoverflow.com/questions/21079360/using-surface-copy-sometimes-loses-transparency)
I added .convert_alpha() to the screen.copy() definition. Then it startet working for me
The hole think looks like this now: if self.plot_audio_history: self.prev_screen = self.screen.copy().convert_alpha() self.prev_screen = pygame.transform.rotate(self.prev_screen, 180) self.prev_screen.set_alpha(self.prev_screen.get_alpha() * self.alpha_multiplier)
thank you for your very detailed solution. it works! @KEKKSTANK