class_docstr: HarmonicPercussiveSourceSeparation is a Processor which separates the
  magnitude spectrogram into its harmonic and percussive components with
  median filters.
  
  Parameters
  ----------
  masking : float or str
      Can be either the literal 'binary' or any float coefficient resulting
      in a soft mask. 'None' translates to a binary mask, too.
  harmonic_filter : tuple of ints
      Tuple with harmonic filter size (frames, bins).
  percussive_filter : tuple of ints
      Tuple with percussive filter size (frames, bins).
  
  References
  ----------
  .. [1] Derry FitzGerald,
         "Harmonic/percussive separation using median filtering.",
         Proceedings of the 13th International Conference on Digital Audio
         Effects (DAFx), Graz, Austria, 2010.
docstr: Returns the harmonic and percussive components of the given data.
  
  Parameters
  ----------
  data : numpy array
      Data to be split into harmonic and percussive components.
  
  Returns
  -------
  harmonic components : numpy array
      Harmonic components.
  percussive components : numpy array
      Percussive components.
docstr_tok: ["Returns","the","harmonic","and","percussive","components","of","the","given","data",".","Parameters","--","--","--","--","--","data",":","numpy","array","Data","to","be","split","into","harmonic","and","percussive","components",".","Returns","--","--","--","-","harmonic","components",":","numpy","array","Harmonic","components",".","percussive","components",":","numpy","array","Percussive","components","."]
code: def process(self, data):
      """
      Returns the harmonic and percussive components of the given data.
  
      Parameters
      ----------
      data : numpy array
          Data to be split into harmonic and percussive components.
  
      Returns
      -------
      harmonic components : numpy array
          Harmonic components.
      percussive components : numpy array
          Percussive components.
  
      """
      from .spectrogram import Spectrogram
  
      # data must be in the right format
      if isinstance(data, Spectrogram):
          # use the magnitude spectrogram of the Spectrogram
          spectrogram = data.spec
      # compute the harmonic and percussive slices
      slices = self.slices(spectrogram)
      # compute the corresponding masks
      harmonic_mask, percussive_mask = self.masks(*slices)
      # filter the data
      harmonic = spectrogram * harmonic_mask
      percussive = spectrogram * percussive_mask
      # and return it
      return harmonic, percussive
  
file_path: madmom/madmom/audio/hpss.py
imports: from __future__ import absolute_import, division, print_function
  import numpy
  from madmom.processors import Processor
label_desc: Use image node_id 4 for calling the HarmonicPercussiveSourceSeparation obj's underlying member method code with example usage: obj.process(data) and returns: harmonic,  percussive