import timeside.grapher
import timeside.analyzer
from timeside.core import *
-
-
-
-
def setup(self, channels = None, samplerate = None, nframes = None):
# the output data format we want
caps = "audio/x-raw-float, width=32"
- pipeline = gst.parse_launch('''uridecodebin uri=%s
+ pipeline = gst.parse_launch('''uridecodebin uri="%s"
! audioconvert
! %s
! appsink name=sink sync=False ''' % (self.uri, caps))
if not x == 0:
if not self.symetry:
self.draw.line([self.previous_x, self.previous_y, x, y], line_color)
- #self.draw_anti_aliased_pixels(x, y, y, line_color)
+ self.draw_anti_aliased_pixels(x, y, y, line_color)
else:
self.draw.line([self.previous_x, self.previous_y+height, x, y+height], line_color)
- #self.draw_anti_aliased_pixels(x, y+height, y+height, line_color)
+ self.draw_anti_aliased_pixels(x, y+height, y+height, line_color)
self.draw.line([self.previous_x, -self.previous_y+height, x, -y+height], line_color)
- #self.draw_anti_aliased_pixels(x, -y+height, -y+height, line_color)
+ self.draw_anti_aliased_pixels(x, -y+height, -y+height, line_color)
else:
if not self.symetry:
self.draw.point((x, y), line_color)
class TestAnalyzer:
-
+
graphers = timeside.core.processors(timeside.api.IGrapher)
decoders = timeside.core.processors(timeside.api.IDecoder)
encoders= timeside.core.processors(timeside.api.IEncoder)
analyzers = timeside.core.processors(timeside.api.IAnalyzer)
-
+
def __init__(self, path):
self.source = os.path.join(os.path.dirname(__file__), path)
print "Processing %s" % self.source
self.analyzers_sub_pipe.append(sub_pipe)
self.pipe = self.pipe | sub_pipe
self.pipe.run()
-
+
def results(self):
analyzers = []
for analyzer in self.analyzers_sub_pipe:
test = TestAnalyzer('../samples/guitar.wav')
-#test = TestAnalyzer('/mnt/data4/Music1/Cellar_playlist_tmp/JanoB/VirulentAcidMix.wav')
+#test = TestAnalyzer('/home/momo/music/wav/Cellar/Cellar-FinallyMix_01.wav')
test.process()
test.results()
self.height = 96
# Background color
- self.bg_color = (136,136,136)
+ self.bg_color = (0,0,0)
# Force computation. By default, the class doesn't overwrite existing image files.
self.force = True