Grumpy_Mike:
Probably as there are bound to be some buffer in the way.
Basically I think this is not the chip for you. It is only a seriese of second order filters after all. However I don’t know what you do want, an FFT will only take a snapshot of a waveform not the whole sound.
Basically I want to have LED strips that react to the music. How I'm thinking I'll achieve this is by writing to the LEDs based on real time information about the sound. Information such as total amplitude (volume), peak amplitude values of frequency bands (similar to what the MSGEQ7 does), and even implement a beat detecting algorithm, and update the leds on each beat.
As mentioned in the previous pages, an envelope detector could be used for detecting the volume. A beat detection method could be detected using FFT (yeah it's a snapshot, but that's effectively the same as what the MSGEQ7 is doing (I know this is continuous unlike FFT, but the idea is to get frequency band info in relatively real time)). I could parse the entire audio file to be played and create effects based on that, but then songs would have to be stored on an SD card or such, or a computer connection would be required (Ideally I want to connect either an aux cable or via bluetooth/network, where the audio is streamed).
How would you recommend I implement extracting information from the audio? And what information would you think would be useful to extract in terms of having reactive LEDs?
I think you are over thinking this. The MSGEQ7 chip is fine for this application and the decay of the signal is exactly what you want, without it it does not look as good.
As I mentioned in reply #6:-
This is what I made from two chips, one for the left channel and the other for the right.
Then a year later I took the data from this setup and used to control an animation.
Grumpy_Mike:
I think you are over thinking this. The MSGEQ7 chip is fine for this application and the decay of the signal is exactly what you want, without it it does not look as good.
Okay, glad to hear that. So its back to the drawing board with how to use the peak band values to display on the led strip(s). Initially I was selecting 3 bands (low, med, and high frequency) that map to red, blue, green for example. Issue with this is once you play something like fast electronic music you end up with all the leds being white. At the top of my head I can think of using the variation (subject to noise though). Beat detection is a big one on the list too.
As I mentioned in reply #6:-
This is what I made from two chips, one for the left channel and the other for the right.
Issue with this is once you play something like fast electronic music you end up with all the leds being white.
Are you just setting all the LEDs to the same colour? If so then I would not expect a good display as yes this is what will happen. Even when they are not white the colours will be washed out pastel colours just like when you generate RGB valuesfrom simple random numbers.
But why not do something like I did with the bars on my display only with LEDs?
Use the length of a section of LEDs to indicate loudness at a specific frequency and colour to indicate what band you have. You can even display them in a matrix if you like with the LEDs so it looks exactly like the bars.
You could use a different colour space to get your colours like the HSV space derived from the three bands if you like.
The beat detection can be from the lowest band, set a threshold and use that to trigger a change in display. Note from my video there is little information / change in the upper bands you could use that to trigger different colour mapping in the same way as a beat detection.
What sort of physical LED layout do you want? Long strip, short strips in patterns like the outline of hexagons or a square matrix?
You cab even use thresholds to trigger preset anamation like rapid movement of short lit segments back and forward or anything you fancy.
The trick is to try and imagine what it will look like and implement what you think will look good. It doesn’t always look like you imagine sometime it is better sometimes it is worse.
when using the msgeq7 coupled with a microphone that has auto gain, where can I add in a potentiometer for further user control?
as i understand, the POT needs to be connected to ground and positive where the middle pin is connected to what? and how does that then travel to the ADC?
as i understand, the POT needs to be connected to ground and positive
No you understand wrong.
To act as a level control connect one end to ground, the other end to the output of your amplifier and the middle pin to the input of your MSGEQ7.
The pot needs to be a log law one. Sometimes called a log taper if you want a volume knob like you have on a radio. If you use the more normal linear one then all the useful control is squashed into one end.
Grumpy_Mike:
Are you just setting all the LEDs to the same colour? If so then I would not expect a good display as yes this is what will happen. Even when they are not white the colours will be washed out pastel colours just like when you generate RGB valuesfrom simple random numbers.
But why not do something like I did with the bars on my display only with LEDs?
Use the length of a section of LEDs to indicate loudness at a specific frequency and colour to indicate what band you have. You can even display them in a matrix if you like with the LEDs so it looks exactly like the bars.
You could use a different colour space to get your colours like the HSV space derived from the three bands if you like.
The beat detection can be from the lowest band, set a threshold and use that to trigger a change in display. Note from my video there is little information / change in the upper bands you could use that to trigger different colour mapping in the same way as a beat detection.
What sort of physical LED layout do you want? Long strip, short strips in patterns like the outline of hexagons or a square matrix?
You cab even use thresholds to trigger preset anamation like rapid movement of short lit segments back and forward or anything you fancy.
The trick is to try and imagine what it will look like and implement what you think will look good. It doesn’t always look like you imagine sometime it is better sometimes it is worse.
I was setting the value of three bands to R, G, and B. So the lowest band maps to R, mid to G, and high to B. Edit: Sorry yeah all the leds were the same color, as I was using "analog" (or dumb?) strips.
Interesting ideas to keep in mind. I like the idea of HSV. Which three bands would I use? Maybe have a circular buffer with the values of each band and select the three with the most variation? I am going to be using a long strip for now (or maybe two strips in parallel). Yeah I've seen a video where animations are triggered by volume. Hmm beat detection seems quite simple in this case, maybe too simple. I guess the threshold is fixed and not automatically adjusted, which would be taken care of if using software AGC (which I am going to need to use anyways for different volume compatibility, or somehow do that in hardware). And what if the beat consists of hi-hats and sorts?
From what I'm understanding, a compandor would provide the functionality of an AGC? So if the audio signal is weak it expands it to fill the 0 - 5v range, and if it's weak it compresses it to 0 - 5v? This would probably be answered in the datasheet, but how do you adjust the gain and the gain control time? With an AGC implemented on arduino changing the sampling time and length of circular buffer takes care of this.
A compressor and an AGC amplifier are two names for the same thing.
And what if the beat consists of hi-hats and sorts?
Then you will not measure them if you are only looking at the low frequencies.
With any colour mapping, RGB or HSV or any of the others that there are, you can make it fixed or you could make it dynamic, changing on a time or trigger values or external switches.
Grumpy_Mike:
A compressor and an AGC amplifier are two names for the same thing.
Then you will not measure them if you are only looking at the low frequencies.
With any colour mapping, RGB or HSV or any of the others that there are, you can make it fixed or you could make it dynamic, changing on a time or trigger values or external switches.
It looks like a good chip but I haven’t used it. You would need an oscilloscope and signal generator to do the development work needed to make it into a working circuit.
From the specification it looks like it might do the job, what do you think? OR should I stick to using an op amp circuit?
That's hard to say. And, I've forgotten exactly what problem you're trying to solve.
If the compression it too fast it will push-down the peaks making the beat harder to detect. But if it operates slowly you should get more of an automatic gain control effect. Note that it's 2:1 compression which reduces the "dynamic range" (it can make loud signals quieter and quiet signals louder, minimizing the extremes) but it doesn't fully-adjust the volume to a preset target level. (I assume you can slow-down the timing.)
If you go back to the 1st page of this topic I give a couple of ideas for automatic sensitivity adjustment, instead of adjusting the signal level.
I use one of these methods in my [u]Worlds Simplest Effect[/u] where the reference/threshold is the 20-second moving average... The LED (or light) flickers-on when the level is above average and it flickers-off when the it's below average. It's NOT beat detection, but the LED is on half the time and off half the time so you get lots of "LED action" no matter how loud the sound/signal is. The "Worlds Simplest Effect" is just a simple example to help people to get started but I use something very-similar for a "real" lighting effect.
DVDdoug:
That's hard to say. And, I've forgotten exactly what problem you're trying to solve.
If the compression it too fast it will push-down the peaks making the beat harder to detect. But if it operates slowly you should get more of an automatic gain control effect. Note that it's 2:1 compression which reduces the "dynamic range" (it can make loud signals quieter and quiet signals louder, minimizing the extremes) but it doesn't fully-adjust the volume to a preset target level. (I assume you can slow-down the timing.)
If you go back to the 1st page of this topic I give a couple of ideas for automatic sensitivity adjustment, instead of adjusting the signal level.
I use one of these methods in my [u]Worlds Simplest Effect[/u] where the reference/threshold is the 20-second moving average... The LED (or light) flickers-on when the level is above average and it flickers-off when the it's below average. It's NOT beat detection, but the LED is on half the time and off half the time so you get lots of "LED action" no matter how loud the sound/signal is. The "Worlds Simplest Effect" is just a simple example to help people to get started but I use something very-similar for a "real" lighting effect.
The problem I'm trying to solve is having the signal level always constant, regardless of the volume of the audio signal. (This way the lights react to the music, rather than the volume of the music).
I'm aware of using an arduino with a circular buffer and a envelope detector to automatically adjust sensitivity, but thought it would be better to have analogue amplification of the signal. I think I might but the circuit and test it using an oscilloscope. Also I could do an arduino circular buffer. I think as it stands the software implementation seems to win, but the hardware would produce better results I think. I'll update on what happens :).
I have a question regarding the msgeq7. If the peak of a frequency band is high, then the peak value is read, followed by a peak that is lower (lower than the decayed value of the first signal), will the lower peak be registered by the msgeq7?
I ask this as there is a decay on each read. Would a lower peak value be registered if it is lower than the original value with the decay deducted from it? Cheers.
If the peak of a frequency band is high, then the peak value is read, followed by a peak that is lower (lower than the decayed value of the first signal), will the lower peak be registered by the msgeq7
No, the decay value is based on the value you read last. So even if nothing is the next level read, successive reads will still show a decreasing signal. Therefore, if the lower value is maintained it will decay down to that lower reading and then stay fixed as long as the input is at this lower level.