Python/Musical intervals (numpy matplotlib)

This code creates three graphs of musical intervals that deviate from just intonation by a user-selected frequency. The graphs exhibit something analogous to an acoustical beat, except that these beats involve only phase shifts because each wave is a pure sinusoidal. To ensure that all three timescales are identical, it is important that the first graph plotted have the lowest beat frequency (here it is the perfect fifth.)

The code requires numpy and matplotlib. The modules scipy and sound file are called, but may be removed since they are not used in this version of the code. A sample output is shown below:

Code
‎

soundfile and playsound (pip installed packages)
I discoverd that soundfile cannot create large OGG files, probably due their compression. So instead I made WAV files. And I installed playsound so I could hear the interval each time I ran the code. The latest version of the code currently resides at:
 * See Python/Musical intervals (numpy matplotlib)/playsound