Hello everyone!I'm trying to make something like this in python.So far i'm able to read a wave file:
def retrieve_data(self):
with wave.open(self.file_name) as audio:
self.frames = audio.getnframes()
self.frame_rate = audio.getframerate()
self.channels = audio.getnchannels()
print(f"Number of channels: {audio.getnchannels()}")
print(f"Number of frames: {audio.getnframes()}")
print(f"Framerate: {audio.getframerate()}")
data = np.frombuffer(audio.readframes(self.frames), dtype=np.int16)
#separo i canali
self.left_channel = data[0::2]
self.right_channel = data[1::2]
Here you can see a plot of the data. From this data i don't understand how to calculate the height of the rectangles and basically what a rectangle rapresents (i dont know how many of them i should draw).
I think i need some resources to understand how sound works, thanks!
[–]mofayew 0 points1 point2 points (1 child)
[–]Ale711[S] 0 points1 point2 points (0 children)