Sound#

Play Sound#

The Play Sound block is used to play a sound effect that is selected from the IQ (2nd gen) Brain’s built-in speakers.

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

A notched pink coding block with the text "play sound siren" written in white. There is a dropdown menu on the right side labeled "siren.

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

A notched pink coding block with the text "play sound siren" written in white. There is a dropdown menu on the right side labeled "siren." Below the block, an expanded dropdown menu shows the options "siren" (with a checkmark), "wrong way," and "wrong way (slow).

In this example, the IQ (2nd gen) Brain will play the alarm2 sound.

A stack of coding blocks starting with a yellow "when started" block at the top. Below it, a pink block reads "play sound alarm2," with "alarm2" in a dropdown menu.

Play Note#

The Play Note block is used to play the selected musical note from the IQ (2nd gen) Brain’s built-in speakers.

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

A notched pink coding block with the text "play note A whole" written in white. There are two dropdown menus: one labeled "A" and the other labeled "whole.

Choose a musical note.

A notched pink coding block with the text "play note C whole" written in white. There are two dropdown menus: one labeled "C" and the other labeled "whole." Below the block, an expanded dropdown menu shows musical note options including "C" (with a checkmark), "D," "E," "F," "G," "A," and "B.

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.

A notched pink coding block with the text "play note A whole" written in white. There are two dropdown menus: one labeled "A" and the other labeled "whole." Below the block, an expanded dropdown menu shows duration options, including "whole" (with a checkmark), "half," and "quarter.

In this example, the IQ (2nd gen) Brain will play a whole G note.

A stack of coding blocks starting with a yellow "when started" block at the top. Below it, a pink block reads "play note G whole," with "G" and "whole" in dropdown menus.