Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pytta/classes/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ def _crossfade_spectruns(self, a, b, freqLims, freqVector):
f1idx = np.where(freqVector <= f1)[0][-1]
totalSamples = a.shape[0]
xsamples = f1idx - f0idx
win = ss.hanning(2*xsamples)
win = ss.hann(2*xsamples)

rightWin = win[xsamples-1:-1]
fullRightWin = np.concatenate((np.ones(f0idx),
Expand Down
6 changes: 3 additions & 3 deletions pytta/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ def __do_sweep_windowing(inputSweep,
# exact sample where the chirp reaches freqMax [Hz]
freqMaxSample = np.where(freqSweep <= freqMax)
freqMaxSample = len(freqSweep) - freqMaxSample[-1][-1]
windowStart = ss.hanning(2*freqMinSample)
windowEnd = ss.hanning(2*freqMaxSample)
windowStart = ss.hann(2*freqMinSample)
windowEnd = ss.hann(2*freqMaxSample)

# Uses first half of windowStart, last half of windowEnd, and a vector of
# ones with the remaining length, in between the half windows
Expand Down Expand Up @@ -459,7 +459,7 @@ def __do_noise_windowing(inputNoise,
window):
# sample equivalent to the first five percent of noise duration
fivePercentSample = int((5/100) * (noiseSamples))
windowStart = ss.hanning(2*fivePercentSample)
windowStart = ss.hann(2*fivePercentSample)
fullWindow = np.concatenate((windowStart[0:fivePercentSample],
np.ones(int(noiseSamples-fivePercentSample))))
newNoise = (fullWindow * inputNoise.T).T
Expand Down