Grapher package¶
Core module¶
-
class
timeside.core.grapher.
DisplayAnalyzer
(width=1024, height=256, bg_color=(0, 0, 0), color_scheme='default')[source]¶ Bases:
timeside.core.grapher.Grapher
image from analyzer result This is an Abstract base class
Create a new grapher. width and height are generally in pixels but could be something else for eg. svg rendering, etc..
-
post_process
()[source]¶ Post-Process data after processign the input frames with process()
Processors such as analyzers will produce Results during the Post-Process
-
process
(frames, eod=False)[source]¶ 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.
-
-
class
timeside.core.grapher.
Grapher
(width=1024, height=256, bg_color=None, color_scheme='default')[source]¶ Bases:
timeside.core.processor.Processor
Generic abstract class for the graphers
Graphers¶
Waveform¶
-
class
timeside.plugins.grapher.waveform_simple.
Waveform
(width=1024, height=256, bg_color=(255, 255, 255), color_scheme='default')[source]¶ Bases:
timeside.core.grapher.Grapher
Simple monochrome waveform image.
Create a new grapher. width and height are generally in pixels but could be something else for eg. svg rendering, etc..
-
static
id
()[source]¶ Short alphanumeric, lower-case string which uniquely identify this processor, suitable for use as an HTTP/GET argument value, in filenames, etc…
-
post_process
(output=None)[source]¶ Post-Process data after processign the input frames with process()
Processors such as analyzers will produce Results during the Post-Process
-
process
(frames, eod=False)[source]¶ 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.
-
setup
(channels=None, samplerate=None, blocksize=None, totalframes=None)[source]¶ 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.
-
static
WaveformCentroid¶
-
class
timeside.plugins.grapher.waveform_centroid.
WaveformCentroid
(width=1024, height=256, bg_color=(0, 0, 0), color_scheme='default')[source]¶ Bases:
timeside.plugins.grapher.waveform_simple.Waveform
Waveform where peaks are colored relatively to the spectral centroids of each frame buffer.
Create a new grapher. width and height are generally in pixels but could be something else for eg. svg rendering, etc..
-
static
id
()[source]¶ Short alphanumeric, lower-case string which uniquely identify this processor, suitable for use as an HTTP/GET argument value, in filenames, etc…
-
process
(frames, eod=False)[source]¶ 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.
-
setup
(channels=None, samplerate=None, blocksize=None, totalframes=None)[source]¶ 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.
-
static
WaveformTransparent¶
-
class
timeside.plugins.grapher.waveform_centroid.
WaveformCentroid
(width=1024, height=256, bg_color=(0, 0, 0), color_scheme='default')[source] Bases:
timeside.plugins.grapher.waveform_simple.Waveform
Waveform where peaks are colored relatively to the spectral centroids of each frame buffer.
Create a new grapher. width and height are generally in pixels but could be something else for eg. svg rendering, etc..
-
static
id
()[source] Short alphanumeric, lower-case string which uniquely identify this processor, suitable for use as an HTTP/GET argument value, in filenames, etc…
-
static
name
()[source] Return the graph name, such as “Waveform”, “Spectral view”, etc..
-
process
(frames, eod=False)[source] 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.
-
setup
(channels=None, samplerate=None, blocksize=None, totalframes=None)[source] 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.
-
static
WaveformContour¶
-
class
timeside.plugins.grapher.waveform_contour.
WaveformContourBlack
(width=1024, height=256, bg_color=(0, 0, 0), color_scheme='default')[source]¶ Bases:
timeside.plugins.grapher.waveform_simple.Waveform
Black amplitude contour waveform.
Create a new grapher. width and height are generally in pixels but could be something else for eg. svg rendering, etc..
-
static
id
()[source]¶ Short alphanumeric, lower-case string which uniquely identify this processor, suitable for use as an HTTP/GET argument value, in filenames, etc…
-
process
(frames, eod=False)[source]¶ 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.
-
setup
(channels=None, samplerate=None, blocksize=None, totalframes=None)[source]¶ 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.
-
static
-
class
timeside.plugins.grapher.waveform_contour.
WaveformContourWhite
(width=1024, height=256, bg_color=(255, 255, 255), color_scheme='default')[source]¶ Bases:
timeside.plugins.grapher.waveform_contour.WaveformContourBlack
an white amplitude contour wavform.
Create a new grapher. width and height are generally in pixels but could be something else for eg. svg rendering, etc..
SpectrogramLog¶
-
class
timeside.plugins.grapher.spectrogram_log.
SpectrogramLog
(width=1024, height=256, bg_color=(0, 0, 0), color_scheme='default')[source]¶ Bases:
timeside.core.grapher.Grapher
Logarithmic scaled spectrogram (level vs. frequency vs. time).
Adds pixels iteratively thanks to the adapter providing fixed size frame buffers.
Create a new grapher. width and height are generally in pixels but could be something else for eg. svg rendering, etc..
-
static
id
()[source]¶ Short alphanumeric, lower-case string which uniquely identify this processor, suitable for use as an HTTP/GET argument value, in filenames, etc…
-
process
(frames, eod=False)[source]¶ 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.
-
setup
(channels=None, samplerate=None, blocksize=None, totalframes=None)[source]¶ 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.
-
static
SpectrogramLin¶
-
class
timeside.plugins.grapher.spectrogram_lin.
SpectrogramLinear
(width=1024, height=256, bg_color=(0, 0, 0), color_scheme='default')[source]¶ Bases:
timeside.plugins.grapher.spectrogram_log.SpectrogramLog
Linear scaled spectrogram (level vs. frequency vs. time).
Adds pixels iteratively thanks to the adapter providing fixed size frame buffers.
Create a new grapher. width and height are generally in pixels but could be something else for eg. svg rendering, etc..
-
static
id
()[source]¶ Short alphanumeric, lower-case string which uniquely identify this processor, suitable for use as an HTTP/GET argument value, in filenames, etc…
-
setup
(channels=None, samplerate=None, blocksize=None, totalframes=None)[source]¶ 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.
-
static