class_docstr: FFT based frequency analysis of audio frames.
class_docstr_tok: ["FFT","based","frequency","analysis","of","audio","frames","."]
code: def __init__(
      self,
      fft_size,
      samplerate,
      blocksize,
      totalframes,
      lower,
      higher,
      window_function=None,
  ):
      self.fft_size = fft_size
      self.window = window_function(self.fft_size)
      self.window_function = window_function
      self.spectrum_range = None
      self.lower = lower
      self.higher = higher
      self.blocksize = blocksize
      self.lower_log = math.log10(self.lower)
      self.higher_log = math.log10(self.higher)
      self.clip = lambda val, low, high: min(high, max(low, val))
      self.totalframes = totalframes
      self.samplerate = samplerate
      self.window_function = window_function
      self.window = self.window_function(self.blocksize)
      # Hanning window by default
      if self.window_function:
          self.window = self.window_function(self.blocksize)
      else:
          self.window_function = numpy.hanning
          self.window = self.window_function(self.blocksize)
  
imports: import math
  import numpy
  from timeside.core import Processor, implements, interfacedoc, abstract
  from timeside.core.processor import FixedSizeInputAdapter
  from timeside.core.api import IGrapher
  from timeside.plugins.grapher.utils import smooth, im_watermark, normalize
  import timeside.plugins.analyzer
label_desc: Use image node_id 1 to create a new Spectrum object from inherited base classes: object with example: obj = Spectrum(fft_size, samplerate, blocksize, totalframes, lower, higher, window_function)