From: Thomas Fillon Date: Thu, 17 Jul 2014 12:22:56 +0000 (+0200) Subject: fix code and doc after merge with dev X-Git-Tag: 0.6~4^2~51^2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d92efec7d3678e6f4b1b2336ee73e04d7c74104b;p=timeside.git fix code and doc after merge with dev --- diff --git a/doc/source/tutorial/quick_start.rst b/doc/source/tutorial/quick_start.rst index ad78143..c8207ff 100644 --- a/doc/source/tutorial/quick_start.rst +++ b/doc/source/tutorial/quick_start.rst @@ -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={})} diff --git a/timeside/analyzer/core.py b/timeside/analyzer/core.py index 254ca19..a6f20e6 100644 --- a/timeside/analyzer/core.py +++ b/timeside/analyzer/core.py @@ -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() ''' diff --git a/timeside/analyzer/irit_monopoly.py b/timeside/analyzer/irit_monopoly.py index b1f82c2..03fd9ce 100644 --- a/timeside/analyzer/irit_monopoly.py +++ b/timeside/analyzer/irit_monopoly.py @@ -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]) diff --git a/timeside/grapher/render_analyzers.py b/timeside/grapher/render_analyzers.py index 50509bc..5362158 100644 --- a/timeside/grapher/render_analyzers.py +++ b/timeside/grapher/render_analyzers.py @@ -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