Sharing a Python script for generating an 8th strumming pattern

I love this.

Something you could do to make it even more interesting is to allow the user to input the number of notes in the rhythm, e.g. 8, 12 (i.e. quarter-note triplets), 16, or whatever they fancy.

Replace the 7 in the number of notes to remove with the n - 1 where n is the number of notes the user entered.

You’d also need to build the pattern based on the value of n, either before replacing notes or switch to string concatenation with a coin flip for each character to determine whether to include it as D/U or -/*.

Anyway, fun idea, thanks for sharing!

1 Like