Created
October 30, 2020 11:56
-
-
Save jarkkojs/f71fde4a28121b5745776cb261ac16ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
from matplotlib import style | |
from scipy import signal | |
import numpy as np | |
FREQUENCY = 440 # A3 | |
RATE = 44100 | |
DURATION = 2 # seconds | |
NR_SAMPLES = DURATION * RATE | |
times = np.linspace(0, 0.1, NR_SAMPLES, endpoint = False) | |
sig = np.sin(2 * np.pi * FREQUENCY * times) | |
plt.plot(sig) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment