From e76b15e029f552f6496b99787e709a24fe51f2fb Mon Sep 17 00:00:00 2001 From: yomguy Date: Fri, 18 Jun 2010 23:06:30 +0000 Subject: [PATCH] fix INSTALL rst, add INSTALL.html --- INSTALL | 35 +++-- INSTALL.html | 407 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 428 insertions(+), 14 deletions(-) create mode 100644 INSTALL.html diff --git a/INSTALL b/INSTALL index c5adc74..736a861 100644 --- a/INSTALL +++ b/INSTALL @@ -1,12 +1,12 @@ -======= -INSTALL -======= +================ +Install TimeSide +================ This file describe how to install the TimeSide python package from source. -Install dependencies -==================== +1. Install dependencies +======================= TimeSide needs some other python modules to run. See README for the full dependency list. @@ -22,12 +22,13 @@ Write your root password. Add backports repository to the apt sources.list:: - $ echo "deb http://www.backports.org/debian lenny-backports main contrib non-free" | tee -a /etc/apt/sources.list + $ echo "deb http://www.backports.org/debian lenny-backports main contrib non-free" | tee -a /etc/apt/sources.list Note : you can paste the full command but without the shell character '$'. Then : $ apt-get update + $ apt-get -t lenny-backports upgrade Say 'YES' to all questions. Then:: @@ -37,8 +38,8 @@ Say 'YES' to all questions. Then:: gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-good -Install TimeSide -================ +2. Install TimeSide +=================== Get the code and install:: @@ -50,11 +51,12 @@ This installs all timeside sub modules as decoders, encoders, analyzers, grapher a few scripts. -Use TimeSide -============ +3. Use TimeSide +=============== + +3.1. Waveform batching +---------------------- -Waveform batching ------------------ You can use waveform_batch to create some waveforms from a media (audio) directory, type:: $ waveform_batch /path/to/media_dir /path/to/img_dir @@ -96,8 +98,8 @@ Save the script and re-run setup:: $ python setup.py install -Any other pipe processing ! ---------------------------- +3.2. Any other pipe processing ! +-------------------------------- For example, a normalization and a waveform, from a python shell:: @@ -112,9 +114,14 @@ For example, a normalization and a waveform, from a python shell:: >>> print 'Level:', analyzer.result() +4. More informations +==================== + See the website for more examples and information about the TimeSide API: http://code.google.com/p/timeside/ + http://code.google.com/p/timeside/wiki/PythonApi + http://code.google.com/p/timeside/source/browse/trunk/timeside/api.py diff --git a/INSTALL.html b/INSTALL.html new file mode 100644 index 0000000..ff7d2d6 --- /dev/null +++ b/INSTALL.html @@ -0,0 +1,407 @@ + + + + + + +Install TimeSide + + + +
+

Install TimeSide

+ +

This file describe how to install the TimeSide python package from source.

+
+

1. Install dependencies

+

TimeSide needs some other python modules to run. +See README for the full dependency list.

+

The following methods explain how to install all dependencies on a Debian based system +and espacially on Debian Lenny 5.x Stable. Is it now considered you have install this system correctly.

+

Become root. In a terminal or console, run:

+
+$ su
+
+

Write your root password.

+

Add backports repository to the apt sources.list:

+
+$ echo "deb http://www.backports.org/debian lenny-backports main contrib non-free" | tee -a /etc/apt/sources.list
+
+

Note : you can paste the full command but without the shell character '$'. +Then :

+
+

$ apt-get update

+

$ apt-get -t lenny-backports upgrade

+
+

Say 'YES' to all questions. Then:

+
+$ apt-get install -t lenny-backports vim subversion python python-setuptools python-xml python-mutagen \
+                        python-imaging python-numpy python-gst0.10 gstreamer0.10-plugins-base \
+                        gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-good
+
+
+
+

2. Install TimeSide

+

Get the code and install:

+
+$ svn export http://timeside.googlecode.com/svn/trunk/ timeside
+$ cd timeside
+$ python setup.py install
+
+

This installs all timeside sub modules as decoders, encoders, analyzers, graphers and +a few scripts.

+
+
+

3. Use TimeSide

+
+

3.1. Waveform batching

+

You can use waveform_batch to create some waveforms from a media (audio) directory, type:

+
+$ waveform_batch /path/to/media_dir /path/to/img_dir
+
+

Please use absolute paths. For example:

+
+$ waveform_batch /home/$user/music/mp3/ /home/$USER/images/
+
+

To change the color scheme or the size of the waveforms, edit the waveform_batch script:

+
+$ vi timeside/tools/waveform_batch
+
+

And change only the following variables of the GrapherScheme object:

+
+self.color_scheme = {
+    'waveform': [ # Four (R,G,B) tuples for three main color channels for the spectral centroid method
+                (173,173,173), (147,149,196), (77,80,138), (108,66,0)
+                # this is a purple one
+                ],
+    'spectrogram': [
+                (0, 0, 0), (58/4,68/4,65/4), (80/2,100/2,153/2), (90,180,100), (224,224,44), (255,60,30), (255,255,255)
+                ]}
+
+# Width of the image
+self.width = 2048
+
+# Height of the image
+self.height = 128
+
+# Background color
+self.bg_color = (255,255,255)
+
+# Force computation. By default, the class doesn't overwrite existing image files.
+self.force = False
+
+

Save the script and re-run setup:

+
+$ python setup.py install
+
+
+
+

3.2. Any other pipe processing !

+

For example, a normalization and a waveform, from a python shell:

+
+>>> import timeside
+
+
+>>> decoder  =  timeside.decoder.FileDecoder('source.wav')
+>>> grapher  =  timeside.grapher.Waveform('image.png')
+>>> analyzer =  timeside.analyzer.MaxLevel()
+>>> encoder  =  timeside.encoder.WavEncoder('output.wav')
+>>> (decoder | grapher | analyzer | encoder).run()
+>>> grapher.render()
+>>> print 'Level:', analyzer.result()
+
+
+
+
+

4. More informations

+

See the website for more examples and information about the TimeSide API:

+

http://code.google.com/p/timeside/

+

http://code.google.com/p/timeside/wiki/PythonApi

+

http://code.google.com/p/timeside/source/browse/trunk/timeside/api.py

+
+
+ + + -- 2.39.5