Package timeside :: Package analyzer :: Module odf :: Class OnsetDetectionFunction
[hide private]
[frames] | no frames]

Class OnsetDetectionFunction

source code

         object --+            
                  |            
component.Component --+        
                      |        
         core.Processor --+    
                          |    
              core.Analyzer --+
                              |
                             OnsetDetectionFunction

Nested Classes [hide private]

Inherited from core.Processor: __metaclass__

Instance Methods [hide private]
 
__init__(self, blocksize=1024, stepsize=None)
x.__init__(...) initializes x; see help(type(x)) for signature
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
 
process(self, frames, eod=False)
Process input frames and return a (output_frames, eod) tuple.
source code
 
post_process(self)
Post-Process data after processign the input frames with process()
source code

Inherited from core.Analyzer: new_result

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 analyzer name, such as "Mean Level", "Max level", "Total length, etc..
source code
 
unit()
Return the unit of the data such as "dB", "seconds", etc...
source code
Properties [hide private]

Inherited from core.Analyzer: results

Inherited from object: __class__

Method Details [hide private]

__init__(self, blocksize=1024, stepsize=None)
(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.

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

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.Analyzer.id

name()
Static Method

source code 

Return the analyzer name, such as "Mean Level", "Max level", "Total length, etc..

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

unit()
Static Method

source code 

Return the unit of the data such as "dB", "seconds", etc...

Decorators:
  • @interfacedoc
Overrides: core.Analyzer.unit

process(self, frames, eod=False)

source code 

Process input frames and return a (output_frames, eod) tuple. Both input and output frames are 2D numpy arrays, where columns are channels, and containing an undetermined number of frames. eod=True means that the end-of-data has been reached.

Output-only processors (such as decoders) will raise an exception if the frames argument is not None. All processors (even encoders) return data, even if that means returning the input unchanged.

Warning: it is required to call setup() before this method.

Overrides: core.Processor.process
(inherited documentation)

post_process(self)

source code 

Post-Process data after processign the input frames with process()

Processors such as analyzers will produce Results during the Post-Process

Overrides: core.Processor.post_process
(inherited documentation)