Skip to content

Commit 9446b74

Browse files
committed
Add sdft test plot #5
1 parent aaf3017 commit 9446b74

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

python/stftpitchshift/main.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from stftpitchshift import StftPitchShift
22
from stftpitchshift import __version__ as version
33
from stftpitchshift.io import read, write
4-
from stftpitchshift.stft import stft, istft, spectrogram
4+
from stftpitchshift.plot import spectrogram
5+
from stftpitchshift.sdft import sdft
6+
from stftpitchshift.stft import stft
57

68
import click
79
import matplotlib.pyplot as plot
@@ -51,9 +53,18 @@ def cent(value): return pow(2, float(re.match('([+,-]?\\d+){1}([+,-]\\d+){0,1}',
5153

5254
for channel in range(channels):
5355

56+
# STFT
5457
framesX = stft(x[:, channel], framesize, hopsize)
5558
framesY = stft(y[:, channel], framesize, hopsize)
5659

60+
# SDFT
61+
# framesX = sdft(x[:, channel], framesize // 2)
62+
# framesY = sdft(y[:, channel], framesize // 2)
63+
64+
# TEST
65+
# framesX = stft(x[:, channel], framesize, hopsize)
66+
# framesY = sdft(x[:, channel], framesize // 2)
67+
5768
figure = plot.figure(f'Channel {channel+1}/{channels}')
5869

5970
spectrogramX = figure.add_subplot(2, 1, 1, title='Input Spectrogram')

0 commit comments

Comments
 (0)