Development
===========
-For versions >=0.5 on Debian Stable 7.0 Wheezy:
+For versions >=0.5 on Debian 7 Wheezy:
.. code-block:: bash
Dive in
========
-Define some processors::
+To list all available plugins::
>>> import timeside
- >>> decoder = timeside.decoder.file.FileDecoder('sweep.wav')
- >>> grapher = timeside.grapher.waveform_simple.Waveform()
- >>> analyzer = timeside.analyzer.level.Level()
- >>> encoder = timeside.encoder.ogg.VorbisEncoder('sweep.ogg')
+ >>> timeside.core.list_processors()
+
+Define some processors::
+
+ >>> from timeside.core import get_processor
+ >>> decoder = get_processor('gst_dec')('sweep.wav')
+ >>> grapher = get_processor('waveform_simple')
+ >>> analyzer = get_processor('level')
+ >>> encoder = get_processor('gst_vorbis_enc')('sweep.ogg')
-then, the *magic* pipeline::
+Then run the *magic* pipeline::
>>> (decoder | grapher | analyzer | encoder).run()
-get the results::
+Render the grapher results::
>>> grapher.render(output='waveform.png')
+
+Show the analyzer results::
+
>>> print 'Level:', analyzer.results
+The encoded OGG file should also be there...
+
+Note you can also instanciate each processor with its own class::
+
+ >>> decoder = timeside.decoder.file.FileDecoder('sweep.wav')
+ >>> grapher = timeside.grapher.waveform_simple.Waveform()
+ >>> analyzer = timeside.analyzer.level.Level()
+ >>> encoder = timeside.encoder.ogg.VorbisEncoder('sweep.ogg')
+
For more extensive examples, please see the `http://files.parisson.com/timeside/doc/ <full documentation>`_.
Other Linux distributions
--------------------------
-On other Linux platforms, you need to install all dependencies listed in the paragraph named "Dependencies" (find all equivalent package names for your distribution).
+On other Linux platforms, you need to install all dependencies listed in the paragraph #Dependencies (find all equivalent package names for your distribution).
Then, use pip::
TimeSide : open web audio processing framework
==============================================
-TimeSide is a set of python components enabling low and high level audio analysis, imaging, transcoding and streaming. Its high-level API is designed to enable complex processing on large datasets of audio and video assets of any format. Its simple plug-in architecture can be adapted to various use cases.
+TimeSide is a set of python components enabling low and high level audio analysis, imaging, transcoding and streaming. Its high-level API is designed to enable complex processing on large datasets of audio and video assets of any format. Its simple plug-in architecture can be adapted to various use cases.
TimeSide also includes a smart interactive HTML5 player which provides various streaming playback functions, formats selectors, fancy audio visualizations, segmentation and semantic labelling synchronized with audio events. It is embeddable in any web application.
+++ /dev/null
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-from tools import check_samples
-
-check_samples()
+++ /dev/null
-import timeside
-import timeside.core
-
-def list_processors(interface, prefix=""):
- print prefix + interface.__name__
- subinterfaces = interface.__subclasses__()
- for i in subinterfaces:
- list_processors(i, prefix + " ")
- processors = timeside.core.processors(interface, False)
- for p in processors:
- print prefix + " %s [%s]" % (p.__name__, p.id())
-
-list_processors(timeside.api.IProcessor)
import time
from tools import check_samples
+check_samples()
+
class _TextTestResult(unittest.TestResult):
"""A test result class that can print formatted text results to a stream.
return _processors[processor_id]
+def list_processors(interface=IProcessor, prefix=""):
+ print prefix + interface.__name__
+ subinterfaces = interface.__subclasses__()
+ for i in subinterfaces:
+ list_processors(interface=i, prefix=prefix + " ")
+ procs = processors(interface, False)
+ for p in procs:
+ print prefix + " %s [%s]" % (p.__name__, p.id())
+
+
class ProcessPipe(object):
"""Handle a pipe of processors