We just *need* a python library to:
- * build a python framework to do asynchronous audio processing,
- * decode audio frames from ANY format into numpy arrays,
- * analyze audio content with some state-of-the-art audio feature extraction libraries,
- * organize, serialize and save analysis metadata through various formats,
- * draw various fancy waveforms, spectrograms and other cool graphers,
- * transcode audio data in various media formats and stream them through web apps,
- * playback and interact *on demand* through a smart high-level HTML5 extensible player,
- * index, tag and organize semantic metadata (see `Telemeta <http://telemeta.org>`_ which embed TimeSide).
+ * Do asynchronous and fast audio processing with Python,
+ * Decode audio frames from ANY format into numpy arrays,
+ * Analyze audio content with some state-of-the-art audio feature extraction libraries,
+ * Organize, serialize and save analysis metadata through various formats,
+ * Draw various fancy waveforms, spectrograms and other cool graphers,
+ * Transcode audio data in various media formats and stream them through web apps,
+ * Playback and interact *on demand* through a smart high-level HTML5 extensible player,
+ * Index, tag and organize semantic metadata (see `Telemeta <http://telemeta.org>`_ which embed TimeSide).
Here is a schematic diagram of the TimeSide engine architecture:
`More examples <http://code.google.com/p/timeside/wiki/PythonApi>`_
-UI examples
-===========
-
- * http://code.google.com/p/timeside/
- * http://parisson.telemeta.org/archives/items/PRS_07_01_03/
- * http://archives.crem-cnrs.fr/items/CNRSMH_I_1956_002_001_01/ (player embedded in a Telemeta session)
-
-
-APIs and guides
-===============
-
-Engine API : http://code.google.com/p/timeside/source/browse/trunk/timeside/api.py
-
-Player API and guide : http://code.google.com/p/timeside/wiki/UiGuide
-
-
-Related projects
-=================
-
-TimeSide has emerged in 2010 from the `Telemeta project <http://telemeta.org>`_ which develops a free and open-source web audio CMS.
-
-Some decoders and encoders depend on the great `GStreamer framework <http://gstreamer.freedesktop.org/>`_.
-
-
-Platforms
-=========
-
-The TimeSide engine is intended to work on all Unix / Linux platforms, but MacOS X and Windows versions will soon be explorated.
-
-The player should work on any modern HTML5 enabled browser. Flash is needed for MP3 if the browser doesn't support it.
-
-
Install
=======
On Debian, Ubuntu, etc::
+ $ echo "deb http://debian.parisson.com/debian/ stable main" | sudo tee -a /etc/apt/sources.list
$ sudo apt-get update
- $ sudo apt-get install gcc python python-dev python-pip python-setuptools \
- python-gobject gobject-introspection \
- python-gst0.10 gstreamer0.10-plugins-base gir1.2-gstreamer-0.10 \
- gstreamer0.10-plugins-good gstreamer0.10-plugins-bad \
- gobject-introspection python-mutagen \
- python-scipy python-h5py
-
-On Fedora and Red-Hat, etc::
+ $ sudo apt-get install python-timeside
- $ sudo yum update
- $ sudo yum install gcc python python-devel gstreamer pygobject2 gstreamer-python \
- gstreamer gstreamer-plugins-bad-free gstreamer-plugins-bad-free-extras \
- gstreamer-plugins-base gstreamer-plugins-good
-
-And then::
+On other system, you'll need to install the Gstreamer framework and modules, aubio 0.4, yaafe 0.64 and then ::
$ sudo pip install timeside
-To get non-free (MP3, MP4, AAC, etc) decoding and encoding features, add Debian Multimedia repository and install the modules::
- echo "deb http://www.deb-multimedia.org stable main non-free" | sudo tee -a /etc/apt/sources.list
- sudo apt-get update
- apt-get install gstreamer0.10-lame gstreamer0.10-plugins-really-bad gstreamer0.10-plugins-ugly
+Extensible HTML5 User Interface
+================================
+TimeSide comes with a smart HTML5 audio player which can drive the process engine through a web server.
-Batching
-=========
+Some examples of application:
-TimeSide provides *ts-waveforms*, a waveform rendering batch script. Usage::
+ * http://parisson.telemeta.org/archives/items/PRS_07_01_03/
+ * http://archives.crem-cnrs.fr/items/CNRSMH_I_1956_002_001_01/ (player embedded in a Telemeta session)
- ts-waveforms /path/to/media_dir /path/to/img_dir
+The detailed documentation to extend the player:
-Please use absolute paths. For example::
+ * https://github.com/yomguy/TimeSide/wiki/Ui-Guide
- ts-waveforms /home/$user/music/mp3/ /home/$USER/images/
-To change the color scheme or the size of the waveforms, edit the script from the source and change the variables of the GrapherScheme object::
+Documentation
+==============
- git clone https://github.com/yomguy/TimeSide.git
- cd timeside/scripts/
- vi ts-waveforms
- ./ts-waveforms /home/$user/music/mp3/ /home/$USER/images/
+Engine API : http://code.google.com/p/timeside/source/browse/trunk/timeside/api.py
-Packages included
+Related projects
=================
- * SoundManager 2 >= 2.91 (http://www.schillmania.com/projects/soundmanager2)
- * jQuery => 1.2.6 (http://www.jquery.com)
- * jsGraphics => 3.03 (http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm)
+TimeSide has emerged in 2010 from the `Telemeta project <http://telemeta.org>`_ which develops a free and open source web audio CMS.
+Some decoders and encoders depend on the great `GStreamer framework <http://gstreamer.freedesktop.org/>`_.
-License
-=======
-
-TimeSide is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-TimeSide is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+Platforms
+=========
-See LICENSE for more details.
+The TimeSide engine is intended to work on all Unix / Linux platforms.
+MacOS X and Windows versions will soon be explorated.
+The player should work on any modern HTML5 enabled browser.
+Flash is needed for MP3 if the browser doesn't support it.
Development
===========
-For version >= 0.5 + aubio 0.4dev on Linux (Debian Stable 7.0)::
-
- sudo apt-get update
-
- sudo apt-get install python python-dev python-pip python-setuptools python-gobject \
- python-gst0.10 gstreamer0.10-plugins-base gir1.2-gstreamer-0.10 \
- gstreamer0.10-plugins-good gstreamer0.10-plugins-bad \
- gstreamer0.10-plugins-ugly gobject-introspection python-numpy \
- python-yaml python-imaging python-simplejson python-mutagen
- libsndfile-dev libsamplerate-dev libjack-jackd2-dev \
- liblash-compat-dev libfftw3-dev \
- docbook-to-man gcc git-core ipython \
-
-Install aubio module with "develop" branch::
-
- git clone git://git.aubio.org/git/aubio/
- cd aubio
- git checkout develop
- ./waf configure
- ./waf build
- sudo ./waf install
- cd python
- sudo python setup.py install
-
-Install temporary timeside module with "dev" branch::
-
- git clone https://github.com/yomguy/TimeSide.git
- cd TimeSide
- git checkout dev
- export PYTHONPATH=$PYTHONPATH:`pwd`
- $tests/run_all_tests
-
+For version >= 0.5 on Debian Stable 7.0 Wheezy::
-Official repositories:
+ $ echo "deb http://debian.parisson.com/debian/ stable main" | sudo tee -a /etc/apt/sources.list
+ $ echo "deb-src http://debian.parisson.com/debian/ stable main" | sudo tee -a /etc/apt/sources.list
+ $ sudo apt-get update
+ $ sudo apt-get install git
+ $ sudo apt-get build-dep python-timeside
- * http://code.google.com/p/timeside/
- * https://github.com/yomguy/TimeSide
+ $ git clone https://github.com/yomguy/TimeSide.git
+ $ cd TimeSide
+ $ git checkout dev
+ $ export PYTHONPATH=$PYTHONPATH:`pwd`
+ $ python tests/run_all_tests
API / Documentation
The *source code*, the API and some slides:
- * http://code.google.com/p/timeside/
* https://github.com/yomguy/TimeSide
* http://files.parisson.com/api/timeside/
* http://files.parisson.com/timeside/timeside/doc/timeside_slides.html
* Copyright (c) 2013 Thomas Fillon
* Copyright (c) 2006, 2010 Samalyse SARL
+
+License
+=======
+
+TimeSide is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+TimeSide is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+See LICENSE for more details.
<!doctype html>
<html lang="en">
- <head>
- <meta charset="utf-8">
+ <head>
+ <meta charset="utf-8">
- <title>TimeSide : open and fast web audio components</title>
+ <title>TimeSide : open and fast web audio components</title>
- <meta name="description" content="A framework for easily creating beautiful presentations using HTML">
- <meta name="author" content="Hakim El Hattab">
+ <meta name="description" content="A framework for easily creating beautiful presentations using HTML">
+ <meta name="author" content="Hakim El Hattab">
- <meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
- <link rel="stylesheet" href="http://files.parisson.com/static/reveal.js/css/reveal.min.css">
- <link rel="stylesheet" href="http://files.parisson.com/static/reveal.js/css/theme/night.css" id="theme">
+ <link rel="stylesheet" href="http://files.parisson.com/static/reveal.js/css/reveal.min.css">
+ <link rel="stylesheet" href="http://files.parisson.com/static/reveal.js/css/theme/night.css" id="theme">
- <!-- For syntax highlighting -->
- <link rel="stylesheet" href="http://files.parisson.com/static/reveal.js/lib/css/zenburn.css">
+ <!-- For syntax highlighting -->
+ <link rel="stylesheet" href="http://files.parisson.com/static/reveal.js/lib/css/zenburn.css">
- <!-- If the query includes 'print-pdf', use the PDF print sheet -->
- <script>
- document.write( '<link rel="stylesheet" href="http://files.parisson.com/static/reveal.js/css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
- </script>
+ <!-- If the query includes 'print-pdf', use the PDF print sheet -->
+ <script>
+ document.write( '<link rel="stylesheet" href="http://files.parisson.com/static/reveal.js/css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
+ </script>
- <!--[if lt IE 9]>
- <script src="lib/js/html5shiv.js"></script>
- <![endif]-->
- </head>
+ <!--[if lt IE 9]>
+ <script src="lib/js/html5shiv.js"></script>
+ <![endif]-->
+ </head>
- <body>
+ <body>
- <div class="reveal">
+ <div class="reveal">
- <!-- Any section element inside of this container is displayed as a slide -->
- <div class="slides">
+ <!-- Any section element inside of this container is displayed as a slide -->
+ <div class="slides">
- <section>
- <h1>TimeSide</h1>
- <h3>open and fast web audio components</h3>
- <p>
- <small>created by <a href="http://fr.linkedin.com/in/guillaumepellerin">Guillaume Pellerin</a> / <a href="http://twitter.com/yomguy">@yomguy</a> at <a href="http://parisson.com" target="_blank">Parisson.com</a></small>
- </p>
- <iframe width='374' height='221' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://parisson.telemeta.org/archives/items/PRS_07_01_01/player/360x130'></iframe>
- </section>
+ <section>
+ <h1>TimeSide</h1>
+ <h3>open and fast web audio components</h3>
+ <p>
+ <small>created by <a href="http://fr.linkedin.com/in/guillaumepellerin">Guillaume Pellerin</a> / <a href="http://twitter.com/yomguy">@yomguy</a> at <a href="http://parisson.com" target="_blank">Parisson.com</a></small>
+ </p>
+ <iframe width='374' height='221' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://parisson.telemeta.org/archives/items/PRS_07_01_01/player/360x130'></iframe>
+ </section>
<!--
- <section>
- <h2>Heads up</h2>
- <p>
- TimeSide is a set of python components enabling easy audio processing, transcoding, imaging and streaming.
- <br/><br/>
- Its simple architecture and high-level API have been design to process serial pipelines.
- <br/><br/>
- It includes a powerfull HTM5 interactive player which can be embedded in any web application to provide fancy waveforms, various analyzer results, synced time metadata display during playback (time-marking) and remote indexing.
- <br/><br/>
- The engine (server side) is fully written in Python, the player (client side) in HTML, CSS and JavaScript.
- </p>
-
- <aside class="notes">
- Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
- </aside>
- </section> #}
+ <section>
+ <h2>Heads up</h2>
+ <p>
+ TimeSide is a set of python components enabling easy audio processing, transcoding, imaging and streaming.
+ <br/><br/>
+ Its simple architecture and high-level API have been design to process serial pipelines.
+ <br/><br/>
+ It includes a powerfull HTM5 interactive player which can be embedded in any web application to provide fancy waveforms, various analyzer results, synced time metadata display during playback (time-marking) and remote indexing.
+ <br/><br/>
+ The engine (server side) is fully written in Python, the player (client side) in HTML, CSS and JavaScript.
+ </p>
+
+ <aside class="notes">
+ Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
+ </aside>
+ </section> #}
-->
- <section>
- <h2>Goals</h2>
- <p>We just <b>need</b> a python library to:</p>
- <br/>
- <ul>
- <li>build an open <a href="http://python.org" target="_blank">python</a> framework to do scalable asynchronous audio processing</li>
- <li>decode audio frames from <b>any</b> format into <a href="http://www.numpy.org/" target="_blank">numpy</a> arrays</li>
- <li>stream the frames in various processors and do <b>numpy data analyzing</b></li>
- <li>create various <b>image outputs</b> like waveforms, spectrograms, etc.. with numpy and PIL</li>
- <li><b>transcode</b> the processed frames in various media formats and <b>stream it on the fly in realtime</b></li>
- <li>provide a high-level <b>100% HTML5 user interface</b> to display the results <b>on demand</b> and <b>play sound</b> through the web</li>
- <li><b>metadata indexing</b>, <b>time marking</b> and <b>store everything</b> on a web server (see <a href="http://telemeta.org" target="_blank">Telemeta project</a>)</li>
- </ul>
- </section>
-
- <section>
- <h2>Architecture</h2>
- <img src="http://timeside.googlecode.com/git/doc/img/timeside_schema.png" alt="TimeSide architecture">
- </section>
-
- <section>
- <h2>Quick processing example</h2>
- <p>Define some processors:</p>
- <pre><code data-trim class="python">
+ <section>
+ <h2>Goals</h2>
+ <p>We just <b>need</b> a python library to:</p>
+ <br/>
+ <ul>
+ <li>build an open <a href="http://python.org" target="_blank">python</a> framework to do scalable asynchronous audio processing</li>
+ <li>decode audio frames from <b>any</b> format into <a href="http://www.numpy.org/" target="_blank">numpy</a> arrays</li>
+ <li>stream the frames in various processors and do <b>numpy data analyzing</b></li>
+ <li>create various <b>image outputs</b> like waveforms, spectrograms, etc.. with numpy and PIL</li>
+ <li><b>transcode</b> the processed frames in various media formats and <b>stream it on the fly in realtime</b></li>
+ <li>provide a high-level <b>100% HTML5 user interface</b> to display the results <b>on demand</b> and <b>play sound</b> through the web</li>
+ <li><b>metadata indexing</b>, <b>time marking</b> and <b>store everything</b> on a web server (see <a href="http://telemeta.org" target="_blank">Telemeta project</a>)</li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Architecture</h2>
+ <img src="http://timeside.googlecode.com/git/doc/img/timeside_schema.png" alt="TimeSide architecture">
+ </section>
+
+ <section>
+ <h2>Quick processing example</h2>
+ <p>Define some processors:</p>
+ <pre><code data-trim class="python">
import timeside.decoder
import timeside.grapher
import timeside.analyzer
grapher = timeside.grapher.Waveform()
analyzer = timeside.analyzer.Level()
encoder = timeside.encoder.Mp3Encoder('tests/samples/sweep.mp3')
- </code></pre>
- <p>then, the <i>magic</i> pipeline:</p>
- <pre><code data-trim>
+ </code></pre>
+ <p>then, the <i>magic</i> pipeline:</p>
+ <pre><code data-trim>
(decoder | grapher | analyzer | encoder).run()
- </code></pre>
- <p>get the results:</p>
- <pre><code data-trim>
+ </code></pre>
+ <p>get the results:</p>
+ <pre><code data-trim>
grapher.render(output='image.png')
print 'Level:', analyzer.results()
- </code></pre>
- </section>
-
- <section>
- <h2>Quick UI example</h2>
- <iframe width='374' height='221' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://parisson.telemeta.org/archives/items/PRS_07_01_01/player/360x130'></iframe>
- <br/><br/>
- <p>Documentation : <a href="https://code.google.com/p/timeside/wiki/UiGuide">UiGuide</a></p>
- </section>
-
-
- <section>
- <h2>Changelog (dev branch, 05/13)</h2>
- <ul>
- <li>finally fix all decoder memory leaks! (piem)</li>
- <li>fix ogg vorbis and flac encoders (piem)</li>
- <li>add various <a href="http://aubio.org" target="_blank">aubio</a> analyzers thanks to piem such as : </li>
- <ul>
- <li>pitch (f0)</li>
- <li>onsets</li>
- <li>tempo</li>
- <li>various spectral descriptors like : hfc, complex, phase, specdiff, kl,
- mkl, specflux, centroid, slope, rolloff, spread, skewness, kurtosis, decrease</li>
- </ul>
- <li>new AnalyzerResultContainer and AnalyzerResult classes with various i/o formats : xml, json, yaml, numpy (piem)</li>
- <li>more unit tests (piem)</li>
- <li>UI : rewind player after ending + various bugfixes (yomguy)
- <li>separate hosting for test samples (yomguy)</li>
- </ul>
- </section>
-
-
- <section>
- <h2>Install for production</h2>
- <p>for version 0.4.3 on Linux (Debian Stable 7.0)</p>
- <pre><code data-trim class="bash">
+ </code></pre>
+ </section>
+
+ <section>
+ <h2>Quick UI example</h2>
+ <iframe width='374' height='221' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='http://parisson.telemeta.org/archives/items/PRS_07_01_01/player/360x130'></iframe>
+ <br/><br/>
+ <p>Documentation : <a href="https://code.google.com/p/timeside/wiki/UiGuide">UiGuide</a></p>
+ </section>
+
+
+ <section>
+ <h2>Changelog (dev branch, 05/13)</h2>
+ <ul>
+ <li>finally fix all decoder memory leaks! (piem)</li>
+ <li>fix ogg vorbis and flac encoders (piem)</li>
+ <li>add various <a href="http://aubio.org" target="_blank">aubio</a> analyzers thanks to piem such as : </li>
+ <ul>
+ <li>pitch (f0)</li>
+ <li>onsets</li>
+ <li>tempo</li>
+ <li>various spectral descriptors like : hfc, complex, phase, specdiff, kl,
+ mkl, specflux, centroid, slope, rolloff, spread, skewness, kurtosis, decrease</li>
+ </ul>
+ <li>new AnalyzerResultContainer and AnalyzerResult classes with various i/o formats : xml, json, yaml, numpy (piem)</li>
+ <li>more unit tests (piem)</li>
+ <li>UI : rewind player after ending + various bugfixes (yomguy)
+ <li>separate hosting for test samples (yomguy)</li>
+ </ul>
+ </section>
+
+
+ <section>
+ <h2>Install for production</h2>
+ <p>for version 0.4.3 on Linux (Debian Stable 7.0)</p>
+ <pre><code data-trim class="bash">
sudo apt-get update
sudo apt-get install python python-pip python-setuptools python-gobject \
python-simplejson
sudo pip install timeside
- </code></pre>
- </section>
+ </code></pre>
+ </section>
- <section>
- <h2>Install for development 1/2</h2>
- <p>for version >= 0.5 + aubio 0.4dev on Linux (Debian Stable 7.0)</p>
- <pre><code data-trim class="bash">
+ <section>
+ <h2>Install for development 1/2</h2>
+ <p>for version >= 0.5 + aubio 0.4dev on Linux (Debian Stable 7.0)</p>
+ <pre><code data-trim class="bash">
sudo apt-get update
sudo apt-get install python python-dev python-pip python-setuptools python-gobject \
cd python
sudo python setup.py install
- </code></pre>
- </section>
+ </code></pre>
+ </section>
- <section>
- <h2>Install for development 2/2</h2>
+ <section>
+ <h2>Install for development 2/2</h2>
- <pre><code data-trim class="bash">
+ <pre><code data-trim class="bash">
git clone https://github.com/yomguy/TimeSide.git
tests/run_all_tests
- </code></pre>
+ </code></pre>
- <h3>Ready!</h3>
- </section>
+ <h3>Ready!</h3>
+ </section>
- <section>
- <h2>API</h2>
- <a href="https://github.com/yomguy/TimeSide/blob/dev/timeside/api.py#L26" target="_blank">IProcessor</a>
- <pre><code data-trim class="python">
+ <section>
+ <h2>API</h2>
+ <a href="https://github.com/yomguy/TimeSide/blob/dev/timeside/api.py#L26" target="_blank">IProcessor</a>
+ <pre><code data-trim class="python">
class IProcessor(Interface):
"""Common processor interface"""
# implementations should always call the parent method
- </code></pre>
- </section>
+ </code></pre>
+ </section>
- <section>
- <h2>API</h2>
- <a href="https://github.com/yomguy/TimeSide/blob/dev/timeside/api.py#L132" target="_blank">IDecoder</a>
- <pre><code data-trim class="python">
+ <section>
+ <h2>API</h2>
+ <a href="https://github.com/yomguy/TimeSide/blob/dev/timeside/api.py#L132" target="_blank">IDecoder</a>
+ <pre><code data-trim class="python">
class IDecoder(IProcessor):
"""Decoder driver interface. Decoders are different of encoders in that
a given driver may support several input formats, hence this interface doesn't
def metadata(self):
"""Return the metadata embedded into the encoded stream, if any."""
- </code></pre>
- </section>
+ </code></pre>
+ </section>
- <section>
- <h2>API</h2>
- <a href="https://github.com/yomguy/TimeSide/blob/dev/timeside/api.py#L180" target="_blank">IAnalyzer</a>
- <pre><code data-trim class="python">
+ <section>
+ <h2>API</h2>
+ <a href="https://github.com/yomguy/TimeSide/blob/dev/timeside/api.py#L180" target="_blank">IAnalyzer</a>
+ <pre><code data-trim class="python">
class IAnalyzer(IProcessor):
"""Media item analyzer driver interface. This interface is abstract, it doesn't
describe a particular type of analyzer but is rather meant to group analyzers.
@staticmethod
def unit():
"""Return the unit of the data such as "dB", "seconds", etc... """
- </code></pre>
- </section>
+ </code></pre>
+ </section>
- <section>
- <h2>API</h2>
- <a href="https://github.com/yomguy/TimeSide/blob/dev/timeside/analyzer/core.py#L80" target="_blank">AnalyzerResultContainer</a>
- <pre><code data-trim class="python">
+ <section>
+ <h2>API</h2>
+ <a href="https://github.com/yomguy/TimeSide/blob/dev/timeside/analyzer/core.py#L80" target="_blank">AnalyzerResultContainer</a>
+ <pre><code data-trim class="python">
class AnalyzerResultContainer(object):
def __init__(self, analyzer_results = []):
def from_numpy(self, input_file):
import numpy
return numpy.load(input_file)
- </code></pre>
- </section>
+ </code></pre>
+ </section>
- <section>
- <h2>Howto implement an analyzer plugin?</h2>
- <p>start from this template</p>
- <pre><code data-trim class="python">
+ <section>
+ <h2>Howto implement an analyzer plugin?</h2>
+ <p>start from this template</p>
+ <pre><code data-trim class="python">
from timeside.core import Processor, implements, interfacedoc, FixedSizeInputAdapter
from timeside.analyzer.core import *
-from timeside.api import IValueAnalyzer
+from timeside.api import IAnalyzer
import numpy
-class NewAnalyzer(Processor):
- implements(IValueAnalyzer)
+class NewAnalyzer(Analyzer):
+ implements(IAnalyzer)
@interfacedoc
def setup(self, channels=None, samplerate=None, blocksize=None, totalframes=None):
return frames, eod
def results(self):
- container = AnalyzerResultContainer()
result = AnalyzerResult(id = self.id(), name = self.name(), unit = "something")
result.value = self.result_data
return container
- </code></pre>
- </section>
-
- <section>
- <h2>Howto implement an analyzer plugin?</h2>
- <ul>
- <li>adapt the template</li>
- <li>save the file in timeside/analyzer/
- <br/>for instance : timeside/analyzer/new_analyzer.py</li>
- <li>add it to timeside/analyzer/__init__.py like:</li>
- </ul>
- <pre><code data-trim class="python">
+ </code></pre>
+ </section>
+
+ <section>
+ <h2>Howto implement an analyzer plugin?</h2>
+ <ul>
+ <li>adapt the template</li>
+ <li>save the file in timeside/analyzer/
+ <br/>for instance : timeside/analyzer/new_analyzer.py</li>
+ <li>add it to timeside/analyzer/__init__.py like:</li>
+ </ul>
+ <pre><code data-trim class="python">
from level import *
from dc import *
from aubio_temporal import *
from aubio_mfcc import *
from aubio_melenergy import *
from aubio_specdesc import *
+from yaafe import * # TF : add Yaafe analyzer
+from spectrogram import Spectrogram
+from waveform import Waveform
+from vamp_plugin import VampSimpleHost
+from irit_speech_entropy import *
+from irit_speech_4hz import *
from new_analyzer import * # << here
- </code></pre>
- </section>
+ </code></pre>
+ </section>
- <section>
- <h2>Howto implement an analyzer plugin?</h2>
- <p>then test it!
- <pre><code data-trim class="python">
-import timeside.decoder
-import timeside.analyzer
+ <section>
+ <h2>Howto implement an analyzer plugin?</h2>
+ <p>then test it!
+ <pre><code data-trim class="python">
+import timeside
decoder = timeside.decoder.FileDecoder('tests/samples/sweep.wav')
analyzer = timeside.analyzer.NewAnalyzer()
(decoder | analyzer).run()
analyzer.results()
- </code></pre>
- </section>
-
- <section>
- <h2>Links</h2>
- <ul>
- <li><a href="https://code.google.com/p/timeside/" target="_blank">Official website and wiki</a></li>
- <li><a href="https://github.com/yomguy/TimeSide" target="_blank">Source code on GitHub</a></li>
+ </code></pre>
+ </section>
+
+ <section>
+ <h2>Links</h2>
+ <ul>
+ <li><a href="https://code.google.com/p/timeside/" target="_blank">Official website and wiki</a></li>
+ <li><a href="https://github.com/yomguy/TimeSide" target="_blank">Source code on GitHub</a></li>
<li><a href="http://files.parisson.com/api/timeside/" target="_blank">API</a></li>
- <li><a href="http://telemeta.org" target="_blank">Telemeta project : web audio CMS</a></li>
- <li><a href="http://aubio.org" target="_blank">Aubio project</a></li>
- <li><a href="http://www.gnu.org/licenses/gpl.html" target="_blank">GNU General Public License</a></li>
- </ul>
- </section>
-
- <section>
- <h2>Thanks!</h2>
- <p>by Guillaume Pellerin</p>
- <p><a href="mailto:guillaume@parisson.com">guillaume@parisson.com</a></p>
- <p><a href="https://twitter.com/yomguy" target="_blank">@yomguy</a></p>
- <br/>
- <p><small>This document is released under the terms of the contract Creative Commons <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/fr/" target="_blank">by-nc-sa/2.0/fr</a></small></p>
- </section>
-
- </div>
-
- </div>
-
- <script src="http://files.parisson.com/static/reveal.js/lib/js/head.min.js"></script>
- <script src="http://files.parisson.com/static/reveal.js/js/reveal.min.js"></script>
-
- <script>
-
- // Full list of configuration options available here:
- // https://github.com/hakimel/reveal.js#configuration
- Reveal.initialize({
- controls: true,
- progress: true,
- history: true,
- center: true,
-
- // The "normal" size of the presentation, aspect ratio will be preserved
- // when the presentation is scaled to fit different resolutions. Can be
- // specified using percentage units.
- width: 960,
- height: 700,
-
- // Factor of the display size that should remain empty around the content
- margin: 0.1,
-
- // Bounds for smallest/largest possible scale to apply to content
- minScale: 0.2,
- maxScale: 1.0,
-
- theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
- transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
-
- // Optional libraries used to extend on reveal.js
- dependencies: [
- { src: 'http://files.parisson.com/static/reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
- { src: 'http://files.parisson.com/static/reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
- { src: 'http://files.parisson.com/static/reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
- { src: 'http://files.parisson.com/static/reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
- { src: 'http://files.parisson.com/static/reveal.js/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
- { src: 'http://files.parisson.com/static/reveal.js/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
- // { src: 'plugin/search/search.js', async: true, condition: function() { return !!document.body.classList; } }
- // { src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }
- ]
- });
-
- </script>
-
- </body>
+ <li><a href="http://telemeta.org" target="_blank">Telemeta project : web audio CMS</a></li>
+ <li><a href="http://aubio.org" target="_blank">Aubio project</a></li>
+ <li><a href="http://www.gnu.org/licenses/gpl.html" target="_blank">GNU General Public License</a></li>
+ </ul>
+ </section>
+
+ <section>
+ <h2>Thanks!</h2>
+ <p>by Guillaume Pellerin</p>
+ <p><a href="mailto:guillaume@parisson.com">guillaume@parisson.com</a></p>
+ <p><a href="https://twitter.com/yomguy" target="_blank">@yomguy</a></p>
+ <br/>
+ <p><small>This document is released under the terms of the contract Creative Commons <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/fr/" target="_blank">by-nc-sa/2.0/fr</a></small></p>
+ </section>
+
+ </div>
+
+ </div>
+
+ <script src="http://files.parisson.com/static/reveal.js/lib/js/head.min.js"></script>
+ <script src="http://files.parisson.com/static/reveal.js/js/reveal.min.js"></script>
+
+ <script>
+
+ // Full list of configuration options available here:
+ // https://github.com/hakimel/reveal.js#configuration
+ Reveal.initialize({
+ controls: true,
+ progress: true,
+ history: true,
+ center: true,
+
+ // The "normal" size of the presentation, aspect ratio will be preserved
+ // when the presentation is scaled to fit different resolutions. Can be
+ // specified using percentage units.
+ width: 960,
+ height: 700,
+
+ // Factor of the display size that should remain empty around the content
+ margin: 0.1,
+
+ // Bounds for smallest/largest possible scale to apply to content
+ minScale: 0.2,
+ maxScale: 1.0,
+
+ theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
+ transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
+
+ // Optional libraries used to extend on reveal.js
+ dependencies: [
+ { src: 'http://files.parisson.com/static/reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
+ { src: 'http://files.parisson.com/static/reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
+ { src: 'http://files.parisson.com/static/reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
+ { src: 'http://files.parisson.com/static/reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
+ { src: 'http://files.parisson.com/static/reveal.js/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
+ { src: 'http://files.parisson.com/static/reveal.js/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
+ // { src: 'plugin/search/search.js', async: true, condition: function() { return !!document.body.classList; } }
+ // { src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }
+ ]
+ });
+
+ </script>
+
+ </body>
</html>