add square wave generator
fix trigger behavior
add trivial sine wave to demo