Tap tempo metronome project

I just purchased the tap tempo metronome. I have a lot of cool ideas for project. I understand electronics and circuits very well, but I’m not to savvy on programming.

I’m utilizing the output signal B to drive a relay. I want to be able to store up to 6 or more beat patterns and be able to start and stop the beat. When stopping the beat i need it to start over from the beginning of the entered or stored beat.

Any ideas on how to do this would be awesome.

A simple way to structure this is to keep each pattern as an array of step durations or on/off states, plus a separate playback index. Your stop routine should set that index back to 0 and force the relay/output off; your start routine always begins playback from index 0. Store the pattern arrays in EEPROM if they need to survive power cycles, and keep the currently playing pattern in RAM. Even without much programming experience, that state-machine approach is much easier to debug than trying to store timing inside the relay-driving code itself.