Played is referred to step, not to note.
I have 16 buttons, every button pressed sets state(in your case 1) to 1 and only if state is 1 sends note on and note off.
I'm trying to figure out how delay note on and note off, not with "delay" because I have a timing to follow.
Entire step sequencer...