class_docstr: Track the beats according to previously determined (local) tempo by
  iteratively aligning them around the estimated position [1]_.
  
  Parameters
  ----------
  look_aside : float, optional
      Look this fraction of the estimated beat interval to each side of the
      assumed next beat position to look for the most likely position of the
      next beat.
  look_ahead : float, optional
      Look `look_ahead` seconds in both directions to determine the local
      tempo and align the beats accordingly.
  tempo_estimator : :class:`TempoEstimationProcessor`, optional
      Use this processor to estimate the (local) tempo. If 'None' a default
      tempo estimator will be created and used.
  fps : float, optional
      Frames per second.
  kwargs : dict, optional
      Keyword arguments passed to
      :class:`madmom.features.tempo.TempoEstimationProcessor` if no
      `tempo_estimator` was given.
  
  Notes
  -----
  If `look_ahead` is not set, a constant tempo throughout the whole piece
  is assumed. If `look_ahead` is set, the local tempo (in a range +/-
  `look_ahead` seconds around the actual position) is estimated and then
  the next beat is tracked accordingly. This procedure is repeated from
  the new position to the end of the piece.
  
  Instead of the auto-correlation based method for tempo estimation proposed
  in [1]_, it uses a comb filter based method [2]_ per default. The behaviour
  can be controlled with the `tempo_method` parameter.
  
  References
  ----------
  .. [1] Sebastian Böck and Markus Schedl,
         "Enhanced Beat Tracking with Context-Aware Neural Networks",
         Proceedings of the 14th International Conference on Digital Audio
         Effects (DAFx), 2011.
  .. [2] Sebastian Böck, Florian Krebs and Gerhard Widmer,
         "Accurate Tempo Estimation based on Recurrent Neural Networks and
         Resonating Comb Filters",
         Proceedings of the 16th International Society for Music Information
         Retrieval Conference (ISMIR), 2015.
  
  Examples
  --------
  Create a BeatTrackingProcessor. The returned array represents the positions
  of the beats in seconds, thus the expected sampling rate has to be given.
  
  >>> proc = BeatTrackingProcessor(fps=100)
  >>> proc  # doctest: +ELLIPSIS
  <madmom.features.beats.BeatTrackingProcessor object at 0x...>
  
  Call this BeatTrackingProcessor with the beat activation function returned
  by RNNBeatProcessor to obtain the beat positions.
  
  >>> act = RNNBeatProcessor()('tests/data/audio/sample.wav')
  >>> proc(act)
  array([0.11, 0.45, 0.79, 1.13, 1.47, 1.81, 2.15, 2.49])
class_docstr_tok: ["Track","the","beats","according","to","previously","determined","(","local",")","tempo","by","iteratively","aligning","them","around","the","estimated","position","[","1","]","_.","Parameters","--","--","--","--","--","look_aside",":","float",",","optional","Look","this","fraction","of","the","estimated","beat","interval","to","each","side","of","the","assumed","next","beat","position","to","look","for","the","most","likely","position","of","the","next","beat",".","look_ahead",":","float",",","optional","Look","`","look_ahead","`","seconds","in","both","directions","to","determine","the","local","tempo","and","align","the","beats","accordingly",".","tempo_estimator",":",":","class",":","`","TempoEstimationProcessor","`",",","optional","Use","this","processor","to","estimate","the","(","local",")","tempo",".","If","'None","'","a","default","tempo","estimator","will","be","created","and","used",".","fps",":","float",",","optional","Frames","per","second",".","kwargs",":","dict",",","optional","Keyword","arguments","passed","to",":","class",":","`","madmom.features.tempo.TempoEstimationProcessor","`","if","no","`","tempo_estimator","`","was","given",".","Notes","--","--","-","If","`","look_ahead","`","is","not","set",",","a","constant","tempo","throughout","the","whole","piece","is","assumed",".","If","`","look_ahead","`","is","set",",","the","local","tempo","(","in","a","range","+\/-","`","look_ahead","`","seconds","around","the","actual","position",")","is","estimated","and","then","the","next","beat","is","tracked","accordingly",".","This","procedure","is","repeated","from","the","new","position","to","the","end","of","the","piece",".","Instead","of","the","auto-correlation","based","method","for","tempo","estimation","proposed","in","[","1","]","_",",","it","uses","a","comb","filter","based","method","[","2","]","_","per","default",".","The","behaviour","can","be","controlled","with","the","`","tempo_method","`","parameter",".","References","--","--","--","--","--","..","[","1","]","Sebastian","B\u00f6ck","and","Markus","Schedl",",","``","Enhanced","Beat","Tracking","with","Context-Aware","Neural","Networks","''",",","Proceedings","of","the","14th","International","Conference","on","Digital","Audio","Effects","(","DAFx",")",",","2011",".","..","[","2","]","Sebastian","B\u00f6ck",",","Florian","Krebs","and","Gerhard","Widmer",",","``","Accurate","Tempo","Estimation","based","on","Recurrent","Neural","Networks","and","Resonating","Comb","Filters","''",",","Proceedings","of","the","16th","International","Society","for","Music","Information","Retrieval","Conference","(","ISMIR",")",",","2015",".","Examples","--","--","--","--","Create","a","BeatTrackingProcessor",".","The","returned","array","represents","the","positions","of","the","beats","in","seconds",",","thus","the","expected","sampling","rate","has","to","be","given",".",">",">",">","proc","=","BeatTrackingProcessor","(","fps=100",")",">",">",">","proc","#","doctest",":","+ELLIPSIS","<","madmom.features.beats.BeatTrackingProcessor","object","at","0x","...",">","Call","this","BeatTrackingProcessor","with","the","beat","activation","function","returned","by","RNNBeatProcessor","to","obtain","the","beat","positions",".",">",">",">","act","=","RNNBeatProcessor","(",")","(","'tests\/data\/audio\/sample.wav","'",")",">",">",">","proc","(","act",")","array","(","[","0.11",",","0.45",",","0.79",",","1.13",",","1.47",",","1.81",",","2.15",",","2.49","]",")"]
docstr: Add beat tracking related arguments to an existing parser.
  
  Parameters
  ----------
  parser : argparse parser instance
      Existing argparse parser object.
  look_aside : float, optional
      Look this fraction of the estimated beat interval to each side of
      the assumed next beat position to look for the most likely position
      of the next beat.
  look_ahead : float, optional
      Look `look_ahead` seconds in both directions to determine the local
      tempo and align the beats accordingly.
  
  Returns
  -------
  parser_group : argparse argument group
      Beat tracking argument parser group.
  
  Notes
  -----
  Parameters are included in the group only if they are not 'None'.
docstr_tok: ["Add","beat","tracking","related","arguments","to","an","existing","parser",".","Parameters","--","--","--","--","--","parser",":","argparse","parser","instance","Existing","argparse","parser","object",".","look_aside",":","float",",","optional","Look","this","fraction","of","the","estimated","beat","interval","to","each","side","of","the","assumed","next","beat","position","to","look","for","the","most","likely","position","of","the","next","beat",".","look_ahead",":","float",",","optional","Look","`","look_ahead","`","seconds","in","both","directions","to","determine","the","local","tempo","and","align","the","beats","accordingly",".","Returns","--","--","--","-","parser_group",":","argparse","argument","group","Beat","tracking","argument","parser","group",".","Notes","--","--","-","Parameters","are","included","in","the","group","only","if","they","are","not","'None","'","."]
code: def add_arguments(
      parser, look_aside=LOOK_ASIDE, look_ahead=LOOK_AHEAD
  ):
      """
      Add beat tracking related arguments to an existing parser.
  
      Parameters
      ----------
      parser : argparse parser instance
          Existing argparse parser object.
      look_aside : float, optional
          Look this fraction of the estimated beat interval to each side of
          the assumed next beat position to look for the most likely position
          of the next beat.
      look_ahead : float, optional
          Look `look_ahead` seconds in both directions to determine the local
          tempo and align the beats accordingly.
  
      Returns
      -------
      parser_group : argparse argument group
          Beat tracking argument parser group.
  
      Notes
      -----
      Parameters are included in the group only if they are not 'None'.
  
      """
      # add beat detection related options to the existing parser
      g = parser.add_argument_group("beat detection arguments")
      # TODO: unify look_aside with CRFBeatDetection's interval_sigma
      if look_aside is not None:
          g.add_argument(
              "--look_aside",
              action="store",
              type=float,
              default=look_aside,
              help="look this fraction of a beat interval to "
              "each side of the assumed next beat position "
              "to look for the most likely position of the "
              "next beat [default=%(default).2f]",
          )
      if look_ahead is not None:
          g.add_argument(
              "--look_ahead",
              action="store",
              type=float,
              default=look_ahead,
              help="look this many seconds in both directions "
              "to determine the local tempo and align the "
              "beats accordingly [default=%(default).2f]",
          )
      # return the argument group so it can be modified if needed
      return g
  
imports: from __future__ import absolute_import, division, print_function
  import sys
  import numpy
  from ..audio.signal import signal_frame, smooth
  from ..ml.nn import average_predictions
  from ..processors import OnlineProcessor, ParallelProcessor, Processor, SequentialProcessor
label_desc: Use image node_id 3 for calling the BeatTrackingProcessor obj's underlying member method code with example usage: obj.add_arguments(parser, look_aside, look_ahead) and returns: g