Plotting a Noisy Sine Wave

Learn how to add noise into an audio file and then plot the data.

Adding noise to a sound wave

In this lesson, we’ll generate a sine wave, add noise to it, and then filter the noise. Let’s start with the code.

Frequency is the number of times a wave repeats a second.

frequency = 1000
noisy_freq = 50
num_samples = 48000

The sampling rate of the analog to digital conversion is:

sampling_rate = 48000.0
...