user27301: I'm trying to build a led equalizer using arduino and I want to light up with the frequencies.
And I need a little help on how I should do it cause Im a beginner.
Should I use pulsein() or analogin pin to measure the freqeuencies? 
The input will be an audio cable.

user27157: Use a MSGEQ7. This IC is a "Seven Band Graphic Equalizer".
Here is its datasheet:
https://www.sparkfun.com/datasheets/Components/General/MSGEQ7.pdf
This method is more efficient, accurate and easier then pulsein() or analogRead(). The IC is fairly cheap and there are many libraries for it.
https://github.com/NicoHood/MSGEQ7
Here is a nice project that I found and that uses that IC. It can be a good souce of inspiration for both your code and your electronics.
https://www.youtube.com/watch?v=InrQvtUuS2w

user4143: There are three steps to doing what you want, and the Arduino is going to struggle with all of them.
First you need to sample a short block of audio into a buffer that is a power-of-two in size with at least double the number of samples that you want to have bars, and at double the frequency of the highest frequency band you are interested in.
Once you have that sample set you then need to perform a Fast Fourier Transform (FFT) on it. This is quite a heavy mathematical operation, but there are integer only implementations of it that work kind of OK on a little Arduino (though a floating point version running on a better chip with FPU, or a DSP version on a chip with a DSP, is more desirable). 
Then the third step is to take the results of the FFT (or "buckets") and calculate the power magnitude of each one (basically the square root of the sum of the squares of the real and imaginary values of the bucket - just like Pythagoras with a triangle).
Finally you can plot those power values on your LED bars.

27301: <p>I'm trying to build a led equalizer using arduino and I want to light up with the frequencies.</p>

<p>And I need a little help on how I should do it cause Im a beginner.</p>

<p>Should I use pulsein() or analogin pin to measure the freqeuencies? </p>

<p>The input will be an audio cable.</p>
 27157: <p>Use a MSGEQ7. This IC is a "Seven Band Graphic Equalizer".</p>

<p>Here is its datasheet:</p>

<p><a href="https://www.sparkfun.com/datasheets/Components/General/MSGEQ7.pdf" rel="nofollow">https://www.sparkfun.com/datasheets/Components/General/MSGEQ7.pdf</a></p>

<p>This method is more efficient, accurate and easier then pulsein() or analogRead(). The IC is fairly cheap and there are many libraries for it.</p>

<p><a href="https://github.com/NicoHood/MSGEQ7" rel="nofollow">https://github.com/NicoHood/MSGEQ7</a></p>

<p>Here is a nice project that I found and that uses that IC. It can be a good souce of inspiration for both your code and your electronics.</p>

<p><a href="https://www.youtube.com/watch?v=InrQvtUuS2w" rel="nofollow">https://www.youtube.com/watch?v=InrQvtUuS2w</a></p>
 4143: <p>There are three steps to doing what you want, and the Arduino is going to struggle with all of them.</p>

<p>First you need to sample a short block of audio into a buffer that is a power-of-two in size with at least double the number of samples that you want to have bars, and at double the frequency of the highest frequency band you are interested in.</p>

<p>Once you have that sample set you then need to perform a <em>Fast Fourier Transform (FFT)</em> on it. This is quite a heavy mathematical operation, but there are <em>integer only</em> implementations of it that work kind of OK on a little Arduino (though a floating point version running on a better chip with FPU, or a DSP version on a chip with a DSP, is more desirable). </p>

<p>Then the third step is to take the results of the FFT (or "buckets") and calculate the power magnitude of each one (basically the square root of the sum of the squares of the real and imaginary values of the bucket - just like Pythagoras with a triangle).</p>

<p>Finally you can plot those power values on your LED bars.</p>
