|
1 | 1 | from stftpitchshift import StftPitchShift
|
2 | 2 | from stftpitchshift import __version__ as version
|
3 | 3 | 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 |
5 | 7 |
|
6 | 8 | import click
|
7 | 9 | import matplotlib.pyplot as plot
|
@@ -51,9 +53,18 @@ def cent(value): return pow(2, float(re.match('([+,-]?\\d+){1}([+,-]\\d+){0,1}',
|
51 | 53 |
|
52 | 54 | for channel in range(channels):
|
53 | 55 |
|
| 56 | + # STFT |
54 | 57 | framesX = stft(x[:, channel], framesize, hopsize)
|
55 | 58 | framesY = stft(y[:, channel], framesize, hopsize)
|
56 | 59 |
|
| 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 | + |
57 | 68 | figure = plot.figure(f'Channel {channel+1}/{channels}')
|
58 | 69 |
|
59 | 70 | spectrogramX = figure.add_subplot(2, 1, 1, title='Input Spectrogram')
|
|
0 commit comments