docs: def linseg(self, value, samples):
          '''
          Create a linear section moving from current value to new value over acertain number of
          samples.
          :param value: New value
          :param samples: Length of segment in samples
          :return:
          '''
          if self.params.length > self.pos and samples > 0:
              len = min(samples, self.params.length - self.pos)
              end = value if len == samples else self.latest + (value - self.latest)*len/samples
              self.data[self.pos:self.pos + len] = np.linspace(self.latest, end, num=len, endpoint=False, dtype=np.float)
              self.pos += len
          self.latest = value
          return self