I recently was looking for an arduino solution for making my own phaser electronics. I discovered this thread. It provides me with almost everything I need. All I'm missing is an ascending tone for the overload, and (if possible) play a WAV for the firing of the phaser, with a start, loop the middle as long as I'm pushing the button and then the end when I let go. Can anyone help me? I'm new to Arduino, but decent with learning programming languages.
MatiBF:
I recently was looking for an arduino solution for making my own phaser electronics. I discovered this thread. It provides me with almost everything I need. All I'm missing is an ascending tone for the overload, and (if possible) play a WAV for the firing of the phaser, with a start, loop the middle as long as I'm pushing the button and then the end when I let go. Can anyone help me?
Do you have your three sound snippetets ready in some audio file format?
start
middle loop
-end
If you have all the sound you need and the total length of those sound is three seconds or less, you could convert them to PCM aucio data and use like shown here: http://playground.arduino.cc/Code/PCMAudio
It should be doable to change the code, so that
it starts with playing sound like that:
initial sound when pressing the button
midddle loop again and again as long as the button is pressed
finalizing sound when button is released
Without having the sounds you need, the only thing I could offer help with, is a "white noise generator":
The problem with loping like this is it is best done with the sound sample in memory. This is to prevent clicks when the sample loops. The problem is the lack of read / write memory in the Arduino.
You could add external paging memory but it gets complex.
jurs:
Do you have your three sound snippetets ready in some audio file format?
start
middle loop
-end
I'm working on finding a good source from which to extract the sound of a phaser blast.
jurs:
If you have all the sound you need and the total length of those sound is three seconds or less, you could convert them to PCM aucio data and use like shown here: Arduino Playground - HomePage
It should be doable to change the code, so that
it starts with playing sound like that:
initial sound when pressing the button
midddle loop again and again as long as the button is pressed
finalizing sound when button is released
Thanks, it should be short enough for that.
jurs:
Without having the sounds you need, the only thing I could offer help with, is a "white noise generator":
It's not enough for you to play "white noise, you need it different?
In case yes: First get the sound ready you want to play, THEN ask for help!
Nobody can help you playing sound with the Arduino, which nobody knows about, except you!
I assumed (rightly, it would seem) that the method would be the same regardless of the sound, so I asked in parallel to searching for a source.
Any idea on playing an ascending tone in parallel with the flashing of the LEDs for overload? I figure it requires a form of threading, but 'm not sure how to implement that with a varying length of time for one of the threads.