From 378b23fd53487b7f6ceb47e0622929293fadd0b9 Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Sat, 13 Mar 2010 12:12:46 +0100 Subject: [PATCH] Boh, sono scemo. --- Filtering/Filtering.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Filtering/Filtering.py b/Filtering/Filtering.py index 8a78335..d937830 100644 --- a/Filtering/Filtering.py +++ b/Filtering/Filtering.py @@ -192,7 +192,7 @@ class FilterBank(): if toRemove is 0: return samples, [] else: - return samples[:-1 * toRemove], samples[-1 * toRemove:] + return samples[:-1 * toRemove], samples[-1 * toRemove - 1:] def SetDepth(self, depth): """ @@ -257,7 +257,8 @@ class FilterBank(): samplesStack.PushEndSamples (end) # Non sono proprio sicuro che questo sia il modo migliore per farlo. - samplesStack.PushEndEffectSamples (low[:-2*self.depth*len(self.lowPassFilter.GetResponse())]) + end_effect_number = (-2) * self.depth * len(self.lowPassFilter.GetResponse()) + samplesStack.PushEndEffectSamples (low[end_effect_number:]) # Do the real filtering and downsampling. Store the downsampled # details in the array. @@ -298,7 +299,7 @@ class FilterBank(): low = roll(low, -1 * self.length) # Riparo gli eventuali end effect - low[:-2*self.depth*len(self.lowPassFilter.GetResponse())] = samplesStack.PopEndEffectSamples () + low[-2*self.depth*len(self.lowPassFilter.GetResponse()):] = samplesStack.PopEndEffectSamples () # Riattacchiamo la coda return concatenate ((low, end)) -- 2.1.4