Set Instrument to ()
set instrument to ( v)
Category Music
Type Stack

The Set Instrument to () block is a Music block and a Stack block. The block changes the instrument that the Play Note () for () Beats block will play. In Scratch 1.x, this could be any of the 128 General MIDI instruments; since then, that block has been replaced with an identically named one with 21 instruments.[1] (The Play Drum () for () Beats block is not affected by the Set Instrument to () block; it has its own instruments in a drop-down menu.)

A sprite can play only one instrument at a time. In order to play multiple instruments at once, it is necessary to have multiple sprites or clones of a single sprite.

Available Instruments

The Set Instrument to () block has a drop-down menu where users can select a instrument available to this specific block, each having their own unique number, visible in a (#) format after the common name of the instrument. Those instruments include:

  1. Piano (1)
  2. Electric Piano (2)
  3. Organ (3)
  4. Guitar (4)
  5. Electric Guitar (5)
  6. Bass (6)
  7. Pizzicato (7)
  8. Cello (8)
  9. Trombone (9)
  10. Clarinet (10)
  11. Saxaphone (11)
  12. Flute (12)
  13. Wooden Flute (13)
  14. Bassoon (14)
  15. Choir (15)
  16. Vibraphone (16)
  17. Music Box (17)
  18. Steel Drum (18)
  19. Marimba (19)
  20. Synth Lead (20)
  21. Synth Pad (21)

Example Uses

As this block changes the instrument, it is mainly used in projects that require multiple instruments.

Some common uses for the Set Instrument to () block:

when gf clicked
set instrument to (2 v)
  • Projects where a change of instrument is needed
  • Projects where you control instruments
  • Making music with multiple instruments
  • Making sound effects

See Also


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