
2.1 The Hi-Hat and the Snare
Silence
Before using the snare, let's look at the silence. The dash - represents a pause in the rhythm. Let's try placing kicks only on the first and third beats.
Do you feel that space? Perfect, because that's where the sd snare will come in.

The snare hits with a dry, cracking sound. It's that sound that makes you want to nod your head to the beat.
We will 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:
Listen to this rhythm in 'The Fat Man' by Fats Domino:
## The hi-hatNow we just need to add the hi-hat hh.

The hi-hat adds brightness and speed to the rhythm. Its sharp, metallic sound fills the gaps and keeps the beat constantly moving.
We want it to sound faster than the other instruments.
Remember that before we wrote "bd bd bd bd" which created 4 beats. But now we want to put several sounds within a single beat, so they sound faster. For this, we use the brackets []. If we write [hh hh] it means putting two hi-hat hits in one beat. Let's add it to our rhythm:
Done! 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 feel changes completely.
The complete rhythm:
Without the Kick:
It sounds light, doesn't it? It's lacking weight. That foundation that anchors you to the ground is missing.
Without the Kick
The rhythm is still there, but it lacks power. It misses that hit that makes you move. It feels incomplete.
Without the Charles
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, like in a conversation. 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 to concatenate. 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 the 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 (from concatenate) plays cycles one after another, to make your song as long as you want.
- stack (from stack) plays cycles at the same time, in parallel, to play as many instruments at once as you need.
If you find it a bit confusing to write all this, let's try to clarify it in the next lesson. 👉>>
