← All Applets

Rhythm RNN ▮▮▮

Program beats, train, let the network drop new patterns.

Click cells to program a 16-step drum pattern. Add it to the training set, then train an LSTM to learn the groove. The trained network generates new patterns in your style.

Step Sequencer (16 steps)

0 patterns recorded
BPM 120

Train the LSTM

Loss

Add at least one pattern, then train.

Hidden State (during gen playback)

Train, generate, then play to see neuron activations.

Generated Pattern

1.0
Why an LSTM for drums?

Drum patterns have strong periodic structure: the kick on beats 1 and 3, the snare on 2 and 4, hi-hats marking subdivisions. The LSTM learns these temporal regularities through its gates — the forget gate clears at downbeats, the input gate accepts new fills.

With multiple training patterns, the network learns the style rather than memorizing one pattern. Augmenting with cyclic shifts teaches it that "the kick comes in every 4 steps" regardless of where the bar starts.

← Back to course