docs: def iter_bitstream(self, iter_duration_generator):
          """
          iterate over self.iter_trigger() and
          yield the bits
          """
          assert self.half_sinus == False # Allways trigger full sinus cycle
  
          # build min/max Hz values
          bit_nul_min_hz = self.cfg.BIT_NUL_HZ - self.cfg.HZ_VARIATION
          bit_nul_max_hz = self.cfg.BIT_NUL_HZ + self.cfg.HZ_VARIATION
  
          bit_one_min_hz = self.cfg.BIT_ONE_HZ - self.cfg.HZ_VARIATION
          bit_one_max_hz = self.cfg.BIT_ONE_HZ + self.cfg.HZ_VARIATION
  
          bit_nul_max_duration = self._hz2duration(bit_nul_min_hz)
          bit_nul_min_duration = self._hz2duration(bit_nul_max_hz)
  
          bit_one_max_duration = self._hz2duration(bit_one_min_hz)
          bit_one_min_duration = self._hz2duration(bit_one_max_hz)
  
          log.info("bit-0 in %sHz - %sHz (duration: %s-%s)  |  bit-1 in %sHz - %sHz (duration: %s-%s)" % (
              bit_nul_min_hz, bit_nul_max_hz, bit_nul_min_duration, bit_nul_max_duration,
              bit_one_min_hz, bit_one_max_hz, bit_one_min_duration, bit_one_max_duration,
          ))
          assert bit_nul_max_hz < bit_one_min_hz, "HZ_VARIATION value is %sHz too high!" % (
              ((bit_nul_max_hz - bit_one_min_hz) / 2) + 1
          )
          assert bit_one_max_duration < bit_nul_min_duration, "HZ_VARIATION value is too high!"
  
          # for end statistics
          bit_one_count = 0
          one_hz_min = sys.maxint
          one_hz_avg = None
          one_hz_max = 0
          bit_nul_count = 0
          nul_hz_min = sys.maxint
          nul_hz_avg = None
          nul_hz_max = 0
  
          for duration in iter_duration_generator:
  
              if bit_one_min_duration < duration < bit_one_max_duration:
                  hz = self._duration2hz(duration)
                  log.log(5,
                      "bit 1 at %s in %sSamples = %sHz" % (
                          self.pformat_pos(), duration, hz
                      )
                  )
                  yield 1
                  bit_one_count += 1
                  if hz < one_hz_min:
                      one_hz_min = hz
                  if hz > one_hz_max:
                      one_hz_max = hz
                  one_hz_avg = average(one_hz_avg, hz, bit_one_count)
              elif bit_nul_min_duration < duration < bit_nul_max_duration:
                  hz = self._duration2hz(duration)
                  log.log(5,
                      "bit 0 at %s in %sSamples = %sHz" % (
                          self.pformat_pos(), duration, hz
                      )
                  )
                  yield 0
                  bit_nul_count += 1
                  if hz < nul_hz_min:
                      nul_hz_min = hz
                  if hz > nul_hz_max:
                      nul_hz_max = hz
                  nul_hz_avg = average(nul_hz_avg, hz, bit_nul_count)
              else:
                  hz = self._duration2hz(duration)
                  log.log(7,
                      "Skip signal at %s with %sHz (%sSamples) out of frequency range." % (
                          self.pformat_pos(), hz, duration
                      )
                  )
                  continue
  
          bit_count = bit_one_count + bit_nul_count
  
          if bit_count == 0:
              print "ERROR: No information from wave to generate the bits"
              print "trigger volume to high?"
              sys.exit(-1)
  
          log.info("\n%i Bits: %i positive bits and %i negative bits" % (
              bit_count, bit_one_count, bit_nul_count
          ))
          if bit_one_count > 0:
              log.info("Bit 1: %sHz - %sHz avg: %.1fHz variation: %sHz" % (
                  one_hz_min, one_hz_max, one_hz_avg, one_hz_max - one_hz_min
              ))
          if bit_nul_count > 0:
              log.info("Bit 0: %sHz - %sHz avg: %.1fHz variation: %sHz" % (
                  nul_hz_min, nul_hz_max, nul_hz_avg, nul_hz_max - nul_hz_min
              ))