Skip to content
View sunspots_periodogram.py
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 20 2016
"""
from __future__ import division, print_function
import Quandl as q
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
View color_space_curve.py
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 16 2015
"""
from __future__ import division, print_function
from colorpy.colormodels import lab_from_xyz, xyz_from_rgb, rgb_from_irgb
import matplotlib.pyplot as plt
from matplotlib import cm
View diff of phase spectrogram.py
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 03 2016
Show how the time derivative of phase spectrogram is constant, shows the
frequency offset within a bin
"""
from numpy import sin, linspace, pi, abs, angle, diff, unwrap
from numpy.random import randn
View helpful_plots.py
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 08 20:19:58 2016
"""
from __future__ import division, print_function
import matplotlib.pyplot as plt
import numpy as np
from numpy.fft import rfft, rfftfreq
from scipy.signal import get_window
View bessel_zeros.md

R. Parnes (1972) Complex zeros of the modified Bessel function Kn⁢(Z). Math. Comp. 26 (120), pp. 949–953 tabulates all zeros of the principal value of Kn⁡(z), for n=2⁢(1)⁢10 (not checked for OCR errors):

n           R(z)                            ± I(z)
2 -1.2813737976560964788484347943  4.2948496520871968779577284110
3 -1.6817888047458454647221805246  1.3080120322739490396502284389
4 -1.9781618634659070241700412324  2.2043719815468711802301895462
4 -2.6286711679571242189239356978  4.3269664862177846518524769588
5 -2.2186262746398760466991398972  3.1130829449859484932024599078
5 -3.1351328447046434221402224695  1.3038823977137057333868902412
6 -2.4234043880011252372669320326  4.0309615812693082518160866112
View quadratic.cpp
#include "quadratic.h"
#include "utility/dspinst.h"
void AudioSynthWaveformRes::update(void)
{
audio_block_t *block;
uint32_t i, inc;
int32_t ph, modph;
int32_t y, tmp;
uint32_t quadrant;
View resonant.cpp
#include "resonant.h"
#include "utility/dspinst.h"
void AudioSynthWaveformRes::update(void)
{
audio_block_t *block;
uint32_t i;
if (c or s)
{
View readme.md

Distortion is 95 dB THD or so, has fewer frequency components than linear-interpolated LUT, but overall THD level is similar.

Can only go up to fs/6, though, because signed a can only go to Q31 1.0, not 2.0.

Found in http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.84.1650 but didn't work until I combined with http://www.musicdsp.org/showArchiveComment.php?ArchiveID=10

This is even faster, but distorted at low levels: https://gist.github.com/endolith/14bbb3217f9f58248722

Crude timing results (Should have measured with many instances in parallel instead):

View bipolar.py
#!/usr/bin/env python
"""
Copyright 2012 endolith at gmail com
Copyright 2009 Ged Ridgway at gmail com
Translation and modification of
http://www.mathworks.com/matlabcentral/fileexchange/26026-bipolar-colormap
Based on Manja Lehmann's hand-crafted colormap for cortical visualisation
View correction factors.md
1   1.5708
2   1.1107
3   1.0472
4   1.0262
5   1.0166
6   1.0115
Something went wrong with that request. Please try again.