Pages: [1]   Go Down
Author Topic: R2D2 sounds via Tone command  (Read 4351 times)
0 Members and 1 Guest are viewing this topic.
Tacoma, WA
Offline Offline
Full Member
***
Karma: 4
Posts: 192
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've done a bit of googling, everyone seems to want to play the R2D2 type beeps and such with a WAV file. Seems like they're basic enough, you should be able to do it with just the tone command. Anyone ever try? Got some frequencies and durations, or a demo sketch? It just seems to me that robots are supposed to make that sound, so I'd like my robot to do so.. smiley-wink
Logged

Brian from Tacoma, WA
Arduino evangelist - since Dec, 2010.

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 8
Posts: 1992
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I suspect R2D2 has quite a few harmonics and un-square wave like noises in his 'voice'. The tone command just produces a harsh sterile noise of a given frequency.  It isn't even a sine wave which would give a much more agreeable sound.  Theres probably a reason every body plays .wav files....  smiley
Logged


Brazil
Offline Offline
God Member
*****
Karma: 1
Posts: 616
Wusik Dot Com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Indeed, just get a wav recording and output via PWM PCM instead. You can get good audio at 32khz by using the 8-bit timer, or even 21khz by my latest tests, also using a single 16-bit timer. (check my posts) Even unfiltered it sounds good.

Wk
Logged


Pages: [1]   Go Up
Jump to: