\r
.analyzer {\r
background-color: #fff;\r
- color: #555;\r
+ color: #000;\r
border: 1px solid #adadad;\r
width: 301px;\r
padding: 2px;\r
font-size: 1em;\r
}\r
\r
+.analyzer_title {\r
+ background-color: #f2f2f2;\r
+ color: #000;\r
+ padding: 2px;\r
+}\r
+\r
+.analyzer_line {\r
+ background-color: #fdfdfd;\r
+ color: #000;\r
+ padding: 4px;\r
+}\r
+\r
/* Geographic navigator */\r
ul.continents, ul.continents ul { list-style: none; margin: 0; padding: 0;}\r
ul.continents { margin: 1em 0; }\r
\r
<div class="analyzer">\r
<table width="100%">\r
- <tr>\r
- <td>Parameter</td>\r
+ <tr class="analyzer_title">\r
+ <td>Property</td>\r
<td>Value</td>\r
<td>Unit</td>\r
<tr>\r
{% for analyser in analysers %}\r
- <tr>\r
+ <tr class="analyzer_line">\r
<td>\r
{{ analyser.name }}\r
</td>\r
"""Return a short id alphanumeric, lower-case string."""
def get_name():
- """Return the visualization name, such as "Waveform", "Spectral view",
- etc..
+ """Return the visualization name, such as "Waveform", "Spectral view",
+ etc..
"""
-
- def render(media_item, options=None):
- """Generator that streams the visualization output as a PNG image"""
-
+
+ def render(media_item, width=None, height=None, options=None):
+ """Generator that streams the visualization output as a PNG image"""
\ No newline at end of file
def get_name(self):
return "Waveform (audiolab)"
-
- def render(self, media_item, options=None):
+
+ def render(self, media_item, width=None, height=None, options=None):
"""Generator that streams the waveform as a PNG image with a python method"""
wav_file = media_item.file.path
pngFile_w = NamedTemporaryFile(suffix='.png')
pngFile_s = NamedTemporaryFile(suffix='.png')
- image_width = 305
- image_height = 150
+
+ if not width == None:
+ image_width = width
+ else:
+ image_width = 305
+ if not height == None:
+ image_height = height
+ else:
+ image_height = 150
+
fft_size = 2048
args = (wav_file, pngFile_w.name, pngFile_s.name, image_width, image_height, fft_size)
create_png(*args)
def get_name(self):
return "Waveform (audiolab large)"
-
- def render(self, media_item, options=None):
+
+ def render(self, media_item, width=None, height=None, options=None):
"""Generator that streams the waveform as a PNG image with a python method"""
wav_file = media_item.file.path
pngFile_w = NamedTemporaryFile(suffix='.png')
pngFile_s = NamedTemporaryFile(suffix='.png')
- image_width = 1800
- image_height = 300
+
+ if not width == None:
+ image_width = width
+ else:
+ image_width = 1800
+ if not height == None:
+ image_height = height
+ else:
+ image_height = 300
+
fft_size = 2048
args = (wav_file, pngFile_w.name, pngFile_s.name, image_width, image_height, fft_size)
create_png(*args)