I discovered the sequencer example program and I LOVE IT.