Skip to content

Commit

Permalink
Add sdft test plot #5
Browse files Browse the repository at this point in the history
  • Loading branch information
jurihock committed Jun 14, 2022
1 parent aaf3017 commit 9446b74
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion python/stftpitchshift/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from stftpitchshift import StftPitchShift
from stftpitchshift import __version__ as version
from stftpitchshift.io import read, write
from stftpitchshift.stft import stft, istft, spectrogram
from stftpitchshift.plot import spectrogram
from stftpitchshift.sdft import sdft
from stftpitchshift.stft import stft

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

for channel in range(channels):

# STFT
framesX = stft(x[:, channel], framesize, hopsize)
framesY = stft(y[:, channel], framesize, hopsize)

# SDFT
# framesX = sdft(x[:, channel], framesize // 2)
# framesY = sdft(y[:, channel], framesize // 2)

# TEST
# framesX = stft(x[:, channel], framesize, hopsize)
# framesY = sdft(x[:, channel], framesize // 2)

figure = plot.figure(f'Channel {channel+1}/{channels}')

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

0 comments on commit 9446b74

Please sign in to comment.