docs: def iter_trigger(self, iter_wave_values):
          """
          trigger middle crossing of the wave sinus curve
          """
          window_size = (2 * self.cfg.END_COUNT) + self.cfg.MID_COUNT
  
          # sinus curve goes from negative into positive:
          pos_null_transit = [(0, self.cfg.END_COUNT), (self.cfg.END_COUNT, 0)]
  
          # sinus curve goes from positive into negative:
          neg_null_transit = [(self.cfg.END_COUNT, 0), (0, self.cfg.END_COUNT)]
  
          if self.cfg.MID_COUNT > 3:
              mid_index = int(round(self.cfg.MID_COUNT / 2.0))
          else:
              mid_index = 0
  
          in_pos = False
          for values in iter_window(iter_wave_values, window_size):
  
              # Split the window
              previous_values = values[:self.cfg.END_COUNT] # e.g.: 123-----
              mid_values = values[self.cfg.END_COUNT:self.cfg.END_COUNT + self.cfg.MID_COUNT] # e.g.: ---45---
              next_values = values[-self.cfg.END_COUNT:] # e.g.: -----678
  
              # get only the value and strip the frame_no
              # e.g.: (frame_no, value) tuple -> value list
              previous_values = [i[1] for i in previous_values]
              next_values = [i[1] for i in next_values]
  
              # Count sign from previous and next values
              sign_info = [
                  count_sign(previous_values, 0),
                  count_sign(next_values, 0)
              ]
  #             log.log(5, "sign info: %s" % repr(sign_info))
              # yield the mid crossing
              if in_pos == False and sign_info == pos_null_transit:
                  log.log(5, "sinus curve goes from negative into positive")
  #                 log.debug(" %s | %s | %s" % (previous_values, mid_values, next_values))
                  yield mid_values[mid_index][0]
                  in_pos = True
              elif  in_pos == True and sign_info == neg_null_transit:
                  if self.half_sinus:
                      log.log(5, "sinus curve goes from positive into negative")
  #                     log.debug(" %s | %s | %s" % (previous_values, mid_values, next_values))
                      yield mid_values[mid_index][0]
                  in_pos = False