Pages: [1]   Go Down
Author Topic: Can you preload audio onto the arduino?  (Read 586 times)
0 Members and 1 Guest are viewing this topic.
Mankato, MN
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My roommate is under the impression that our house is haunted. I want to scare her via audio. What would be the best way to go about doing this?

Wireless would be bliss, but a timer circuit would be easier. Upload audio onto mp3 device, and send out the signal via audio jack to some timing circuit? I assume I'd have to set the audio track on a loop.

Or can I preload the audio directly onto my arduino and code the timing (like hit play @ 2am or in 6 hours)
Logged

MinnesotaStateUniversity on treasurenet.com & diyma.com

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8967
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You cane store a small segment of audio in an Arduino sketch. See the Sonic Screwdriver project:

http://www.instructables.com/id/Working-Sonic-Screwdriver/
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

HI
you can figure out approximately how long of audio you can store on your Arduino by finding out:

1 how much of your Arduino's memory your sketch takes (say Ssize) out of your total available memory (say Tsize).
2 then do: (Tsize-Ssize)/((Bit depth of audio)*(Sample rate of audio)*(number of channels))=time available in seconds of audio

You can maximise available audio time by taking the bit depth down to 10 bit (this is already LOFI (kind of turns a voice into robot voice), WAVE and AIFF are at 16bits on CDs, 8Bit is an old gameboy sound...), using mono (1 audio channel instead of 2) and taking the sample rate to 32kHz. Try doing all this on your file once it's already compressed ( MP3 ). Play with the balance of bitdepth and samplerate till you get something audibly satisfying.

VLC allows you to tweek export setting i think, or freeware like Audacity...

Hope that helped
Logged

Pages: [1]   Go Up
Jump to: