Hello experts,
I'm new but fascinated by the almighty Arduino platform. I'm excited to get my first completed project out of the way. But I'll need the community's help because I'm starting from the ground up!
I have a theory in which the x, y, z data changes from an accelerometer/compass sensor can be used to manipulate playback of audio in real-time. I'm sure that theory is ancient and many sound generators or effects units use that workflow already to achieve some cool results. But I want to build my own!
For example how can I make a 180,000ms audio track suddenly play in reverse (while already playing) during a drastic shift of position of a baton/stick controller that is equipped with a non-click button and an accel/compass on its tip--say, a change from -300 to - 200 (100 increments) on xAxis while using the speed in which those 100 increments were reached, lets say 1000ms, to change the current playback speed? The button would simply be a switch to allow the accel data to pass through and perform an action. Kind of like the scrubber tool for all the a/v editors out there.
My main roadblock is the formula needed to convert accel data into time. A second roadblock is constructing a formula or function that shifts playback speed/direction back to normal upon release of the button, after carrying the momentum build up from a combination of the speed in which the coordinates shifted as well as the release moment of the button during that motion--like the varying results of a turntable motor due to torque settings.
Supposed things needed:
- Audio board with micro/SD slot and pre-amp output with an UART interface and firmware that allows for playback speed and direction changes. (Ex. http://www.vizictechnologies.com/#!smartwav/c118s)
- A small Arduino board, like the LilyLad (LilyPad Arduino Simple Board - DEV-10274 - SparkFun Electronics)
- A small accelerometer like this (FLORA Accelerometer/Compass Sensor - LSM303 [v1.0] : ID 1247 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits)
- Power source. Not sure how much is needed for this sort of application.
I anticipate needing more stuff that I'm hoping you all can help suggest. Real-time results is key since my application is a performance-based device.
Thank you all in advance for reading and potentially helping. I look forward to your suggestions