]> git.parisson.com Git - timeside.git/commitdiff
fix joydiv antialiasing, fix uri for decoder
authoryomguy <yomguy@parisson.com>
Thu, 7 Oct 2010 22:11:18 +0000 (22:11 +0000)
committeryomguy <yomguy@parisson.com>
Thu, 7 Oct 2010 22:11:18 +0000 (22:11 +0000)
timeside/__init__.py
timeside/decoder/core.py
timeside/grapher/waveform_joydiv.py
timeside/tests/api/test_analyzer.py
timeside/tools/waveform_batch.py

index 4d760f6e8f4f0b9b7e2da6be751b794092b286ae..88a5c7cad2b835f236ff9f3357d8a814473d05a9 100644 (file)
@@ -10,7 +10,3 @@ import timeside.encoder
 import timeside.grapher
 import timeside.analyzer
 from timeside.core import *
-
-
-
-
index 1c6f11d6c2bde0cd43164fbbcf3e0d9bac34839d..b66d13baecbabd89fcae0a96d814437b496cf38a 100644 (file)
@@ -56,7 +56,7 @@ class FileDecoder(Processor):
     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))
index 5de1a3419ae50ee9030f8fc016a19581efac44d5..5bd65cfcbe7593a848eae3e40fa64caa557716a2 100644 (file)
@@ -98,12 +98,12 @@ class WaveformImageJoyContour(WaveformImage):
                 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)
index 1ef11ea17dd65ab47176f9e7141d0c89165a384e..2b8198dc8c39a318149e35e3cbc2c0d0381a84dd 100644 (file)
@@ -7,12 +7,12 @@ import numpy
 
 
 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
@@ -27,7 +27,7 @@ class TestAnalyzer:
             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:
@@ -40,7 +40,7 @@ class TestAnalyzer:
 
 
 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()
 
index b0c2208bbaef58da3ead279fd29d5d99116f11f2..b46d6d5e2e26a469b92af5f21ec10e8a8f0c76a5 100644 (file)
@@ -45,7 +45,7 @@ class GrapherScheme:
         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