12-26-2022 restore Return-to-Top function. Header-only link is no longer recognized, now requires full URL.
@ -15,7 +15,7 @@ Most laptop computers can easily make voice recordings.
|
|||||||
|
|
||||||
In Windows, the Sound Recorder program creates .wma files. Many free websites like [this one](https://audio.online-convert.com/convert-to-mp3) can convert your existing audio file into .wav or .mp3 format.
|
In Windows, the Sound Recorder program creates .wma files. Many free websites like [this one](https://audio.online-convert.com/convert-to-mp3) can convert your existing audio file into .wav or .mp3 format.
|
||||||
|
|
||||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Playing Audio Files]]</i><p>
|
||||||
|
|
||||||
## Step 2 - My Sounds
|
## Step 2 - My Sounds
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ This open a new Chrome tab called **My Sounds**, where you can upload and manage
|
|||||||
|
|
||||||
<p align="center">[[/images/Playing-Audio-Files/0120-My_Sounds-menu.png|]]<p>
|
<p align="center">[[/images/Playing-Audio-Files/0120-My_Sounds-menu.png|]]<p>
|
||||||
|
|
||||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Playing Audio Files]]</i><p>
|
||||||
|
|
||||||
## Step 3 - SoundPool Menu
|
## Step 3 - SoundPool Menu
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ Leave the My Sounds tab open, and return to the first Chrome tab. Open a Blocks
|
|||||||
|
|
||||||
<p align="center">[[/images/Playing-Audio-Files/0130-SoundPool-menu.png|]]<p>
|
<p align="center">[[/images/Playing-Audio-Files/0130-SoundPool-menu.png|]]<p>
|
||||||
|
|
||||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Playing Audio Files]]</i><p>
|
||||||
|
|
||||||
## Step 4 - Initialize SoundPool
|
## Step 4 - Initialize SoundPool
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ It's best to do this before `waitForStart`, to save time later.
|
|||||||
|
|
||||||
<p align="center">[[/images/Playing-Audio-Files/0140-initialize-SoundPool.png|]]<p>
|
<p align="center">[[/images/Playing-Audio-Files/0140-initialize-SoundPool.png|]]<p>
|
||||||
|
|
||||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Playing Audio Files]]</i><p>
|
||||||
|
|
||||||
## Step 5 - Preload Sound
|
## Step 5 - Preload Sound
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ For safety and convenience, add a secondary condition to the Repeat Until loop:
|
|||||||
|
|
||||||
<p align="center">[[/images/Playing-Audio-Files/0160-init-telemetry.png|]]<p>
|
<p align="center">[[/images/Playing-Audio-Files/0160-init-telemetry.png|]]<p>
|
||||||
|
|
||||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Playing Audio Files]]</i><p>
|
||||||
|
|
||||||
## Step 6 - Play Sound
|
## Step 6 - Play Sound
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ Windows Explorer gives a handy estimate of playback duration, rounded to the nea
|
|||||||
|
|
||||||
Right-click on any column heading, and choose "Length" (not "Duration"). This helps when starting to determine the exact amount of timed pause needed by a sound clip.
|
Right-click on any column heading, and choose "Length" (not "Duration"). This helps when starting to determine the exact amount of timed pause needed by a sound clip.
|
||||||
|
|
||||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Playing Audio Files]]</i><p>
|
||||||
|
|
||||||
## Use in Development
|
## Use in Development
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ Even simple counting values can be indicated with a number of beeps, or with rec
|
|||||||
|
|
||||||
Sounds are most practical in a test environment, without the extreme noise of a tournament.
|
Sounds are most practical in a test environment, without the extreme noise of a tournament.
|
||||||
|
|
||||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Playing Audio Files]]</i><p>
|
||||||
|
|
||||||
## SoundPool Options
|
## SoundPool Options
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ Review the **optional** green Blocks to adjust volume, rate and looping. Hover t
|
|||||||
|
|
||||||
Make these settings **before** playing the audio file.
|
Make these settings **before** playing the audio file.
|
||||||
|
|
||||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Playing Audio Files]]</i><p>
|
||||||
|
|
||||||
## Other Notes
|
## Other Notes
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ For spoken audio that plays only on the Driver Hub or DS phone, see this FTC Wik
|
|||||||
|
|
||||||
Special note... you may find that Android does not load or play the audio files instantly, especially the first time. It takes some practice to determine a file's response characteristics; still there can be unpredictable system-related variation. Consider pre-playing key sounds, for instant response later.
|
Special note... you may find that Android does not load or play the audio files instantly, especially the first time. It takes some practice to determine a file's response characteristics; still there can be unpredictable system-related variation. Consider pre-playing key sounds, for instant response later.
|
||||||
|
|
||||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Playing Audio Files]]</i><p>
|
||||||
|
|
||||||
## Longer Playbacks
|
## Longer Playbacks
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ Some [forums](https://stackoverflow.com/questions/43060791/android-soundpool-can
|
|||||||
|
|
||||||
One FTC team wanted a theme song for autonomous. If the playing time can't be stretched enough, a last resort might be to break up the recording into **several sections** and play them in order. With great care this could be overlaid onto a completed/fine-tuned Linear OpMode autonomous. Or the autonomous could be re-written as a **state machine** in an Iterative OpMode, with the audio clips played in a **timed sequence**. Not so easy but maybe a good programming project! Learn about Blocks timers at [this FTC Wiki tutorial](https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Timers-in-FTC-Blocks).
|
One FTC team wanted a theme song for autonomous. If the playing time can't be stretched enough, a last resort might be to break up the recording into **several sections** and play them in order. With great care this could be overlaid onto a completed/fine-tuned Linear OpMode autonomous. Or the autonomous could be re-written as a **state machine** in an Iterative OpMode, with the audio clips played in a **timed sequence**. Not so easy but maybe a good programming project! Learn about Blocks timers at [this FTC Wiki tutorial](https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Timers-in-FTC-Blocks).
|
||||||
|
|
||||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Playing Audio Files]]</i><p>
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user