]> git.parisson.com Git - timeside.git/commitdiff
add parent list iterating in pipe, fix analyzer.odf results
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 31 Oct 2013 21:50:00 +0000 (22:50 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 31 Oct 2013 21:50:00 +0000 (22:50 +0100)
timeside/analyzer/odf.py
timeside/core.py

index 06c91ae490f13b8ed7647444f0f18606729f5a6a..fab3e702357f314f01f892b130a42abea75160e1 100644 (file)
@@ -70,7 +70,7 @@ class OnsetDetectionFunction(Analyzer):
     def post_process(self):
 
         #spectrogram = self.parents()[0]['spectrogram_analyzer'].data
-        spectrogram = self.pipe._results['spectrogram_analyzer'].data
+        spectrogram = self.pipe.results['spectrogram_analyzer'].data
         #spectrogram = self.pipe._results[self.parents()[0].id]
 
         # Low-pass filtering of the spectrogram amplitude along the time axis
index b88bcea04fb40d22ddfef767de7ffd76aa827562..2e9541084aa951d07ef3c2b35fc73609a7af86f5 100644 (file)
@@ -252,7 +252,10 @@ class ProcessPipe(object):
 
     def __ior__(self, other):
         if isinstance(other, Processor):
-            self |= other.parents
+            parents = other.parents
+            if parents:
+                for parent in parents:
+                    self |= parent
             self.processors.append(other)
         elif isinstance(other, ProcessPipe):
             self.processors.extend(other.processors)