else:
// FIXME: 2012-10-20 18:58:56 by Brian McFee <brm2132@columbia.edu>
// there"s a magic number 2/3 in istft.m ... not sure about this one
window = pad(scipy.signal.hanning(hann_w), n_fft) * 2.0 / 3
pass
// Set the default hop, if it"s not already specified
if hop is None:
hop = int(window.shape[0] / 2 )
pass
x_length = n_fft + (num_frames - 1) * hop
x = numpy.zeros((x_length,))
for b in xrange(0, hop * (num_frames), hop):
ft = d[:, b/hop]
ft = numpy.concatenate((ft, numpy.conj(ft[(n_fft/2 -1):0:-1])), 0)
px = numpy.real(scipy.ifft(ft))
x[b:(b+n_fft)] += px * window
pass
After Change
else:
// FIXME: 2012-10-20 18:58:56 by Brian McFee <brm2132@columbia.edu>
// there"s a magic number 2/3 in istft.m ... not sure about this one
window = pad(scipy.signal.hanning(hann_w) * 2.0 / 3, n_fft)
pass
// Set the default hop, if it"s not already specified
if hop is None:
hop = int(window.shape[0] / 2 )
pass
x_length = n_fft + (num_frames - 1) * hop
x = numpy.zeros((x_length,))
for b in xrange(0, hop * (num_frames), hop):
ft = d[:, b/hop]
ft = numpy.concatenate((ft, numpy.conj(ft[(n_fft/2 -1):0:-1])), 0)
px = numpy.real(scipy.ifft(ft))
x[b:(b+n_fft)] += px * window
pass