Skip to content

Instantly share code, notes, and snippets.

View wayne391's full-sized avatar
🎯
Focusing

Wen-Yi Hsiao wayne391

🎯
Focusing
View GitHub Profile
@endolith
endolith / frequency_estimator.py
Last active October 26, 2024 20:10
Frequency estimation methods in Python
from __future__ import division
from numpy.fft import rfft
from numpy import argmax, mean, diff, log, nonzero
from scipy.signal import blackmanharris, correlate
from time import time
import sys
try:
import soundfile as sf
except ImportError:
from scikits.audiolab import flacread
@bearpelican
bearpelican / Roman2Symbol_test_case.ipynb
Created February 28, 2019 23:26
Chord change after adding: `scale = [s+sec_offset for s in scale]`
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yoyolicoris
yoyolicoris / differentiable_lfilter.py
Last active August 25, 2022 12:59
This lfilter can propogate gradient to filter coefficients.
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchaudio.functional import lfilter as torch_lfilter
from torch.autograd import Function, gradcheck
class lfilter(Function):
@staticmethod