class_docstr: This class implements the note onset peak-picking functionality.
  
  Parameters
  ----------
  threshold : float
      Threshold for peak-picking.
  smooth : float, optional
      Smooth the activation function over `smooth` seconds.
  pre_avg : float, optional
      Use `pre_avg` seconds past information for moving average.
  post_avg : float, optional
      Use `post_avg` seconds future information for moving average.
  pre_max : float, optional
      Use `pre_max` seconds past information for moving maximum.
  post_max : float, optional
      Use `post_max` seconds future information for moving maximum.
  combine : float, optional
      Only report one note per pitch within `combine` seconds.
  delay : float, optional
      Report the detected notes `delay` seconds delayed.
  online : bool, optional
      Use online peak-picking, i.e. no future information.
  fps : float, optional
      Frames per second used for conversion of timings.
  
  Returns
  -------
  notes : numpy array
      Detected notes [seconds, pitch].
  
  Notes
  -----
  If no moving average is needed (e.g. the activations are independent of
  the signal's level as for neural network activations), `pre_avg` and
  `post_avg` should be set to 0.
  For peak picking of local maxima, set `pre_max` >= 1. / `fps` and
  `post_max` >= 1. / `fps`.
  For online peak picking, all `post_` parameters are set to 0.
  
  Examples
  --------
  Create a NoteOnsetPeakPickingProcessor. The returned array represents the
  positions of the onsets in seconds, thus the frame rate has to be given.
  To obtain piano MIDI note numbers, the pitch offset must be set to 21.
  
  >>> proc = NoteOnsetPeakPickingProcessor(fps=100, pitch_offset=21)
  >>> proc  # doctest: +ELLIPSIS
  <madmom.features.notes.NoteOnsetPeakPickingProcessor object at 0x...>
  
  Call this NoteOnsetPeakPickingProcessor with the note activations from an
  RNNPianoNoteProcessor.
  
  >>> act = RNNPianoNoteProcessor()('tests/data/audio/stereo_sample.wav')
  >>> proc(act)  # doctest: +ELLIPSIS
  array([[ 0.14, 72.  ],
         [ 1.56, 41.  ],
         [ 3.37, 75.  ]])
docstr: Detect the notes in the given activation function.
  
  Parameters
  ----------
  activations : numpy array
      Note activation function.
  
  Returns
  -------
  onsets : numpy array
      Detected notes [seconds, pitches].
docstr_tok: ["Detect","the","notes","in","the","given","activation","function",".","Parameters","--","--","--","--","--","activations",":","numpy","array","Note","activation","function",".","Returns","--","--","--","-","onsets",":","numpy","array","Detected","notes","[","seconds",",","pitches","]","."]
code: def process(self, activations, **kwargs):
      """
      Detect the notes in the given activation function.
  
      Parameters
      ----------
      activations : numpy array
          Note activation function.
  
      Returns
      -------
      onsets : numpy array
          Detected notes [seconds, pitches].
  
      """
      # convert timing information to frames and set default values
      # TODO: use at least 1 frame if any of these values are > 0?
      timings = (
          np.array(
              [
                  self.smooth,
                  self.pre_avg,
                  self.post_avg,
                  self.pre_max,
                  self.post_max,
              ]
          )
          * self.fps
      )
      timings = np.round(timings).astype(int)
      # detect the peaks (function returns int indices)
      onsets, pitches = peak_picking(
          activations, self.threshold, *timings
      )
      # if no note onsets are detected, return empty array
      if not onsets.any():
          return np.empty((0, 2))
      # convert onset timing and apply pitch offset
      onsets = onsets.astype(float) / self.fps
      pitches += self.pitch_offset
      # shift if necessary
      if self.delay:
          onsets += self.delay
      # combine notes
      if self.combine > 0:
          notes = []
          # iterate over each detected note pitch separately
          for pitch in np.unique(pitches):
              # get all onsets for this pitch
              onsets_ = onsets[pitches == pitch]
              # combine onsets
              onsets_ = combine_events(onsets_, self.combine, "left")
              # zip onsets and pitches and add them to list of detections
              notes.extend(list(zip(onsets_, [pitch] * len(onsets_))))
      else:
          # just zip all detected notes
          notes = list(zip(onsets, pitches))
      # sort the detections and return as numpy array
      return np.array(sorted(notes))
  
imports: from __future__ import absolute_import, division, print_function
  import numpy
  from .onsets import OnsetPeakPickingProcessor, peak_picking
  from ..processors import ParallelProcessor, Processor, SequentialProcessor
  from ..utils import combine_events
label_desc: Use image node_id 2 for calling the NoteOnsetPeakPickingProcessor obj's underlying member method code with example usage: obj.process(activations) and returns: np, np