How to Add Sounds to Code Projects in MicroWorld EX - dummies

How to Add Sounds to Code Projects in MicroWorld EX

By Camille McCue

MicroWorlds EX features several options for adding audio to your project so that you can re-create sounds of the racetrack, or any other venue you are making. One option is using the Melody dialog box to create a simple tune or sound effect. Create your own trotting sounds to play during the simulation as follows:

How to add sounds in MicroWorld EX

  1. From the toolbar, click the Create a Melody button.


  2. Move the cursor into the workspace and click the background.

    The Melody dialog box appears.

  3. Click the marimba, the last instrument in the instrument collection of the dialog box.

    The marimba is a percussion instrument that most closely mimics the sound of clomping.

  4. Click any two keys on the large keyboard, followed by a rest to create a horse trot sound.


  5. Adjust the Volume and Tempo sliders and then click Play to hear your sound. Use the cursor to select and cut notes, or insert new notes into your sound until you are satisfied that it sounds like a trot.

  6. In the Name text box, type trotsound for the sound name. Leave the Show Name and Visible check boxes selected. Click OK to dismiss the dialog box.

    The trot sound icon now appears in the workspace — click it to make sure it sounds the way you want it to.

  7. Right-click (Windows) or Ctrl-click (Mac) the trotsound icon and click Hide.

    Audio icons are usually executed from procedures and buttons, so they don’t need to be visible in the workspace. Leaving the icon in the workspace clutters the graphical user interface and may cause the user to assume it performs a needed function.

    If you want to show any hidden object, switch to the main Project pane and then click the triangular arrow next to any page in the project. This will list all objects on the page. Right-click (Windows) or Ctrl-click (Mac) any object and select Show from the pop-up menu. The object will now show in the workspace.

Many computer programs, especially games, feature theme music, background music, or sound effects. Sometimes the audio takes the form of recorded sound (see Project 12 for details on recording sound in MicroWorlds EX). Other times the audio is created digitally, in much the same way as the MicroWorlds EX Create a Melody interface operates.

How to make melodies in MicroWorld EX

The Melody dialog box features seven instruments: a piano, an electronic keyboard, a xylophone, an electric guitar, a cello, a flute, and a marimba. Clicking the icon of an instrument selects that instrument to play a score, or series of notes and rests you create. Here’s how to create your melody:

  • Add notes: Create your series of notes by clicking each note in order on the large keyboard.

  • Specify the duration of a note: Select the note and then click the icon for whole note, half note, dotted quarter note, quarter note, or eighth note.

  • Add rests: You can also add rests of different durations by clicking a rest symbol (located below the large keyboard). Like editing a text document, you can click anywhere in your score and add new notes or rests at the insertion point; delete notes and rests; or select a note or series of notes and change their instrument.

  • Adjust volume and tempo: The Volume slider and Tempo slider control the volume and tempo during playback.

  • Control playback: The Play and Stop buttons allow you to play back or halt playback while editing.

  • Change name of score: The default name of your score is melody1, but you can enter a different name in the Name text box. Just be sure there are no spaces in the name.

Finally, selecting the Show Name check box shows the name of your audio creation with its icon when displayed in the workspace, and selecting the Visible check box makes the icon visible in the workspace.