The ma_waveform API is a more general API supporting different waveform including sine, square, triangle and sawtooth.