Added waveform generation and example

Added support for waveform generation by means of a lookup table and
linear interpolation.