Package timeside :: Package grapher :: Module spectrogram_lin :: Class SpectrogramLinear
[hide private]
[frames] | no frames]

Class SpectrogramLinear

source code

         object --+                
                  |                
component.Component --+            
                      |            
         core.Processor --+        
                          |        
               core.Grapher --+    
                              |    
 spectrogram_log.SpectrogramLog --+
                                  |
                                 SpectrogramLinear

Builds a PIL image representing a spectrogram of the audio stream (level vs. frequency vs. time). Adds pixels iteratively thanks to the adapter providing fixed size frame buffers.

Nested Classes [hide private]

Inherited from core.Processor: __metaclass__

Instance Methods [hide private]
 
__init__(self, width=1024, height=256, bg_color=(0, 0, 0), color_scheme='default')
Create a new grapher.
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
 
set_scale(self)
generate the lookup which translates y-coordinate to fft-bin
source code

Inherited from spectrogram_log.SpectrogramLog: draw_spectrum, post_process, process

Inherited from core.Grapher: draw_anti_aliased_pixels, draw_peaks, draw_peaks_contour, draw_peaks_inverted, render, set_colors, watermark

Inherited from core.Processor: __del__, __or__, blocksize, channels, mediainfo, 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()
Short alphanumeric, lower-case string which uniquely identify this processor, suitable for use as an HTTP/GET argument value, in filenames, etc...
source code
 
name()
Return the graph name, such as "Waveform", "Spectral view", etc..
source code
Class Variables [hide private]

Inherited from core.Grapher: fft_size, frame_cursor, lower_freq, pixel_cursor

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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

source code 

Create a new grapher. width and height are generally in pixels but could be something else for eg. svg rendering, etc..

Decorators:
  • @interfacedoc
Overrides: object.__init__

id()
Static Method

source code 

Short alphanumeric, lower-case string which uniquely identify this processor, suitable for use as an HTTP/GET argument value, in filenames, etc...

Decorators:
  • @interfacedoc
Overrides: core.Grapher.id

name()
Static Method

source code 

Return the graph name, such as "Waveform", "Spectral view", etc..

Decorators:
  • @interfacedoc
Overrides: core.Grapher.name

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.

Decorators:
  • @interfacedoc
Overrides: core.Processor.setup

set_scale(self)

source code 

generate the lookup which translates y-coordinate to fft-bin

Overrides: spectrogram_log.SpectrogramLog.set_scale