"Play Drum () for () Beats" redirects here. For the obsolete block with a number input, see Play Drum () for () Beats (number input block).
Play Drum () for () Beats
play drum (\(1\) Snare Drum v) for (0.25) beats
Category Music
Type Stack
Introduced in 2.0
The drop-down menu for the block.

The Play Drum () for () Beats block is a music block and a stack block. The block will play the specified instrument for the specified amount of seconds using a sampled percussion instrument. Even though the block uses the word "drum", the choices in the drop-down menu are many different percussion instruments including drums, triangle, bongos, cowbell, vibraslap, and various idiophones.

This block used to be called Play Drum () for () Secs, but was changed because the length of a beat can now be changed with the Set Tempo by () bpm block.

Entering a value less than 0 or greater than 18 for the drum will cause the drum selection to be looped (for example, attempting to play drum 19 will play drum "(1) Snare Drum").

Available Instruments

The Play Drum () for () Beats block has a drop-down menu where users can select a drum available to this specific block, each having their own unique number, visible in a (#) format before the common name of the instrument. Those instruments are:

  1. (1) Snare Drum
  2. (2) Bass Drum
  3. (3) Side Stick
  4. (4) Crash Cymbal
  5. (5) Open Hi-Hat
  6. (6) Closed Hi-Hat
  7. (7) Tambourine
  8. (8) Hand Clap
  9. (9) Claves
  10. (10) Wood Block
  11. (11) Cowbell
  12. (12) Triangle
  13. (13) Bongo
  14. (14) Conga
  15. (15) Cabasa
  16. (16) Guiro
  17. (17) Vibraslap
  18. (18) Cuica

Example Uses

As the block plays an instrument, it is widely used when a song is played with the Sound blocks.

Some common uses for the Play Drum () for () Beats block:

  • Easy sound effects (some of the choices in the drop-down menu are sound effects such as a clap)
play drum (\(8\) Hand Clap v) for (0.25) beats
  • Musical projects where you control instruments
when gf clicked
repeat until <<(answer) > [0]> and <(answer) < [19]>>
    ask [Drum?] and wait
end
forever
    if <(loudness) > [10]> then
        play drum (answer) for (0.1) beats
    end
end
  • Creating a song made by blocks
play drum (\(2\) Bass Drum v) for (0.2) beats
play note (60) for (0.6) beats
play drum (\(2\) Bass Drum v) for (0.2) beats

Rhythm Notation

Unlike sheet music, the block uses numbers to notate rhythm. This table shows the beat number values for the most common rhythms in the most common time signatures, interpreted in the most basic way.

SVGSemibreve.svg SVGDottedMinim.svg SVGMinim.svg DottedCrotchet.svg SVGCrotchet.svg SVGTripletCrotchet.svg SVGDottedQuaver.svg SVGQuaver.svg SVGripletQuaver.svg SVGDottedSemiQuaver.svg SVGSemiQuaver.svg
SVGTimeSig4-4.svg or SVGTimeSigCommonTime.svg 4 3 2 1.5 1 0.75 0.5 0.375 0.25
SVGTimeSig3-8.svg 8 6 4 3 2 1⅓ 1.5 1 0.75 0.5
SVGTimeSig2-2.svg or SVGTimeSigCutTime.svg 2 1.5 1 0.75 0.5 0.375 0.25 0.1875 0.125


Obsolete Version

Main article: Play Drum () for () Beats (number input block)
play drum (10 v) for (10) beats:: sound
The obsolete "play drum () for () beats" block.

In the switch from Scratch 1.4 to Scratch 2.0, some of the drums were not available in Flash. To deal with this, there are two versions of the drum block. The obsolete one is the one that was used in Scratch 1.4 projects.

This block supported 47 different types of drums.

See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.