Playing Custom Imported Sounds in a VEXcode V5 Project

Playing custom imported sounds is a unique function in the VEXcode V5 software. This article will walk you through where and how to import sounds into VEXcode V5, the setup required to ensure the sounds play properly, and an explanation of how the play VEXcode sound command works.

VEXcode V5 Blocks

image15.png

VEXcode V5 Python

image16.png

VEXcode V5 C++

image4.png

Select each image above to enlarge.

Accessing the Play VEXcode Sound Command

By default, the play VEXcode sound command does not appear in the toolbox on the left side of the screen. The following steps explain how to enable the command.

image9.png

Navigate to the File menu. Select ‘Tools’ and ‘Manage VEXcode Sounds.’

Note: this image shows blocks in the toolbox but the process is the same for C++ and Python projects.

Screenshot_2023-05-15_at_1.55.28_PM.png

The Manage VEXcode Sounds menu will then appear.

Screenshot_2023-05-16_at_10.55.05_AM.png

Select the check box to enable the play VEXcode sound command.

Functionality of the Manage VEXcode Sounds Menu

The Manage VEXcode Sounds menu is used to add sounds, edit sound names, and delete sounds.

Add a sound

Screenshot_2023-05-16_at_11.00.13_AM.png

Find an open row.

Screenshot_2023-05-16_at_11.01.29_AM.png

Enter the sound name into the associated ‘Name’ box.

When you input a new name, a blank row appears below the current row.

Screenshot_2023-05-16_at_11.02.28_AM.png

Paste the associated sound file URL into the same row as the new name.

Screenshot_2023-05-16_at_11.11.48_AM.png

When finished, select ‘Save Sounds.’

Screenshot_2023-05-16_at_11.12.24_AM.png

To edit the Manage VEXcode Sounds menu, select ‘Cancel.’

Save changes before hitting 'Cancel' to avoid losing any edits.

Delete a sound

Screenshot_2023-05-16_at_11.15.50_AM.png

Click the trash can icon to delete the sound linked to that row.

Screenshot_2023-05-16_at_11.17.25_AM.png

Select ‘Save Sounds’ to save the changes or ‘Cancel’ to exit the menu.

Note: at least one sound must always be listed in the table. The trash can icon will be grayed out when only one sound is left, to ensure one sound remains.

Edit a sound

Screenshot_2023-05-16_at_11.22.29_AM.png

You can edit a sound’s name or file URL by selecting it.

Screenshot_2023-05-16_at_11.23.06_AM.png

Select ‘Save Sounds’ to save the changes or ‘Cancel’ to exit the menu.

Connecting to the User/Console Port

To play custom sounds in web-based VEXcode V5, a connection to the user/console web-serial port is needed. This second port is needed because the first serial port links the V5 Brain to the device for project downloads from a browser.

image17.png

For steps on how to connect the V5 Brain to the user/console port, view this article.

image1.png

To play custom sounds, the V5 Brain MUST stay connected to the device via a USB cable while using the user/console web-serial port.

Using the Play VEXcode Sound Command

Drag and attach or type the play VEXcode sound command to your project. For more information on how the block functions, view the Help.

VEXcode V5 Blocks

Screenshot_2023-05-16_at_11.38.06_AM.png

VEXcode V5 Python

Screenshot_2023-05-16_at_11.38.46_AM.png

VEXcode V5 C++

Screenshot_2023-05-16_at_11.39.32_AM.png

Select each image above to enlarge.

volume-up.png

Since the sounds play through the connected device, ensure the volume is up when playing sounds.

image1.png

Ensure the V5 Brain remains connected to the device via a USB cable while the project is downloaded and running.

Note: custom sounds are stored into the VEXcode V5 project and will function as long as the specific project is loaded. If VEXcode V5 is closed or a new project is loaded, the sounds will not operate. However, upon reloading the original project file, the custom sounds will resume playing as anticipated.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: