Sound#

Play Sound#

The Play Sound block is used to play a sound effect that is selected from the EXP Brain’s built-in speakers.

This is a non-waiting command and allows any subsequent commands to execute without delay.

VEXcode blocks stack of code containing a play sound siren block.#
    play sound [siren v]

Select which sound effect to play:

  • siren

  • wrong way

  • wrong way (slow)

  • fill up

  • headlights on

  • headlights off

  • tollbooth

  • alarm

  • tada

  • door close

  • ratchet

  • wrench

  • siren2

  • ratchet2

  • alarm2

  • power down

Image of the Play Sound block interface for selecting sound effects in the EXP Brain's programming environment.

In this example, the EXP Brain will play the alarm2 sound.

VEXcode blocks stack of code containing a when started block, and a play sound alarm2 block.#
    when started :: hat events
    play sound [alarm2 v]

Play Note#

The Set Electromagnet Power block is used to play the selected musical note from the EXP Brain’s built-in speakers.

This is a non-waiting command and allows any subsequent commands to execute without delay.

VEXcode blocks stack of code containing a play note A whole block.#
    play note [A v] [whole v]

Choose a musical note.

Icon representing the Play Note" function for selecting and playing musical notes on the EXP Brain's speakers.

Choose the duration (how long) the note will play.

  • A whole note plays for 1 second.

  • A half note plays for 0.5 seconds.

  • A quarter note plays for 0.25 seconds.

Diagram illustrating note durations for the EXP Brain: whole, half, and quarter notes with corresponding time values.

In this example, the EXP Brain will play a whole G note.

VEXcode blocks stack of code containing a when started block, and a play note G whole block.#
    when started :: hat events
    play note [G v] [whole v]