]> git.parisson.com Git - timeside.git/commitdiff
Render AubioPitch grapher only if Aubio is available
authorThomas Fillon <thomas@parisson.com>
Tue, 15 Apr 2014 22:09:22 +0000 (00:09 +0200)
committerThomas Fillon <thomas@parisson.com>
Tue, 15 Apr 2014 22:09:22 +0000 (00:09 +0200)
timeside/grapher/render_analyzers.py

index b2fa143e74ee80d35d6323dc7c3d9621540a7033..70caa585d91f42269df0515009c48871cb50a836 100644 (file)
@@ -92,14 +92,13 @@ class DisplayAnalyzer(Grapher):
         return NewGrapher
 
 
-
 # From here define new Grapher based on Analyzers
-
-aubiopitch = analyzer.AubioPitch()
-DisplayAubioPitch = DisplayAnalyzer.create(analyzer=aubiopitch,
-                                           result_id='aubio_pitch.pitch',
-                                           grapher_id='grapher_aubio_pitch',
-                                           grapher_name='Aubio Pitch')
+if analyzer.WITH_AUBIO:
+    aubiopitch = analyzer.AubioPitch()
+    DisplayAubioPitch = DisplayAnalyzer.create(analyzer=aubiopitch,
+                                               result_id='aubio_pitch.pitch',
+                                               grapher_id='grapher_aubio_pitch',
+                                               grapher_name='Aubio Pitch')
 
 
 odf = analyzer.OnsetDetectionFunction()