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
# Time-scale modification example (TSM) | |
import numpy as np | |
from dhbw import dasp | |
from sdft import STFT | |
def princarg(x): | |
'''Wraps normalized angles `x`, e.g. divided by 2π, to the interval [−0.5, +0.5).''' |
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
# References: | |
# | |
# 1) Simple and Accurate Frequency to Voltage Converter | |
# https://web.mit.edu/Magic/Public/papers/05491499.pdf | |
# | |
# 2) Recursive RMS (STM32 Implementation) | |
# https://www.youtube.com/watch?v=miUXBXUDJDI | |
# | |
# 3) How do I take the discrete derivative of Cosine, and show that it still equals -Sine? | |
# https://math.stackexchange.com/a/2276816 |
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
# Basic SDFT vs. QDFT showcase based on figures from | |
# "Sliding with a constant Q" by Russell Bradford | |
import matplotlib.pyplot as plot | |
import matplotlib.ticker as ticker | |
import numpy as np | |
from sdft import SDFT | |
from qdft import QDFT |
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
# SDFT network transfer function example according to | |
# "A Fast Guaranteed-Stable Sliding DFT Algorithm" | |
# by Richard Lyons | |
# https://www.dsprelated.com/showarticle/1533.php | |
import matplotlib.pyplot as plot | |
import numpy as np | |
from scipy.fft import fftshift |
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
#!/bin/bash | |
# directory containing multiple miniconda installations | |
MINICONDA=~/Miniconda | |
# turn off case sensitivity | |
casematch=$(shopt -p nocasematch) | |
shopt -s nocasematch | |
# search for matching subfolder inside miniconda directory |
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
import matplotlib.pyplot as plot | |
import numpy as np | |
import scipy.signal as signal | |
class Oscillator: | |
''' | |
Complex harmonic oscillator cos(phi) + 1j * sin(phi). | |
''' |