docs: def table_wave(params, frequency=400, amplitude=1,
                  offset=0, table=None):
      '''
      Generate a wave from a wavetable
      :param params: buffer parameters, controls length of signal created
      :param frequency: wave frequency (array or value)
      :param amplitude: wave amplitude (array or value)
      :param offset: offset of wave mean from zero (array or value)
      :param table: table of values representing one full cycle of the waveform. Nominally the values
       should be between +/-1 (array). The array can be any size.
      :return: array of resulting signal
      '''
      if not table:
          table = create_sine_table(65536)
      size = table.size
      frequency = create_buffer(params, frequency)
      amplitude = create_buffer(params, amplitude)
      offset = create_buffer(params, offset)
      index = np.floor((np.add.accumulate(frequency / params.sample_rate) % 1) * size).astype(int)
      output = offset + amplitude * table[index]
      return output