Dive in
========
-To list all available plugins::
+To list all available plugins:
- import timeside
- timeside.core.list_processors()
+.. doctest::
-Define some processors::
+ >>> import timeside
+ >>> timeside.core.list_processors() # doctest: +SKIP
- from timeside.core import get_processor
- decoder = get_processor('file_decoder')('sweep.wav')
- grapher = get_processor('waveform_simple')
- analyzer = get_processor('level')
- encoder = get_processor('vorbis_encoder')('sweep.ogg')
-Then run the *magic* pipeline::
- (decoder | grapher | analyzer | encoder).run()
-Render the grapher results::
+Define some processors:
- grapher.render(output='waveform.png')
+.. doctest::
-Show the analyzer results::
+ >>> from timeside.core import get_processor
+ >>> from timeside.tools.test_samples import samples
+ >>> wavfile = samples['sweep.wav']
+ >>> decoder = get_processor('file_decoder')(wavfile)
+ >>> grapher = get_processor('waveform_simple')()
+ >>> analyzer = get_processor('level')()
+ >>> encoder = get_processor('vorbis_encoder')('sweep.ogg')
+
+Then run the *magic* pipeline:
+
+.. doctest::
+
+ >>> (decoder | grapher | analyzer | encoder).run()
+
+Render the grapher results:
+
+.. doctest::
+
+ >>> grapher.render(output='waveform.png')
+
+Show the analyzer results:
+
+.. doctest::
+
+ >>> print 'Level:', analyzer.results # doctest: +ELLIPSIS
+ Level: {'level.max': AnalyzerResult(...)}
- print 'Level:', analyzer.results
The encoded OGG file should also be there...