========================= Visualize Sound Signals ========================= We will extend the non blocking code for playing audio to visualize the audio signal in real time while playing it. We start with a simple display of the audio signal in matplotlib. For a mono signal we plot $x(t)$. For each buffer (chunk) of data in the audio file we plot the amplitude as function of time. For a stereo signal we plot both the left $x_L(t)$ signal and the right signal $x_R(t)$. .. literalinclude:: read_play_visualize.py :language: python :linenos: