]> git.parisson.com Git - timeside.git/commitdiff
add new Gain fx, fix encoder docstrings, update list processor style
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 23 Oct 2014 09:53:16 +0000 (11:53 +0200)
committerThomas Fillon <thomas@parisson.com>
Fri, 24 Oct 2014 12:21:36 +0000 (14:21 +0200)
13 files changed:
doc/source/news.rst
timeside/__init__.py
timeside/core.py
timeside/effects/gain.py [deleted file]
timeside/encoder/audiosink.py
timeside/encoder/flac.py
timeside/encoder/m4a.py
timeside/encoder/mp3.py
timeside/encoder/ogg.py
timeside/encoder/opus.py
timeside/encoder/wav.py
timeside/encoder/webm.py
timeside/fx/gain.py [new file with mode: 0644]

index a6477e978a7101b7803ceef68a37d00af42a6f4c..7856a8f0f0d3516c67ffa3e5469bfff3a7b595dc 100644 (file)
@@ -3,6 +3,7 @@ News
 
 0.5.7
 
+  * WARNING! some processor ids have changed. Please see the full list below.
   * Add a Docker development box
   * Add a Vagrant development box
   * Add a Debian package installation procedure
index 1a1e352b789acd8c49859d59c7cc4e453fb2d7e6..43fa9540d2ed323d64865a5c6d13c333cb2ee26b 100644 (file)
@@ -35,7 +35,7 @@ _WITH_YAAFE = ts_package.check_yaafe()
 _WITH_VAMP = ts_package.check_vamp()
 
 
-_packages_with_processors = ['decoder', 'analyzer', 'encoder', 'grapher']
+_packages_with_processors = ['decoder', 'analyzer', 'encoder', 'grapher', 'fx']
 
 __all__ = ['api', 'core']
 __all__.extend(_packages_with_processors)
index 1f45660a2e8d8a96c1328411c1223ba3bde77fab..44f250ad1337a47e003453765a03e838464ca826 100644 (file)
@@ -293,7 +293,7 @@ def list_processors(interface=IProcessor, prefix=""):
         list_processors(interface=i, prefix=prefix + "  ")
     procs = processors(interface, False)
     for p in procs:
-        print prefix + "  - '%s' :" % p.id()
+        print prefix + "  * %s" % p.id()
         print prefix + "    \t\t%s" % p.description()
 
 
diff --git a/timeside/effects/gain.py b/timeside/effects/gain.py
deleted file mode 100644 (file)
index 2c69222..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from timeside.core import Processor, implements, interfacedoc, FixedSizeInputAdapter
-from timeside.api import *
-import numpy
-
-
-class Gain(Processor):
-    implements(IEffect)
-
-    @interfacedoc
-    def __init__(self, gain=1.0):
-        self.gain = gain
-
-    @staticmethod
-    @interfacedoc
-    def id():
-        return "test_gain"
-
-    @staticmethod
-    @interfacedoc
-    def name():
-        return "Gain test effect"
-
-    def process(self, frames, eod=False):
-        return numpy.multiply(frames, self.gain), eod
index 489459d6cdaf612e0df7e33fbf95af3d5389959c..08c7023bafe0ac7aa95bf849806c5b31acc672ea 100644 (file)
@@ -27,7 +27,7 @@ from timeside.api import IEncoder
 
 class AudioSink(GstEncoder):
 
-    """gstreamer-based Audio Sink
+    """Gstreamer-based Audio Sink
 
     This encoder plays the decoded audio stream to the sound card
 
index 6debf932057faae873ac7d2ea42b8d031e1e3400..25c6486dbcada4a65380180ddd154d823aa3a2ed 100644 (file)
@@ -25,7 +25,9 @@ from timeside.api import IEncoder
 
 
 class FlacEncoder(GstEncoder):
+
     """FLAC encoder based on Gstreamer"""
+
     implements(IEncoder)
 
     @interfacedoc
index 668585ebe0e51cc02874315625f5b8318ded2355..e1ba6d9bad1e0b740bbe63c90843483c77901cfc 100644 (file)
@@ -26,7 +26,8 @@ from timeside.api import IEncoder
 
 class AacEncoder(GstEncoder):
 
-    """ gstreamer-based AAC encoder """
+    """AAC encoder based on Gstreamer"""
+
     implements(IEncoder)
 
     def __init__(self, output, streaming=False, overwrite=False):
index 974d94f8d97e6a35f4e3f222dca39b6fca32dc14..21bf339c0de9e45137855e758dcc0d56903a4df7 100644 (file)
@@ -32,7 +32,8 @@ from timeside.api import IEncoder
 
 class Mp3Encoder(GstEncoder):
 
-    """ gstreamer-based MP3 encoder """
+    """MP3 encoder based on Gstreamer"""
+
     implements(IEncoder)
 
     @interfacedoc
index 0122295bdb616267e65f6dcede8b08c1a6d1eda0..ec9fe756ba7284775a8ca1a2d1fb1136d73d4568 100644 (file)
@@ -25,7 +25,9 @@ from timeside.api import IEncoder
 
 
 class VorbisEncoder(GstEncoder):
+
     """OGG Vorbis encoder based on Gstreamer"""
+
     implements(IEncoder)
 
     @interfacedoc
index b58b5b58aaf99915905202a2ec3be4040e359718..0697a5f64662ddbed37158b899257550930a5a60 100644 (file)
@@ -32,7 +32,8 @@ from timeside.api import IEncoder
 
 class OpusEncoder(GstEncoder):
 
-    """ gstreamer-based Opus encoder """
+    """Opus encoder based on Gstreamer"""
+
     implements(IEncoder)
 
     @interfacedoc
index 4635099e7dfa3a47909237529f2a0eb8c9f7490d..2f382c000de4d85334269e71744ee1ba9f5a9990 100644 (file)
@@ -27,7 +27,8 @@ from timeside.api import IEncoder
 
 class WavEncoder(GstEncoder):
 
-    """ gstreamer-based WAV encoder """
+    """WAV encoder based on Gstreamer"""
+
     implements(IEncoder)
 
     @interfacedoc
index fdc37221b4057fb5de76e8795bcc21a837e74617..41197341f5e4459d032912e5f2a4b96103f20136 100644 (file)
@@ -25,7 +25,9 @@ from timeside.api import IEncoder
 
 
 class WebMEncoder(GstEncoder):
-    """WebM encoder based on Gstreamer `webmmux` muxer"""
+
+    """WebM encoder based on Gstreamer"""
+
     implements(IEncoder)
 
     def __init__(self, output, streaming=False, overwrite=False, video=False):
diff --git a/timeside/fx/gain.py b/timeside/fx/gain.py
new file mode 100644 (file)
index 0000000..cfb2831
--- /dev/null
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+
+from timeside.core import Processor, implements, interfacedoc
+from timeside.api import IEffect
+import numpy
+
+
+class Gain(Processor):
+    """Gain effect processor"""
+
+    implements(IEffect)
+
+    @interfacedoc
+    def __init__(self, gain=1.0):
+        self.gain = gain
+
+    @staticmethod
+    @interfacedoc
+    def id():
+        return "fx_gain"
+
+    @staticmethod
+    @interfacedoc
+    def name():
+        return "Gain effect"
+
+    def process(self, frames, eod=False):
+        return numpy.multiply(frames, self.gain), eod