June 2016
Beginner to intermediate
304 pages
6h 24m
English
We can use NumPy to generate audio signals. As we discussed earlier, audio signals are complex mixtures of sinusoids. So, we will keep this in mind when we generate our own audio signal.
import numpy as np import matplotlib.pyplot as plt from scipy.io.wavfile import write
# File where the output will be saved output_file = 'output_generated.wav'
44100 and a tonal frequency of 587 Hz. The values on the time axis will go from -2*pi to ...