MSGEQ7 programming explanation-translation

Hi fellow Arduino’ers!
I love to listen to music, so I want to make a ledstrip (first normal one, then individually addressable one) react to my music. I already did this with an elektrolytic microphone or whatever it is called, basically a beat detector, but you need to change it’s sensitivity for each song and stuff like that. That didn’t work out too well.
So now I’d like to split up my audio signal (from my vinyl player) with a normal Y splitter, and let a part of the sound go to my speakers (with amplifier in it), and the other part to my Arduino to analyse the sound with an MSGEQ7 spectrum analyser.

I’ve found this really good tutorial: http://nuewire.com/info-archive/msgeq7-by-j-skoba/ .
But I don’t really understand how this chip works. I’d like to really understand what kind of output it gives so I can write my own code for it.
It’d be verry friendly of some of you guys might give some input on my following questions! :slight_smile:

What does the strobepin do and when should i put it HIGH/LOW? I can’t find a proper translation (I’m a non-native speaker). I only know a stroboscope, so I guess it has something to do with putting stuff on and off?

int strobePin = 2; // strobe is attached to digital pin 2

So I guess what we are doing here, is resetting the chip by giving the reset pin a quick pulse. So does that mean that when the reset pin is low again, it ‘listens’ for new input, and then immediately stops ‘listening’ for new input and only works with that first input untill you reset it? Or how does this chip handles the incoming data?

digitalWrite(resetPin, HIGH);
 digitalWrite(resetPin, LOW);

Why do we read the same pin each timen and we get the result of another frequency every time we read it? I guess this has something to do with the strobe we put on and off, but I still don’t know what exactly is going on.

 for (int i = 0; i < 7; i++)
 {
 digitalWrite(strobePin, LOW);
 delayMicroseconds(30); // to allow the output to settle
 spectrumValue[i] = analogRead(analogPin);

 // comment out/remove the serial stuff to go faster
 // - its just here for show
 if (spectrumValue[i] < 10)
 {
 Serial.print(" ");
 Serial.print(spectrumValue[i]);
 }
 else if (spectrumValue[i] < 100 )
 {
 Serial.print(" ");
 Serial.print(spectrumValue[i]);
 }
 else
 {
 Serial.print(" ");
 Serial.print(spectrumValue[i]);
 }

 digitalWrite(strobePin, HIGH);
 }
 Serial.println();
}

Thanks guys!
Bram

A little up - nobody who can help me?

Why do we read the same pin each time

Because the output is connected to ONE pin.

and we get the result of another frequency every time we read it

The output varies by frequency. Since there is a finite minimum time between reads, the value will be for a different frequency each time the output is read. If you could read the output instantaneously, you'd get a graph of the frequencies being detected by the chip over some small interval of time.