class_docstr: Compressed Log Pitch (CLP) chroma as proposed in [1]_ and [2]_.
  
  Parameters
  ----------
  data : str, Signal, or SemitoneBandpassSpectrogram
      Input data.
  fps : int, optional
      Desired frame rate of the signal [Hz].
  fmin : float, optional
      Lowest frequency of the spectrogram [Hz].
  fmax : float, optional
      Highest frequency of the spectrogram [Hz].
  compression_factor : float, optional
      Factor for compression of the energy.
  norm : bool, optional
      Normalize the energy of each frame to one (divide by the L2 norm).
  threshold : float, optional
      If the energy of a frame is below a threshold, the energy is equally
      distributed among all chroma bins.
  
  Notes
  -----
  The resulting chromagrams differ slightly from those obtained by the
  MATLAB chroma toolbox [2]_ because of different resampling and filter
  methods.
  
  References
  ----------
  .. [1] Meinard Müller,
         "Information retrieval for music and motion", Springer, 2007.
  
  .. [2] Meinard Müller and Sebastian Ewert,
         "Chroma Toolbox: MATLAB Implementations for Extracting Variants of
         Chroma-Based Audio Features",
         Proceedings of the International Conference on Music Information
         Retrieval (ISMIR), 2011.
class_docstr_tok: ["Compressed","Log","Pitch","(","CLP",")","chroma","as","proposed","in","[","1","]","_","and","[","2","]","_.","Parameters","--","--","--","--","--","data",":","str",",","Signal",",","or","SemitoneBandpassSpectrogram","Input","data",".","fps",":","int",",","optional","Desired","frame","rate","of","the","signal","[","Hz","]",".","fmin",":","float",",","optional","Lowest","frequency","of","the","spectrogram","[","Hz","]",".","fmax",":","float",",","optional","Highest","frequency","of","the","spectrogram","[","Hz","]",".","compression_factor",":","float",",","optional","Factor","for","compression","of","the","energy",".","norm",":","bool",",","optional","Normalize","the","energy","of","each","frame","to","one","(","divide","by","the","L2","norm",")",".","threshold",":","float",",","optional","If","the","energy","of","a","frame","is","below","a","threshold",",","the","energy","is","equally","distributed","among","all","chroma","bins",".","Notes","--","--","-","The","resulting","chromagrams","differ","slightly","from","those","obtained","by","the","MATLAB","chroma","toolbox","[","2","]","_","because","of","different","resampling","and","filter","methods",".","References","--","--","--","--","--","..","[","1","]","Meinard","M\u00fcller",",","``","Information","retrieval","for","music","and","motion","''",",","Springer",",","2007",".","..","[","2","]","Meinard","M\u00fcller","and","Sebastian","Ewert",",","``","Chroma","Toolbox",":","MATLAB","Implementations","for","Extracting","Variants","of","Chroma-Based","Audio","Features","''",",","Proceedings","of","the","International","Conference","on","Music","Information","Retrieval","(","ISMIR",")",",","2011","."]
code: def __new__(
      cls,
      data,
      fps=CLP_FPS,
      fmin=CLP_FMIN,
      fmax=CLP_FMAX,
      compression_factor=CLP_COMPRESSION_FACTOR,
      norm=CLP_NORM,
      threshold=CLP_THRESHOLD,
      **kwargs,
  ):
      from madmom.audio.filters import hz2midi
  
      # check input type
      if not isinstance(data, SemitoneBandpassSpectrogram):
          # compute SemitoneBandpassSpectrogram
          data = SemitoneBandpassSpectrogram(
              data, fps=fps, fmin=fmin, fmax=fmax
          )
      # apply log compression
      log_pitch_energy = np.log10(data * compression_factor + 1)
      # compute chroma by adding up bins that correspond to the same
      # pitch class
      obj = np.zeros((log_pitch_energy.shape[0], 12)).view(cls)
      midi_min = int(np.round(hz2midi(data.bin_frequencies[0])))
      for p in range(log_pitch_energy.shape[1]):
          # make sure that p maps to the correct bin_label (midi_min=12
          # corresponds to a C and therefore chroma_idx=0)
          chroma_idx = np.mod(midi_min + p, 12)
          obj[:, chroma_idx] += log_pitch_energy[:, p]
      obj.bin_labels = [
          "C",
          "C#",
          "D",
          "D#",
          "E",
          "F",
          "F#",
          "G",
          "G#",
          "A",
          "A#",
          "B",
      ]
      obj.fps = fps
      if norm:
          # normalise the vectors according to the l2 norm
          mean_energy = np.sqrt((obj**2).sum(axis=1))
          idx_below_threshold = np.where(mean_energy < threshold)
          obj /= mean_energy[:, np.newaxis]
          obj[idx_below_threshold, :] = np.ones((1, 12)) / np.sqrt(12)
      return obj
  
imports: from __future__ import absolute_import, division, print_function
  import warnings
  import numpy
  from madmom.audio.filters import A4, Filterbank, PitchClassProfileFilterbank, HarmonicPitchClassProfileFilterbank
  from madmom.audio.spectrogram import Spectrogram, FilteredSpectrogram, SemitoneBandpassSpectrogram
  from madmom.processors import SequentialProcessor, Processor
label_desc: Use image node_id 2 for calling the CLPChroma obj's underlying member method code with example usage: obj.__new__(cls, data, fps, fmin, fmax, compression_factor, norm, threshold) and returns: obj