class_docstr: Waveform where peaks are colored relatively to the spectral centroids of each frame buffer.
      
class_docstr_tok: ["Waveform","where","peaks","are","colored","relatively","to","the","spectral","centroids","of","each","frame","buffer","."]
code: def process(self, frames, eod=False):
      if len(frames) != 1:
          buffer = frames[:, 0].copy()
          buffer.shape = (len(buffer), 1)
          for samples, end in self.pixels_adapter.process(buffer, eod):
              if self.pixel_cursor < self.image_width:
                  (
                      spectral_centroid,
                      db_spectrum,
                  ) = self.spectrum.process(samples, True)
                  line_color = self.color_lookup[
                      int(spectral_centroid * 255.0)
                  ]
                  self.draw_peaks(
                      self.pixel_cursor, peaks(samples), line_color
                  )
                  self.pixel_cursor += 1
      return frames, eod
  
file_path: TimeSide/timeside/plugins/grapher/waveform_centroid.py
imports: from timeside.core import implements, interfacedoc
  from timeside.core.api import IGrapher
  from .utils import peaks, interpolate_colors
  from timeside.plugins.grapher.waveform_simple import Waveform
  from timeside.plugins.grapher.color_schemes import default_color_schemes
label_desc: Use image node_id 6 for calling the WaveformCentroid obj's underlying member method code with example usage: obj.process(frames, eod) and returns: frames,  eod