
2.1 The Snare and the Hi-Hat
Silence
Before using the snare, let's look at silence. The dash - represents a pause in the rhythm. Let's try placing bass drum hits only on the first and third beats.

Do you feel that space? Perfect, because that's where the snare (sd) will go. We'll place it on beats 2 and 4, right in the silences we left. This creates the backbeat pattern, the foundation of thousands of songs.
To make them sound at the same time, we separate the sequences with a comma ','.
If it makes it clearer for you, you can use $: as a substitute for the comma:
The hi-hat
We already have the bass drum and snare working together. Now we just need to add the hi-hat hh.

We want it to sound faster than the other instruments. To achieve this, we need to place multiple sounds on a single beat. For this, we use the brackets []. If we write [hh hh], it means putting two hi-hat hits on one beat.
Let's add it to our beat:
Ready! You have created a complete and classic beat.
This beat is so popular that you'll find it in thousands of songs. Listen to it in 'Save Your Tears' by The Weeknd:
Strudel does not have a save button. If you are just experimenting, Strudel stores your code in the browser's memory, so even if you close and reopen it, you won't lose your code.
But if you want to keep your progress permanently, you have 2 options:
Save the URL that appears in the browser. Your code is encoded in the URL.https://strudel.cc/#JDpzKCItIHNkIC0gc2QiKQokOnMoImJkIC0gYmQgLSIpThat long code at the end of the URL encodes your Strudel code.
The second option, and the one I recommend, is to save your code in a text file. This way, you can have a folder with all your progress. If you have programmed before, you can save the code with a .js extension, and the code editor will display the code in color like in the Strudel editor.
The Role of Each Instrument
To truly understand the importance of each instrument. What would happen if we removed a piece of the rhythm? Experiment by removing each instrument and you will see how the feeling changes completely.
The complete rhythm:
Without the Bass Drum:
It sounds light, doesn't it? It lacks weight. It misses that foundation that anchors you to the ground.
Without the Snare
The rhythm is still there, but it lacks power. It misses that hit that makes you move. It feels incomplete.
Without the Hi-hat
Now it sounds drier and more basic. As you can see, the hi-hat added brightness and speed.
These experiments demonstrate that each instrument has a specific and irreplaceable role in the rhythm.
Rhythmic Conversation: Question and Answer
A good rhythm doesn't have to be repetitive. In fact, variations make it more interesting.
In music, we talk about creating a question and an answer. The question creates tension, while the answer resolves it.
To achieve this in Strudel and chain two rhythms one after the other, we use the cat() function.
In the following example, the first measure is our 'question' (the rhythm we already know) and the second, the 'answer'.
Do you want to organize your code better? You can use stack to separate the sounds that are played at the same time. This way, the code becomes clearer and more organized.
Remember:
- cat (concatenate) plays cycles/measures one after another, to make your song as long as you want.
- stack (stack) plays cycles at the same time, in parallel, to play as many instruments at once as you need.
If you find writing all of that a bit confusing, let's try to clarify it in the next lesson. 👉>>