#!/usr/bin/python
# -*- coding: utf-8 -*-
#
-# Copyright (c) 2009-2010 Guillaume Pellerin <yomguy@parisson.com>
+# Copyright (c) 2009-2013 Guillaume Pellerin <yomguy@parisson.com>
# This file is part of TimeSide.
# Author: Guillaume Pellerin <yomguy@parisson.com>
-version = '0.3'
+version = '0.4'
import os
import sys
self.color_scheme = {
'waveform': [
# Four (R,G,B) tuples for three main color channels for the spectral centroid method
- (30,144,255), (30,144,255), (30,144,255), (30,144,255)
+ (0,0,255), (0,255,255), (255,255,0), (255,0,0)
],
'spectrogram': [
(0, 0, 0), (58/4,68/4,65/4), (80/2,100/2,153/2),
print 'Processing ', source
audio = os.path.join(os.path.dirname(__file__), source)
decoder = timeside.decoder.FileDecoder(audio)
- duration = decoder.duration
(decoder | waveform).run()
img_name = os.path.split(image)[1]
image = os.path.split(image)[0]+os.sep+os.path.splitext(img_name)[0] + '_' +\
- '_'.join([str(self.width), str(self.height),
- str(int(duration))])+os.path.splitext(img_name)[1]
+ '_'.join([str(self.width), str(self.height)])+os.path.splitext(img_name)[1]
waveform.graph.filename = image
print 'Rendering ', waveform.graph.filename
#print 'frames per pixel = ', waveform.graph.samples_per_pixel
print """
timeside-waveforms : TimeSide simple batch waveform generator
- usage : ./timeside-waveforms /path/to/media_dir /path/to/img_dir
- infos : http://code.google.com/p/timeside/
+ usage : timeside-waveforms /path/to/media_dir /path/to/img_dir
+ infos : https://github.com/yomguy/TimeSide/
version : %s
""" % version
else: