This step was much of the project's working time. Lucky for you, if you use the same circuit as me, I've done the work for you. It may be horrendous for a skilled programmer to look at, but it does work. Sorry to people not using AVRs, because this code is meant for use in the Arduino IDE.
To those that want to change the patterns, pay attention to the sequenceLengths array. It should accurately represent the lengths of all other sequence arrays. If you want to add or remove any, adjust sequenceTotal to match, change sequenceLengths to the correct number of patterns, and add a "case" to findAndWriteStep().
Feel free to ask if I've been unclear in my comments or above.