]> git.parisson.com Git - timeside.git/commitdiff
Put list_processors in core, update dive in and install docs
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 19 May 2014 12:09:35 +0000 (14:09 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 19 May 2014 12:09:35 +0000 (14:09 +0200)
doc/source/dev.rst
doc/source/dive_in.rst
doc/source/install.rst
doc/source/intro.rst
tests/get_samples.py [deleted file]
tests/listprocessors.py [deleted file]
tests/unit_timeside.py
timeside/core.py

index ab6cb20bd4bcacfa6955974d73818d968f294e32..72ad1461443f4c6bc74b90c7e5431e7aaf7b7a5d 100644 (file)
@@ -1,7 +1,7 @@
 Development
 ===========
 
-For versions >=0.5 on Debian Stable 7.0 Wheezy:
+For versions >=0.5 on Debian 7 Wheezy:
 
 .. code-block:: bash
 
index 87be35fb5a9d647700fba739befbab44d4cc90de..ee110b397e5d194969c4d97f5e5675e5b7a6250c 100644 (file)
@@ -1,22 +1,39 @@
 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>`_.
 
index 0dadda1ab5a8090e3cf640b580bdcf606cfc4ea1..ab4bc785db0f8f1f385df81efacb5be5a729011a 100644 (file)
@@ -25,7 +25,7 @@ Note you can also use pip if you already have already satisfied all the dependen
 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::
  
index caf156bdf9f743d78c812fc2eac1014359974c49..a282251d83a182623f8f7038015647165b0d2b5e 100644 (file)
@@ -2,7 +2,7 @@
 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.
 
diff --git a/tests/get_samples.py b/tests/get_samples.py
deleted file mode 100644 (file)
index a4d37a8..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-from tools import check_samples
-
-check_samples()
diff --git a/tests/listprocessors.py b/tests/listprocessors.py
deleted file mode 100644 (file)
index aa37896..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-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)        
index dad1bf4ebfc669b2d6d04501b9606aedb2f34b0c..0e5789d3ee7b4a536387e9ff799b438b51b3da6d 100644 (file)
@@ -6,6 +6,8 @@ import sys
 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.
index b40920c8ad6c3afab47e833a534d17ef2d3471df..d821225405d99e7457874a789273edd32aaf882d 100644 (file)
@@ -235,6 +235,16 @@ def get_processor(processor_id):
     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