Package timeside :: Package grapher :: Module core :: Class Grapher
[hide private]
[frames] | no frames]

Class Grapher

source code

         object --+        
                  |        
component.Component --+    
                      |    
         core.Processor --+
                          |
                         Grapher
Known Subclasses:

Generic abstract class for the graphers

Nested Classes [hide private]

Inherited from core.Processor: __metaclass__

Instance Methods [hide private]
 
__init__(self, width=1024, height=256, bg_color=None, color_scheme='default')
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
set_colors(self, bg_color, color_scheme) source code
 
setup(self, channels=None, samplerate=None, blocksize=None, totalframes=None)
Allocate internal resources and reset state, so that this processor is ready for a new run.
source code
 
render(self, output=None)
Return a PIL Image object visually representing all of the data passed by repeatedly calling process() and write the image to the output if specified
source code
 
watermark(self, text, font=None, color=(255, 255, 255), opacity=0.6, margin=(5, 5)) source code
 
draw_peaks(self, x, peaks, line_color)
Draw 2 peaks at x
source code
 
draw_peaks_inverted(self, x, peaks, line_color)
Draw 2 inverted peaks at x
source code
 
draw_anti_aliased_pixels(self, x, y1, y2, color)
vertical anti-aliasing at y1 and y2
source code
 
draw_peaks_contour(self) source code

Inherited from core.Processor: __del__, __or__, blocksize, channels, mediainfo, post_process, process, release, samplerate, totalframes, uuid

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
 
id() source code
 
name() source code
Class Variables [hide private]
  fft_size = 4096
  frame_cursor = 0
  pixel_cursor = 0
  lower_freq = 20
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, width=1024, height=256, bg_color=None, color_scheme='default')
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

setup(self, channels=None, samplerate=None, blocksize=None, totalframes=None)

source code 

Allocate internal resources and reset state, so that this processor is ready for a new run.

The channels, samplerate and/or blocksize and/or totalframes arguments may be required by processors which accept input. An error will occur if any of these arguments is passed to an output-only processor such as a decoder.

Overrides: core.Processor.setup
(inherited documentation)

render(self, output=None)

source code 

Return a PIL Image object visually representing all of the data passed by repeatedly calling process() and write the image to the output if specified

Decorators:
  • @interfacedoc