Mercurial > hg > pyin
view misc/pitchgenerator.m @ 149:b83e6fbe22cc memory
Update regression tests
author | Chris Cannam |
---|---|
date | Wed, 17 May 2017 15:55:37 +0100 |
parents | ac840042f5f2 |
children |
line wrap: on
line source
f = 50:800; fs = 44100; t = (0:(2*fs))/fs; nFreq = length(f); for iFreq = 1:nFreq f(iFreq) x = zeros(size(t)); for iAdd = 1:100 x = x + cos(2*pi*f(iFreq)*t*iAdd)*0.6^(iAdd-1); if f(iFreq)*iAdd > fs/2 break end end x = x / max(abs(x)); wavwrite(x, fs, sprintf('/Users/matthiasm/data/pyin/simplewavs/%iHz.wav', f(iFreq))); end