class_docstr: Processor to get a onset activation function from a CNN.
  
  References
  ----------
  .. [1] "Musical Onset Detection with Convolutional Neural Networks"
         Jan Schlüter and Sebastian Böck.
         Proceedings of the 6th International Workshop on Machine Learning
         and Music, 2013.
  
  Notes
  -----
  The implementation follows as closely as possible the original one, but
  part of the signal pre-processing differs in minor aspects, so results can
  differ slightly, too.
  
  Examples
  --------
  Create a CNNOnsetProcessor and pass a file through the processor to obtain
  an onset detection function (sampled with 100 frames per second).
  
  >>> proc = CNNOnsetProcessor()
  >>> proc  # doctest: +ELLIPSIS
  <madmom.features.onsets.CNNOnsetProcessor object at 0x...>
  >>> proc('tests/data/audio/sample.wav')  # doctest: +ELLIPSIS
  array([0.05369, 0.04205, ... 0.00014], dtype=float32)
class_docstr_tok: ["Processor","to","get","a","onset","activation","function","from","a","CNN",".","References","--","--","--","--","--","..","[","1","]","``","Musical","Onset","Detection","with","Convolutional","Neural","Networks","''","Jan","Schl\u00fcter","and","Sebastian","B\u00f6ck",".","Proceedings","of","the","6th","International","Workshop","on","Machine","Learning","and","Music",",","2013",".","Notes","--","--","-","The","implementation","follows","as","closely","as","possible","the","original","one",",","but","part","of","the","signal","pre-processing","differs","in","minor","aspects",",","so","results","can","differ","slightly",",","too",".","Examples","--","--","--","--","Create","a","CNNOnsetProcessor","and","pass","a","file","through","the","processor","to","obtain","an","onset","detection","function","(","sampled","with","100","frames","per","second",")",".",">",">",">","proc","=","CNNOnsetProcessor","(",")",">",">",">","proc","#","doctest",":","+ELLIPSIS","<","madmom.features.onsets.CNNOnsetProcessor","object","at","0x","...",">",">",">",">","proc","(","'tests\/data\/audio\/sample.wav","'",")","#","doctest",":","+ELLIPSIS","array","(","[","0.05369",",","0.04205",",","...","0.00014","]",",","dtype=float32",")"]
code: def __init__(self, **kwargs):
      # pylint: disable=unused-argument
      from ..audio.signal import SignalProcessor, FramedSignalProcessor
      from ..audio.stft import ShortTimeFourierTransformProcessor
      from ..audio.filters import MelFilterbank
      from ..audio.spectrogram import (
          FilteredSpectrogramProcessor,
          LogarithmicSpectrogramProcessor,
      )
      from ..models import ONSETS_CNN
      from ..ml.nn import NeuralNetwork
  
      # define pre-processing chain
      sig = SignalProcessor(num_channels=1, sample_rate=44100)
      # process the multi-resolution spec in parallel
      multi = ParallelProcessor([])
      for frame_size in [2048, 1024, 4096]:
          frames = FramedSignalProcessor(frame_size=frame_size, fps=100)
          stft = (
              ShortTimeFourierTransformProcessor()
          )  # caching FFT window
          filt = FilteredSpectrogramProcessor(
              filterbank=MelFilterbank,
              num_bands=80,
              fmin=27.5,
              fmax=16000,
              norm_filters=True,
              unique_filters=False,
          )
          spec = LogarithmicSpectrogramProcessor(
              log=np.log, add=EPSILON
          )
          # process each frame size with spec and diff sequentially
          multi.append(SequentialProcessor((frames, stft, filt, spec)))
      # stack the features (in depth) and pad at beginning and end
      stack = np.dstack
      pad = _cnn_onset_processor_pad
      # pre-processes everything sequentially
      pre_processor = SequentialProcessor((sig, multi, stack, pad))
  
      # process the pre-processed signal with a NN ensemble
      nn = NeuralNetwork.load(ONSETS_CNN[0])
  
      # instantiate a SequentialProcessor
      super(CNNOnsetProcessor, self).__init__((pre_processor, nn))
  
imports: from __future__ import absolute_import, division, print_function
  import numpy
  from scipy.ndimage import maximum_filter, minimum_filter, uniform_filter
  from ..audio.signal import smooth
  from ..processors import BufferProcessor, OnlineProcessor, ParallelProcessor, SequentialProcessor
  from ..utils import combine_events
label_desc: Use image node_id 1 to create a new CNNOnsetProcessor object from inherited base classes: SequentialProcessor with example: obj = CNNOnsetProcessor()