Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    Music Extension: Beats and Play Drum

    2D Blocks
    1
    1
    1091
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • info-creaticode
      CreatiCode last edited by admin

       

      Prerequisite

      • Working with Blocks

       

      Beat and Tempo

      A beat is a very short time. We use beats to control how long a sound is played.

      In the CreatiCode playground, 1 beat is equal to 0.25 (1/4) seconds. So, if you play a piece of music for 4 beats, it will last for exactly 1 second.

      We can use tempo to define the length of one beat. Tempo is the number of beats in each minute. In CreatiCode, the default value of tempo is 240. For example, if you want to play some music at a slower speed, you can set the tempo to a smaller number.

       

      Loudness

      Loudness controls the volume of the sound.

      Loudness has different levels, which are represented by letters “p” and “f”, where “p means quiet” and “f means loud or strong”.

      The following are the loudness levels you can find in CreatiCode;


       

       

      The Music Extension

      The Music Extension is a group of blocks that allow you to play and create your own music. With these blocks, you can play drums and notes of different instruments, at different values of beats and tempo.


       

      How to add the Music Extension?

      To add a music extension to a project, click on the “Add Extension” button below the blocks categories, and then select “music” from the extension library.


       

      Music Extension Blocks

       

      The “Play drum () for () beats” Block

      This block plays a specified drum sound for some number of beats. There are 18 different types of drums and instruments which you can choose from the drop-down menu.

      The animation below shows how to play Snare Drum for 1 beat.

      Your browser does not support the audio element.
       

      The animation below shows how to play Tambourine for 4 beats.

      Your browser does not support the audio element.
       

      The “Play drum () for () beats loudness ()” Block

      This block plays a drum sound for the given number of beats at the selected loudness level. You can change the loudness level from the drop-down menu.

      Snare drum at loudness level mp:

      Your browser does not support the audio element.
       

      Snare drum at loudness level ppp:

      Your browser does not support the audio element.
       

      Snare drum at loudness level fff:

      Your browser does not support the audio element.
       

      The “Set tempo to ()” Block

      This block sets the tempo to a new value.

      Note: The value of tempo affects all the blocks in the music extension. If the value of tempo is greater than or equal to 240, the “Play drum”, “Play notes” and “Rest for () beats” blocks will play faster. If the value of tempo is less than 240, those blocks will play sounds at a slower speed.

      Tempo of 240:

      Your browser does not support the audio element.
       

      Tempo of 350:

      Your browser does not support the audio element.
       

      Tempo of 50:

      Your browser does not support the audio element.
       
       

      “Change tempo by ()” Block

      This block changes (increases or decreases) the value of tempo according to the given number.

      Note: To increase the value of tempo, just type a number in the input box. To decrease the value of tempo, type a number with a minus sign before it.

      Increase the value of tempo by 35.

      Your browser does not support the audio element.
       

      Decrease the value of tempo by -35.

      Your browser does not support the audio element.
       

      The “Tempo” Block

      This is a reporter block that reports the current value of tempo. You can also use this block to display the value of tempo on stage.


       

      “Rest for () beats” Block

      This block pauses the sound of the blocks attached below it by the given number of beats.

      Note: The value of beat is affected by the value of tempo. If the tempo is greater than or equal to 240, the “Rest” block pauses for a very short time. If the tempo is less than 240, then the “Rest” block will have a longer pause.

      Rest for 1 beat at tempo=240

      Your browser does not support the audio element.
       

      Rest for 1 beat at tempo=80

      Your browser does not support the audio element.
       

      1 Reply Last reply Reply Quote 0
      • First post
        Last post