How to add the Sound Movement robot skill
- Load the most recent release of ARC (Get ARC).
- Press the Project tab from the top menu bar in ARC.
- Press Add Robot Skill from the button ribbon bar in ARC.
- Choose the Audio category tab.
- Press the Sound Movement icon to add the robot skill to your project.
Don't have a robot yet?
Follow the Getting Started Guide to build a robot and use the Sound Movement robot skill.
How to use the Sound Movement robot skillThe Sound movement skill is for embedded devices on your robot that have two integrated microphones for the left and right channels. This skill will allow your robot to respond to which side the sound is coming from. A script can be applied to each direction of the sound to control movement.
*note: not all computers have stereo microphones or stereo microphone inputs. Verify that your computer mic input is stereo, otherwise this robot skill will receive mono audio.
1. Left Microphone Sound Level
This value represents the incoming sound level on the left microphone. The speed that a sample is taken is determined by the Update speed in the settings.
2. Right Microphone Sound Level
This value represents the incoming sound level on the Right microphone. The speed that a sample is taken is determined by the Update speed in the settings.
3. Pause Checkbox
This checkbox pauses the sampling of the left and right microphones.
4. Audio Waveform
This gives you visual feedback that your audio input devices (microphones) are configured correctly and are picking up sound.
1. Update Speed Drop-down
This drop-down allows you to select the sample Update speed of the microphones. The range is 100-60000 milliseconds. The default value is 100ms.
2. Minimum Left Level Drop-down
This drop-down allows you to select the minimum sound level value on the left microphone that will activate the Left Script. The range is 5-125. The default value is 20.
3. Left Script
This script will activate when a value over the Minimum Left Level value has been detected.
4. Minimum Right Level Drop-down
This drop-down allows you to select the minimum sound level value on the right microphone that will activate the Right Script. The range is 5-125. The default value is 20.
5. Right Script
This script will activate when a value over the Minimum Right Level value has been detected.
How to Use the Sound Movement Skill
This example will show you how to add code to have the robot turn right when it hears a sound from the right.
1) Install, configure and test your audio input devices (see instructions below).
2) Add the Sound Movement Skill to your ARC project (Project -> Add Skill -> Audio -> Sound Movement ).
3) Add a Movement Panel to your ARC project (Project -> Add Skill -> Movement Panel).
4) Verify that there is activity on the Audio Waveform within the Main Window.
5) In the skill settings add a script for the Left and Right Scripts. As an example, if the sound level of the right microphone is above the minimum Right value, use the script to have the robot turn right:
You will need a device that has a stereo microphone. A stereo microphone has 2 channels: left and right.
Configure Audio Input Device
You might have to adjust the microphone input volume/gain. To adjust the mic volume use the Microsoft Windows volume mixer, and first, make sure you have selected the correct input device. Your laptop or computer may have a few different mic devices. Maybe one is on a remote camera. Find the mic you'd like to use and adjust the volume. To find the volume settings that are ideal on your computer, follow these steps:
1) Right-click on the little speaker on your system tray
2) Select "Open Sound Settings"
3) In the "Input" section of the Sound Settings, you'll notice a little VU meter beside the active device. Make sure your active device is indeed the microphone you want to use. By making sounds, the VU meter should move.
4) Click on the "Device Properties" and locate the volume slider for the microphone. We usually have our volume set for 78. Play around with different volumes until you see your voice is being picked up by the VU meter. Adjust the volume input level/gain to display your voice's regular volume near the middle of the VU Display graph.
Upgrade to ARC Pro
Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.
My robot has a webcamera with two microphones. I added the control. Unfortunately, it shows left at 10 and right at 10 but never changes. The "pause" is off and Sound servo shows the right levels. What am I doing wrong?