This commit is contained in:
cnlohr 2020-05-14 13:59:18 -07:00
parent 7207a8e560
commit 22779c4a69
7 changed files with 234 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
docs/TheoryOfCCDFT/chop.wav Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

View file

@ -0,0 +1,16 @@
import struct
import numpy as np
from scipy import signal as sg
import soundfile as sf
Fs = 44100
freq = 40
chop = 200
samples = 44100
x = np.arange(samples)
y = 10000 * np.sin(2 * np.pi * freq * x / Fs)
c = sg.square(2 * np.pi * chop * x / Fs)
sf.write("chop.wav", (y * c).astype(np.int16), samplerate = Fs)