4.1
At this point, our drum machine is basically complete. But let's see what else we can do with our drum samples. Let's start with drum rolls.
Click the [D] key sprite which control one of the snare drum sounds. Then, click the code tab to show the blocks for this sprite.
4.2
Ever heard a drum roll? That's when a drummer hits one drum several times in a row in a rhythmic pattern.
We are going to be using the [repeat] block to make Scratch play the snare multiple times when the key is only touched once.
4.3
Drag a [repeat] block from the Block drawer into the line that starts with [when (D) is pressed]. Hover it right under the [If Bank A, then] block, so that when it drops it hugs the [play sound] block.
Let's try to press the [D] key. What happens?
Did hear/notice anything different?
4.4
Let's make it sound like an authentic drum roll.
First, change the repeat number from 10 to 3.
Next, drag a [wait] block into your line just under the [play sound] block and change the time to 0.1 seconds. So that your line of code looks like this.
Now press the [D] key. What happens?
We have a drum pattern that sounds a bit like a drum roll, right? Let's leave the [D] sound and see what other types of rolls we can create on the letter [S]
Navigate to the code tab for the [S] key sprite. Let's create a drum roll with this snare sound too.
4.5
This time, let's change the repeat block to [8].
Then drag a wait block into the line and change the time to 0.01 seconds.
Your line should look like the one to the right.
Let's try to press the [S] key. What happens?
Try playing the [A], [S], and [D] keys together to see what kind of rhythms you can come up with.
Here's a visual representation of what is happening when you press each key. The red line is the initial snare and the black lines are the repeats after it. You'll notice that since we are working in units of time and that the space between each is "perfect" they can begin to sound robotic.
Continue changing the numbers of repeats and wait time to see what kind of drum roll rhythms you can come up with. What else could you do with each pad to make a more interesting drum roll?
Let's try using this pitch block in our drum roll line.
What kind of things could we do with the pitch effect bricks. Try this combination using the [change pitch] blocks on the [D] key/sprite. What effect does it have?
Let's take a look at a few different ways to work with pitch on our 808 sounds we loaded onto the keys [Q][W][E][R].
Let's start by selecting the [Q] sprite and clicking the [Sounds] tab.
4.6
Let's start by selecting the [Q] sprite and clicking the [Sounds] tab.
4.7
You may have noticed some of these controls when you uploaded sounds on each pad. Let's take a closer look at each tool and what they do.
This tool produces an echo of the sound about 0.15 seconds later. Using this more than once produces more echoes.
This tool adds static and softens notes, making it sound like a robot.
This tool makes sounds louder. Using this a lot of times, then using Slower to return it to its original pitch creates lower-quality sounds.
4.8
Lastly, are the faster slower buttons. We are going to use these to create the 808 pitches we want on our machine.
Think of the pitched drums of a marching band drum line. This is the sound we are going for with the pads [Q][W][E][R]
4.9
The 808 sound we've uploaded into pad [Q] is playing the note C which oscillates at a set frequency. When we click the [Faster] button we are playing that sound faster therefore making it play a different note.
There's some really great physics, math, and music lessons here but for now, all you need to know is that:
Musicians:
Take some time exploring what notes you can create by adjusting the pitch with this tool. Try uploading base sounds that start on different notes and moving them up and down to find the note you want.