]> git.parisson.com Git - timeside.git/commitdiff
update some docstrings
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 23 Oct 2014 10:35:24 +0000 (12:35 +0200)
committerThomas Fillon <thomas@parisson.com>
Fri, 24 Oct 2014 12:21:36 +0000 (14:21 +0200)
README.rst
doc/source/processors.rst
timeside/core.py
timeside/grapher/spectrogram_lin.py
timeside/grapher/spectrogram_log.py
timeside/grapher/waveform_centroid.py
timeside/grapher/waveform_contour.py
timeside/grapher/waveform_simple.py
timeside/grapher/waveform_transparent.py

index 2fb9418baf0c474325626a7a83764b466bf0ed4e..6758cf44f0594c54ea78aad8dbea9267e8eba22f 100644 (file)
@@ -65,74 +65,75 @@ News
 
 For older news, please visit: https://github.com/yomguy/TimeSide/blob/master/NEWS.rst
 
-IProcessor
+Processors
 ==========
 
+
 IEncoder
 --------
 
-    * live_encoder : Gstreamer-based Audio Sink
-    * flac_encoder : FLAC encoder based on Gstreamer
-    * aac_encoder : AAC encoder based on Gstreamer
-    * mp3_encoder : MP3 encoder based on Gstreamer
-    * vorbis_encoder : OGG Vorbis encoder based on Gstreamer
-    * opus_encoder : Opus encoder based on Gstreamer
-    * wav_encoder : WAV encoder based on Gstreamer
-    * webm_encoder : WebM encoder based on Gstreamer
+   * **live_encoder** : Gstreamer-based Audio Sink
+   * **flac_encoder** : FLAC encoder based on Gstreamer
+   * **aac_encoder** : AAC encoder based on Gstreamer
+   * **mp3_encoder** : MP3 encoder based on Gstreamer
+   * **vorbis_encoder** : OGG Vorbis encoder based on Gstreamer
+   * **opus_encoder** : Opus encoder based on Gstreamer
+   * **wav_encoder** : WAV encoder based on Gstreamer
+   * **webm_encoder** : WebM encoder based on Gstreamer
 
 IDecoder
 --------
 
-    * array_decoder : Decoder taking Numpy array as input
-    * file_decoder : File Decoder based on Gstreamer
-    * live_decoder : Live source Decoder based on Gstreamer
+   * **array_decoder** : Decoder taking Numpy array as input
+   * **file_decoder** : File Decoder based on Gstreamer
+   * **live_decoder** : Live source Decoder based on Gstreamer
 
 IGrapher
 --------
 
-    * grapher_aubio_pitch : Builds a PIL image representing Aubio Pitch
-    * grapher_onset_detection_function : Builds a PIL image representing Onset detection function
-    * grapher_waveform : Builds a PIL image representing Waveform from Analyzer
-    * grapher_irit_speech_4hz_segments : Builds a PIL image representing Irit 4Hz Speech Segmentation
-    * grapher_irit_speech_4hz_segments_median : Builds a PIL image representing Irit 4Hz Speech Segmentation with median filter
-    * grapher_monopoly_segments : Builds a PIL image representing Irit Monopoly Segmentation
-    * grapher_limsi_sad_etape : Builds a PIL image representing LIMSI SAD with ETAPE model
-    * grapher_limsi_sad_maya : Builds a PIL image representing LIMSI SAD with Mayan model
-    * grapher_irit_startseg : Builds a PIL image representing IRIT Start Noise
-    * spectrogram_log : Builds a PIL image representing a spectrogram of the audio stream
-    * spectrogram_lin : Builds a PIL image representing a spectrogram of the audio stream (level vs. frequency vs. time).
-    * waveform_simple : Builds a PIL image representing a simple waveform of the audio stream.
-    * waveform_centroid : Builds a PIL image representing a waveform of the audio stream.
-    * waveform_contour_black : Builds a PIL image representing an amplitude coutour (envelop) of the audio stream.
-    * waveform_contour_white : Builds a PIL image representing an amplitude coutour (envelop) of the audio stream.
-    * waveform_transparent : Builds a PIL image representing a transparent waveform
+   * **grapher_aubio_pitch** : Builds a PIL image representing Aubio Pitch
+   * **grapher_onset_detection_function** : Builds a PIL image representing Onset detection function
+   * **grapher_waveform** : Builds a PIL image representing Waveform from Analyzer
+   * **grapher_irit_speech_4hz_segments** : Builds a PIL image representing Irit 4Hz Speech Segmentation
+   * **grapher_irit_speech_4hz_segments_median** : Builds a PIL image representing Irit 4Hz Speech Segmentation with median filter
+   * **grapher_monopoly_segments** : Builds a PIL image representing Irit Monopoly Segmentation
+   * **grapher_limsi_sad_etape** : Builds a PIL image representing LIMSI SAD with ETAPE model
+   * **grapher_limsi_sad_maya** : Builds a PIL image representing LIMSI SAD with Mayan model
+   * **grapher_irit_startseg** : Builds a PIL image representing IRIT Start Noise
+   * **spectrogram_log** : logarithmic scaled spectrogram (level vs. frequency vs. time).
+   * **spectrogram_lin** : Linear scaled spectrogram (level vs. frequency vs. time).
+   * **waveform_simple** : Simple monochrome waveform image.
+   * **waveform_centroid** : Waveform where peaks are colored relatively to the spectral centroids of each frame buffer.
+   * **waveform_contour_black** : Black amplitude contour waveform.
+   * **waveform_contour_white** : an white amplitude contour wavform.
+   * **waveform_transparent** : Transparent waveform.
 
 IAnalyzer
 ---------
 
-    * mean_dc_shift : Mean DC shift analyzer
-    * level : Audio level analyzer
-    * aubio_melenergy : Aubio Mel Energy analyzer
-    * aubio_mfcc : Aubio MFCC analyzer
-    * aubio_pitch : Aubio Pitch estimation analyzer
-    * aubio_specdesc : Aubio Spectral Descriptors collection analyzer
-    * aubio_temporal : Aubio Temporal analyzer
-    * yaafe : Yaafe feature extraction library interface analyzer
-    * irit_monopoly : Segmentor Monophony/Polyphony based on the analysis of yin confidence.
-    * irit_startseg : Segmentation of recording sessions into 'start' and 'session' segments
-    * irit_speech_4hz : Speech Segmentor based on the 4Hz energy modulation analysis.
-    * irit_speech_entropy : Speech Segmentor based on Entropy analysis.
-    * limsi_sad : Limsi Speech Activity Detection Systems
-    * spectrogram_analyzer : Spectrogram analyzer
-    * onset_detection_function : Onset Detection Function analyzer
-    * spectrogram_analyzer_2 : Spectrogram analyzer
-    * spectrogram_analyzer_3 : Spectrogram analyzer
-    * waveform_analyzer : Waveform analyzer
+   * **mean_dc_shift** : Mean DC shift analyzer
+   * **level** : Audio level analyzer
+   * **aubio_melenergy** : Aubio Mel Energy analyzer
+   * **aubio_mfcc** : Aubio MFCC analyzer
+   * **aubio_pitch** : Aubio Pitch estimation analyzer
+   * **aubio_specdesc** : Aubio Spectral Descriptors collection analyzer
+   * **aubio_temporal** : Aubio Temporal analyzer
+   * **yaafe** : Yaafe feature extraction library interface analyzer
+   * **irit_monopoly** : Segmentor Monophony/Polyphony based on the analysis of yin confidence.
+   * **irit_startseg** : Segmentation of recording sessions into 'start' and 'session' segments
+   * **irit_speech_4hz** : Speech Segmentor based on the 4Hz energy modulation analysis.
+   * **irit_speech_entropy** : Speech Segmentor based on Entropy analysis.
+   * **limsi_sad** : Limsi Speech Activity Detection Systems
+   * **spectrogram_analyzer** : Spectrogram analyzer
+   * **onset_detection_function** : Onset Detection Function analyzer
+   * **spectrogram_analyzer_2** : Spectrogram analyzer
+   * **spectrogram_analyzer_3** : Spectrogram analyzer
+   * **waveform_analyzer** : Waveform analyzer
 
 IEffect
 -------
 
-    * fx_gain : Gain effect processor
+   * **fx_gain** : Gain effect processor
 
 
 Dive in
index 220b64c566e94e5b1051b86c72ed8de2afbd627a..7904ebcf98d493157379f24bb49d5952332e1f67 100644 (file)
@@ -1,70 +1,71 @@
-IProcessor
+Processors
 ==========
 
+
 IEncoder
 --------
 
-    * live_encoder : Gstreamer-based Audio Sink
-    * flac_encoder : FLAC encoder based on Gstreamer
-    * aac_encoder : AAC encoder based on Gstreamer
-    * mp3_encoder : MP3 encoder based on Gstreamer
-    * vorbis_encoder : OGG Vorbis encoder based on Gstreamer
-    * opus_encoder : Opus encoder based on Gstreamer
-    * wav_encoder : WAV encoder based on Gstreamer
-    * webm_encoder : WebM encoder based on Gstreamer
+   * **live_encoder** : Gstreamer-based Audio Sink
+   * **flac_encoder** : FLAC encoder based on Gstreamer
+   * **aac_encoder** : AAC encoder based on Gstreamer
+   * **mp3_encoder** : MP3 encoder based on Gstreamer
+   * **vorbis_encoder** : OGG Vorbis encoder based on Gstreamer
+   * **opus_encoder** : Opus encoder based on Gstreamer
+   * **wav_encoder** : WAV encoder based on Gstreamer
+   * **webm_encoder** : WebM encoder based on Gstreamer
 
 IDecoder
 --------
 
-    * array_decoder : Decoder taking Numpy array as input
-    * file_decoder : File Decoder based on Gstreamer
-    * live_decoder : Live source Decoder based on Gstreamer
+   * **array_decoder** : Decoder taking Numpy array as input
+   * **file_decoder** : File Decoder based on Gstreamer
+   * **live_decoder** : Live source Decoder based on Gstreamer
 
 IGrapher
 --------
 
-    * grapher_aubio_pitch : Builds a PIL image representing Aubio Pitch
-    * grapher_onset_detection_function : Builds a PIL image representing Onset detection function
-    * grapher_waveform : Builds a PIL image representing Waveform from Analyzer
-    * grapher_irit_speech_4hz_segments : Builds a PIL image representing Irit 4Hz Speech Segmentation
-    * grapher_irit_speech_4hz_segments_median : Builds a PIL image representing Irit 4Hz Speech Segmentation with median filter
-    * grapher_monopoly_segments : Builds a PIL image representing Irit Monopoly Segmentation
-    * grapher_limsi_sad_etape : Builds a PIL image representing LIMSI SAD with ETAPE model
-    * grapher_limsi_sad_maya : Builds a PIL image representing LIMSI SAD with Mayan model
-    * grapher_irit_startseg : Builds a PIL image representing IRIT Start Noise
-    * spectrogram_log : Builds a PIL image representing a spectrogram of the audio stream
-    * spectrogram_lin : Builds a PIL image representing a spectrogram of the audio stream (level vs. frequency vs. time).
-    * waveform_simple : Builds a PIL image representing a simple waveform of the audio stream.
-    * waveform_centroid : Builds a PIL image representing a waveform of the audio stream.
-    * waveform_contour_black : Builds a PIL image representing an amplitude coutour (envelop) of the audio stream.
-    * waveform_contour_white : Builds a PIL image representing an amplitude coutour (envelop) of the audio stream.
-    * waveform_transparent : Builds a PIL image representing a transparent waveform
+   * **grapher_aubio_pitch** : Builds a PIL image representing Aubio Pitch
+   * **grapher_onset_detection_function** : Builds a PIL image representing Onset detection function
+   * **grapher_waveform** : Builds a PIL image representing Waveform from Analyzer
+   * **grapher_irit_speech_4hz_segments** : Builds a PIL image representing Irit 4Hz Speech Segmentation
+   * **grapher_irit_speech_4hz_segments_median** : Builds a PIL image representing Irit 4Hz Speech Segmentation with median filter
+   * **grapher_monopoly_segments** : Builds a PIL image representing Irit Monopoly Segmentation
+   * **grapher_limsi_sad_etape** : Builds a PIL image representing LIMSI SAD with ETAPE model
+   * **grapher_limsi_sad_maya** : Builds a PIL image representing LIMSI SAD with Mayan model
+   * **grapher_irit_startseg** : Builds a PIL image representing IRIT Start Noise
+   * **spectrogram_log** : logarithmic scaled spectrogram (level vs. frequency vs. time).
+   * **spectrogram_lin** : Linear scaled spectrogram (level vs. frequency vs. time).
+   * **waveform_simple** : Simple monochrome waveform image.
+   * **waveform_centroid** : Waveform where peaks are colored relatively to the spectral centroids of each frame buffer.
+   * **waveform_contour_black** : Black amplitude contour waveform.
+   * **waveform_contour_white** : an white amplitude contour wavform.
+   * **waveform_transparent** : Transparent waveform.
 
 IAnalyzer
 ---------
 
-    * mean_dc_shift : Mean DC shift analyzer
-    * level : Audio level analyzer
-    * aubio_melenergy : Aubio Mel Energy analyzer
-    * aubio_mfcc : Aubio MFCC analyzer
-    * aubio_pitch : Aubio Pitch estimation analyzer
-    * aubio_specdesc : Aubio Spectral Descriptors collection analyzer
-    * aubio_temporal : Aubio Temporal analyzer
-    * yaafe : Yaafe feature extraction library interface analyzer
-    * irit_monopoly : Segmentor Monophony/Polyphony based on the analysis of yin confidence.
-    * irit_startseg : Segmentation of recording sessions into 'start' and 'session' segments
-    * irit_speech_4hz : Speech Segmentor based on the 4Hz energy modulation analysis.
-    * irit_speech_entropy : Speech Segmentor based on Entropy analysis.
-    * limsi_sad : Limsi Speech Activity Detection Systems
-    * spectrogram_analyzer : Spectrogram analyzer
-    * onset_detection_function : Onset Detection Function analyzer
-    * spectrogram_analyzer_2 : Spectrogram analyzer
-    * spectrogram_analyzer_3 : Spectrogram analyzer
-    * waveform_analyzer : Waveform analyzer
+   * **mean_dc_shift** : Mean DC shift analyzer
+   * **level** : Audio level analyzer
+   * **aubio_melenergy** : Aubio Mel Energy analyzer
+   * **aubio_mfcc** : Aubio MFCC analyzer
+   * **aubio_pitch** : Aubio Pitch estimation analyzer
+   * **aubio_specdesc** : Aubio Spectral Descriptors collection analyzer
+   * **aubio_temporal** : Aubio Temporal analyzer
+   * **yaafe** : Yaafe feature extraction library interface analyzer
+   * **irit_monopoly** : Segmentor Monophony/Polyphony based on the analysis of yin confidence.
+   * **irit_startseg** : Segmentation of recording sessions into 'start' and 'session' segments
+   * **irit_speech_4hz** : Speech Segmentor based on the 4Hz energy modulation analysis.
+   * **irit_speech_entropy** : Speech Segmentor based on Entropy analysis.
+   * **limsi_sad** : Limsi Speech Activity Detection Systems
+   * **spectrogram_analyzer** : Spectrogram analyzer
+   * **onset_detection_function** : Onset Detection Function analyzer
+   * **spectrogram_analyzer_2** : Spectrogram analyzer
+   * **spectrogram_analyzer_3** : Spectrogram analyzer
+   * **waveform_analyzer** : Waveform analyzer
 
 IEffect
 -------
 
-    * fx_gain : Gain effect processor
+   * **fx_gain** : Gain effect processor
 
 
index 2a4525e83a4cc5804cadfea297d1a40e5cf91ae0..30368d34690e96ba5a88a6dd67f53e17b00f9249 100644 (file)
@@ -282,6 +282,22 @@ def get_processor(processor_id):
 
 
 def list_processors(interface=IProcessor, prefix=""):
+    print prefix + interface.__name__
+    if len(prefix):
+        underline_char = '-'
+    else:
+        underline_char = '='
+    print prefix + underline_char * len(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 :" % p.id()
+        print prefix + "    \t\t%s" % p.description()
+
+
+def list_processors_rst(interface=IProcessor, prefix=""):
     print '\n' + prefix + interface.__name__
     if len(prefix):
         underline_char = '-'
@@ -290,10 +306,10 @@ def list_processors(interface=IProcessor, prefix=""):
     print prefix + underline_char * len(interface.__name__) + '\n'
     subinterfaces = interface.__subclasses__()
     for i in subinterfaces:
-        list_processors(interface=i, prefix=prefix + "  ")
+        list_processors_rst(interface=i, prefix=prefix + " ")
     procs = processors(interface, False)
     for p in procs:
-        print prefix + "  * %s : %s" % (p.id(), p.description())
+        print prefix + "  * **%s** : %s" % (p.id(), p.description())
 
 
 class ProcessPipe(object):
index 7e2e0ab617de9204fc7a27a35c97ffd647415d74..9b830d773b7976fe6b6237d2a9afee5611df806e 100644 (file)
@@ -27,7 +27,8 @@ from timeside.grapher.spectrogram_log import SpectrogramLog
 
 class SpectrogramLinear(SpectrogramLog):
 
-    """ Builds a PIL image representing a spectrogram of the audio stream (level vs. frequency vs. time).
+    """Linear scaled spectrogram (level vs. frequency vs. time).
+
     Adds pixels iteratively thanks to the adapter providing fixed size frame buffers."""
 
     implements(IGrapher)
index 21be1d2c745e25850afda9f4533b3de241baa3bd..244178162b1ccd0b3eb3dd5a660d28e8a08f202a 100644 (file)
@@ -29,8 +29,8 @@ import math
 
 class SpectrogramLog(Grapher):
 
-    """ Builds a PIL image representing a spectrogram of the audio stream
-    (level vs. frequency vs. time).
+    """logarithmic scaled spectrogram (level vs. frequency vs. time).
+
     Adds pixels iteratively thanks to the adapter providing
     fixed size frame buffers."""
 
index d0ef61ad1dc2a3c2e0b9339e0ad4245dc159c0fc..375ba1d95e65356a15552de8ce8f6138c70552b3 100644 (file)
@@ -28,8 +28,8 @@ from timeside.grapher.color_schemes import default_color_schemes
 
 class WaveformCentroid(Waveform):
 
-    """ Builds a PIL image representing a waveform of the audio stream.
-    Peaks are colored relatively to the spectral centroids of each frame buffer. """
+    """Waveform where peaks are colored relatively to the spectral centroids of each frame buffer.
+    """
 
     implements(IGrapher)
 
index 337c41268c1bb9cf76d6cff5df68ed427df10648..6d74eeebd4f6636506b3e1ff0f23799ae8f0257e 100644 (file)
@@ -30,7 +30,7 @@ import numpy
 
 class WaveformContourBlack(Waveform):
 
-    """ Builds a PIL image representing an amplitude coutour (envelop) of the audio stream.
+    """Black amplitude contour waveform.
     """
 
     implements(IGrapher)
@@ -76,7 +76,7 @@ class WaveformContourBlack(Waveform):
 
 class WaveformContourWhite(WaveformContourBlack):
 
-    """ Builds a PIL image representing an amplitude coutour (envelop) of the audio stream.
+    """an white amplitude contour wavform.
     """
 
     implements(IGrapher)
index 43b9dda18ef8839c2040203fa88676a69676f4f6..8b2d43a91292f12341eeaf42806d5b9207aef4fe 100644 (file)
@@ -27,7 +27,7 @@ from . utils import peaks
 
 class Waveform(Grapher):
 
-    """ Builds a PIL image representing a simple waveform of the audio stream.
+    """Simple monochrome waveform image.
     """
 
     implements(IGrapher)
index 7dfd1192820ae6c6f20577834db767859871a90c..8f944196a04ff4c228ad5e6f9bee04d1d151d086 100644 (file)
@@ -28,8 +28,7 @@ from . utils import peaks
 
 class WaveformTransparent(Waveform):
 
-    """ Builds a PIL image representing a transparent waveform
-    of the audio stream.
+    """Transparent waveform.
     """
 
     implements(IGrapher)