WiiOui
Group members :
Simon Carlioz
Stuart Kent
Phillip Nguyen
Derek Roberson
WiiOui is a real-time audio effects device. The WiiMote is used to add audio effects to streaming audio in an interactive way.
This project combines audio DSP, Bluetooth, wav file player modification, RTOS, and speaker amplification.
Wiimote
Connecting to the Wiimote was achieved through BlueUSB. It detects the attached bluetooth dongle and starts probing for connections. Once the link has been established with the Wiimote, it locks itself in a loop to read 3-axis data as well as the various buttons. This persists until reset or battery death.
States
We used positional data to determine the direction of the top face or the front nose of the Wiimote. These were divided into regions to determine states and were otherwise set to default. Below the states are shown. From top left to bottom right: Down, Up, Left, Right. The LEDs build into the mbed are also associated with one state each for clarity purposes.
Audio effects
The starting base was the WavePlayer library. All audio effects were done by intercepting the read-in value from the .wav file, converting to float, and applying audio effects before sending the final value for the sample to the WavePlayer library's normal routine.
Here are the currently implemented effects.
Volume control
Hold A Turn left to reduce the volume or right to increase it
Flanging
Hold/swing Wiimote 90 degrees to left, Press B
Adds a time delayed version of the audio stream to itself. The time delay varies sinusoidally with a tunable frequency and amplitude.
Echoing
Hold/swing Wiimote 90 degrees up, Press B
Adds two time delayed versions of the audio stream to itself. The weights for each stream are tunable and are normalized to one.
Bit crushing
Hold/swing Wiimote 90 degrees to right, Press B
Crates a scratchy sound by reducing the quality of the audio stream by converting all 16 bit audio samples into 8 bit samples.
Short demo
Parts Needed
- Speaker
- Bluetooth dongle (add the model)
Circuit
SD breakout
http://developer.mbed.org/components/SD-Card/
USB breakout
https://learn.sparkfun.com/tutorials/usb-type-a-female-breakout-hookup-guide
Audio jack breakout
Code
We started from Peter Barrett's BlueUSB library for the bluetooth interface and from Steve Ravet's waveplayer library. We have also used SDFileSystem.
Here is our work :
Import programwiimote_audio
BlueUSB and Waveplayer merged
Import librarywave_player
wave player with audio effects
1 comment on WiiOui:
Please log in to post comments.
Hello Stuart,
Great work. Have you a simple example to manage Wii with mbed. I'm looking for code to send wii activity by serial link. thank Philippe