]> git.parisson.com Git - timeside.git/commitdiff
fix code and doc after merge with dev
authorThomas Fillon <thomas@parisson.com>
Thu, 17 Jul 2014 12:22:56 +0000 (14:22 +0200)
committerThomas Fillon <thomas@parisson.com>
Thu, 17 Jul 2014 12:22:56 +0000 (14:22 +0200)
doc/source/tutorial/quick_start.rst
timeside/analyzer/core.py
timeside/analyzer/irit_monopoly.py
timeside/grapher/render_analyzers.py

index ad781430b96ed46b6eabbee567e8f76c588536e8..c8207ff90dfb2e118043c188dc9bf2d7577634c8 100644 (file)
@@ -62,5 +62,4 @@ analysis and encoding:
    >>> encoders = get_processor('gst_mp3_enc')('sweep.mp3') | get_processor('gst_flac_enc')('sweep.flac')
    >>> (decoder | levels | encoders).run()
    >>> print levels.results
-   {'...': GlobalValueResult(id_metadata=IdMetadata(id='level.max', name='Level Max', unit='dBFS', description='', date='...', version='...', author='TimeSide', proc_uuid='...', res_uuid='...'), data_object=DataObject(value=array([-6.021])), audio_metadata=AudioMetadata(uri='file://...sweep.wav', start=0.0, duration=8.0, is_segment=False, sha1='...', channels=2, channelsManagement=''), parameters={}), '...': GlobalValueResult(id_metadata=IdMetadata(id='level.rms', name='Level RMS', unit='dBFS', description='', date='...', version='...', author='TimeSide', proc_uuid='...', res_uuid='...'), data_object=GlobalValueObject(value=array([-9.856]), y_value=array([], dtype=float64)), audio_metadata=AudioMetadata(uri='file://...sweep.wav', start=0.0, duration=8.0, is_segment=False, sha1='...', channels=2, channelsManagement=''), parameters={})}
-
+   {'...': AnalyzerResult(id_metadata=IdMetadata(id='level.max', name='Level Max', unit='dBFS', description='', date='...', version='...', author='TimeSide', proc_uuid='...', res_uuid='...'), data_object=GlobalValueObject(value=array([-6.021]), y_value=array([], dtype=float64)), audio_metadata=AudioMetadata(uri='.../sweep.wav', start=0.0, duration=8.0, is_segment=False, sha1='...', channels=2, channelsManagement=''), parameters={}), '...': AnalyzerResult(id_metadata=IdMetadata(id='level.rms', name='Level RMS', unit='dBFS', description='', date='...', version='...', author='TimeSide', proc_uuid='...', res_uuid='...'), data_object=GlobalValueObject(value=array([-9.856]), y_value=array([], dtype=float64)), audio_metadata=AudioMetadata(uri='.../sweep.wav', start=0.0, duration=8.0, is_segment=False, sha1='...', channels=2, channelsManagement=''), parameters={})}
index 254ca19d5ac9c308968c3c409f79d47d47a792b9..a6f20e6e1b5463b5e811575b2dff208d01b96f4f 100644 (file)
@@ -913,7 +913,7 @@ class AnalyzerResultContainer(dict):
     >>> a = Analyzer()
     >>> (d|a).run()
     >>> a.new_result() #doctest: +ELLIPSIS
-    FrameValueResult(id_metadata=IdMetadata(id='analyzer', name='Generic analyzer', unit='', description='', date='...', version='...', author='TimeSide', proc_uuid='...', res_uuid='...'), data_object=FrameValueObject(value=array([], dtype=float64), y_value=array([], dtype=float64), audio_metadata=AudioMetadata(uri='...', start=0.0, duration=8.0..., is_segment=False, sha1='...', channels=2, channelsManagement=''), frame_metadata=FrameMetadata(samplerate=44100, blocksize=8192, stepsize=8192), parameters={})
+    AnalyzerResult(id_metadata=IdMetadata(id='analyzer', name='Generic analyzer', unit='', description='', date='...', version='...', author='TimeSide', proc_uuid='...', res_uuid='...'), data_object=FrameValueObject(value=array([], dtype=float64), y_value=array([], dtype=float64), frame_metadata=FrameMetadata(samplerate=44100, blocksize=8192, stepsize=8192)), audio_metadata=AudioMetadata(uri='.../sweep.mp3', start=0.0, duration=8.0..., is_segment=False, sha1='...', channels=2, channelsManagement=''), parameters={})
     >>> resContainer = timeside.analyzer.core.AnalyzerResultContainer()
     '''
 
index b1f82c22a0f2718336401347d27cf4da13bd6ebc..03fd9ce5dd1b7c1a7253796fd7097c3af8847229 100644 (file)
@@ -87,7 +87,8 @@ class IRITMonopoly(Analyzer):
 
         '''
         aubio_res_id = 'aubio_pitch.pitch_confidence'
-        pitch_confidences = self.process_pipe.results[aubio_res_id].data
+        pipe_results = self.process_pipe.results
+        pitch_confidences = pipe_results.get_result_by_id(aubio_res_id).data
 
         nb_frameDecision = int(self.decisionLen / self.wStep)
         epsilon = numpy.spacing(pitch_confidences[0])
index 50509bcdebab74b88d201bdb2edf560fc6f00067..5362158472d98f31af7ed15e679910afca433538 100644 (file)
@@ -59,7 +59,7 @@ class DisplayAnalyzer(Grapher):
         fg_image = parent_result._render_PIL((self.image_width,
                                               self.image_height), self.dpi)
         if self._background:
-            bg_result = self.process_pipe.results[self._bg_id]
+            bg_result = pipe_result.get_result_by_id(self._bg_id)
             bg_image = bg_result._render_PIL((self.image_width,
                                               self.image_height), self.dpi)
             # convert image to grayscale