Vox Imperium: Stormtrooper Voice Changer
To play the quintessential Stormtrooper "click" and "static burst" sounds, we need to rip them from a sound clip, convert them to a raw format and load them into the Prop Shield's serial flash memory.
Convert Sound Clips to Raw
Make sure the project is set to 44.1kHz, highlight the portion of the clip you want (we'll highlight the "click" noise) and crop it (Trim Audio in Audacity).
Export the clip (File > Export Audio...), name the new file click.raw and adjust the file options to:
- Save as type: Other uncompressed files
- Header: RAW (header-less)
- Encoding: Signed 16-bit PCM
Repeat this process for the static burst sound, which we named break.raw.
Upload Sound Clips to Prop Shield
Now that we have the raw sound clips, we need to upload them to the Teensy. To do that, we'll use the TeensyTransfer Tool.
Download the TeensyTransfer repository as a ZIP file. Open a new Arduino sketch and select Sketch > Include Library > Add .ZIP Library. Find and select the TeensyTransfer-master.zip file. This will install the TeensyTransfer library.
Open File > Examples > TeensyTransfer-master > teensytransfertool.
In Tools, select:
- Board: Teensy 3.2 / 3.1
- USB Type: Raw HID
- CPU Speed: 96 MHz optimized (overclock)
- Port: \<Your Teensy's Port>
Upload the sketch to the Teensy. Find the downloaded TeensyTransfer-master.zip file and unzip it. Go to TeensyTransfer-master/extras and unzip the pre-compiled teensytransfer program for your operating system:
- teensytransfer.gz for Linux
- teensytransfer.mac.zip for OS X
- teensytransfer.zip for Windows
Open a command prompt, navigate to the TeensyTransfer-master/extras/teensytransfer directory and run the program to upload the raw audio clips to the Prop Shield's flash memory:
cd <Downloads directory>TeensyTransfer-master/extras/teensytransfer teensytransfer -w <GitHub directory>/Vox_Imperium/sfx/click.raw teensytransfer -w <GitHub directory>/Vox_Imperium/sfx/break.raw
You can check if the transfer worked by entering
teensytransfer -l, and the tool should output the files found on the serial flash memory.