Created
October 14, 2019 23:36
-
-
Save dmastropole/816afeba659e81c70143afc3460b484e to your computer and use it in GitHub Desktop.
Mel Scale
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
# Define function for computing mels | |
def mel_formula(f): | |
return 2595 * np.log(1 + f/700) | |
# Frequency range | |
f_low = 40 | |
f_high = 44100 / 2 # Nyquist frequency | |
f = np.linspace(f_low, f_high) | |
# Plot relationship between frequency and mels | |
plt.plot(f, mel_formula(f)) | |
plt.title('Mel vs. Frequency') | |
plt.xlabel('Frequency (Hz)') | |
plt.ylabel('Mel Scale') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment