Support for multiple beat patterns

Our drum program is now functional. You can load drum samples and define a beat pattern and our drum machine will play it.

Let's now extend our drum machine to create more than one pattern in the same program. This will provide us with the ability to play different patterns simply by changing the pattern number. This gives the user the ability to make different beats for the intro, verse, chorus, bridge, and other parts of a song. The pattern-changing user interface is highlighted in red in the following screenshot:

At the very outset, we have an Entry widget adjacent to the Pattern Number Spinbox widget. ...

Get Tkinter GUI Application Development Blueprints - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.