Need to learn how to create different "click" sounds

First off I am new. I am trying to make several different click sounds, similar to the sound of a key being pressed on a computer keyboard.

What I would like to do in the end is space several different click sounds apart to run in sequence, with different delay times between each click.

After I complete this, I would like to accompany the clicks with an Led Flash with each click. I will be using 1 separate LED for each click.

if there was a timeline for what I want to happen it would look like this:

Click…click…click…click…click…click…click…click…etc
flash…flash…flash…flash…flash…flash…flash…flash…etc

so each click would be paired with a flash of a different LED.

I have an 8ohm speaker, and enough LED’s and resistors.

Can Anyone help me to begin? Something as simple as how to just make a click sound would even help to start.

Thanks!
Jesse

(Ive googled all that I could think of for this but the search terms keep giving me results that aren’t satisfying my question)

See my two messages in http://forum.arduino.cc/index.php?topic=299032.0

Pete

Thank you, Pete, this definitely helps!

it's a very simple code to work with and manipulate.

I am working the tones and delay times to try and emulate the clicks, but I think the problem is that they are tones, where as I need something that is popping/distorting the speaker to make a live clicking noise.

So is there a way to achieve more of a clicking/popping sound?

I have an 8ohm speaker..

Do not connect an 8-Ohm speaker directly to the Arduino. The Arduino is rated for 50mA maximum, which works out to 125 Ohms minimum ([u]Ohm's Law[/u]).

You can use a resistor in series with the speaker, but the speaker may be too quiet. If it's not loud enough the easiest thing to do is use "powered" computer speakers.

I am working the tones and delay times to try and emulate the clicks, but I think the problem is that they are tones

I'm surprised you're perceiving a tone in 5 milliseconds. Try a shorter duration or a lower frequency.

DVDdoug: Try a shorter duration or a lower frequency.

the shortest duration i can get is 100, i haven't worked with arduino for very long but is that normal?

The output from tone() is just PWM at a fixed frequency. To get a popping sound I think you might need to be able to play proper audio signals. That would require that you output to a DAC which isn't available on most Arduinos.

Pete

jessecaggiano: Can Anyone help me to begin? Something as simple as how to just make a click sound would even help to start.

Perhaps first learn something about sound effects here, then download the sample project to play with.

Typically there are several different ways of generating sound with an Arduino, for example: - playing beep tones using the tone() function (that's the example above about) - digital sound synthesis - direct playback of pre-recorded sound (WAV file, 8-bit PWM, mono with 8 kHz data rate) - playback of sound using external hardware as a "sound module" connected to the Arduino

Yes, a "click" is indeed a tone.

It is generally rather short, a rather high pitch, and usually has a triangular decreasing envelope. Essentially a shrunken drumbeat.